/* ============================================
   Work Log 360 - Custom Styles
   Dark Theme — #050f0d / #00D9A5 Design System
   Outfit font · Glassmorphic surfaces
   ============================================ */

/* ============================================
   CSS Variables — Single Source of Truth
   ============================================ */

:root {
    /* Brand */
    --primary:          #00D9A5;
    --primary-hover:    #00b889;
    --primary-dim:      rgba(0, 217, 165, 0.12);
    --primary-glow:     rgba(0, 217, 165, 0.25);
    --primary-border:   rgba(0, 217, 165, 0.2);
    --indigo:           #6366f1;
    --amber:            #f59e0b;
    --rose:             #f43f5e;
    --sky:              #38bdf8;

    /* Backgrounds */
    --bg:               #050f0d;
    --bg-secondary:     #071512;
    --bg-tertiary:      #0d1f1a;
    --surface:          rgba(255, 255, 255, 0.04);
    --surface-2:        rgba(255, 255, 255, 0.06);
    --surface-3:        rgba(255, 255, 255, 0.08);

    /* Text */
    --text:             #e2e8f0;
    --text-secondary:   #cbd5e1;
    --muted:            #94a3b8;
    --muted-2:          #64748b;
    --muted-3:          #475569;

    /* Borders */
    --border:           rgba(255, 255, 255, 0.07);
    --border-2:         rgba(255, 255, 255, 0.1);

    /* Shadows */
    --shadow-sm:        0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md:        0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-lg:        0 10px 30px rgba(0, 0, 0, 0.6);
    --shadow-xl:        0 24px 60px rgba(0, 0, 0, 0.7);

    /* Sidebar */
    --sidebar-width:    260px;
    --sidebar-bg:       #071512;
    --sidebar-border:   rgba(255, 255, 255, 0.06);

    /* Topbar */
    --topbar-bg:        rgba(5, 15, 13, 0.85);
    --topbar-border:    rgba(255, 255, 255, 0.06);
    --topbar-height:    68px;

    /* Cards */
    --card-bg:          rgba(255, 255, 255, 0.04);
    --card-border:      rgba(255, 255, 255, 0.07);

    /* Semantic aliases (backwards compat) */
    --primary-color:    #00D9A5;
    --primary-light:    rgba(0, 217, 165, 0.12);
    --primary-dark:     #00a87f;
    --secondary-color:  #6366f1;
    --success-color:    #00D9A5;
    --danger-color:     #f43f5e;
    --warning-color:    #f59e0b;
    --info-color:       #38bdf8;
    --bg-primary:       #050f0d;
    --bg-secondary:     #071512;
    --text-primary:     #e2e8f0;
    --text-secondary:   #94a3b8;
    --text-muted:       #64748b;
    --border-color:     rgba(255, 255, 255, 0.07);
    --card-bg:          rgba(255, 255, 255, 0.04);
    --card-border:      rgba(255, 255, 255, 0.07);
    --border-radius:    14px;
    --transition-speed: 0.3s;
    --icon-bg:          rgba(0, 217, 165, 0.1);
    --icon-color:       #00D9A5;
}

/* ============================================
   Bootstrap Color Utilities — New Theme
   ============================================ */

.bg-primary-custom          { background-color: var(--primary) !important; }
.bg-primary-hover           { background-color: var(--primary-hover) !important; }
.bg-light-custom            { background-color: var(--surface-2) !important; }
.bg-dark-custom             { background-color: var(--bg-tertiary) !important; }
.bg-dark-card               { background-color: var(--surface) !important; }
.text-primary-custom        { color: var(--primary) !important; }
.text-light-custom          { color: var(--text) !important; }
.text-dark-custom           { color: var(--muted) !important; }
.border-primary-custom      { border-color: var(--primary) !important; }
.border-light-custom        { border-color: var(--border) !important; }

.btn-primary-custom {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #000;
    font-weight: 700;
}
.btn-primary-custom:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #000;
}
.btn-outline-primary-custom {
    color: var(--primary);
    border-color: var(--primary);
    background: transparent;
}
.btn-outline-primary-custom:hover {
    background-color: var(--primary-dim);
    color: var(--primary);
}
.alert-primary-custom {
    background-color: var(--primary-dim);
    border-color: var(--primary-border);
    color: var(--primary);
}
.badge-primary-custom {
    background-color: var(--primary-dim);
    color: var(--primary);
    border: 1px solid var(--primary-border);
}
.card-primary-custom {
    background-color: var(--card-bg);
    border-color: var(--primary-border);
}
.link-primary-custom        { color: var(--primary); }
.link-primary-custom:hover  { color: var(--primary-hover); }

/* ============================================
   Font Awesome
   ============================================ */

.fa, .fas, .far, .fal, .fad, .fab,
[class^="fa-"], [class*=" fa-"] {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 6 Brands" !important;
    font-weight: 900;
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.fas, .fa-solid { font-family: "Font Awesome 6 Free" !important; font-weight: 900 !important; }
.far, .fa-regular { font-family: "Font Awesome 6 Free" !important; font-weight: 400 !important; }
.fab, .fa-brands { font-family: "Font Awesome 6 Brands" !important; font-weight: 400 !important; }

/* ============================================
   Global Reset & Base
   ============================================ */

*, *::before, *::after {
    margin: 0; padding: 0; box-sizing: border-box;
}
html { height: 100%; scroll-behavior: smooth; }

body {
    font-family: 'Outfit', 'Inter', 'Segoe UI', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

/* ============================================
   Layout
   ============================================ */

.main-wrapper, #wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

#page-content-wrapper {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-width: 0;
    transition: margin-left var(--transition-speed);
    background-color: var(--bg);
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed + #page-content-wrapper { margin-left: 80px; }

@media (max-width: 992px) {
    #page-content-wrapper { margin-left: 0 !important; width: 100%; }
}

/* ============================================
   Sidebar
   ============================================ */

.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    position: fixed;
    left: 0; top: 0;
    height: 100vh;
    overflow-y: auto; overflow-x: hidden;
    transition: all var(--transition-speed);
    z-index: 1000;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 2px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: var(--primary-dim); }

.sidebar-header {
    padding: 20px 20px 18px;
    border-bottom: 1px solid var(--sidebar-border);
    display: flex;
    align-items: center;
    justify-content: center;
}
.sidebar-header h4 {
    font-size: 1.05rem; font-weight: 800; margin: 0;
    color: var(--text); display: flex; align-items: center;
}
.sidebar-header i { font-size: 1.3rem; margin-right: 8px; color: var(--primary); }

.sidebar-nav { padding: 10px 0; }
.sidebar-nav .nav { padding: 0; }
.sidebar-nav .nav-item { list-style: none; }

.sidebar-nav .nav-link {
    color: var(--muted);
    padding: 10px 18px;
    display: flex; align-items: center;
    text-decoration: none;
    transition: all 0.2s;
    border-left: 2px solid transparent;
    font-size: 0.9rem; font-weight: 500;
    position: relative; background: transparent;
    gap: 10px;
}
.sidebar-nav .nav-link i { width: 18px; font-size: 0.95rem; flex-shrink: 0; color: var(--muted-2); }
.sidebar-nav .nav-link:hover {
    background: var(--surface);
    color: var(--text);
    border-left-color: var(--primary);
}
.sidebar-nav .nav-link:hover i { color: var(--primary); }
.sidebar-nav .nav-link.active {
    background: var(--primary-dim);
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 700;
}
.sidebar-nav .nav-link.active i { color: var(--primary); }
.sidebar-nav .nav-link .fa-chevron-down {
    margin-left: auto; width: auto; font-size: 0.65rem;
    transition: transform 0.3s; color: var(--muted-3);
}
.sidebar-nav .nav-link[aria-expanded="true"] .fa-chevron-down { transform: rotate(180deg); }

/* Submenu */
.sidebar-nav .collapse .nav-link {
    padding-left: 46px; font-size: 0.85rem; color: var(--muted-2);
}
.sidebar-nav .collapse .nav-link::before {
    content: ''; width: 5px; height: 5px;
    background: var(--muted-3); border-radius: 50%;
    position: absolute; left: 30px;
}
.sidebar-nav .collapse .nav-link.active::before { background: var(--primary); }

/* Collapsed sidebar */
.sidebar.collapsed { width: 80px; }
.sidebar.collapsed .sidebar-header h4 span,
.sidebar.collapsed .nav-link span,
.sidebar.collapsed .nav-link .fa-chevron-down { display: none; }
.sidebar.collapsed .nav-link { justify-content: center; padding: 12px 0; gap: 0; }
.sidebar.collapsed .nav-link i:first-child { margin-right: 0; }
.sidebar.collapsed .collapse { display: none !important; }

/* ============================================
   Topbar / Navbar
   ============================================ */

.navbar {
    background: var(--topbar-bg) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--topbar-border) !important;
    padding: 0 24px;
    height: var(--topbar-height);
    box-shadow: var(--shadow-sm);
    position: sticky; top: 0; z-index: 999;
    width: 100%;
    display: flex; align-items: center;
}

#sidebarToggle {
    background: none; border: none;
    color: var(--muted); font-size: 1.3rem;
    padding: 8px; cursor: pointer;
    transition: color 0.2s; line-height: 1;
    border-radius: 8px;
}
#sidebarToggle:hover { color: var(--primary); background: var(--primary-dim); }
#sidebarToggle:focus { outline: none; box-shadow: none; }

.navbar .nav-link {
    color: var(--muted); padding: 8px 10px;
    border-radius: 8px; transition: all 0.2s;
}
.navbar .nav-link:hover { background: var(--surface-2); color: var(--text); }

/* Notification / user dropdowns */
.notification-dropdown {
    width: 340px; max-height: 400px; overflow-y: auto;
    background: #0d1f1a !important;
    border: 1px solid var(--border-2) !important;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
}
.notification-item { padding: 4px 0; }
.dropdown-item.unread {
    background: var(--primary-dim);
    border-left: 2px solid var(--primary);
}
.navbar .dropdown-menu {
    background: #0d1f1a !important;
    border: 1px solid var(--border-2) !important;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
}
.navbar .dropdown-item {
    color: var(--muted); padding: 10px 14px; transition: all 0.2s;
}
.navbar .dropdown-item:hover { background: var(--surface-2); color: var(--primary); }

/* ============================================
   Content
   ============================================ */

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-width: 0;
    transition: margin-left var(--transition-speed);
    min-height: 100vh;
    display: flex; flex-direction: column;
    background-color: var(--bg);
}
.sidebar.collapsed + .main-content { margin-left: 80px; }

.content-wrapper {
    flex: 1; padding: 28px;
    max-width: 100%; overflow-x: hidden;
}
.content-wrapper > .container-fluid { max-width: 1600px; margin: 0 auto; }

/* ============================================
   Cards
   ============================================ */

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: all 0.25s;
    color: var(--text);
}
.card:hover { box-shadow: var(--shadow-md); border-color: var(--border-2); }
.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border);
    padding: 16px 20px;
    font-weight: 700; font-size: 0.95rem; color: var(--text);
}
.card-body { padding: 20px; }

/* Stats Cards */
.stat-card {
    border-radius: 16px; padding: 20px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    transition: all 0.25s;
    position: relative; overflow: hidden;
}
.stat-card::before {
    content: ''; position: absolute;
    top: 0; left: 0; right: 0; height: 2px;
    background: var(--primary);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-card .stat-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    background: var(--icon-bg);
    color: var(--icon-color);
    font-size: 1.25rem;
}
.stat-card h3 {
    font-size: 1.9rem; font-weight: 800; margin: 0; color: #fff;
}
.stat-card p { color: var(--muted); margin: 0; font-size: 0.85rem; }
.stat-card small { color: var(--muted-2); font-size: 0.78rem; }

/* Colored stat variants */
.stat-card.primary::before { background: var(--primary); }
.stat-card.warning::before { background: var(--amber); }
.stat-card.danger::before  { background: var(--rose); }
.stat-card.info::before    { background: var(--sky); }
.stat-card.warning .stat-icon { background: rgba(245,158,11,0.1); color: var(--amber); }
.stat-card.danger  .stat-icon { background: rgba(244,63,94,0.1);  color: var(--rose); }
.stat-card.info    .stat-icon { background: rgba(56,189,248,0.1); color: var(--sky); }

/* ============================================
   Buttons
   ============================================ */

.btn {
    border-radius: 10px; padding: 10px 18px;
    font-weight: 600; font-family: 'Outfit', sans-serif;
    transition: all 0.2s; border: none;
    display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary {
    background: var(--primary); color: #000; border: none;
}
.btn-primary:hover {
    background: var(--primary-hover); transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--primary-glow); color: #000;
}
.btn-success {
    background: var(--primary); color: #000; border: none;
}
.btn-success:hover { background: var(--primary-hover); color: #000; }
.btn-danger  { background: var(--rose);  color: #fff; }
.btn-danger:hover  { background: #e11d48; transform: translateY(-1px); color: #fff; }
.btn-warning { background: var(--amber); color: #000; }
.btn-warning:hover { background: #d97706; color: #000; }
.btn-info    { background: var(--sky);   color: #000; }
.btn-info:hover    { background: #0ea5e9; color: #000; }
.btn-secondary {
    background: var(--surface-2);
    border: 1px solid var(--border-2);
    color: var(--muted);
}
.btn-secondary:hover { background: var(--surface-3); color: var(--text); }
.btn-outline-primary {
    border: 1.5px solid var(--primary); color: var(--primary); background: transparent;
}
.btn-outline-primary:hover { background: var(--primary-dim); color: var(--primary); border-color: var(--primary); }
.btn-sm { padding: 6px 12px; font-size: 0.82rem; border-radius: 8px; }
.btn-lg { padding: 13px 26px; font-size: 1rem; }
.btn-icon {
    width: 38px; height: 38px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 8px;
}

/* ============================================
   Forms
   ============================================ */

.form-control, .form-select {
    background: var(--surface);
    border: 1px solid var(--border-2);
    color: var(--text);
    border-radius: 10px;
    padding: 10px 14px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    transition: all 0.2s;
}
.form-control::placeholder { color: var(--muted-3); }
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-dim);
    background: rgba(0, 217, 165, 0.04);
    color: var(--text);
    outline: none;
}
.form-select option { background: #0d1f1a; color: var(--text); }
.form-label { color: var(--muted); font-weight: 600; font-size: 0.83rem; margin-bottom: 6px; letter-spacing: 0.03em; }
.form-text  { color: var(--muted-2); font-size: 0.78rem; }
.form-check-input { accent-color: var(--primary); background: var(--surface); border-color: var(--border-2); }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.form-check-input:focus { box-shadow: 0 0 0 3px var(--primary-dim); }

/* Input groups */
.input-group-text {
    background: var(--surface-2);
    border: 1px solid var(--border-2);
    color: var(--muted);
    border-radius: 10px;
}

/* ============================================
   Tables
   ============================================ */

.table-responsive {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.table {
    color: var(--text); background: transparent; width: 100%; margin-bottom: 0;
}
.table thead th {
    border-bottom: 1px solid var(--border);
    color: var(--muted-2); font-weight: 700;
    text-transform: uppercase; font-size: 0.72rem;
    letter-spacing: 0.07em; white-space: nowrap;
    padding: 0 0 12px; background: transparent;
}
.table tbody tr { border-bottom: 1px solid rgba(255,255,255,0.04); transition: all 0.15s; }
.table tbody tr:last-child { border-bottom: none; }
.table tbody tr:hover { background: var(--surface); }
.table tbody td { padding: 12px 0; vertical-align: middle; font-size: 0.87rem; }
.table-striped tbody tr:nth-of-type(odd) { background: rgba(255,255,255,0.02); }

/* DataTables */
.dataTables_wrapper { color: var(--muted); }
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate { color: var(--muted); }
.dataTables_wrapper .dataTables_filter input { background: var(--surface); border-color: var(--border-2); color: var(--text); }
.dataTables_wrapper .dataTables_paginate .paginate_button { color: var(--muted) !important; border-color: var(--border) !important; background: transparent !important; border-radius: 8px; }
.dataTables_wrapper .dataTables_paginate .paginate_button:hover { background: var(--primary-dim) !important; color: var(--primary) !important; border-color: var(--primary-border) !important; }
.dataTables_wrapper .dataTables_paginate .paginate_button.current { background: var(--primary) !important; border-color: var(--primary) !important; color: #000 !important; }

/* ============================================
   Badges
   ============================================ */

.badge {
    display: inline-flex; align-items: center;
    padding: 4px 10px; border-radius: 50px;
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em;
}
.badge.bg-success, .badge-success  { background: rgba(0,217,165,0.12) !important; color: var(--primary) !important; }
.badge.bg-warning, .badge-warning  { background: rgba(245,158,11,0.12) !important; color: var(--amber) !important; }
.badge.bg-danger,  .badge-danger   { background: rgba(244,63,94,0.12) !important;  color: var(--rose) !important; }
.badge.bg-info,    .badge-info     { background: rgba(56,189,248,0.12) !important;  color: var(--sky) !important; }
.badge.bg-primary, .badge-primary  { background: var(--primary-dim) !important; color: var(--primary) !important; }
.badge.bg-secondary, .badge-secondary { background: var(--surface-2) !important; color: var(--muted) !important; }

/* ============================================
   Alerts
   ============================================ */

.alert {
    border-radius: var(--border-radius); border: 1px solid transparent;
    padding: 12px 16px; font-size: 0.87rem;
}
.alert-success {
    background: rgba(0, 217, 165, 0.08);
    border-color: rgba(0, 217, 165, 0.2);
    color: var(--primary);
}
.alert-danger {
    background: rgba(244, 63, 94, 0.08);
    border-color: rgba(244, 63, 94, 0.2);
    color: #fda4af;
}
.alert-warning {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.2);
    color: #fde68a;
}
.alert-info {
    background: rgba(56, 189, 248, 0.08);
    border-color: rgba(56, 189, 248, 0.2);
    color: #bae6fd;
}
.btn-close { filter: invert(1) brightness(0.7); }

/* ============================================
   Modals
   ============================================ */

.modal-content {
    background: #0d1f1a;
    border: 1px solid var(--border-2);
    border-radius: 18px;
    color: var(--text);
    box-shadow: var(--shadow-xl);
}
.modal-header {
    border-bottom: 1px solid var(--border);
    padding: 20px 24px;
}
.modal-footer {
    border-top: 1px solid var(--border);
    padding: 16px 24px;
}
.modal-title { color: #fff; font-weight: 800; }
.modal-backdrop { backdrop-filter: blur(4px); background-color: rgba(0,0,0,0.6) !important; }

/* ============================================
   Dropdowns
   ============================================ */

.dropdown-menu {
    background: #0d1f1a;
    border: 1px solid var(--border-2);
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    padding: 6px;
}
.dropdown-item { color: var(--muted); border-radius: 8px; padding: 9px 12px; font-size: 0.88rem; transition: all 0.15s; }
.dropdown-item:hover { background: var(--surface-2); color: var(--text); }
.dropdown-item:focus { background: var(--primary-dim); color: var(--primary); }
.dropdown-divider { border-color: var(--border); }
.dropdown-header { color: var(--muted-2); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.07em; font-weight: 700; padding: 6px 12px; }

/* ============================================
   Footer
   ============================================ */

.footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    padding: 18px 28px;
    margin-top: auto;
    font-size: 0.83rem;
    color: var(--muted-2);
}

/* ============================================
   Theme Toggle Button
   ============================================ */

.theme-toggle {
    position: fixed; bottom: 24px; right: 24px;
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--primary); color: #000; border: none;
    box-shadow: 0 4px 20px var(--primary-glow);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; transition: all 0.3s; z-index: 1000;
}
.theme-toggle:hover { transform: scale(1.1); box-shadow: 0 8px 28px var(--primary-glow); }

/* ============================================
   Dashboard-specific Grid
   ============================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px; margin-bottom: 20px;
}

/* ============================================
   Calendar
   ============================================ */

.calendar-widget {
    background: var(--card-bg); border: 1px solid var(--card-border);
    border-radius: var(--border-radius); padding: 20px;
}
.calendar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.calendar-header h4 { margin: 0; color: var(--primary); font-size: 1.05rem; font-weight: 700; }
.calendar-nav { display: flex; gap: 6px; }
.calendar-nav button {
    width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border-2);
    background: var(--surface); color: var(--muted); cursor: pointer; transition: all 0.2s;
    display: flex; align-items: center; justify-content: center;
}
.calendar-nav button:hover { background: var(--primary-dim); color: var(--primary); border-color: var(--primary-border); }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.calendar-day-header {
    text-align: center; font-weight: 700; color: var(--muted-2);
    padding: 6px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em;
}
.calendar-day {
    aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
    border-radius: 8px; cursor: pointer; transition: all 0.2s;
    color: var(--muted); font-weight: 500; font-size: 0.85rem;
    border: 1px solid transparent;
}
.calendar-day:hover { background: var(--surface-2); border-color: var(--primary-border); color: var(--text); }
.calendar-day.today { background: var(--primary); color: #000; font-weight: 800; border-color: var(--primary); }
.calendar-day.selected { background: var(--primary-dim); border-color: var(--primary-border); color: var(--primary); }
.calendar-day.other-month { color: var(--muted-3); opacity: 0.4; }
.calendar-day.has-event { position: relative; }
.calendar-day.has-event::after {
    content: ''; position: absolute; bottom: 3px;
    width: 4px; height: 4px; background: var(--amber); border-radius: 50%;
}

/* ============================================
   Charts
   ============================================ */

.chart-container {
    background: var(--card-bg); border: 1px solid var(--card-border);
    border-radius: var(--border-radius); padding: 20px; margin-bottom: 20px;
}
.chart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.chart-header h4 { margin: 0; color: var(--text); font-weight: 700; font-size: 0.95rem; }
.chart-filters { display: flex; gap: 6px; }
.chart-filter-btn {
    padding: 6px 14px; border: 1px solid var(--border-2);
    background: var(--surface); color: var(--muted);
    border-radius: 8px; cursor: pointer; transition: all 0.2s; font-size: 0.8rem;
    font-family: 'Outfit', sans-serif;
}
.chart-filter-btn:hover { background: var(--surface-2); color: var(--text); }
.chart-filter-btn.active { background: var(--primary-dim); color: var(--primary); border-color: var(--primary-border); }

/* ============================================
   Activity Feed
   ============================================ */

.activity-feed {
    background: var(--card-bg); border: 1px solid var(--card-border);
    border-radius: var(--border-radius); padding: 20px;
}
.activity-item {
    display: flex; gap: 14px; padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.activity-item:last-child { border-bottom: none; }
.activity-icon {
    width: 38px; height: 38px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.activity-icon.success { background: rgba(0,217,165,0.1);   color: var(--primary); }
.activity-icon.warning { background: rgba(245,158,11,0.1);  color: var(--amber); }
.activity-icon.danger  { background: rgba(244,63,94,0.1);   color: var(--rose); }
.activity-icon.info    { background: rgba(56,189,248,0.1);  color: var(--sky); }
.activity-content { flex: 1; }
.activity-content h6 { margin: 0 0 3px; color: var(--text); font-size: 0.88rem; font-weight: 600; }
.activity-content p  { margin: 0; color: var(--muted); font-size: 0.82rem; }
.activity-time { color: var(--muted-2); font-size: 0.74rem; margin-top: 3px; }

/* ============================================
   Staff Cards
   ============================================ */

.staff-card {
    background: var(--card-bg); border: 1px solid var(--card-border);
    border-radius: var(--border-radius); padding: 20px;
    text-align: center; transition: all 0.25s;
}
.staff-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--border-2); }
.staff-avatar {
    width: 72px; height: 72px; border-radius: 50%;
    margin: 0 auto 14px; object-fit: cover;
    border: 2px solid var(--primary-border);
}
.staff-avatar-placeholder {
    width: 72px; height: 72px; border-radius: 50%;
    margin: 0 auto 14px;
    background: linear-gradient(135deg, var(--primary), #007a5e);
    color: #000; display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; font-weight: 800;
}
.staff-name     { font-size: 1rem; font-weight: 700; margin: 0 0 4px; color: #fff; }
.staff-position { color: var(--muted); font-size: 0.85rem; margin-bottom: 12px; }
.staff-status   { display: inline-block; padding: 3px 10px; border-radius: 50px; font-size: 0.75rem; font-weight: 700; }
.staff-status.active   { background: rgba(0,217,165,0.1);  color: var(--primary); }
.staff-status.inactive { background: rgba(244,63,94,0.1);  color: var(--rose); }
.staff-status.on-leave { background: rgba(245,158,11,0.1); color: var(--amber); }

/* ============================================
   Attendance / Status Dots
   ============================================ */

.attendance-table-wrapper {
    background: var(--card-bg); border: 1px solid var(--card-border);
    border-radius: var(--border-radius); padding: 20px;
}
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.status-dot.present  { background: var(--primary); box-shadow: 0 0 0 2px rgba(0,217,165,0.2); }
.status-dot.absent   { background: var(--rose); }
.status-dot.late     { background: var(--amber); }
.status-dot.on-leave { background: var(--sky); }

/* ============================================
   Progress Bars
   ============================================ */

.progress {
    height: 6px; border-radius: 10px;
    background: var(--surface-2); overflow: hidden;
}
.progress-bar {
    border-radius: 10px; transition: width 0.6s ease;
    background: var(--primary);
}
.progress-bar.bg-warning { background: var(--amber); }
.progress-bar.bg-danger  { background: var(--rose); }
.progress-bar.bg-info    { background: var(--sky); }
.progress-label { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 0.8rem; color: var(--muted); }

/* ============================================
   File Upload
   ============================================ */

.file-upload-area {
    border: 2px dashed var(--border-2);
    border-radius: var(--border-radius); padding: 32px;
    text-align: center; cursor: pointer; transition: all 0.3s;
    background: var(--surface);
}
.file-upload-area:hover { border-color: var(--primary); background: var(--primary-dim); }
.file-upload-area.dragover { border-color: var(--primary); background: var(--primary-dim); }
.file-upload-icon { font-size: 2.5rem; color: var(--primary); margin-bottom: 12px; }
.file-upload-text { color: var(--muted); font-size: 0.87rem; }
.file-upload-text strong { color: var(--primary); }

/* ============================================
   Search / Filter Bar
   ============================================ */

.search-filter-bar {
    background: var(--card-bg); border: 1px solid var(--card-border);
    border-radius: var(--border-radius); padding: 16px 20px; margin-bottom: 18px;
}
.search-box { position: relative; }
.search-box input { padding-left: 40px; }
.search-box i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted-2); font-size: 0.85rem; }

/* ============================================
   Quick Actions
   ============================================ */

.quick-actions {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px; margin-bottom: 20px;
}
.quick-action-card {
    background: var(--card-bg); border: 1px solid var(--card-border);
    border-radius: var(--border-radius); padding: 20px;
    text-align: center; cursor: pointer; transition: all 0.25s;
}
.quick-action-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--primary-border); }
.quick-action-icon {
    width: 54px; height: 54px; border-radius: 12px;
    background: var(--primary-dim); color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; margin: 0 auto 12px;
}
.quick-action-title { color: var(--text); font-weight: 700; margin: 0; font-size: 0.88rem; }

/* ============================================
   Timeline
   ============================================ */

.timeline { position: relative; padding-left: 24px; }
.timeline::before {
    content: ''; position: absolute;
    left: 5px; top: 0; bottom: 0;
    width: 2px; background: var(--border);
}
.timeline-item { position: relative; padding-bottom: 22px; }
.timeline-item::before {
    content: ''; position: absolute;
    left: -23px; top: 2px;
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--primary); border: 2px solid var(--bg);
    box-shadow: 0 0 0 3px rgba(0,217,165,0.15);
}
.timeline-time { color: var(--muted-2); font-size: 0.78rem; margin-bottom: 6px; }
.timeline-content {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 10px; padding: 12px 14px;
}

/* ============================================
   Empty State
   ============================================ */

.empty-state { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty-state-icon { font-size: 3rem; color: var(--muted-3); margin-bottom: 12px; opacity: 0.5; }
.empty-state h5 { color: var(--text); margin-bottom: 6px; font-size: 1rem; }
.empty-state p  { color: var(--muted); margin-bottom: 18px; font-size: 0.87rem; }

/* ============================================
   Profile Header
   ============================================ */

.profile-header {
    background: linear-gradient(135deg, rgba(0,217,165,0.15) 0%, rgba(99,102,241,0.1) 100%);
    border: 1px solid var(--primary-border);
    border-radius: var(--border-radius); padding: 28px;
    color: var(--text); margin-bottom: 20px;
    position: relative; overflow: hidden;
}
.profile-header::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--indigo));
}
.profile-avatar-large {
    width: 110px; height: 110px; border-radius: 50%;
    border: 3px solid var(--primary-border); margin-bottom: 14px;
}
.profile-name  { font-size: 1.6rem; font-weight: 800; margin: 0 0 6px; color: #fff; }
.profile-title { font-size: 1rem; color: var(--muted); }

/* ============================================
   Info List
   ============================================ */

.info-list { list-style: none; padding: 0; margin: 0; }
.info-list-item {
    display: flex; justify-content: space-between;
    padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 0.87rem;
}
.info-list-item:last-child { border-bottom: none; }
.info-list-label { color: var(--muted); font-weight: 500; }
.info-list-value { color: var(--text); font-weight: 700; }

/* ============================================
   Breadcrumb
   ============================================ */

.breadcrumb { background: transparent; padding: 8px 0; margin-bottom: 12px; }
.breadcrumb-item { color: var(--muted-2); font-size: 0.83rem; }
.breadcrumb-item.active { color: var(--text); }
.breadcrumb-item + .breadcrumb-item::before { color: var(--muted-3); }
.breadcrumb-item a { color: var(--primary); text-decoration: none; }
.breadcrumb-item a:hover { opacity: 0.75; }

/* ============================================
   Tabs
   ============================================ */

.nav-tabs { border-bottom: 1px solid var(--border); }
.nav-tabs .nav-link {
    color: var(--muted); border: none;
    border-bottom: 2px solid transparent;
    padding: 10px 18px; transition: all 0.2s;
    font-weight: 600; font-size: 0.88rem;
}
.nav-tabs .nav-link:hover { color: var(--text); border-color: transparent; }
.nav-tabs .nav-link.active {
    color: var(--primary); background: transparent;
    border-bottom-color: var(--primary);
}
.tab-content { padding-top: 20px; }

/* ============================================
   Pagination
   ============================================ */

.pagination { margin: 0; gap: 4px; }
.page-link {
    color: var(--muted); background: var(--surface);
    border: 1px solid var(--border-2);
    margin: 0; border-radius: 8px !important;
    padding: 7px 12px; font-size: 0.85rem;
    transition: all 0.2s;
}
.page-link:hover { background: var(--primary-dim); color: var(--primary); border-color: var(--primary-border); }
.page-item.active .page-link { background: var(--primary); border-color: var(--primary); color: #000; font-weight: 700; }
.page-item.disabled .page-link { opacity: 0.4; }

/* ============================================
   Utility Classes
   ============================================ */

.text-primary   { color: var(--primary) !important; }
.text-success   { color: var(--primary) !important; }
.text-danger    { color: var(--rose) !important; }
.text-warning   { color: var(--amber) !important; }
.text-info      { color: var(--sky) !important; }
.text-muted     { color: var(--muted) !important; }
.text-white     { color: #fff !important; }
.bg-primary-light { background: var(--primary-dim) !important; }
.rounded-lg     { border-radius: var(--border-radius); }
.shadow-sm      { box-shadow: var(--shadow-sm); }
.shadow-md      { box-shadow: var(--shadow-md); }
.shadow-lg      { box-shadow: var(--shadow-lg); }
.shadow-xl      { box-shadow: var(--shadow-xl); }
.border-left-primary { border-left: 3px solid var(--primary) !important; }
.border-left-success { border-left: 3px solid var(--primary) !important; }
.border-left-warning { border-left: 3px solid var(--amber) !important; }
.border-left-danger  { border-left: 3px solid var(--rose) !important; }
.border-left-info    { border-left: 3px solid var(--sky) !important; }

.page-container  { width: 100%; max-width: 100%; padding: 0; margin: 0; }
.no-scroll-x     { overflow-x: hidden; }
.card-table      { background: var(--card-bg); border-radius: var(--border-radius); overflow: hidden; }
.card-table .table { margin-bottom: 0; }

/* ============================================
   Loading Spinner
   ============================================ */

.spinner-wrapper { display: flex; justify-content: center; align-items: center; min-height: 200px; }
.spinner-border  { color: var(--primary) !important; }

/* ============================================
   Custom Scrollbar
   ============================================ */

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-tertiary); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,217,165,0.3); }

/* ============================================
   Animations
   ============================================ */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.45s cubic-bezier(.22,1,.36,1); }

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to   { opacity: 1; transform: translateX(0); }
}
.slide-in-left { animation: slideInLeft 0.45s cubic-bezier(.22,1,.36,1); }

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 992px) {
    .sidebar { transform: translateX(-100%); z-index: 1050; }
    .sidebar.show { transform: translateX(0); }
    .main-content { margin-left: 0 !important; }
    .theme-toggle { bottom: 16px; right: 16px; }
    .sidebar-overlay {
        position: fixed; top: 0; left: 0; width: 100%; height: 100%;
        background: rgba(0,0,0,0.6); display: none; z-index: 1049;
        backdrop-filter: blur(4px);
    }
    .sidebar-overlay.show { display: block; }
}
@media (max-width: 768px) {
    .content-wrapper { padding: 16px; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .quick-actions { grid-template-columns: 1fr 1fr; }
    .notification-dropdown { width: 280px; }
    .chart-filters { flex-wrap: wrap; }
    .profile-header { text-align: center; }
}
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .quick-actions { grid-template-columns: 1fr; }
    .content-wrapper { padding: 12px; }
}

/* ============================================
   Print
   ============================================ */

@media print {
    .sidebar, .navbar, .footer, .theme-toggle, .action-menu { display: none !important; }
    body { background: #fff !important; color: #000 !important; }
    .main-content, #page-content-wrapper { margin-left: 0 !important; width: 100%; }
    .card { box-shadow: none; border: 1px solid #ddd; background: #fff !important; color: #000 !important; }
}