/* ==========================================================================
   Ava Dashboard CSS - Modern Glassmorphism & Responsive Design System
   ========================================================================== */

/* --- CSS VARIABLES & TOKENS --- */
:root {
    --bg-main: #0b0f19;
    --bg-card: rgba(17, 24, 39, 0.7);
    --bg-card-hover: rgba(23, 37, 84, 0.4);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-hover: rgba(255, 255, 255, 0.15);
    
    --color-primary: #06b6d4;      /* Cyan */
    --color-primary-hover: #0891b2;
    --color-primary-soft: rgba(6, 182, 212, 0.1);
    
    --color-secondary: #8b5cf6;    /* Violet */
    --color-secondary-hover: #7c3aed;
    --color-secondary-soft: rgba(139, 92, 246, 0.1);
    
    --color-success: #10b981;      /* Emerald */
    --color-success-hover: #059669;
    --color-success-soft: rgba(16, 185, 129, 0.1);
    
    --color-danger: #f43f5e;       /* Rose */
    --color-danger-hover: #e11d48;
    --color-danger-soft: rgba(244, 63, 94, 0.1);
    
    --color-warning: #f59e0b;      /* Amber */
    --color-warning-soft: rgba(245, 158, 11, 0.1);
    
    --text-primary: #f8fafc;       /* Slate 50 */
    --text-secondary: #94a3b8;     /* Slate 400 */
    --text-muted: #64748b;         /* Slate 500 */
    
    --font-sans: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    
    --sidebar-width: 260px;
    --header-height: 80px;
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
    
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-premium: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --bg-sticky-col: #0f172a;
}

/* --- RESET & BASE STYLES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    background-image: 
        radial-gradient(at 0% 0%, rgba(6, 182, 212, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.15) 0px, transparent 50%);
    background-attachment: fixed;
}

/* --- APP CONTAINER LAYOUT --- */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* --- SIDEBAR DESIGN --- */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(8, 12, 24, 0.85);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: var(--transition-smooth);
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, #fff 0%, var(--color-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-icon {
    font-size: 1.5rem;
    color: var(--color-primary);
    -webkit-text-fill-color: initial;
}

.sidebar-menu {
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.menu-item i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    transition: var(--transition-fast);
}

.menu-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.menu-item.active {
    color: var(--text-primary);
    background: var(--color-primary-soft);
    border: 1px solid rgba(6, 182, 212, 0.2);
    font-weight: 600;
}

.menu-item.active i {
    color: var(--color-primary);
}

.sidebar-footer {
    padding: 1.5rem 1rem;
    border-top: 1px solid var(--border-color);
}

/* --- ADMIN PANEL STATUS IN FOOTER --- */
.admin-panel-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
}

.admin-avatar {
    width: 36px;
    height: 36px;
    background: var(--color-primary-soft);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
}

.admin-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.admin-info .role {
    font-weight: 600;
    font-size: 0.85rem;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-top: 2px;
}

.status-indicator.online {
    background: var(--color-success);
    box-shadow: 0 0 8px var(--color-success);
}

.logout-icon-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.4rem;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.logout-icon-btn:hover {
    color: var(--color-danger);
    background: var(--color-danger-soft);
}

/* --- MAIN CONTENT LAYOUT --- */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    max-width: calc(100% - var(--sidebar-width));
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    transition: var(--transition-smooth);
}

/* --- HEADER / STATUS BAR --- */
.content-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
}

.header-title h1 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.75rem;
    letter-spacing: -0.02em;
}

.header-title .subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.file-status-indicator .status-badge {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-lg);
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.file-status-indicator .status-badge i {
    color: var(--color-primary);
}

/* --- BUTTON SYSTEM --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-primary {
    background: var(--color-primary);
    color: #0b0f19;
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    box-shadow: 0 0 16px rgba(6, 182, 212, 0.4);
}

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

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-color-hover);
}

.btn-danger {
    background: var(--color-danger-soft);
    border-color: rgba(244, 63, 94, 0.2);
    color: #fda4af;
}

.btn-danger:hover {
    background: var(--color-danger);
    color: #fff;
    box-shadow: 0 0 16px rgba(244, 63, 94, 0.4);
}

.btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
}

.btn-block {
    display: flex;
    width: 100%;
}

/* --- GLASS CONTAINER CARDS --- */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-premium);
    transition: var(--transition-fast);
}

.glass-card:hover {
    border-color: var(--border-color-hover);
}

.glass-glow {
    position: relative;
    overflow: hidden;
}

.glass-glow::after {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.03) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(30deg);
    transition: var(--transition-smooth);
    opacity: 0;
}

.glass-glow:hover::after {
    left: 100%;
    opacity: 1;
    transition: 1s ease-in-out;
}

/* --- ADMIN UPLOAD CARD --- */
.admin-upload-card {
    background: rgba(6, 182, 212, 0.03);
    border: 1px dashed rgba(6, 182, 212, 0.3);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.admin-upload-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.upload-zone-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.upload-drag-zone {
    border: 2px dashed rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
}

.upload-drag-zone:hover {
    border-color: var(--color-primary);
    background: rgba(6, 182, 212, 0.02);
}

.upload-drag-zone.dragover {
    border-color: var(--color-success);
    background: rgba(16, 185, 129, 0.04);
}

.upload-icon {
    font-size: 2.5rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    transition: var(--transition-fast);
}

.upload-drag-zone:hover .upload-icon {
    color: var(--color-primary);
    transform: translateY(-2px);
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-types {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.uploaded-file-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.file-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.file-meta i {
    font-size: 1.5rem;
}

/* --- FILTERS LAYOUT --- */
.filter-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-premium);
    transition: var(--transition-fast);
    position: relative;
    z-index: 25;
    overflow: visible;
}

.filter-card:hover {
    border-color: var(--border-color-hover);
}

.filter-card:has(.custom-dropdown.active),
.filter-card.dropdown-open {
    z-index: 200;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    overflow: visible;
    position: relative;
}

.filter-grid-osl {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    overflow: visible;
    position: relative;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow: visible;
    position: relative;
}

.filter-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --- TOGGLE BUTTONS --- */
.toggle-group {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.25rem;
    width: fit-content;
}

.toggle-btn {
    background: transparent;
    border: none;
    padding: 0.5rem 1.25rem;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
}

.toggle-btn.active {
    background: var(--color-primary);
    color: #0b0f19;
}

.button-toggle-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    overflow: visible;
    position: relative;
}

.btn-toggle-option {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 1.25rem;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-toggle-option:hover {
    border-color: var(--border-color-hover);
    color: var(--text-primary);
}

.btn-toggle-option.active {
    background: var(--color-primary-soft);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* --- CUSTOM PREMIUM DROPDOWN WITH MULTI-SELECT --- */
.custom-dropdown {
    position: relative;
    width: 100%;
    z-index: 1;
    overflow: visible;
}

.custom-dropdown.active {
    z-index: 500;
}

.dropdown-trigger {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.dropdown-trigger:hover {
    border-color: var(--border-color-hover);
    background: rgba(255, 255, 255, 0.04);
}

.dropdown-trigger .trigger-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 0.5rem;
}

.custom-dropdown.active .dropdown-trigger {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 1px var(--color-primary);
}

.custom-dropdown.active .dropdown-trigger i {
    transform: rotate(180deg);
}

.dropdown-trigger i {
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: #0f172a;
    border: 1px solid var(--border-color-hover);
    border-radius: var(--radius-md);
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.08);
    z-index: 1000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    max-height: 350px;
}

.custom-dropdown.active .dropdown-menu {
    display: flex;
}

.dropdown-search {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.2);
}

.dropdown-search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.85rem;
}

.dropdown-search-input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.dropdown-options-list {
    overflow-y: auto;
    max-height: 250px;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* Custom Scrollbar for Dropdown Menu */
.dropdown-options-list::-webkit-scrollbar {
    width: 6px;
}
.dropdown-options-list::-webkit-scrollbar-track {
    background: transparent;
}
.dropdown-options-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
}

.dropdown-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.dropdown-option:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
}

.dropdown-option.selected {
    background: var(--color-primary-soft);
    color: var(--color-primary);
}

.dropdown-option input[type="checkbox"] {
    appearance: none;
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--text-secondary);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.dropdown-option.selected input[type="checkbox"] {
    border-color: var(--color-primary);
    background: var(--color-primary);
}

.dropdown-option.selected input[type="checkbox"]::after {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: #0b0f19;
    font-size: 0.65rem;
}

/* --- METRICS CARD GRID --- */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.metric-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: var(--shadow-premium);
    border-bottom: 2px solid transparent;
}

.metric-card:hover {
    border-color: var(--border-color-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}

.metric-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.bg-primary-soft {
    background: var(--color-primary-soft);
    border: 1px solid rgba(6, 182, 212, 0.15);
}
.bg-secondary-soft {
    background: var(--color-secondary-soft);
    border: 1px solid rgba(139, 92, 246, 0.15);
}
.bg-success-soft {
    background: var(--color-success-soft);
    border: 1px solid rgba(16, 185, 129, 0.15);
}
.bg-danger-soft {
    background: var(--color-danger-soft);
    border: 1px solid rgba(244, 63, 94, 0.15);
}

.metric-details {
    display: flex;
    flex-direction: column;
}

.metric-details h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-value-container {
    margin: 0.35rem 0;
}

.metric-value {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #fff 30%, #a5f3fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

/* --- CHARTS GRID SYSTEM --- */
.charts-row {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.chart-card {
    flex: 1;
    min-width: 320px;
}

.chart-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
}

.chart-header h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
}

.chart-container {
    position: relative;
    width: 100%;
    height: 350px;
}

/* --- DATA TABLE CARD SYSTEM --- */
.table-card {
    width: 100%;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
}

.table-header h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.subtitle-small {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.table-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.table-search {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.5rem 1rem;
    font-family: var(--font-sans);
    color: var(--text-primary);
    font-size: 0.85rem;
    width: 220px;
    transition: var(--transition-fast);
}

.table-search:focus {
    outline: none;
    border-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* TABLE COMPONENT */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    text-align: left;
    font-size: 0.85rem;
}

.data-table th, .data-table td {
    padding: 0.85rem 0.75rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: var(--transition-fast);
    white-space: nowrap;
    min-width: 130px;
}

.data-table th {
    background: var(--bg-sticky-col);
    border-bottom: 2px solid var(--border-color);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    position: sticky;
    top: 0;
    z-index: 5;
    transition: background var(--transition-fast), color var(--transition-fast);
}

/* Sortable Headers */
.data-table th.sortable {
    cursor: pointer;
    user-select: none;
}

.data-table th.sortable:hover {
    color: var(--color-primary);
    background: rgba(6, 182, 212, 0.08);
}

.th-sort-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    justify-content: space-between;
}

.sort-icon {
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.35;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
}

.data-table th.sortable:hover .sort-icon {
    opacity: 0.8;
    color: var(--color-primary);
}

.data-table th.sort-asc,
.data-table th.sort-desc {
    color: var(--color-primary);
    background: rgba(6, 182, 212, 0.05);
}

.data-table th.sort-asc .sort-icon,
.data-table th.sort-desc .sort-icon {
    opacity: 1;
    color: var(--color-primary);
    font-size: 0.85rem;
}

.data-table tbody tr:hover td {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.015);
}

.data-table td.strong-text {
    font-weight: 600;
    color: var(--text-primary);
}

.data-table td.badge-cell {
    white-space: nowrap;
}

/* Sticky first column (General) */
.data-table th:first-child, .data-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 10;
    min-width: 190px;
    background: var(--bg-sticky-col);
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
    border-right: 1.5px solid var(--border-color-hover);
}

.data-table th:first-child {
    z-index: 20;
}

/* Specific Freeze Column Adjustments */
/* 1. KPI Detail: Achievement table - Reduce "Komponen" space */
#table-achievement th:first-child, 
#table-achievement td:first-child {
    min-width: 140px;
    max-width: 190px;
    width: 160px;
    white-space: normal;
    word-break: break-word;
}

/* 2. KPI Detail: Pivot table - Balanced Unit Kerja */
#table-detail-pivot th:first-child,
#table-detail-pivot td:first-child {
    min-width: 170px;
    max-width: 220px;
}

/* 3. Monitoring OSL: Overview & Produk - Compact "Peringkat" space */
#table-osl-overview th:first-child,
#table-osl-overview td:first-child,
#table-osl-produk th:first-child,
#table-osl-produk td:first-child {
    width: 70px;
    min-width: 65px;
    max-width: 80px;
    text-align: center;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

#table-osl-overview th:first-child .th-sort-wrapper,
#table-osl-produk th:first-child .th-sort-wrapper {
    justify-content: center;
    gap: 0.35rem;
}

#table-osl-overview th:nth-child(2),
#table-osl-overview td:nth-child(2),
#table-osl-produk th:nth-child(2),
#table-osl-produk td:nth-child(2) {
    min-width: 180px;
}

/* Scroll Design */
.scroll-custom::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}
.scroll-custom::-webkit-scrollbar-track {
    background: transparent;
}
.scroll-custom::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
}
.scroll-custom::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Table Badges & Status */
.badge {
    padding: 0.35rem 0.65rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: #a7f3d0;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-danger {
    background: rgba(244, 63, 94, 0.1);
    color: #fecdd3;
    border: 1px solid rgba(244, 63, 94, 0.2);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #fef3c7;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* PAGINATION */
.table-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

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

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-page {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.btn-page:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-color-hover);
    color: var(--text-primary);
}

.btn-page:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.page-num {
    font-size: 0.85rem;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

/* --- MONITORING OSL TOP RANKS GRID --- */
.top-ranks-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.rank-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-premium);
}

.rank-card-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
}

.rank-card-header h4 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rank-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.rank-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
}

.rank-num {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.rank-item:nth-child(1) .rank-num {
    background: rgba(245, 158, 11, 0.15); /* Gold */
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.3);
}
.rank-item:nth-child(2) .rank-num {
    background: rgba(148, 163, 184, 0.15); /* Silver */
    color: #cbd5e1;
    border-color: rgba(148, 163, 184, 0.3);
}
.rank-item:nth-child(3) .rank-num {
    background: rgba(180, 83, 9, 0.15); /* Bronze */
    color: #d97706;
    border-color: rgba(180, 83, 9, 0.3);
}

.rank-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0; /* truncate helper */
}

.rank-name {
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-val {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    text-align: right;
    white-space: nowrap;
}

.text-growth-up {
    color: var(--color-success);
}

.text-growth-down {
    color: var(--color-danger);
}

.border-top-primary {
    border-top: 3px solid var(--color-primary);
}
.border-top-danger {
    border-top: 3px solid var(--color-danger);
}

/* --- MODAL DIALOG BACKDROP --- */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(3, 7, 18, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.modal-backdrop.active {
    display: flex;
    opacity: 1;
}

.modal-card {
    background: #0f172a;
    border: 1px solid var(--border-color-hover);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    transform: scale(0.95);
    transition: transform var(--transition-fast);
}

.modal-backdrop.active .modal-card {
    transform: scale(1);
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
}

.btn-close-modal {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition-fast);
}

.btn-close-modal:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.modal-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.password-input-wrapper input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 1px var(--color-primary);
}

.btn-toggle-password {
    position: absolute;
    right: 0.75rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 0.95rem;
}

.btn-toggle-password:hover {
    color: var(--text-primary);
}

.modal-footer {
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.15);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* --- TOAST SYSTEM --- */
.toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 1100;
}

.toast {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-color-hover);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
    min-width: 280px;
    max-width: 380px;
    animation: toast-in 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    position: relative;
    overflow: hidden;
}

.toast.toast-success {
    border-left: 4px solid var(--color-success);
}
.toast.toast-error {
    border-left: 4px solid var(--color-danger);
}
.toast.toast-info {
    border-left: 4px solid var(--color-primary);
}

@keyframes toast-in {
    from {
        transform: translateY(-20px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* --- DYNAMIC TAB DISP --- */
.tab-content {
    display: none;
    flex-direction: column;
    gap: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tab-content.active {
    display: flex;
    opacity: 1;
}

.hidden {
    display: none !important;
}

/* ==========================================================================
   MOBILE & RESPONSIVE LAYOUTS
   ========================================================================== */

/* --- TABLET STYLING --- */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 80px;
    }
    
    .sidebar-header .logo span {
        display: none;
    }
    
    .menu-item span {
        display: none;
    }
    
    .menu-item {
        justify-content: center;
        padding: 0.85rem 0;
    }
    
    .menu-item i {
        font-size: 1.3rem;
    }
    
    .admin-info, .admin-avatar {
        display: none !important;
    }
    
    .sidebar-footer {
        padding: 1.5rem 0.5rem;
    }
    
    #login-trigger-btn span {
        display: none;
    }
    
    #login-trigger-btn {
        padding: 0.85rem 0;
        border-radius: 50%;
        width: 48px;
        height: 48px;
        margin: 0 auto;
    }
    
    .main-content {
        margin-left: 80px;
        max-width: calc(100% - 80px);
    }
}

/* --- MOBILE VIEW --- */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 0px;
        --header-height: 70px;
    }
    
    body {
        padding-bottom: 80px; /* Space for bottom nav bar */
    }
    
    /* Hide admin login button completely on mobile */
    .admin-only-login {
        display: none !important;
    }
    
    .admin-upload-card {
        display: none !important; /* Safety check: admin shouldn't see upload on mobile */
    }
    
    /* Convert sidebar into bottom navigation */
    .sidebar {
        width: 100vw;
        height: 65px;
        bottom: 0;
        top: auto;
        left: 0;
        flex-direction: row;
        border-right: none;
        border-top: 1px solid var(--border-color);
        box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.45);
        background: rgba(11, 15, 25, 0.95);
        backdrop-filter: blur(20px);
    }
    
    .sidebar-header {
        display: none;
    }
    
    .sidebar-menu {
        flex-direction: row;
        width: 100%;
        height: 100%;
        padding: 0;
        justify-content: space-around;
        align-items: center;
        gap: 0;
    }
    
    .menu-item {
        flex: 1;
        height: 100%;
        border-radius: 0;
        border: none !important;
        background: transparent !important;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        padding: 0.25rem 0;
    }
    
    .menu-item span {
        display: block !important;
        font-size: 0.68rem;
        font-weight: 500;
    }
    
    .menu-item i {
        font-size: 1.15rem;
    }
    
    .menu-item.active i {
        color: var(--color-primary);
        filter: drop-shadow(0 0 5px rgba(6,182,212,0.5));
    }
    
    .menu-item.active span {
        color: var(--text-primary);
        font-weight: 600;
    }
    
    /* Adjust Main Content: More spacious and clean */
    .main-content {
        margin-left: 0;
        max-width: 100%;
        padding: 1rem 0.85rem;
        padding-bottom: 90px;
        gap: 1.25rem;
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        height: auto;
        gap: 0.75rem;
        border-bottom: none;
        padding-bottom: 0.25rem;
    }
    
    .header-title h1 {
        font-size: 1.4rem;
    }
    
    .header-title .subtitle {
        font-size: 0.8rem;
        line-height: 1.4;
    }
    
    .file-status-indicator {
        width: 100%;
    }
    
    .file-status-indicator .status-badge {
        width: 100%;
        justify-content: center;
        font-size: 0.78rem;
        padding: 0.4rem 0.75rem;
    }
    
    /* Filter layouts */
    .filter-card {
        padding: 1rem;
        border-radius: var(--radius-md);
    }
    
    .filter-grid {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }
    
    .filter-grid-osl {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }
    
    .button-toggle-row {
        gap: 0.35rem;
    }
    
    .btn-toggle-option {
        flex: 1;
        padding: 0.45rem 0.6rem;
        font-size: 0.78rem;
        text-align: center;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }
    
    .metric-card {
        padding: 1rem 1.15rem;
        gap: 1rem;
        border-radius: var(--radius-md);
    }
    
    .metric-icon {
        width: 46px;
        height: 46px;
        font-size: 1.25rem;
    }
    
    .metric-value {
        font-size: 1.75rem;
    }
    
    .charts-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .chart-card {
        min-width: 100%;
        padding: 1rem;
        border-radius: var(--radius-md);
    }
    
    .chart-container {
        height: 250px;
    }
    
    /* Mobile Tables: Spacious, clean, horizontal touch scrolling */
    .table-card {
        padding: 1rem 0.85rem;
        border-radius: var(--radius-md);
    }
    
    .table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        margin-bottom: 0.85rem;
        padding-bottom: 0.85rem;
    }
    
    .table-header h3 {
        font-size: 1.05rem;
    }
    
    .table-actions {
        width: 100%;
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
    }
    
    .table-search {
        flex: 1;
        width: auto;
        padding: 0.45rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .table-wrapper {
        -webkit-overflow-scrolling: touch;
        border-radius: var(--radius-sm);
        margin: 0 -0.25rem;
        padding: 0 0.25rem;
    }
    
    .data-table {
        font-size: 0.8rem;
    }
    
    .data-table th, .data-table td {
        padding: 0.65rem 0.55rem;
        min-width: 95px;
    }
    
    .data-table th:first-child, .data-table td:first-child {
        min-width: 130px;
        box-shadow: 2px 0 6px rgba(0, 0, 0, 0.25);
    }
    
    #table-achievement th:first-child, 
    #table-achievement td:first-child {
        min-width: 110px;
        max-width: 140px;
    }
    
    #table-osl-overview th:first-child,
    #table-osl-overview td:first-child,
    #table-osl-produk th:first-child,
    #table-osl-produk td:first-child {
        width: 55px;
        min-width: 50px;
        max-width: 60px;
        padding-left: 0.35rem;
        padding-right: 0.35rem;
    }
    
    #table-osl-overview th:nth-child(2),
    #table-osl-overview td:nth-child(2),
    #table-osl-produk th:nth-child(2),
    #table-osl-produk td:nth-child(2) {
        min-width: 140px;
    }
    
    .table-pagination {
        flex-direction: column;
        align-items: center;
        gap: 0.65rem;
        margin-top: 1rem;
    }
    
    .pagination-info {
        font-size: 0.75rem;
        text-align: center;
    }
    
    .top-ranks-section {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }
    
    .rank-card {
        padding: 1rem;
        border-radius: var(--radius-md);
    }
}

/* --- THEME TOGGLE BUTTON STYLING --- */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: var(--transition-fast);
}

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

/* --- LIGHT MODE OVERRIDES --- */
body.light-mode {
    --bg-main: #f8fafc;            /* Slate 50 */
    --bg-card: #ffffff;
    --bg-card-hover: #ffffff;
    --border-color: rgba(15, 23, 42, 0.08);
    --border-color-hover: rgba(15, 23, 42, 0.16);
    
    --text-primary: #0f172a;       /* Slate 900 */
    --text-secondary: #475569;     /* Slate 600 */
    --text-muted: #64748b;         /* Slate 500 */
    
    --bg-sticky-col: #ffffff;
    
    background-image: 
        radial-gradient(at 0% 0%, rgba(6, 182, 212, 0.06) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.06) 0px, transparent 50%);
}

body.light-mode .sidebar {
    background: rgba(255, 255, 255, 0.95);
    border-right: 1px solid var(--border-color);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.03);
}

body.light-mode .menu-item:hover {
    background: rgba(15, 23, 42, 0.04);
}

body.light-mode .menu-item.active {
    background: var(--color-primary-soft);
    border-color: rgba(6, 182, 212, 0.3);
    color: #0891b2;
}

body.light-mode .menu-item.active i {
    color: #0891b2;
}

/* Light mode Card Styles - Crisp Pure White with subtle shadow */
body.light-mode .filter-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06);
}

body.light-mode .glass-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06);
}

body.light-mode .metric-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06);
}

body.light-mode .metric-card:hover {
    box-shadow: 0 10px 25px -4px rgba(15, 23, 42, 0.12);
    border-color: var(--border-color-hover);
}

body.light-mode .rank-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06);
}

body.light-mode .admin-upload-card {
    background: #ffffff;
    border: 1.5px dashed rgba(6, 182, 212, 0.4);
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.04);
}

body.light-mode .upload-drag-zone {
    background: #f8fafc;
    border: 2px dashed rgba(15, 23, 42, 0.12);
}

body.light-mode .upload-drag-zone:hover {
    border-color: var(--color-primary);
    background: rgba(6, 182, 212, 0.04);
}

body.light-mode .uploaded-file-display {
    background: #f8fafc;
    border: 1px solid var(--border-color);
}

/* Light mode Form Controls */
body.light-mode .dropdown-trigger {
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: #0f172a;
}

body.light-mode .dropdown-trigger:hover {
    background: #f8fafc;
    border-color: var(--border-color-hover);
}

body.light-mode .dropdown-menu {
    background: #ffffff;
    border: 1px solid var(--border-color-hover);
    box-shadow: 0 20px 40px -5px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(15, 23, 42, 0.08);
    z-index: 1000;
}

body.light-mode .dropdown-search {
    background: #f8fafc;
    border-bottom: 1px solid var(--border-color);
}

body.light-mode .dropdown-search-input {
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: #0f172a;
}

body.light-mode .dropdown-option {
    color: #475569;
}

body.light-mode .dropdown-option:hover {
    background: #f1f5f9;
    color: #0f172a;
}

body.light-mode .dropdown-option.selected {
    background: var(--color-primary-soft);
    color: #0891b2;
}

body.light-mode .dropdown-options-list::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.15);
}

body.light-mode .toggle-group {
    background: #f1f5f9;
    border: 1px solid var(--border-color);
}

body.light-mode .toggle-btn {
    color: #64748b;
}

body.light-mode .toggle-btn.active {
    background: var(--color-primary);
    color: #0b0f19;
    box-shadow: 0 2px 6px rgba(6, 182, 212, 0.3);
}

body.light-mode .btn-toggle-option {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    color: #64748b;
}

body.light-mode .btn-toggle-option:hover {
    background: #ffffff;
    color: #0f172a;
    border-color: var(--border-color-hover);
}

body.light-mode .btn-toggle-option.active {
    background: var(--color-primary-soft);
    border-color: var(--color-primary);
    color: #0891b2;
}

body.light-mode .filter-row-top {
    border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
}

/* Light mode Table styles */
body.light-mode .table-search {
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: #0f172a;
}

body.light-mode .data-table th {
    background: #f8fafc;
    color: #475569;
    border-bottom: 2px solid rgba(15, 23, 42, 0.1);
}

body.light-mode .data-table th.sortable:hover {
    background: #e2e8f0;
    color: #0891b2;
}

body.light-mode .data-table th.sort-asc,
body.light-mode .data-table th.sort-desc {
    background: #f0fdfa;
    color: #0891b2;
}

body.light-mode .data-table th.sort-asc .sort-icon,
body.light-mode .data-table th.sort-desc .sort-icon {
    color: #0891b2;
}

body.light-mode .data-table th:first-child, 
body.light-mode .data-table td:first-child {
    background: #ffffff;
    border-right-color: rgba(15, 23, 42, 0.1);
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.06);
}

body.light-mode .data-table td {
    border-bottom-color: rgba(15, 23, 42, 0.06);
    color: #475569;
}

body.light-mode .data-table tbody tr:hover td {
    background: #f8fafc;
    color: #0f172a;
}

body.light-mode .btn-page {
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: #475569;
}

body.light-mode .btn-page:hover:not(:disabled) {
    background: #f1f5f9;
    color: #0f172a;
}

body.light-mode .file-status-indicator .status-badge {
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: #475569;
}

body.light-mode .metric-value {
    background: linear-gradient(135deg, #0f172a 30%, #0891b2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.light-mode .rank-num {
    background: rgba(15, 23, 42, 0.05);
    color: #475569;
}

body.light-mode .password-input-wrapper input {
    background: #ffffff;
    color: #0f172a;
}

body.light-mode .modal-card {
    background: #ffffff;
    color: #0f172a;
}

body.light-mode .modal-footer {
    background: #f8fafc;
}

body.light-mode .toast {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.1);
}

body.light-mode .theme-toggle-btn {
    background: rgba(0, 0, 0, 0.03);
    color: #0f172a;
}

body.light-mode .theme-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.08);
}
