/* ===================== Theme variables ===================== */
:root,
:root[data-theme="blue"] {
    --primary: #1a5fb4;
    --primary-dark: #0f3d75;
    --primary-light: #e8f0fb;
    --accent: #2563eb;
    --bg: #f3f5f9;
    --card: #ffffff;
    --border: #e2e6ed;
    --text: #1f2430;
    --muted: #6b7280;
    --danger: #c0392b;
    --success: #1e8449;
    --warn: #b9770e;
    --sidebar-bg: #0f2747;
    --sidebar-bg-active: #15335f;
    --sidebar-text: #cfe0f7;
    --sidebar-text-muted: #88a3c7;
}
:root[data-theme="teal"] {
    --primary: #0f766e;
    --primary-dark: #0b5a54;
    --primary-light: #e3f5f3;
    --accent: #0d9488;
    --bg: #f2f7f6;
    --card: #ffffff;
    --border: #dde8e6;
    --text: #1c2625;
    --muted: #65716f;
    --danger: #c0392b;
    --success: #15803d;
    --warn: #b9770e;
    --sidebar-bg: #0b3330;
    --sidebar-bg-active: #0f4440;
    --sidebar-text: #cdeae5;
    --sidebar-text-muted: #7fb3ab;
}
:root[data-theme="indigo"] {
    --primary: #4338ca;
    --primary-dark: #312693;
    --primary-light: #ebe9fc;
    --accent: #6366f1;
    --bg: #f4f4fb;
    --card: #ffffff;
    --border: #e3e2f3;
    --text: #201f33;
    --muted: #6b6a85;
    --danger: #c0392b;
    --success: #1e8449;
    --warn: #b9770e;
    --sidebar-bg: #1e1a4d;
    --sidebar-bg-active: #28227a;
    --sidebar-text: #dad8f7;
    --sidebar-text-muted: #9a94d1;
}
:root[data-theme="slate"] {
    --primary: #334155;
    --primary-dark: #1e293b;
    --primary-light: #eceff3;
    --accent: #475569;
    --bg: #f2f3f5;
    --card: #ffffff;
    --border: #e2e5ea;
    --text: #1e2228;
    --muted: #68707b;
    --danger: #c0392b;
    --success: #1e8449;
    --warn: #b9770e;
    --sidebar-bg: #171c24;
    --sidebar-bg-active: #232a36;
    --sidebar-text: #cdd3dc;
    --sidebar-text-muted: #808b99;
}

/* ===================== Base ===================== */
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}
.icon { flex-shrink: 0; vertical-align: middle; }

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

.sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.sidebar-brand {
    display: flex; align-items: center; gap: 10px;
    padding: 18px 18px;
    font-weight: 700; font-size: 1.02rem;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-nav { flex: 1; padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; }

.nav-link, .nav-group summary {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px;
    border-radius: 7px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 0.89rem;
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.nav-group summary::-webkit-details-marker { display: none; }
.nav-link:hover, .nav-group summary:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-link.active { background: var(--sidebar-bg-active); color: #fff; font-weight: 600; }
.nav-link.active, .nav-group[open] > summary { box-shadow: inset 3px 0 0 var(--accent); }

.nav-group summary .chev { margin-left: auto; transition: transform 0.15s; opacity: 0.7; }
.nav-group[open] summary .chev { transform: rotate(180deg); }
.nav-sublist { display: flex; flex-direction: column; padding: 2px 0 6px 30px; }
.nav-sublist a {
    display: flex; align-items: center; gap: 8px;
    color: var(--sidebar-text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    padding: 6px 10px;
    border-radius: 6px;
}
.nav-sublist a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.nav-sublist a.active { color: #fff; font-weight: 600; background: var(--sidebar-bg-active); }

.sidebar-footer {
    padding: 14px 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.sidebar-footer .who { font-size: 0.82rem; color: var(--sidebar-text); margin-bottom: 10px; line-height: 1.5; }
.role-badge {
    display: inline-block;
    background: rgba(255,255,255,0.1);
    color: var(--sidebar-text-muted);
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 0.74rem;
    margin-top: 2px;
}
.logout-link { color: var(--sidebar-text-muted) !important; }
.logout-link:hover { color: #fff !important; }

/* ===================== Top slim bar + main content ===================== */
.main-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar-slim {
    display: flex; align-items: center; gap: 14px;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 14px 24px;
    position: sticky; top: 0; z-index: 20;
}
.page-title { font-weight: 700; font-size: 1.1rem; color: var(--primary-dark); }
.hamburger {
    display: none;
    background: none; border: none; cursor: pointer;
    color: var(--text); padding: 4px;
}

.container { max-width: 1200px; margin: 0 auto; padding: 24px 24px 50px; width: 100%; }
.container-auth { max-width: 1200px; margin: 0 auto; padding: 24px; min-height: 100vh; display: flex; align-items: center; justify-content: center; }

/* ===================== Cards & typography ===================== */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 22px 26px;
    margin-bottom: 22px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.04);
}

h1, h2, h3 { color: var(--primary-dark); }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }

.auth-wrap { max-width: 420px; width: 100%; }

/* ===================== Forms ===================== */
label { display: block; margin: 12px 0 4px; font-weight: 600; font-size: 0.9rem; }
input[type=text], input[type=email], input[type=password], input[type=date],
input[type=time], input[type=month], input[type=number], select, textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--card);
    color: var(--text);
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--primary-light);
}
textarea { min-height: 70px; resize: vertical; }

.btn {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 9px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.92rem;
    text-decoration: none;
    margin-top: 14px;
    font-family: inherit;
}
.btn:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--muted); }
.btn-secondary:hover { background: #4b5563; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.form-grid .full { grid-column: 1 / -1; }

/* ===================== Tables ===================== */
table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 0.88rem; }
th, td { border: 1px solid var(--border); padding: 7px 9px; text-align: left; vertical-align: top; }
th { background: var(--primary-light); color: var(--primary-dark); font-weight: 600; }
tr:nth-child(even) td { background: #fafbfc; }

/* ===================== Badges ===================== */
.badge { padding: 2px 9px; border-radius: 12px; font-size: 0.78rem; font-weight: 600; color: #fff; display: inline-block; white-space: nowrap; }
.badge-Completed { background: var(--success); }
.badge-InProgress, .badge-In-Progress { background: var(--primary); }
.badge-Pending { background: var(--warn); }
.badge-OnHold, .badge-On-Hold { background: var(--danger); }
.badge-Open { background: var(--warn); }
.badge-Reported { background: var(--primary); }
.badge-Follow-up1 { background: #6b4fa0; }
.badge-Follow-up2 { background: #8a3fa0; }
.badge-Escalated { background: var(--danger); }
.badge-Resolved { background: var(--success); }
.badge-Closed { background: #4b5563; }

/* ===================== Stat cards ===================== */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 16px 0; }
.stat { background: var(--primary-light); border-radius: 10px; padding: 14px; text-align: center; }
.stat .num { font-size: 1.6rem; font-weight: 700; color: var(--primary-dark); }
.stat .label { font-size: 0.8rem; color: var(--muted); }

/* ===================== Alerts / misc ===================== */
.error { color: var(--danger); background: #fdecea; border: 1px solid #f5c6c2; padding: 10px 14px; border-radius: 6px; margin-bottom: 10px; }
.success { color: var(--success); background: #eafaf1; border: 1px solid #b7ecc7; padding: 10px 14px; border-radius: 6px; margin-bottom: 10px; }
.hint { color: var(--muted); font-size: 0.82rem; }

.toolbar { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar > div { display: flex; flex-direction: column; }

/* ===================== Responsive ===================== */
@media (max-width: 900px) {
    .sidebar {
        position: fixed; left: 0; top: 0; z-index: 100;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
        box-shadow: 4px 0 20px rgba(0,0,0,0.25);
    }
    .sidebar.open { transform: translateX(0); }
    .hamburger { display: block; }
    .form-grid { grid-template-columns: 1fr; }
}

/* ===================== Enterprise additions ===================== */
.notice { color: var(--primary-dark); background: var(--primary-light); border: 1px solid var(--border); padding: 10px 14px; border-radius: 6px; margin-bottom: 10px; }
.app-version { font-size: 0.72rem; color: var(--sidebar-text-muted); margin: 8px 12px 0; opacity: 0.8; }
.trail-line { margin-bottom: 7px; font-size: 0.82rem; line-height: 1.35; }
.trail-date { color: var(--muted); margin-right: 6px; white-space: nowrap; }
.trail-note { display: block; color: #374151; margin-left: 2px; }
.trail-earlier { font-size: 0.78rem; color: var(--muted); font-style: italic; margin-bottom: 6px; }
.section-note { margin: -4px 0 10px; }
h4 { margin: 18px 0 4px; color: var(--primary-dark); font-size: 0.95rem; }

@media print {
    .sidebar, .topbar-slim, .toolbar, .btn, .hamburger { display: none !important; }
    body { background: #fff; }
    .app-shell { display: block; }
    .container { max-width: 100%; padding: 0; }
    .card { box-shadow: none; border: none; padding: 8px 0; page-break-inside: auto; }
    tr { page-break-inside: avoid; }
}

/* ===================== Overview, timeline, search ===================== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; gap: 0; } }
.item-link { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--muted); }
.item-link:hover { color: var(--accent); border-bottom-color: var(--accent); }
.topsearch { margin-left: auto; }
.topsearch input { width: 250px; padding: 7px 12px; border-radius: 20px; background: var(--bg); font-size: 0.86rem; }
@media (max-width: 600px) { .topsearch input { width: 130px; } }
.timeline { list-style: none; margin: 8px 0 0; padding: 0 0 0 22px; border-left: 2px solid var(--border); }
.timeline li { position: relative; padding: 0 0 18px 16px; }
.timeline .tl-dot { position: absolute; left: -29px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 2px solid var(--card); box-shadow: 0 0 0 1px var(--accent); }
.timeline .tl-head { font-size: 0.85rem; color: var(--muted); margin-bottom: 3px; }
.timeline .tl-head strong { color: var(--text); }
.timeline .tl-note { margin-top: 5px; padding: 8px 10px; background: var(--primary-light); border-radius: 6px; font-size: 0.88rem; }
@media print { .topsearch { display: none !important; } }

/* ===================== Pending reasons ===================== */
.reason-block { background: var(--primary-light); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; margin-top: 8px; }
.reason-block .hint { margin: 2px 0 6px; }
.timeline .tl-reason { margin-top: 5px; font-size: 0.85rem; color: #8a5a00; }

/* ===================== Management report cards ===================== */
ul.narrative { margin: 4px 0 4px 18px; padding: 0; } ul.narrative li { margin-bottom: 4px; font-size: 0.93rem; }
.mini-bar { background: var(--border); border-radius: 4px; overflow: hidden; height: 10px; } .mini-bar > div { background: var(--accent); height: 10px; }
table.item { width: 100%; margin: 0 0 12px; border: 1px solid var(--border); border-left: 4px solid var(--warn); border-radius: 8px; border-collapse: separate; border-spacing: 0; overflow: hidden; background: var(--card); }
table.item td, table.item tr:nth-child(even) td { border: none; background: transparent; padding: 7px 14px; }
table.item.st-done { border-left-color: var(--success); } table.item.st-prog { border-left-color: var(--accent); } table.item.st-hold { border-left-color: var(--danger); }
table.item .item-title { font-weight: 600; font-size: 0.95rem; padding-bottom: 2px; } table.item .item-status { width: 150px; text-align: right; vertical-align: top; }
table.item .item-meta { color: var(--muted); font-size: 0.82rem; padding-top: 0; padding-bottom: 5px; }
table.item .item-reason { color: #8a5a00; font-size: 0.86rem; padding-top: 0; padding-bottom: 6px; } table.item .item-noreason { color: var(--danger); }
table.item td.item-trail { background: #fafbfc; border-top: 1px solid var(--border); padding-top: 9px; padding-bottom: 3px; }
@media print { table.item { page-break-inside: avoid; } }

/* ===================== Slim sidebar footer ===================== */
.sidebar-footer { display: flex; align-items: center; gap: 6px; padding: 8px 10px; }
.user-chip { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 8px; text-decoration: none; color: var(--sidebar-text); }
.user-chip:hover, .user-chip.active { background: rgba(255,255,255,0.09); color: #fff; }
.user-chip .avatar { flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; font-size: 0.85rem; display: flex; align-items: center; justify-content: center; }
.user-chip .uc-text { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.user-chip .uc-name { font-size: 0.84rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip .uc-role { font-size: 0.68rem; color: var(--sidebar-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { flex-shrink: 0; width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--sidebar-text-muted); text-decoration: none; }
.icon-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
.delta { font-size: 0.72rem; font-weight: 600; margin-top: 2px; } .delta-good { color: var(--success); } .delta-bad { color: var(--danger); } .delta-flat { color: var(--muted); }

/* ===================== Executive report ===================== */
.stat .hint { font-size: 0.7rem; margin-top: 2px; }
@media print { .grid-2 { display: block; } }

/* ---- v17.4 polish ---- */
input[type=datetime-local] { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 0.95rem; font-family: inherit; background: var(--card); color: var(--text); }
input[type=datetime-local]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.stat-num { font-size: 1.5rem; font-weight: 700; color: var(--primary-dark); line-height: 1.2; }
div.stat { min-width: 120px; flex: 1 1 120px; background: var(--primary-light); border-radius: 10px; padding: 12px 14px; text-align: center; }
.card h2 { margin-top: 0; }
.card h3 { margin: 0 0 8px; padding-bottom: 6px; border-bottom: 2px solid var(--primary-light); color: var(--primary-dark); }
tbody tr:hover td, table tr:hover > td { background-color: rgba(37, 99, 235, .035); }
.btn { transition: background .15s, box-shadow .15s; box-shadow: 0 1px 2px rgba(16, 24, 40, .12); }
.btn:focus-visible, .mdd-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
details > summary { cursor: pointer; }
details[open] > summary { margin-bottom: 4px; }
.pt-card { border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 8px; padding: 12px 14px; margin-bottom: 12px; background: var(--card); box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.pt-card strong:first-child { font-size: 1rem; color: var(--primary-dark); }
label { letter-spacing: .01em; }

/* Dropdown multi-select (progressively replaces <select multiple class="multi-dd">) */
.mdd { position: relative; max-width: 460px; }
.mdd-btn { width: 100%; min-height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: left; padding: 5px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--card); color: var(--text); font: inherit; font-size: .95rem; cursor: pointer; }
.mdd-btn:hover { border-color: var(--accent); }
.mdd.open .mdd-btn { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.mdd-caret { flex: none; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid var(--muted); transition: transform .15s; }
.mdd.open .mdd-caret { transform: rotate(180deg); }
.mdd-val { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; min-width: 0; }
.mdd-ph { color: var(--muted); }
.mdd-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--primary-light); color: var(--primary-dark); border-radius: 12px; padding: 2px 4px 2px 10px; font-size: .8rem; font-weight: 600; max-width: 100%; }
.mdd-chip span.x { cursor: pointer; width: 16px; height: 16px; line-height: 15px; text-align: center; border-radius: 50%; font-size: .85rem; }
.mdd-chip span.x:hover { background: rgba(0, 0, 0, .12); }
.mdd-more { background: var(--muted); color: #fff; padding-right: 10px; }
.mdd-panel { display: none; position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 4px); background: var(--card); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 10px 28px rgba(16, 24, 40, .16); padding: 8px; }
.mdd.open .mdd-panel { display: block; }
.mdd-search { margin-bottom: 6px; }
.mdd-tools { display: flex; justify-content: space-between; font-size: .8rem; margin: 2px 2px 6px; }
.mdd-tools a { color: var(--accent); cursor: pointer; text-decoration: none; font-weight: 600; }
.mdd-list { max-height: 230px; overflow-y: auto; }
.mdd-opt { display: flex !important; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; margin: 0 !important; font-weight: 400 !important; cursor: pointer; }
.mdd-opt:hover { background: var(--primary-light); }
.mdd-opt input { width: auto !important; margin: 0; }
.mdd-empty { padding: 8px; color: var(--muted); font-size: .85rem; }

/* Inbox bell (v20) */
.bell-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; margin-left: 10px; border-radius: 50%; color: var(--text-muted, #5b6b80); text-decoration: none; }
.bell-btn:hover, .bell-btn.active { background: rgba(26,95,180,.10); color: var(--primary, #1a5fb4); }
.bell-badge { position: absolute; top: 2px; right: 0; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #c0392b; color: #fff; font-size: 11px; font-weight: 700; line-height: 17px; text-align: center; }
@media print { .bell-btn { display: none !important; } }
/* Calendar (v20) */
.cal { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cal th { background: #eef2f7; padding: 6px; font-size: .8rem; text-align: left; border: 1px solid #dde3ea; }
.cal td { vertical-align: top; height: 104px; border: 1px solid #dde3ea; padding: 3px 4px; font-size: .78rem; background: #fff; }
.cal td.other { background: #f6f8fa; color: #9aa6b4; }
.cal td.today { outline: 2px solid #1a5fb4; outline-offset: -2px; }
.cal .dn { font-weight: 700; font-size: .8rem; color: #33445a; text-decoration: none; }
.cal .ev { display: block; margin-top: 2px; padding: 1px 4px; border-radius: 3px; border-left: 3px solid #1a5fb4; background: #eef4fc; color: #243447; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-decoration: none; }
.cal .ev.t-over { border-color: #c0392b; background: #fdecea; } .cal .ev.t-done { border-color: #1e8449; background: #eaf6ef; color: #6b7a6f; text-decoration: line-through; }
.cal .ev.t-plan { border-color: #8e44ad; background: #f5eefa; } .cal .ev.t-meet { border-color: #d68910; background: #fdf3e3; } .cal .ev.t-inc { border-color: #b03a2e; background: #fbeeed; } .cal .ev.t-rout { border-color: #b9770e; background: #fffaf0; }
.cal .more { display: block; margin-top: 2px; font-size: .74rem; color: #1a5fb4; }
@media (max-width: 760px) { .cal td { height: 70px; font-size: .7rem; } }

/* v21.7: smoother page feel */
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
.card h2 { letter-spacing: .1px; }
table tr:hover td { background-color: rgba(26,95,180,.04); }
.btn:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid #1a5fb4; outline-offset: 2px; }

/* ===================== Footer credit bar (fixed, centred) ===================== */
.app-credit { position: fixed; bottom: 0; left: 240px; right: 0; z-index: 30; height: 30px; display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 0 18px; font-size: 0.76rem; color: #5b6676; background: #ffffff; border-top: 1px solid #dde3ea; box-shadow: 0 -2px 8px rgba(15,23,42,.04); }
.app-credit .ac-product { color: #5b6676; }
.app-credit .ac-sep { color: #aab4c2; }
.app-credit .ac-credit { color: #1f3a5f; font-weight: 600; }
.main-wrap > main.container { padding-bottom: 54px; }            /* the last line of every page stays clear of the bar */
.app-credit-auth { left: 0; }
@media (max-width: 900px) { .app-credit { left: 0; font-size: 0.7rem; } }
@media print { .app-credit { display: none; } }

/* ===================== Compact sidebar user block ===================== */
.sidebar-footer { padding: 6px 8px; gap: 4px; border-top: 1px solid rgba(255,255,255,0.07); }
.user-chip { gap: 8px; padding: 5px 6px; border-radius: 7px; }
.user-chip .avatar { width: 26px; height: 26px; font-size: 0.76rem; box-shadow: 0 0 0 2px rgba(255,255,255,0.10); }
.user-chip .uc-text { line-height: 1.18; }
.user-chip .uc-name { font-size: 0.79rem; }
.user-chip .uc-role { font-size: 0.64rem; letter-spacing: .1px; }
.sidebar-footer .icon-btn { width: 28px; height: 28px; border-radius: 7px; }
.sidebar-footer .icon-btn svg { width: 16px; height: 16px; }

/* ===================== Sidebar: only the menu scrolls; brand and user block stay in place ===================== */
.sidebar { overflow: hidden; }
.sidebar > :first-child { flex-shrink: 0; }
.sidebar-nav { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
.sidebar-nav::-webkit-scrollbar { width: 6px; } .sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 3px; }
.sidebar-footer { flex-shrink: 0; background: var(--sidebar-bg); box-shadow: 0 -6px 12px rgba(0,0,0,.12); }

/* ===================== Plan action buttons: colour says what they do ===================== */
.btn.btn-defer { background: #d97706; border-color: #d97706; color: #fff; }            /* amber = postpone / reschedule */
.btn.btn-defer:hover { background: #b45309; border-color: #b45309; }
.btn.btn-drop { background: #fff; border: 1px solid #dc2626; color: #b91c1c; }          /* red outline = remove */
.btn.btn-drop:hover { background: #dc2626; color: #fff; }
.btn.btn-info-link { background: transparent; border: 1px dashed #93b4dc; color: #1a5fb4; }  /* information only */
.btn.btn-info-link:hover { background: #eef4fb; }

/* ===================== Toggle switches (Admin → Features) ===================== */
.fswitch { position: relative; display: inline-block; width: 46px; height: 24px; margin: 0; vertical-align: middle; cursor: pointer; }
.fswitch input { opacity: 0; width: 0; height: 0; position: absolute; }
.fslider { position: absolute; inset: 0; background: #cbd5e1; border-radius: 24px; transition: background .18s; }
.fslider::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .18s; }
.fswitch input:checked + .fslider { background: #1e8449; }
.fswitch input:checked + .fslider::before { transform: translateX(22px); }
.fswitch input:focus-visible + .fslider { box-shadow: 0 0 0 3px rgba(26,95,180,.35); }
.fswitch.disabled { opacity: .45; cursor: not-allowed; }
.fs-on { color: #1e8449; font-weight: 700; } .fs-off { color: #6b7280; font-weight: 600; }

/* "Start as a task?" — blue (go / start), next to amber Defer and red Drop */
.btn.btn-info-link { background: #1a5fb4; border: 1px solid #1a5fb4; color: #fff; }
.btn.btn-info-link:hover { background: #154c91; border-color: #154c91; color: #fff; }

