/* ===========================================================================
   MadTask · tema chiaro "ledger"
   Chrome acromatico (inchiostro su pietra chiara). Il coral del brand sta solo
   sui dati vivi: lavoro in corso, oggi, avanzamento, non letto. Il rosso è
   riservato a ciò che è in ritardo o distruttivo.
   =========================================================================== */
@font-face {
  font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/geist-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/geist-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* superfici */
  --ground: #f0eeea;
  --band: #f7f6f3;        /* fascia di intestazione di sezioni e pannelli */
  --surface: #ffffff;
  --raised: #e8e5e0;      /* voce attiva, colonne bacheca, tracce */
  --hover: #f1f0ed;
  --border: #dcd9d3;
  --rule: #efeeea;
  --control: #d2d0ca;
  /* testo */
  --text: #0a0a0a;
  --muted: #5f5d58;
  --primary: #141414;
  /* segnali */
  --coral: #e5483a;       /* l'unica tinta dei dati */
  --coral-tint: #fdeae7;
  --coral-ink: #7c1d14;
  --positive: #2e7d32;
  --positive-tint: #dcfae5;
  --positive-ink: #04250e;
  --negative: #c4242a;
  --negative-tint: #ffedea;
  --negative-ink: #831c1e;
  /* misure */
  --radius: 8px;
  --radius-control: 6px;
  --radius-chip: 4px;
  --sidebar-w: 248px;
  --pad: 32px;
  --gap: 12px;
  --control-h: 32px;
  --row-h: 42px;
  --shadow-float: 0 12px 32px rgba(20, 18, 14, .14), 0 2px 6px rgba(20, 18, 14, .06);
  /* alias per gli stili inline già presenti in app.js */
  --bg: var(--surface);
  --text-2: var(--muted);
  --text-3: var(--muted);
  --green: var(--positive);
  --border-soft: var(--rule);
  --surface-2: var(--raised);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Geist", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--ground);
  color: var(--text);
  font-size: 14px;
  line-height: 20px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
p { margin: 0; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.nil { color: var(--muted); }
.error { color: var(--negative); min-height: 20px; font-size: 13px; }
.spacer { flex: 1; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
.ic { flex: none; display: block; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; border-radius: var(--radius-chip); }
::selection { background: #ffd9d3; }
::placeholder { color: var(--muted); opacity: 1; }
.brand-mark { color: var(--coral); flex: none; }

/* scrollbar discrete */
* { scrollbar-width: thin; scrollbar-color: var(--control) transparent; }

/* ── Bottoni e controlli ──────────────────────────────────────────────── */
.btn-primary, .btn-ghost, .btn-add, .btn-complete {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: var(--radius-control);
  font-size: 14px; font-weight: 500; white-space: nowrap; text-decoration: none;
  border: 1px solid transparent;
  transition: background-color .12s ease, border-color .12s ease, transform .08s ease;
}
.btn-primary, .btn-add { background: var(--primary); color: #fff; }
.btn-primary:hover, .btn-add:hover { background: #2e2e2e; }
.btn-ghost, .btn-complete { background: var(--surface); border-color: var(--control); color: var(--text); }
.btn-ghost:hover, .btn-complete:hover { background: var(--hover); border-color: #bdbab3; }
.btn-primary:active, .btn-ghost:active, .btn-add:active, .btn-complete:active { transform: scale(.98); }
.btn-primary.danger { background: var(--negative); }
.btn-primary.danger:hover { background: #a81d22; }
.sm, .btn-add { height: var(--control-h); padding: 0 12px; font-size: 13px; }
.btn-add.sm { height: 28px; padding: 0 10px; }
button[disabled] { cursor: default; }

.icon-btn {
  width: 32px; height: 32px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: none; color: var(--muted); border-radius: var(--radius-control);
  transition: background-color .12s ease, color .12s ease;
}
.icon-btn:hover { background: var(--raised); color: var(--text); }

.x-btn {
  background: none; border: none; color: var(--muted); font-size: 13px; padding: 4px 8px;
  border-radius: var(--radius-chip); display: inline-flex; align-items: center; gap: 4px;
}
.x-btn:hover { color: var(--text); background: var(--hover); }
.x-btn.danger:hover { color: var(--negative); background: var(--negative-tint); }

/* campi di testo generici */
.field { display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 500; }
.field input,
.user-form input, .pf-row input, .modal input:not([type="checkbox"]):not([type="file"]),
.ui-dialog-input, .pp-search, .d-fields input, .cell-edit {
  height: 36px; width: 100%; min-width: 0; padding: 0 10px; font-size: 14px; font-weight: 400;
  background: var(--surface); border: 1px solid var(--control); border-radius: var(--radius-control);
  transition: border-color .12s ease, box-shadow .12s ease;
}
.field input:hover, .user-form input:hover, .pf-row input:hover:not(:disabled), .modal input:hover:not(:disabled) { border-color: #b4b1aa; }
.field input:focus, .user-form input:focus, .pf-row input:focus, .modal input:focus,
.ui-dialog-input:focus, .pp-search:focus, .d-fields input:focus, .cell-edit:focus, textarea:focus {
  border-color: var(--text); box-shadow: 0 0 0 3px rgba(10, 10, 10, .08); outline: none;
}
input:disabled { background: var(--ground); color: var(--muted); }
textarea, .d-textarea {
  width: 100%; padding: 8px 10px; font-size: 14px; line-height: 20px; resize: vertical;
  background: var(--surface); border: 1px solid var(--control); border-radius: var(--radius-control);
  transition: border-color .12s ease, box-shadow .12s ease;
}

/* dropdown custom (al posto dei <select> nativi) */
.cdrop {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 8px;
  height: 36px; width: 100%; min-width: 0; padding: 0 10px; font-size: 14px; text-align: left;
  background: var(--surface); border: 1px solid var(--control); border-radius: var(--radius-control);
}
.cdrop:hover { border-color: #b4b1aa; }
.cdrop[disabled] { background: var(--ground); color: var(--muted); }
.cdrop[disabled]:hover { border-color: var(--control); }
.cdrop .cdrop-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cdrop .cdrop-chev { color: var(--muted); flex: none; display: inline-flex; }

/* ── Login ────────────────────────────────────────────────────────────── */
.login { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px 16px; }
.login-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px; width: 380px; max-width: 100%; display: flex; flex-direction: column; gap: 16px;
}
.login-brand { display: flex; align-items: center; gap: 10px; }
.login-card h1 { font-size: 24px; line-height: 32px; letter-spacing: -.01em; }
.login-sub { margin: -8px 0 8px; }
.login-card .btn-primary { height: 40px; }
.login-alt { display: grid; grid-template-columns: 1fr; gap: 8px; }
.login-or { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--muted); }
.login-or::before, .login-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.login-google { height: 40px; display: flex; align-items: center; justify-content: center; text-decoration: none; }
.login-alt .btn-ghost { padding: 0 8px; font-size: 13px; }

/* ── Layout app ───────────────────────────────────────────────────────── */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); height: 100vh; }
.mobilebar { display: none; }

/* ── Sidebar (piano aperto: stesso fondo della pagina, un solo filo) ──── */
.sidebar { display: flex; flex-direction: column; min-height: 0; background: var(--surface); border-right: 1px solid var(--border); }
.sb-top { padding: 16px 12px 4px; display: flex; flex-direction: column; gap: 12px; }
.sb-brand { display: flex; align-items: center; gap: 8px; padding: 0 8px; height: 32px; }
.sb-brand b { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.sb-ws { margin-left: auto; font-size: 12px; color: var(--muted); }
.sb-search {
  display: flex; align-items: center; gap: 8px; height: 32px; width: 100%; padding: 0 8px 0 10px;
  background: var(--band); border: 1px solid var(--border); border-radius: var(--radius-control);
  color: var(--muted); font-size: 14px; text-align: left;
}
.sb-search:hover { border-color: var(--control); color: var(--text); }
.sb-search span:first-of-type { flex: 1; }
.ts-kbd {
  flex: none; font-size: 11px; line-height: 16px; color: var(--muted); padding: 0 5px;
  border: 1px solid var(--border); border-radius: var(--radius-chip); background: var(--ground);
}
.sb-scroll { flex: 1; overflow-y: auto; padding: 8px 12px 16px; }
.sb-item, .sb-project, .sb-folder-head {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 32px; margin-bottom: 2px;
  padding: 0 8px; background: none; border: none; border-radius: var(--radius-control);
  font-size: 14px; text-align: left; color: var(--text);
  transition: background-color .1s ease;
}
.sb-item .ic, .sb-fchev { color: var(--muted); }
.sb-item:hover, .sb-project:hover, .sb-folder-head:hover { background: var(--hover); }
.sb-item.active, .sb-project.active { background: var(--raised); font-weight: 500; }
.sb-item.active .ic { color: var(--text); }
.sb-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--coral); color: #fff;
  font-size: 11px; font-weight: 600; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums;
}
.sb-group-title { font-size: 12px; font-weight: 600; color: var(--muted); padding: 16px 8px 0; margin: 16px 0 8px; border-top: 1px solid var(--rule); }
/* amministrazione: fissa sopra il profilo, non scorre con l'elenco dei clienti */
.sb-admin { flex: none; padding: 8px 12px 6px; border-top: 1px solid var(--border); }
.sb-admin .sb-group-title { margin: 0 0 6px; padding-top: 4px; border-top: none; }
.sb-folder-head { gap: 8px; }
.sb-fchev { display: inline-flex; transition: transform .15s ease; }
.sb-folder.collapsed .sb-fchev { transform: rotate(-90deg); }
.sb-folder.collapsed .sb-folder-body { display: none; }
.sb-folder-logo {
  width: 20px; height: 20px; border-radius: 5px; flex: none; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600;
}
.sb-folder-logo img { width: 100%; height: 100%; object-fit: cover; }
.sb-folder-logo.plain { background: var(--raised); color: var(--muted); }
.sb-folder-name { flex: 1; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-star { display: inline-flex; color: var(--muted); }
.sb-project { padding-left: 36px; color: var(--muted); }
.sb-project span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-project:hover, .sb-project.active { color: var(--text); }
.sb-empty { padding: 6px 8px 6px 36px; color: var(--muted); font-size: 13px; }
.sb-footer { border-top: 1px solid var(--border); padding: 8px 12px; display: flex; align-items: center; gap: 4px; }
.sb-me {
  display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; padding: 4px 8px;
  background: none; border: none; border-radius: var(--radius-control); text-align: left;
}
.sb-me:hover { background: var(--hover); }
.sb-user { flex: 1; min-width: 0; }
.sb-user b { display: block; font-size: 13px; font-weight: 500; line-height: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-user span { display: block; font-size: 12px; line-height: 16px; color: var(--muted); }

/* ── Area principale ──────────────────────────────────────────────────── */
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
/* testata della pagina: fascia bianca staccata dal piano di lavoro */
.page-head { flex: none; display: flex; align-items: center; gap: 12px; min-height: 36px; padding: 24px var(--pad) 20px; background: var(--surface); border-bottom: 1px solid var(--border); }
.page-head:has(+ .tabs) { padding-bottom: 0; border-bottom: none; }
.page-head .title { font-size: 24px; line-height: 32px; letter-spacing: -.015em; display: flex; align-items: center; gap: 10px; min-width: 0; }
.page-head .title > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-head .title .sb-folder-logo { width: 28px; height: 28px; border-radius: 7px; font-size: 13px; }
.page-head:has(+ .page-sub) { padding-bottom: 0; border-bottom: none; }
.page-sub { flex: none; padding: 4px var(--pad) 20px; color: var(--muted); background: var(--surface); border-bottom: 1px solid var(--border); }
.crumb { color: var(--muted); font-weight: 400; white-space: nowrap; }
.crumb-sep { color: var(--control); font-weight: 400; }

/* tab di vista: sottolineatura in inchiostro su un filo a tutta larghezza */
.tabs { flex: none; display: flex; gap: 20px; padding: 12px var(--pad) 0; background: var(--surface); border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0; flex: none;
  background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px;
  color: var(--muted); font-size: 14px;
}
.tab svg { width: 15px; height: 15px; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); font-weight: 500; border-bottom-color: var(--text); }
.tab:focus-visible { outline-offset: -2px; }

.toolbar { flex: none; display: flex; align-items: center; gap: 4px; padding: 12px var(--pad); }
.toolbar .tool {
  display: inline-flex; align-items: center; gap: 6px; height: var(--control-h); padding: 0 10px;
  background: none; border: none; border-radius: var(--radius-control); color: var(--muted); font-size: 13px; white-space: nowrap;
}
.toolbar .tool:hover { background: var(--raised); color: var(--text); }
.toolbar .tool.on { color: var(--text); font-weight: 500; background: var(--raised); }

.scroll { flex: 1; overflow: auto; min-height: 0; }
.pad { padding: 0 var(--pad) 48px; }
.pad-top { padding-top: 16px; }
.empty, .empty-box {
  color: var(--muted); padding: 20px; text-align: center; margin: 16px var(--pad);
  border: 1px dashed var(--control); border-radius: var(--radius);
}
.empty-box { margin: 0; padding: 14px; font-size: 13px; }
.sheet { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }

/* segnaposto di caricamento: barre piatte alla misura reale */
.skel { display: block; height: 14px; border-radius: 3px; background: var(--raised); }
.skel-row { display: flex; align-items: center; gap: 12px; height: 44px; border-top: 1px solid var(--rule); }
.skel-row:first-child { border-top: none; }

/* ── Avatar, stato, priorità, tag ─────────────────────────────────────── */
.avatar {
  width: 24px; height: 24px; border-radius: 50%; flex: none; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 600;
  background: var(--raised); color: var(--text);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatars { display: inline-flex; }
.avatars .avatar { margin-left: -6px; box-shadow: 0 0 0 2px var(--surface); }
.avatars .avatar:first-child { margin-left: 0; }

.status-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; white-space: nowrap; flex: none; }
.status-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--control); flex: none; }
.status-pill.in_progress::before { background: var(--coral); }
.status-pill.completed::before { background: var(--positive); }
.status-pill.completed { color: var(--muted); }

.prio { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; white-space: nowrap; flex: none; }
.prio-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 11px; }
.prio-bars i { width: 3px; border-radius: 1px; background: var(--control); }
.prio-bars i:nth-child(1) { height: 5px; }
.prio-bars i:nth-child(2) { height: 8px; }
.prio-bars i:nth-child(3) { height: 11px; }
.prio.low { color: var(--muted); }
.prio.low i:nth-child(1), .prio.medium i:nth-child(-n+2), .prio.high i { background: var(--text); }
.prio.high { font-weight: 500; }

.tag-chips { display: inline-flex; gap: 4px; flex-wrap: wrap; max-width: 100%; vertical-align: middle; }
.tag-chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none; max-width: 100%; height: 22px; padding: 0 8px;
  font-size: 12px; white-space: nowrap; background: var(--ground); border: 1px solid var(--border); border-radius: var(--radius-chip);
}
.tag-chip > span:not(.tag-dot):not(.tx) { overflow: hidden; text-overflow: ellipsis; }
.row .tag-chips { flex-wrap: nowrap; overflow: hidden; }
.tag-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.tag-chip .tx { display: inline-flex; color: var(--muted); }
.tag-chip[data-rm] { cursor: pointer; }
.tag-chip[data-rm]:hover { border-color: var(--control); }
.tag-chip[data-rm]:hover .tx { color: var(--text); }
.sb-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }

/* cerchio completamento */
.check {
  width: 18px; height: 18px; flex: none; border: 1.5px solid #a9a69f; border-radius: 50%; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; color: transparent;
  transition: background-color .12s ease, border-color .12s ease, color .12s ease;
}
.check::after {
  content: ""; width: 9px; height: 5px; margin-top: -2px; transform: rotate(-45deg);
  border-left: 1.75px solid currentColor; border-bottom: 1.75px solid currentColor;
}
.check:not(.done):hover { border-color: var(--positive); color: var(--positive); }
.check.done { background: var(--positive); border-color: var(--positive); color: #fff; }

/* ── Vista Lista ──────────────────────────────────────────────────────── */
.list-head, .row {
  display: grid; align-items: center;
  grid-template-columns: minmax(260px, 1fr) 72px 124px 112px 132px minmax(96px, 168px);
}
.list-head {
  position: sticky; top: 0; z-index: 2; height: 36px; background: var(--surface);
  border-bottom: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0;
}
.list-head > div { padding: 0 12px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.list-head > div:first-child { padding-left: 16px; }

.section + .section { border-top: 1px solid var(--border); }
.section:not(.collapsed) + .section { border-top-width: 8px; border-top-color: var(--ground); }
.section-head {
  display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px;
  cursor: pointer; user-select: none; font-size: 15px; font-weight: 600; letter-spacing: -.005em;
  background: var(--band); border-bottom: 1px solid var(--border);
}
.section.collapsed .section-head { border-bottom-color: transparent; }
.section-head + .rows > .row:first-child { border-top: none; }
.section-head .chev { display: inline-flex; color: var(--muted); transition: transform .12s ease; }
.section.collapsed .chev { transform: rotate(-90deg); }
.section.collapsed .rows { display: none; }
.section-head .count, .board-col h3 .count, .panel-head .count {
  min-width: 22px; height: 20px; padding: 0 7px; border-radius: 10px; background: var(--raised); color: var(--muted);
  font-weight: 500; font-size: 12px; line-height: 20px; text-align: center; font-variant-numeric: tabular-nums; letter-spacing: 0;
}
.section-head .add-here {
  margin-left: auto; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted); border-radius: var(--radius-control); opacity: 0;
}
.section-head .add-here > * { pointer-events: none; }
.section-head:hover .add-here, .section-head:focus-within .add-here { opacity: 1; }
.section-head .add-here:hover { background: var(--raised); color: var(--text); }
.section-head.sec-drop { box-shadow: inset 0 -2px 0 var(--text); }

.row { min-height: var(--row-h); border-top: 1px solid var(--rule); cursor: pointer; }
.row:hover { background: var(--hover); }
.row > div { min-width: 0; min-height: var(--row-h); padding: 0 12px; display: flex; align-items: center; font-size: 14px; }
.row > div:first-child { padding-left: 16px; }
.row.done .r-title { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--control); }
.r-name { gap: 10px; }
.r-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-add { color: var(--muted); font-size: 13px; opacity: 0; }
.row:hover .r-add, .row:focus-within .r-add { opacity: 1; }
.due-overdue { color: var(--negative); font-weight: 500; }
.r-add-circle {
  width: 24px; height: 24px; border-radius: 50%; border: 1px dashed var(--control); color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center;
}
.row:hover .r-add-circle, .card:hover .r-add-circle { border-color: var(--muted); color: var(--text); }
.r-meta { display: inline-flex; gap: 8px; align-items: center; flex: none; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.r-mi { display: inline-flex; gap: 3px; align-items: center; }
.row-menu {
  margin-left: auto; width: 28px; height: 28px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  background: none; border: none; border-radius: var(--radius-control); color: var(--muted); opacity: 0;
}
.row:hover .row-menu, .row-menu:focus-visible { opacity: 1; }
.row-menu:hover { background: var(--raised); color: var(--text); }
.row.drop-target { box-shadow: inset 0 -2px 0 var(--text); }

.add-row {
  display: flex; align-items: center; gap: 10px; min-height: var(--row-h); padding: 0 16px;
  color: var(--muted); cursor: pointer; font-size: 14px; border-top: 1px solid var(--rule);
}
.add-row:hover { color: var(--text); background: var(--hover); }
.add-row .plus { width: 18px; display: inline-flex; justify-content: center; }
.add-input { width: 100%; background: transparent; border: none; font-size: 14px; outline: none; padding: 2px 0; resize: none; box-shadow: none !important; }
.add-section-row {
  display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-top: 1px solid var(--border);
  color: var(--muted); cursor: pointer; font-size: 14px;
}
.add-section-row:hover { color: var(--text); }
.cell-edit { height: 30px; }

/* selezione multipla */
.r-select {
  width: 16px; height: 16px; flex: none; margin-left: -4px; border: 1.5px solid #a9a69f; border-radius: 4px; cursor: pointer;
  display: inline-flex; visibility: hidden; align-items: center; justify-content: center; color: #fff;
}
.row:hover .r-select, .card:hover .r-select, .r-select.on { visibility: visible; }
.r-select.on { background: var(--primary); border-color: var(--primary); }
.r-select.on::after {
  content: ""; width: 8px; height: 4px; margin-top: -2px; transform: rotate(-45deg);
  border-left: 1.75px solid currentColor; border-bottom: 1.75px solid currentColor;
}
.row.selected, .row.selected:hover { background: var(--raised); }
.card.selected { border-color: var(--text); box-shadow: 0 0 0 1px var(--text); }

/* I miei task: stessa lista, colonna Servizio al posto di Incaricato/Tag */
.mytasks .list-head, .mytasks .row { grid-template-columns: minmax(260px, 1fr) minmax(140px, 220px) 124px 112px 132px; }
.mt-bk-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--control); }
.mt-bk-overdue .mt-bk-dot { background: var(--negative); }
.mt-bk-today .mt-bk-dot { background: var(--coral); }
.mt-bk-done .mt-bk-dot { background: var(--positive); }
.mt-proj { gap: 8px; color: var(--muted); font-size: 13px; cursor: pointer; }
.mt-proj:hover { color: var(--text); }
.mt-proj span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Menu, popover, picker ────────────────────────────────────────────── */
.menu {
  position: fixed; z-index: 80; min-width: 200px; max-height: min(70vh, 480px); overflow-y: auto; padding: 4px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-float);
}
.menu-label { font-size: 12px; color: var(--muted); padding: 6px 8px 4px; }
.menu-item { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 4px 8px; border-radius: var(--radius-chip); font-size: 14px; cursor: pointer; }
.menu-item:hover { background: var(--hover); }
.menu-item .mi-check { width: 14px; flex: none; display: inline-flex; }
.menu-item.checked { font-weight: 500; }
.menu-item.danger { color: var(--negative); }
.menu-item.danger:hover { background: var(--negative-tint); }
.menu-sep { height: 1px; background: var(--rule); margin: 4px 0; }

.people-pop { padding: 8px; width: 264px; }
.pp-search { height: 32px; margin-bottom: 6px; }
.pp-list { max-height: 240px; overflow-y: auto; }
.pp-item { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 4px 8px; border-radius: var(--radius-chip); cursor: pointer; font-size: 14px; }
.pp-item:hover { background: var(--hover); }
.pp-item.sel { background: var(--raised); }
.pp-item .pp-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-item .pp-check { display: inline-flex; }
.pp-item .pp-x { width: 24px; display: inline-flex; justify-content: center; color: var(--muted); }
.pp-item.create { font-weight: 500; }
.mention-menu .menu-item { gap: 10px; }

.datepick { width: 268px; padding: 12px; }
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dp-head b { font-size: 14px; font-weight: 600; text-transform: capitalize; }
.dp-nav { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; background: none; border: none; color: var(--muted); border-radius: var(--radius-control); }
.dp-nav:hover { background: var(--raised); color: var(--text); }
.dp-nav[data-nav="-1"] .ic, #cal-prev .ic { transform: rotate(90deg); }
.dp-nav[data-nav="1"] .ic, #cal-next .ic { transform: rotate(-90deg); }
.dp-dows, .dp-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.dp-dows { margin-bottom: 4px; }
.dp-dows span { text-align: center; font-size: 12px; color: var(--muted); }
.dp-cell { display: flex; align-items: center; justify-content: center; min-width: 0; height: 32px; border-radius: var(--radius-control); font-size: 13px; cursor: pointer; font-variant-numeric: tabular-nums; }
.dp-cell:hover:not(.dp-blank) { background: var(--hover); }
.dp-cell.dp-blank { cursor: default; }
.dp-cell.today { color: var(--coral); font-weight: 600; box-shadow: inset 0 0 0 1px var(--coral); }
.dp-cell.sel, .dp-cell.sel.today { background: var(--primary); color: #fff; font-weight: 500; box-shadow: none; }
.dp-foot { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--rule); }
.dp-quick, .dp-clear { background: none; border: none; font-size: 13px; height: 28px; padding: 0 8px; border-radius: var(--radius-control); }
.dp-quick { font-weight: 500; }
.dp-clear { color: var(--muted); }
.dp-quick:hover, .dp-clear:hover { background: var(--hover); color: var(--text); }

/* ── Bacheca ──────────────────────────────────────────────────────────── */
.board { display: flex; gap: var(--gap); align-items: flex-start; padding: 16px var(--pad) 48px; min-height: 100%; width: max-content; min-width: 100%; }
.board-col { background: var(--raised); border-radius: var(--radius); width: 296px; flex: none; padding: 8px; }
.board-col h3 { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 6px; margin-bottom: 6px; font-size: 15px; letter-spacing: -.005em; }
.board-col h3 .count { background: var(--surface); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-control);
  padding: 12px; margin-bottom: 8px; cursor: pointer; transition: border-color .12s ease;
}
.card:hover { border-color: #b4b1aa; }
.card.dragging { opacity: .4; }
.card .card-tags { margin-bottom: 8px; }
.card .card-top { display: flex; align-items: flex-start; gap: 10px; }
.card .card-top .check { margin-top: 1px; }
.card .card-title { flex: 1; min-width: 0; font-size: 14px; overflow-wrap: anywhere; }
.card.done .card-title { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--control); }
.card .card-foot { display: flex; align-items: center; gap: 10px; margin-top: 12px; min-height: 24px; }
.card .card-foot .card-due { margin-left: auto; font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.card .card-foot .card-due.due-overdue { color: var(--negative); }
.board-col.drop-target { box-shadow: inset 0 0 0 2px var(--text); }
.add-card { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 6px; color: var(--muted); font-size: 13px; cursor: pointer; border-radius: var(--radius-control); }
.add-card:hover { color: var(--text); background: rgba(10, 10, 10, .05); }

/* ── Timeline ─────────────────────────────────────────────────────────── */
.timeline-wrap { padding: 16px var(--pad) 48px; }
.timeline { overflow-x: auto; }
.tl-inner { width: max-content; min-width: 100%; }
.tl-row { display: flex; align-items: stretch; }
.tl-label {
  position: sticky; left: 0; z-index: 3; width: 232px; flex: none; display: flex; align-items: center; padding: 0 16px;
  font-size: 13px; background: var(--surface); border-right: 1px solid var(--border);
}
.tl-label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-track { position: relative; min-height: 36px; flex: none; border-top: 1px solid var(--rule); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='34' height='4'%3E%3Crect width='1' height='4' fill='%23efeeea'/%3E%3C/svg%3E"); background-size: 34px 4px; }
.tl-row .tl-label { border-top: 1px solid var(--rule); }
.tl-head { position: sticky; top: 0; z-index: 4; }
.tl-head .tl-label, .tl-head .tl-track { border-top: none; border-bottom: 1px solid var(--border); background-color: var(--surface); }
.tl-head .tl-label { border-radius: var(--radius) 0 0 0; font-size: 12px; color: var(--muted); }
.tl-head .tl-track { display: flex; min-height: 44px; background-image: none; }
.tl-tick { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; font-size: 11px; line-height: 15px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-tick b { font-weight: 500; font-size: 12px; color: var(--text); }
.tl-tick.we { background: var(--ground); }
.tl-tick.we b { color: var(--muted); }
.tl-tick.today b { color: #fff; background: var(--coral); min-width: 20px; height: 20px; line-height: 20px; border-radius: 10px; text-align: center; }
.tl-section .tl-label { font-weight: 600; font-size: 13px; }
.tl-section .tl-track, .tl-section .tl-label { background-color: var(--ground); background-image: none; min-height: 32px; }
.tl-bar {
  position: absolute; top: 6px; height: 24px; padding: 0 8px; border-radius: var(--radius-chip);
  font-size: 12px; line-height: 24px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer;
  background: var(--raised); color: var(--text); box-shadow: inset 0 0 0 1px #d6d3cc;
}
.tl-bar.in_progress { background: var(--coral-tint); color: var(--coral-ink); box-shadow: inset 3px 0 0 var(--coral); }
.tl-bar.done { background: var(--surface); color: var(--muted); text-decoration: line-through; box-shadow: inset 0 0 0 1px var(--border); }
.tl-bar.overdue { box-shadow: inset 0 0 0 1px var(--negative); }
.tl-bar:hover { filter: brightness(.97); }
.tl-bar.dragging { box-shadow: var(--shadow-float); user-select: none; z-index: 2; }
.tl-today { position: absolute; top: 0; bottom: 0; width: 1px; margin-left: 16px; background: var(--coral); z-index: 1; pointer-events: none; }
.tl-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 12px; font-size: 12px; color: var(--muted); }
.tl-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tl-legend i { width: 18px; height: 10px; border-radius: 2px; }

/* ── Calendario ───────────────────────────────────────────────────────── */
.cal { padding: 16px var(--pad) 48px; }
.cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.cal-head h3 { font-size: 16px; text-transform: capitalize; margin-right: 8px; min-width: 150px; }
.cal-head .btn-ghost.sm { padding: 0 9px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.cal-dow { padding: 0 10px; height: 32px; display: flex; align-items: center; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--border); }
.cal-cell { min-width: 0; min-height: 108px; padding: 6px; border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.cal-cell:nth-child(7n + 1) { border-left: none; }
.cal-cell.other { background: var(--ground); }
.cal-cell.we { background: #faf9f8; }
.cal-day { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; margin-bottom: 4px; padding: 0 4px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cal-cell.today .cal-day { background: var(--coral); color: #fff; font-weight: 600; border-radius: 11px; }
.cal-task {
  display: flex; align-items: center; gap: 6px; height: 22px; padding: 0 6px; margin-bottom: 2px; font-size: 12px; cursor: pointer;
  background: var(--ground); border-radius: var(--radius-chip);
}
.cal-task::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--control); flex: none; }
.cal-task.in_progress::before { background: var(--coral); }
.cal-task.done::before { background: var(--positive); }
.cal-task.overdue span { color: var(--negative); }
.cal-task span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-task.done span { color: var(--muted); text-decoration: line-through; }
.cal-task:hover { background: var(--raised); }

/* ── Dashboard del servizio ───────────────────────────────────────────── */
.dash { padding: 16px var(--pad) 48px; display: flex; flex-direction: column; gap: var(--gap); max-width: 1240px; }
.kpi-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi-cell { padding: 16px 20px 18px; border-left: 1px solid var(--rule); min-width: 0; display: flex; flex-direction: column; gap: 4px; text-align: left; background: none; border-top: none; border-right: none; border-bottom: none; }
.kpi-cell:first-child { border-left: none; }
button.kpi-cell:hover { background: var(--hover); }
button.kpi-cell:first-child { border-radius: var(--radius) 0 0 var(--radius); }
button.kpi-cell:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.kpi-cell .lab { font-size: 13px; color: var(--muted); }
.kpi-cell .num { font-size: 28px; line-height: 34px; font-weight: 500; letter-spacing: -.02em; }
.kpi-cell .num small { font-size: 14px; font-weight: 400; color: var(--muted); letter-spacing: 0; margin-left: 2px; }
.kpi-cell .num.zero { color: var(--muted); }
.kpi-cell .num.bad { color: var(--negative); }
.kpi-cell .cap { font-size: 12px; color: var(--muted); }
.progress { height: 6px; background: var(--raised); border-radius: 3px; overflow: hidden; margin-top: 8px; }
.progress i { display: block; height: 100%; background: var(--coral); border-radius: 3px; }
.dash-split { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dash-col { padding: 16px 20px 20px; border-left: 1px solid var(--rule); min-width: 0; }
.dash-col:first-child { border-left: none; }
.dash-col h3 { font-size: 15px; margin: -16px -20px 16px; padding: 12px 20px; background: var(--band); border-bottom: 1px solid var(--border); }
.dash-col:first-child h3 { border-top-left-radius: var(--radius); }
.dash-col:last-child h3 { border-top-right-radius: var(--radius); }
.bar-item { margin-bottom: 12px; }
.bar-item:last-child { margin-bottom: 0; }
.bar-lab { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; margin-bottom: 6px; }
.bar-lab span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-lab .muted { font-variant-numeric: tabular-nums; }
.bar-track { height: 3px; background: var(--raised); border-radius: 2px; overflow: hidden; }
.bar-fill { height: 100%; background: #a9a69f; border-radius: 2px; }
.bar-item.top .bar-fill { background: var(--text); }

/* ── Home ─────────────────────────────────────────────────────────────── */
.home { max-width: 1164px; margin: 0 auto; padding: 40px var(--pad) 48px; display: flex; flex-direction: column; gap: 20px; }
.home-head { margin-bottom: 12px; }
.home-head h1 { font-size: 24px; line-height: 32px; letter-spacing: -.015em; }
.home-sub { color: var(--muted); margin-top: 4px; }
.home-sub b { color: var(--text); font-weight: 500; }
.home-sub b.bad { color: var(--negative); }
.home-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 20px; align-items: stretch; }
.panel { padding: 16px 20px 12px; min-width: 0; display: flex; flex-direction: column; }
.panel-head {
  display: flex; align-items: center; gap: 8px; margin: -16px -20px 8px; padding: 12px 20px;
  background: var(--band); border-bottom: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0;
}
.panel-head h3, .panel-head h2 { font-size: 15px; line-height: 20px; letter-spacing: -.005em; }
.panel-link { margin-left: auto; background: none; border: none; padding: 0; font-size: 13px; color: var(--muted); }
.panel-link:hover { color: var(--text); text-decoration: underline; }
.mini-task, .proj-card {
  display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 0 -8px; padding: 0 8px;
  border-top: 1px solid var(--rule); cursor: pointer; border-radius: 0;
}
.panel-head + .mini-task, .panel-head + .proj-card { border-top-color: transparent; }
.mini-task:hover, .proj-card:hover { background: var(--hover); border-radius: var(--radius-control); border-top-color: transparent; }
.mini-task:hover + .mini-task, .proj-card:hover + .proj-card { border-top-color: transparent; }
.mt-main { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.mt-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-where { flex: none; max-width: 40%; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-task.done .mt-title { color: var(--muted); text-decoration: line-through; }
.mt-due { flex: none; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mt-due.due-overdue { color: var(--negative); }
.proj-card .pc-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-card .pc-client { flex: none; max-width: 45%; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* la settimana: sette giorni, oggi in coral */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.wk-day { min-width: 0; min-height: 132px; padding: 12px 10px 10px; border-left: 1px solid var(--rule); display: flex; flex-direction: column; gap: 4px; }
.wk-day:first-child { border-left: none; }
.wk-day.we { background: #faf9f8; }
.wk-day.we:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.wk-top { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; font-size: 13px; color: var(--muted); }
.wk-num { font-variant-numeric: tabular-nums; color: var(--text); font-weight: 500; }
.wk-day.today .wk-num { background: var(--coral); color: #fff; min-width: 22px; height: 22px; line-height: 22px; border-radius: 11px; text-align: center; font-weight: 600; }
.wk-day.past .wk-num { color: var(--muted); font-weight: 400; }
.wk-day.today { box-shadow: inset 0 2px 0 var(--coral); }
.wk-count { margin-left: auto; font-size: 12px; font-variant-numeric: tabular-nums; }
.wk-task {
  display: flex; align-items: center; gap: 6px; height: 24px; padding: 0 6px; width: 100%; font-size: 12px; text-align: left;
  background: var(--ground); border: none; border-radius: var(--radius-chip);
}
.wk-task::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--control); flex: none; }
.wk-task.in_progress::before { background: var(--coral); }
.wk-task.done::before { background: var(--positive); }
.wk-task.overdue span { color: var(--negative); }
.wk-task span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk-task.done span { color: var(--muted); text-decoration: line-through; }
.wk-task:hover { background: var(--raised); }
.wk-more { font-size: 12px; color: var(--muted); padding: 2px 6px; background: none; border: none; text-align: left; }
.wk-more:hover { color: var(--text); }
.wk-none { font-size: 12px; color: var(--muted); padding: 4px 6px; }

/* ── Inbox ────────────────────────────────────────────────────────────── */
.inbox { max-width: 920px; padding: 16px var(--pad) 48px; }
.nt-row { display: flex; align-items: flex-start; gap: 12px; min-height: 64px; padding: 12px 16px; border-top: 1px solid var(--rule); cursor: pointer; }
.nt-row:first-child { border-top: none; border-radius: var(--radius) var(--radius) 0 0; }
.nt-row:last-child { border-radius: 0 0 var(--radius) var(--radius); }
.nt-row:hover { background: var(--hover); }
.nt-dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 7px; flex: none; }
.nt-row.unread .nt-dot { background: var(--coral); }
.nt-ico { color: var(--muted); margin-top: 2px; display: inline-flex; }
.nt-main { flex: 1; min-width: 0; }
.nt-body { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-row.unread .nt-body { font-weight: 600; }
.nt-sub { font-size: 13px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-time { flex: none; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ── Impostazioni: Clienti, Utenti e team ─────────────────────────────── */
.set-page { max-width: 1164px; padding: 24px var(--pad) 48px; }
.set-row { display: grid; grid-template-columns: minmax(200px, 300px) minmax(0, 1fr); gap: 32px; padding: 32px 0; border-top: 1px solid var(--border); }
.set-row:first-child { border-top: none; padding-top: 8px; }
.set-label h2 { font-size: 16px; font-weight: 500; line-height: 24px; margin-top: 6px; }
.set-label p { color: var(--muted); margin-top: 4px; }
.set-label .btn-ghost { margin-top: 12px; }
.set-panel { min-width: 0; padding: 16px; }
.set-panel.flush { padding: 0; }

.user-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: end; }
.user-form .btn-primary { height: 36px; }
.user-row { display: grid; grid-template-columns: minmax(0, 1fr) 132px 116px 76px 76px 64px; gap: 8px; align-items: center; min-height: 56px; padding: 8px 16px; border-top: 1px solid var(--rule); }
.user-row:first-child { border-top: none; }
.user-row.inactive .u-main { opacity: .55; }
.user-row .u-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.user-row .u-id { display: flex; flex-direction: column; min-width: 0; }
.user-row .u-id b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-row .u-id .muted { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-row .u-fixed { font-size: 13px; padding: 0 8px; white-space: nowrap; }
.user-row .u-proj { color: var(--text); font-variant-numeric: tabular-nums; }
.user-row .u-proj.none { color: var(--muted); }
.proj-pick { width: 280px; max-height: 360px; overflow-y: auto; }
.pk-item .pk-box { width: 16px; height: 16px; flex: none; border: 1.5px solid var(--control); border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; color: transparent; }
.pk-item.on .pk-box { background: var(--primary); border-color: var(--primary); color: #fff; }
.pk-item .pk-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-row .u-you { font-size: 13px; color: var(--muted); padding: 0 8px; }
.user-row .x-btn { justify-self: start; white-space: nowrap; }
.user-row .cdrop { height: 32px; font-size: 13px; }

.team-card { padding: 14px 16px 16px; border-top: 1px solid var(--rule); }
.team-card:first-child { border-top: none; }
.team-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.team-head .team-name { font-weight: 500; cursor: text; }
.team-head .muted { margin-right: auto; font-size: 13px; }
.team-members, .cl-teams { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.team-member, .cl-team-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 4px 0 3px; font-size: 13px;
  background: var(--ground); border: 1px solid var(--border); border-radius: 14px;
}
.cl-team-chip { padding-left: 10px; border-radius: var(--radius-chip); }
.tm-rm, .cl-team-rm { width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; background: none; border: none; padding: 0; color: var(--muted); border-radius: 50%; }
.tm-rm:hover, .cl-team-rm:hover { color: var(--negative); background: var(--negative-tint); }
.tm-add, .cl-team-add, .cl-add-srv {
  display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px; font-size: 13px;
  background: none; border: 1px dashed var(--control); border-radius: 14px; color: var(--muted);
}
.cl-team-add { border-radius: var(--radius-chip); }
.tm-add:hover, .cl-team-add:hover, .cl-add-srv:hover { border-color: var(--muted); color: var(--text); }

.cl-mgr { display: flex; flex-direction: column; gap: var(--gap); max-width: 1164px; padding: 24px var(--pad) 48px; }
.cl-card { padding: 0; }
.cl-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--rule); }
.cl-logo { position: relative; width: 36px; height: 36px; border-radius: 8px; overflow: hidden; flex: none; cursor: pointer; display: inline-flex; }
.cl-logo .sb-folder-logo { width: 36px; height: 36px; border-radius: 8px; font-size: 15px; }
.cl-logo-edit { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(10, 10, 10, .55); color: #fff; opacity: 0; transition: opacity .12s ease; }
.cl-logo:hover .cl-logo-edit, .cl-logo:focus-within .cl-logo-edit { opacity: 1; }
.cl-name { flex: 1; min-width: 0; height: 36px; padding: 0 8px; margin-left: -8px; font-size: 16px; font-weight: 500; background: transparent; border: 1px solid transparent; border-radius: var(--radius-control); }
.cl-name:hover { border-color: var(--control); }
.cl-name:focus { border-color: var(--text); background: var(--surface); }
.cl-fav { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; background: none; border: none; color: var(--muted); border-radius: var(--radius-control); }
.cl-fav:hover { background: var(--raised); color: var(--text); }
.cl-fav.on { color: var(--text); }
.cl-body { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.cl-services, .cl-access { padding: 12px 16px 16px; min-width: 0; }
.cl-access { border-left: 1px solid var(--rule); }
.cl-sub { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.cl-srv { display: flex; align-items: center; gap: 4px; min-height: 36px; margin: 0 -8px; padding: 0 4px 0 8px; border-radius: var(--radius-control); }
.cl-srv:hover { background: var(--hover); }
.cl-srv-name { flex: 1; min-width: 0; cursor: text; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-add-srv { margin-top: 8px; border-radius: var(--radius-chip); }
.cl-none { font-size: 13px; color: var(--muted); }

/* ── Pannello dettaglio (scorre da destra) ────────────────────────────── */
.scrim { position: fixed; inset: 0; background: rgba(20, 18, 14, .28); z-index: 40; }
.detail {
  position: fixed; top: 0; right: 0; bottom: 0; width: 640px; max-width: 100vw; z-index: 45; overflow-y: auto;
  background: var(--surface); border-left: 1px solid var(--border); box-shadow: var(--shadow-float);
}
.detail-top { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; height: 56px; padding: 0 16px 0 24px; background: var(--surface); border-bottom: 1px solid var(--rule); }
.btn-complete { height: var(--control-h); padding: 0 12px 0 8px; font-size: 13px; gap: 8px; }
.btn-complete .check { width: 16px; height: 16px; pointer-events: none; }
.btn-complete .check::after { width: 8px; height: 4px; }
.btn-complete:hover .check:not(.done) { border-color: var(--positive); color: var(--positive); }
.btn-complete.done { background: var(--positive-tint); border-color: #b5e8c6; color: var(--positive-ink); }
.detail-where { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.detail-pad { padding: 20px 24px 32px; }
.d-title {
  width: calc(100% + 16px); margin: 0 -8px 16px; padding: 4px 8px; height: auto; font-size: 22px; line-height: 30px; font-weight: 600; letter-spacing: -.01em;
  background: transparent; border: 1px solid transparent; border-radius: var(--radius-control);
}
.d-title:hover:not(:disabled) { border-color: var(--control); }
.d-title:focus { border-color: var(--text); }
.d-title:disabled { background: transparent; color: var(--text); }
.d-fields { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 2px 12px; align-items: center; }
.d-fields .lab { color: var(--muted); font-size: 13px; }
.d-fields .val { font-size: 14px; min-height: 32px; display: flex; align-items: center; min-width: 0; }
.d-fields span.val { padding: 0 8px; }
.d-fields .val > input, .d-fields .val > .cdrop { height: 32px; }
.d-pick {
  display: inline-flex; align-items: center; gap: 8px; justify-self: start; max-width: 100%; height: 32px; padding: 0 8px; text-align: left;
  background: transparent; border: 1px solid transparent; border-radius: var(--radius-control); color: var(--text);
}
.d-pick:hover:not([disabled]) { background: var(--hover); border-color: var(--border); }
.d-pick .pp-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-sec { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.d-sec h4 { display: flex; align-items: baseline; gap: 8px; font-size: 15px; font-weight: 600; letter-spacing: -.005em; margin-bottom: 12px; }
.d-sec h4 .count { font-weight: 400; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.d-none { font-size: 13px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; font-size: 12px; background: var(--surface); border: 1px solid var(--control); color: var(--muted); border-radius: var(--radius-chip); }
.chip.add { border-style: dashed; }
.chip.add:hover { color: var(--text); border-color: var(--muted); }
.sub-item, .dep-item { display: flex; align-items: center; gap: 10px; min-height: 40px; border-top: 1px solid var(--rule); font-size: 14px; }
.sub-item:first-child, .dep-item:first-child { border-top: none; }
.sub-item .st { flex: 1; min-width: 0; }
.sub-item .st.muted { text-decoration: line-through; text-decoration-color: var(--control); }
.dep-item { justify-content: space-between; }
.d-sec .add-row { margin: 0 -8px; padding: 0 8px; border-top-color: transparent; border-radius: var(--radius-control); min-height: 36px; }
.d-sec #d-subs:not(:empty) + .add-row { margin-top: 2px; }
#d-dep-add { margin-top: 8px; width: auto; min-width: 220px; }

.att-list { display: flex; flex-direction: column; gap: 6px; }
.att-item { display: flex; align-items: center; gap: 12px; padding: 6px 8px 6px 6px; border: 1px solid var(--border); border-radius: var(--radius-control); }
.att-item:hover { border-color: var(--control); }
.att-thumb { width: 40px; height: 40px; border-radius: var(--radius-chip); background: var(--ground); color: var(--muted); display: flex; align-items: center; justify-content: center; overflow: hidden; flex: none; text-decoration: none; }
.att-thumb img { width: 100%; height: 100%; object-fit: cover; }
.att-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.att-name { text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-name:hover { text-decoration: underline; }
.att-info .muted { font-size: 12px; line-height: 16px; }
.dropzone { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 8px; min-height: 48px; padding: 8px 14px; border: 1px dashed var(--control); border-radius: var(--radius-control); color: var(--muted); font-size: 13px; cursor: pointer; }
.dropzone:hover { border-color: var(--muted); color: var(--text); }
.link-like { color: var(--text); text-decoration: underline; }
.detail.drop-active { outline: 2px dashed var(--text); outline-offset: -8px; }
.detail.drop-active::after { content: "Rilascia i file per allegarli"; position: sticky; bottom: 0; display: block; text-align: center; background: var(--primary); color: #fff; padding: 12px; font-weight: 500; }

.cmt { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 0 10px; padding: 10px 0; }
.cmt .avatar { width: 28px; height: 28px; font-size: 11px; grid-row: span 2; }
.cmt-head { display: flex; align-items: baseline; gap: 8px; }
.cmt-head b { font-weight: 500; }
.cmt-meta { font-size: 12px; color: var(--muted); }
.cmt-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-box { display: flex; gap: 8px; margin-top: 12px; align-items: flex-end; }
.comment-box textarea { flex: 1; min-height: 60px; }

/* ── Modali e dialoghi ────────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; z-index: 60; overflow: auto; display: flex; align-items: flex-start; justify-content: center; padding: 56px 16px; background: rgba(20, 18, 14, .36); }
.modal { position: relative; width: 720px; max-width: 100%; padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-float); }
.modal-close { position: absolute; top: 20px; right: 20px; }
.modal h2 { font-size: 20px; line-height: 28px; letter-spacing: -.01em; padding-right: 40px; }
.modal h4 { font-size: 14px; font-weight: 600; margin: 28px 0 10px; display: flex; align-items: baseline; gap: 8px; }
.modal h4 .count { font-weight: 400; font-size: 13px; color: var(--muted); }
.modal-note { color: var(--muted); margin-top: 4px; }
.profile-head { display: flex; align-items: center; gap: 20px; margin-top: 20px; }
.profile-head .avatar { font-size: 32px !important; }
.profile-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.profile-actions .row-flex { gap: 8px; }
.profile-actions p { font-size: 12px; color: var(--muted); }
.pf-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 12px; margin-bottom: 8px; }
.pf-row label { color: var(--muted); font-size: 13px; }
.pf-actions { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.pf-actions .error { min-height: 0; }
.rule-form { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr auto; gap: 8px; align-items: center; }
.cf-form { display: grid; grid-template-columns: 1.2fr 1fr 1.4fr auto; gap: 8px; align-items: center; margin-top: 10px; }
.rule-form .btn-primary, .cf-form .btn-primary { height: 36px; }
.rule-row, .cf-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 48px; padding: 6px 0; border-top: 1px solid var(--rule); }
.rule-row:first-child, .cf-row:first-child { border-top: none; }
.cf-row { grid-template-columns: minmax(0, 1fr) auto; }
.rule-main { display: flex; flex-direction: column; min-width: 0; }
.rule-main b, .cf-row b { font-weight: 500; }
.rule-main .muted, .cf-row .muted { font-size: 13px; }
.rule-toggle { display: inline-flex; }
.rule-toggle input { appearance: none; width: 30px; height: 18px; margin: 0; border-radius: 9px; background: var(--control); position: relative; cursor: pointer; transition: background-color .15s ease; }
.rule-toggle input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s ease; }
.rule-toggle input:checked { background: var(--primary); }
.rule-toggle input:checked::after { transform: translateX(12px); }
.row-flex { display: flex; align-items: center; gap: 12px; }

.ui-dialog-ov { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(20, 18, 14, .36); }
.ui-dialog { width: 420px; max-width: 100%; padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-float); }
.ui-dialog h3 { font-size: 16px; line-height: 24px; margin-bottom: 8px; }
.ui-dialog-body { color: var(--muted); margin-bottom: 20px; white-space: pre-line; }
.ui-dialog-input { margin: 4px 0 20px; }
.ui-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* ── Ricerca globale (palette) ────────────────────────────────────────── */
.cmdk { position: fixed; inset: 0; z-index: 150; display: flex; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; background: rgba(20, 18, 14, .36); }
.ts-search { width: 640px; max-width: 100%; max-height: 76vh; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-float); overflow: hidden; }
.ts-field { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 16px; flex: none; }
.ts-ico { color: var(--muted); }
.ts-field input { flex: 1; min-width: 0; height: 100%; background: none; border: none; outline: none; font-size: 16px; }
.ts-field input::-webkit-search-cancel-button { display: none; }
.ts-hint { padding: 10px 16px 12px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--rule); }
.gsearch-results { overflow-y: auto; padding: 4px 8px 8px; border-top: 1px solid var(--rule); }
.gsearch-results:not(.hidden) + .ts-hint { display: none; }
.gs-group { font-size: 12px; color: var(--muted); padding: 10px 8px 4px; }
.gs-item { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 8px; border-radius: var(--radius-control); cursor: pointer; }
.gs-item.active { background: var(--raised); }
.gs-kind { flex: none; color: var(--muted); display: inline-flex; width: 16px; justify-content: center; }
.gs-main { flex: 1; min-width: 0; }
.gs-title { display: flex; align-items: center; gap: 8px; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-title.done, .gs-title .done { text-decoration: line-through; color: var(--muted); }
.gs-sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-sub b { font-weight: 500; }
.gs-item mark { background: #ffe1dc; color: inherit; border-radius: 2px; padding: 0 1px; }
.gs-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.gs-empty { padding: 20px 12px; color: var(--muted); text-align: center; }

/* ── Toast e barra azioni in blocco ───────────────────────────────────── */
.toasts { position: fixed; bottom: 20px; right: 20px; z-index: 210; display: flex; flex-direction: column; gap: 8px; }
.toast { max-width: 360px; padding: 10px 14px; background: var(--primary); color: #fff; border-radius: var(--radius-control); font-size: 13px; box-shadow: var(--shadow-float); opacity: 0; transition: opacity .2s ease; }
.toast.show { opacity: 1; }
.toast.ok { display: flex; align-items: center; gap: 10px; }
.toast-ic { flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--positive); display: inline-flex; align-items: center; justify-content: center; animation: check-pop .42s cubic-bezier(.3, 1.6, .5, 1); }

/* ── Feedback: task completato, elemento creato ───────────────────────── */
.fx-layer { position: fixed; inset: 0; z-index: 400; pointer-events: none; overflow: hidden; }
.fx-ring { position: absolute; width: 20px; height: 20px; border: 2px solid var(--positive); border-radius: 50%; }
.fx-bit { position: absolute; width: 6px; height: 6px; border-radius: 50%; }
.fx-bit.bar { width: 4px; height: 9px; border-radius: 1.5px; }
.check.pop { animation: check-pop .42s cubic-bezier(.3, 1.6, .5, 1); }
.check.pop::after { animation: check-draw .26s .1s ease-out both; }
@keyframes check-pop { 0% { transform: scale(.5); } 55% { transform: scale(1.3); } 100% { transform: scale(1); } }
@keyframes check-draw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.just-done { animation: done-wash .9s ease-out; }
.just-new { animation: done-wash 1.6s ease-out; }
@keyframes done-wash { 0%, 25% { background-color: var(--positive-tint); } 100% { background-color: transparent; } }
.card.just-done, .card.just-new, .cl-card.just-new, .team-card.just-new { animation-name: done-wash-card; }
@keyframes done-wash-card { 0%, 25% { background-color: var(--positive-tint); border-color: var(--positive); } 100% { background-color: var(--surface); } }
.row .r-title, .card .card-title, .mini-task .mt-title { transition: color .25s ease; }
#bulk-bar {
  position: fixed; left: 0; right: 0; bottom: 24px; margin: 0 auto; width: max-content; max-width: calc(100vw - 32px); z-index: 90;
  display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 16px;
  background: var(--primary); color: #fff; border-radius: var(--radius); box-shadow: var(--shadow-float);
}
#bulk-bar .bulk-count { font-size: 13px; font-weight: 500; margin-right: 8px; font-variant-numeric: tabular-nums; }
#bulk-bar button { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: none; border-radius: var(--radius-control); font-size: 13px; font-weight: 500; background: rgba(255, 255, 255, .14); color: #fff; }
#bulk-bar button:hover { background: rgba(255, 255, 255, .24); }
#bulk-bar .bulk-del { background: #fff; color: var(--negative); }
#bulk-bar .bulk-del:hover { background: var(--negative-tint); }

/* ===========================================================================
   Tablet e telefono
   =========================================================================== */
@media (max-width: 1100px) {
  :root { --pad: 24px; }
  .list-head, .row { grid-template-columns: minmax(220px, 1fr) 64px 112px 104px 124px; }
  .list-head > div:nth-child(6), .row > div:nth-child(6) { display: none; }
  .mytasks .list-head, .mytasks .row { grid-template-columns: minmax(200px, 1fr) minmax(110px, 160px) 104px 100px 116px; }
  .set-row { grid-template-columns: 1fr; gap: 16px; }
  .set-label h2 { margin-top: 0; }
}

@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: 48px minmax(0, 1fr); }
  .mobilebar { display: flex; align-items: center; gap: 4px; height: 48px; padding: 0 8px; background: var(--surface); border-bottom: 1px solid var(--border); }
  .mobilebar .icon-btn { width: 40px; height: 40px; color: var(--text); }
  .mb-brand { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
  .sidebar { display: none; position: fixed; inset: 48px 0 0 0; z-index: 30; background: var(--surface); border-right: none; }
  body.nav-open .sidebar { display: flex; }
  .sb-brand { display: none; }
  .sb-item, .sb-project, .sb-folder-head { height: 44px; font-size: 15px; }
  .home { padding-top: 24px; }
  .page-head { padding-top: 20px; }
  .home-grid { grid-template-columns: minmax(0, 1fr); }
  .dash-split { grid-template-columns: minmax(0, 1fr); }
  .dash-col { border-left: none; border-top: 1px solid var(--rule); }
  .dash-col:first-child { border-top: none; }
  .week { grid-template-columns: minmax(0, 1fr); }
  .wk-day { min-height: 0; display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 4px 8px; align-items: center; padding: 8px 16px; border-left: none; border-top: 1px solid var(--rule); border-radius: 0 !important; }
  .wk-day:first-child { border-top: none; }
  .wk-day.today { box-shadow: inset 2px 0 0 var(--coral); }
  .wk-top { margin: 0; grid-column: 1; grid-row: 1 / span 5; align-self: start; min-height: 32px; }
  .wk-count { display: none; }
  .wk-task, .wk-more, .wk-none { grid-column: 2; }
  .wk-task { height: 32px; font-size: 13px; }
  .wk-none { padding: 0; font-size: 13px; }
  .cl-body { grid-template-columns: minmax(0, 1fr); }
  .cl-access { border-left: none; border-top: 1px solid var(--rule); }
}

@media (max-width: 700px) {
  :root { --pad: 16px; }
  .page-head .title { font-size: 20px; line-height: 28px; }
  .page-head { flex-wrap: wrap; }
  .tabs { gap: 18px; }
  .tab { height: 44px; }
  .toolbar { overflow-x: auto; scrollbar-width: none; }
  .toolbar .spacer { min-width: 4px; }
  .toolbar .tool, .btn-add { height: 36px; flex: none; }

  /* la tabella diventa una lista a due righe: nome sopra, campi sotto */
  .list-head { display: none; }
  .sheet > #sections > .section:first-child .section-head, .sheet > #mt > .section:first-child .section-head { border-radius: var(--radius) var(--radius) 0 0; }
  .row, .mytasks .row { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px; padding: 8px 16px 10px 44px; }
  .row > div, .row > div:first-child { padding: 0; min-height: 0; font-size: 13px; }
  .row > div.r-name { flex: 0 0 calc(100% + 28px); margin-left: -28px; min-height: 28px; font-size: 14px; }
  .row > div:nth-child(6) { display: flex; }
  .row > div:empty, .row > div:has(> .r-add:only-child), .row > div:has(> .nil:only-child), .row > div:has(> .r-add-circle:only-child) { display: none; }
  .row .avatar { width: 20px; height: 20px; font-size: 9px; }
  .r-select:not(.on) { display: none; }
  .row-menu { opacity: 1; }
  .add-row { min-height: 44px; }

  .kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-cell:nth-child(odd) { border-left: none; }
  .kpi-cell:nth-child(n + 3) { border-top: 1px solid var(--rule); }
  button.kpi-cell { border-radius: 0 !important; }
  .kpi-cell .num { font-size: 24px; line-height: 30px; }

  .mt-where { display: none; }

  .cal-cell { min-height: 64px; padding: 4px 3px; }
  .cal-dow { padding: 0 4px; justify-content: center; }
  .cal-task { height: 8px; padding: 0; margin-bottom: 3px; background: var(--control); }
  .cal-task.in_progress { background: var(--coral); }
  .cal-task.done { background: #9fd3a6; }
  .cal-task.overdue { background: var(--negative); }
  .cal-task::before, .cal-task span { display: none; }
  .cal-head h3 { min-width: 0; flex: 1; }
  .tl-label { width: 132px; padding: 0 10px; }

  .detail { width: 100vw; border-left: none; }
  .detail-pad { padding: 16px 16px 32px; }
  .detail-top { padding: 0 8px 0 16px; }
  .d-fields { grid-template-columns: 116px minmax(0, 1fr); }
  .comment-box { flex-direction: column; align-items: stretch; }

  .user-form, .rule-form, .cf-form { grid-template-columns: minmax(0, 1fr); }
  .user-row { grid-template-columns: minmax(0, 1fr) auto auto; row-gap: 4px; }
  .user-row .u-main { grid-column: 1 / -1; }
  .user-row .cdrop { width: 132px; }
  .pf-row { grid-template-columns: minmax(0, 1fr); gap: 6px; margin-bottom: 12px; }
  .modal { padding: 20px 16px; }
  .modal-overlay { padding: 16px 8px; }
  .login-alt { grid-template-columns: 1fr; }
  .cmdk { padding-top: 16px; }
  .toasts { left: 16px; right: 16px; bottom: 16px; }
  .inbox { padding-top: 12px; }
  .nt-row { padding: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
