:root {
  --navy: #071437; --blue: #1869ad; --ink: #0f172a; --muted: #64748b; --line: #e2e8f0; --bg: #f4f6fa; --panel: #ffffff;
  --ok: #15803d; --warn: #d97706; --danger: #b91c1c; --radius: 8px; --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif; --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14px; color: var(--ink); background: var(--bg); display: flex; flex-direction: column; }
a { color: var(--blue); text-decoration: none; }
h1, h2, h3 { margin: 0 0 .5rem; font-weight: 600; }
h2 { font-size: 1.25rem; } h3 { font-size: .95rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
code { font-family: var(--mono); font-size: .9em; }
.muted { color: var(--muted); } .small { font-size: .85em; } .hidden { display: none !important; }
.row { display: flex; gap: .5rem; align-items: center; } .row.wrap { flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem .75rem; } .span2 { grid-column: span 2; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } .span2 { grid-column: auto; } }

/* top bar */
.topbar { display: flex; align-items: center; gap: 1.25rem; padding: 0 1rem; height: 52px; background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 20; }
.brand { color: #fff; font-size: 1.05rem; letter-spacing: .02em; } .brand strong { color: #8ec5ff; }
.topbar nav { display: flex; gap: .25rem; }
.topbar nav a { color: #cbd5e1; padding: .45rem .7rem; border-radius: 6px; font-weight: 500; }
.topbar nav a.active, .topbar nav a:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.topbar nav a.drop-target { background: #8ec5ff; color: var(--navy); outline: 2px dashed #fff; }
.searchbox { position: relative; flex: 1; max-width: 420px; }
.searchbox input { width: 100%; padding: .45rem .7rem; border-radius: 6px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.1); color: #fff; }
.searchbox input::placeholder { color: #94a3b8; }
.usermenu { margin-left: auto; display: flex; align-items: center; gap: .6rem; }
.usermenu a { color: #cbd5e1; font-size: 1.2rem; } .usermenu .btn--link { color: #cbd5e1; }
.usermenu a.usermenu__assistant { padding: .25rem .7rem; border: 1px solid rgba(255, 255, 255, .3); border-radius: 999px; color: #fff; font-size: .85rem; font-weight: 500; white-space: nowrap; }
.usermenu a.usermenu__assistant:hover { background: rgba(255, 255, 255, .12); }
body.auth-mode .topbar nav, body.auth-mode .searchbox, body.auth-mode .usermenu { visibility: hidden; }

main#view { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* auth */
.auth { max-width: 360px; margin: 10vh auto; background: var(--panel); padding: 2rem; border-radius: 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: .75rem; }
.auth h1 { color: var(--navy); }
.form-error { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; padding: .5rem .75rem; border-radius: 6px; font-size: .9em; }

/* buttons & fields */
.btn { font: inherit; font-weight: 500; padding: .45rem .85rem; border-radius: 6px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: #cbd5e1; background: #f8fafc; }
.btn--primary { background: var(--blue); border-color: var(--blue); color: #fff; } .btn--primary:hover { background: #145a94; }
.btn--danger { background: var(--danger); border-color: var(--danger); color: #fff; } .btn--danger:hover { background: #991b1b; border-color: #991b1b; }
.btn--danger-ghost { color: var(--danger); } .btn--ghost { background: transparent; }
.btn--link { border: none; background: none; color: var(--blue); padding: .2rem .3rem; } .btn.small { padding: .25rem .6rem; font-size: .85em; }
.iconbtn { border: none; background: none; font-size: 1.15rem; line-height: 1; cursor: pointer; color: var(--muted); padding: .2rem .4rem; border-radius: 4px; }
.iconbtn:hover { background: #f1f5f9; color: var(--ink); }
input, select, textarea { font: inherit; padding: .42rem .55rem; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid #bfdbfe; border-color: var(--blue); }
input[type=checkbox], input[type=radio] { width: auto; }
textarea { resize: vertical; }
.field { display: flex; flex-direction: column; gap: .25rem; } .field--inline { flex-direction: row; align-items: center; }
.field__label { font-size: .78em; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 500; }
.field__hint { font-size: .8em; color: var(--muted); }
.check { display: inline-flex; align-items: center; gap: .3rem; margin-right: .75rem; }
.toggle { display: inline-flex; align-items: center; gap: .35rem; color: var(--muted); white-space: nowrap; }

/* chips / badges */
.chips { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; padding: .25rem; border: 1px solid var(--line); border-radius: 6px; background: #fff; min-height: 2.3rem; }
.chips__input { border: none; flex: 1; min-width: 7rem; padding: .25rem; }
.chip { --chip: #94a3b8; display: inline-flex; align-items: center; gap: .2rem; font-size: .76em; font-weight: 500; padding: .12rem .5rem; border-radius: 999px; background: color-mix(in srgb, var(--chip) 15%, white); color: color-mix(in srgb, var(--chip) 80%, black); border: 1px solid color-mix(in srgb, var(--chip) 35%, white); }
.chip__x { border: none; background: none; cursor: pointer; color: inherit; font-size: 1.1em; line-height: 1; padding: 0 0 0 .1rem; }
.badge { font-family: var(--mono); font-size: .72em; padding: .05rem .35rem; border-radius: 4px; background: #eef2ff; color: #3730a3; margin-left: .4rem; vertical-align: middle; }
.tag { font-size: .7em; text-transform: uppercase; letter-spacing: .05em; padding: .05rem .35rem; border-radius: 4px; background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; }
.type { font-size: .72em; text-transform: uppercase; letter-spacing: .05em; padding: .1rem .4rem; border-radius: 4px; background: #e2e8f0; color: #334155; }
.type--contact { background: #dbeafe; color: #1e40af; } .type--lead { background: #fef3c7; color: #92400e; } .type--deal { background: #dcfce7; color: #166534; } .type--archived { background: #fee2e2; color: #991b1b; }
.count { font-size: .8em; font-weight: 500; background: #e2e8f0; color: #334155; border-radius: 999px; padding: .05rem .5rem; margin-left: .4rem; }

/* suggestions dropdown */
.picker { position: relative; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.suggest { position: absolute; top: 100%; left: 0; right: 0; z-index: 30; background: #fff; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 8px 24px rgba(15,23,42,.12); max-height: 280px; overflow: auto; margin-top: 2px; }
.suggest__item { padding: .45rem .6rem; cursor: pointer; display: flex; flex-direction: column; gap: .1rem; color: var(--ink); }
.suggest__item small { color: var(--muted); } .suggest__item:hover { background: #f1f5f9; }
.suggest__item--new { color: var(--blue); font-weight: 500; } .suggest__item--empty { color: var(--muted); cursor: default; }
.searchbox .suggest__item { flex-direction: row; align-items: center; gap: .4rem; flex-wrap: wrap; }

/* board */
.board { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.board__toolbar { display: flex; gap: .5rem; align-items: center; padding: .6rem 1rem; background: var(--panel); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.board__toolbar select, .board__filter { width: auto; min-width: 9rem; }
.board__columns { display: flex; gap: .75rem; padding: .75rem 1rem; overflow-x: auto; flex: 1; min-height: 0; align-items: stretch; }
.column { flex: 0 0 272px; display: flex; flex-direction: column; background: #e9edf3; border-radius: 10px; max-height: 100%; }
.column__head { padding: .55rem .75rem; font-weight: 600; font-size: .8em; letter-spacing: .05em; color: #334155; display: flex; align-items: center; justify-content: space-between; }
.column__cards { flex: 1; overflow-y: auto; padding: 0 .5rem .5rem; display: flex; flex-direction: column; gap: .45rem; min-height: 60px; }
.column__empty { color: var(--muted); font-size: .85em; text-align: center; padding: 1rem 0; }
.column__more { margin: .25rem .5rem .5rem; }
.card { --icp: transparent; background: #fff; border-radius: 8px; padding: .55rem .65rem .55rem .75rem; box-shadow: var(--shadow); cursor: grab; border-left: 4px solid var(--icp); }
.card:hover { box-shadow: 0 2px 6px rgba(15,23,42,.15); }
.card--ghost { opacity: .4; } .card--chosen { cursor: grabbing; } .card--archived { display: none; }
/* trash bin (toolbar of each board): a large button in a slot of fixed size. While a card is dragged it is armed: it leaves
   the slot for a drop zone that reaches the top and right edges of the page (no gap to miss between the zone and those
   edges; the browser's own bar, above the page, is out of reach) and the toolbar does not move. Red under the pointer. */
.board__trash-slot { margin-left: auto; width: 12rem; height: 3rem; flex: none; }
.board__trash { width: 100%; height: 100%; font-size: 1.1rem; } .board__trash > * { pointer-events: none; }
.board__trash.is-armed { position: fixed; top: 0; right: 0; z-index: 40; width: min(22rem, 45vw); height: 9.5rem; font-size: 1.35rem; border: 3px dashed var(--danger); border-radius: 0 0 0 14px; color: var(--danger); background: #fef2f2; box-shadow: 0 8px 24px rgba(15,23,42,.18); }
.board__trash.is-over { background: var(--danger); border-color: var(--danger); color: #fff; }
.trash { display: flex; flex-direction: column; gap: .5rem; } .trash__list { display: flex; flex-direction: column; max-height: 60vh; overflow: auto; }
.trash__row { display: flex; align-items: center; gap: .6rem; padding: .4rem .2rem; border-bottom: 1px solid var(--line); }
.trash__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card__title { font-weight: 600; display: flex; align-items: center; justify-content: space-between; gap: .3rem; }
.card__sub { color: var(--muted); font-size: .88em; margin-top: .1rem; }
.card__meta { color: var(--muted); font-size: .82em; margin-top: .25rem; }
.card__labels { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .4rem; }
.card__next { margin-top: .4rem; font-size: .85em; color: #1e3a8a; background: #eff6ff; border-radius: 5px; padding: .2rem .4rem; }
.card__next.is-today { background: #fef9c3; color: #854d0e; } .card__next.is-overdue { background: #fee2e2; color: #991b1b; }
.card__next small { color: inherit; opacity: .8; }

/* drawer */
.drawer { position: fixed; top: 52px; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--panel); box-shadow: -8px 0 24px rgba(15,23,42,.12); transform: translateX(100%); transition: transform .18s ease; z-index: 15; overflow-y: auto; }
.drawer.open { transform: none; }
.drawer__inner { padding: 1rem 1.25rem 3rem; display: flex; flex-direction: column; gap: 1rem; }
.drawer__loading { padding: 2rem; color: var(--muted); }
.drawer__kicker { display: flex; align-items: center; gap: .4rem; } .drawer__close { margin-left: auto; }
.drawer__ask { margin-left: auto; padding: .15rem .65rem; border: 1px solid #cbd5e1; border-radius: 999px; font-size: .8rem; font-weight: 500; white-space: nowrap; } .drawer__ask:hover { border-color: var(--blue); }
.drawer__ask + .drawer__close { margin-left: .25rem; }
.drawer__stage { display: flex; align-items: center; gap: .5rem; margin-top: .5rem; } .drawer__stage select { width: auto; }
.drawer__section { border-top: 1px solid var(--line); padding-top: .75rem; display: flex; flex-direction: column; gap: .6rem; }
/* the title of a lead or deal is renamed in place: a click swaps it for its text box(es); the panel ends with Delete */
.drawer__head h2.is-editable { cursor: text; border-radius: 6px; padding: .2rem .4rem; margin: 0 0 .3rem -.4rem; }
.drawer__head h2.is-editable:hover, .drawer__head h2.is-editable:focus-visible { background: #f1f5f9; outline: none; }
.drawer__head h2.is-editable:hover::after { content: ' ✎'; color: var(--muted); font-weight: 400; }
.drawer__rename { display: flex; gap: .5rem; margin: 0 0 .3rem -.4rem; } .drawer__rename input { font-size: 1.25rem; font-weight: 600; padding: .2rem .4rem; }
.drawer__end { flex-direction: row; align-items: center; flex-wrap: wrap; }
.banner { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; padding: .5rem .75rem; border-radius: 6px; margin-top: .5rem; }
.people { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .35rem; }
.people li { display: flex; align-items: center; gap: .5rem; } .people li .iconbtn { margin-left: auto; }
.related { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; } .related ul { margin: .25rem 0 0; padding-left: 1rem; }
.person { display: flex; flex-direction: column; gap: .2rem; }

/* history */
.history__form { display: flex; flex-direction: column; gap: .4rem; background: #f8fafc; padding: .6rem; border-radius: 8px; }
.history__form select { width: auto; } .history__form .field { flex: 1; }
.history { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .5rem; }
.history__item { padding: .5rem .6rem; border-radius: 8px; background: #fff; border: 1px solid var(--line); }
.history__item--stage_change, .history__item--system { background: #f8fafc; border-style: dashed; }
.history__item.is-done .history__subject { text-decoration: line-through; color: var(--muted); }
.history__item.is-untrusted { border-left: 3px solid #fdba74; }
.history__head { display: flex; align-items: center; gap: .4rem; } .history__subject { font-weight: 500; flex: 1; } .history__del { opacity: 0; } .history__item:hover .history__del { opacity: 1; }
.history__body { white-space: pre-wrap; margin: .3rem 0 .2rem 1.6rem; color: #334155; }
.history__body.is-collapsed { max-height: 6.5em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.history__meta { margin-left: 1.6rem; }

/* to-dos board */
.todo-board .column { flex: 0 0 290px; }
.tcard { padding: .5rem .6rem; border-left-width: 0; }
.tcard.is-archived { opacity: .55; cursor: default; }
.tcard__labels { display: flex; flex-wrap: wrap; gap: .25rem; margin-bottom: .35rem; align-items: center; }
.lbl { display: inline-flex; align-items: center; gap: .15rem; font-size: .68em; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; padding: .15rem .45rem; border-radius: 4px; line-height: 1.2; white-space: nowrap; }
.lbl__x { border: none; background: none; color: inherit; cursor: pointer; font-size: 1.1em; line-height: 1; padding: 0 0 0 .1rem; opacity: .8; } .lbl__x:hover { opacity: 1; }
.tcard__title { font-weight: 500; line-height: 1.3; }
.tcard__badges { display: flex; flex-wrap: wrap; gap: .3rem .55rem; margin-top: .4rem; color: var(--muted); font-size: .78em; align-items: center; }
.tcard__badge.is-complete { color: var(--ok); }
.tcard__badge.due { padding: .05rem .35rem; border-radius: 4px; background: #f1f5f9; }
.tcard__badge.due.is-today { background: #fef3c7; color: #92400e; } .tcard__badge.due.is-overdue { background: #fee2e2; color: #991b1b; } .tcard__badge.due.is-done { background: #dcfce7; color: #166534; }
.tcard__badge.time.is-running { color: var(--ok); font-weight: 600; }
.tcard__badge.time.is-running::before, .type--running::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); margin-right: .3rem; animation: pulse 1.2s infinite; vertical-align: 1px; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.type--running { background: #dcfce7; color: #166534; text-transform: none; }
.tcard__entity { margin-top: .4rem; font-size: .8em; color: #334155; }
.tcard__step { color: var(--blue); font-weight: 600; }
.column__sum { font-weight: 500; color: var(--muted); font-size: .9em; text-transform: none; letter-spacing: 0; }
.composer { padding: .25rem .5rem .5rem; }
.composer__open { width: 100%; text-align: left; color: var(--muted); background: transparent; border: none; cursor: pointer; padding: .4rem .5rem; border-radius: 6px; font: inherit; }
.composer__open:hover { background: #dde3ea; color: var(--ink); }
.composer textarea { resize: none; }
.composer__row { display: flex; gap: .4rem; align-items: center; margin-top: .35rem; }

/* running-timer bar (top bar) */
.timerbar { display: flex; align-items: center; gap: .5rem; background: rgba(255,255,255,.12); border-radius: 6px; padding: .25rem .6rem; color: #fff; font-size: .9em; white-space: nowrap; }
.timerbar__clock { font-family: var(--mono); font-weight: 600; color: #8ef0b4; }
.timerbar__title { color: #e2e8f0; max-width: 220px; overflow: hidden; text-overflow: ellipsis; cursor: pointer; } .timerbar__title:hover { text-decoration: underline; }
.timerbar .iconbtn { color: #fff; font-size: 1rem; padding: .1rem .3rem; } .timerbar .iconbtn:hover { background: rgba(255,255,255,.15); color: #fff; }
body.auth-mode .timerbar { visibility: hidden; }

/* card dialog */
.modal.modal--xl { width: min(980px, 100%); }
.modal--card .modal__head { gap: .6rem; } .tcard-head { display: flex; align-items: center; gap: .6rem; flex: 1; min-width: 0; } .tcard-head__column { width: auto; font-weight: 600; letter-spacing: .04em; font-size: .85em; }
.tcard-modal { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.25rem; padding-bottom: .75rem; }
@media (max-width: 820px) { .tcard-modal { grid-template-columns: 1fr; } }
.tcard-modal__main { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.tcard-modal__side { display: flex; flex-direction: column; gap: .6rem; min-width: 0; } .tcard-modal__side h3 { margin: 0; }
.tcard-title { font-size: 1.25rem; font-weight: 600; border-color: transparent; padding: .2rem .4rem; margin-left: -.4rem; width: calc(100% + .4rem); background: transparent; }
.tcard-title:hover, .tcard-title:focus { border-color: var(--line); background: #fff; }
.tcard-section { display: flex; flex-direction: column; gap: .45rem; }
.tcard-section__head { display: flex; align-items: center; gap: .5rem; } .tcard-section__head h4 { margin: 0; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); flex: 1; font-weight: 600; }
.dates .field { flex: 1; min-width: 150px; }
.tcard-desc { white-space: pre-wrap; line-height: 1.45; color: #334155; cursor: text; padding: .45rem .55rem; border-radius: 6px; background: #f8fafc; min-height: 2.4rem; } .tcard-desc:hover { background: #f1f5f9; }
.tcard-desc.is-empty { color: var(--muted); } .tcard-desc a { word-break: break-all; }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .2rem; }
.checklist li { display: flex; align-items: center; gap: .5rem; padding: .15rem .25rem; border-radius: 4px; } .checklist li:hover { background: #f8fafc; }
.checklist li span { flex: 1; } .checklist li.is-done span { text-decoration: line-through; color: var(--muted); } .checklist li .iconbtn { opacity: 0; } .checklist li:hover .iconbtn { opacity: 1; }
.links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .25rem; } .links li { display: flex; gap: .4rem; align-items: center; } .links li a { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.time-total { font-family: var(--mono); font-size: 1.3rem; font-weight: 600; min-width: 5.5rem; } .time-total.is-running { color: var(--ok); }
.entries td { white-space: nowrap; } .entries td:nth-child(4) { white-space: normal; } .entries tr.is-running td { color: var(--ok); } .is-running-text { font-weight: 600; }
.comment { background: #f8fafc; border-radius: 8px; padding: .5rem .6rem; } .comment__meta { color: var(--muted); font-size: .8em; display: flex; gap: .4rem; align-items: center; } .comment__body { white-space: pre-wrap; margin-top: .2rem; }
.activity { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; max-height: 65vh; overflow: auto; }
.activity__sys { color: #475569; font-size: .85em; padding: .1rem .2rem; }
.menu { position: relative; display: inline-block; }
.menu__list { position: absolute; left: 0; top: 100%; margin-top: 2px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(15,23,42,.12); z-index: 70; min-width: 230px; padding: .25rem; }
.menu__item { display: block; width: 100%; text-align: left; background: none; border: none; padding: .45rem .6rem; border-radius: 6px; cursor: pointer; font: inherit; color: var(--ink); } .menu__item:hover { background: #f1f5f9; }
.picklist { display: flex; flex-direction: column; gap: .15rem; max-height: 50vh; overflow: auto; margin-top: .5rem; }
.picker-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; } .picker-cols h4 { margin: 0 0 .4rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.pick { display: flex; align-items: center; gap: .5rem; padding: .25rem 0; cursor: pointer; }
@media (max-width: 640px) { .picker-cols { grid-template-columns: 1fr; } }

/* weekly report */
.report-view { padding: 1rem; max-width: 1100px; display: flex; flex-direction: column; gap: 1rem; width: 100%; }
.report-nav { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; } .report-nav__title h2 { margin: 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem; }
.tile { background: var(--panel); border-radius: 10px; padding: .75rem 1rem; box-shadow: var(--shadow); } .tile__label { font-size: .75em; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); } .tile__value { font-size: 1.4rem; font-weight: 600; font-family: var(--mono); } .tile__sub { color: var(--muted); font-size: .85em; }
.split { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--panel); border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; }
.split th, .split td { padding: .6rem .75rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; } .split tr:last-child td { border-bottom: none; }
.split th { font-size: .78em; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #f8fafc; }
.split .sq { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: .5rem; }
.split .ex { color: var(--muted); font-size: .9em; } .split .num { font-family: var(--mono); white-space: nowrap; }
.split tr.total td { font-weight: 600; background: #f8fafc; } .split tr.private td { color: var(--muted); }
.split--no-hours .col-hours { display: none; }
.bar { display: flex; align-items: center; gap: .6rem; } .bar__track { flex: 1; height: 12px; background: #eef2f7; border-radius: 3px; overflow: hidden; max-width: 260px; }
.bar__fill { height: 100%; border-radius: 3px; background-image: repeating-linear-gradient(90deg, transparent 0 9px, rgba(255,255,255,.65) 9px 11px); }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: .5rem; background: var(--panel); border-radius: 10px; padding: .75rem 1rem .6rem; box-shadow: var(--shadow); }
.day { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 150px; gap: .25rem; font-size: .78em; color: var(--muted); }
.day__value { font-family: var(--mono); } .day__bar { width: 60%; background: var(--blue); border-radius: 4px 4px 0 0; } .day.is-today .day__bar { background: var(--warn); } .day.is-today { color: var(--ink); }
.done-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; } .done-list li { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.report-view details { color: var(--muted); } .report-view details ul { margin-top: .5rem; }

/* settings / tables */
.settings { padding: 1rem; display: flex; flex-direction: column; gap: 1rem; max-width: 1100px; }
.panel { background: var(--panel); border-radius: 10px; padding: 1rem 1.25rem; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: .6rem; }
.table { width: 100%; border-collapse: collapse; } .table th, .table td { text-align: left; padding: .4rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .78em; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); } .table--dense td { padding: .25rem .4rem; font-size: .9em; }
.table tr.is-error td { background: #fef2f2; }
/* lost reasons: the list kept in Settings; the picker of a deal (its drop-down, and under it the text box "Other…" opens) */
.reasons { max-width: 46rem; } .reasons td { vertical-align: middle; } .reasons td:first-child { width: 100%; } .reasons input[type=number] { width: 5rem; }
.reasons__new input { max-width: 22rem; }
.lost-reason { display: flex; flex-direction: column; gap: .4rem; }
.secret { display: block; padding: .6rem; background: #0f172a; color: #e2e8f0; border-radius: 6px; word-break: break-all; margin-top: .5rem; }
.mfa { display: flex; flex-direction: column; gap: .5rem; align-items: center; } .qr { width: 200px; height: 200px; }

/* modal & toasts */
.overlay { position: fixed; inset: 0; background: rgba(15,23,42,.45); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 1rem; }
.modal { background: #fff; border-radius: 12px; width: min(520px, 100%); max-height: 92vh; overflow: auto; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(15,23,42,.3); }
.modal--wide { width: min(760px, 100%); }
.modal__head { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1.25rem .5rem; } .modal__head h3 { text-transform: none; color: var(--ink); font-size: 1.05rem; letter-spacing: 0; }
.modal__body { padding: .25rem 1.25rem; display: flex; flex-direction: column; gap: .6rem; }
.modal__actions { display: flex; justify-content: flex-end; gap: .5rem; padding: .9rem 1.25rem 1.1rem; }
#toasts { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: .4rem; z-index: 60; }
.toast { background: var(--ink); color: #fff; padding: .55rem .9rem; border-radius: 8px; box-shadow: var(--shadow); font-size: .9em; }
.toast--ok { background: var(--ok); } .toast--warn { background: var(--warn); } .toast--error { background: var(--danger); }
.toast__action { font: inherit; font-weight: 600; margin-left: .8rem; padding: 0; border: none; background: none; color: inherit; text-decoration: underline; cursor: pointer; }

/* importer */
.import { padding: 1rem; display: flex; flex-direction: column; gap: 1rem; max-width: 1100px; }
.dropzone { border: 2px dashed #cbd5e1; border-radius: 10px; padding: 1.5rem; text-align: center; color: var(--muted); background: #fff; }
.dropzone.is-over { border-color: var(--blue); background: #eff6ff; }
.progress { height: 8px; background: #e2e8f0; border-radius: 999px; overflow: hidden; } .progress > div { height: 100%; background: var(--blue); width: 0; transition: width .2s; }
.import .panel > .row > h3 { margin: 0; flex: 1; }
.import select.target-select, .import select.again-select, .import select.opt-select, .import select.map__add { width: auto; }
.import tr.is-current td { background: #eff6ff; }
.banner--warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.steps { display: flex; gap: .25rem; } .step { font: inherit; font-weight: 500; padding: .35rem .8rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); cursor: pointer; }
.step.is-on { background: var(--navy); border-color: var(--navy); color: #fff; }
.step-body { display: flex; flex-direction: column; gap: .7rem; } .step-body .opts { gap: .5rem 1.25rem; } .step-body .field--inline { gap: .35rem; white-space: nowrap; }
.map td:first-child { width: 17rem; } .map .req { color: var(--danger); } .map__group td { background: var(--bg); font-size: .78em; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 500; }
.map__srcs { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; } .map__srcs .chip { font-size: .85em; } .map__add { padding: .15rem .3rem; color: var(--muted); max-width: 9rem; }
.map__sample { max-width: 22rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.values h4 { margin: .4rem 0 .2rem; } .values td:first-child { width: 45%; overflow-wrap: anywhere; } .values select { max-width: 30rem; }
.st { font-size: .76em; font-weight: 500; padding: .1rem .5rem; border-radius: 999px; background: #e2e8f0; color: #334155; border: 1px solid transparent; white-space: nowrap; }
.st--new { background: #dbeafe; color: #1e40af; } .st--imported { background: #dcfce7; color: #166534; } .st--failed, .st--invalid { background: #fee2e2; color: #991b1b; } .st--skipped, .st--duplicate { background: #fef3c7; color: #92400e; }
.count-btn { font: inherit; font-size: .85em; cursor: pointer; padding: .25rem .7rem; } .count-btn.is-on { border-color: currentColor; box-shadow: 0 0 0 1px currentColor; }
.effects { margin: 0; padding-left: 1.1rem; color: #334155; } .import .progress { flex: 1; }
.rev { display: grid; grid-template-columns: minmax(16rem, 2fr) 3fr; gap: .75rem; align-items: start; } @media (max-width: 820px) { .rev { grid-template-columns: 1fr; } }
.rev__list { border: 1px solid var(--line); border-radius: 8px; max-height: 60vh; overflow: auto; background: #fff; }
.rev__row { display: flex; gap: .5rem; align-items: baseline; padding: .3rem .55rem; border-bottom: 1px solid var(--line); cursor: pointer; } .rev__row:hover { background: #f8fafc; }
.rev__row.is-on { background: #eff6ff; box-shadow: inset 3px 0 0 var(--blue); } .rev__line { min-width: 2.2rem; text-align: right; } .rev__title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rev__detail { border: 1px solid var(--line); border-radius: 8px; padding: .75rem .9rem; background: #fff; display: flex; flex-direction: column; gap: .55rem; position: sticky; top: 60px; }
.rev__detail th { width: 9.5rem; text-transform: none; font-size: .9em; letter-spacing: 0; } .rev__value { white-space: pre-wrap; overflow-wrap: anywhere; }
.history-panel summary { cursor: pointer; font-weight: 500; }

/* the way in (auth-gate.js) and Settings → Users */
.auth .qr { align-self: center; } .auth__hint { margin: 0; } .mfa-secret { word-break: break-all; }
.auth button[disabled] { opacity: .6; cursor: default; }
.users td { vertical-align: middle; } .users .tag { margin-left: .4rem; } .users__actions { gap: .3rem; }
.users__link { user-select: all; } .settings__password { margin-top: .75rem; align-items: center; }
