/* LawyerPro - Premium CSS */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #1E3A8A;        /* Dark blue */
    --secondary: #4338CA;      /* Indigo */
    --accent: #06B6D4;         /* Cyan */
    --success: #10B981;        /* Green */
    --warning: #F59E0B;        /* Amber */
    --danger: #EF4444;         /* Red */
    --info: #3B82F6;           /* Blue */

    --dark: #0F172A;
    --dark-2: #1E293B;
    --dark-3: #64748B;
    --light: #F8FAFC;
    --light-2: #F1F5F9;
    --border: #E2E8F0;
    --white: #FFFFFF;
    --radius: 14px;
    --radius-sm: 8px;
    --transition: all 0.25s cubic-bezier(.4,0,.2,1);
    --shadow: 0 4px 24px rgba(30,58,138,.10);
    --shadow-md: 0 8px 32px rgba(30,58,138,.15);
    --shadow-lg: 0 20px 60px rgba(30,58,138,.2);
}

* { box-sizing: border-box; margin:0; padding:0; }
html { scroll-behavior: smooth; }
body { font-family: 'Outfit', sans-serif; background: var(--light); color: var(--dark); min-height:100vh; overflow-x:hidden; }
a { text-decoration: none; color: var(--primary); transition: var(--transition); }
a:hover { color: var(--secondary); }

/* --- SIDEBAR --- */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, var(--dark) 0%, var(--dark-2) 100%);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1040;
    color: var(--white);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    box-shadow: 4px 0 24px rgba(0,0,0,0.1);
}
.sidebar-header {
    height: 75px;
    display: flex;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.sidebar-logo {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin-right: 12px;
    box-shadow: 0 4px 12px rgba(6,182,212,0.3);
}
.sidebar-brand { display: flex; flex-direction: column; }
.sidebar-brand span { font-weight: 700; font-size: 18px; letter-spacing: 0.5px; }
.sidebar-brand small { font-size: 11px; color: var(--accent); font-weight: 500; text-transform: uppercase; letter-spacing: 1px; }

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 24px 16px;
}
.sidebar-menu::-webkit-scrollbar { width: 4px; }
.sidebar-menu::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
.menu-label {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0 12px 12px;
}
.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: rgba(255,255,255,0.7);
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    font-size: 14.5px;
    font-weight: 500;
    transition: var(--transition);
}
.sidebar-menu a i { width: 24px; font-size: 16px; text-align: center; margin-right: 10px; color: rgba(255,255,255,0.5); transition: var(--transition); }
.sidebar-menu a:hover { background: rgba(255,255,255,0.05); color: var(--white); transform: translateX(4px); }
.sidebar-menu a:hover i { color: var(--accent); }
.sidebar-menu a.active {
    background: linear-gradient(90deg, rgba(30,58,138,0.5) 0%, rgba(30,58,138,0) 100%);
    color: var(--white);
    border-left: 3px solid var(--accent);
}
.sidebar-menu a.active i { color: var(--accent); }

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
    background: rgba(0,0,0,0.2);
}
.sidebar-user { display: flex; align-items: center; }
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--white);
    margin-right: 12px;
}
.user-info { flex: 1; overflow: hidden; }
.user-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 12px; color: var(--accent); text-transform: capitalize; }

/* --- MAIN CONTENT --- */
body { padding-left: 260px; padding-bottom: 60px; }
.page-header {
    background: var(--white);
    padding: 30px 40px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}
.page-header h2 { font-weight: 700; font-size: 24px; color: var(--dark); margin: 0 0 6px; }
.page-header p.subtitle { color: var(--dark-3); font-size: 14.5px; margin: 0; }

/* Page containers */
.row { padding: 0 30px; margin: 0; }
form.card-custom { margin: 0 30px; }
a.btn-success-custom.mb-3 { margin-left: 30px; display: inline-block; }
.alert-custom.mb-3 { margin: 0 30px 20px; }
.table-responsive-custom { padding: 0 30px; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* --- CARDS & STATS --- */
.card-custom {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: var(--transition);
}
.card-custom:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }

.stat-card {
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 16px;
}
.stat-icon.purple { background: rgba(67,56,202,0.1); color: var(--secondary); }
.stat-icon.green { background: rgba(16,185,129,0.1); color: var(--success); }
.stat-icon.blue { background: rgba(59,130,246,0.1); color: var(--info); }
.stat-icon.yellow { background: rgba(245,158,11,0.1); color: var(--warning); }
.stat-icon.red { background: rgba(239,68,68,0.1); color: var(--danger); }
.stat-icon.cyan { background: rgba(6,182,212,0.1); color: var(--accent); }
.stat-value { font-size: 28px; font-weight: 700; color: var(--dark); margin-bottom: 4px; line-height: 1; }
.stat-label { font-size: 14px; font-weight: 500; color: var(--dark-3); }

/* --- TABLES --- */
.table-custom {
    width: 100%;
    min-width: 700px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.table-custom th {
    background: var(--light-2);
    padding: 16px 20px;
    font-weight: 600;
    color: var(--dark-3);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}
.table-custom td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    color: var(--dark);
    vertical-align: middle;
}
.table-custom tbody tr:last-child td { border-bottom: none; }
.table-custom tbody tr:hover { background: var(--light); }

/* --- BUTTONS & FORMS --- */
.btn-primary-custom, .btn-success-custom {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    color: var(--white);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}
.btn-primary-custom { background: linear-gradient(135deg, var(--primary), var(--secondary)); box-shadow: 0 4px 12px rgba(30,58,138,0.2); }
.btn-primary-custom:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(30,58,138,0.3); color: var(--white); }
.btn-success-custom { background: linear-gradient(135deg, #059669, #10B981); box-shadow: 0 4px 12px rgba(16,185,129,0.2); }
.btn-success-custom:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(16,185,129,0.3); color: var(--white); }

.form-label { font-weight: 500; font-size: 14px; color: var(--dark-2); margin-bottom: 6px; }
.form-control, .form-select {
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 14px;
    color: var(--dark);
    transition: var(--transition);
    background: #fff;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(30,58,138,0.1);
    outline: none;
}
.input-group-text {
    background: var(--light-2);
    border: 2px solid var(--border);
    border-right: none;
    color: var(--dark-3);
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    padding: 0 14px;
}
.input-group .form-control { border-left: none; padding-left: 0; }
.input-group .form-control:focus { border-color: var(--border); box-shadow: none; background: rgba(30,58,138,0.02); }
.input-group:focus-within .input-group-text, .input-group:focus-within .form-control { border-color: var(--primary); }

/* --- ALERTS & BADGES --- */
.alert-custom {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.3s ease forwards;
}
.alert-custom.danger { background: #FEE2E2; color: #B91C1C; border: 1px solid #FCA5A5; }
.alert-custom.success { background: #D1FAE5; color: #047857; border: 1px solid #6EE7B7; }

.badge { padding: 6px 12px; border-radius: 30px; font-weight: 600; font-size: 11px; letter-spacing: 0.5px; }

/* --- LOGIN SCREEN --- */
.login-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #0F172A 0%, #1E3A8A 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    overflow: hidden;
}
.login-bg-shapes span {
    position: absolute;
    background: rgba(255,255,255,0.03);
    border-radius: 50%;
}
.login-bg-shapes span:nth-child(1) { width: 400px; height: 400px; top: -100px; left: -100px; border: 2px solid rgba(255,255,255,0.05); }
.login-bg-shapes span:nth-child(2) { width: 600px; height: 600px; bottom: -150px; right: -150px; background: radial-gradient(circle, rgba(6,182,212,0.1) 0%, transparent 70%); }

.login-card {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    width: 100%;
    max-width: 420px;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1;
}
.login-logo { text-align: center; margin-bottom: 30px; }
.login-logo .logo-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    margin: 0 auto 16px;
    box-shadow: 0 8px 24px rgba(30,58,138,0.3);
}
.login-logo h1 { font-weight: 800; font-size: 28px; color: var(--dark); margin: 0 0 4px; }
.login-logo p { color: var(--dark-3); font-size: 14px; margin: 0; }

.btn-login {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 8px 20px rgba(30,58,138,0.25);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(30,58,138,0.35); }

.sidebar-overlay { display: none; }

/* --- FOOTER --- */
.footer-custom {
    margin-left: 260px;
    border-top: 1px solid var(--border);
    margin-top: 40px;
    background: var(--white);
    padding: 15px 0;
}
.mobile-bottom-nav { display: none; }
.mobile-top-bar { display: none; }

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 992px) {
    body { padding-left: 0; }
    
    .mobile-top-bar {
        display: flex; justify-content: space-between; align-items: center;
        padding: 15px 20px; background: var(--white);
        border-bottom: 1px solid var(--border);
        position: sticky; top: 0; z-index: 1030;
        box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    }
    .mobile-logo { font-weight: 700; font-size: 20px; color: var(--primary); display: flex; align-items: center; gap: 8px; }
    .mobile-menu-btn { background: none; border: none; font-size: 22px; color: var(--dark-2); cursor: pointer; }
    
    .sidebar { transform: translateX(-100%); z-index: 1050; }
    .sidebar.show-mobile { transform: translateX(0); }
    
    .sidebar-overlay {
        position: fixed; top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.5); z-index: 1040;
        backdrop-filter: blur(3px); opacity: 0; pointer-events: none;
        transition: var(--transition);
    }
    .sidebar-overlay.show { opacity: 1; pointer-events: all; display: block; }
    .footer-custom { margin-left: 0; }
    .page-header { padding: 20px; flex-direction: column; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
    .row { padding: 0 15px; }
    form.card-custom { margin: 0 15px; }
    a.btn-success-custom.mb-3 { margin-left: 15px; }
    .alert-custom.mb-3 { margin: 0 15px 20px; }
    .table-responsive-custom { padding: 0 15px; }
    
    /* Show mobile nav */
    .mobile-bottom-nav { 
        display: flex; 
        justify-content: space-around; 
        position: fixed; 
        bottom: 0; 
        left: 0; 
        right: 0; 
        background: var(--white); 
        box-shadow: 0 -4px 20px rgba(0,0,0,0.08); 
        padding: 10px 0 env(safe-area-inset-bottom, 15px); 
        z-index: 1050;
        border-top: 1px solid var(--border);
    }
    .mobile-bottom-nav a {
        display: flex;
        flex-direction: column;
        align-items: center;
        color: var(--dark-3);
        font-size: 11px;
        font-weight: 500;
        text-decoration: none;
        gap: 4px;
    }
    .mobile-bottom-nav a i { font-size: 20px; transition: var(--transition); }
    .mobile-bottom-nav a.active { color: var(--primary); }
    .mobile-bottom-nav a.active i { transform: translateY(-2px); color: var(--accent); }
    body { padding-bottom: 70px; } /* Space for mobile nav */
}

@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
