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

:root {
    /* Day (Light) Mode CSS Variables */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --accent-color: #3b82f6;
    --accent-hover: #2563eb;
    --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    --accent-light: rgba(59, 130, 246, 0.08);
    --success: #10b981;
    --success-light: rgba(16, 185, 129, 0.1);
    --danger: #ef4444;
    --danger-light: rgba(239, 68, 68, 0.1);
    --warning: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.1);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --sidebar-width: 260px;
    --header-height: 70px;
}

[data-theme="dark"] {
    /* Dark Mode CSS Variables */
    --bg-primary: #090d16;
    --bg-secondary: #0f172a;
    --bg-card: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --border-color: #1e293b;
    --accent-color: #60a5fa;
    --accent-hover: #3b82f6;
    --accent-gradient: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    --accent-light: rgba(96, 165, 250, 0.15);
    --success: #34d399;
    --success-light: rgba(52, 211, 153, 0.15);
    --danger: #f87171;
    --danger-light: rgba(248, 113, 113, 0.15);
    --warning: #fbbf24;
    --warning-light: rgba(251, 191, 36, 0.15);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', 'Noto Sans Bengali', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* Layout Framework */
.app-container {
    display: flex;
    min-height: 100vh;
    max-width: 100vw;
    overflow-x: hidden;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 24px 18px 80px 18px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    max-height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}
.sidebar::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    text-decoration: none;
}

.brand-logo {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 20px;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
    flex-shrink: 0;
}

.brand-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
    padding-bottom: 40px;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 13.5px;
    transition: all 0.2s ease;
}

.nav-item a i {
    font-size: 20px;
    width: 24px;
}

.nav-item a:hover {
    background-color: var(--accent-light);
    color: var(--accent-color);
}

.nav-item.active a {
    background: var(--accent-gradient);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

/* Header & Content Area */
.main-wrapper {
    flex-grow: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-bottom: 80px; /* Space for mobile bottom navigation */
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.app-header {
    height: var(--header-height);
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 90;
    transition: background-color 0.3s ease;
}

.header-search {
    position: relative;
    max-width: 320px;
    width: 100%;
}

.header-search input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

.header-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.header-search input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.theme-toggle, .btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s ease;
}

.theme-toggle:hover, .btn-icon:hover {
    background-color: var(--border-color);
    transform: scale(1.05);
}

.user-profile-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: background-color 0.2s ease;
}

.user-profile-menu:hover {
    background-color: var(--bg-primary);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--accent-light);
    border: 2px solid var(--accent-color);
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-role {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
}

/* Page Content */
.content-container {
    padding: 32px;
    flex-grow: 1;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    overflow-x: hidden;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.page-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Fluid UI Cards */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.card-metric {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-metric:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.metric-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.metric-label {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.metric-value {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -1px;
}

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.metric-icon.blue { background-color: var(--accent-light); color: var(--accent-color); }
.metric-icon.green { background-color: var(--success-light); color: var(--success); }
.metric-icon.danger { background-color: var(--danger-light); color: var(--danger); }
.metric-icon.warning { background-color: var(--warning-light); color: var(--warning); }

/* Layout Grid for Dashboards */
.dashboard-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.card-block {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Responsive Table */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.table-custom {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 14px;
}

.table-custom th {
    padding: 14px 16px;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}

.table-custom td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.table-custom tbody tr:last-child td {
    border-bottom: none;
}

.table-custom tr:hover td {
    background-color: var(--accent-light);
}

/* Payment Sheet / Grid Matrix */
.matrix-container {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.matrix-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--bg-secondary);
}

.matrix-table th, .matrix-table td {
    padding: 12px;
    text-align: center;
    border: 1px solid var(--border-color);
    min-width: 70px;
}

.matrix-table th {
    background-color: var(--bg-primary);
    font-weight: 600;
    font-size: 13px;
}

.matrix-table td.member-info-col {
    text-align: left;
    min-width: 180px;
}

.matrix-table th.member-code-col,
.matrix-table td.member-code-col {
    position: sticky;
    left: 0;
    z-index: 12;
    background-color: var(--bg-secondary) !important;
    min-width: 60px !important;
    text-align: center;
    border-right: 1px solid var(--border-color);
}
.matrix-table th.member-code-col {
    z-index: 13;
    background-color: var(--bg-primary) !important;
}
.matrix-table td.member-name-col {
    min-width: 160px;
}

.matrix-cell-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
}

.matrix-cell-btn.paid {
    background-color: var(--success-light);
    color: var(--success);
}

.matrix-cell-btn.unpaid {
    background-color: var(--danger-light);
    color: var(--danger);
}

.matrix-cell-btn.paid:hover {
    transform: scale(1.1);
}

.matrix-cell-btn.unpaid:hover {
    transform: scale(1.1);
    background-color: var(--success-light);
    color: var(--success);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge.success { background-color: var(--success-light); color: var(--success); }
.badge.danger { background-color: var(--danger-light); color: var(--danger); }
.badge.warning { background-color: var(--warning-light); color: var(--warning); }
.badge.info { background-color: var(--accent-light); color: var(--accent-color); }

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

.form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(59, 130, 246, 0.35);
}

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

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

.btn-danger {
    background-color: var(--danger);
    color: #ffffff;
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

/* Bottom Navigation Bar (Mobile only) */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    justify-content: space-around;
    align-items: center;
    z-index: 100;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.05);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 10px;
    font-weight: 500;
    flex-grow: 1;
    height: 100%;
}

.bottom-nav-item i {
    font-size: 20px;
}

.bottom-nav-item:hover, .bottom-nav-item.active {
    color: var(--accent-color);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 24px;
}

.modal-content {
    background-color: var(--bg-secondary);
    border-radius: var(--radius-md);
    max-width: 500px;
    width: 100%;
    padding: 28px;
    box-shadow: var(--shadow-lg);
    position: relative;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
}

.modal-close {
    border: none;
    background: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-muted);
}

/* Alert Notification Banner */
.alert-banner {
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
}

.alert-banner.success { background-color: var(--success-light); color: var(--success); border-left: 4px solid var(--success); }
.alert-banner.danger { background-color: var(--danger-light); color: var(--danger); border-left: 4px solid var(--danger); }
.alert-banner.warning { background-color: var(--warning-light); color: var(--warning); border-left: 4px solid var(--warning); }

/* Responsive Media Queries */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        width: 285px;
        max-width: 85vw;
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.25);
        z-index: 9999;
        padding-bottom: 100px;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.65);
        backdrop-filter: blur(2px);
        z-index: 9998;
    }
    
    .sidebar-backdrop.active {
        display: block;
    }
    
    .mobile-sidebar-close {
        display: flex !important;
    }
    
    .main-wrapper {
        margin-left: 0;
    }
    
    .bottom-nav {
        display: flex;
    }
}

@media (max-width: 768px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
    
    .app-header {
        padding: 0 16px;
    }
    
    .content-container {
        padding: 16px;
    }
    
    .header-search {
        display: none;
    }

    /* Deactivate sticky column in payment matrix on mobile for name, but keep code sticky */
    .matrix-table td.member-info-col,
    .matrix-table td.member-name-col {
        position: static !important;
    }
}

/* Welfare Stats Cards Styles */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stats-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 16px;
}

.stats-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.stats-card-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stats-card-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.stats-card-value {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
}

@media (max-width: 576px) {
    /* Form & Grid Overrides */
    .form-row {
        grid-template-columns: 1fr;
    }
    .modal-overlay {
        padding: 12px;
    }
    .modal-content {
        padding: 16px;
    }
    
    /* Responsive Tables - Stacking Cards Layout */
    .table-responsive {
        -webkit-overflow-scrolling: touch;
        overflow-x: visible;
        width: 100%;
    }
    .table-custom {
        display: block !important;
        width: 100% !important;
        border: none !important;
    }
    .table-custom thead {
        display: none !important;
    }
    .table-custom tbody, 
    .table-custom tr, 
    .table-custom td {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .table-custom tr {
        margin-bottom: 16px !important;
        background-color: var(--bg-card) !important;
        border: 1px solid var(--border-color) !important;
        border-radius: var(--radius-md) !important;
        padding: 16px !important;
        box-shadow: var(--shadow-sm) !important;
    }
    .table-custom td {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 8px 0 !important;
        border-bottom: 1px dashed var(--border-color) !important;
        text-align: right !important;
    }
    .table-custom td:last-child {
        border-bottom: none !important;
        justify-content: flex-end !important;
        padding-top: 12px !important;
    }
    .table-custom td::before {
        content: attr(data-label) !important;
        font-weight: 700 !important;
        color: var(--text-secondary) !important;
        font-size: 13px !important;
        text-align: left !important;
        margin-right: 12px !important;
    }
    .table-custom td.photo-col {
        justify-content: center !important;
        border-bottom: 1px solid var(--border-color) !important;
        padding-bottom: 12px !important;
    }
    .table-custom td.photo-col::before {
        display: none !important;
    }
    .card-block {
        padding: 16px 12px !important;
    }
    
    /* Header Actions Reduction (prevents zoom out / horizontal scroll) */
    .user-info {
        display: none !important;
    }
    .user-profile-menu {
        padding: 4px !important;
        gap: 0 !important;
    }
    .header-actions {
        gap: 8px !important;
    }
    .app-header {
        padding: 0 12px !important;
    }
    
    /* Page Header & Actions Stacking */
    .page-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
        width: 100% !important;
    }
    .page-header > div {
        width: 100% !important;
    }
    .page-header .btn, .page-header button {
        width: 100% !important;
        justify-content: center !important;
        margin-bottom: 8px;
    }
    
    /* Form Buttons Stacking (Detects inline flex containers for button groups) */
    form div[style*="justify-content: flex-end"] {
        flex-direction: column-reverse !important;
        gap: 8px !important;
        width: 100% !important;
    }
    form div[style*="justify-content: flex-end"] .btn {
        width: 100% !important;
        justify-content: center !important;
    }
    
    /* Search Form Stacking */
    .card-block form[style*="display: flex"] {
        flex-direction: column !important;
        gap: 8px !important;
        width: 100% !important;
    }
    .card-block form[style*="display: flex"] > div {
        width: 100% !important;
    }
    .card-block form[style*="display: flex"] .btn {
        width: 100% !important;
        justify-content: center !important;
    }
    
    /* Welfare Stats Cards Stacking */
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    .stats-card {
        padding: 16px !important;
    }
}

/* Language Switch Pills */
.lang-switch-pills {
    display: inline-flex;
    background-color: var(--border-color);
    padding: 3px;
    border-radius: 20px;
    gap: 2px;
}

.lang-pill {
    font-size: 11px;
    padding: 5px 12px;
    font-weight: 700;
    border-radius: 17px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.lang-pill.active {
    background-color: var(--bg-secondary);
    color: var(--accent-color);
    box-shadow: var(--shadow-sm);
}

.lang-pill:hover:not(.active) {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
}

[data-theme="dark"] .lang-pill:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.05);
}

/* ===== Tab Navigation Component ===== */
.tab-container-header {
    display: flex;
    gap: 4px;
    padding: 4px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    background-color: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
}

.tab-btn:hover {
    color: var(--text-primary);
    background-color: var(--bg-surface);
}

.tab-btn.active {
    color: #ffffff;
    background: var(--accent-gradient);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.tab-btn i {
    font-size: 14px;
}

@media (max-width: 768px) {
    .tab-container-header {
        gap: 2px;
        padding: 3px;
    }

    .tab-btn {
        padding: 8px 12px;
        font-size: 12px;
        gap: 6px;
    }

    .tab-btn span {
        display: none;
    }

    .tab-btn i {
        font-size: 16px;
    }
}