/* ===== COMMAND CENTER PREMIUM DESIGN SYSTEM ===== */
:root {
    --primary: #6366f1;
    --primary-light: #eef2ff;
    --primary-dark: #4f46e5;
    --accent-teal: #0d9488;
    --accent-violet: #7c3aed;
    --accent-green: #059669;
    --accent-orange: #ea580c;
    --bg-main: #f1f5f9;
    --bg-white: #ffffff;
    --sidebar-bg: #ffffff;
    --sidebar-width: 240px;
    --topbar-h: 64px;
    --text-main: #1e293b;
    --text-soft: #475569;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
    --shadow-md: 0 4px 16px rgba(0,0,0,.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    font-size: 15px;
}

/* ===== APP SHELL ===== */
.app-shell {
    display: flex;
    min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0; top: 0; bottom: 0;
    z-index: 100;
    transition: width .25s ease;
    box-shadow: 2px 0 12px rgba(0,0,0,.04);
}
.sidebar.collapsed { width: 64px; }
.sidebar.collapsed .brand-name,
.sidebar.collapsed .nav-link span,
.sidebar.collapsed .user-meta { display: none; }
.sidebar.collapsed .sidebar-footer { justify-content: center; flex-direction: column; gap: .5rem; }

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1.25rem 1.25rem;
    border-bottom: 1px solid var(--border);
}
.brand-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--accent-violet));
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1rem;
    flex-shrink: 0;
}
.brand-name {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: .95rem;
    color: var(--text-main);
    white-space: nowrap;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem .75rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.nav-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .7rem .9rem;
    border-radius: var(--radius-sm);
    color: var(--text-soft);
    text-decoration: none;
    font-weight: 500;
    font-size: .88rem;
    transition: all .18s ease;
    white-space: nowrap;
}
.nav-link:hover { background: var(--primary-light); color: var(--primary); }
.nav-link.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}
.nav-link i { width: 18px; text-align: center; font-size: .95rem; flex-shrink: 0; }

.nav-section-label {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-muted);
    padding: .9rem .9rem .35rem;
    margin-top: .5rem;
    border-top: 1px solid var(--border);
}
.sidebar.minimized .nav-section-label { display: none; }

.sidebar-footer {
    padding: .9rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: .5rem;
}
.user-info { display: flex; align-items: center; gap: .6rem; flex: 1; min-width: 0; }
.user-avatar {
    width: 32px; height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--accent-violet));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: .8rem;
    flex-shrink: 0;
}
.user-meta { min-width: 0; }
.user-name { font-weight: 600; font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: .72rem; color: var(--text-muted); }
.logout-btn {
    width: 32px; height: 32px;
    border: none; background: transparent;
    color: var(--text-muted); cursor: pointer;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    transition: all .18s;
    font-size: .95rem;
    flex-shrink: 0;
}
.logout-btn:hover { background: #fee2e2; color: #ef4444; }

/* ===== MAIN AREA ===== */
.main-area {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left .25s ease;
}

/* ===== TOPBAR ===== */
.topbar {
    height: var(--topbar-h);
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
}
.topbar-left { display: flex; align-items: center; gap: 1rem; }
.sidebar-toggle {
    background: none; border: none; cursor: pointer;
    color: var(--text-soft); font-size: 1.1rem;
    padding: .4rem; border-radius: var(--radius-sm);
    transition: all .18s;
}
.sidebar-toggle:hover { background: var(--bg-main); color: var(--primary); }
.breadcrumb { display: flex; align-items: center; gap: .5rem; font-size: .85rem; }
.breadcrumb span { color: var(--text-soft); }
.breadcrumb .bc-current { color: var(--text-main); font-weight: 600; }
.bc-sep { color: var(--text-muted); font-size: .7rem; }

.topbar-right { display: flex; align-items: center; gap: .75rem; }
.topbar-toast {
    font-size: .82rem; font-weight: 500;
    padding: .4rem .9rem;
    border-radius: var(--radius-sm);
}
.toast-success { background: #d1fae5; color: #065f46; }
.toast-error { background: #fee2e2; color: #991b1b; }

/* ===== PAGE CONTENT ===== */
.page-content {
    flex: 1;
    padding: 2rem 1.75rem;
}

/* ===== CARDS ===== */
.card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.card-body { padding: 1.5rem; }
.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}
.card-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700; font-size: 1rem; color: var(--text-main);
}

/* ===== STAT CARDS ===== */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}
.stat-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.4rem 1.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: .5rem;
    transition: box-shadow .2s;
}
.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-icon {
    width: 40px; height: 40px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
}
.stat-icon.indigo { background: #eef2ff; color: var(--primary); }
.stat-icon.teal { background: #f0fdfa; color: var(--accent-teal); }
.stat-icon.violet { background: #f5f3ff; color: var(--accent-violet); }
.stat-icon.green { background: #ecfdf5; color: var(--accent-green); }
.stat-label { font-size: .78rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat-value { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1.8rem; font-weight: 800; color: var(--text-main); }
.stat-trend { font-size: .78rem; font-weight: 600; }
.stat-trend.up { color: var(--accent-green); }

/* ===== UPLOAD GRID ===== */
.upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}
.upload-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow .2s;
}
.upload-card:hover { box-shadow: var(--shadow-md); }
.upload-card-header {
    padding: 1.25rem 1.5rem 1rem;
    border-bottom: 1px solid var(--border);
}
.upload-card-header h3 { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: .95rem; margin-bottom: .25rem; }
.upload-card-header p { font-size: .8rem; color: var(--text-muted); }
.upload-card-body { padding: 1.25rem 1.5rem 1.5rem; }

/* ===== FORMS ===== */
.form-input {
    width: 100%;
    padding: .65rem .9rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: .88rem;
    color: var(--text-main);
    background: #fff;
    transition: border-color .18s, box-shadow .18s;
    outline: none;
    margin-bottom: .6rem;
}
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,.1); }
.form-input:disabled { background: var(--bg-main); cursor: not-allowed; }

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: .5rem; padding: .65rem 1.25rem;
    border-radius: var(--radius-sm);
    font-family: inherit; font-size: .88rem; font-weight: 600;
    cursor: pointer; border: none; transition: all .18s;
    text-decoration: none;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(99,102,241,.3); }
.btn-violet { background: var(--accent-violet); color: white; }
.btn-violet:hover { background: #6d28d9; transform: translateY(-1px); }
.btn-sm { padding: .45rem .9rem; font-size: .8rem; }
.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--text-soft); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }
.btn-full { width: 100%; }
.file-label { cursor: pointer; }
.file-label input[type="file"] { display: none; }

/* ===== PAGE HEADER ===== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.75rem;
}
.page-header-left {}
.page-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.5rem; font-weight: 800; color: var(--text-main);
    margin-bottom: .2rem;
}
.page-subtitle { font-size: .85rem; color: var(--text-muted); }

/* ===== TABLE ===== */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.data-table th {
    padding: .8rem 1rem;
    text-align: left;
    font-size: .75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .05em;
    color: var(--text-muted);
    background: var(--bg-main);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.data-table td {
    padding: .85rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-soft);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--primary-light); }

/* ===== BADGES ===== */
.badge {
    display: inline-flex; align-items: center;
    padding: .2rem .65rem;
    border-radius: 2rem; font-size: .73rem; font-weight: 600;
}
.badge-success { background: #d1fae5; color: #065f46; }
.badge-error { background: #fee2e2; color: #991b1b; }

/* ===== FILTER HUB ===== */
.filter-hub {
    display: flex; gap: .75rem; align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}
.filter-hub .form-input { margin-bottom: 0; }

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}
.empty-state i { font-size: 2.5rem; margin-bottom: 1rem; opacity: .4; }
.empty-state p { font-size: .9rem; }

/* ===== AUTH PAGE ===== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f4ff 0%, #faf5ff 50%, #f0fdf4 100%);
    padding: 2rem;
}
.auth-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    width: 100%; max-width: 420px;
}
.auth-card h1 { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 1.75rem; margin-bottom: .4rem; }
.auth-card p { color: var(--text-muted); font-size: .88rem; margin-bottom: 2rem; }
.form-label { display: block; font-size: .78rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: .4rem; }
.form-group { margin-bottom: 1.25rem; }

/* ===== STATS OVERVIEW (REPORT PAGES) ===== */
.stats-row {
    display: flex; gap: 1.5rem; flex-wrap: wrap;
    margin-bottom: 1.25rem;
    font-size: .85rem; color: var(--text-soft);
}
.stats-row strong { color: var(--primary); }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .sidebar { width: 64px; }
    .sidebar .brand-name, .sidebar .nav-link span, .sidebar .user-meta { display: none; }
    .main-area { margin-left: 64px; }
    .sidebar-toggle { display: none; }
}
@media (max-width: 600px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); width: var(--sidebar-width); }
    .sidebar.open .brand-name, .sidebar.open .nav-link span, .sidebar.open .user-meta { display: block; }
    .main-area { margin-left: 0; }
    .page-content { padding: 1rem; }
    .upload-grid { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
}

/* ===== SIDEBAR COLORFUL ICONS ===== */
.sidebar-nav .nav-link svg,
.sidebar-nav .nav-link i {
    width: 18px;
    height: 18px;
    font-size: .95rem;
    flex-shrink: 0;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease, filter 0.2s ease;
}

/* Hover micro-animation */
.sidebar-nav .nav-link:hover i,
.sidebar-nav .nav-link:hover svg {
    transform: scale(1.18);
    filter: brightness(1.15) saturate(1.1);
}

/* Individual brand colors for FontAwesome and SVG icons in sidebar - Multi-color focusing on Warm/Orange Shades */
.sidebar-nav .nav-link .icon-dashboard { color: #ff6b35 !important; } /* Vibrant Tangerine Orange */
.sidebar-nav .nav-link .icon-office-reports { color: #ea580c !important; } /* Deep Sunset Orange */
.sidebar-nav .nav-link .icon-attendance { color: #f59e0b !important; } /* Golden Amber */
.sidebar-nav .nav-link .icon-employee-list { color: #fb923c !important; } /* Soft Coral Peach */
.sidebar-nav .nav-link .icon-user { color: #ff8a65 !important; } /* Warm Pastel Orange */
.sidebar-nav .nav-link .icon-manager { color: #c2410c !important; } /* Dark Burnt Sienna */
.sidebar-nav .nav-link .icon-manager-dashboard { color: #f97316 !important; } /* Bright Flame Orange */
.sidebar-nav .nav-link .icon-pending { color: #eab308 !important; } /* Honey Yellow-Orange */
.sidebar-nav .nav-link .icon-approved { color: #10b981 !important; } /* Warm Success Green */
.sidebar-nav .nav-link .icon-rejected { color: #ef4444 !important; } /* Warm Danger Red */
.sidebar-nav .nav-link .icon-carryforward { color: #be185d !important; } /* Sunset Purple-Rose */
.sidebar-nav .nav-link .icon-mypage { color: #ff9f1c !important; } /* Sweet Mandarin Orange */

