/* 
    BMD ADVOCATE CLIENT MANAGEMENT SYSTEM (ACMS)
    RECTIFIED FULL CSS - "MYBILLBOOK" PROFESSIONAL BILLING STYLE
    FILE: css/style.css
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --navy: #0f172a;       /* Deep Midnight */
    --slate: #1e293b;      /* Text Primary */
    --gold: #f59e0b;       /* Justice Gold */
    --light-bg: #f1f5f9;   /* Page Background */
    --white: #ffffff;
    --sidebar-w: 260px;
}

/* --- BASE STYLES --- */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light-bg);
    color: var(--slate);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* --- SIDEBAR (SLIDE-IN MOBILE READY) --- */
.sidebar {
    width: var(--sidebar-w);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: var(--navy);
    color: white;
    z-index: 1100;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 15px rgba(0,0,0,0.1);
}

.sidebar-brand {
    padding: 25px 20px;
    background: rgba(0,0,0,0.2);
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 14px 22px;
    color: #94a3b8;
    text-decoration: none !important;
    transition: 0.2s;
    font-weight: 500;
    font-size: 0.95rem;
    border-left: 4px solid transparent;
}

.nav-link i { width: 35px; font-size: 1.2rem; }

.nav-link:hover, .nav-link.active {
    background: var(--gold);
    color: var(--navy) !important;
    border-left-color: white;
}

/* --- MAIN WRAPPER --- */
.main-wrapper {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

/* --- FIXED STAT CARDS (STRICT STRUCTURE) --- */
.stat-card {
    background: var(--white);
    border-radius: 18px;
    padding: 22px;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important; /* Forces icon to right */
    height: 115px;
    border: none;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05);
    transition: 0.3s ease;
    overflow: hidden;
}

.stat-card:hover { transform: translateY(-5px); }

/* Text container inside card */
.stat-card div:first-child {
    flex: 1;
    z-index: 2;
}

.stat-card h6 {
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.stat-card h2, .stat-card h3 {
    font-weight: 800;
    margin: 0;
}

/* Icon box inside card */
.stat-icon-box {
    width: 55px;
    height: 55px;
    border-radius: 14px;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.6rem;
    flex-shrink: 0; /* Prevents icon from squishing */
    z-index: 2;
}

/* Theme Colors for Cards */
.bg-navy { background-color: var(--navy) !important; }
.text-white { color: #ffffff !important; }
.bg-white-subtle { background-color: rgba(255,255,255,0.1) !important; }

/* Subtle colors for white cards */
.bg-inflow { background: #dcfce7 !important; color: #16a34a !important; }
.bg-outflow { background: #fee2e2 !important; color: #dc2626 !important; }
.bg-pending { background: #fef3c7 !important; color: #d97706 !important; }

/* --- PROFESSIONAL TABLES --- */
.legal-table {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
    border: 1px solid #e2e8f0;
}

.legal-table thead {
    background: #f8fafc;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
}

.table > :not(caption) > * > * {
    padding: 1.2rem 1rem;
    border-bottom: 1px solid #f1f5f9;
}

/* --- BUTTONS & INPUTS --- */
.btn-legal {
    background: var(--gold);
    color: var(--navy);
    font-weight: 700;
    border-radius: 12px;
    border: none;
    padding: 12px 25px;
    transition: 0.3s;
}

.form-control, .form-select {
    border-radius: 10px;
    padding: 12px 15px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

/* --- MOBILE RESPONSIVENESS (BREAKPOINTS) --- */
@media (max-width: 992px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.active { transform: translateX(0); }
    .main-wrapper { margin-left: 0 !important; }
    
    .main-content {
        padding: 15px !important;
        padding-top: 85px !important;
    }

    /* Fixed Top Navbar for Mobile */
    .mobile-nav {
        display: flex !important;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 65px;
        background: white;
        z-index: 1040;
        padding: 0 20px;
        align-items: center;
        justify-content: space-between;
        box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    }
}

/* App Install Banner Style */
.install-banner {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: var(--navy);
    color: white;
    padding: 18px;
    border-radius: 15px;
    z-index: 9999;
}

/* --- LOGIN SCREEN --- */
.login-screen {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 45px;
    width: 100%;
    max-width: 400px;
}