:root {
    /* Modern Orange/Gold Palette - Matching ASTER Logo */
    --primary-color: #f39c12;
    --primary-dark: #d35400;
    --secondary-color: #2c3e50;
    --accent-color: #e67e22;
    --accent-light: #f1c40f;

    --bg-color: #f0f2f5;
    --card-bg: rgba(255, 255, 255, 0.95);
    --card-glass: rgba(255, 255, 255, 0.7);

    --text-main: #2c3e50;
    --text-light: #95a5a6;
    --text-dark: #1a252f;

    --success-color: #27ae60;
    --warning-color: #e67e22;
    --danger-color: #e74c3c;

    --border-radius: 16px;
    --box-shadow: 0px 18px 40px rgba(243, 156, 18, 0.1);
    --box-shadow-hover: 0px 24px 60px rgba(243, 156, 18, 0.2);
    --input-bg: #f5f7fa;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #f39c12 0%, #d35400 100%);
    --gradient-success: linear-gradient(135deg, #27ae60 0%, #219150 100%);
    --gradient-warning: linear-gradient(135deg, #e67e22 0%, #d35400 100%);

    /* Dark Mode Defaults */
    --dark-bg: #1a252f;
    --dark-card: #2c3e50;
    --dark-text: #ecf0f1;
}

[data-theme="dark"] {
    --bg-color: var(--dark-bg);
    --card-bg: var(--dark-card);
    --text-main: var(--dark-text);
    --text-dark: #ffffff;
    --text-light: #bdc3c7;
    background: #111;
}

[data-theme="dark"] .sidebar,
[data-theme="dark"] header,
[data-theme="dark"] .card {
    background-color: var(--dark-card);
    border-color: rgba(255, 255, 255, 0.05);
    color: var(--dark-text);
}

[data-theme="dark"] .data-table td,
[data-theme="dark"] .data-table th {
    color: var(--dark-text);
    border-color: rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: white;
    color: var(--text-main);
    padding: 24px;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 30px rgba(243, 156, 18, 0.08);
    z-index: 1001;
    position: relative;
    transition: transform 0.3s ease, width 0.3s ease;
}

.sidebar-toggle-btn {
    display: none;
    background: transparent;
    border: none;
    font-size: 2rem;
    color: var(--primary-color);
    cursor: pointer;
    margin-right: 15px;
    transition: transform 0.3s ease;
}

.sidebar-toggle-btn:hover {
    transform: scale(1.1);
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
}

/* Animated background effect */
.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        radial-gradient(circle, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px, 80px 80px;
    background-position: 0 0, 40px 40px;
    opacity: 0.3;
    animation: moveBackground 20s linear infinite;
    pointer-events: none;
}

@keyframes moveBackground {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(50px, 50px);
    }
}

.logo-container {
    text-align: center;
    margin-bottom: 40px;
    padding: 10px;
    position: relative;
    z-index: 1;
}

.sidebar-logo {
    max-width: 100%;
    height: auto;
    max-height: 80px;
    object-fit: contain;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.menu-item {
    color: var(--text-light);
    text-decoration: none;
    padding: 14px 20px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.menu-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.menu-item:hover::before {
    left: 100%;
}

.menu-item ion-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.menu-item:hover {
    color: var(--primary-color);
    background-color: rgba(243, 156, 18, 0.08);
    transform: translateX(5px);
}

.menu-item:hover ion-icon {
    transform: scale(1.1);
    color: var(--primary-dark);
}

.menu-item.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 8px 16px rgba(243, 156, 18, 0.25);
}

.menu-item.active ion-icon {
    color: white;
}

.main-content {
    flex: 1;
    padding: 30px;
    background-color: var(--bg-color);
    overflow-y: auto;
}

header {
    background: white;
    padding: 20px 32px;
    box-shadow: 0 2px 20px rgba(243, 156, 18, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    margin-bottom: 30px;
    transition: padding 0.3s ease;
}

.header-left {
    display: flex;
    align-items: center;
}

.search-container {
    position: relative;
    max-width: 400px;
    width: 100%;
    margin-right: 20px;
}

.search-container input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border-radius: 12px;
    border: 1px solid rgba(243, 156, 18, 0.2);
    background: #f8f9fa;
    font-family: inherit;
    transition: all 0.3s;
}

.search-container input:focus {
    background: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.1);
}

.search-container ion-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1.2rem;
}

.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    margin-top: 8px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    display: none;
}

.search-result-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f2f5;
    transition: background 0.2s;
}

.search-result-item:hover {
    background: #f8f9fa;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item .title {
    font-weight: 600;
    color: var(--text-dark);
    display: block;
}

.search-result-item .subtitle {
    font-size: 0.85rem;
    color: var(--text-light);
}

.search-result-item .type-badge {
    float: right;
    font-size: 10px;
    background: #e8ecf1;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.header-center {
    display: flex;
    justify-content: center;
}

.modern-clock {
    text-align: center;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(243, 156, 18, 0.2);
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.05);
    min-width: 220px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.modern-clock::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-primary);
}

.modern-clock:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(243, 156, 18, 0.12);
    border-color: rgba(243, 156, 18, 0.4);
}

.clock-date {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 2px;
}

.clock-time {
    font-size: 28px;
    font-weight: 900;
    color: var(--primary-dark);
    font-family: 'Outfit', sans-serif;
    letter-spacing: 2px;
    line-height: 1.1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.clock-time span.sep {
    animation: blink 1s infinite;
    opacity: 0.8;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: flex-end;
}

/* Cards & Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(243, 156, 18, 0.1);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
    border: 1px solid rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 60px rgba(243, 156, 18, 0.25);
    border-color: rgba(243, 156, 18, 0.3);
}

.stat-card h3 {
    font-size: 13px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-card h3 ion-icon {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.stat-card .stat-value {
    font-size: 36px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

.stat-card.warning .stat-value {
    background: var(--gradient-warning);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card.success .stat-value {
    background: var(--gradient-success);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Payment Summary Grid - Ultra Modern Design */
.payment-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.payment-card {
    padding: 28px 24px;
    border-radius: 20px;
    color: white;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    min-height: 140px;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
    overflow: hidden;
    cursor: pointer;
}

/* Animated gradient overlay */
.payment-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s, transform 0.6s;
    transform: translate(0, 0);
}

.payment-card:hover::before {
    opacity: 1;
    transform: translate(25%, 25%);
}

/* Decorative circle */
.payment-card::after {
    content: '';
    position: absolute;
    bottom: -30px;
    right: -30px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    transition: all 0.4s;
}

.payment-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.payment-card:hover::after {
    transform: scale(1.5);
    opacity: 0.5;
}

.payment-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.payment-card:hover .payment-icon {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1) rotate(5deg);
}

.payment-icon ion-icon {
    font-size: 28px;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.payment-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
    z-index: 1;
}

.payment-card h3 {
    font-size: 12px;
    opacity: 0.95;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1;
}

.payment-card .value {
    font-size: 26px;
    font-weight: 900;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
    line-height: 1;
    letter-spacing: -0.5px;
}

/* Color Schemes with Enhanced Gradients */
.bg-bim {
    background: linear-gradient(135deg, #8e44ad 0%, #9b59b6 50%, #bb6bd9 100%);
}

.bg-bci {
    background: linear-gradient(135deg, #e67e22 0%, #f39c12 50%, #f1c40f 100%);
}

.bg-mpesa {
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 50%, #ff6b6b 100%);
}

.bg-emola {
    background: linear-gradient(135deg, #f39c12 0%, #f1c40f 50%, #ffd93d 100%);
    color: #2c3e50;
}

.bg-emola .payment-icon {
    background: rgba(44, 62, 80, 0.2);
}

.bg-emola .payment-icon ion-icon {
    color: #2c3e50;
}

.bg-kesh {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 50%, #55efc4 100%);
}

.bg-primary {
    background: var(--gradient-primary);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .payment-summary-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }

    .payment-card {
        padding: 20px 18px;
        min-height: 120px;
    }

    .payment-icon {
        width: 48px;
        height: 48px;
    }

    .payment-icon ion-icon {
        font-size: 24px;
    }

    .payment-card .value {
        font-size: 22px;
    }
}

/* Charts & Activity */
.dashboard-split {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 30px;
}

.chart-container {
    position: relative;
    height: 350px;
    padding: 15px;
    background: linear-gradient(to bottom, rgba(243, 156, 18, 0.02), transparent);
    border-radius: 16px;
}

#revenueChart {
    max-height: 100%;
}

@media (max-width: 960px) {
    .dashboard-split {
        grid-template-columns: 1fr;
    }
}

.card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 8px 32px rgba(243, 156, 18, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 12px 48px rgba(243, 156, 18, 0.15);
}

.card h3 {
    margin-bottom: 24px;
    font-size: 19px;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card h3 ion-icon {
    color: var(--primary-color);
    font-size: 1.4rem;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 8px 30px rgba(243, 156, 18, 0.5);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 6px 12px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    background: #eff4fb;
    color: var(--text-main);
    font-weight: 500;
    transition: all 0.2s;
}

.btn-sm:hover {
    background: #e2e8f0;
    transform: scale(1.05);
}

.btn-sm.danger {
    color: var(--danger-color);
    background: rgba(238, 93, 80, 0.1);
}

.btn-sm.danger:hover {
    background: rgba(238, 93, 80, 0.2);
}

.btn-sm.success {
    color: var(--success-color);
    background: rgba(76, 201, 240, 0.1);
}

.btn-sm.success:hover {
    background: rgba(76, 201, 240, 0.2);
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table th {
    text-align: left;
    padding: 16px;
    color: var(--text-dark);
    font-weight: 700;
    border-bottom: 2px solid rgba(243, 156, 18, 0.1);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(to bottom, rgba(243, 156, 18, 0.03), transparent);
}

.data-table td {
    padding: 18px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    color: var(--text-main);
    font-weight: 500;
    transition: background 0.2s ease;
}

.data-table tbody tr {
    transition: all 0.2s ease;
}

.data-table tbody tr:hover {
    background: linear-gradient(to right, rgba(243, 156, 18, 0.04), transparent);
    transform: scale(1.01);
}

.data-table tr:last-child td {
    border-bottom: none;
}

/* Badges */
.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge.pago {
    background: rgba(5, 205, 153, 0.15);
    color: var(--success-color);
}

.badge.pendente {
    background: rgba(255, 181, 71, 0.15);
    color: #FFB547;
}

.badge.cancelado {
    background: rgba(238, 93, 80, 0.15);
    color: var(--danger-color);
}

/* Dashboard Split */
.dashboard-split {
    display: flex;
    gap: 24px;
}

.dashboard-split .card {
    flex: 1;
}

.chart-container {
    height: 400px;
    width: 100%;
    position: relative;
    padding-bottom: 20px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(43, 54, 116, 0.4);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    width: 50%;
    max-width: 600px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: var(--text-light);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.close:hover {
    color: var(--danger-color);
}

/* Forms */
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e5f2;
    border-radius: 12px;
    /* Smooth inputs */
    background-color: var(--input-bg);
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    transition: border 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: #fff;
}

.form-group label {
    font-weight: 500;
    color: var(--text-main);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

/* Responsividade */
@media (max-width: 768px) {
    .dashboard-split {
        flex-direction: column;
    }

    .sidebar {
        display: none;
    }

    /* TODO: Add mobile toggle */
    .app-container {
        flex-direction: column;
    }

    .modal-content {
        width: 90%;
    }
}

/* Documents Grid */
.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.document-card {
    background: white;
    border: 1px solid #e8ecf1;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.document-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.doc-icon {
    font-size: 3rem;
    flex-shrink: 0;
}

.doc-info {
    flex: 1;
}

.doc-info h4 {
    margin: 0 0 5px 0;
    color: #2c3e50;
    font-size: 1rem;
}

.doc-info p {
    margin: 0;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.doc-meta {
    font-size: 0.8rem !important;
    opacity: 0.7;
}

.doc-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* Global Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-section {
    animation: fadeIn 0.4s ease-out;
}

/* Loading Pulse */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        transform: translateX(-105%);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar.active+.sidebar-backdrop {
        display: block;
    }

    .sidebar-toggle-btn {
        display: block;
    }

    .main-content {
        padding: 15px;
    }

    header {
        padding: 15px 20px;
    }

    .header-center {
        display: none;
        /* Hide clock on small desktops/tablets to save space */
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .search-container {
        max-width: none;
    }

    .header-right .user-info span {
        display: none;
        /* Hide username text, keep icon */
    }

    .header-right .btn span {
        display: none;
        /* Hide logout text */
    }

    .card {
        padding: 15px;
    }

    /* Responsive Tables */
    .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 1rem;
    }

    .data-table {
        min-width: 600px;
        /* Force scroll instead of squishing */
    }

    .dashboard-split {
        grid-template-columns: 1fr;
    }

    .documents-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .header-left,
    .header-right {
        width: 100%;
        justify-content: space-between;
    }

    .search-container {
        margin-right: 0;
    }

    .modal-content {
        width: 95% !important;
        padding: 20px !important;
    }
}