@font-face {
  font-family: Sonko;
  src: url("/fonts/sonko-regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Sonko;
  src: url("/fonts/sonko-medium.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Sonko;
  src: url("/fonts/sonko-bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
:root {
  color-scheme: light;
  --page: #f1f1ef;
  --panel: #fdfdfc;
  --soft: #eeefec;
  --ink: #1f2220;
  --mute: #5c625e;
  --line: #d8dcd7;
  --rule: #bbbbba;
  --primary: #212522;
  --on-primary: #fafbf8;
  --accent: #e5ebe4;
  --on-accent: #25392c;
  --focus: #4a7562;
  --green: #e4eee6;
  --green-text: #2b5940;
  --yellow: #f5ebd9;
  --yellow-text: #735119;
  --red: #f5e7e4;
  --red-text: #923d35;
  --sidebar: #222523;
  --sidebar-text: #f2f3ee;
  --sidebar-muted: #b7bdb5;
  --sidebar-line: #414741;
  --sidebar-active: #353d37;
  --shadow: 0 20px 70px #171e1a25;
  font: 16px/1.45 "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
}
:root[data-font="sonko"] {
  font-family: Sonko, "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
}
:root[data-font="sonko"] h1 { letter-spacing: -.018em; line-height: 1.16; }
:root[data-font="sonko"] :is(h2, .metric-value, .contact-clock strong) { letter-spacing: -.014em; }
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #191c1a;
  --panel: #222623;
  --soft: #292e2a;
  --ink: #f0f2ed;
  --mute: #abb5ad;
  --line: #3a433c;
  --rule: #606962;
  --primary: #e8ede7;
  --on-primary: #252b25;
  --accent: #2c4035;
  --on-accent: #d1eadb;
  --focus: #a4cbb6;
  --green: #2a3d32;
  --green-text: #a9d8b8;
  --yellow: #403624;
  --yellow-text: #eac28a;
  --red: #422e2a;
  --red-text: #f0aba2;
  --sidebar: #151815;
  --sidebar-text: #eff2ed;
  --sidebar-muted: #a5b0a7;
  --sidebar-line: #343d35;
  --sidebar-active: #2a342c;
  --shadow: 0 18px 55px #0006;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--page); }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
:where(button, a, input, select, textarea, summary):focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
button:disabled, [aria-disabled="true"] { opacity: .53; cursor: default; }
.icon { width: 1.16rem; height: 1.16rem; flex: none; vertical-align: middle; }
.muted { color: var(--mute); }
.small { font-size: .82rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.loading { padding: 2rem; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.85rem, 4vw, 3rem); line-height: 1.06; letter-spacing: -.06em; font-weight: 690; overflow-wrap: anywhere; }
h2 { font-size: 1.16rem; line-height: 1.25; letter-spacing: -.026em; font-weight: 690; }
h3 { font-size: .96rem; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 11.6rem minmax(0, 1fr); align-items: start; }
.sidebar { position: sticky; top: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--sidebar); color: var(--sidebar-text); }
.brand { display: flex; align-items: center; }
.sidebar .brand { margin: 1.44rem 1.02rem .88rem; padding: .38rem 0 1rem; border-bottom: 1px solid var(--sidebar-line); }
.brand-name { font-size: 1.04rem; font-weight: 700; letter-spacing: -.025em; white-space: nowrap; text-decoration: none; }
a.brand-name:hover { text-decoration: underline; text-underline-offset: .22em; }
.nav { display: grid; gap: .22rem; padding: 0 .7rem; }
.nav a, .sidebar .logout { display: flex; align-items: center; gap: .7rem; min-height: 2.6rem; padding: .5rem .7rem; border-radius: .35rem; text-decoration: none; font-size: .94rem; font-weight: 550; text-align: left; color: var(--sidebar-muted); }
.nav a:hover, .sidebar .logout:hover { background: var(--sidebar-active); color: var(--sidebar-text); }
.nav a[aria-current="page"] { background: var(--sidebar-active); color: var(--sidebar-text); font-weight: 650; box-shadow: inset 2px 0 var(--sidebar-text); }
.sidebar-footer { margin: auto 1.02rem .8rem; padding-top: .5rem; border-top: 1px solid var(--sidebar-line); }
.sidebar .logout { width: 100%; border: 0; background: transparent; }
.theme { display: inline-flex; align-items: center; gap: .12rem; border: 1px solid var(--line); background: var(--soft); border-radius: .4rem; padding: .15rem; flex: none; }
.theme button { display: grid; place-items: center; border: 1px solid transparent; border-radius: .23rem; width: 1.94rem; height: 1.92rem; color: var(--mute); background: transparent; }
.theme button[aria-pressed="true"] { background: var(--panel); color: var(--ink); border-color: var(--line); }
.theme button .icon { height: 1rem; width: 1rem; }
.content { min-width: 0; width: min(100%, 110rem); margin: 0 auto; padding: 2.12rem clamp(1rem, 3vw, 3.1rem) 2rem; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: .95rem 1.2rem; margin-bottom: 1.55rem; flex-wrap: wrap; }
.page-heading { min-width: 0; }
.page-tools { display: flex; align-items: center; flex-wrap: wrap; gap: .74rem; margin-left: auto; }
.page-sub { margin-top: .4rem; color: var(--mute); font-size: .93rem; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-block: 1px solid var(--rule); margin-bottom: 1.5rem; }
.metric { min-width: 0; text-align: left; display: grid; gap: .3rem; padding: .78rem .93rem .72rem; border: 0; background: transparent; color: var(--ink); }
.metric + .metric { border-left: 1px solid var(--line); }
.metric:hover, .metric[aria-pressed="true"] { background: var(--panel); }
.metric[aria-pressed="true"] { box-shadow: inset 0 -2px var(--ink); }
.metric:focus-visible { z-index: 1; }
.metric-name { font-size: .88rem; color: var(--mute); font-weight: 560; }
.metric-value { font-size: 1.95rem; line-height: 1; font-weight: 660; font-variant-numeric: tabular-nums; letter-spacing: -.055em; }
.metric[data-attention="true"] .metric-value { color: var(--red-text); }
.panel, .table-panel, .empty, .file-summary { background: var(--panel); border: 1px solid var(--line); border-radius: .48rem; }
.row { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .44rem; min-height: 2.43rem; padding: .48rem .72rem; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: .35rem; font-size: .9rem; font-weight: 625; line-height: 1.2; text-decoration: none; white-space: nowrap; }
.btn:hover:not(:disabled) { background: var(--soft); }
.btn.primary { color: var(--on-primary); background: var(--primary); border-color: var(--primary); }
.btn.primary:hover:not(:disabled) { opacity: .86; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.icon-only { padding: .45rem; min-width: 2.45rem; }
.field { display: grid; align-content: start; gap: .3rem; font-size: .89rem; font-weight: 620; }
input:not([type="checkbox"]), select, textarea { min-height: 2.42rem; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: .35rem; padding: .44rem .59rem; width: 100%; min-width: 0; font-size: .93rem; }
textarea { resize: vertical; min-height: 5.3rem; }
select { appearance: none; padding-right: 1.85rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%23758197' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-size: 1rem; background-position: right .47rem center; }
input[type="checkbox"] { width: 1rem; height: 1rem; margin: 0; accent-color: var(--focus); vertical-align: middle; }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: .48rem; margin-bottom: .76rem; }
.search { flex: 1 1 16rem; position: relative; }
.search .icon { position: absolute; left: .61rem; top: .65rem; color: var(--mute); }
.search input { padding-left: 2.12rem; text-overflow: ellipsis; }
.search input::placeholder { color: var(--mute); opacity: 1; }
.has-filters { background: var(--accent); color: var(--on-accent); border-color: var(--focus); }
.filter-panel, .bulk { margin: .55rem 0 .7rem; padding: .65rem .75rem; }
.filter-panel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: end; gap: .65rem; }
.bulk { display: flex; align-items: center; gap: .54rem; flex-wrap: wrap; background: var(--accent); color: var(--on-accent); border-left: 2px solid var(--focus); border-radius: .3rem; font-size: .91rem; }
.table-panel { overflow: hidden; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .9rem; }
th { background: var(--soft); color: var(--mute); font-weight: 650; white-space: nowrap; }
th, td { padding: .6rem .7rem; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
th button { background: transparent; border: 0; color: inherit; padding: 0; display: inline-flex; align-items: center; gap: .31rem; font: inherit; }
th .icon { width: .92rem; height: .92rem; color: var(--mute); }
.client-grid th[aria-sort] { color: var(--ink); }
.client-grid th:not([aria-sort]) .icon { opacity: .45; }
.client-grid th button:is(:hover, :focus-visible) .icon { opacity: 1; }
.client-grid th:first-child { width: 2.65rem; }
.client-grid td[data-cell="name"] { min-width: 9.5rem; }
.client-grid td[data-cell="region"] { min-width: 7rem; }
.client-grid :where(td[data-cell="region"], td[data-cell="city"]) { color: var(--mute); }
td:first-child, th:first-child { padding-left: .93rem; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--page); }
tbody tr.selected { background: var(--accent); }
.table-name { font-weight: 665; text-decoration: none; }
.table-name:hover { text-decoration: underline; text-underline-offset: .17em; }
.nowrap { white-space: nowrap; }
.time, .phone-value, .task-deadline { font-variant-numeric: tabular-nums; }
.time { font-weight: 660; }
.task-deadline[data-due="late"], .task-count[data-tone="late"] { color: var(--red-text); }
.status-label { display: inline-flex; align-items: center; gap: .48rem; white-space: nowrap; font-size: .87rem; font-weight: 570; }
.status-label::before { content: ""; width: .38rem; height: .38rem; border-radius: 50%; background: var(--mute); flex: none; }
.status-label[data-tone="new"]::before { background: var(--ink); }
.status-label[data-tone="good"]::before { background: var(--green-text); }
.status-label[data-tone="warn"]::before { background: var(--yellow-text); }
.status-label[data-tone="late"]::before { background: var(--red-text); }
.pill { display: inline-flex; align-items: center; gap: .3rem; padding: .17rem .42rem; border-radius: .25rem; font-weight: 630; font-size: .84rem; white-space: nowrap; background: var(--soft); }
.pill[data-tone="new"] { color: var(--on-accent); background: var(--accent); }
.pill[data-tone="good"] { color: var(--green-text); background: var(--green); }
.pill[data-tone="warn"] { color: var(--yellow-text); background: var(--yellow); }
.pill[data-tone="late"] { color: var(--red-text); background: var(--red); }
.pagination { min-height: 3.1rem; padding: .45rem .7rem; display: flex; justify-content: space-between; gap: .75rem; align-items: center; border-top: 1px solid var(--line); color: var(--mute); font-size: .85rem; }
.empty { display: grid; justify-items: start; padding: 1.6rem 1.23rem; gap: .45rem; }
.empty-icon { width: 2.3rem; height: 2.3rem; display: grid; place-items: center; border: 1px solid var(--line); border-radius: .33rem; color: var(--mute); margin-bottom: .2rem; }
.empty .btn { margin-top: .2rem; }
.panel { padding: 1.05rem 1.13rem; min-width: 0; }
.panel h2 { margin-bottom: .75rem; }
.columns { display: grid; gap: .45rem; }
.column-row { display: flex; justify-content: space-between; align-items: center; gap: .55rem; min-width: 0; padding: .35rem 0; border-bottom: 1px solid var(--line); }
.column-row label { display: flex; align-items: center; gap: .6rem; }
.column-row button { min-height: 2rem; min-width: 2rem; }
.contact-top { display: flex; justify-content: space-between; align-items: center; gap: .7rem; margin-bottom: 1rem; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; color: var(--mute); font-size: .88rem; }
.breadcrumbs a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.contact-head { display: flex; align-items: center; justify-content: space-between; gap: .7rem 1rem; flex-wrap: wrap; }
.contact-title { display: grid; gap: .65rem; min-width: 0; }
.contact-title select { width: auto; justify-self: start; max-width: 100%; }
.contact-clock { display: grid; gap: .2rem; padding: .4rem 0 .4rem .86rem; border-left: 1px solid var(--rule); }
.contact-clock strong { display: block; font-size: 1.95rem; line-height: 1; letter-spacing: -.048em; }
.contact-actions { border-bottom: 1px solid var(--rule); padding: 1rem 0; margin-bottom: 1rem; }
.contact-grid { display: grid; grid-template-columns: minmax(15rem, 1fr) minmax(0, 1.7fr); gap: .9rem; align-items: start; }
.stack { display: grid; gap: .85rem; align-content: start; }
.details { margin: 0; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: .55rem .6rem; font-size: .91rem; }
.details dt { color: var(--mute); }
.details dd { margin: 0; overflow-wrap: anywhere; }
.timeline { display: grid; list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; display: grid; grid-template-columns: 1.7rem minmax(0, 1fr); align-items: start; gap: .66rem; padding: .6rem 0; border-top: 1px solid var(--line); }
.timeline-icon { display: grid; place-items: center; width: 1.7rem; height: 1.7rem; color: var(--mute); }
.timeline-icon .icon { width: .94rem; height: .94rem; }
.timeline-entry { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .18rem .6rem; }
.timeline-entry p { grid-column: 1 / -1; }
.timeline li p, .task-description { overflow-wrap: anywhere; white-space: pre-wrap; }
.timeline li p { font-size: .9rem; }
.task-callout { background: var(--accent); color: var(--on-accent); border-left: 2px solid var(--focus); border-radius: .3rem; padding: .66rem; }
.task-groups { display: grid; gap: .85rem; }
.task-group { display: grid; grid-template-columns: minmax(8.7rem, 1fr) minmax(0, 4fr); align-items: start; gap: .6rem 1rem; }
.task-group h2 { margin: 0; }
.task-count { font-size: .88rem; font-weight: 580; color: var(--mute); font-variant-numeric: tabular-nums; }
.task-list { list-style: none; margin: 0; padding: 0; }
.task-list li { display: flex; align-items: center; justify-content: space-between; gap: .7rem; flex-wrap: wrap; padding: .65rem 0; }
.task-list li:first-child { padding-top: 0; }
.task-list li + li { border-top: 1px solid var(--line); }
.task-list time { display: block; color: var(--mute); font-size: .89rem; }
.task-list .task-description { color: var(--mute); font-size: .9rem; margin: .14rem 0; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; list-style: none; padding: 0; margin: 0 0 1.35rem; }
.steps li { display: flex; align-items: center; gap: .48rem; border-top: 1px solid var(--rule); padding-top: .56rem; font-size: .88rem; color: var(--mute); }
.steps li span { flex: none; font-size: .82rem; font-variant-numeric: tabular-nums; }
.steps li[aria-current] { color: var(--ink); font-weight: 690; border-color: var(--ink); box-shadow: inset 0 1px var(--ink); }
.file-summary { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; padding: .65rem .8rem; margin-bottom: .8rem; }
.file-summary strong { overflow-wrap: anywhere; }
.import-grid { display: grid; grid-template-columns: minmax(15rem, .9fr) minmax(0, 1.35fr); gap: .85rem; align-items: start; }
.mapping { display: grid; gap: .35rem; }
.mapping-row { display: grid; grid-template-columns: minmax(7rem, 1fr) minmax(0, 1.15fr); gap: .5rem; align-items: center; font-size: .89rem; }
.mapping-row select { font-size: .87rem; }
.import-actions { justify-content: space-between; margin-top: .85rem; }
.import-actions .row { margin-left: auto; }
.drop { text-align: center; padding: 2.35rem .85rem; border: 1px dashed var(--rule); border-radius: .45rem; background: var(--panel); display: grid; justify-items: center; gap: .55rem; }
.drop[data-drag="true"] { border-color: var(--focus); background: var(--accent); }
.checkline { display: flex; align-items: center; gap: .52rem; font-size: .91rem; }
.duplicate { margin-top: .65rem; border: 1px solid var(--line); border-radius: .55rem; padding: .65rem; display: grid; gap: .4rem; font-size: .88rem; }
.notice, .error { padding: .62rem .72rem; border-radius: .49rem; font-size: .9rem; }
.notice { background: var(--yellow); color: var(--yellow-text); }
.error { background: var(--red); color: var(--red-text); }
.form-status:empty { display: none; }
#modal { width: min(30rem, calc(100% - 1.5rem)); max-height: calc(100% - 1.5rem); overflow: auto; padding: 0; border: 1px solid var(--line); border-radius: .78rem; color: var(--ink); background: var(--panel); box-shadow: var(--shadow); }
#modal::backdrop { background: #1015207a; }
.dialog-content { padding: 1rem; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .7rem; }
.dialog-actions { justify-content: flex-end; }
#toasts { position: fixed; bottom: .85rem; right: .85rem; display: grid; gap: .48rem; z-index: 20; width: min(calc(100vw - 1.7rem), 24rem); }
.toast { padding: .65rem .72rem; border: 1px solid var(--line); border-radius: .55rem; box-shadow: var(--shadow); background: var(--panel); color: var(--ink); font-size: .88rem; overflow-wrap: anywhere; }
.toast a { display: inline-block; margin-left: .3rem; font-weight: 700; }
.toast[data-error="true"] { color: var(--red-text); }
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.login-card { width: min(100%, 28rem); padding: 1.5rem; border-top: 3px solid var(--ink); gap: 1.2rem; }
.login-card h1 { font-size: clamp(1.85rem, 5vw, 2.45rem); }
.login-top { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: no-preference) {
  .btn, .nav a, .theme button, .metric { transition: background-color 140ms ease, color 140ms ease; }
  #modal[open], .toast { animation: appear 150ms ease-out; }
  @keyframes appear { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
}
@media (max-width: 1060px) {
  .shell { grid-template-columns: 9.5rem minmax(0, 1fr); }
  .sidebar .brand-name { font-size: .83rem; }
  .metric { padding-inline: .62rem; }
}
@media (max-width: 720px) {
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .sidebar { position: static; min-height: auto; border-bottom: 1px solid var(--sidebar-line); flex-direction: row; align-items: center; flex-wrap: wrap; }
  .sidebar .brand { margin: .2rem .35rem .2rem .65rem; padding: 0; border: 0; }
  .sidebar .brand-name { font-size: .9rem; }
  .nav { display: flex; flex-wrap: wrap; gap: .16rem; padding: .25rem; }
  .nav a, .sidebar .logout { gap: .25rem; padding-inline: .44rem; font-size: .86rem; }
  .nav .icon, .logout .icon { display: none; }
  .sidebar-footer { margin: 0 .4rem 0 auto; border: 0; padding: 0; }
  .content { padding: 1rem .72rem 1.75rem; }
  .page-head { margin-bottom: .9rem; }
  .page-tools { gap: .45rem; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 1rem; }
  .metric:nth-child(3) { border-left: 0; }
  .metric:nth-child(n+3) { border-top: 1px solid var(--line); }
  .metric-value { font-size: 1.65rem; }
  .contact-grid, .import-grid, .task-group { grid-template-columns: minmax(0, 1fr); }
  .filter-panel { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 425px) {
  .sidebar .brand { margin-block: .44rem; }
  .nav { order: 1; flex-basis: 100%; padding-inline: .5rem; }
}
