/* ═══════════════════════════════════════════════════════════════════
   SWFT — Minimal Premium Design System
   ═══════════════════════════════════════════════════════════════════ */

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

/* ─── Tokens ───────────────────────────────────────────────────── */
:root {
    --blue-900: #2b6e95;
    --blue-800: #3a7ca5;
    --blue-700: #4a8db3;
    --blue-600: #3a9fd4;
    --blue-500: #4aacde;
    --blue-400: #6dbde0;
    --blue-300: #8dcde8;
    --blue-200: #b5dfef;
    --blue-100: #e0f2f9;
    --blue-50:  #f0f8fc;

    --gray-900: #1a1a2e;
    --gray-800: #2d2d3f;
    --gray-700: #404052;
    --gray-600: #555568;
    --gray-500: #71717f;
    --gray-400: #9e9eac;
    --gray-300: #c4c4ce;
    --gray-200: #e2e2e8;
    --gray-100: #f2f2f5;
    --gray-50:  #f8f8fa;

    --text: #404052;
    --text-light: #9e9eac;
    --text-heading: #1a1a2e;
    --bg: #f8f8fa;
    --white: #ffffff;
    --border: #e8e8ed;
    --radius: 10px;
    --radius-lg: 14px;

    --primary: var(--blue-600);
    --accent: var(--blue-800);
}

/* ─── Dark Theme ───────────────────────────────────────────────── */
[data-theme="dark"] {
    --text: #b8b8c8;
    --text-light: #6a6a7e;
    --text-heading: #e0e0ea;
    --bg: #101018;
    --white: #1a1a28;
    --border: #2a2a3a;

    --blue-900: #2b6e95;
    --blue-800: #3a7ca5;
    --blue-600: #4aacde;
    --blue-500: #6dbde0;
    --blue-400: #8dcde8;
    --blue-100: #152030;
    --blue-50:  #111a25;
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select { background: #1a1a28; color: var(--text); border-color: var(--border); }
[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus { background: #1e1e2e; border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(74,172,222,0.1) !important; }
[data-theme="dark"] .form-control::placeholder { color: #4a4a5e; }
[data-theme="dark"] .form-control-lg,
[data-theme="dark"] .form-select-lg { background: #1a1a28; color: var(--text); border-color: var(--border); }
[data-theme="dark"] .form-label { color: #8a8a9e; }
[data-theme="dark"] .input-group-text { background: #1a1a28; color: #6a6a7e; border-color: var(--border); }

[data-theme="dark"] .type-badge.Taxi { background: #2a2510; color: #deba50; }
[data-theme="dark"] .type-badge.Bus { background: #102030; color: var(--blue-500); }
[data-theme="dark"] .type-badge.Intercity { background: #102518; color: #5ac88a; }

[data-theme="dark"] .task-group { background: var(--white); border-color: var(--border); }
[data-theme="dark"] .task-group-header { background: #141420; border-bottom-color: var(--border); }
[data-theme="dark"] .task-row.completed { border-left-color: #3aae6a; }
[data-theme="dark"] .task-row.overdue { border-left-color: #d45050; background-color: rgba(212,80,80,0.05); }
[data-theme="dark"] .task-row.cursor-pointer:hover { background: #1e1e2e; }

[data-theme="dark"] .overdue-banner { background: rgba(212,80,80,0.08); color: #e06060; border-color: rgba(212,80,80,0.15); }
[data-theme="dark"] .readonly-banner { background: #1e1a10; color: #d4b060; border-color: #302810; }

[data-theme="dark"] .audit-action.created { background: #102518; color: #5ac88a; }
[data-theme="dark"] .audit-action.edited  { background: #102030; color: var(--blue-500); }
[data-theme="dark"] .audit-action.deleted { background: #281015; color: #e06060; }

[data-theme="dark"] .handover-card:hover { background: #1e1e2e; }
[data-theme="dark"] .handover-card.priority-high { border-left-color: #e0903a; background: #1e1a10; }
[data-theme="dark"] .handover-card.priority-critical { border-left-color: #d45050; background: #281015; }
[data-theme="dark"] .handover-card.acknowledged { border-left-color: #3aae6a; background: #102518; }

[data-theme="dark"] .priority-badge.priority-normal { background: #102030; color: var(--blue-500); }
[data-theme="dark"] .priority-badge.priority-high { background: #1e1a10; color: #e0a050; }
[data-theme="dark"] .priority-badge.priority-critical { background: #281015; color: #e06060; }

[data-theme="dark"] .table-success-subtle { background-color: rgba(58,174,106,0.05) !important; }
[data-theme="dark"] .table-danger-subtle { background-color: rgba(212,80,80,0.05) !important; }

[data-theme="dark"] .swft-footer { background: #0e0e18; color: rgba(184,184,200,0.3); }
[data-theme="dark"] .card, [data-theme="dark"] .card-header, [data-theme="dark"] .card-body { color: var(--text); }

[data-theme="dark"] .btn-primary { background: var(--blue-600); border-color: var(--blue-600); }
[data-theme="dark"] .btn-primary:hover { background: var(--blue-500); border-color: var(--blue-500); }
[data-theme="dark"] .btn-outline-secondary { color: var(--blue-500); border-color: var(--border); }
[data-theme="dark"] .btn-outline-secondary:hover { background: var(--blue-500); border-color: var(--blue-500); color: #101018; }
[data-theme="dark"] .btn-outline-primary { color: var(--blue-500); border-color: var(--blue-500); }
[data-theme="dark"] .btn-outline-primary:hover { background: var(--blue-500); border-color: var(--blue-500); color: #101018; }
[data-theme="dark"] .btn-outline-danger { color: #e06060; border-color: #e06060; }
[data-theme="dark"] .btn-outline-danger:hover { background: #e06060; color: #fff; }
[data-theme="dark"] .btn-outline-success { color: #5ac88a; border-color: #5ac88a; }
[data-theme="dark"] .btn-outline-success:hover { background: #5ac88a; color: #101018; }
[data-theme="dark"] .btn-check:checked + .btn-outline-success { background: #2a8a5a; border-color: #2a8a5a; color: #fff; }
[data-theme="dark"] .btn-check:checked + .btn-outline-danger { background: #b83030; border-color: #b83030; color: #fff; }
[data-theme="dark"] .btn-outline-warning { color: #e0a050; border-color: #e0a050; }
[data-theme="dark"] .btn-outline-warning:hover { background: #e0a050; color: #101018; }
[data-theme="dark"] .btn-success { background: #2a8a5a; border-color: #2a8a5a; }
[data-theme="dark"] .btn-danger { background: #b83030; border-color: #b83030; }
[data-theme="dark"] .btn-warning { background: #b88a20; border-color: #b88a20; }

[data-theme="dark"] .badge.bg-secondary { background: #2a2a3a !important; color: #b8b8c8 !important; }
[data-theme="dark"] .badge.bg-success { background: #102518 !important; color: #5ac88a !important; }
[data-theme="dark"] .badge.bg-danger { background: #281015 !important; color: #e06060 !important; }
[data-theme="dark"] .badge.bg-warning { background: #1e1a10 !important; color: #e0a050 !important; }
[data-theme="dark"] .badge.bg-info { background: #102030 !important; color: var(--blue-500) !important; }

[data-theme="dark"] .text-success { color: #5ac88a !important; }
[data-theme="dark"] .text-danger { color: #e06060 !important; }
[data-theme="dark"] .text-warning { color: #e0a050 !important; }
[data-theme="dark"] .text-info { color: var(--blue-500) !important; }
[data-theme="dark"] .text-body { color: var(--text) !important; }
[data-theme="dark"] .text-black { color: var(--text) !important; }
[data-theme="dark"] .text-muted { color: #6a6a7e !important; }
[data-theme="dark"] .text-dark { color: var(--text) !important; }
[data-theme="dark"] .bg-light { background: #1a1a28 !important; }
[data-theme="dark"] .bg-white { background: #1a1a28 !important; }
[data-theme="dark"] .border { border-color: var(--border) !important; }
[data-theme="dark"] .spinner-border.text-primary { color: var(--blue-500) !important; }

[data-theme="dark"] .dropdown-menu { background: #1a1a28; border-color: var(--border); }
[data-theme="dark"] .dropdown-item { color: var(--text); }
[data-theme="dark"] .dropdown-item:hover { background: #2a2a3a; color: #e0e0ea; }
[data-theme="dark"] .dropdown-item:active { background: var(--blue-600); color: #fff; }

[data-theme="dark"] .modal-content { background: #1a1a28; border-color: var(--border); }
[data-theme="dark"] .modal-header { border-bottom-color: var(--border); }
[data-theme="dark"] .modal-footer { border-top-color: var(--border); }
[data-theme="dark"] .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }

[data-theme="dark"] .employee-btn { background: #1a1a28; border-color: var(--border); }
[data-theme="dark"] .employee-btn:hover { background: #1e1e2e; border-color: var(--blue-500); }
[data-theme="dark"] .module-card { background: #1a1a28; border-color: var(--border); }
[data-theme="dark"] .module-card:hover { border-color: var(--blue-500); }

[data-theme="dark"] .table { color: var(--text); --bs-table-color: var(--text); --bs-table-bg: transparent; --bs-table-border-color: var(--border); }
[data-theme="dark"] .table > :not(caption) > * > * { background-color: var(--white); border-bottom-color: var(--border); color: var(--text); }
[data-theme="dark"] .table > thead > tr > * { background-color: #141420; }
[data-theme="dark"] .table-hover > tbody > tr:hover > * { background-color: #1e1e2e; --bs-table-hover-bg: #1e1e2e; --bs-table-hover-color: var(--text); }
[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > * { background-color: rgba(255,255,255,0.02); }
[data-theme="dark"] .table-sm { --bs-table-color: var(--text); }
[data-theme="dark"] .task-id-badge { background: var(--blue-600); color: #fff; }

[data-theme="dark"] .page-link { background: #1a1a28; border-color: var(--border); color: var(--blue-500); }
[data-theme="dark"] .page-link:hover { background: #2a2a3a; }
[data-theme="dark"] .page-item.active .page-link { background: var(--blue-600); border-color: var(--blue-600); color: #fff; }
[data-theme="dark"] .page-item.disabled .page-link { background: #101018; border-color: var(--border); color: #4a4a5e; }

[data-theme="dark"] .alert-success { background: #102518; border-color: #183828; color: #5ac88a; }
[data-theme="dark"] .alert-danger { background: #281015; border-color: #381820; color: #e06060; }
[data-theme="dark"] .alert-warning { background: #1e1a10; border-color: #302818; color: #e0a050; }
[data-theme="dark"] .alert-info { background: #102030; border-color: #182838; color: var(--blue-500); }

[data-theme="dark"] .card.bg-primary, [data-theme="dark"] .bg-primary { background: var(--blue-600) !important; }
[data-theme="dark"] .stat-card .card-body h3 { color: #fff; }

[data-theme="dark"] .topnav { background: #141420; border-bottom-color: var(--border); }
[data-theme="dark"] .topnav-link { color: #8a8a9e; }
[data-theme="dark"] .topnav-link:hover { color: var(--blue-400); }
[data-theme="dark"] .topnav-link.active { color: var(--blue-400); }
[data-theme="dark"] .topnav-link.active::after { background: var(--blue-400); }

.theme-toggle { cursor: pointer; opacity: 0.7; transition: opacity 0.2s; }
.theme-toggle:hover { opacity: 1; }

/* ─── Typography ───────────────────────────────────────────────── */
body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    background: var(--bg);
    font-size: 0.875rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, .display-5 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-heading);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.25;
}

/* ─── Top Navigation ───────────────────────────────────────────── */
.topnav {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1040;
}

.topnav-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--text-heading);
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: -0.02em;
}

.topnav-brand img { height: 28px; }

.topnav-center {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.topnav-link {
    padding: 0.45rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-500);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    position: relative;
    letter-spacing: -0.01em;
}

.topnav-link:hover { color: var(--blue-700); background: var(--blue-50); }

.topnav-link.active {
    color: var(--blue-700);
    background: var(--blue-50);
}

.topnav-link.active::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--blue-600);
    border-radius: 2px;
}

.topnav-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.topnav-icon {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--gray-500);
    text-decoration: none;
    transition: all 0.15s;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    background: none;
}

.topnav-icon:hover { background: var(--gray-100); color: var(--blue-700); }

.topnav-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.6rem 0.3rem 0.3rem;
    border-radius: 50px;
    background: var(--gray-50);
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 600;
    transition: border-color 0.2s;
}

.topnav-user:hover { border-color: var(--blue-400); color: var(--text); }

.topnav-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue-600), var(--blue-400));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
}

/* Admin badge in topnav */
.topnav-admin-badge {
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--blue-600);
    background: var(--blue-100);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Hide old navbar */
.navbar { display: none !important; }
.nav-employee-badge { display: none !important; }

/* ─── Page Container ───────────────────────────────────────────── */
.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

@media (max-width: 576px) {
    .page-container { padding: 1.25rem 1rem; }
    .topnav { padding: 0 1rem; }
    .topnav-center { display: none; }
}

/* ─── Buttons ──────────────────────────────────────────────────── */
.btn {
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.82rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    letter-spacing: -0.01em;
    transition: all 0.15s ease;
    box-shadow: none !important;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
    background: var(--blue-600);
    border-color: var(--blue-600);
    color: #fff;
}
.btn-primary:hover { background: var(--blue-700); border-color: var(--blue-700); }

.btn-outline-secondary {
    color: var(--text);
    border-color: var(--border);
}
.btn-outline-secondary:hover { background: var(--blue-600); border-color: var(--blue-600); color: #fff; }

/* ─── Forms ────────────────────────────────────────────────────── */
.form-control, .form-select {
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.84rem;
    color: var(--text);
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: border-color 0.15s;
    background: var(--white);
}

.form-control:focus, .form-select:focus {
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px rgba(74,172,222,0.1) !important;
}

.form-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-light);
    margin-bottom: 0.3rem;
}

/* ─── Cards ────────────────────────────────────────────────────── */
.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: none !important;
}

.card .card-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.8rem 1.2rem;
    color: var(--text-heading);
}

#asset-card { border-radius: var(--radius); }
#asset-card .card-header { border-radius: 0; }

/* ─── KPI Cards ────────────────────────────────────────────────── */
.kpi-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    transition: border-color 0.2s;
}

.kpi-card:hover { border-color: var(--blue-300); }

.kpi-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-light);
    margin-bottom: 0.3rem;
}

.kpi-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-heading);
    letter-spacing: -0.03em;
    line-height: 1.1;
}

[data-theme="dark"] .kpi-value { color: var(--text-heading); }

.kpi-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    background: var(--blue-50);
    color: var(--blue-600);
}

[data-theme="dark"] .kpi-icon { background: var(--blue-100); color: var(--blue-400); }

/* ─── Progress ─────────────────────────────────────────────────── */
#progress-header {
    z-index: 1020;
    border-radius: 0;
    border-bottom: 1px solid var(--border) !important;
}

.progress {
    background: var(--gray-200);
    border-radius: 50px;
    overflow: hidden;
}

.progress-bar {
    background: var(--blue-600) !important;
    transition: width 0.4s ease;
    border-radius: 50px;
}
.progress-bar.bg-success { background: var(--blue-600) !important; }

/* ─── Employee Buttons ─────────────────────────────────────────── */
.employee-btn {
    min-height: 120px;
    border-radius: var(--radius);
    transition: all 0.2s ease;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--text-heading);
    position: relative;
    overflow: hidden;
}

.employee-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--blue-500);
    opacity: 0;
    transition: opacity 0.2s;
}

.employee-btn:hover {
    transform: translateY(-2px);
    border-color: var(--blue-400);
    color: var(--text-heading);
    box-shadow: 0 4px 12px rgba(74,172,222,0.08);
}

.employee-btn:hover::before { opacity: 1; }
.employee-btn:active { transform: translateY(0); }
.employee-btn .display-3 { font-weight: 800; color: var(--blue-700); }
.employee-btn .fs-3 { color: var(--text-heading) !important; font-weight: 700; }

.touch-btn { min-height: 48px; font-size: 1rem; }

.btn-check:checked + .btn-outline-success { background: #198754; color: #fff; }
.btn-check:checked + .btn-outline-danger { background: #dc3545; color: #fff; }

/* ─── Type Badges ──────────────────────────────────────────────── */
.type-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 700;
}

.type-badge.Taxi { background: #fef3c7; color: #92400e; }
.type-badge.Bus { background: var(--blue-100); color: var(--blue-800); }
.type-badge.Intercity { background: #dcfce7; color: #166534; }

.stat-card .card-body h3 { color: #fff; }

/* ─── Module Cards ─────────────────────────────────────────────── */
.module-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--white);
    transition: all 0.25s ease;
    cursor: pointer;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.module-card::before, .module-card::after { display: none; }

.module-card:hover {
    transform: translateY(-3px);
    border-color: var(--blue-400);
    box-shadow: 0 8px 24px rgba(74,172,222,0.08);
}

.module-card i { color: var(--blue-600); transition: transform 0.25s; }
.module-card:hover i { transform: scale(1.08); }

.module-card h2 {
    color: var(--text-heading);
    font-size: 1.2rem;
    font-weight: 800;
}

/* ─── Report Cards ─────────────────────────────────────────────── */
.report-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.2s;
}

.report-card:hover { border-color: var(--blue-400); }
.report-card .card-title { color: var(--text-heading); font-size: 0.95rem; font-weight: 700; }

/* ─── Filter Bar ───────────────────────────────────────────────── */
.filter-bar {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
}

/* ─── Task Groups ──────────────────────────────────────────────── */
.task-group {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
}

.task-group-header {
    padding: 10px 16px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-heading);
}

.task-group-body { padding: 4px 0; }

/* ─── Task Rows ────────────────────────────────────────────────── */
.task-row {
    border-left: 3px solid transparent;
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
    background: var(--white);
    transition: all 0.15s;
}

.task-row:last-child { border-bottom: none; }
.task-row.completed { border-left-color: #22c55e; }
.task-row.overdue { border-left-color: #ef4444; background: rgba(239,68,68,0.02); }

.overdue-banner {
    background: rgba(239,68,68,0.05);
    color: #ef4444;
    border: 1px solid rgba(239,68,68,0.12);
    border-radius: 8px;
    padding: 10px 16px;
    font-weight: 600;
    text-align: center;
}

.task-id-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 50px;
    font-size: 0.65rem;
    font-weight: 700;
    background: var(--blue-600);
    color: #fff;
    font-family: 'Plus Jakarta Sans', monospace;
    letter-spacing: 0.02em;
}

.section-header {
    padding: 8px 16px;
    margin: 20px 0 8px;
    background: var(--gray-50);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    border: 1px solid var(--border);
    color: var(--text-heading);
}

.readonly-banner {
    background: #fefce8;
    color: #854d0e;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 16px;
    font-weight: 600;
    text-align: center;
    font-size: 0.84rem;
}

.task-row.cursor-pointer { cursor: pointer; }
.task-row.cursor-pointer:hover { background: var(--gray-50); }
.entry-author { font-size: 0.72rem; color: var(--text-light); }

/* ─── Audit ────────────────────────────────────────────────────── */
.audit-log-list { max-height: 200px; overflow-y: auto; }
.audit-log-item {
    padding: 6px 10px;
    border-left: 2px solid var(--border);
    margin-bottom: 6px;
    background: var(--gray-50);
    border-radius: 0 6px 6px 0;
    font-size: 0.78rem;
}

.audit-action {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 50px;
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.audit-action.created { background: #dcfce7; color: #166534; }
.audit-action.edited  { background: var(--blue-100); color: var(--blue-800); }
.audit-action.deleted { background: #fee2e2; color: #991b1b; }

.save-indicator i { animation: fadeInScale 0.3s ease; }
@keyframes fadeInScale { 0% { transform: scale(0); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

.table-success-subtle { background-color: rgba(34,197,94,0.03) !important; }
.table-danger-subtle { background-color: rgba(239,68,68,0.03) !important; }

/* ─── Badges ───────────────────────────────────────────────────── */
.badge { font-weight: 600; border-radius: 50px; }
.badge.bg-secondary { background: var(--gray-400) !important; font-weight: 500; }
.badge.bg-primary { background: var(--blue-600) !important; }

/* ─── Tables ───────────────────────────────────────────────────── */
.table { font-size: 0.82rem; color: var(--text); }
.table thead th {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-light);
    font-weight: 700;
    border-bottom: 1px solid var(--border);
    padding: 0.6rem 0.8rem;
}
.table tbody td { padding: 0.6rem 0.8rem; border-color: var(--border); vertical-align: middle; }

/* ─── Modals ───────────────────────────────────────────────────── */
.modal-content { border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: 0 20px 60px rgba(0,0,0,0.1) !important; }
.modal-header { border-bottom: 1px solid var(--border); padding: 1rem 1.25rem; }
.modal-header .modal-title { color: var(--text-heading); font-weight: 700; font-size: 0.95rem; }
.modal-footer { border-top: 1px solid var(--border); padding: 0.8rem 1.25rem; }

/* ─── Sticky Headers ───────────────────────────────────────────── */
#daily-header, #weekly-header {
    border-bottom: 1px solid var(--border) !important;
    background: var(--white) !important;
}

/* ─── Footer ───────────────────────────────────────────────────── */
.swft-footer {
    background: var(--white);
    border-top: 1px solid var(--border);
    color: var(--text-light);
    font-size: 0.7rem;
    padding: 0.65rem 0;
    text-align: center;
    letter-spacing: 0.03em;
    font-weight: 500;
}
.swft-footer a { color: var(--blue-600); text-decoration: none; }
.swft-footer a:hover { color: var(--blue-800); }

/* ─── Animations ───────────────────────────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.page-container > * { animation: fadeUp 0.3s ease both; }

@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    80% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}
#completion-screen .bi-check-circle-fill { animation: popIn 0.5s ease; }

/* ─── Handover Cards ───────────────────────────────────────────── */
.handover-card {
    border: 1px solid var(--border);
    border-left: 3px solid var(--blue-500);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 10px;
    background: var(--white);
    transition: all 0.15s;
}
.handover-card:hover { background: var(--gray-50); }
.handover-card.priority-high { border-left-color: #f97316; }
.handover-card.priority-critical { border-left-color: #ef4444; }
.handover-card.acknowledged { border-left-color: #22c55e; }
.handover-card.archived { border-left-color: var(--text-light); opacity: 0.6; }

.priority-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 50px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.priority-badge.priority-normal { background: var(--blue-100); color: var(--blue-800); }
.priority-badge.priority-high { background: #ffedd5; color: #9a3412; }
.priority-badge.priority-critical { background: #fee2e2; color: #991b1b; }

.ack-count { font-size: 0.72rem; color: var(--text-light); }
.unread-dot {
    display: inline-block;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--blue-600);
    margin-right: 6px;
}

/* ─── SWFTTracker ─────────────────────────────────────────────── */
.tracker-card {
    display: block;
    background: var(--white);
    border: 1px solid var(--border);
    border-left: 3px solid var(--gray-300);
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
    margin-bottom: 0.75rem;
    transition: background 0.15s;
}
.tracker-card:hover { background: var(--gray-50); }
[data-theme="dark"] .tracker-card:hover { background: #1e1e2e; }

.health-dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}

.category-badge {
    display: inline-block;
    padding: 0.15em 0.5em;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 600;
}
.category-badge.cat-projects     { background: #dbeafe; color: #1d4ed8; }
.category-badge.cat-initiatives  { background: #dcfce7; color: #15803d; }
.category-badge.cat-poc          { background: #fef3c7; color: #92400e; }
.category-badge.cat-support      { background: #fce7f3; color: #9d174d; }
.category-badge.cat-ad-hoc       { background: #f3f4f6; color: #374151; }

[data-theme="dark"] .category-badge.cat-projects    { background: #102040; color: #60a5fa; }
[data-theme="dark"] .category-badge.cat-initiatives { background: #102518; color: #4ade80; }
[data-theme="dark"] .category-badge.cat-poc         { background: #2a2010; color: #fbbf24; }
[data-theme="dark"] .category-badge.cat-support     { background: #2a1020; color: #f472b6; }
[data-theme="dark"] .category-badge.cat-ad-hoc      { background: #1e1e2e; color: #9ca3af; }

/* ─── Responsive ───────────────────────────────────────────────── */
@media (max-width: 576px) {
    .employee-btn { min-height: 100px; }
    .employee-btn .display-3 { font-size: 1.6rem; }
    .employee-btn .fs-3 { font-size: 1rem !important; }
    .module-card { min-height: 160px; }
}

/* ─── Scrollbar ────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 50px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }
[data-theme="dark"]::-webkit-scrollbar-thumb { background: #2a2a3a; }
