/* ---- Tactik Hub theme (v1.84): Inter, warm off-white, hairlines, one indigo accent ---- */
@font-face { font-family: "Inter"; src: url("/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  color-scheme: light;
  --bg: #f7f7f5;
  --surface: #ffffff;
  --surface-2: #f3f3f0;
  --border: #e8e7e3;
  --text: #18181b;
  --text-2: #52525b;
  --muted: #8b8b93;
  --accent: #5b5bd6;
  --accent-ink: #ffffff;
  --ink: #18181b;              /* black buttons */
  --ink-text: #ffffff;
  --danger: #e5484d;
  --ok: #16a34a;
  --orange: #f97316;
  --series-1: #2a78d6;   /* Hubstaff */
  --series-2: #eb6834;   /* Creator */
  --series-3: #1baf7a;   /* Outlook */
  --grid: #eeede9;
  --shadow: 0 1px 2px rgba(24,24,27,.04), 0 10px 28px -16px rgba(24,24,27,.14);
  --radius: 16px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f0f11; --surface: #17171a; --surface-2: #1f1f23; --border: #2a2a2f;
    --text: #f4f4f5; --text-2: #b4b4bb; --muted: #7c7c85; --accent: #8b8cf0; --accent-ink: #0f0f11;
    --ink: #f4f4f5; --ink-text: #0f0f11;
    --danger: #f2555a; --ok: #3fcf6e; --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --grid: #232327;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f0f11; --surface: #17171a; --surface-2: #1f1f23; --border: #2a2a2f;
  --text: #f4f4f5; --text-2: #b4b4bb; --muted: #7c7c85; --accent: #8b8cf0; --accent-ink: #0f0f11;
  --ink: #f4f4f5; --ink-text: #0f0f11;
  --danger: #f2555a; --ok: #3fcf6e; --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --grid: #232327;
  --shadow: none;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 "Inter", "Segoe UI", system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
.loading { padding: 40px; color: var(--muted); text-align: center; }

/* ---- header ---- */
header { display: flex; align-items: center; gap: 18px; padding: 0 20px; height: 54px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.brand { flex: none; display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; white-space: nowrap; }
.brand img { width: 24px; height: 24px; }
nav { display: flex; gap: 2px; overflow-x: auto; flex: 1; }
nav a { padding: 8px 12px; border-radius: 6px; color: var(--text-2); text-decoration: none; white-space: nowrap; }
nav a:hover { background: var(--surface-2); }
nav a.on { background: var(--surface-2); color: var(--text); font-weight: 600; }
.usermenu { position: relative; }
.usermenu > button { background: none; border: 1px solid var(--border); border-radius: 18px; padding: 5px 12px; cursor: pointer; white-space: nowrap; }
.usermenu .menu { position: absolute; right: 0; top: 40px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.15); min-width: 190px; padding: 6px; }
.usermenu .menu button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.usermenu .menu button:hover { background: var(--surface-2); }
.usermenu .menu .who { padding: 6px 10px 8px; color: var(--muted); font-size: 12px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }

main { flex: 1; min-width: 0; max-width: 1280px; margin: 0 auto; padding: 20px; }
h1 { font-size: 20px; margin: 0; }
h2 { font-size: 15px; margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

/* ---- controls ---- */
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.bar h1 { margin-right: auto; }
.btn { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 6px 12px; cursor: pointer; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.danger { color: var(--danger); }
.btn:disabled { opacity: .5; cursor: default; }
input[type=text], input[type=password], input[type=date], input[type=email], select, textarea {
  background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 6px 9px; min-height: 34px; }
input:focus, select:focus, .btn:focus-visible, nav a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px; box-shadow: var(--shadow); margin-bottom: 16px; }
.error { color: var(--danger); margin: 8px 0; }
.note { background: var(--surface-2); border-radius: 8px; padding: 10px 12px; color: var(--text-2); margin-bottom: 16px; }

/* ---- login ---- */
.login { max-width: 360px; margin: 10vh auto; }
.login h1 { margin-bottom: 4px; }
.login label { display: block; margin: 12px 0 4px; font-weight: 600; font-size: 13px; }
.login input { width: 100%; }
.login .btn { width: 100%; margin-top: 18px; padding: 9px; }

/* ---- tiles ---- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-bottom: 16px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.tile .lbl { font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.tile .val { font-size: 22px; font-weight: 650; margin-top: 2px; font-variant-numeric: tabular-nums; }
.tile .sub { font-size: 12px; color: var(--muted); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.dot.hs { background: var(--series-1); }
.dot.cr { background: var(--series-2); }
.dot.ol { background: var(--series-3); }

/* ---- tables ---- */
.tbl-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { font-size: 12px; color: var(--text-2); font-weight: 600; background: var(--surface-2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--surface-2); }
.bar-in { display: inline-block; height: 8px; border-radius: 0 4px 4px 0; vertical-align: middle; margin-right: 6px; }

/* ---- hour chart ---- */
.chart svg { width: 100%; height: auto; display: block; }
.chart .axis { fill: var(--muted); font-size: 11px; }
.chart .rowlbl { fill: var(--text-2); font-size: 12px; font-weight: 600; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:hover { fill: var(--text); fill-opacity: .05; }
#tip { position: fixed; z-index: 20; pointer-events: none; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; box-shadow: 0 6px 20px rgba(0,0,0,.18); font-size: 12px; max-width: 260px; }
#tip b { display: block; margin-bottom: 3px; }
#tip .row { display: flex; align-items: center; gap: 6px; }

/* ---- two columns ---- */
.cols { display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start; }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; } }

/* ---- apps list ---- */
.apps .app { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; margin-bottom: 8px; font-size: 13px; }
.apps .app .track { grid-column: 1 / -1; height: 6px; background: var(--surface-2); border-radius: 3px; }
.apps .app .fill { height: 6px; background: var(--series-1); border-radius: 0 3px 3px 0; }
.apps .kind { color: var(--muted); font-size: 11px; margin-left: 4px; }

/* ---- events ---- */
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.chip { border: 1px solid var(--border); background: var(--surface); border-radius: 14px; padding: 3px 10px; cursor: pointer; font-size: 12px; display: inline-flex; align-items: center; gap: 6px; }
.chip.on { background: var(--surface-2); border-color: var(--text-2); font-weight: 600; }
.events { list-style: none; margin: 0; padding: 0; }
.ev { display: grid; grid-template-columns: 52px 14px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.ev:last-child { border-bottom: 0; }
.ev > div, .cols > * { min-width: 0; }
.ev .time { color: var(--text-2); font-variant-numeric: tabular-nums; font-size: 13px; }
.ev .dot { margin-top: 6px; }
.ev .title { font-weight: 600; }
.ev .title .app-tag { font-weight: 700; color: var(--accent); margin-right: 2px; }
.ev .sub { color: var(--text-2); font-size: 13px; }
.ev ul { margin: 4px 0 0; padding-left: 16px; color: var(--text-2); font-size: 12px; }
.ev ul li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.gap { color: var(--danger); font-weight: 700; font-size: 12px; padding: 4px 0 4px 76px; border-bottom: 1px dashed var(--border); }

/* ---- admin ---- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 14px; cursor: pointer; color: var(--text-2); }
.tabs button.on { border-bottom-color: var(--accent); color: var(--text); font-weight: 600; }
.form { display: grid; grid-template-columns: 160px 1fr; gap: 10px 14px; align-items: center; max-width: 640px; }
.form label { font-weight: 600; font-size: 13px; }
.form .full { grid-column: 1 / -1; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.checks label { font-weight: 400; display: inline-flex; gap: 6px; align-items: center; }
.pill { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 10px; background: var(--surface-2); color: var(--text-2); margin: 1px 2px; }
.pill.off { text-decoration: line-through; }
td input[type=text] { width: 100%; min-width: 140px; }
.soon { text-align: center; padding: 60px 20px; }
.soon .big { font-size: 40px; }
iframe.timeline { width: 100%; height: calc(100vh - 110px); border: 1px solid var(--border); border-radius: 10px; background: #fff; }
dialog { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); padding: 20px; max-width: 700px; width: calc(100% - 32px); }
dialog::backdrop { background: rgba(0,0,0,.35); }
dialog .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }

@media (max-width: 640px) {
  header { padding: 0 10px; gap: 8px; }
  .brand span { display: none; }
  main { padding: 16px; }
  .form { grid-template-columns: 1fr; }
}

.brand .ver { font-size: 11px; font-weight: 500; color: var(--muted); border: 1px solid var(--border); border-radius: 8px; padding: 0 6px; }
.stale { background: #b3261e; color: #fff; padding: 8px 20px; font-weight: 600; }

/* ---- work categories (validated categorical order, slots 2-8; grays for "other") ---- */
:root {
  --cat-2: #eb6834; --cat-3: #1baf7a; --cat-4: #eda100; --cat-5: #e87ba4; --cat-6: #008300; --cat-7: #4a3aa7; --cat-8: #e34948;
  --cat-gray: #a3a29c; --cat-gray2: #d3d2cc;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --cat-2: #d95926; --cat-3: #199e70; --cat-4: #c98500; --cat-5: #d55181; --cat-6: #008300; --cat-7: #9085e9; --cat-8: #e66767;
    --cat-gray: #6f6e69; --cat-gray2: #4a4a47;
  }
}
:root[data-theme="dark"] {
  --cat-2: #d95926; --cat-3: #199e70; --cat-4: #c98500; --cat-5: #d55181; --cat-6: #008300; --cat-7: #9085e9; --cat-8: #e66767;
  --cat-gray: #6f6e69; --cat-gray2: #4a4a47;
}
.dot.qb { background: var(--cat-6); }
.mix { display: flex; gap: 2px; height: 8px; border-radius: 4px; overflow: hidden; margin: 6px 0; }
.mix.big { height: 18px; border-radius: 5px; }
.mix span { min-width: 2px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--text-2); margin-top: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i, #tip i.sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.legend b { color: var(--text); font-weight: 600; }

/* ---- employee timeline ---- */
ol.tl { list-style: none; margin: 0; padding: 0; }
.tl-period { border-left: 4px solid var(--pc); background: var(--surface-2); border-radius: 0 8px 8px 0; padding: 8px 12px; margin: 8px 0; }
.tl-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.tl-head .time { font-variant-numeric: tabular-nums; color: var(--text-2); font-size: 13px; }
.tl-title { font-weight: 650; }
.tl-period > .sub { color: var(--text-2); font-size: 13px; }
ul.tl-inner { list-style: none; margin: 6px 0 0; padding: 0 0 0 4px; border-top: 1px solid var(--border); }
ul.tl-inner > li .ev { border-bottom: 1px dashed var(--border); }
ul.tl-inner > li:last-child .ev { border-bottom: 0; }
.tl-item .ev { border-bottom: 0; }
.tl-item { padding: 0 4px; }
ol.tl .gap { padding-left: 4px; }

/* ---- Hubstaff screenshots ---- */
.shots { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 2px; }
.shot { position: relative; padding: 0; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; background: var(--surface); cursor: zoom-in; width: 96px; height: 60px; }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot span { position: absolute; left: 0; bottom: 0; font-size: 10px; padding: 1px 4px; background: rgba(0,0,0,.6); color: #fff; border-top-right-radius: 4px; }
.shot.more { display: inline-flex; align-items: center; justify-content: center; font-weight: 600; color: var(--text-2); cursor: pointer; }
.shot.expired img { opacity: .15; }
.shot:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
dialog.lightbox { max-width: min(1400px, 96vw); width: auto; padding: 10px; }
dialog.lightbox .lb-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
dialog.lightbox img { display: block; max-width: 100%; max-height: 82vh; margin: 0 auto; border-radius: 6px; }

/* ---- block extras: other websites, badges ---- */
.others { font-size: 13px; color: var(--text-2); margin-top: 6px; line-height: 1.7; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.badge { font-size: 12px; padding: 1px 8px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); }
.badge.warn { border-color: #c98500; color: var(--text); }

.tl-break { list-style: none; margin: 8px 0; padding: 8px 12px; border-left: 4px dashed var(--muted); background: var(--surface-2); border-radius: 0 8px 8px 0; color: var(--text-2); font-size: 14px; }
.tl-break .time { font-variant-numeric: tabular-nums; margin-right: 8px; }

/* ---- sent email details (closed by default) ---- */
details.mails { margin-top: 4px; font-size: 13px; }
details.mails summary { cursor: pointer; color: var(--accent); width: max-content; }
details.mails ul { list-style: none; margin: 6px 0 0; padding: 0 0 0 4px; max-height: 320px; overflow-y: auto; }
details.mails li { padding: 4px 0; border-bottom: 1px dashed var(--border); white-space: normal; }
details.mails li:last-child { border-bottom: 0; }
details.mails .time { color: var(--text-2); font-variant-numeric: tabular-nums; margin-right: 4px; }

/* ---- alerts ---- */
.card.alerts { border-color: #c98500; }
.card.alerts ul { margin: 0; padding-left: 4px; list-style: none; }
.card.alerts li { padding: 4px 0; }
.alert-count { color: #c98500; font-weight: 650; }
.tl-manual { border-left-color: #c98500; border-left-style: solid; }
#evl > li.flash { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- shared mailboxes inside the Team day table ---- */
tr.shared-row td { background: var(--surface-2); }
tr.shared-row .shared-name { font-weight: 600; }
tr.shared-row .small { white-space: normal; }
svg.strip .hit { fill: transparent; }

/* ---- foldable cards ---- */
details.fold > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::before { content: '▸'; color: var(--muted); font-size: 13px; transition: transform .15s; }
details.fold[open] > summary::before { transform: rotate(90deg); }
details.fold > summary h2 { margin: 0; }
details.fold[open] > summary { margin-bottom: 10px; }
details.fold:not([open]) { padding-top: 12px; padding-bottom: 12px; }
/* ---- search in the timeline ---- */
.search { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.search input { flex: 1; min-width: 0; }
#evl li.hit > .ev .title, #evl li.hit .tl-title { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }

details.mails li.unread b { font-weight: 800; }
.unread-dot { color: var(--accent); font-size: 11px; }

/* ---- received emails window ---- */
.recv-sum { margin: 0 0 10px; }
dialog.recv { max-width: 860px; width: calc(100% - 32px); max-height: 90vh; padding: 16px 18px; }
dialog.recv .lb-bar { display: flex; align-items: center; gap: 8px; }
dialog.recv .lb-bar h2 { margin: 0; }
.recv-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 12px 0 6px; }
.recv-tools input[type=search] { flex: 1; min-width: 180px; }
.recv-tools label { display: inline-flex; gap: 6px; align-items: center; }
.recv-body section { margin-top: 14px; }
.recv-body h3 { font-size: 14px; margin: 0 0 6px; padding-bottom: 4px; border-bottom: 1px solid var(--border); }
.recv-body ul { list-style: none; margin: 0; padding: 0; }
.recv-body li { display: grid; grid-template-columns: 48px 18px 1fr; gap: 8px; padding: 6px 4px; border-bottom: 1px dashed var(--border); }
.recv-body li .time { color: var(--text-2); font-variant-numeric: tabular-nums; }
.recv-body li.unread { background: var(--surface-2); border-radius: 6px; }
.recv-body li.unread b { font-weight: 800; }
.recv-body li .state { text-align: center; }
.recv-body li.read .state { color: var(--ok); }
.recv-body li.unread .state, .unread-txt { color: var(--accent); }
.recv-body li.read b { font-weight: 500; }

/* ---- files ---- */
.files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.file-link { border: 1px solid var(--border); background: var(--surface); color: var(--accent); border-radius: 6px; padding: 2px 8px; font-size: 12px; cursor: pointer; }
.file-link:hover { background: var(--surface-2); }
dialog.fileview { width: min(1100px, 96vw); height: 92vh; max-width: none; padding: 10px; display: flex; flex-direction: column; }
dialog.fileview:not([open]) { display: none; }
dialog.fileview .lb-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
dialog.fileview .fv-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
dialog.fileview iframe { flex: 1; width: 100%; border: 1px solid var(--border); border-radius: 6px; background: #fff; }

/* ---- SharePoint documents ---- */
.sp-link { margin-top: 4px; }
.sp-list { list-style: none; margin: 8px 0 0; padding: 0; }
.sp-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.sp-list .file-link { text-align: left; }

/* payable title: WS number predominant, payable number smaller */
.title .pay-no { font-size: 12px; font-weight: 500; color: var(--muted); }
.title .pay-co { font-weight: 400; }

/* calendar meetings */
.dot.cal { background: var(--cat-7); }

/* breaks: light red banner (manual time keeps its own look) */
.tl-break:not(.tl-manual) { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); border-left-color: color-mix(in srgb, var(--danger) 60%, var(--surface)); }

/* Team day search: results under each person */
.tsearch { padding: 12px 16px; }
.tsp + .tsp { border-top: 1px solid var(--border); margin-top: 10px; padding-top: 10px; }
.tsp h3 { margin: 0 0 6px; font-size: 15px; }
.tsp ul { list-style: none; margin: 0; padding: 0; }
.tsp li { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; font-size: 14px; }
.tsp li .time { width: 44px; flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }
.tsp li .dot { margin-top: 6px; }

/* Team day: time changed by hand in Hubstaff = red alert */
.alert-count.manual { color: var(--danger); font-weight: 800; }
.al-manual { color: var(--danger); font-weight: 700; }

/* development work */
.dot.dev { background: var(--cat-4); }
.worksum details { margin-top: 6px; }
.worksum summary { cursor: pointer; font-weight: 600; }
.ws-body { max-height: 480px; overflow: auto; font-size: 13px; padding: 6px 2px; overflow-wrap: anywhere; }
.ws-body .ws-h1 { font-weight: 700; font-size: 14px; margin: 8px 0 4px; }
.ws-body .ws-h2 { font-weight: 700; margin: 10px 0 4px; color: var(--accent); }
.ws-body .ws-h3 { font-weight: 600; margin: 8px 0 2px; }
.ws-body ul { margin: 2px 0 6px; padding-left: 18px; }
.ws-body p { margin: 4px 0; }

/* ---- left menu ---- */
.layout { display: flex; align-items: flex-start; }
.side { flex: none; width: 220px; position: sticky; top: 54px; height: calc(100vh - 54px); overflow-y: auto; background: var(--surface); border-right: 1px solid var(--border); padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; }
.side a { display: block; padding: 8px 12px; border-radius: 6px; color: var(--text-2); text-decoration: none; }
.side a:hover { background: var(--surface-2); }
.side a.on { background: var(--surface-2); color: var(--text); font-weight: 600; }
.side-title { display: flex; justify-content: space-between; align-items: center; width: 100%; background: none; border: 0; padding: 9px 12px; border-radius: 6px; font: inherit; font-weight: 700; color: var(--text); cursor: pointer; text-align: left; }
.side-title:hover { background: var(--surface-2); }
.side-title .chev { transition: transform .15s; color: var(--muted); }
.side-group.open .chev { transform: rotate(90deg); }
.side-items { display: none; padding-left: 10px; }
.side-group.open .side-items { display: block; }
.side-sep { border-top: 1px solid var(--border); margin: 8px 4px; }
.side-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: 6px; padding: 4px 10px; font-size: 16px; cursor: pointer; color: var(--text); }
.home { text-align: center; padding: 48px 20px; }
.home .big { font-size: 44px; }
@media (max-width: 800px) {
  .side-toggle { display: inline-block; }
  .side { position: fixed; left: 0; top: 54px; z-index: 6; transform: translateX(-100%); transition: transform .15s; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
  body.side-open .side { transform: none; }
}

/* time accounted for */
.acc-ok { color: var(--ok); } .acc-mid { color: #c98500; } .acc-low { color: var(--danger); }
a.acc-ok, a.acc-mid, a.acc-low { text-decoration: none; font-weight: 600; }
.acc-bar { height: 10px; border-radius: 5px; background: color-mix(in srgb, var(--danger) 25%, var(--surface-2)); overflow: hidden; margin: 4px 0 10px; }
.acc-in { height: 100%; background: var(--ok); border-radius: 5px 0 0 5px; }
table.acc { width: 100%; border-collapse: collapse; font-size: 14px; }
table.acc td { padding: 4px 6px; border-bottom: 1px dashed var(--border); }
table.acc tr.acc-h td { padding-top: 10px; border-bottom: 1px solid var(--border); }
table.acc tr.acc-not td:first-child { color: var(--text-2); }
tr.acc-click { cursor: pointer; }
tr.acc-click:hover td { background: var(--surface-2); }
tr.acc-click .chev { display: inline-block; transition: transform .15s; color: var(--muted); }
tr.acc-click.open .chev { transform: rotate(90deg); }
tr.acc-list ul { list-style: none; margin: 0; padding: 4px 0 4px 22px; columns: 2; column-gap: 24px; }
tr.acc-list li { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; font-size: 13px; break-inside: avoid; }
@media (max-width: 640px) { tr.acc-list ul { columns: 1; } }
.tile-more summary { cursor: pointer; }
.tile-more[open] summary { margin-bottom: 4px; }
.dot.shotdot { background: var(--series-1); opacity: .5; }
.shot-row .shots { margin: 0; }
.shot-toggle { background: none; border: 1px solid var(--border); border-radius: 14px; padding: 2px 10px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.shot-toggle:hover { background: var(--surface-2); }
.shot-toggle + .shots { margin-top: 6px; }

/* the "hidden" attribute always wins (folded screenshots, extra pictures, lists) */
[hidden] { display: none !important; }

/* Zoho Projects / Desk / CRM */
.dot.zp { background: #2a78d6; } .dot.zd { background: #0f8b8d; } .dot.zc { background: #9085e9; }
.claude-mark { width: 15px; height: 15px; vertical-align: -2px; }

/* Online apps */
.apps-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 1px solid var(--border); border-radius: 18px; padding: 5px 12px; cursor: pointer; color: var(--text); white-space: nowrap; margin-right: 8px; }
.apps-btn:hover { background: var(--surface-2); }
.pill-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); display: inline-block; }
.pill-dot.on { background: var(--ok); } .pill-dot.off { background: var(--danger); }
dialog.apps { max-width: 560px; }
.apps-list { list-style: none; margin: 8px 0; padding: 0; }
.apps-list li { display: flex; gap: 12px; align-items: flex-start; padding: 9px 0; border-bottom: 1px dashed var(--border); }
.pill { flex: none; min-width: 64px; text-align: center; font-size: 12px; font-weight: 700; color: #fff; border-radius: 12px; padding: 3px 10px; }
.pill.on { background: var(--ok); } .pill.off { background: var(--danger); }
@media (max-width: 640px) { .apps-btn { padding: 5px 8px; font-size: 13px; } }
.apps-pop { position: fixed; z-index: 20; width: 300px; max-width: calc(100vw - 16px); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.2); padding: 8px 10px; }
.apps-pop ul { list-style: none; margin: 0; padding: 0; }
.apps-pop li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 5px 0; font-size: 13px; border-bottom: 1px dashed var(--border); }
.apps-pop li:last-child { border-bottom: 0; }
.apps-pop .pill { min-width: 52px; font-size: 11px; padding: 2px 6px; }
.apps-pop .nt { flex-basis: 100%; padding-left: 60px; }

/* start / end of a Projects or Desk log: same colour */
.ev.marked { box-shadow: inset 3px 0 0 var(--mc); padding-left: 6px; border-radius: 4px; }
.ev.marked .title { color: var(--mc); }

/* apps & websites of a block, with start → end */
.apps-in summary { cursor: pointer; }
table.apps-t { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 6px; }
table.apps-t td { padding: 3px 6px; border-bottom: 1px dashed var(--border); vertical-align: top; }
table.apps-t tr.is-other td:first-child { color: var(--danger); }
.apps-t .rng { display: inline-block; margin: 0 8px 2px 0; white-space: nowrap; }
.apps-t .tag { font-size: 10px; border: 1px solid currentColor; border-radius: 6px; padding: 0 4px; }
.app-seg .title { font-weight: 500; font-size: 14px; }
.app-seg .sub { font-size: 12px; }
.app-seg.is-other .title { color: var(--danger); }
.app-seg .tag { font-size: 10px; border: 1px solid currentColor; border-radius: 6px; padding: 0 4px; }
.tile .sub { overflow-wrap: anywhere; }
/* apps starting at the same time: one block, time shown once */
ul.tl-inner > li.app-seg:has(+ li.app-cont) .ev { border-bottom: 0; padding-bottom: 2px; }
ul.tl-inner > li.app-cont .ev { padding-top: 2px; }
.tl-bar { cursor: pointer; padding: 2px 0; }
.tl-bar .mix { margin: 0; }
.tl-bar:hover .mix { outline: 2px solid var(--border); outline-offset: 2px; }
.tl-meta { padding-top: 4px; }
.block-sites { font-size: 13px; margin-top: 6px; line-height: 1.6; }
.block-sites .is-other { color: var(--danger); }
.block-sites ul { list-style: none; margin: 4px 0 0; padding: 0; max-width: 520px; }
.block-sites li { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; border-bottom: 1px dotted var(--border); }
.block-sites li.is-other a, .block-sites li.is-other > span:first-child { color: var(--danger); }
.block-sites .tag { font-size: 10px; border: 1px solid currentColor; border-radius: 6px; padding: 0 4px; }

/* AI: screenshot analysis + assistant */
.shot-ai { font-size: 12px; color: var(--text-2); margin-bottom: 4px; }
.shot-ai.not-work, .lb-ai.not-work { color: var(--danger); }
.lb-ai { background: var(--surface); color: var(--text); padding: 8px 12px; border-radius: 8px; margin: 6px 0; font-size: 13px; max-width: 900px; }
.ai-card { display: flex; flex-direction: column; gap: 10px; }
.ai-log { min-height: 280px; max-height: calc(100vh - 330px); overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px; }
.ai-msg { padding: 10px 14px; border-radius: 12px; max-width: 85%; line-height: 1.5; overflow-wrap: anywhere; }
.ai-msg.user { align-self: flex-end; background: var(--accent); color: var(--accent-ink); }
.ai-msg.assistant { align-self: flex-start; background: var(--surface-2); }
.ai-msg.thinking { color: var(--muted); font-style: italic; }
.ai-empty { display: flex; flex-wrap: wrap; gap: 8px; margin: auto; justify-content: center; }
.ai-form { display: flex; gap: 8px; align-items: flex-end; }
.ai-form textarea { flex: 1; resize: vertical; min-height: 44px; }

/* =================== Tactik Hub look (v1.84) =================== */
h1 { font-size: 26px; font-weight: 750; letter-spacing: -.025em; }
h2 { letter-spacing: -.01em; font-weight: 650; }
.card, .tile, details.card { border-radius: var(--radius); box-shadow: var(--shadow); }
.card { padding: 18px 20px; }
.tile { padding: 14px 16px; }
.tile .val { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.btn { border-radius: 999px; padding: 7px 14px; font-weight: 500; transition: background .15s, border-color .15s, transform .15s; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--ink-text); }
.btn.primary:hover { opacity: .88; background: var(--ink); }
input, select, textarea { border-radius: 10px; }
th { background: transparent; text-transform: uppercase; letter-spacing: .05em; font-size: 11px; color: var(--muted); }
td, th { border-bottom-color: var(--grid); }
a, .chip, .side a, .side-title { transition: background .15s, color .15s; }
.num, .tile .val, td.num { font-variant-numeric: tabular-nums; }

/* header: thin, calm */
header { background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.brand { gap: 10px; font-weight: 750; letter-spacing: -.01em; }
.brand img { display: none; }
.brand .logo { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg, #5b5bd6, #f97316); display: inline-block; }

/* side menu (Notion-like) */
.side { background: color-mix(in srgb, var(--surface) 55%, var(--bg)); padding: 14px 10px; }
.side a, .side-title { display: flex; align-items: center; gap: 10px; border-radius: 8px; padding: 7px 10px; font-weight: 500; color: var(--text-2); }
.side a.on { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); font-weight: 600; }
.side a:hover, .side-title:hover { background: var(--surface-2); }
.side-title { color: var(--muted); font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; padding-top: 14px; }
.side-items { padding-left: 0; }
.nav-ic { width: 16px; height: 16px; flex: none; opacity: .85; }
.kbar { display: flex; align-items: center; justify-content: space-between; margin: 0 2px 10px; padding: 8px 10px; border: 1px solid var(--border); background: var(--surface); border-radius: 10px; color: var(--muted); cursor: pointer; font: inherit; width: calc(100% - 4px); }
.kbar:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.kbar kbd { font: 500 11px "Inter", sans-serif; border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; color: var(--text-2); }

/* home: hero + bento */
.hero { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 40px 40px 28px; box-shadow: var(--shadow); margin-bottom: 16px; }
.hero::before { content: ""; position: absolute; inset: -45% -10% auto 45%; height: 440px; background: radial-gradient(closest-side, #a5a6f699, transparent), radial-gradient(closest-side at 70% 60%, #fdba7499, transparent); filter: blur(34px); pointer-events: none; }
.hero > * { position: relative; }
.hero h1 { font-size: clamp(30px, 4.2vw, 46px); line-height: 1.06; letter-spacing: -.035em; font-weight: 800; margin: 0 0 10px; }
.hero h1 .g { color: var(--muted); }
.hero h1 .ip { display: inline-block; font-size: .6em; vertical-align: .22em; letter-spacing: 0; font-weight: 700; border-radius: 999px; padding: 0 .6em; background: #dcfce7; color: #15803d; }
.hero h1 .ip.mid { background: #fef3c7; color: #b45309; } .hero h1 .ip.low { background: #fee2e2; color: #b91c1c; }
.hero p.lead { color: var(--text-2); font-size: 15px; margin: 0 0 20px; }
.hero .ai-form { max-width: 780px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 8px 8px 8px 14px; box-shadow: 0 12px 32px -16px rgba(24,24,27,.3); }
.hero .ai-form textarea { border: 0; outline: 0; background: transparent; min-height: 40px; font-size: 15px; resize: none; padding-top: 9px; }
.hero .ai-empty { justify-content: flex-start; margin: 14px 0 0; }
.hero .chip { background: color-mix(in srgb, var(--surface) 80%, transparent); }
.bento { display: grid; grid-template-columns: 1.4fr 1fr 1.3fr 1fr; gap: 14px; margin-bottom: 16px; }
.bento .tile { min-height: 118px; }
.bento .tile.dark { background: #18181b; color: #fff; border-color: #18181b; }
.bento .tile.dark .lbl, .bento .tile.dark .sub { color: #a1a1aa; }
.bento .tile.orange { background: var(--orange); color: #fff; border-color: var(--orange); }
.bento .tile.orange .lbl, .bento .tile.orange .sub { color: #fff; }
.bento .tile .val { font-size: 30px; }
@media (max-width: 1000px) { .bento { grid-template-columns: 1fr 1fr; } .hero { padding: 26px 20px 20px; } }
.ai-log:empty { display: none; }
.ai-thread { margin-bottom: 16px; }
a.tile { text-decoration: none; color: inherit; display: block; transition: transform .15s, box-shadow .15s; }
a.tile:hover { transform: translateY(-2px); }
.logo-l { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg, #5b5bd6, #f97316); display: inline-block; vertical-align: -4px; }

/* dashboard (v1.85) */
.bento .tile .spark { display: block; width: 100%; height: 30px; margin-top: 8px; }
.dl { font-weight: 600; } .dl.up { color: var(--ok); } .dl.down { color: var(--danger); }
.tile.dark .dl.up { color: #86efac; } .tile.dark .dl.down { color: #fca5a5; }
.tile.skel { min-height: 118px; background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: skel 1.2s infinite linear; }
@keyframes skel { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.dash2 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; align-items: start; }
@media (max-width: 1000px) { .dash2 { grid-template-columns: 1fr; } }
h2.dh { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; margin: 0 0 12px; }
h2.dh a { font-weight: 500; text-decoration: none; }
.prow { display: grid; grid-template-columns: 32px 1fr 70px 56px 64px; gap: 10px; align-items: center; padding: 8px 6px; border-radius: 10px; text-decoration: none; color: inherit; border-bottom: 1px solid var(--grid); }
.prow:last-child { border-bottom: 0; }
.prow:hover { background: var(--surface-2); }
.prow .av { width: 30px; height: 30px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font-weight: 700; font-size: 12px; display: grid; place-items: center; }
.prow .pn { display: flex; flex-direction: column; min-width: 0; } .prow .pn b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow .pt { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.prow .pp, .prow .pa { text-align: right; }
.pill-acc { display: inline-block; border-radius: 999px; padding: 1px 8px; font-size: 12px; font-weight: 700; background: color-mix(in srgb, currentColor 12%, transparent); }
.ringbox { display: flex; gap: 18px; align-items: center; margin-bottom: 12px; }
.ring { --p: 0; width: 92px; height: 92px; border-radius: 50%; background: conic-gradient(var(--ok) calc(var(--p) * 1%), var(--surface-2) 0); display: grid; place-items: center; flex: none; }
.ring > div { width: 70px; height: 70px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-weight: 750; font-size: 18px; }
.big { font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
.arow { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--grid); }
.arow:last-child { border-bottom: 0; } .arow b { font-variant-numeric: tabular-nums; } .arow.bad { color: var(--danger); }

/* modern search fields (v1.86) */
.search { gap: 12px; margin-bottom: 14px; }
.sfield { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; }
.sfield input[type=search] { width: 100%; height: 46px; padding: 0 92px 0 44px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); font-size: 14.5px; outline: none; transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none; }
.sfield input[type=search]::placeholder { color: var(--muted); }
.sfield input[type=search]:focus { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent), var(--shadow); }
.sfield input[type=search]:disabled { background: var(--surface-2); box-shadow: none; cursor: not-allowed; }
.i-search { position: absolute; left: 16px; width: 17px; height: 17px; background: var(--muted); -webkit-mask: url(/icons/search.svg) center / contain no-repeat; mask: url(/icons/search.svg) center / contain no-repeat; pointer-events: none; }
.sfield:focus-within .i-search { background: var(--accent); }
.scount { position: absolute; right: 12px; font-size: 12px; color: var(--text-2); background: var(--surface-2); border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.scount:empty { display: none; }
/* on / off switch */
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; white-space: nowrap; user-select: none; font-weight: 500; color: var(--text-2); }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 38px; height: 22px; border-radius: 999px; background: var(--border); position: relative; transition: background .15s; flex: none; }
.switch .knob { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track .knob { transform: translateX(16px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 640px) { .search-team { flex-direction: column; align-items: stretch; } }
a.btn { text-decoration: none; color: var(--text); display: inline-flex; align-items: center; gap: 6px; }
a.btn.primary { color: var(--ink-text); }

/* Online apps: screenshot analysis switch */
.apps-sw { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.apps-sw .switch { font-size: 13px; color: var(--text); }
.switch input:disabled + .track { opacity: .5; }

/* phone calls */
.dot.ph { background: #0ea5e9; }

/* Import files page */
.drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 38px 20px; margin-bottom: 16px; border: 2px dashed var(--border); border-radius: var(--radius); background: var(--surface); cursor: pointer; text-align: center; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.drop-ic { width: 34px; height: 34px; background: var(--accent); -webkit-mask: url(/icons/file-text.svg) center / contain no-repeat; mask: url(/icons/file-text.svg) center / contain no-repeat; }
.imp-ok { border-color: color-mix(in srgb, var(--ok) 50%, var(--border)); } .imp-bad { border-color: color-mix(in srgb, var(--danger) 50%, var(--border)); }
.imp-ok ul, .imp-bad ul { margin: 6px 0 0; padding-left: 18px; }

/* off / absent */
.absent { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--danger) 45%, var(--border)); color: var(--danger); border-radius: 12px; padding: 12px 16px; margin-bottom: 14px; font-weight: 500; }
.absent b { font-weight: 750; margin-right: 6px; }
.absent a { color: inherit; font-weight: 650; }

/* v1.98: alerts opened from the dashboard */
button.alert-btn { background: none; border: 0; padding: 2px 6px; margin: -2px -6px; border-radius: 6px; font: inherit; font-weight: 650; cursor: pointer; }
button.alert-btn:hover, button.alert-btn:focus-visible { background: rgba(201,133,0,.14); }
.alerts-dlg .recv-body { overflow: auto; max-height: 74vh; margin-top: 10px; }
.alerts-dlg .al-person { padding: 10px 0; border-top: 1px solid var(--border); }
.alerts-dlg .al-person:first-child { border-top: 0; }
.alerts-dlg h3 { margin: 0 0 6px; font-size: 15px; }
.alerts-dlg ul { margin: 0; padding-left: 4px; list-style: none; }
.alerts-dlg .recv-body li { display: block; padding: 5px 2px; }   /* not the 3-column grid of the received-emails list */
.alerts-dlg .recv-body li.al-red { color: #c62828; font-weight: 650; }

/* v2.02: the assistant is a chat zone inside the top box (messages above the question field) */
.hero .ai-log { min-height: 0; max-height: 52vh; max-width: 780px; margin: 0 0 12px; padding: 2px 6px 2px 0; }
.hero .ai-msg { font-size: 15px; }
.hero .ai-msg.assistant { background: var(--surface); border: 1px solid var(--border); max-width: 100%; }
.hero.chatting { padding-top: 22px; }
.hero.chatting h1 { font-size: 20px; letter-spacing: -.01em; margin-bottom: 14px; }
.hero.chatting h1 br { display: none; }
.hero.chatting h1 .g { margin-left: 6px; }
.ai-foot { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 10px; max-width: 780px; }
.ai-msg .dots i { display: inline-block; width: 4px; height: 4px; margin-left: 3px; border-radius: 50%; background: currentColor; animation: aidot 1.2s infinite; }
.ai-msg .dots i:nth-child(2) { animation-delay: .2s; } .ai-msg .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes aidot { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ai-msg .dots i { animation: none; } }

/* v2.08: which model answered and what it cost */
.ai-msg .ai-meta { margin-top: 8px; font-size: 12px; color: var(--muted); }

/* v2.11: history of the assistant's conversations */
.hero .ai-hist-btn { position: absolute; top: 16px; right: 18px; }
.ai-hist { max-width: 780px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; margin: 0 0 12px; max-height: 46vh; overflow: auto; }
.ai-hist-head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 6px; }
.ai-hist ul { list-style: none; margin: 0; padding: 0; }
.ai-hist li { display: flex; align-items: center; gap: 6px; border-top: 1px solid var(--border); }
.ai-hist li.on .t { color: var(--accent); }
.ai-hist-open { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; text-align: left; background: none; border: 0; padding: 8px 4px; font: inherit; color: inherit; cursor: pointer; border-radius: 8px; }
.ai-hist-open:hover, .ai-hist-open:focus-visible { background: var(--surface-2); }
.ai-hist-open .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-hist-del { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 6px 8px; border-radius: 8px; font: inherit; }
.ai-hist-del:hover, .ai-hist-del:focus-visible { background: var(--surface-2); color: #c62828; }

/* v2.12: the chat zone uses the full width of the top box */
.hero .ai-form, .hero .ai-log, .hero .ai-hist, .hero .ai-foot { max-width: none; }

/* v2.13: greeting and team sentence centred in the top bar; the chat box is titled "Carl your assistant is ready" */
.top-msg { flex: 1; min-width: 0; text-align: center; font-size: 14px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-msg b { color: var(--text); font-weight: 650; }
.top-msg .ip { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 1px 9px; background: #dcfce7; color: #15803d; }
.top-msg .ip.mid { background: #fef3c7; color: #b45309; } .top-msg .ip.low { background: #fee2e2; color: #b91c1c; }
.hero h1 { font-size: clamp(24px, 3vw, 34px); margin-bottom: 16px; }
@media (max-width: 760px) { .top-msg { visibility: hidden; } }

/* v2.15: go to an hour in the timeline */
.hourbar { position: sticky; top: 54px; z-index: 3; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px 0; margin-bottom: 6px; background: var(--surface); border-bottom: 1px solid var(--border); }
.hourbar button { font: inherit; font-size: 13px; font-variant-numeric: tabular-nums; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.hourbar button:hover, .hourbar button:focus-visible { border-color: var(--accent); }
.hourbar button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.hourbar button.empty { color: var(--muted); border-style: dashed; }
#evl [data-t] { scroll-margin-top: 118px; }
#evl .hour-hit { box-shadow: -3px 0 0 var(--accent); }
.hour-pick { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text-2); }

.alerts-dlg a.al-go { color: inherit; text-decoration: none; border-bottom: 1px dotted currentColor; }
.alerts-dlg a.al-go:hover, .alerts-dlg a.al-go:focus-visible { color: var(--accent); }

/* v2.17: two-step sign-in */
.twostep { padding-left: 20px; line-height: 1.7; }
.twostep code { font-size: 15px; letter-spacing: .04em; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; user-select: all; }
#lcodebox input, #tsc { width: 100%; font-size: 18px; letter-spacing: .2em; text-align: center; }

/* v2.18: commission forecast */
.cm-months { width: 100%; } .cm-months td { padding: 5px 6px; white-space: nowrap; } .cm-months td.cm-bar { width: 55%; }
.cm-track { display: block; height: 14px; border-radius: 4px; background: var(--surface-2); }
.cm-fill { display: block; height: 100%; min-width: 2px; border-radius: 4px; background: color-mix(in srgb, var(--accent) 35%, var(--surface)); overflow: hidden; }
.cm-paid { display: block; height: 100%; background: var(--accent); }
.cm-key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin: 0 4px 0 10px; background: color-mix(in srgb, var(--accent) 35%, var(--surface)); vertical-align: -1px; }
.cm-key.paid { background: var(--accent); margin-left: 0; }
.cm-stage { font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); white-space: nowrap; }
.cm-stage.paid { background: #dcfce7; color: #15803d; } .cm-stage.invoiced { background: #fef3c7; color: #b45309; } .cm-stage.blocked, .cm-stage.problem { background: #fee2e2; color: #b91c1c; }
.tile.dark .lbl, .tile.dark .sub { color: rgba(255,255,255,.75); }

/* v2.19: commission totals per pickup month */
.cm-matrix td, .cm-matrix th { white-space: nowrap; }
.cm-matrix tr.cm-total td { font-weight: 700; border-top: 2px solid var(--border); }
.cm-matrix tr.cm-sub td { color: var(--text-2); font-size: 13px; }
.cm-month { font: inherit; font-weight: 600; background: none; border: 0; padding: 2px 6px; border-radius: 6px; cursor: pointer; color: inherit; }
.cm-month:hover, .cm-month:focus-visible { background: var(--surface-2); }
.cm-month.on { background: var(--accent); color: var(--accent-ink); }
#cmlist { scroll-margin-top: 70px; }

/* v2.21: commission forecast laid out like the TIK widget */
.cm-filters { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; padding: 12px 14px; margin-bottom: 12px; border-radius: 12px; background: #334e68; color: #fff; }
.cm-filters label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #d9e2ec; }
.cm-filters input, .cm-filters select { font: inherit; font-size: 13px; font-weight: 400; text-transform: none; letter-spacing: 0; padding: 4px 8px; min-width: 130px; border-radius: 6px; border: 1px solid #627d98; background: #486581; color: #fff; }
.cm-filters input::placeholder { color: #bcccdc; }
.cm-filters input[type=month] { min-width: 0; color-scheme: dark; }
.cm-filters .btn { background: transparent; color: #fff; border-color: #9fb3c8; }
.cm-banner { display: flex; align-items: center; gap: 8px; padding: 9px 14px; margin-bottom: 12px; border: 1px solid #b7e4c7; border-radius: 10px; background: #f0fdf4; color: #14532d; font-size: 14px; }
.cm-dot { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; }
.cm-tiles .tile.cm-blue { border-top: 3px solid #2f6fa3; } .cm-tiles .tile.cm-orange { border-top: 3px solid #c2410c; }
.cm-card { padding: 0; overflow: hidden; }
.cm-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; }
.cm-title { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
.cm-tree { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.cm-tree th { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.cm-tree td, .cm-tree th { padding: 7px 12px; white-space: nowrap; border-bottom: 1px solid var(--border); }
.cm-tree td.num { border-left: 2px solid transparent; }
.cm-tog, .cm-agent { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.cm-arrow { display: inline-block; width: 14px; font-size: 10px; }
.cm-g td { font-weight: 700; }
.cm-l0 td { background: #c2410c; color: #fff; border-bottom-color: #c2410c; } .cm-l0 td.num { border-left-color: #f4a582; }
.cm-l1 td { background: #fdebd3; color: #1f2933; } .cm-l1 td.num, .cm-l2 td.num { border-left-color: #e8842c; }
.cm-l1 td:first-child { padding-left: 30px; box-shadow: inset 3px 0 0 #e8842c; }
.cm-l2 td { background: #fff6ec; color: #1f2933; } .cm-l2 td:first-child { padding-left: 46px; box-shadow: inset 3px 0 0 #e8842c; }
.cm-a td:first-child { padding-left: 14px; } .cm-agent { text-decoration: underline dashed; text-underline-offset: 3px; }
.cm-agent:hover, .cm-agent:focus-visible, .cm-tog:focus-visible { color: var(--accent); }
.cm-l0 .cm-tog:focus-visible { color: #fff; outline: 2px solid #fff; }
.cm-a td { color: var(--text); }
.cm-blocked td { color: var(--muted); font-style: italic; }
.cm-badge { font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: .04em; padding: 1px 6px; border-radius: 4px; background: #fee2e2; color: #b91c1c; }
.cm-ws td { font-size: 13px; background: var(--surface-2); } .cm-ws td:first-child { padding-left: 34px; white-space: normal; }
.cm-wsn { font-weight: 650; }

/* v2.23: the BU must be chosen */
.cm-filters label.cm-req { color: #ffb37a; }
.cm-filters label.cm-need select { border-color: #f97316; box-shadow: 0 0 0 2px rgba(249,115,22,.45); }
.cm-pick { padding: 28px 18px; text-align: center; border: 1px dashed var(--border); border-radius: 12px; color: var(--text-2); background: var(--surface); }

/* v2.24: several values per search field, picked from a list */
.cm-multi { position: relative; display: flex; flex-direction: column; gap: 3px; }
.cm-lab { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #d9e2ec; }
.cm-box { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-width: 170px; max-width: 320px; padding: 3px 4px; border-radius: 6px; border: 1px solid #627d98; background: #486581; }
.cm-box:focus-within { border-color: #fff; }
.cm-filters .cm-box input { flex: 1; min-width: 90px; border: 0; background: transparent; padding: 2px 4px; outline: 0; }
.cm-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 1px 4px 1px 8px; border-radius: 999px; background: #38bdf8; color: #082f49; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.cm-chip button { font: inherit; font-size: 11px; line-height: 1; border: 0; background: none; color: inherit; cursor: pointer; padding: 2px 4px; border-radius: 50%; }
.cm-chip button:hover, .cm-chip button:focus-visible { background: rgba(8,47,73,.2); }
.cm-sug { position: absolute; top: 100%; left: 0; z-index: 20; margin-top: 4px; min-width: 100%; width: max-content; max-width: 420px; max-height: 300px; overflow: auto; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); padding: 4px; }
.cm-sug button { display: block; width: 100%; text-align: left; font: inherit; font-size: 13px; padding: 6px 8px; border: 0; border-radius: 6px; background: none; color: inherit; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-sug button:hover, .cm-sug button:focus-visible { background: var(--surface-2); }
.cm-more { display: block; padding: 6px 8px; font-size: 12px; color: var(--muted); }

/* v2.25: worksheets panel under an agent line */
.cm-tree tr.cm-panel > td { padding: 0; white-space: normal; border-bottom: 2px solid #334e68; }
.cm-phead { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; background: #334e68; color: #fff; }
.cm-count { display: inline-block; margin-left: 6px; padding: 0 8px; border-radius: 999px; background: #627d98; font-size: 12px; font-weight: 700; }
.cm-close { font: inherit; font-size: 12px; color: #fff; background: transparent; border: 1px solid #9fb3c8; border-radius: 6px; padding: 3px 10px; cursor: pointer; }
.cm-close:hover, .cm-close:focus-visible { background: #486581; }
.cm-pscroll { max-height: 340px; overflow: auto; }
.cm-wstab { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.cm-wstab th { position: sticky; top: 0; background: var(--surface-2); font-size: 10.5px; z-index: 1; }
.cm-wstab td, .cm-wstab th { padding: 4px 10px; white-space: nowrap; border-bottom: 1px solid var(--border); }
.cm-st { font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 4px; }
.cm-st.paid { background: #dcfce7; color: #15803d; } .cm-st.inv { background: #dbeafe; color: #1d4ed8; }
.cm-wstab td.cm-amt { color: #1d6fa5; }

/* v2.27: a page that uses the whole width (commission forecast) */
main.wide { max-width: none; }

/* v2.29: day pickers; a long name is cut, its ✕ always stays visible */
.cm-filters input[type=date] { min-width: 0; color-scheme: dark; }
.cm-chip { overflow: visible; max-width: 100%; }
.cm-chip-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 190px; }
.cm-chip button { flex: none; }

/* v2.30: commission forecast in the site's own palette (tokens: indigo accent, ink, orange, neutrals; follows light / dark) */
.cm-filters { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.cm-filters label, .cm-lab { color: var(--text-2); }
.cm-filters input, .cm-filters select { border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.cm-filters input::placeholder { color: var(--muted); }
.cm-filters input:focus-visible, .cm-filters select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.cm-filters input[type=month], .cm-filters input[type=date] { color-scheme: inherit; }
.cm-filters .btn { background: var(--surface); color: var(--text); border-color: var(--border); }
.cm-box { border: 1px solid var(--border); background: var(--surface); }
.cm-box:focus-within { border-color: var(--accent); }
.cm-chip { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); color: var(--text); }
.cm-chip button:hover, .cm-chip button:focus-visible { background: color-mix(in srgb, var(--accent) 30%, var(--surface)); }
.cm-filters label.cm-req { color: var(--text-2); }
.cm-filters label.cm-need select { border-color: var(--orange); box-shadow: 0 0 0 2px color-mix(in srgb, var(--orange) 40%, transparent); }
.cm-banner { border: 1px solid var(--border); background: color-mix(in srgb, var(--ok) 9%, var(--surface)); color: var(--text); border-radius: 12px; }
.cm-dot { background: var(--ok); }
.cm-tiles .tile.cm-blue { border-top: 3px solid var(--accent); } .cm-tiles .tile.cm-orange { border-top: 3px solid var(--orange); }
.cm-l0 td { background: var(--accent); color: var(--accent-ink); border-bottom-color: var(--accent); }
.cm-l0 td.num { border-left-color: color-mix(in srgb, var(--accent-ink) 35%, transparent); }
.cm-l0 .cm-tog:focus-visible { color: var(--accent-ink); outline: 2px solid var(--accent-ink); }
.cm-l1 td { background: color-mix(in srgb, var(--accent) 15%, var(--surface)); color: var(--text); }
.cm-l2 td { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); color: var(--text); }
.cm-l1 td.num, .cm-l2 td.num { border-left-color: color-mix(in srgb, var(--accent) 40%, var(--surface)); }
.cm-l1 td:first-child, .cm-l2 td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.cm-tree tr.cm-panel > td { border-bottom: 2px solid var(--ink); }
.cm-phead { background: var(--ink); color: var(--ink-text); }
.cm-count { background: color-mix(in srgb, var(--ink-text) 22%, var(--ink)); color: var(--ink-text); }
.cm-close { color: var(--ink-text); border-color: color-mix(in srgb, var(--ink-text) 45%, var(--ink)); }
.cm-close:hover, .cm-close:focus-visible { background: color-mix(in srgb, var(--ink-text) 16%, var(--ink)); }
.cm-st.paid { background: color-mix(in srgb, var(--ok) 16%, var(--surface)); color: var(--text); }
.cm-st.inv { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); color: var(--text); }
.cm-wstab td.cm-amt { color: var(--text); font-weight: 600; }
.cm-badge { background: color-mix(in srgb, var(--danger) 16%, var(--surface)); color: var(--danger); }

/* v2.33: commission tiles: thin, one line each, spread over the width of the page with space between them */
.cm-tiles { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 4%; margin-bottom: 14px; }
.cm-tiles .tile { flex: 1 1 220px; max-width: 30%; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "lbl val" "sub val"; align-items: center; column-gap: 14px; padding: 9px 16px; min-height: 0; }
.cm-tiles .tile .lbl { grid-area: lbl; margin: 0; font-size: 13px; }
.cm-tiles .tile .sub { grid-area: sub; margin: 0; font-size: 12px; }
.cm-tiles .tile .val { grid-area: val; margin: 0; font-size: 22px; line-height: 1.1; }
@media (max-width: 800px) { .cm-tiles .tile { max-width: none; } }

/* v2.34: worksheets panel: smaller text, long names wrap, and its own left-right scroll bar */
.cm-tree tr.cm-panel > td > .cm-pscroll { width: 0; min-width: 100%; max-height: 360px; overflow: auto; scrollbar-gutter: stable; }
.cm-tree tr.cm-panel > td > .cm-phead { width: 0; min-width: 100%; box-sizing: border-box; }
.cm-wstab { font-size: 11.5px; line-height: 1.3; }
.cm-wstab th { font-size: 10px; }
.cm-wstab td, .cm-wstab th { padding: 4px 8px; }
.cm-wstab td { white-space: normal; overflow-wrap: anywhere; vertical-align: top; }
.cm-wstab td:nth-child(3), .cm-wstab td:nth-child(4), .cm-wstab td:nth-child(5), .cm-wstab td:nth-child(6) { min-width: 130px; max-width: 220px; }
.cm-wstab td:nth-child(7) { min-width: 90px; max-width: 170px; }
.cm-wstab td:nth-child(1), .cm-wstab td:nth-child(2), .cm-wstab td:nth-child(8), .cm-wstab td.num { white-space: nowrap; }

/* v2.37: no title above the commission table; small Collapse / Expand button */
.cm-head { padding: 6px 12px; }
.btn.cm-small { font-size: 12px; padding: 2px 10px; border-radius: 999px; min-height: 0; line-height: 1.5; }

/* v2.38: worksheet number = link to TIK */
.cm-wslink { font-weight: 700; color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* v2.40: the whole banner of the worksheets panel closes it */
.cm-phead[data-close] { cursor: pointer; }
.cm-phead[data-close]:hover { background: color-mix(in srgb, var(--ink-text) 10%, var(--ink)); }

/* v2.41: eye button inside password fields */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-right: 40px; }
.pw-eye { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.pw-eye:hover, .pw-eye:focus-visible { color: var(--text); background: var(--surface-2); }

/* v2.43: team time tracked, compared over the last 10 working days */
dialog.trend-dlg { max-width: 980px; }
.trend-dlg .recv-body { overflow: auto; max-height: 80vh; margin-top: 10px; }
.tr-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.tr-facts > div { border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; }
.tr-facts .lbl { font-size: 12px; color: var(--text-2); } .tr-facts .val { font-size: 22px; font-weight: 700; letter-spacing: -.02em; } .tr-facts .sub { font-size: 12px; color: var(--text-2); }
.tr-chg { font-weight: 700; color: var(--text); white-space: nowrap; } .tr-chg.up { color: #15803d; } .tr-chg.down { color: #b91c1c; }
.tr-chart { display: flex; align-items: stretch; gap: 10px; height: 210px; padding: 6px 4px 0; border-bottom: 1px solid var(--border); }
.tr-col { flex: 1; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.tr-val { font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 4px; white-space: nowrap; }
.tr-bar-box { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.tr-bar { width: 60%; max-width: 34px; border-radius: 4px 4px 0 0; background: var(--accent); }
.tr-bar.prev { background: color-mix(in srgb, var(--accent) 38%, var(--surface)); }
.tr-bar.today { background: repeating-linear-gradient(135deg, var(--accent) 0 5px, color-mix(in srgb, var(--accent) 55%, var(--surface)) 5px 10px); }
.tr-col:hover .tr-bar { outline: 2px solid var(--text); outline-offset: 1px; }
.tr-day { font-size: 12px; font-weight: 600; margin-top: 5px; } .tr-date { font-size: 11px; color: var(--muted); margin-bottom: 6px; white-space: nowrap; }
.tr-sep { width: 1px; background: var(--border); margin: 0 4px; }
.tr-key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin: 0 4px 0 10px; vertical-align: -1px; background: var(--accent); }
.tr-key.prev { margin-left: 0; background: color-mix(in srgb, var(--accent) 38%, var(--surface)); }
.tr-key.today { background: repeating-linear-gradient(135deg, var(--accent) 0 3px, color-mix(in srgb, var(--accent) 55%, var(--surface)) 3px 6px); }
.trend-dlg h3 { margin: 16px 0 6px; font-size: 15px; }
.tr-table td, .tr-table th { white-space: nowrap; }
.tr-table tr.tr-total td { font-weight: 700; border-top: 2px solid var(--border); } .tr-table tr.tr-sub td { color: var(--text-2); font-size: 13px; }
.trend-dlg .recv-body li { display: block; }
@media (max-width: 700px) { .tr-facts { grid-template-columns: 1fr; } }
