/* ---- Theme tokens ---- */
:root {
    --bg: #f6f7fb;
    --surface: #ffffff;
    --surface-2: #fbfbfd;
    --sidebar: #ffffff;
    --text: #1f2430;
    --text-soft: #6b7280;
    --border: #e8eaf0;

    --accent: #6c5ce7;
    --accent-soft: #efecfe;
    --accent-ink: #ffffff;

    --up: #12916b;
    --up-soft: #e3f6ef;
    --down: #d1495b;
    --down-soft: #fdecee;
    --mid: #c98a19;
    --mid-soft: #fdf3e0;

    --shadow: 0 2px 10px rgba(24, 28, 40, .06);
    --radius: 14px;
}

:root[data-theme="dark"] {
    --bg: #14161d;
    --surface: #1c1f28;
    --surface-2: #21242e;
    --sidebar: #1a1d25;
    --text: #e7e9ee;
    --text-soft: #9aa1b1;
    --border: #2b2f3a;

    --accent: #8b7bf0;
    --accent-soft: #2a2740;
    --accent-ink: #ffffff;

    --up: #3ddba4;
    --up-soft: #17332a;
    --down: #f2798b;
    --down-soft: #351f25;
    --mid: #e8b054;
    --mid-soft: #33291a;

    --shadow: 0 2px 12px rgba(0, 0, 0, .3);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    transition: background .2s ease, color .2s ease;
}

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

.sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--sidebar);
    border-inline-start: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 20px 14px;
    position: sticky;
    top: 0;
    height: 100vh;
}

.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 22px; }
.brand-mark {
    width: 34px; height: 34px;
    border-radius: 10px;
    background: var(--accent);
    color: var(--accent-ink);
    display: grid; place-items: center;
    font-weight: 700; font-size: .85rem;
    letter-spacing: .5px;
}
.brand-text { font-weight: 600; font-size: .98rem; }

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-soft);
    font-size: .92rem;
    transition: background .15s ease, color .15s ease;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.is-active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-icon { font-size: 1rem; }

.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }

.theme-toggle {
    display: flex; align-items: center; gap: 9px;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-soft);
    border-radius: 10px;
    cursor: pointer;
    font-size: .88rem;
    font-family: inherit;
    transition: background .15s ease;
}
.theme-toggle:hover { background: var(--accent-soft); color: var(--accent); }

.user-box {
    display: flex; align-items: center; gap: 9px;
    padding: 9px 12px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
}
.user-avatar {
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--accent); color: var(--accent-ink);
    display: grid; place-items: center;
    font-size: .78rem; font-weight: 600;
}
.user-name { font-size: .85rem; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logout-link { color: var(--text-soft); text-decoration: none; font-size: 1rem; }
.logout-link:hover { color: var(--down); }

/* ---- Main ---- */
.main { flex: 1; padding: 26px 30px 70px; position: relative; min-width: 0; }

.topbar {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 16px; flex-wrap: wrap; margin-bottom: 22px;
}
.topbar h1 { margin: 0; font-size: 1.45rem; font-weight: 650; }
.sub { margin: 5px 0 0; color: var(--text-soft); font-size: .85rem; }

.btn-primary {
    background: var(--accent); color: var(--accent-ink);
    border: none; padding: 9px 16px; border-radius: 10px;
    cursor: pointer; font-size: .88rem; font-family: inherit;
    transition: filter .15s ease;
}
.btn-primary:hover { filter: brightness(1.08); }

/* ---- Cards ---- */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px; margin-bottom: 20px;
}
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    box-shadow: var(--shadow);
}
.card-label { color: var(--text-soft); font-size: .8rem; margin-bottom: 7px; }
.card-value { font-size: 1.6rem; font-weight: 650; }
.card-value-sm { font-size: 1.05rem; }
.card-suffix { font-size: .95rem; color: var(--text-soft); font-weight: 400; }

/* ---- Panels ---- */
.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}
.panel-title { margin: 0 0 14px; font-size: 1rem; font-weight: 620; display: flex; align-items: center; gap: 9px; }
.panel-critical { border-inline-start: 3px solid var(--down); }
.panel-watch { border-inline-start: 3px solid var(--mid); }

.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }

.pill {
    width: 22px; height: 22px; border-radius: 7px;
    display: grid; place-items: center; font-size: .7rem; font-weight: 700;
}
.pill-up { background: var(--up-soft); color: var(--up); }
.pill-down { background: var(--down-soft); color: var(--down); }
.pill-mid { background: var(--mid-soft); color: var(--mid); }
.pill-neutral { background: var(--surface-2); color: var(--text-soft); }

/* ---- Movers / action lists ---- */
.movers, .action-list { list-style: none; margin: 0; padding: 0; }
.movers li, .action-list li {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 0; border-bottom: 1px solid var(--border);
    font-size: .9rem;
}
.movers li:last-child, .action-list li:last-child { border-bottom: none; }
.mover-name, .action-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mover-val, .action-val { font-weight: 650; font-size: .9rem; }
.action-gap { color: var(--text-soft); font-size: .8rem; }

.val-up { color: var(--up); }
.val-down { color: var(--down); }
.val-mid { color: var(--mid); }

/* ---- Performance bars ---- */
.perf-list { list-style: none; margin: 0; padding: 0; }
.perf-row { padding: 13px 0; border-bottom: 1px solid var(--border); }
.perf-row:last-child { border-bottom: none; }
.perf-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
.perf-name { font-size: .92rem; font-weight: 550; }
.perf-pct { font-size: .9rem; font-weight: 650; }
.bar-track { height: 7px; background: var(--surface-2); border-radius: 99px; overflow: hidden; border: 1px solid var(--border); }
.bar-fill { height: 100%; border-radius: 99px; transition: width .3s ease; }
.fill-up { background: var(--up); }
.fill-down { background: var(--down); }
.fill-mid { background: var(--mid); }
.perf-meta { margin-top: 6px; color: var(--text-soft); font-size: .78rem; }

/* ---- Tables ---- */
.search-input {
    width: 100%; max-width: 320px;
    padding: 9px 12px; margin-bottom: 14px;
    border: 1px solid var(--border); border-radius: 10px;
    background: var(--surface-2); color: var(--text);
    font-size: .88rem; font-family: inherit;
}
.search-input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }

.table-scroll { overflow-x: auto; border-radius: 10px; }
.data-table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: .88rem; }
.data-table th, .data-table td { padding: 11px 14px; text-align: right; border-bottom: 1px solid var(--border); }
.data-table th { background: var(--surface-2); color: var(--text-soft); font-size: .8rem; font-weight: 600; }
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table tr:last-child td { border-bottom: none; }
.td-name { font-weight: 550; }
.td-msg { color: var(--text-soft); font-size: .8rem; max-width: 320px; }

.empty-state { text-align: center; color: var(--text-soft); padding: 28px; }
.empty-note { color: var(--text-soft); font-size: .85rem; margin: 0; line-height: 1.7; }

/* ---- Login ---- */
.login-wrap {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh; padding: 20px; position: relative;
    background: radial-gradient(circle at 50% 0%, var(--accent-soft), var(--bg) 60%);
}
.login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 36px 34px;
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(24, 28, 40, .1);
    width: 100%; max-width: 370px;
    text-align: center;
}
.login-mark {
    width: 46px; height: 46px; margin: 0 auto 14px;
    border-radius: 13px; background: var(--accent); color: var(--accent-ink);
    display: grid; place-items: center; font-weight: 700; font-size: 1rem;
}
.login-card h1 { font-size: 1.25rem; margin: 0 0 4px; }
.login-card .subtitle { color: var(--text-soft); margin: 0 0 24px; font-size: .86rem; }
.login-card label { display: block; text-align: right; font-size: .8rem; margin: 14px 0 6px; color: var(--text-soft); }
.login-card input {
    width: 100%; padding: 10px 12px;
    border: 1px solid var(--border); border-radius: 10px;
    font-size: .95rem; background: var(--surface-2); color: var(--text);
    font-family: inherit;
}
.login-card input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.login-card button {
    width: 100%; margin-top: 24px; padding: 11px;
    background: var(--accent); color: var(--accent-ink);
    border: none; border-radius: 10px; font-size: .95rem;
    cursor: pointer; font-family: inherit;
}
.login-card button:hover { filter: brightness(1.08); }

/* ---- Watermark + tagline ---- */
.watermark {
    position: absolute; bottom: 16px; inset-inline-end: 22px;
    font-size: .8rem; letter-spacing: 2px; font-weight: 600;
    color: var(--text-soft); opacity: .35; pointer-events: none; user-select: none;
}
.tagline {
    position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
    font-size: .8rem; letter-spacing: 1.5px; font-weight: 600;
    color: var(--text-soft); opacity: .4; pointer-events: none; user-select: none;
}
.watermark-login, .tagline-login { position: fixed; }

/* ---- Flash ---- */
.flash-container {
    position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
    z-index: 100; width: 100%; max-width: 420px; padding: 0 16px;
}
.flash {
    padding: 11px 16px; border-radius: 10px; margin-bottom: 8px;
    font-size: .87rem; box-shadow: 0 6px 20px rgba(0,0,0,.14);
}
.flash-success { background: var(--up-soft); color: var(--up); }
.flash-error { background: var(--down-soft); color: var(--down); }

/* ---- Responsive ---- */
@media (max-width: 860px) {
    .shell { flex-direction: column; }
    .sidebar { width: 100%; height: auto; position: static; border-inline-start: none; border-bottom: 1px solid var(--border); }
    .nav { flex-direction: row; overflow-x: auto; }
    .nav-item { white-space: nowrap; }
    .sidebar-foot { flex-direction: row; margin-top: 12px; }
    .main { padding: 20px 16px 70px; }
}

/* ---- Alert banner ---- */
.alert-banner {
    display: flex; align-items: center; gap: 14px;
    background: var(--down-soft); border: 1px solid var(--down);
    border-radius: var(--radius); padding: 14px 18px; margin-bottom: 18px;
}
.alert-icon { font-size: 1.3rem; color: var(--down); }
.alert-banner strong { color: var(--down); font-size: .95rem; }
.alert-banner p { margin: 3px 0 0; font-size: .82rem; color: var(--text-soft); }
.alert-cta {
    margin-inline-start: auto; white-space: nowrap;
    background: var(--down); color: #fff; text-decoration: none;
    padding: 8px 14px; border-radius: 9px; font-size: .83rem;
}

/* ---- Card variants ---- */
.card-foot { margin-top: 6px; font-size: .74rem; color: var(--text-soft); line-height: 1.5; }
.card-accent { border-inline-start: 3px solid var(--accent); }
.card-warn   { border-inline-start: 3px solid var(--mid); }
.card-danger { border-inline-start: 3px solid var(--down); }

/* ---- Links ---- */
.link { color: var(--accent); text-decoration: none; }
.link:hover { text-decoration: underline; }
.muted { color: var(--text-soft); font-size: .85em; }

/* ---- Movers with subtext ---- */
.mover-sub { color: var(--text-soft); font-size: .78rem; white-space: nowrap; }

/* ---- Score chip ---- */
.score-chip {
    display: inline-block; min-width: 34px; text-align: center;
    padding: 3px 8px; border-radius: 7px; font-size: .8rem; font-weight: 650;
}
.chip-up { background: var(--up-soft); color: var(--up); }
.chip-mid { background: var(--mid-soft); color: var(--mid); }
.chip-down { background: var(--down-soft); color: var(--down); }

.mini-tag {
    display: inline-block; padding: 2px 7px; border-radius: 6px;
    font-size: .72rem; margin-inline-end: 4px; white-space: nowrap;
}
.tag-warn { background: var(--mid-soft); color: var(--mid); }
.tag-danger { background: var(--down-soft); color: var(--down); }

.count-badge {
    background: var(--surface-2); border: 1px solid var(--border);
    color: var(--text-soft); padding: 1px 8px; border-radius: 99px;
    font-size: .74rem; font-weight: 600; margin-inline-start: 6px;
}

/* ---- Issues ---- */
.issue {
    border: 1px solid var(--border); border-radius: 11px;
    padding: 13px 15px; margin-bottom: 10px; background: var(--surface-2);
}
.issue:last-child { margin-bottom: 0; }
.issue-critical { border-inline-start: 3px solid var(--down); }
.issue-warning  { border-inline-start: 3px solid var(--mid); }
.issue-info     { border-inline-start: 3px solid var(--text-soft); }

.issue-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 7px; }
.issue-head strong { font-size: .92rem; }
.issue-agency {
    font-size: .78rem; font-weight: 650;
    background: var(--accent-soft); padding: 2px 9px; border-radius: 6px;
}
.sev-tag { font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.sev-critical { background: var(--down-soft); color: var(--down); }
.sev-warning  { background: var(--mid-soft); color: var(--mid); }
.sev-info     { background: var(--surface); color: var(--text-soft); border: 1px solid var(--border); }

.issue-detail { margin: 0 0 7px; font-size: .84rem; color: var(--text-soft); line-height: 1.75; }
.issue-action {
    margin: 0; font-size: .85rem; line-height: 1.7;
    background: var(--surface); border-radius: 8px; padding: 9px 12px;
    border: 1px dashed var(--border);
}
.action-arrow { color: var(--accent); font-weight: 700; margin-inline-end: 5px; }

/* ---- Agency chips ---- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.agency-chip {
    display: inline-flex; align-items: center; gap: 7px;
    background: var(--surface-2); border: 1px solid var(--border);
    padding: 7px 13px; border-radius: 99px;
    text-decoration: none; color: var(--text); font-size: .85rem;
    transition: border-color .15s ease;
}
.agency-chip:hover { border-color: var(--accent); }
.chip-count {
    background: var(--down-soft); color: var(--down);
    padding: 0 7px; border-radius: 99px; font-size: .73rem; font-weight: 700;
}

/* ---- Coverage list ---- */
.coverage-list { list-style: none; margin: 0; padding: 0; }
.coverage-list li {
    display: flex; justify-content: space-between; align-items: center; gap: 14px;
    padding: 10px 0; border-bottom: 1px solid var(--border); font-size: .87rem;
}
.coverage-list li:last-child { border-bottom: none; }
.coverage-list span { color: var(--text-soft); }
.coverage-list strong { font-weight: 600; text-align: left; }

/* ---- Language switcher ---- */
.lang-row { display: flex; gap: 5px; }
.lang-btn {
    flex: 1; text-align: center; padding: 6px 4px;
    border: 1px solid var(--border); border-radius: 8px;
    background: var(--surface-2); color: var(--text-soft);
    text-decoration: none; font-size: .74rem; font-weight: 700; letter-spacing: .5px;
    transition: all .15s ease;
}
.lang-btn:hover { border-color: var(--accent); color: var(--accent); }
.lang-btn.is-active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.login-lang { position: fixed; top: 18px; inset-inline-end: 18px; display: flex; gap: 6px; }
.login-lang .lang-btn { min-width: 42px; }

/* ---- Nav badge + tour button ---- */
.nav-badge {
    margin-inline-start: auto; background: var(--down); color: #fff;
    font-size: .68rem; font-weight: 700; padding: 1px 7px; border-radius: 99px;
}
.tour-btn {
    display: flex; align-items: center; gap: 8px; width: 100%;
    padding: 9px 12px; border: 1px dashed var(--border); background: transparent;
    color: var(--text-soft); border-radius: 10px; cursor: pointer;
    font-size: .84rem; font-family: inherit;
}
.tour-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ---- Guided tour ---- */
.tour-overlay {
    position: fixed; inset: 0; z-index: 400;
    background: rgba(12, 14, 20, .62);
    display: grid; place-items: center; padding: 20px;
    backdrop-filter: blur(2px);
}
.tour-overlay[hidden] { display: none; }
.tour-card {
    background: var(--surface); border-radius: 18px; padding: 28px 30px;
    max-width: 440px; width: 100%; box-shadow: 0 24px 60px rgba(0,0,0,.35);
    border: 1px solid var(--border);
}
.tour-step-count { font-size: .74rem; color: var(--text-soft); margin-bottom: 8px; letter-spacing: 1px; }
.tour-card h3 { margin: 0 0 9px; font-size: 1.15rem; }
.tour-card p { margin: 0 0 18px; color: var(--text-soft); font-size: .88rem; line-height: 1.75; }
.tour-dots { display: flex; gap: 6px; margin-bottom: 18px; }
.tour-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--border); }
.tour-dot.is-on { background: var(--accent); width: 20px; border-radius: 99px; }
.tour-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.tour-nav-btns { display: flex; gap: 8px; }
.tour-skip {
    background: none; border: none; color: var(--text-soft);
    cursor: pointer; font-size: .84rem; font-family: inherit;
}
.btn-ghost {
    background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
    padding: 8px 15px; border-radius: 9px; cursor: pointer;
    font-size: .85rem; font-family: inherit;
}
.tour-spotlight {
    position: relative; z-index: 401;
    box-shadow: 0 0 0 3px var(--accent), 0 0 0 9999px rgba(12,14,20,.62);
    border-radius: 12px;
}

/* ---- Forms ---- */
.new-form summary {
    cursor: pointer; font-weight: 600; font-size: .92rem;
    padding: 4px 0; list-style: none; color: var(--accent);
}
.new-form summary::-webkit-details-marker { display: none; }
.stack-form { margin-top: 16px; display: flex; flex-direction: column; gap: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.form-row label, .form-grid label {
    display: flex; flex-direction: column; gap: 6px;
    font-size: .8rem; color: var(--text-soft);
}
.stack-form input[type=text], .stack-form input[type=date],
.stack-form select, .stack-form textarea {
    padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px;
    background: var(--surface-2); color: var(--text);
    font-size: .88rem; font-family: inherit; width: 100%;
}
.stack-form textarea { resize: vertical; }
.stack-form input:focus, .stack-form select:focus, .stack-form textarea:focus {
    outline: 2px solid var(--accent-soft); border-color: var(--accent);
}
.stack-form .btn-primary { align-self: flex-start; }

.btn-mini {
    background: var(--surface); border: 1px solid var(--border); color: var(--text-soft);
    padding: 5px 11px; border-radius: 8px; cursor: pointer;
    font-size: .76rem; font-family: inherit;
}
.btn-mini:hover { border-color: var(--accent); color: var(--accent); }
.inline-ticket { margin-top: 9px; }
.inline-input {
    padding: 5px 10px; border: 1px solid var(--border); border-radius: 8px;
    background: var(--surface-2); color: var(--text); font-size: .78rem;
    font-family: inherit; min-width: 180px;
}

/* ---- Filter tabs ---- */
.filter-row { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-tab {
    padding: 7px 13px; border-radius: 99px; text-decoration: none;
    border: 1px solid var(--border); background: var(--surface-2);
    color: var(--text-soft); font-size: .83rem;
}
.filter-tab.is-active { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }

/* ---- Tickets ---- */
.ticket-list { list-style: none; margin: 0; padding: 0; }
.ticket-row {
    display: flex; align-items: flex-start; gap: 14px;
    padding: 13px 14px; border: 1px solid var(--border);
    border-radius: 11px; margin-bottom: 9px; background: var(--surface-2);
}
.prio-high { border-inline-start: 3px solid var(--down); }
.prio-medium { border-inline-start: 3px solid var(--mid); }
.prio-low { border-inline-start: 3px solid var(--border); }
.ticket-main { flex: 1; min-width: 0; }
.ticket-title { font-size: .92rem; font-weight: 600; }
.ticket-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 7px; font-size: .78rem; }
.ticket-date { font-size: .76rem; white-space: nowrap; }

.status-chip { padding: 2px 9px; border-radius: 6px; font-size: .72rem; font-weight: 600; }
.st-open { background: var(--accent-soft); color: var(--accent); }
.st-progress { background: var(--mid-soft); color: var(--mid); }
.st-blocked { background: var(--down-soft); color: var(--down); }
.st-done { background: var(--up-soft); color: var(--up); }
.st-investigating { background: var(--mid-soft); color: var(--mid); }
.st-resolved { background: var(--up-soft); color: var(--up); }

.prio-chip { padding: 2px 8px; border-radius: 6px; font-size: .72rem; font-weight: 600; }
.pr-high { background: var(--down-soft); color: var(--down); }
.pr-medium { background: var(--mid-soft); color: var(--mid); }
.pr-low { background: var(--surface); color: var(--text-soft); border: 1px solid var(--border); }

/* ---- Comments ---- */
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment { padding: 12px 0; border-bottom: 1px solid var(--border); }
.comment:last-child { border-bottom: none; }
.comment-head { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; font-size: .82rem; }
.comment p { margin: 0; font-size: .87rem; line-height: 1.7; white-space: pre-wrap; }
.user-avatar.sm { width: 22px; height: 22px; font-size: .7rem; }

/* ---- Incidents ---- */
.issue-foot {
    display: flex; justify-content: space-between; align-items: center;
    gap: 12px; margin-top: 10px; flex-wrap: wrap; font-size: .78rem;
}
.resolve-form { display: flex; gap: 7px; align-items: center; }

/* ---- Reports ---- */
.report-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.report-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 22px; text-decoration: none;
    color: var(--text); box-shadow: var(--shadow);
    display: flex; flex-direction: column; gap: 9px;
    transition: border-color .15s ease, transform .15s ease;
}
.report-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.report-icon {
    width: 40px; height: 40px; border-radius: 11px;
    background: var(--accent-soft); color: var(--accent);
    display: grid; place-items: center; font-size: 1.15rem;
}
.report-card h3 { margin: 0; font-size: 1rem; }
.report-card p { margin: 0; font-size: .82rem; color: var(--text-soft); line-height: 1.7; flex: 1; }
.report-foot { display: flex; justify-content: space-between; align-items: center; font-size: .8rem; margin-top: 4px; }
.hidden-text { position: absolute; left: -9999px; opacity: 0; height: 1px; width: 1px; }

/* date labels on every data section */
.date-strip{display:flex;flex-wrap:wrap;gap:8px;margin:-4px 0 16px}
.dchip{font-size:.78rem;padding:6px 12px;border-radius:30px;background:var(--surface);border:1px solid var(--border);color:var(--text-soft)}
.dchip b{color:var(--text)}
.dchip-cur{background:var(--accent-soft);border-color:transparent;color:var(--accent)}
.dchip-cur b{color:var(--accent)}
.sec-date{display:inline-block;font-size:.72rem;font-weight:600;padding:3px 9px;border-radius:20px;background:var(--surface-2);color:var(--text-soft);margin-inline-start:8px;vertical-align:middle}

/* ---- Projects (Soulchill / Ammar) ---- */
.project-pick {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 12px; padding: 4px; margin: 0 0 6px;
}
.project-opt {
    position: relative; margin: 0 !important; padding: 9px 6px; text-align: center !important;
    border-radius: 9px; cursor: pointer; font-size: .88rem !important; font-weight: 600;
    color: var(--text-soft) !important; transition: background .15s, color .15s;
}
.project-opt input { position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0; }
.project-opt.is-on { background: var(--accent); color: var(--accent-ink) !important; }
.project-opt:not(.is-on):hover { background: var(--accent-soft); color: var(--text) !important; }
.project-opt:focus-within { outline: 2px solid var(--accent-soft); }

.project-badge {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    margin: 0 14px 10px; padding: 7px 10px; border-radius: 10px;
    background: var(--accent-soft); font-size: .8rem;
}
.project-name { font-weight: 700; color: var(--accent); letter-spacing: .3px; }
.project-switch { display: flex; gap: 6px; }
.project-switch form { margin: 0; }
.project-switch button {
    background: transparent; border: 1px solid var(--border); color: var(--text-soft);
    border-radius: 8px; padding: 3px 8px; font-size: .75rem; cursor: pointer; font-family: inherit;
}
.project-switch button:hover { color: var(--accent); border-color: var(--accent); }

/* ---- Sidebar user (links to the profile page, shows the photo) ---- */
.user-link { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; color: inherit; text-decoration: none; border-radius: 8px; }
.user-link:hover .user-name, .user-link.is-active .user-name { color: var(--accent); }
.user-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.user-avatar { overflow: hidden; flex-shrink: 0; }
.user-avatar:not(.has-img) {
    background: linear-gradient(135deg, hsl(var(--h, 255) 62% 58%), hsl(calc(var(--h, 255) + 38) 62% 44%));
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
