/*
 * ExLaw - Legal Practice Management System
 * Modern Professional Stylesheet v2
 * =========================================
 */

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

/* ========== CSS VARIABLES ========== */
:root {
    /* Brand Colors */
    --primary: #2563eb;
    --primary-light: #3b82f6;
    --primary-dark: #1d4ed8;
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;
    --accent: #8b5cf6;
    --accent-light: #a78bfa;

    /* Navigation */
    --nav-bg: #0f172a;
    --nav-hover: rgba(255,255,255,0.08);
    --nav-active: rgba(255,255,255,0.12);

    /* Backgrounds */
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-header: #ffffff;
    --bg-input: #ffffff;
    --bg-muted: #f1f5f9;
    --bg-subtle: #f8fafc;

    /* Text */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-white: #ffffff;
    --text-heading: #1e293b;
    --text-link: #2563eb;

    /* Borders */
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --border-input: #cbd5e1;
    --border-focus: #2563eb;

    /* Border Radius */
    --radius: 10px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-pill: 50px;
    --radius-circle: 50%;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.07), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
    --shadow-card: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-card-hover: 0 10px 25px -5px rgba(0,0,0,0.1), 0 4px 10px -4px rgba(0,0,0,0.04);
    --shadow-dropdown: 0 10px 40px -8px rgba(0,0,0,0.15), 0 4px 12px -2px rgba(0,0,0,0.08);
    --shadow-header: 0 1px 3px rgba(0,0,0,0.05);

    /* Status Colors */
    --success: #059669;
    --success-light: #d1fae5;
    --success-dark: #047857;
    --success-50: #ecfdf5;
    --warning: #d97706;
    --warning-light: #fef3c7;
    --warning-50: #fffbeb;
    --danger: #dc2626;
    --danger-light: #fee2e2;
    --danger-50: #fef2f2;
    --info: #2563eb;
    --info-light: #dbeafe;
    --info-50: #eff6ff;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Cascadia Code', monospace;

    /* Transitions */
    --transition-fast: 120ms ease;
    --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 300ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Spacing */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;

    /* Layout */
    --header-height: 64px;
    --nav-height: 48px;
    --max-width: 1400px;
}

/* ========== RESET & BASE ========== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background-image: none !important;
}

a {
    color: var(--text-link);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-heading);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5em;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }

p {
    color: var(--text-secondary);
    margin-bottom: 0.5em;
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ==========================================================
   HEADER & NAVIGATION
   ========================================================== */

.header-nav-container {
    background: var(--bg-header) !important;
    background-image: none !important;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-header);
    border-bottom: 1px solid var(--border-color);
}

.header-nav-container::before {
    display: none !important;
}

/* Header Bar */
header {
    background: var(--bg-header) !important;
    background-image: none !important;
    color: var(--text-primary);
    padding: 0 var(--space-8);
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 10;
    max-width: var(--max-width);
    margin: 0 auto;
    width: 100%;
}

header h1 {
    margin: 0;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
}

/* Brand Logo */
.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    position: relative;
}

.brand-logo i {
    color: var(--primary);
    font-size: 1.3rem;
    background: var(--primary-50);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.brand-logo .brand-accent {
    color: var(--primary);
}

/* Site Logo (legacy) */
.site-logo {
    height: 36px;
    width: auto;
}

/* Header Right Section */
.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

/* Add File / Action Button in Header */
.add-file-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background: var(--primary);
    color: var(--text-white);
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition);
    border: none;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
}

.add-file-btn:hover {
    background: var(--primary-dark);
    color: var(--text-white);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Navigation Bar — CENTERED */
nav {
    background: var(--nav-bg) !important;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    border: none;
    box-shadow: none;
    margin: 0;
    min-height: var(--nav-height);
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    max-width: var(--max-width);
}

nav ul li {
    display: flex;
}

nav ul li a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.65);
    padding: 0 22px;
    height: var(--nav-height);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition);
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    background: none;
    position: relative;
    letter-spacing: 0.01em;
}

nav ul li a:hover {
    color: #ffffff;
    background: var(--nav-hover);
    border-bottom-color: rgba(255,255,255,0.3);
}

nav ul li a.active,
nav ul li a[aria-current="page"] {
    color: #ffffff;
    background: var(--nav-active);
    border-bottom-color: var(--primary-light);
}

nav ul li a i {
    font-size: 14px;
    width: 16px;
    text-align: center;
    color: inherit;
    opacity: 0.85;
}

.ai-assistant-text {
    color: inherit !important;
}

/* ==========================================================
   ACCOUNT ICON & DROPDOWN
   ========================================================== */

.account-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-circle);
    transition: background var(--transition);
    gap: 6px;
}

.account-icon:hover {
    background: var(--bg-muted);
}

.account-icon img {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-circle);
    object-fit: cover;
    border: 2px solid var(--border-color);
    transition: all var(--transition);
}

.account-icon:hover img {
    border-color: var(--primary-light);
}

/* Dropdown chevron */
.account-icon .dropdown-arrow {
    font-size: 10px;
    color: var(--text-muted);
    transition: transform var(--transition);
}

.account-icon:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: var(--bg-card);
    min-width: 220px;
    box-shadow: var(--shadow-dropdown);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    z-index: 1000;
    overflow: hidden;
    animation: dropdownSlide 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 4px;
}

.dropdown-content.show {
    display: block;
}

@keyframes dropdownSlide {
    from { opacity: 0; transform: translateY(-8px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.dropdown-content .dropdown-header {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 4px;
}

.dropdown-content .dropdown-header .dropdown-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
}

.dropdown-content .dropdown-header .dropdown-role {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.dropdown-content a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    padding: 10px 14px;
    font-size: 13px;
    text-decoration: none;
    transition: all var(--transition-fast);
    border-radius: var(--radius-sm);
    font-weight: 450;
}

.dropdown-content a:hover {
    background: var(--primary-50);
    color: var(--primary);
}

.dropdown-content a i {
    width: 18px;
    text-align: center;
    font-size: 14px;
    opacity: 0.7;
}

.dropdown-content a:hover i {
    opacity: 1;
}

.dropdown-content .dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

.dropdown-content a.dropdown-logout {
    color: var(--danger);
}

.dropdown-content a.dropdown-logout:hover {
    background: var(--danger-50);
    color: var(--danger);
}

/* ==========================================================
   MAIN CONTENT AREA
   ========================================================== */

main {
    padding: var(--space-6) var(--space-8);
    max-width: var(--max-width);
    margin: 0 auto;
    min-height: calc(100vh - 180px);
}

.container {
    padding: var(--space-6);
}

/* ==========================================================
   ANALYTICS CARDS
   ========================================================== */

.analytics-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.analytics-card {
    background: var(--bg-card) !important;
    border-radius: var(--radius);
    padding: var(--space-5);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: var(--space-4);
    transition: all var(--transition);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
}

.analytics-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--primary);
    border-radius: 0 2px 2px 0;
    opacity: 0;
    transition: opacity var(--transition);
}

.analytics-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
}

.analytics-card:hover::after {
    opacity: 1;
}

.analytics-card i {
    font-size: 1.3rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.analytics-card i.orange,
.analytics-card i.fa-folder.orange {
    color: #ea580c;
    background: #fff7ed;
}

.analytics-card i.icon-yellow,
.analytics-card i.fa-hourglass-start {
    color: #ca8a04;
    background: #fefce8;
}

.analytics-card i.icon-green,
.analytics-card i.fa-check-circle {
    color: #059669;
    background: var(--success-50);
}

.analytics-card i.icon-red,
.analytics-card i.fa-exclamation-circle {
    color: #dc2626;
    background: var(--danger-50);
}

.analytics-card i.fa-users {
    color: var(--primary);
    background: var(--primary-50);
}

.analytics-card i.fa-money-bill-wave,
.analytics-card i.fa-dollar-sign {
    color: #059669;
    background: var(--success-50);
}

.analytics-card i.fa-file-invoice-dollar,
.analytics-card i.icon-purple {
    color: #7c3aed;
    background: #f5f3ff;
}

.analytics-card div {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Icon color utilities */
.icon-red { color: #dc2626 !important; }
.icon-yellow { color: #ca8a04 !important; }
.icon-green { color: #059669 !important; }
.orange { color: #ea580c !important; }
.orange-icon { color: #ea580c !important; }
.green-icon { color: #059669 !important; }
.red-icon { color: #dc2626 !important; }
.purple-icon { color: #7c3aed !important; }

/* ==========================================================
   CARDS (Generic)
   ========================================================== */

.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: var(--space-5);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    transition: box-shadow var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card h3 {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: var(--space-4);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.scrollable-card {
    max-height: 340px;
    overflow-y: auto;
    cursor: default;
}

/* Two-column layout */
.two-column-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    width: 100%;
}

/* ==========================================================
   SCHEDULE CARDS
   ========================================================== */

.schedule-cards {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.schedule-card {
    display: block;
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius-sm);
    padding: var(--space-3) var(--space-4);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 13px;
    transition: all var(--transition);
    line-height: 1.7;
}

.schedule-card:hover {
    background: var(--primary-50);
    border-left-color: var(--primary-dark);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    transform: translateX(2px);
}

.schedule-card strong {
    color: var(--text-primary);
}

/* ==========================================================
   NOTICE CARDS
   ========================================================== */

.notice-card {
    margin-bottom: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--warning);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    cursor: pointer;
    background: var(--bg-card);
}

.notice-card:hover {
    background: var(--warning-50);
    border-left-color: var(--warning);
    box-shadow: var(--shadow-sm);
    transform: translateX(2px);
}

.notice-card strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
    font-size: 13px;
}

.notice-card p {
    color: var(--text-muted);
    font-size: 12px;
    margin: 2px 0;
}

/* ==========================================================
   TABLES & DATATABLES
   ========================================================== */

.table-container {
    width: 100%;
    margin-top: var(--space-5);
    margin-bottom: var(--space-5);
}

.debtor-table {
    padding: var(--space-6);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    border-radius: var(--radius);
    margin-bottom: var(--space-5);
    box-shadow: var(--shadow-card);
}

table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    background: transparent;
    border: none;
}

table caption {
    padding: var(--space-4) 0;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-heading);
}

table.dataTable thead th,
table thead th {
    background: var(--bg-muted) !important;
    font-weight: 600;
    text-align: left;
    padding: 12px 16px;
    color: var(--text-muted) !important;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border: none !important;
    border-bottom: 2px solid var(--border-color) !important;
    background-image: none !important;
}

table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc,
table.dataTable thead .sorting_asc_disabled,
table.dataTable thead .sorting_desc_disabled {
    background-image: none !important;
}

table.dataTable thead th::before,
table.dataTable thead th::after,
table.dataTable thead td::before,
table.dataTable thead td::after,
table.dataTable thead .sorting::before,
table.dataTable thead .sorting::after,
table.dataTable thead .sorting_asc::before,
table.dataTable thead .sorting_asc::after,
table.dataTable thead .sorting_desc::before,
table.dataTable thead .sorting_desc::after {
    display: none !important;
    content: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

table.dataTable tbody tr,
table tbody tr {
    background: var(--bg-card);
    color: var(--text-secondary);
    transition: background var(--transition-fast);
    border: none;
    cursor: pointer;
}

table.dataTable tbody tr:hover,
table tbody tr:hover {
    background: var(--primary-50) !important;
    transform: none;
    box-shadow: none;
}

table.dataTable tbody td,
table tbody td {
    padding: 12px 16px !important;
    border: none !important;
    border-bottom: 1px solid var(--border-light) !important;
    color: var(--text-secondary) !important;
    background: transparent !important;
    font-size: 13px;
}

table.dataTable tbody td:first-child {
    background: transparent !important;
    font-weight: 500;
    color: var(--text-primary) !important;
}

/* DataTables Search Bar */
.dataTables_filter {
    text-align: right;
    margin-bottom: var(--space-4);
}

.dataTables_filter label {
    font-size: 0;
    color: var(--text-muted);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    justify-content: flex-end;
}

.dataTables_filter input[type="search"] {
    padding: 10px 16px 10px 40px;
    border: 1px solid var(--border-input);
    border-radius: var(--radius-sm);
    outline: none;
    transition: all var(--transition);
    width: 300px;
    font-size: 13px;
    font-family: var(--font-family);
    background: var(--bg-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E") 14px center no-repeat;
    color: var(--text-primary);
}

.dataTables_filter input[type="search"]:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.dataTables_filter input[type="search"]::placeholder {
    color: var(--text-muted);
}

/* DataTables Pagination */
.dataTables_paginate {
    margin-top: var(--space-4);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-1);
}

.dataTables_paginate .paginate_button {
    padding: 6px 12px !important;
    border-radius: var(--radius-sm) !important;
    border: 1px solid var(--border-color) !important;
    background: var(--bg-card) !important;
    color: var(--text-secondary) !important;
    font-size: 13px !important;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-weight: 450;
}

.dataTables_paginate .paginate_button:hover {
    background: var(--primary-50) !important;
    border-color: var(--primary-200) !important;
    color: var(--primary) !important;
}

.dataTables_paginate .paginate_button.current {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: var(--text-white) !important;
    font-weight: 500;
}

.dataTables_paginate .paginate_button.disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.dataTables_info {
    font-size: 13px;
    color: var(--text-muted);
    padding-top: var(--space-4);
}

.dataTables_length {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: var(--space-3);
}

.dataTables_length select {
    padding: 4px 8px;
    border: 1px solid var(--border-input);
    border-radius: var(--radius-sm);
    font-family: var(--font-family);
    font-size: 13px;
}

/* DataTables Wrapper */
.dataTables_wrapper {
    padding: 0;
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    padding-top: var(--space-3);
}

/* Export Buttons */
.dt-buttons-container {
    margin-bottom: var(--space-4);
}

.custom-excel-btn,
.dt-button,
.buttons-excel {
    background: var(--primary) !important;
    color: var(--text-white) !important;
    border-radius: var(--radius-sm) !important;
    padding: 8px 18px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    border: none !important;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2) !important;
    transition: all var(--transition) !important;
    cursor: pointer;
    font-family: var(--font-family) !important;
}

.custom-excel-btn:hover,
.dt-button:hover,
.buttons-excel:hover {
    background: var(--primary-dark) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25) !important;
}

/* ==========================================================
   FILE TRACKING SECTION
   ========================================================== */

.file-tracking {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: var(--space-6);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
}

.file-tracking h2, .file-tracking h3 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: var(--space-4);
}

/* ==========================================================
   LAWYER CARDS (Grid View)
   ========================================================== */

.lawyers-section {
    padding: var(--space-5);
}

.lawyers-section h2 {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-5);
    color: var(--text-primary);
}

.lawyers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-5);
}

.lawyer-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: var(--space-5);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
}

.lawyer-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-3px);
    border-color: var(--primary-200);
}

.lawyer-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-200);
    background: var(--bg-main);
}

.lawyer-info {
    text-align: center;
}

.lawyer-info h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.lawyer-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 4px 0;
}

.lawyer-info p i {
    color: var(--primary);
    width: 18px;
    text-align: center;
    margin-right: 6px;
}

/* Lawyer Profile Modal */
.lawyer-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.lawyer-modal-overlay.active {
    display: flex;
}

.lawyer-modal {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: var(--space-7, 40px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 420px;
    width: 90%;
    position: relative;
    animation: modalSlideIn 0.25s ease;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.lawyer-modal-close {
    position: absolute;
    top: 14px;
    right: 18px;
    font-size: 1.6rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    transition: color var(--transition);
}

.lawyer-modal-close:hover {
    color: var(--danger);
}

.lawyer-modal-avatar {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-200);
    margin-bottom: var(--space-4);
    background: var(--bg-main);
}

.lawyer-modal h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-4);
}

.lawyer-modal-details p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 10px 0;
}

.lawyer-modal-details p i {
    color: var(--primary);
    width: 20px;
    text-align: center;
    margin-right: 8px;
}

@media screen and (max-width: 768px) {
    .lawyers-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    .lawyer-modal {
        padding: var(--space-5);
    }
    .lawyer-modal-avatar {
        width: 100px;
        height: 100px;
    }
}

@media screen and (max-width: 480px) {
    .lawyers-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================
   FILE CARDS (Grid View)
   ========================================================== */

.files-container,
.files-container1 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-4);
    margin-top: var(--space-4);
}

.file-card,
.file-card1 {
    background: var(--bg-card) !important;
    border-radius: var(--radius);
    padding: var(--space-5);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.file-card:hover,
.file-card1:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-3px);
    border-color: var(--primary-200);
}

.file-card1 i {
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: var(--space-1);
}

.file-title1 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.file-number1 {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-1);
}

.file-status1 {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.file-card1 .file-title1,
.file-card1 .file-number1,
.file-card1 .file-status1 {
    color: inherit;
}

/* Status badges */
.status-badge,
.file-status1 span {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.status-open,
.file-status-open { color: var(--success); background: var(--success-light); }
.status-closed,
.file-status-closed { color: var(--danger); background: var(--danger-light); }
.status-pending { color: var(--info); background: var(--info-light); }

/* File category tags */
.file-category-tag {
    position: absolute;
    top: 8px;
    right: 8px;
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.category-litigation { color: #6366f1; background: #eef2ff; }
.category-debt_collection { color: #f59e0b; background: #fef3c7; }
.category-conveyancing { color: #10b981; background: #d1fae5; }
.category-corporate { color: #8b5cf6; background: #ede9fe; }
.category-family { color: #ec4899; background: #fce7f3; }
.category-criminal { color: #ef4444; background: #fee2e2; }
.category-default { color: #64748b; background: #f1f5f9; }

/* ==========================================================
   SEARCH BAR
   ========================================================== */

.search-bar,
.search-bar1 {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-6);
}

.search-bar form,
.search-bar1 form {
    display: flex;
    gap: var(--space-3);
    align-items: center;
    width: 100%;
    max-width: 700px;
}

.search-bar input,
.search-bar1 input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid var(--border-input);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: var(--font-family);
    color: var(--text-primary);
    background: var(--bg-card);
    outline: none;
    transition: all var(--transition);
    box-shadow: var(--shadow-xs);
}

.search-bar input:focus,
.search-bar1 input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.search-bar button,
.search-bar1 button {
    background: var(--primary);
    color: var(--text-white);
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    transition: all var(--transition);
    font-family: var(--font-family);
    white-space: nowrap;
}

.search-bar button:hover,
.search-bar1 button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37,99,235,0.25);
}

.search-bar button i,
.search-bar1 button i {
    font-size: 14px;
}

/* ==========================================================
   MODALS
   ========================================================== */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-card);
    padding: var(--space-8);
    border-radius: var(--radius-lg);
    max-width: 560px;
    width: 90%;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    max-height: 85vh;
    overflow-y: auto;
}

.modal h3 {
    font-size: 1.1rem;
    color: var(--text-heading);
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--border-color);
}

.modal p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(6px);
    z-index: 999;
}

.modal-close {
    cursor: pointer;
    font-size: 18px;
    float: right;
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    line-height: 1;
    background: transparent;
    border: none;
}

.modal-close:hover {
    background: var(--danger-50);
    color: var(--danger);
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
    max-width: 560px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
}

.modal-content h2,
.modal-content h3 {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--space-3);
}

/* ==========================================================
   BUTTONS
   ========================================================== */

.btn,
button,
input[type="submit"],
input[type="button"] {
    font-family: var(--font-family);
    cursor: pointer;
    transition: all var(--transition);
}

.btn-primary,
.file-actions button,
.file-progress-container button,
.upload-documents button,
.upload-button {
    background: var(--primary) !important;
    color: var(--text-white) !important;
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    transition: all var(--transition);
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
    font-family: var(--font-family);
}

.btn-primary:hover,
.file-actions button:hover,
.file-progress-container button:hover,
.upload-documents button:hover,
.upload-button:hover {
    background: var(--primary-dark) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-danger,
.danger-button {
    background: var(--danger) !important;
    color: var(--text-white) !important;
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-danger:hover,
.danger-button:hover {
    background: #b91c1c !important;
    transform: translateY(-1px);
}

.btn-success {
    background: var(--success) !important;
    color: var(--text-white) !important;
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 500;
}

.btn-secondary {
    background: var(--bg-muted);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 500;
}

.btn-secondary:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.chat-input-container button {
    background: var(--primary) !important;
    color: var(--text-white);
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 500;
}

.chat-input-container button:hover {
    background: var(--primary-dark) !important;
}

/* ==========================================================
   FORMS & INPUTS
   ========================================================== */

.form-group {
    margin-bottom: var(--space-5);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: 500;
    font-size: 13px;
    color: var(--text-secondary);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="tel"],
.form-group input[type="url"],
.form-group input[type="datetime-local"],
.form-group select,
.form-group textarea,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-input);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: var(--font-family);
    color: var(--text-primary);
    background: var(--bg-input);
    outline: none;
    transition: all var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
input:focus,
select:focus,
textarea:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.file-actions form {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.file-actions .form-group {
    display: flex;
    flex-direction: column;
}

.file-actions label {
    font-weight: 500;
    margin-bottom: var(--space-2);
    font-size: 13px;
    color: var(--text-secondary);
}

.file-actions input[type="date"],
.file-actions select,
.file-actions textarea {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-input);
    font-family: var(--font-family);
}

/* ==========================================================
   FILE DETAILS PAGE
   ========================================================== */

.file-details {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: var(--space-8);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    margin: var(--space-5) 0;
}

.file-info-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
    margin-bottom: var(--space-8);
}

.file-info, .file-actions {
    flex: 1;
}

.file-info h3, .file-actions h3 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-5);
    color: var(--text-muted);
    padding-bottom: var(--space-3);
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
}

.file-info p {
    margin-bottom: var(--space-3);
    font-size: 14px;
    color: var(--text-secondary);
}

.file-info p strong {
    color: var(--text-primary);
    font-weight: 500;
}

.file-info p i {
    width: 20px;
    text-align: center;
    margin-right: var(--space-2);
    color: var(--text-muted);
}

.file-info-container,
.file-progress-container,
.file-stages-container,
.documents-section-container {
    margin-bottom: var(--space-8);
}

/* Progress Bar */
.file-progress .progress-bar {
    background: var(--border-color);
    border-radius: var(--radius-pill);
    height: 8px;
    position: relative;
    margin-bottom: var(--space-4);
    overflow: hidden;
}

.file-progress .progress {
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-pill);
    height: 100%;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.file-progress-container .form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: var(--space-4);
}

.file-progress-container label {
    font-weight: 500;
    margin-bottom: var(--space-2);
    font-size: 13px;
}

.file-progress-container input[type="number"] {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-input);
}

/* Activity Items */
.activity-item {
    padding: var(--space-4);
    border-left: 3px solid var(--primary-light);
    margin-bottom: var(--space-3);
    background: var(--bg-subtle);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    transition: background var(--transition-fast);
}

.activity-item:hover {
    background: var(--primary-50);
}

.activity-item p {
    font-size: 13px;
    margin-bottom: var(--space-1);
}

/* ==========================================================
   DOCUMENTS SECTION
   ========================================================== */

.documents-section-container {
    margin-bottom: var(--space-8);
}

.documents-section-container h3 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-5);
    color: var(--text-muted);
    font-weight: 600;
}

.upload-documents {
    margin-bottom: var(--space-5);
}

.document-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-4);
}

.document-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: var(--space-5);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all var(--transition);
}

.document-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
}

.document-card i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: var(--space-3);
}

.document-title {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: var(--space-2);
    color: var(--text-primary);
}

.document-title a {
    color: var(--text-primary);
    text-decoration: none;
}

.document-title a:hover {
    color: var(--primary);
}

.document-notes {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ==========================================================
   PROFILE PAGE
   ========================================================== */

.profile-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: var(--space-8);
    max-width: 900px;
    margin: var(--space-6) auto;
}

.profile-avatar {
    text-align: center;
}

.profile-avatar img {
    width: 140px;
    height: 140px;
    border-radius: var(--radius-circle);
    object-fit: cover;
    border: 4px solid var(--border-color);
    margin-bottom: var(--space-4);
    box-shadow: var(--shadow-md);
}

.profile-details {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: var(--space-6);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
}

.profile-details h3 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted);
    font-weight: 600;
}

.profile-form {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: var(--space-6);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
}

.profile-form h3 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted);
    font-weight: 600;
}

/* ==========================================================
   ADD FILE SECTION
   ========================================================== */

.add-file-section {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: var(--space-8);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    max-width: 900px;
    margin: var(--space-6) auto;
}

.add-file-section h2 {
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-3);
    border-bottom: 2px solid var(--border-color);
}

.new-client-fields {
    background: var(--bg-muted);
    padding: var(--space-5);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    margin-top: var(--space-3);
}

.searchable-select {
    position: relative;
}

.searchable-select input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-input);
    border-radius: var(--radius-sm);
    font-family: var(--font-family);
}

.document-upload {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}

/* ==========================================================
   DEBTOR CARDS & LIST
   ========================================================== */

.debtor-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-4);
}

.debtor-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: var(--space-5);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    margin-bottom: 0;
    transition: all var(--transition);
}

.debtor-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
}

.debt-details-container {
    background: var(--bg-muted);
    border-radius: var(--radius);
    padding: var(--space-5);
    border: 1px solid var(--border-color);
    margin-bottom: var(--space-5);
}

/* ==========================================================
   CHAT / AI ASSISTANT
   ========================================================== */

.chat-container {
    display: flex;
    flex-direction: column;
    height: 80vh;
    max-height: 800px;
    margin: var(--space-6) auto;
    width: 90%;
    max-width: 900px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    background: var(--bg-card);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.chat-window {
    flex: 1;
    padding: var(--space-6);
    overflow-y: auto;
    background: var(--bg-muted);
}

.chat-input-container {
    display: flex;
    align-items: center;
    border-top: 1px solid var(--border-color);
    background: var(--bg-card);
    padding: var(--space-4);
    gap: var(--space-3);
}

.chat-input-container input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid var(--border-input);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: var(--font-family);
    outline: none;
    transition: all var(--transition);
}

.chat-input-container input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.message {
    margin-bottom: var(--space-4);
    display: flex;
    align-items: flex-start;
}

.message.user {
    justify-content: flex-end;
}

.message.user p {
    background: var(--primary);
    color: var(--text-white);
    padding: 10px 16px;
    border-radius: var(--radius) var(--radius) var(--radius-sm) var(--radius);
    display: inline-block;
    max-width: 80%;
    word-wrap: break-word;
    font-size: 14px;
}

.message.assistant {
    justify-content: flex-start;
}

.message.assistant p {
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 10px 16px;
    border-radius: var(--radius) var(--radius) var(--radius) var(--radius-sm);
    display: inline-block;
    max-width: 80%;
    word-wrap: break-word;
    border: 1px solid var(--border-color);
    font-size: 14px;
}

.message img {
    border-radius: var(--radius-circle);
    width: 36px;
    height: 36px;
    margin-right: var(--space-3);
    flex-shrink: 0;
}

/* ==========================================================
   FILE STATUS CONTAINERS (Collections, Finance, Conveyancing)
   ========================================================== */

.file-status-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-5);
    margin-bottom: var(--space-6);
}

.file-status-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: var(--space-5);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    max-height: 400px;
}

.file-list {
    max-height: 300px;
    overflow-y: auto;
}

.file-card {
    background: var(--bg-subtle);
    border-radius: var(--radius-sm);
    padding: var(--space-4);
    margin-bottom: var(--space-3);
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition: all var(--transition);
}

.file-card:hover {
    background: var(--primary-50);
    border-color: var(--primary-200);
    transform: translateX(2px);
}

/* Bottom Row (Calendar + Notice) */
.bottom-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-5);
    margin-top: var(--space-6);
}

.calendar-section,
.notice-section {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: var(--space-5);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
}

.notice-container {
    max-height: 400px;
    overflow-y: auto;
    margin-top: var(--space-4);
}

/* ==========================================================
   REGISTER / SIMPLE PAGES
   ========================================================== */

.register-section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
    box-shadow: var(--shadow-lg);
    max-width: 500px;
    margin: var(--space-12) auto;
    border: 1px solid var(--border-color);
}

.register-section h2 {
    text-align: center;
    margin-bottom: var(--space-6);
}

/* ==========================================================
   NOTIFICATIONS / POPUPS
   ========================================================== */

.popup {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    z-index: 10000;
    display: none;
    box-shadow: var(--shadow-lg);
    font-family: var(--font-family);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { transform: translateX(-50%) translateY(-20px); opacity: 0; }
    to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

.popup.success {
    background: var(--success);
    color: var(--text-white);
}

.popup.error {
    background: var(--danger);
    color: var(--text-white);
}

.error {
    color: var(--danger);
    font-size: 13px;
    margin-top: var(--space-2);
}

.success {
    color: var(--success);
    font-size: 13px;
    margin-top: var(--space-2);
}

/* ==========================================================
   FOOTER
   ========================================================== */

footer {
    text-align: center;
    padding: var(--space-6) var(--space-6);
    border-top: 1px solid var(--border-color);
    margin-top: var(--space-10);
    background: var(--bg-card);
}

footer p {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}

footer a {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 500;
}

footer a:hover {
    text-decoration: underline;
}

/* ==========================================================
   LOGIN PAGE STYLES
   ========================================================== */

.login {
    position: relative;
    height: 100vh;
    display: grid;
    align-items: center;
    background: var(--nav-bg);
}

.login__img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0.3;
}

.login__form {
    position: relative;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-inline: 1.5rem;
    padding: 2.5rem 2rem;
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.login__title {
    text-align: center;
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: 1rem;
}

.login__content, .login__box {
    display: grid;
}

.login__content {
    row-gap: 1.75rem;
    margin-bottom: 1.5rem;
}

.login__box {
    grid-template-columns: max-content 1fr;
    align-items: center;
    column-gap: 0.75rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.login__icon, .login__eye {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.7);
}

.login__input {
    width: 100%;
    padding-block: 0.8rem;
    background: none;
    color: #fff;
    position: relative;
    z-index: 1;
    border: none;
    outline: none;
    font-family: var(--font-family);
    font-size: 14px;
}

.login__box-input {
    position: relative;
}

.login__label {
    position: absolute;
    left: 0;
    top: 13px;
    font-weight: 500;
    transition: top 0.3s, font-size 0.3s;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

.login__eye {
    position: absolute;
    right: 0;
    top: 18px;
    z-index: 10;
    cursor: pointer;
}

.login__box:nth-child(2) input {
    padding-right: 1.8rem;
}

.login__check, .login__check-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.login__check {
    margin-bottom: 1.5rem;
}

.login__check-label, .login__forgot, .login__register {
    font-size: 0.813rem;
}

.login__check-group {
    column-gap: 0.5rem;
}

.login__check-input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-light);
}

.login__forgot {
    color: rgba(255, 255, 255, 0.7);
    transition: color var(--transition);
}

.login__forgot:hover {
    color: #fff;
    text-decoration: underline;
}

.login__button {
    width: 100%;
    padding: 12px;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: var(--text-white);
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 1.5rem;
    border: none;
    font-size: 14px;
    font-family: var(--font-family);
    transition: all var(--transition);
}

.login__button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.login__register {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

.login__register a {
    color: #fff;
    font-weight: 600;
}

.login__register a:hover {
    text-decoration: underline;
}

.login__input:focus + .login__label {
    top: -12px;
    font-size: 0.75rem;
    color: #fff;
}

.login__input:not(:placeholder-shown).login__input:not(:focus) + .login__label {
    top: -12px;
    font-size: 0.75rem;
}

.site__logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
}

.site__logo {
    height: 50px;
    width: auto;
}

.title {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.85);
}

/* Login brand */
.login-brand {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-brand h2 {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
}

.login-brand h2 span {
    color: var(--primary-light);
}

.login-brand p {
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
    margin-top: 4px;
    letter-spacing: 0.5px;
}

/* ==========================================================
   RESPONSIVE DESIGN
   ========================================================== */

@media screen and (min-width: 576px) {
    .login {
        justify-content: center;
    }
    .login__form {
        width: 420px;
        padding: 3rem 2.5rem;
    }
}

@media screen and (max-width: 1024px) {
    .file-info-container {
        grid-template-columns: 1fr;
    }

    .profile-container {
        grid-template-columns: 1fr;
    }

    .two-column-container {
        grid-template-columns: 1fr;
    }

    .bottom-row {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 768px) {
    main {
        padding: var(--space-4);
    }

    header {
        padding: 0 var(--space-4);
        height: 56px;
    }

    nav {
        overflow-x: auto;
        justify-content: flex-start;
        padding: 0 var(--space-3);
    }

    nav ul {
        gap: 0;
        flex-wrap: nowrap;
        min-width: max-content;
        justify-content: flex-start;
    }

    nav ul li a {
        padding: 0 14px;
        height: 44px;
        font-size: 12px;
    }

    .analytics-cards {
        grid-template-columns: 1fr 1fr;
    }

    .files-container,
    .files-container1 {
        grid-template-columns: 1fr;
    }

    .file-info-container {
        grid-template-columns: 1fr;
    }

    .file-status-container {
        grid-template-columns: 1fr;
    }

    table {
        display: block;
        overflow-x: auto;
    }

    .debtor-table {
        padding: var(--space-4);
    }

    .file-details {
        padding: var(--space-5);
    }

    .add-file-section {
        padding: var(--space-5);
    }

    .search-bar,
    .search-bar1 {
        flex-direction: column;
    }

    .search-bar form,
    .search-bar1 form {
        flex-direction: column;
    }

    .search-bar input,
    .search-bar1 input {
        width: 100%;
    }

    .modal {
        width: 95%;
        padding: var(--space-5);
    }
}

@media screen and (max-width: 480px) {
    .analytics-cards {
        grid-template-columns: 1fr;
    }

    .brand-logo {
        font-size: 1.2rem;
    }

    .add-file-btn {
        padding: 6px 14px;
        font-size: 12px;
    }

    nav ul li a {
        padding: 0 12px;
        font-size: 11px;
    }

    .dataTables_filter input[type="search"] {
        width: 180px;
    }
}

/* ==========================================================
   UTILITY CLASSES
   ========================================================== */

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning); }

.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }

.w-full { width: 100%; }
.rounded { border-radius: var(--radius); }

.hidden { display: none; }
.visible { display: block; }

/* Card variants */
.card-elevated {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: var(--space-6);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

/* Link as card */
a.file-card,
a.file-card1,
a.debtor-card,
a.schedule-card {
    text-decoration: none;
    color: var(--text-primary);
}

/* Section headings */
.section-heading {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: var(--space-5);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: var(--space-10);
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: var(--space-4);
    display: block;
}

/* Print styles */
@media print {
    .header-nav-container,
    nav,
    .add-file-btn,
    .header-right,
    footer {
        display: none !important;
    }

    body {
        background: white;
    }

    main {
        padding: 0;
    }
}

/* Tab Container */
.tab-container {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.tab-buttons {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    background: var(--bg-main);
}

.tab-btn {
    flex: 1;
    padding: 14px 20px;
    border: none;
    background: transparent;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--primary);
    background: var(--primary-50);
}

.tab-btn.active {
    color: var(--primary);
    background: var(--bg-card);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary);
    border-radius: 3px 3px 0 0;
}

.tab-panel {
    padding: 20px;
}

@media (max-width: 600px) {
    .tab-buttons {
        flex-direction: column;
    }
    .tab-btn {
        text-align: left;
        border-bottom: 1px solid var(--border-color);
    }
    .tab-btn.active::after {
        display: none;
    }
    .tab-btn.active {
        border-left: 3px solid var(--primary);
    }
}
