@font-face {
    font-family: Inter;
    src: url("../fonts/Inter/Inter-VariableFont_slnt,wght.ttf") format("truetype");
    font-weight: 100 900;
    font-display: swap;
}
:root {
    color-scheme: light;
    --bg: #eef2f8;
    --surface: #fbfcff;
    --raised: #edf2fa;
    --ink: #14213c;
    --muted: #52627e;
    --border: #dce4f0;
    --accent: #4f46e5;
    --accent-soft: #ebeaff;
    --primary-ink: #fff;
    --danger: #a5223f;
    --success: #137451;
    --warning: #895300;
    --shadow: 0 18px 55px #1b315119;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #192337;
    --surface: #222e45;
    --raised: #202b41;
    --ink: #ecf1fe;
    --muted: #a8b6d0;
    --border: #31405a;
    --accent: #a6a2ff;
    --accent-soft: #343565;
    --primary-ink: #101b35;
    --danger: #ff9db1;
    --success: #70d9b2;
    --warning: #ffc66b;
    --shadow: 0 18px 55px #0005;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--bg); line-height: 1.55; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
a { color: var(--accent); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.055em; line-height: 1.1; }
h2 { font-size: 1.15rem; letter-spacing: -.02em; }
small { font-size: .82rem; }
.muted, small { color: var(--muted); }
.eyebrow { color: var(--accent); font-size: .875rem; font-weight: 700; margin-bottom: .45rem; }
.primary, .secondary {
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
    cursor: pointer; text-decoration: none; white-space: nowrap; border: 1px solid var(--border);
    min-height: 42px; padding: .5rem .9rem; border-radius: 9px; line-height: 1.25; font-weight: 650;
}
.primary { color: var(--primary-ink); background: var(--accent); border-color: var(--accent); }
.secondary { color: var(--ink); background: var(--surface); }
.secondary:hover, a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.primary:hover { filter: brightness(.92); }
.compact { min-height: 37px; padding: .3rem .6rem; font-size: .875rem; }
.danger { color: var(--danger); }
.icon { display: inline-block; flex: 0 0 20px; vertical-align: middle; opacity: .8; }
.icon-button { min-width: 42px; padding-inline: .45rem; }
.brand { color: var(--ink); font-size: 1.28rem; letter-spacing: -.06em; font-weight: 800; white-space: nowrap; }
.brand strong { color: var(--accent); }
.topbar {
    display: flex; align-items: center; gap: 1rem; min-height: 68px; padding: .65rem clamp(.8rem, 3vw, 2rem);
    border-bottom: 1px solid var(--border);
}
.topbar-brand { min-width: min(13rem, 35vw); }
.section-label { display: none; color: var(--muted); font-size: .9rem; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: .45rem; }
.avatar { width: 44px; height: 44px; flex: 0 0 44px; object-fit: cover; border-radius: 50%; }
.initials { display: inline-grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 800; }
.shell { max-width: 1520px; padding: clamp(1rem, 3vw, 2.6rem); display: grid; gap: 1.25rem; min-width: 0; }
.page-intro, .section-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: .75rem; }
.page-intro .muted { margin-top: .45rem; }
.section-heading { margin-bottom: .85rem; }
.panel, .metric { background: var(--surface); border: 1px solid var(--border); border-radius: 15px; }
.panel { padding: clamp(.85rem, 2vw, 1.4rem); min-width: 0; }
.panel > h2 { margin-bottom: .85rem; }
.metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(145px, 100%), 1fr)); gap: .7rem; }
.metric { padding: .85rem; min-width: 0; }
.metric p { font-size: .875rem; color: var(--muted); }
.metric strong { display: block; font-size: clamp(1.2rem, 2vw, 1.65rem); letter-spacing: -.035em; }
.metric small { display: block; }
.metric.resolved strong { color: var(--success); }
.metric.daily { background: var(--accent-soft); }
.filters, .filter-bar, .form-grid { display: grid; gap: .65rem; grid-template-columns: repeat(auto-fit, minmax(min(142px, 100%), 1fr)); align-items: end; }
label { display: block; font-size: .9rem; font-weight: 650; }
label > input, label > select, label > textarea, label > .input-action { margin-top: .28rem; }
input, select, textarea {
    display: block; width: 100%; min-width: 0; padding: .48rem .65rem; min-height: 42px; color: var(--ink);
    background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
}
textarea { resize: vertical; }
input::placeholder { color: var(--muted); }
.input-action { display: flex; align-items: center; gap: .35rem; }
[hidden] { display: none !important; }
.badge { color: var(--muted); padding: .23rem .58rem; border-radius: 999px; background: var(--raised); font-weight: 650; }
.badge.resolved { color: var(--success); }
.badge.pending { color: var(--warning); }
.badge.unresolved { color: var(--danger); }
.badge.in_progress { background: var(--accent-soft); color: var(--accent); }
.empty { min-height: 138px; display: grid; place-content: center; justify-items: center; gap: .5rem; color: var(--muted); border: 1px dashed var(--border); border-radius: 12px; }
dialog { width: min(680px, calc(100% - 1.5rem)); max-height: 90dvh; padding: clamp(.85rem, 3vw, 1.5rem); background: var(--surface); color: var(--ink); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
dialog::backdrop { background: #101a30aa; }
.dialog-header { display: flex; justify-content: space-between; align-items: center; gap: .65rem; margin-bottom: .8rem; }
.editor-form { display: grid; gap: .8rem; margin-top: .85rem; }
.editor-form .form-grid { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.form-actions { display: flex; justify-content: end; }
.ticket-details { margin-bottom: 0; }
.ticket-details dt { font-weight: 700; }
.ticket-details dd { margin: .25rem 0 1rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.feedback { padding: .7rem .85rem; border: 1px solid var(--border); border-radius: 8px; background: var(--accent-soft); color: var(--accent); }
.feedback.error { color: var(--danger); background: var(--surface); }
.toast { position: fixed; z-index: 1; bottom: 1rem; right: 1rem; max-width: calc(100vw - 2rem); box-shadow: var(--shadow); }
@media (min-width: 600px) { .section-label { display: inline; } .top-actions { gap: .65rem; } }
@media (max-width: 350px) { .top-actions button span { display: none; } }
select {
    appearance: none;
    padding-right: 1.8rem;
    background: var(--surface) url("../vendor/icons/chevron-down.svg") no-repeat right .55rem center / .9rem;
}

.brand { display: inline-flex; align-items: center; gap: .28em; }
.brand img { width: 1.4em; height: 1.4em; object-fit: contain; margin-right: .15em; }
.icon { text-align: center; font-size: 1rem; }
@font-face {
    font-family: Poppins;
    src: url("../fonts/Poppins/Poppins-SemiBold.ttf") format("truetype");
    font-weight: 600;
    font-display: swap;
}
.brand, .page-intro h1 { font-family: Poppins, Inter, sans-serif; font-weight: 600; }
.panel, .metric {
    background: linear-gradient(145deg, var(--surface), color-mix(in srgb, var(--surface) 80%, var(--raised)));
    box-shadow: 0 3px 10px #18243a12;
}
.metric.daily { background: var(--accent-soft); }
