/* ═══════════════════════════════════════════════════════════════
   Attendance Manager — Main Stylesheet
   Font: Cairo (Google Fonts)
   Theme: Professional Light (White & Blue)
   ═══════════════════════════════════════════════════════════════ */

/* ─── Google Font ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&display=swap');

/* ─── CSS Variables ───────────────────────────────────────────── */
:root {
    /* Colors */
    --primary:       #0369a1;
    --primary-light: #0ea5e9;
    --primary-dark:  #075985;
    --primary-50:    #f0f9ff;
    --primary-100:   #e0f2fe;
    --primary-200:   #bae6fd;

    --success:  #16a34a;
    --success-bg: #f0fdf4;
    --danger:   #dc2626;
    --danger-bg:  #fef2f2;
    --warning:  #d97706;
    --warning-bg: #fffbeb;
    --info:     #0891b2;

    /* Neutrals */
    --bg:       #f8fafc;
    --surface:  #ffffff;
    --border:   #e2e8f0;
    --border-light: #f1f5f9;
    --text:     #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;

    /* Layout */
    --sidebar-w: 240px;
    --header-h:  64px;
    --radius:    10px;
    --radius-lg: 16px;
    --shadow:    0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
    --shadow-md: 0 4px 16px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.06);
    --shadow-lg: 0 10px 30px rgba(0,0,0,.12);

    /* Transitions */
    --trans: 0.2s ease;
}

/* ─── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
    font-family: 'Cairo', Tahoma, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    direction: rtl;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
button, input, select, textarea { font-family: inherit; }

/* ─── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--border-light); }
::-webkit-scrollbar-thumb { background: var(--primary-200); border-radius: 3px; }

/* ═══════════════════════════════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════════════════════════════ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0369a1 0%, #0ea5e9 50%, #38bdf8 100%);
    padding: 20px;
}
.login-card {
    background: var(--surface);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
}
.login-logo {
    text-align: center;
    margin-bottom: 28px;
}
.login-logo .icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin-bottom: 12px;
    box-shadow: 0 4px 16px rgba(3,105,161,.3);
}
.login-logo h1 { font-size: 20px; font-weight: 800; color: var(--primary-dark); }
.login-logo p  { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* ═══════════════════════════════════════════════════════════════
   LAYOUT — Sidebar + Main
   ═══════════════════════════════════════════════════════════════ */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-w);
    background: var(--surface);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    z-index: 100;
    transition: transform var(--trans);
}
.sidebar-logo {
    padding: 20px 18px 16px;
    border-bottom: 1px solid var(--border-light);
}
.sidebar-logo .logo-icon {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 20px;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(3,105,161,.25);
}
.sidebar-logo h2 { font-size: 14px; font-weight: 800; color: var(--primary-dark); line-height: 1.3; }
.sidebar-logo span { font-size: 12px; color: var(--text-muted); }

.sidebar-nav { flex: 1; padding: 12px 10px; overflow-y: auto; }
.nav-group { margin-bottom: 6px; }
.nav-label { font-size: 11px; font-weight: 700; color: var(--text-light); text-transform: uppercase; padding: 10px 8px 4px; letter-spacing: .5px; }
.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: var(--radius);
    font-size: 14px; font-weight: 600;
    color: var(--text-muted);
    cursor: pointer; transition: all var(--trans);
    white-space: nowrap;
    text-decoration: none;
}
.nav-item:hover { background: var(--primary-50); color: var(--primary); }
.nav-item.active { background: var(--primary-100); color: var(--primary); }
.nav-item .nav-icon { font-size: 18px; flex-shrink: 0; }
.nav-badge {
    margin-right: auto;
    background: var(--danger);
    color: #fff;
    font-size: 11px; font-weight: 700;
    padding: 1px 7px;
    border-radius: 20px;
    min-width: 20px; text-align: center;
}

.sidebar-footer {
    padding: 12px 10px;
    border-top: 1px solid var(--border-light);
}
.user-info {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: var(--radius);
    background: var(--primary-50);
}
.user-avatar {
    width: 34px; height: 34px;
    background: var(--primary);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 800; font-size: 14px;
    flex-shrink: 0;
}
.user-info .name  { font-size: 13px; font-weight: 700; }
.user-info .role  { font-size: 11px; color: var(--text-muted); }
.logout-btn {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 12px; margin-top: 6px;
    border-radius: var(--radius); font-size: 13px;
    color: var(--danger); font-weight: 600;
    cursor: pointer; transition: background var(--trans);
    text-decoration: none;
}
.logout-btn:hover { background: var(--danger-bg); }

/* Main content area */
.main-content {
    flex: 1;
    margin-right: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Top bar */
.topbar {
    height: var(--header-h);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 50;
}
.topbar h1 { font-size: 18px; font-weight: 800; flex: 1; }
.topbar .breadcrumb { font-size: 13px; color: var(--text-muted); }
.topbar .right { display: flex; align-items: center; gap: 10px; margin-right: auto; }

.mobile-toggle {
    display: none;
    background: none; border: none;
    font-size: 22px; cursor: pointer; color: var(--text);
}

/* Page content */
.page-body {
    padding: 24px;
    flex: 1;
}

/* ═══════════════════════════════════════════════════════════════
   COMPONENTS
   ═══════════════════════════════════════════════════════════════ */

/* Cards */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
}
.card-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-light);
}
.card-title { font-size: 15px; font-weight: 800; }
.card-icon {
    width: 36px; height: 36px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
}

/* Stat Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    transition: transform var(--trans), box-shadow var(--trans);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 4px; height: 100%;
    background: var(--primary);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}
.stat-card.success::before { background: var(--success); }
.stat-card.danger::before  { background: var(--danger); }
.stat-card.warning::before { background: var(--warning); }
.stat-card.info::before    { background: var(--info); }

.stat-value { font-size: 32px; font-weight: 900; color: var(--primary); line-height: 1; margin-bottom: 4px; }
.stat-card.success .stat-value { color: var(--success); }
.stat-card.danger  .stat-value { color: var(--danger); }
.stat-card.warning .stat-value { color: var(--warning); }
.stat-label { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.stat-icon  {
    position: absolute; top: 14px; left: 16px;
    font-size: 28px; opacity: .12;
}

/* Buttons */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 18px;
    border-radius: var(--radius);
    font: 600 14px/1 'Cairo', sans-serif;
    cursor: pointer;
    transition: all var(--trans);
    border: 1px solid transparent;
    white-space: nowrap;
    text-decoration: none;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary  { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover:not(:disabled) { background: var(--bg); }
.btn-success  { background: var(--success); color: #fff; border-color: var(--success); }
.btn-danger   { background: var(--surface); color: var(--danger); border-color: var(--border); }
.btn-danger:hover:not(:disabled) { background: var(--danger-bg); border-color: var(--danger); }
.btn-lg { padding: 13px 24px; font-size: 16px; border-radius: var(--radius-lg); }
.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-icon { padding: 8px; }
.btn-block { width: 100%; justify-content: center; }

/* Form Controls */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.form-control {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font: 500 14px 'Cairo', sans-serif;
    transition: border-color var(--trans), box-shadow var(--trans);
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(3,105,161,.1);
}
.form-control::placeholder { color: var(--text-light); }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 150px; }
.input-group { display: flex; }
.input-group .form-control { border-radius: var(--radius) 0 0 var(--radius); }
.input-group .btn { border-radius: 0 var(--radius) var(--radius) 0; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { padding: 10px 14px; text-align: right; background: var(--primary-50); color: var(--primary-dark); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; border-bottom: 2px solid var(--primary-100); white-space: nowrap; }
td { padding: 11px 14px; text-align: right; border-bottom: 1px solid var(--border-light); color: var(--text); vertical-align: middle; white-space: nowrap; }
tr:hover td { background: var(--primary-50); }
tr:last-child td { border-bottom: none; }

/* Badges / Tags */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: 20px;
    font-size: 12px; font-weight: 700;
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-info    { background: #f0fdff; color: var(--info); }
.badge-neutral { background: var(--border-light); color: var(--text-muted); }
.badge-primary { background: var(--primary-100); color: var(--primary); }

/* Alerts */
.alert {
    padding: 12px 16px; border-radius: var(--radius);
    font-size: 14px; font-weight: 500; margin-bottom: 16px;
}
.alert-success { background: var(--success-bg); color: var(--success); border: 1px solid #bbf7d0; }
.alert-danger  { background: var(--danger-bg);  color: var(--danger);  border: 1px solid #fecaca; }
.alert-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid #fde68a; }
.alert-info    { background: #f0fdff; color: var(--info); border: 1px solid #bae6fd; }

/* ═══════════════════════════════════════════════════════════════
   PUNCH MODULE — Clock & Big Button
   ═══════════════════════════════════════════════════════════════ */
.clock-display {
    text-align: center;
    padding: 24px 0 8px;
}
.clock-time {
    font-size: 64px; font-weight: 900;
    color: var(--primary);
    direction: ltr;
    letter-spacing: 3px;
    line-height: 1;
    text-shadow: 0 2px 8px rgba(3,105,161,.15);
}
.clock-date { font-size: 16px; color: var(--text-muted); margin-top: 6px; }

.punch-btn {
    width: 100%; padding: 18px;
    font-size: 20px; font-weight: 800;
    border-radius: var(--radius-lg);
    margin-top: 16px;
    letter-spacing: .5px;
    box-shadow: 0 4px 16px rgba(3,105,161,.25);
    transition: all .2s ease;
}
.punch-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(3,105,161,.35); }
.punch-btn.punch-out { background: var(--danger); border-color: var(--danger); box-shadow: 0 4px 16px rgba(220,38,38,.25); }
.punch-btn.punch-out:hover:not(:disabled) { box-shadow: 0 6px 20px rgba(220,38,38,.35); }

.punch-info { text-align: center; color: var(--text-muted); font-size: 14px; margin-top: 8px; min-height: 22px; }
.punch-msg  { text-align: center; font-size: 15px; font-weight: 700; margin-top: 10px; min-height: 24px; }

/* ═══════════════════════════════════════════════════════════════
   SCHEDULE GRID
   ═══════════════════════════════════════════════════════════════ */
.schedule-grid th.friday { background: #fef9c3; color: #92400e; }
.schedule-grid tr.friday-row td { background: #fffde7; }
.shift-input { width: 90px; padding: 5px 8px; font-size: 13px; border: 1px solid var(--border); border-radius: 6px; text-align: center; }
.shift-input:focus { outline: none; border-color: var(--primary); }
.shift-input.invalid { border-color: var(--danger); background: var(--danger-bg); }

/* ═══════════════════════════════════════════════════════════════
   BAR CHARTS (Reports)
   ═══════════════════════════════════════════════════════════════ */
.bar-chart { margin: 12px 0; }
.bar-row { display: flex; align-items: center; gap: 12px; margin: 6px 0; }
.bar-label { width: 80px; font-size: 13px; color: var(--text-muted); text-align: right; flex-shrink: 0; }
.bar-track { flex: 1; background: var(--border-light); border-radius: 5px; height: 10px; overflow: hidden; }
.bar-fill  { height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-light)); border-radius: 5px; transition: width .6s ease; }
.bar-value { font-size: 13px; font-weight: 600; color: var(--primary); width: 50px; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════════════
   UTILITIES
   ═══════════════════════════════════════════════════════════════ */
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-primary { color: var(--primary); }
.fw-bold { font-weight: 700; }
.fw-800  { font-weight: 800; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mt-2 { margin-top: 16px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.gap-2 { gap: 10px; }
.gap-3 { gap: 16px; }
.hidden { display: none; }
.divider { border: none; border-top: 1px solid var(--border-light); margin: 20px 0; }
.empty-state { text-align: center; padding: 40px; color: var(--text-muted); }
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 15px; }

/* Spinner */
.spinner {
    width: 20px; height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin .6s linear infinite;
    display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
.toast-container { position: fixed; bottom: 24px; left: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 18px;
    box-shadow: var(--shadow-md);
    font-size: 14px; font-weight: 600;
    display: flex; align-items: center; gap: 10px;
    min-width: 240px; max-width: 360px;
    animation: slideUp .25s ease;
}
.toast.success { border-right: 4px solid var(--success); color: var(--success); }
.toast.error   { border-right: 4px solid var(--danger);  color: var(--danger); }
.toast.warning { border-right: 4px solid var(--warning); color: var(--warning); }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Modal */
.modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.4);
    backdrop-filter: blur(2px);
    z-index: 200;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.modal {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 28px;
    width: 100%; max-width: 500px;
    box-shadow: var(--shadow-lg);
    animation: scaleIn .2s ease;
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-title  { font-size: 17px; font-weight: 800; }
.modal-close  { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text-muted); padding: 4px; border-radius: 6px; }
.modal-close:hover { background: var(--bg); }
.modal-footer { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border-light); }
@keyframes scaleIn { from { transform: scale(.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(100%);
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }
    .main-content { margin-right: 0; }
    .mobile-toggle { display: block; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .page-body { padding: 16px; }
    .clock-time { font-size: 48px; }
}
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .form-row { flex-direction: column; }
}

/* ═══════════════════════════════════════════════════════════════
   TIMELINE, COVERAGE & QUICK SHIFT STYLES
   ═══════════════════════════════════════════════════════════════ */

/* Coverage Alert Banner */
.coverage-alert-box {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-right: 4px solid #f59e0b;
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.coverage-alert-box.danger {
    background: #fef2f2;
    border-color: #fecaca;
    border-right-color: #ef4444;
}
.coverage-alert-title {
    font-weight: 700;
    font-size: 14px;
    color: #92400e;
    display: flex;
    align-items: center;
    gap: 8px;
}
.coverage-alert-box.danger .coverage-alert-title {
    color: #991b1b;
}

/* Shift Cell Enhancements */
.shift-cell-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}
.shift-input {
    width: 100%;
    min-width: 85px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    padding: 6px 4px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    transition: all 0.2s ease;
}
.shift-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.15);
}
.shift-cell-picker-btn {
    position: absolute;
    left: 2px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.15s ease;
    padding: 2px 4px;
    border-radius: 4px;
}
.shift-cell-wrap:hover .shift-cell-picker-btn {
    opacity: 0.7;
}
.shift-cell-picker-btn:hover {
    opacity: 1;
    background: #e2e8f0;
}
.shift-preview-hint {
    font-size: 11px;
    color: var(--primary);
    margin-top: 2px;
    font-weight: 600;
    white-space: nowrap;
}

/* Timeline Container */
.timeline-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 20px;
}
.timeline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}
.timeline-grid {
    overflow-x: auto;
    position: relative;
    padding-bottom: 10px;
}
.timeline-hours-axis {
    display: grid;
    grid-template-columns: 140px repeat(15, minmax(42px, 1fr));
    position: relative;
    border-bottom: 1px solid var(--border);
    padding-bottom: 6px;
    margin-bottom: 8px;
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    font-weight: 600;
}
.timeline-midnight-label {
    position: absolute;
    left: 0;
    bottom: 6px;
    width: 42px;
    text-align: center;
    color: var(--text-muted);
}
.timeline-midnight-label span {
    font-size: 9px;
}
.timeline-lane {
    display: grid;
    grid-template-columns: 140px minmax(1008px, 1fr);
    align-items: center;
    min-height: 44px;
    border-bottom: 1px solid var(--border-light);
    position: relative;
}
.timeline-lane:hover {
    background: #f8fafc;
}
.timeline-emp-meta {
    font-weight: 700;
    font-size: 13px;
    padding: 6px 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 6px;
}
.timeline-track {
    display: grid;
    grid-template-columns: repeat(15, minmax(42px, 1fr));
    height: 44px;
    position: relative;
    min-width: 630px;
}
.timeline-block {
    position: absolute;
    height: 30px;
    border-radius: 6px;
    background: linear-gradient(135deg, #0f766e, #0d9488);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(15, 118, 110, 0.25);
    z-index: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 6px;
    cursor: default;
}
.timeline-unresolved,
.timeline-off {
    position: absolute;
    right: 8px;
    top: 13px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    z-index: 3;
}
.timeline-unresolved {
    color: #dc2626;
}
.timeline-block.department-color-1 {
    background: linear-gradient(135deg, #0f766e, #0d9488);
}
.timeline-block.department-color-2 {
    background: linear-gradient(135deg, #2563eb, #38bdf8);
}
.timeline-block.department-color-3 {
    background: linear-gradient(135deg, #7c3aed, #a78bfa);
}
.timeline-block.department-color-4 {
    background: linear-gradient(135deg, #c2410c, #fb923c);
}
.timeline-block.department-color-5 {
    background: linear-gradient(135deg, #be185d, #f472b6);
}
.timeline-block.department-color-6 {
    background: linear-gradient(135deg, #4d7c0f, #84cc16);
}
.timeline-legend-swatch {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
}
.timeline-legend-swatch.department-color-1 { background: #0f766e; }
.timeline-legend-swatch.department-color-2 { background: #2563eb; }
.timeline-legend-swatch.department-color-3 { background: #7c3aed; }
.timeline-legend-swatch.department-color-4 { background: #c2410c; }
.timeline-legend-swatch.department-color-5 { background: #be185d; }
.timeline-legend-swatch.department-color-6 { background: #4d7c0f; }
.timeline-coverage-bar {
    display: grid;
    grid-template-columns: 140px repeat(15, minmax(42px, 1fr));
    margin-top: 8px;
    padding-top: 8px;
    border-top: 2px dashed var(--border);
    font-size: 11px;
    text-align: center;
    font-weight: 700;
}
.coverage-cell {
    padding: 6px 2px;
    border-radius: 4px;
    margin: 0 1px;
}
.coverage-cell.gap {
    background: #fee2e2;
    color: #dc2626;
    border: 1px dashed #ef4444;
}
.coverage-cell.ok {
    background: #dcfce7;
    color: #15803d;
}
.coverage-cell.good {
    background: #ccfbf1;
    color: #0f766e;
}

/* Quick Shift Modal / Presets */
.quick-shift-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 16px 0;
}
.quick-shift-btn {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px;
    text-align: right;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}
.quick-shift-btn:hover {
    background: #f0fdfa;
    border-color: var(--primary);
    transform: translateY(-1px);
}
.quick-shift-title {
    font-weight: 700;
    font-size: 13px;
    color: var(--text);
    display: block;
}
.quick-shift-time {
    font-size: 11px;
    color: var(--primary);
    font-weight: 600;
}

/* Department Tabs Filter */
.dept-pill-group {
    display: inline-flex;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 3px;
    gap: 4px;
}
.dept-pill {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
    border: none;
    background: transparent;
}
.dept-pill:hover {
    color: #0f172a;
}
.dept-pill.active {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Workload Report Styles */
.workload-gauge {
    height: 10px;
    background: #e2e8f0;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
    margin-top: 4px;
}
.workload-gauge-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.4s ease;
}
.workload-gauge-fill.balanced { background: #10b981; }
.workload-gauge-fill.heavy { background: #f59e0b; }
.workload-gauge-fill.overload { background: #ef4444; }
.workload-gauge-fill.light { background: #3b82f6; }
