:root {
  /* Warm cream canvas + dark indigo ink, brand violet accent */
  --bg: #f5f4ec;
  --bg-2: #efeee4;
  --surface: #ffffff;
  --ink: #1d1a33;
  --ink-2: #3a3654;
  --muted: #74708a;
  --faint: #9b97ad;
  --line: #e7e5da;
  --line-soft: #efeee6;

  --accent: #6c2bd9;
  --accent-ink: #5a1fc0;
  --accent-soft: #f1eafe;
  --accent-soft-line: #e4d6fb;

  --dark-btn: #1b1830;
  --dark-btn-hov: #2c2850;

  /* functional status hues — harmonious, moderate chroma */
  --pri-alta: oklch(0.62 0.16 25);
  --pri-alta-soft: oklch(0.95 0.04 25);
  --pri-media: oklch(0.72 0.13 70);
  --pri-media-soft: oklch(0.95 0.05 78);
  --pri-bassa: oklch(0.66 0.11 155);
  --pri-bassa-soft: oklch(0.95 0.04 155);

  --radius: 16px;
  --radius-sm: 11px;
  --shadow-card: 0 1px 2px rgba(29,26,51,.04), 0 4px 16px rgba(29,26,51,.04);
  --shadow-card-hov: 0 2px 4px rgba(29,26,51,.06), 0 10px 30px rgba(108,43,217,.10);
  --gap: 14px;

  --font: "Poppins", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button { font-family: inherit; cursor: pointer; }

/* ---------- shell ---------- */
.shell { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); transition: background .25s, color .25s; }
/* Disable every transition during a theme flip so transitioned color/background
   properties re-resolve instantly from the new CSS variables. */
.theme-switching, .theme-switching *, .theme-switching *::before, .theme-switching *::after { transition: none !important; }

/* ---------- dark theme ---------- */
.shell.dark {
  --bg: #14121d;
  --bg-2: #211d2e;
  --surface: #1d1a28;
  --ink: #f4f2fa;
  --ink-2: #d6d2e3;
  --muted: #9893ac;
  --faint: #6c6781;
  --line: #2d2940;
  --line-soft: #262236;
  --accent-ink: #b89bf5;
  --accent-soft: rgba(108,43,217,.20);
  --accent-soft-line: rgba(124,71,224,.40);
  --dark-btn: #6c2bd9;
  --dark-btn-hov: #7d40e6;
  --pri-alta-soft: oklch(0.32 0.07 25);
  --pri-media-soft: oklch(0.33 0.06 75);
  --pri-bassa-soft: oklch(0.32 0.06 155);
  --shadow-card: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
  --shadow-card-hov: 0 2px 4px rgba(0,0,0,.35), 0 10px 30px rgba(108,43,217,.28);
}
.shell.dark .topbar { background: rgba(20,18,29,.82); }
.shell.dark .checkbox { border-color: #4a4560; }
.shell.dark .sw { background: #413c54; }
.shell.dark .st-assigned, .shell.dark .mc-blue, .shell.dark .rt-am { background: rgba(82,107,200,.22); color: #a9bdf5; }
.shell.dark .chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.shell.dark .pri-tag-media { color: oklch(0.8 0.13 80); }
.shell.dark .pri-tag-bassa { color: oklch(0.78 0.11 155); }
.shell.dark .st-review, .shell.dark .br-wait, .shell.dark .ms-wait { color: oklch(0.8 0.13 80); }
.shell.dark .st-done, .shell.dark .br-ok, .shell.dark .rs-ok, .shell.dark .oc-ok, .shell.dark .is-on, .shell.dark .task-made, .shell.dark .week-pct { color: oklch(0.78 0.11 155); }
.shell.dark .brand-name, .shell.dark .acct-mail { color: var(--ink); }
.shell.dark .bar-fill { background: linear-gradient(180deg, var(--accent), color-mix(in oklab, var(--accent) 55%, #000)); }

.theme-toggle {
  width: 40px; height: 40px; border-radius: 10px; flex: none;
  display: grid; place-items: center; color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--line); transition: .15s;
}
.theme-toggle:hover { color: var(--accent-ink); border-color: var(--accent-soft-line); background: var(--accent-soft); }
.shell.dark .theme-toggle { color: #f6d57a; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 40px; }

/* ---------- header ---------- */
.topbar {
  background: rgba(245,244,236,.82);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
}
.topbar-in { height: 84px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 13px; }
.brand-logo { height: 66px; width: auto; display: block; }
.brand-logo.dark-only { display: none; }
.shell.dark .brand-logo.light-only { display: none; }
.shell.dark .brand-logo.dark-only { display: block; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(140deg, #2a2350, #6c2bd9);
  display: grid; place-items: center; color: #fff;
  font-family: var(--font); font-weight: 700; font-size: 16px; letter-spacing: -.5px;
  box-shadow: 0 6px 16px rgba(108,43,217,.28);
}
.brand-name { font-family: var(--font); font-weight: 700; font-size: 21px; letter-spacing: -.3px; color: var(--ink); line-height: 1; }
.brand-tag { font-family: var(--font); font-size: 11px; font-weight: 500; color: var(--muted); margin-top: 3px; }
.brand-tag b { color: var(--accent); font-weight: 700; }

.top-right { display: flex; align-items: center; gap: 18px; }
.acct { display: flex; align-items: center; gap: 10px; }
.acct-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-ink);
  display: grid; place-items: center; font-family: var(--font); font-weight: 600; font-size: 13px;
  border: 1px solid var(--accent-soft-line);
}
.acct-mail { font-size: 12.5px; font-weight: 600; color: var(--muted); letter-spacing: .2px; }
.logout {
  font-size: 13px; font-weight: 600; color: var(--ink-2);
  background: none; border: 1px solid var(--line); padding: 8px 15px; border-radius: 9px;
  transition: .15s;
}
.logout:hover { border-color: var(--accent-soft-line); color: var(--accent-ink); background: var(--accent-soft); }

/* ---------- tabs ---------- */
.tabs { display: flex; align-items: stretch; gap: 4px; border-bottom: 1px solid var(--line); margin-top: 8px; }
.tab {
  position: relative; display: flex; align-items: center; gap: 9px;
  padding: 18px 16px 16px; background: none; border: 0;
  font-family: var(--font); font-weight: 500; font-size: 15.5px; color: var(--muted);
  transition: color .15s;
}
.tab:hover { color: var(--ink-2); }
.tab.active { color: var(--ink); font-weight: 600; }
.tab.active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 3px;
  background: var(--accent); border-radius: 3px 3px 0 0;
}
.tab-count {
  font-family: var(--font-body); font-size: 12px; font-weight: 700; line-height: 1;
  padding: 4px 8px; border-radius: 999px; background: var(--bg-2); color: var(--muted);
}
.tab.active .tab-count { background: var(--accent-soft); color: var(--accent-ink); }
.tab-count.hot { background: var(--accent); color: #fff; }

/* ---------- page head ---------- */
.page { padding: 30px 0 80px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-title { font-family: var(--font); font-weight: 700; font-size: 26px; color: var(--ink); letter-spacing: -.4px; margin: 0; display: flex; align-items: baseline; gap: 10px; }
.page-title .n { color: var(--accent); }
.page-sub { font-size: 13.5px; color: var(--muted); margin-top: 6px; }
.refresh {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font); font-weight: 600; font-size: 14px; color: var(--accent-ink);
  background: var(--surface); border: 1px solid var(--accent-soft-line); padding: 9px 16px; border-radius: 10px;
  transition: .15s;
}
.refresh:hover { background: var(--accent-soft); }
.refresh svg { transition: transform .5s; }
.refresh:hover svg { transform: rotate(180deg); }

/* ---------- toolbar ---------- */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search {
  flex: 1; min-width: 220px; display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 0 14px; height: 44px;
}
.search input { border: 0; outline: 0; background: none; flex: 1; font-family: var(--font-body); font-size: 14.5px; color: var(--ink-2); }
.search input::placeholder { color: var(--faint); }
.search svg { color: var(--faint); flex: none; }
.chips { display: flex; gap: 7px; }
.chip {
  font-family: var(--font); font-weight: 500; font-size: 13.5px; color: var(--muted);
  background: var(--surface); border: 1px solid var(--line); padding: 9px 14px; border-radius: 999px; transition: .15s;
}
.chip:hover { color: var(--ink-2); border-color: #d9d6cb; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- select bar ---------- */
.selbar {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 16px; margin-bottom: var(--gap);
}
.selbar.compact { padding: 9px 14px; }
.sel-left { display: flex; align-items: center; gap: 14px; }
.checkbox {
  width: 19px; height: 19px; border-radius: 6px; border: 1.8px solid #c9c6bb; background: var(--surface);
  display: grid; place-items: center; transition: .12s; flex: none;
}
.checkbox.on { background: var(--accent); border-color: var(--accent); }
.checkbox svg { opacity: 0; color: #fff; transform: scale(.6); transition: .12s; }
.checkbox.on svg { opacity: 1; transform: scale(1); }
.sel-label { font-family: var(--font); font-weight: 600; font-size: 14px; color: var(--ink-2); }
.sel-count { font-size: 13.5px; color: var(--muted); }
.btn-del {
  font-family: var(--font); font-weight: 600; font-size: 13.5px; color: #fff;
  background: var(--pri-alta); border: 0; padding: 10px 18px; border-radius: 9px; transition: .15s;
}
.btn-del[disabled] { background: var(--bg-2); color: var(--faint); cursor: not-allowed; }
.btn-del:not([disabled]):hover { filter: brightness(.94); }
/* F22 v0.15.1 — selbar Inbox: gruppo azioni (Push ClickUp + Elimina) */
.sel-actions { display: flex; align-items: center; gap: 10px; }
.btn-push {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font); font-weight: 600; font-size: 13.5px; color: #fff;
  background: var(--accent); border: 0; padding: 10px 18px; border-radius: 9px; transition: .15s;
}
.btn-push[disabled] { background: var(--bg-2); color: var(--faint); cursor: not-allowed; }
.btn-push:not([disabled]):hover { filter: brightness(1.06); }

/* ---------- task card ---------- */
.list { display: flex; flex-direction: column; gap: var(--gap); }
.card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow-card);
  display: flex; gap: 16px; transition: box-shadow .18s, border-color .18s, transform .18s;
}
.card:hover { box-shadow: var(--shadow-card-hov); border-color: var(--accent-soft-line); transform: translateY(-1px); }
.card.sel { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.card.pri-alta::before {
  content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 3.5px;
  background: var(--pri-alta); border-radius: 0 3px 3px 0;
}
.card-check { padding-top: 3px; }
.card-body { flex: 1; min-width: 0; }

.card-top { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; flex-wrap: wrap; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font); font-weight: 600; font-size: 11.5px; letter-spacing: .4px; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px; white-space: nowrap;
}
.badge-auto { background: var(--accent-soft); color: var(--accent-ink); border: 1px solid var(--accent-soft-line); }
.badge-auto .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.badge-manual { background: var(--bg-2); color: var(--muted); border: 1px solid var(--line); }

.pri { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font); font-weight: 600; font-size: 12px; padding: 5px 10px; border-radius: 999px; }
.pri .dot { width: 7px; height: 7px; border-radius: 50%; }
.pri-tag-alta { background: var(--pri-alta-soft); color: var(--pri-alta); }
.pri-tag-alta .dot { background: var(--pri-alta); }
.pri-tag-media { background: var(--pri-media-soft); color: oklch(0.5 0.13 70); }
.pri-tag-media .dot { background: var(--pri-media); }
.pri-tag-bassa { background: var(--pri-bassa-soft); color: oklch(0.46 0.11 155); }
.pri-tag-bassa .dot { background: var(--pri-bassa); }

.card-title { font-family: var(--font); font-weight: 600; font-size: 18px; line-height: 1.32; color: var(--ink); margin: 0 0 8px; letter-spacing: -.2px; text-wrap: pretty; }
.card-desc { font-size: 14.5px; line-height: 1.6; color: var(--muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-wrap: pretty; }
.card-desc.open { -webkit-line-clamp: unset; }
.desc-toggle { background: none; border: 0; color: var(--accent-ink); font-family: var(--font); font-weight: 600; font-size: 13px; padding: 4px 0 0; }

.card-meta { display: flex; align-items: center; gap: 16px; margin-top: 14px; flex-wrap: wrap; }
.meta { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); }
.meta svg { color: var(--faint); flex: none; }
.meta b { color: var(--ink-2); font-weight: 600; }
.meta-sep { width: 4px; height: 4px; border-radius: 50%; background: #d3d0c4; }

.card-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 14px; flex: none; }
.btn-triage {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font); font-weight: 600; font-size: 14.5px; color: #fff;
  background: var(--dark-btn); border: 0; padding: 12px 22px; border-radius: 11px; transition: .15s;
  box-shadow: 0 4px 12px rgba(27,24,48,.18);
}
.btn-triage:hover { background: var(--dark-btn-hov); }
.btn-triage svg { transition: transform .15s; }
.btn-triage:hover svg { transform: translateX(3px); }
.kebab { width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); display: grid; place-items: center; transition: .15s; }
.kebab:hover { background: var(--bg-2); color: var(--ink-2); }

/* compact density */
.compact .card { padding: 14px 18px; border-radius: var(--radius-sm); }
.compact .card-title { font-size: 16px; margin-bottom: 5px; }
.compact .card-desc { -webkit-line-clamp: 1; font-size: 13.5px; }
.compact .card-meta { margin-top: 9px; }
.compact .btn-triage { padding: 9px 16px; font-size: 13.5px; }

/* row style (no card) */
.rows .list { gap: 0; }
.rows .card { border-radius: 0; border-left: 0; border-right: 0; border-top: 0; box-shadow: none; background: transparent; transform: none; }
.rows .card:first-child { border-top: 1px solid var(--line); }
.rows .card:hover { background: var(--surface); border-color: var(--line); }
.rows .card.pri-alta::before { left: -2px; }

/* ---------- empty state ---------- */
.empty { text-align: center; padding: 80px 20px; }
.empty-ic { width: 76px; height: 76px; border-radius: 22px; background: var(--accent-soft); border: 1px solid var(--accent-soft-line); display: grid; place-items: center; margin: 0 auto 22px; color: var(--accent); }
.empty h3 { font-family: var(--font); font-weight: 700; font-size: 20px; color: var(--ink); margin: 0 0 8px; }
.empty p { font-size: 14.5px; color: var(--muted); margin: 0; }

/* placeholder tabs */
.placeholder { padding: 70px 20px; text-align: center; }
.placeholder .empty-ic { background: var(--bg-2); border-color: var(--line); color: var(--faint); }
.placeholder h3 { font-family: var(--font); font-weight: 700; font-size: 19px; color: var(--ink-2); margin: 0 0 6px; }
.placeholder p { font-size: 14px; color: var(--muted); margin: 0; }

/* ============ shared buttons / bits ============ */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font); font-weight: 600; font-size: 14px; color: #fff;
  background: var(--accent); border: 0; padding: 11px 18px; border-radius: 10px; transition: .15s;
  box-shadow: 0 4px 12px rgba(108,43,217,.22);
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost {
  font-family: var(--font); font-weight: 600; font-size: 14px; color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--line); padding: 11px 16px; border-radius: 10px; transition: .15s;
}
.btn-ghost:hover { border-color: var(--accent-soft-line); color: var(--accent-ink); background: var(--accent-soft); }
.btn-ghost.danger:hover { border-color: oklch(0.85 0.06 25); color: var(--pri-alta); background: var(--pri-alta-soft); }
.btn-ghost.sm { padding: 7px 13px; font-size: 13px; }

.pdot { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; }
.av {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: var(--accent-soft); color: var(--accent-ink); border: 1px solid var(--accent-soft-line);
  display: inline-grid; place-items: center; font-family: var(--font); font-weight: 600; font-size: 12px;
}
.av.sm { width: 24px; height: 24px; font-size: 10.5px; }
.av.lg { width: 44px; height: 44px; font-size: 15px; }
.av.av-empty { background: var(--bg-2); color: var(--faint); border-color: var(--line); }
.meta.sm { font-size: 12px; }

/* ============ TASK BOARD ============ */
.board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; align-items: start; }
.bcol { background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: 14px; padding: 12px; }
.bcol-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 12px; font-family: var(--font); font-weight: 600; font-size: 14px; color: var(--ink-2); }
.bcol-count { font-size: 12px; font-weight: 700; color: var(--muted); background: var(--surface); border: 1px solid var(--line); padding: 2px 9px; border-radius: 999px; }
.bcol-list { display: flex; flex-direction: column; gap: 10px; min-height: 40px; }
.bcard { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; box-shadow: var(--shadow-card); cursor: grab; transition: .15s; }
.bcard:hover { box-shadow: var(--shadow-card-hov); transform: translateY(-1px); }
.bcard.pri-alta { border-left: 3px solid var(--pri-alta); }
.bcard-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.bcard-client { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font); font-weight: 600; font-size: 12.5px; color: var(--ink-2); }
.bcard-chan { font-size: 11px; font-weight: 600; color: var(--muted); background: var(--bg-2); padding: 3px 8px; border-radius: 6px; }
.bcard-title { font-size: 14px; line-height: 1.4; color: var(--ink); margin-bottom: 12px; text-wrap: pretty; }
.bcard-foot { display: flex; align-items: center; justify-content: space-between; }

/* ============ MAIL ============ */
.mail { display: grid; grid-template-columns: 380px 1fr; gap: 16px; align-items: start; }
.mail-list { display: flex; flex-direction: column; gap: 8px; }
.mrow { text-align: left; display: flex; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; transition: .15s; }
.mrow:hover { border-color: var(--accent-soft-line); }
.mrow.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.mrow-dot { width: 8px; height: 8px; border-radius: 50%; background: transparent; margin-top: 6px; flex: none; }
.mrow.unread .mrow-dot { background: var(--accent); }
.mrow-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mrow-top { display: flex; justify-content: space-between; gap: 8px; }
.mrow-from { font-family: var(--font); font-weight: 600; font-size: 13.5px; color: var(--ink); }
.mrow.unread .mrow-from { color: var(--ink); }
.mrow-time { font-size: 12px; color: var(--faint); flex: none; }
.mrow-subj { font-size: 13.5px; font-weight: 500; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow-snip { font-size: 12.5px; color: var(--muted); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mstatus { font-family: var(--font); font-weight: 600; font-size: 11px; padding: 3px 9px; border-radius: 999px; width: fit-content; margin-top: 3px; }
.ms-ok { background: var(--accent-soft); color: var(--accent-ink); }
.ms-wait { background: var(--pri-media-soft); color: oklch(0.5 0.13 70); }
.ms-mute { background: var(--bg-2); color: var(--muted); }
.mail-view { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; box-shadow: var(--shadow-card); position: sticky; top: 110px; }
.mv-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--line-soft); margin-bottom: 18px; }
.mv-subj { font-family: var(--font); font-weight: 700; font-size: 19px; color: var(--ink); letter-spacing: -.3px; margin-bottom: 8px; text-wrap: pretty; }
.mv-from { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--muted); }
.mv-body { font-size: 14.5px; line-height: 1.7; color: var(--ink-2); }
.mv-body p { margin: 0 0 14px; }
.mv-sign { color: var(--muted); }
.mv-actions { display: flex; gap: 10px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line-soft); }

/* ============ TABLES (bulk + storico) ============ */
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-card); overflow: hidden; }
.trow { display: grid; grid-template-columns: 2.4fr 1fr 1fr 1.2fr .9fr .9fr; align-items: center; gap: 16px; padding: 16px 22px; border-bottom: 1px solid var(--line-soft); }
.trow.h-grid { grid-template-columns: 1fr 1.3fr 2.4fr 1.3fr 1fr .8fr; }
.trow:last-child { border-bottom: 0; }
.trow:not(.thead):hover { background: var(--bg); }
.thead { background: var(--bg-2); font-family: var(--font); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); padding: 13px 22px; }
.tc-num { text-align: right; }
.tc-name { display: flex; flex-direction: column; gap: 3px; }
.t-title { font-family: var(--font); font-weight: 600; font-size: 14.5px; color: var(--ink); }
.t-client { font-size: 12.5px; color: var(--muted); }
.t-client.strong { font-family: var(--font); font-weight: 600; font-size: 14px; color: var(--ink-2); }
.t-sched, .t-date, .t-owner { font-size: 13.5px; color: var(--muted); }
.t-dash { color: var(--faint); }
.rate { font-family: var(--font); font-weight: 700; color: var(--ink); }
.bstatus { font-family: var(--font); font-weight: 600; font-size: 12px; padding: 5px 11px; border-radius: 999px; white-space: nowrap; }
.bs-draft { background: var(--bg-2); color: var(--muted); }
.bs-sched { background: var(--pri-media-soft); color: oklch(0.5 0.13 70); }
.bs-sent { background: var(--pri-bassa-soft); color: oklch(0.46 0.11 155); }
.oc-ok { background: var(--pri-bassa-soft); color: oklch(0.46 0.11 155); }
.oc-no { background: var(--pri-alta-soft); color: var(--pri-alta); }

/* ============ CARICO ============ */
.wl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.wl-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-card); }
.wl-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.wl-id { flex: 1; min-width: 0; }
.wl-name { font-family: var(--font); font-weight: 600; font-size: 15.5px; color: var(--ink); }
.wl-role { font-size: 12.5px; color: var(--muted); }
.wl-over { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font); font-weight: 600; font-size: 11.5px; color: var(--pri-alta); background: var(--pri-alta-soft); padding: 4px 9px; border-radius: 999px; }
.wl-bar-top { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 7px; }
.wl-pct { font-family: var(--font); font-weight: 700; }
.wl-pct.ok { color: var(--pri-bassa); } .wl-pct.high { color: var(--pri-media); } .wl-pct.full { color: var(--pri-alta); }
.wl-track { height: 9px; background: var(--bg-2); border-radius: 999px; overflow: hidden; }
.wl-fill { height: 100%; border-radius: 999px; transition: width .4s; }
.wl-fill.ok { background: var(--pri-bassa); } .wl-fill.high { background: var(--pri-media); } .wl-fill.full { background: var(--pri-alta); }
.wl-clients { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.wl-chip { font-size: 12px; font-weight: 500; color: var(--ink-2); background: var(--bg-2); border: 1px solid var(--line-soft); padding: 4px 10px; border-radius: 7px; }

/* ============ REPORT ============ */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-card); }
.kpi-label { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.kpi-val { font-family: var(--font); font-weight: 700; font-size: 30px; color: var(--ink); letter-spacing: -.5px; line-height: 1; }
.kpi-delta { display: inline-flex; align-items: center; gap: 3px; font-family: var(--font); font-weight: 600; font-size: 12.5px; margin-top: 9px; }
.kpi-delta.up { color: var(--pri-bassa); } .kpi-delta.down { color: var(--pri-alta); }
.kpi-delta.down svg { transform: rotate(180deg); }
.rep-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-card); }
.panel.wide { grid-column: 1 / -1; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 22px; font-family: var(--font); font-weight: 600; font-size: 15.5px; color: var(--ink); }
.panel-sub { font-family: var(--font-body); font-weight: 500; font-size: 12.5px; color: var(--muted); }
.bars { display: flex; align-items: flex-end; gap: 14px; height: 190px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 9px; height: 100%; }
.bar-track { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.bar-fill { width: 100%; background: linear-gradient(180deg, var(--accent), color-mix(in oklab, var(--accent) 72%, #fff)); border-radius: 8px 8px 0 0; position: relative; min-height: 6px; transition: height .4s; }
.bar-v { position: absolute; top: -20px; left: 0; right: 0; text-align: center; font-family: var(--font); font-weight: 600; font-size: 12px; color: var(--ink-2); }
.bar-x { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.donut-wrap { display: flex; align-items: center; gap: 24px; }
.donut-num { font-family: var(--font); font-weight: 700; font-size: 26px; fill: var(--ink); }
.donut-lbl { font-family: var(--font-body); font-size: 11px; fill: var(--muted); }
.legend { display: flex; flex-direction: column; gap: 12px; }
.leg { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--ink-2); }
.leg b { font-family: var(--font); margin-left: 4px; color: var(--ink); }
.leg-dot { width: 11px; height: 11px; border-radius: 3px; }
.hbars { display: flex; flex-direction: column; gap: 14px; }
.hbar { display: grid; grid-template-columns: 160px 1fr 36px; align-items: center; gap: 14px; }
.hbar-lbl { font-size: 13.5px; color: var(--ink-2); font-weight: 500; }
.hbar-track { height: 14px; background: var(--bg-2); border-radius: 999px; overflow: hidden; }
.hbar-fill { height: 100%; background: var(--accent); border-radius: 999px; transition: width .4s; }
.hbar-v { font-family: var(--font); font-weight: 700; font-size: 13.5px; color: var(--ink); text-align: right; }

/* ============ SETUP ============ */
.setup-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; align-items: start; }
.setup-grid .panel:first-child { grid-row: span 2; }
.int-list, .opt-list { display: flex; flex-direction: column; }
.int-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.int-row:last-child { border-bottom: 0; }
.int-mark { width: 38px; height: 38px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); display: grid; place-items: center; font-family: var(--font); font-weight: 700; font-size: 16px; color: var(--ink-2); flex: none; }
.int-body { flex: 1; min-width: 0; }
.int-name { font-family: var(--font); font-weight: 600; font-size: 14.5px; color: var(--ink); display: block; }
.int-desc { font-size: 12.5px; color: var(--muted); }
.is { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font); font-weight: 600; font-size: 12px; padding: 5px 11px; border-radius: 999px; }
.is svg { width: 8px; height: 8px; }
.is-on { background: var(--pri-bassa-soft); color: oklch(0.46 0.11 155); }
.is-wait { background: var(--pri-media-soft); color: oklch(0.5 0.13 70); }
.is-off { background: var(--bg-2); color: var(--muted); }
.opt { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 0; border-bottom: 1px solid var(--line-soft); }
.opt:last-child { border-bottom: 0; }
.opt-t { font-family: var(--font); font-weight: 600; font-size: 14px; color: var(--ink); }
.opt-d { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.sw { width: 42px; height: 24px; border-radius: 999px; background: #d6d3c8; position: relative; transition: .18s; flex: none; }
.sw.on { background: var(--accent); }
.sw-knob { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .18s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.sw.on .sw-knob { left: 21px; }
.acct-form { display: flex; flex-direction: column; gap: 14px; }
.fld { display: flex; flex-direction: column; gap: 6px; }
.fld span { font-family: var(--font); font-weight: 600; font-size: 12.5px; color: var(--ink-2); }
.fld input { font-family: var(--font-body); font-size: 14px; color: var(--ink-2); background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 11px 13px; outline: none; }
.fld input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.acct-form .btn-primary { align-self: flex-start; margin-top: 4px; }

/* ============ real-app shared ============ */
.page-title.block { display: block; margin-bottom: 18px; }
.btn-dark {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font); font-weight: 600; font-size: 14px; color: #fff;
  background: var(--dark-btn); border: 0; padding: 12px 20px; border-radius: 11px; transition: .15s;
  box-shadow: 0 4px 12px rgba(27,24,48,.18);
}
.btn-dark:hover { background: var(--dark-btn-hov); }
.btn-dark.sm { padding: 9px 15px; font-size: 13px; border-radius: 9px; }
.btn-primary.muted, .btn-dark.muted { background: #c8c5ba; color: #fff; box-shadow: none; cursor: not-allowed; }
.link-btn { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font); font-weight: 600; font-size: 13.5px; color: var(--accent-ink); background: none; border: 0; padding: 8px 6px; }
.link-btn:hover { text-decoration: underline; }
.row-link { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font); font-weight: 600; font-size: 13px; color: var(--accent-ink); background: none; border: 0; padding: 4px 6px; border-radius: 6px; transition: .12s; }
.row-link:hover { background: var(--accent-soft); }
.row-link.danger { color: var(--pri-alta); }
.row-link.danger:hover { background: var(--pri-alta-soft); }

.sel { position: relative; display: inline-flex; align-items: center; }
.sel select {
  appearance: none; font-family: var(--font); font-weight: 500; font-size: 13.5px; color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 34px 9px 14px; cursor: pointer; outline: none; transition: .15s;
}
.sel select:hover { border-color: #d6d3c8; }
.sel select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.sel svg { position: absolute; right: 12px; color: var(--muted); pointer-events: none; }

.sec-head { display: flex; align-items: center; justify-content: space-between; margin: 34px 0 16px; }
.sec-title { font-family: var(--font); font-weight: 700; font-size: 20px; color: var(--ink); letter-spacing: -.3px; margin: 0; }
.sec-title .n { color: var(--accent); margin-left: 6px; }
.refresh.sm { padding: 7px 13px; font-size: 13px; }

/* status pills (task) */
.tstatus { font-family: var(--font); font-weight: 700; font-size: 11.5px; letter-spacing: .4px; padding: 5px 10px; border-radius: 7px; white-space: nowrap; }
.st-todo { background: var(--bg-2); color: var(--muted); }
.st-assigned { background: #eaf0fd; color: #3257b8; }
.st-progress { background: var(--accent-soft); color: var(--accent-ink); }
.st-review { background: var(--pri-media-soft); color: oklch(0.5 0.13 70); }
.st-done { background: var(--pri-bassa-soft); color: oklch(0.46 0.11 155); }
.st-blocked { background: var(--pri-alta-soft); color: var(--pri-alta); }
.cu-badge { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font); font-weight: 600; font-size: 12px; color: var(--accent-ink); background: var(--accent-soft); border: 1px solid var(--accent-soft-line); padding: 4px 10px; border-radius: 999px; }

/* ============ TASK table ============ */
.task-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.trow.task-grid { grid-template-columns: 34px 2.5fr 1.1fr 1fr .95fr .8fr 1.05fr 1fr 1.2fr; }
.trow.task-grid.thead { padding: 13px 22px; }
.trow.rsel { background: var(--accent-soft); }
.t-am { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); }
.tc-act { display: flex; gap: 4px; justify-content: flex-end; }
.compact .trow { padding: 11px 22px; }

/* ============ MAIL ============ */
.mail-head-left { display: flex; align-items: center; gap: 16px; }
.mlist { display: flex; flex-direction: column; gap: 10px; }
.mcard { display: flex; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; box-shadow: var(--shadow-card); transition: .15s; }
.mcard:hover { border-color: var(--accent-soft-line); box-shadow: var(--shadow-card-hov); }
.mbox { display: inline-flex; align-items: center; gap: 6px; height: fit-content; font-family: var(--font); font-weight: 600; font-size: 12.5px; padding: 6px 12px; border-radius: 999px; white-space: nowrap; flex: none; }
.mc-purple { background: var(--accent-soft); color: var(--accent-ink); }
.mc-blue { background: #eaf0fd; color: #3257b8; }
.mc-green { background: var(--pri-bassa-soft); color: oklch(0.44 0.11 155); }
.mcard-body { flex: 1; min-width: 0; }
.mcard-subj { font-family: var(--font); font-weight: 600; font-size: 17px; color: var(--ink); letter-spacing: -.2px; margin-bottom: 6px; text-wrap: pretty; }
.mcard-from { font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.mcard-snip { font-size: 13.5px; line-height: 1.55; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mcard-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; flex: none; }
.mcard-time { font-size: 12.5px; color: var(--faint); white-space: nowrap; }
.task-made { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font); font-weight: 600; font-size: 12px; color: oklch(0.44 0.11 155); background: var(--pri-bassa-soft); padding: 5px 11px; border-radius: 999px; }

/* ============ BULK ============ */
.bulk-flow { display: flex; align-items: center; gap: 9px; font-family: var(--font); font-weight: 500; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.bulk-flow svg { width: 13px; height: 13px; color: var(--accent); }
.bulk-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-card); overflow: hidden; }
.bulk-ta { width: 100%; min-height: 320px; resize: vertical; border: 0; outline: 0; background: none; padding: 22px 24px; font-family: "SFMono-Regular", ui-monospace, Menlo, monospace; font-size: 14.5px; line-height: 1.7; color: var(--ink-2); }
.bulk-ta::placeholder { color: var(--faint); }
.bulk-bar { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.bulk-count { font-family: ui-monospace, monospace; font-size: 13px; color: var(--muted); }
.trow.bulk-grid { grid-template-columns: 1.6fr 1.1fr .8fr .8fr .8fr .8fr; }
.brun { font-family: var(--font); font-weight: 700; font-size: 11.5px; letter-spacing: .4px; padding: 5px 11px; border-radius: 7px; }
.br-ok { background: var(--pri-bassa-soft); color: oklch(0.44 0.11 155); }
.br-wait { background: var(--pri-media-soft); color: oklch(0.5 0.13 70); }
.br-fail { background: var(--pri-alta-soft); color: var(--pri-alta); }
.tc-num.accent b, .tc-num.accent { color: var(--accent-ink); font-weight: 600; }
.tc-num.bad { color: var(--pri-alta); font-weight: 700; }

/* ============ CARICO ============ */
.carico { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 10px 22px; }
.cwl { padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.cwl:last-child { border-bottom: 0; }
.cwl-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cwl-name { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font); font-weight: 600; font-size: 15px; color: var(--ink); }
.cwl-count { font-family: var(--font); font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.cwl-count.zero { color: var(--faint); } .cwl-count.ok { color: var(--accent-ink); } .cwl-count.full { color: var(--pri-alta); }
.cwl-track { height: 12px; background: var(--bg-2); border-radius: 999px; overflow: hidden; }
.cwl-fill { display: block; height: 100%; border-radius: 999px; transition: width .4s; }
.cwl-fill.ok { background: var(--accent); } .cwl-fill.full { background: var(--pri-alta); } .cwl-fill.zero { background: transparent; }

/* ============ STORICO ============ */
.weeks { display: flex; flex-direction: column; gap: 12px; }
.week { display: flex; align-items: center; gap: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 20px 24px; transition: .15s; }
.week:hover { border-color: var(--accent-soft-line); box-shadow: var(--shadow-card-hov); }
.week-main { flex: 1; min-width: 0; }
.week-period { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font); font-weight: 600; font-size: 15.5px; color: var(--ink); margin-bottom: 9px; }
.week-stats { display: flex; gap: 18px; flex-wrap: wrap; }
.wstat { font-size: 13.5px; color: var(--muted); } .wstat b { font-family: var(--font); color: var(--ink-2); }
.week-rate { display: flex; align-items: center; gap: 12px; width: 220px; flex: none; }
.week-track { flex: 1; height: 9px; background: var(--bg-2); border-radius: 999px; overflow: hidden; }
.week-bar { display: block; height: 100%; background: var(--pri-bassa); border-radius: 999px; }
.week-pct { font-family: var(--font); font-weight: 700; font-size: 13.5px; color: oklch(0.46 0.11 155); width: 38px; text-align: right; }

/* ============ REPORT ============ */
.rep-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rep-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 24px; }
.rep-card-t { font-family: var(--font); font-weight: 700; font-size: 18px; color: var(--ink); margin-bottom: 8px; }
.rep-card-d { font-size: 13.5px; line-height: 1.55; color: var(--muted); margin-bottom: 20px; }
.rep-gen-row { display: flex; gap: 10px; }
.rep-gen-row .sel { flex: 1; } .rep-gen-row .sel select { width: 100%; }
.trow.rep-grid { grid-template-columns: .7fr 1.5fr 1.5fr 1.5fr 1.5fr .8fr; }
.rtype { font-family: var(--font); font-weight: 700; font-size: 11.5px; letter-spacing: .5px; padding: 5px 11px; border-radius: 7px; }
.rt-team { background: var(--accent-soft); color: var(--accent-ink); }
.rt-am { background: #eaf0fd; color: #3257b8; }
.t-period { font-family: ui-monospace, monospace; font-size: 13px; color: var(--muted); }
.rstatus { font-family: var(--font); font-weight: 700; font-size: 11.5px; letter-spacing: .4px; padding: 5px 11px; border-radius: 7px; }
.rs-ok { background: var(--pri-bassa-soft); color: oklch(0.44 0.11 155); }
.rs-fail { background: var(--pri-alta-soft); color: var(--pri-alta); }
.rerr { display: block; font-size: 12px; color: var(--pri-alta); margin-top: 6px; }

/* ============ SETUP ============ */
.setup-sec { margin-bottom: 34px; }
.setup-sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.setup-sec-sub { font-size: 13px; color: var(--muted); margin-top: 6px; max-width: 620px; line-height: 1.5; }
.setup-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 6px 22px; }
.srow { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.srow:last-child { border-bottom: 0; }
.srow-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--bg-2); border: 1px solid var(--line); display: grid; place-items: center; font-family: var(--font); font-weight: 700; font-size: 14px; color: var(--ink-2); flex: none; }
.srow-body { flex: 1; min-width: 0; }
.srow-name { font-family: var(--font); font-weight: 600; font-size: 14.5px; color: var(--ink); display: block; }
.srow-sub { font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.srow-sub b { color: var(--accent-ink); font-weight: 700; }
.srow-actions { display: flex; gap: 6px; }
.av.acc { background: var(--bg-2); color: var(--ink-2); border-color: var(--line); }
.st-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.st-dot.ok { background: var(--pri-bassa); }
.setup-empty { padding: 18px 2px; color: var(--muted); font-size: 14px; }

/* ============ LIVE OVERVIEW ============ */
.live-fresh { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-body); font-weight: 600; font-size: 12.5px; color: oklch(0.55 0.11 155); margin-left: 12px; vertical-align: middle; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--pri-bassa); box-shadow: 0 0 0 3px var(--pri-bassa-soft); animation: livePulse 2s ease-in-out infinite; }
@keyframes livePulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
.live-actions { display: flex; align-items: center; gap: 10px; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--faint); border-radius: var(--radius-sm); box-shadow: var(--shadow-card); padding: 18px 20px; }
.kpi-n { font-family: var(--font); font-weight: 700; font-size: 34px; line-height: 1; color: var(--ink); letter-spacing: -1px; }
.kpi-l { font-family: var(--font); font-weight: 600; font-size: 11.5px; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); margin-top: 9px; }
.kpi-red { border-left-color: var(--pri-alta); } .kpi-red .kpi-n { color: var(--pri-alta); }
.kpi-amber { border-left-color: var(--pri-media); } .kpi-amber .kpi-n { color: oklch(0.6 0.13 70); }
.kpi-violet { border-left-color: var(--accent); } .kpi-violet .kpi-n { color: var(--accent-ink); }

.filters { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 16px 20px; margin-bottom: 16px; display: flex; flex-direction: column; gap: 11px; }
.filt-row { display: flex; align-items: center; justify-content: space-between; }
.filt-scad { display: flex; align-items: center; gap: 10px; }
.filt-k { font-family: var(--font); font-weight: 600; font-size: 12px; color: var(--muted); min-width: 60px; flex: none; letter-spacing: .2px; }
.filt-clear { font-family: var(--font); font-weight: 600; font-size: 13px; color: var(--accent-ink); background: none; border: 0; padding: 6px 4px; }
.filt-clear:hover { text-decoration: underline; }
.chip-row { display: flex; align-items: flex-start; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.chip-set { display: flex; flex-wrap: wrap; gap: 7px; flex: 1; }
.fchip { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-body); font-weight: 600; font-size: 12.5px; color: var(--muted); background: var(--bg-2); border: 1px solid transparent; padding: 5px 11px; border-radius: 999px; transition: .12s; }
.fchip:hover { color: var(--ink-2); }
.fchip.on { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent-soft-line); }
.fchip .av.sm { width: 18px; height: 18px; font-size: 8.5px; }
.fchip-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .7; }
.fchip-urgent { color: var(--pri-alta); } .fchip-high { color: oklch(0.58 0.14 55); }
.fchip-normal { color: var(--muted); } .fchip-low { color: oklch(0.5 0.09 155); }
.fchip-urgent.on { background: var(--pri-alta-soft); color: var(--pri-alta); border-color: transparent; }
.fchip-high.on { background: var(--pri-media-soft); color: oklch(0.5 0.13 60); border-color: transparent; }

.live-count { font-family: var(--font); font-weight: 600; font-size: 13px; color: var(--muted); margin: 0 2px 12px; }

.trow.live-grid { grid-template-columns: 3fr 1.1fr 1.3fr .8fr .85fr 1.05fr .7fr 48px; align-items: center; }
.trow.live-grid.thead { padding: 12px 22px; }
.lv-title { font-family: var(--font); font-weight: 600; font-size: 14px; color: var(--ink); line-height: 1.4; }
.lv-am { display: flex; flex-direction: column; gap: 4px; }
.lv-am-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.lv-am-pill .av.sm { width: 19px; height: 19px; font-size: 8.5px; }
.lv-up { font-size: 12.5px; color: var(--faint); white-space: nowrap; }
.tc-c { display: flex; justify-content: center; }
.lv-link { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--accent-ink); display: grid; place-items: center; transition: .12s; }
.lv-link:hover { background: var(--accent-soft); border-color: var(--accent-soft-line); }

.lpri { font-family: var(--font); font-weight: 600; font-size: 12.5px; }
.lpri-urgent { color: var(--pri-alta); } .lpri-high { color: oklch(0.55 0.14 55); }
.lpri-normal { color: var(--muted); } .lpri-low { color: var(--faint); }

.due-pill { font-family: var(--font-body); font-weight: 700; font-size: 12px; padding: 4px 9px; border-radius: 7px; background: var(--bg-2); color: var(--muted); white-space: nowrap; }
.due-pill.over { background: var(--pri-alta-soft); color: var(--pri-alta); }
.due-pill.soon { background: var(--pri-media-soft); color: oklch(0.5 0.13 70); }

.lstatus { font-family: var(--font); font-weight: 600; font-size: 11.5px; letter-spacing: .2px; padding: 5px 10px; border-radius: 7px; white-space: nowrap; }
.lst-todo { background: var(--bg-2); color: var(--muted); }
.lst-progress { background: var(--accent-soft); color: var(--accent-ink); }
.lst-check { background: #eaf0fd; color: #3257b8; }
.lst-plan { background: var(--accent-soft); color: var(--accent-ink); }
.lst-hold { background: var(--pri-media-soft); color: oklch(0.5 0.13 70); }
.lst-block { background: var(--pri-alta-soft); color: var(--pri-alta); }
.shell.dark .lst-check { background: rgba(82,107,200,.22); color: #a9bdf5; }
.shell.dark .lpri-high { color: oklch(0.74 0.14 60); }
.shell.dark .lstatus.lst-hold, .shell.dark .due-pill.soon { color: oklch(0.8 0.13 75); }
.shell.dark .live-fresh { color: oklch(0.78 0.11 155); }

@media (max-width: 980px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .board { grid-template-columns: repeat(2, 1fr); }
  .mail, .rep-grid, .setup-grid, .rep-cards { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .setup-grid .panel:first-child { grid-row: auto; }
  .mail-view { position: static; }
  .task-tools { gap: 7px; }
}
