/* Gestionale Autotecnica — interfaccia dello staff */
:root {
  --brand: #1747D6; --brand-2: #3B6BFF; --accent: #FF6B2C;
  --bg: #F3F5FA; --panel: #FFFFFF; --panel-2: #F8FAFD; --soft: #EEF2F9; --hover: #F1F4FA;
  --text: #0F172A; --text-2: #334155; --muted: #64748B; --faint: #94A3B8;
  --line: #E4E9F2; --line-2: #D5DCE8;
  --brand-soft: #E8EEFF; --brand-text: #1747D6;
  --blu: #2563EB; --teal: #0D9488; --viola: #7C3AED; --verde: #16A34A; --rosso: #DC2626; --arancio: #EA580C; --grigio: #64748B;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 20px -8px rgba(15, 23, 42, .12);
  --shadow-lg: 0 24px 60px -12px rgba(15, 23, 42, .35);
  --r: 14px; --r-sm: 10px; --r-lg: 20px;
  --side: 248px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A0F1C; --panel: #111827; --panel-2: #0E1524; --soft: #172033; --hover: #182238;
    --text: #E6EAF2; --text-2: #C3CAD6; --muted: #8F9BB0; --faint: #64748B;
    --line: #1E293B; --line-2: #2A3850;
    --brand-soft: #1A2650; --brand-text: #8EA8FF;
    --blu: #60A5FA; --teal: #2DD4BF; --viola: #A78BFA; --verde: #4ADE80; --rosso: #F87171; --arancio: #FB923C; --grigio: #94A3B8;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -10px rgba(0, 0, 0, .5);
    --shadow-lg: 0 24px 60px -12px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0A0F1C; --panel: #111827; --panel-2: #0E1524; --soft: #172033; --hover: #182238;
  --text: #E6EAF2; --text-2: #C3CAD6; --muted: #8F9BB0; --faint: #64748B;
  --line: #1E293B; --line-2: #2A3850;
  --brand-soft: #1A2650; --brand-text: #8EA8FF;
  --blu: #60A5FA; --teal: #2DD4BF; --viola: #A78BFA; --verde: #4ADE80; --rosso: #F87171; --arancio: #FB923C; --grigio: #94A3B8;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -10px rgba(0, 0, 0, .5);
  --shadow-lg: 0 24px 60px -12px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 14.5px/1.5 "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; font-feature-settings: "tnum" 1;
}
[hidden] { display: none !important; }
a { color: var(--brand-text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.01em; }
h1 { font-size: 24px; font-weight: 800; }
h2 { font-size: 16px; font-weight: 800; }
h3 { font-size: 14.5px; font-weight: 800; }
p { margin: 0; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: color-mix(in srgb, var(--brand) 25%, transparent); }

.boot { min-height: 100vh; display: grid; place-items: center; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid color-mix(in srgb, var(--brand) 22%, transparent); border-top-color: var(--brand); animation: spin .8s linear infinite; display: inline-block; }
.spinner.sm { width: 16px; height: 16px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- Accesso */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art {
  position: relative; overflow: hidden; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(1200px 600px at -10% -20%, #3B6BFF 0, transparent 60%),
              radial-gradient(800px 500px at 120% 120%, #FF6B2C 0, transparent 55%), #0E2A8A;
}
.login-art h2 { font-size: 34px; line-height: 1.15; max-width: 440px; letter-spacing: -.02em; }
.login-art p { opacity: .8; max-width: 420px; margin-top: 12px; font-size: 16px; }
.login-art ul { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 12px; }
.login-art li { display: flex; gap: 10px; align-items: center; font-weight: 600; opacity: .92; }
.login-art li svg { font-size: 18px; }
.login-form { display: grid; place-items: center; padding: 32px; }
.login-form form { width: min(380px, 100%); display: flex; flex-direction: column; gap: 16px; }
.login-form h1 { font-size: 28px; }
.login-form .muted { margin-top: -8px; }
@media (max-width: 860px) { .login { grid-template-columns: 1fr; } .login-art { display: none; } }

/* ---------------------------------------------------------------- Struttura */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; background: var(--panel); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 18px 14px; gap: 4px; z-index: 30; overflow-y: auto;
}
.brand { display: flex; gap: 11px; align-items: center; padding: 4px 8px 18px; }
.brand .logo { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: #fff; font-size: 19px;
  background: linear-gradient(135deg, var(--brand-2), var(--brand)); box-shadow: 0 6px 16px -6px var(--brand); }
.brand b { display: block; font-size: 15.5px; font-weight: 800; }
.brand small { color: var(--muted); font-size: 12px; font-weight: 600; }
.nav-label { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); padding: 14px 10px 6px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 10px; color: var(--text-2);
  font-weight: 700; text-decoration: none; position: relative;
}
.nav a svg { font-size: 18px; color: var(--muted); }
.nav a:hover { background: var(--hover); }
.nav a.on { background: var(--brand-soft); color: var(--brand-text); }
.nav a.on svg { color: var(--brand-text); }
.nav .count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.side-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 4px; }
.side-foot button { display: flex; gap: 11px; align-items: center; background: none; border: 0; padding: 9px 10px; border-radius: 10px;
  color: var(--text-2); font-weight: 700; cursor: pointer; text-align: left; }
.side-foot button:hover { background: var(--hover); }
.side-foot button svg { font-size: 18px; color: var(--muted); }

.main { min-width: 0; display: flex; flex-direction: column; }
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 14px 28px;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.top .menu-toggle { display: none; }
.search { position: relative; flex: 1; max-width: 460px; }
.search > svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); font-size: 16px; }
.search input { width: 100%; height: 40px; border-radius: 11px; border: 1px solid var(--line); background: var(--panel); padding: 0 56px 0 36px; outline: none; }
.search input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font: 700 11px/1 inherit; color: var(--faint);
  border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; background: var(--panel-2); }
.search-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; max-height: 420px; overflow: auto; }
.search-results a { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 8px; color: var(--text); text-decoration: none; }
.search-results a:hover, .search-results a.sel { background: var(--hover); }
.search-results .empty { padding: 14px; color: var(--muted); text-align: center; }
.top-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.top-out { color: var(--text-2); }
.top-out svg { font-size: 18px; }
.page { padding: 24px 28px 48px; width: 100%; max-width: 1480px; }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); font-weight: 600; margin-top: 2px; }
.page-head .tools { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

@media (max-width: 1000px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; width: 272px; transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--shadow-lg); }
  .shell.nav-open .side { transform: none; }
  .shell.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(2, 6, 23, .45); z-index: 25; }
  .top { padding: 12px 16px; }
  .top .menu-toggle { display: inline-flex; }
  .page { padding: 18px 16px 40px; }
  .top .btn .lbl { display: none; }
  .search kbd { display: none; }
}

/* ---------------------------------------------------------------- Componenti */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 15px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text); font-weight: 700; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .05s; text-decoration: none;
}
.btn:hover { background: var(--hover); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn svg { font-size: 16px; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 4px 12px -4px color-mix(in srgb, var(--brand) 70%, transparent); }
.btn.primary:hover { background: color-mix(in srgb, var(--brand) 88%, #fff); }
.btn.danger { color: var(--rosso); border-color: color-mix(in srgb, var(--rosso) 35%, var(--line)); }
.btn.danger:hover { background: color-mix(in srgb, var(--rosso) 8%, var(--panel)); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--hover); }
.btn.sm { height: 32px; padding: 0 11px; font-size: 13.5px; border-radius: 9px; }
.btn.xs { height: 28px; padding: 0 9px; font-size: 12.5px; border-radius: 8px; }
.btn.icon { width: 38px; padding: 0; }
.btn.sm.icon { width: 32px; }
.btn.block { width: 100%; }
.seg { display: inline-flex; background: var(--soft); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; height: 32px; padding: 0 13px; border-radius: 8px; font-weight: 700; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--panel); color: var(--text); box-shadow: var(--shadow-sm); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; gap: 10px; padding: 16px 18px 0; }
.card-h .more { margin-left: auto; }
.card-b { padding: 14px 18px 18px; }
.card-b.flush { padding: 8px 0 6px; }
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-main { grid-template-columns: minmax(0, 1.65fr) minmax(320px, 1fr); align-items: start; }
.cols-side { grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); align-items: start; }
@media (max-width: 1100px) { .cols-main, .cols-side, .cols-2 { grid-template-columns: 1fr; } }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { padding: 16px 18px; display: flex; gap: 14px; align-items: flex-start; }
.kpi .ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; flex: none; }
.kpi .val { font-size: 28px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.kpi .lbl { color: var(--muted); font-weight: 700; font-size: 13px; }
.kpi .hint { color: var(--faint); font-size: 12.5px; font-weight: 600; margin-top: 2px; }
.tone-blu { background: color-mix(in srgb, var(--blu) 13%, transparent); color: var(--blu); }
.tone-viola { background: color-mix(in srgb, var(--viola) 13%, transparent); color: var(--viola); }
.tone-arancio { background: color-mix(in srgb, var(--arancio) 13%, transparent); color: var(--arancio); }
.tone-verde { background: color-mix(in srgb, var(--verde) 13%, transparent); color: var(--verde); }
.tone-teal { background: color-mix(in srgb, var(--teal) 13%, transparent); color: var(--teal); }
.tone-rosso { background: color-mix(in srgb, var(--rosso) 13%, transparent); color: var(--rosso); }
.tone-grigio { background: color-mix(in srgb, var(--grigio) 13%, transparent); color: var(--grigio); }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 800; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.plain::before { display: none; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 700;
  background: var(--soft); color: var(--text-2); white-space: nowrap; }
.plate { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: 5px; font: 800 12px/1 ui-monospace, "SF Mono", Menlo, monospace;
  letter-spacing: .04em; border: 1.5px solid var(--line-2); background: var(--panel); color: var(--text); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.strong { font-weight: 800; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.top { align-items: flex-start; }
.grow { flex: 1; min-width: 0; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack.tight { gap: 6px; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt20 { margin-top: 20px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none;
  background: var(--brand-soft); color: var(--brand-text); }
.avatar.lg { width: 56px; height: 56px; font-size: 19px; }

.empty { padding: 34px 20px; text-align: center; color: var(--muted); }
.empty svg { font-size: 30px; color: var(--faint); display: block; margin: 0 auto 10px; }
.empty b { display: block; color: var(--text-2); margin-bottom: 2px; }
.loading { padding: 40px; display: grid; place-items: center; }
.err-box { padding: 26px; text-align: center; color: var(--muted); }
.err-box svg { color: var(--rosso); font-size: 26px; display: block; margin: 0 auto 8px; }

/* liste */
.list-item { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-top: 1px solid var(--line); cursor: pointer; }
.list-item:first-child { border-top: 0; }
.list-item:hover { background: var(--hover); }
.list-item .t { font-weight: 800; }
.list-item .s { color: var(--muted); font-size: 13px; }
.time { font-weight: 800; font-size: 15px; width: 52px; flex: none; }

/* tabelle */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--faint);
  padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--panel-2); white-space: nowrap; }
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr.click:hover td { background: var(--hover); }
.tbl .num { text-align: right; }
.pager { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); color: var(--muted); font-weight: 600; }
.pager .btn { margin-left: 4px; }
.pager span { margin-right: auto; }

/* barre settimana */
.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; align-items: end; height: 150px; padding-top: 8px; }
.bar { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; cursor: pointer; }
.bar .track { flex: 1; width: 100%; max-width: 44px; background: var(--soft); border-radius: 8px; position: relative; overflow: hidden; }
.bar .fill { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 8px; background: linear-gradient(180deg, var(--brand-2), var(--brand)); }
.bar .fill.hi { background: linear-gradient(180deg, #FF8A55, var(--accent)); }
.bar small { font-weight: 800; color: var(--muted); font-size: 12px; }
.bar b { font-size: 12px; }
.bar.closed .track { background: repeating-linear-gradient(45deg, var(--soft) 0 6px, transparent 6px 12px); }
.bar.today small { color: var(--brand-text); }

/* ---------------------------------------------------------------- Agenda */
.agenda-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.agenda-bar .title { font-size: 18px; font-weight: 800; margin: 0 6px; text-transform: capitalize; }
.agenda-bar input[type=date] { height: 38px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); padding: 0 10px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin-left: auto; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.legend span { display: inline-flex; gap: 6px; align-items: center; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.week { overflow-x: auto; }
.week-grid { display: grid; grid-template-columns: 64px repeat(7, minmax(150px, 1fr)); min-width: 1120px; }
.week-grid .wh { position: sticky; top: 0; padding: 12px 10px; border-bottom: 1px solid var(--line); background: var(--panel); z-index: 1; cursor: pointer; }
.week-grid .wh:hover b { color: var(--brand-text); }
.week-grid .wh small { display: block; color: var(--muted); font-weight: 800; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; }
.week-grid .wh b { font-size: 20px; font-weight: 800; }
.week-grid .wh.today b { color: #fff; background: var(--brand); border-radius: 9px; padding: 0 8px; }
.week-grid .wh .load { height: 4px; border-radius: 4px; background: var(--soft); margin-top: 8px; overflow: hidden; }
.week-grid .wh .load i { display: block; height: 100%; background: var(--brand); border-radius: 4px; }
.week-grid .wh .load i.hi { background: var(--accent); }
.week-grid .th { padding: 8px 10px; font-weight: 800; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); text-align: right; }
.week-grid .cell { border-top: 1px solid var(--line); border-left: 1px solid var(--line); padding: 5px; min-height: 64px; display: flex; flex-direction: column; gap: 4px; }
.week-grid .cell.off { background: repeating-linear-gradient(-45deg, transparent 0 7px, color-mix(in srgb, var(--line) 55%, transparent) 7px 8px); }
.week-grid .cell.past { background: color-mix(in srgb, var(--soft) 50%, transparent); }
.week-grid .wh.closed { color: var(--faint); }
.add-slot { border: 1.5px dashed var(--line-2); background: none; border-radius: 8px; color: var(--faint); font-size: 12px; font-weight: 800;
  height: 26px; cursor: pointer; opacity: 0; transition: opacity .15s; }
.cell:hover .add-slot, .slot-row:hover .add-slot, .add-slot:focus { opacity: 1; }
.add-slot:hover { border-color: var(--brand); color: var(--brand-text); }

.chip-appt {
  display: block; width: 100%; text-align: left; border: 0; border-left: 3px solid var(--c, var(--blu)); cursor: pointer;
  background: color-mix(in srgb, var(--c, var(--blu)) 10%, var(--panel)); border-radius: 7px; padding: 5px 8px; font-size: 12.5px; line-height: 1.35;
}
.chip-appt:hover { background: color-mix(in srgb, var(--c, var(--blu)) 18%, var(--panel)); }
.chip-appt b { display: block; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip-appt span { color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip-appt.done { opacity: .6; }
.chip-appt .flag { color: var(--arancio); }

.day-list { display: flex; flex-direction: column; }
.slot-row { display: grid; grid-template-columns: 76px 1fr; gap: 14px; padding: 12px 18px; border-top: 1px solid var(--line); }
.slot-row:first-child { border-top: 0; }
.slot-row.past { opacity: .72; }
.slot-row .when { font-weight: 800; font-size: 16px; }
.slot-row .when small { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.slot-row .items { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.appt-card {
  text-align: left; border: 1px solid var(--line); border-left: 4px solid var(--c, var(--blu)); background: var(--panel); border-radius: 12px;
  padding: 11px 13px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow-sm);
}
.appt-card:hover { border-color: color-mix(in srgb, var(--c, var(--blu)) 45%, var(--line)); box-shadow: var(--shadow); }
.appt-card .who { font-weight: 800; }
.appt-card .what { color: var(--muted); font-size: 13px; }
.free-slot { border: 1.5px dashed var(--line-2); border-radius: 12px; background: none; color: var(--faint); font-weight: 800; cursor: pointer; min-height: 70px; }
.free-slot:hover { border-color: var(--brand); color: var(--brand-text); background: var(--brand-soft); }
.banner { display: flex; gap: 10px; align-items: center; padding: 11px 14px; border-radius: 12px; font-weight: 700; margin-bottom: 14px; }
.banner svg { font-size: 18px; }

/* ---------------------------------------------------------------- Richieste */
.req-card { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; cursor: pointer; }
.req-card:hover { box-shadow: var(--shadow-lg); }
.req-card .quote { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; color: var(--text-2); white-space: pre-wrap; }
.req-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 14px; font-weight: 800; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; }
.tabs button.on { color: var(--brand-text); border-bottom-color: var(--brand); }
.tabs .n { background: var(--soft); color: var(--muted); border-radius: 999px; padding: 0 8px; font-size: 12px; height: 20px; display: inline-grid; place-items: center; }
.tabs button.on .n { background: var(--brand-soft); color: var(--brand-text); }

/* ---------------------------------------------------------------- Moduli */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span, .label { font-size: 12.5px; font-weight: 800; color: var(--text-2); }
.field > span em, .label em { font-style: normal; color: var(--faint); font-weight: 600; }
.input, select.input, textarea.input {
  height: 40px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel); padding: 0 12px; outline: none; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
textarea.input { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent); }
.input.upper { text-transform: uppercase; font-weight: 800; letter-spacing: .05em; }
.input:disabled { background: var(--soft); color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-weight: 700; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--brand); flex: none; }
.check small { display: block; color: var(--muted); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line-2); background: var(--panel); border-radius: 999px; height: 34px; padding: 0 14px; font-weight: 700; cursor: pointer; }
.chip:hover { border-color: var(--brand); }
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip:disabled { opacity: .45; cursor: not-allowed; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.slot { border: 1px solid var(--line-2); background: var(--panel); border-radius: 10px; padding: 7px 4px; cursor: pointer; text-align: center; font-weight: 800; }
.slot small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 700; }
.slot:hover { border-color: var(--brand); }
.slot.full { background: var(--soft); color: var(--faint); }
.slot.full small { color: var(--rosso); }
.slot[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.slot[aria-pressed="true"] small { color: rgba(255, 255, 255, .85); }
.option { display: flex; gap: 12px; align-items: center; padding: 11px 13px; border: 1px solid var(--line-2); border-radius: 12px; cursor: pointer; background: var(--panel); text-align: left; width: 100%; }
.option:hover { border-color: var(--brand); }
.option[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand) inset; }
.hint-box { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: 12px; font-weight: 600; font-size: 13.5px; }
.notice svg { font-size: 17px; margin-top: 1px; }

/* ---------------------------------------------------------------- Drawer e finestre */
.backdrop { position: fixed; inset: 0; background: rgba(2, 6, 23, .45); z-index: 50; animation: fade .18s ease; backdrop-filter: blur(2px); }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--panel); z-index: 51; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; animation: slide .22s cubic-bezier(.2, .9, .3, 1);
}
.drawer-h { display: flex; gap: 12px; align-items: flex-start; padding: 20px 22px 16px; border-bottom: 1px solid var(--line); }
.drawer-b { flex: 1; overflow-y: auto; padding: 18px 22px 28px; display: flex; flex-direction: column; gap: 18px; }
.drawer-f { border-top: 1px solid var(--line); padding: 14px 22px; display: flex; gap: 10px; justify-content: flex-end; background: var(--panel-2); }
.modal {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(760px, calc(100% - 24px)); max-height: calc(100vh - 40px);
  background: var(--panel); border-radius: var(--r-lg); z-index: 51; box-shadow: var(--shadow-lg); display: flex; flex-direction: column;
  animation: pop .2s cubic-bezier(.2, .9, .3, 1);
}
.modal.sm { width: min(440px, calc(100% - 24px)); }
.modal .drawer-b { padding: 20px 24px; }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
@keyframes pop { from { transform: translate(-50%, -46%); opacity: 0; } }
.section-t { font-size: 11.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); margin-bottom: 8px; }
.kv { display: grid; grid-template-columns: 22px 1fr; gap: 10px 10px; align-items: start; }
.kv > svg { color: var(--muted); font-size: 17px; margin-top: 2px; }
.kv .v b { display: block; }
.kv .v span { color: var(--muted); font-size: 13px; }
.timeline { display: flex; flex-direction: column; gap: 0; }
.tl { display: grid; grid-template-columns: 14px 1fr; gap: 10px; padding-bottom: 12px; position: relative; }
.tl::before { content: ""; position: absolute; left: 6px; top: 14px; bottom: 0; width: 2px; background: var(--line); }
.tl:last-child::before { display: none; }
.tl i { width: 14px; height: 14px; border-radius: 50%; background: var(--panel); border: 3px solid var(--line-2); margin-top: 3px; }
.tl.staff i { border-color: var(--brand); }
.tl.cliente i { border-color: var(--accent); }
.tl small { color: var(--faint); font-weight: 700; font-size: 12px; }
.tl p { white-space: pre-wrap; }
.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.file { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; color: var(--text); text-decoration: none; display: flex; flex-direction: column; }
.file:hover { text-decoration: none; border-color: var(--brand); }
.file img, .file .ph { width: 100%; height: 84px; object-fit: cover; background: var(--soft); display: grid; place-items: center; color: var(--muted); font-size: 26px; }
.file span { padding: 6px 8px; font-size: 12px; font-weight: 700; }
.wa { border-radius: 12px 12px 12px 4px; padding: 10px 12px; background: color-mix(in srgb, #25D366 12%, var(--panel)); border: 1px solid color-mix(in srgb, #25D366 25%, var(--line)); }
.wa pre { margin: 0; white-space: pre-wrap; font: inherit; font-size: 13.5px; }
.wa .meta { display: flex; gap: 8px; align-items: center; margin-top: 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
.linkbox { display: flex; gap: 8px; align-items: center; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 6px 6px 6px 12px; }
.linkbox code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }

/* toast */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 80; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.toast { background: var(--text); color: var(--bg); padding: 12px 16px; border-radius: 12px; font-weight: 700; box-shadow: var(--shadow-lg);
  display: flex; gap: 10px; align-items: center; max-width: 420px; animation: pop-t .25s cubic-bezier(.2, .9, .3, 1); }
.toast.err { background: var(--rosso); color: #fff; }
.toast svg { font-size: 18px; }
@keyframes pop-t { from { transform: translateY(12px); opacity: 0; } }

/* impostazioni */
.set-list { display: flex; flex-direction: column; }
.set-list > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.set-list > div:first-child { border-top: 0; }
.set-list b { font-weight: 800; }

/* colore per stato (usato da chip e schede tramite --c) */
.c-blu { --c: var(--blu); } .c-teal { --c: var(--teal); } .c-viola { --c: var(--viola); } .c-verde { --c: var(--verde); }
.c-rosso { --c: var(--rosso); } .c-arancio { --c: var(--arancio); } .c-grigio { --c: var(--grigio); }
.legend i.c-blu, .legend i.c-teal, .legend i.c-viola, .legend i.c-verde, .legend i.c-rosso { background: var(--c); }
.date-col { width: 104px; flex: none; }
.date-col b { font-weight: 800; }
a.card { color: inherit; text-decoration: none; }
a.card:hover { text-decoration: none; border-color: var(--line-2); box-shadow: var(--shadow-lg); }
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
td details summary { max-width: 420px; color: var(--text-2); }

/* la colonna del menu arriva sempre in fondo alla pagina */
.shell { background: linear-gradient(to right, var(--panel) var(--side), transparent var(--side)); }
@media (max-width: 1000px) { .shell { background: none; } }
/* le colonne si possono restringere (niente pagina più larga dello schermo) */
.grid > *, .stack > *, .main, .page { min-width: 0; }
.wh .riserv { display: inline-block; margin-top: 4px; font-size: 11px; font-weight: 800; color: var(--arancio); }
@media (max-width: 600px) {
  .kpis { gap: 10px; }
  .kpi { padding: 14px; }
  .kpi .ico { display: none; }
  .kpi .val { font-size: 24px; }
  .list-item { padding: 10px 14px; gap: 10px; }
  .list-item .avatar { display: none; }
  .list-item .btn + .pill { display: none; }
  .page-head .tools { margin-left: 0; width: 100%; }
  .page-head .tools .search { max-width: none; }
  .slot-row { grid-template-columns: 1fr; gap: 8px; padding: 12px 14px; }
  .slot-row .items { grid-template-columns: 1fr; }
  .req-grid { grid-template-columns: 1fr; }
  .drawer-h, .drawer-b, .drawer-f { padding-left: 16px; padding-right: 16px; }
  .agenda-bar .legend { display: none; }
  .toasts { left: 12px; right: 12px; bottom: 12px; align-items: stretch; }
}

/* accesso, 2FA, utenti */
.login-box { width: min(400px, 100%); }
.login-box form, .login-box > .stack { display: flex; flex-direction: column; gap: 16px; }
.mfa-ico { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; font-size: 26px;
  background: var(--brand-soft); color: var(--brand-text); }
.code-in { height: 54px; font-size: 26px; font-weight: 800; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }
.code-in.rec { letter-spacing: .12em; font-size: 20px; }
.qr-wrap { display: grid; place-items: center; padding: 12px; background: #fff; border-radius: 14px; border: 1px solid var(--line); width: max-content; margin: 0 auto; }
.qr { width: 196px; height: 196px; image-rendering: pixelated; display: block; }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 4px; color: var(--text-2); }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.codes code { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px; text-align: center;
  font: 700 14px/1.2 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .04em; }
.big-code { font: 800 16px/1.3 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .04em; }
.me-chip { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; color: var(--text); text-decoration: none; margin-bottom: 6px; }
.me-chip:hover { background: var(--hover); text-decoration: none; }
.me-chip.on { background: var(--brand-soft); }
.me-chip b { display: block; font-size: 13.5px; }
.me-chip small { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.me-chip > svg { color: var(--faint); }
.card-h h2 { display: inline-flex; gap: 8px; align-items: center; }
.mt0 { margin-top: 0; }

/* ------------------------------------------------ Assegnazioni, vendite */
.who-tag { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 5px; border-radius: 999px; flex: none;
  font-size: 11px; font-weight: 800; background: var(--soft); color: var(--text-2); border: 1px solid var(--line-2); }
.who-tag.me { background: var(--brand-soft); color: var(--brand-text); border-color: color-mix(in srgb, var(--brand) 35%, transparent); }
.who-tag.xs { min-width: 18px; height: 18px; font-size: 9.5px; padding: 0 3px; vertical-align: 1px; }
.who-tag.lg { min-width: 30px; height: 30px; font-size: 12px; }
.pill svg { font-size: 12px; margin-right: 3px; }
.input.sm, select.input.sm { height: 32px; font-size: 13px; padding: 0 8px; border-radius: 9px; }
.assign-sel { width: auto; max-width: 180px; }
.top-chat { position: relative; color: var(--text-2); }
.top-chat svg { font-size: 19px; }
.top-chat .count { position: absolute; top: 1px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.top-chat .count[hidden] { display: none; }
.danger-t { color: var(--rosso); }
.card-h .more.row { gap: 10px; align-items: center; }

/* ------------------------------------------------ Calendario del mese */
.month { overflow: hidden; }
.month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.month-grid .mh { padding: 10px 10px 8px; font-size: 11.5px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em;
  border-bottom: 1px solid var(--line); }
.mc { min-height: 128px; padding: 7px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); cursor: pointer;
  display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.month-grid .mc:nth-child(7n + 1) { border-left: 0; }
.month-grid .mh + .mh, .month-grid .mh { border-left: 0; }
.mc:hover { background: var(--hover); }
.mc.out { background: color-mix(in srgb, var(--soft) 55%, transparent); }
.mc.out .mc-h b { color: var(--faint); }
.mc.closed { background: repeating-linear-gradient(-45deg, transparent 0 7px, color-mix(in srgb, var(--line) 55%, transparent) 7px 8px); }
.mc-h { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.mc-h b { font-size: 14px; font-weight: 800; min-width: 26px; height: 26px; display: inline-grid; place-items: center; border-radius: 8px; }
.mc.today .mc-h b { background: var(--brand); color: #fff; }
.mc-h small { color: var(--muted); font-size: 11.5px; font-weight: 700; }
.mc .load { height: 3px; border-radius: 3px; background: var(--soft); overflow: hidden; }
.mc .load i { display: block; height: 100%; background: var(--brand); }
.mc .load i.hi { background: var(--accent); }
.mc-items { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mc-appt, .mc-task { display: flex; gap: 5px; align-items: center; width: 100%; min-width: 0; border: 0; text-align: left; cursor: pointer;
  font-size: 11.5px; line-height: 1.3; padding: 3px 6px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.mc-appt { background: color-mix(in srgb, var(--c, var(--blu)) 11%, var(--panel)); border-left: 3px solid var(--c, var(--blu)); }
.mc-appt span { font-weight: 800; color: var(--muted); }
.mc-appt.mine { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 45%, transparent); }
.mc-task { background: color-mix(in srgb, var(--viola) 11%, var(--panel)); color: var(--viola); font-weight: 700; }
.mc-task span { overflow: hidden; text-overflow: ellipsis; }
.mc-task svg { flex: none; font-size: 12px; }
.mc-task.late { background: color-mix(in srgb, var(--rosso) 12%, var(--panel)); color: var(--rosso); }
.mc-task.done { opacity: .55; text-decoration: line-through; }
.mc-more { font-size: 11px; font-weight: 700; color: var(--muted); padding-left: 4px; }
.mc-dots { display: none; gap: 3px; flex-wrap: wrap; }
.mc-dots span { min-width: 18px; height: 18px; border-radius: 999px; font-size: 10.5px; font-weight: 800; display: inline-grid; place-items: center; padding: 0 4px; }
.mc-dots .dn { background: var(--brand-soft); color: var(--brand-text); }
.mc-dots .dt { background: color-mix(in srgb, var(--viola) 15%, transparent); color: var(--viola); }
.mc-dots .dt.late { background: color-mix(in srgb, var(--rosso) 15%, transparent); color: var(--rosso); }
.legend i.c-viola { background: var(--viola); }
@media (max-width: 760px) {
  .mc { min-height: 64px; padding: 4px; }
  .mc-items, .mc .load, .mc-h small { display: none; }
  .mc-dots { display: flex; }
  .mc-h { justify-content: center; }
  .month-grid .mh { padding: 8px 2px; text-align: center; font-size: 10.5px; }
}

/* ------------------------------------------------ Attività */
.list-item.task { align-items: flex-start; }
.list-item.task .t { line-height: 1.35; }
.list-item.task.done .t { text-decoration: line-through; color: var(--muted); }
.tick { flex: none; width: 24px; height: 24px; margin-top: 1px; border-radius: 7px; border: 2px solid var(--line-2); background: var(--panel);
  display: grid; place-items: center; cursor: pointer; color: transparent; padding: 0; }
.tick svg { font-size: 15px; }
.tick:hover { border-color: var(--verde); color: color-mix(in srgb, var(--verde) 50%, transparent); }
.tick[aria-pressed="true"] { background: var(--verde); border-color: var(--verde); color: #fff; }
.task-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.task-meta > * { display: inline-flex; align-items: center; gap: 4px; }
.task-meta svg { font-size: 13px; }
.task-meta a { color: var(--text-2); }
.task-meta .due.late { color: var(--rosso); font-weight: 800; }

/* ------------------------------------------------ Chat interna */
.chat { display: grid; grid-template-columns: 300px minmax(0, 1fr); height: calc(100vh - 210px); min-height: 460px; overflow: hidden; }
.chat-list { border-right: 1px solid var(--line); overflow-y: auto; padding: 6px; }
.ch-item { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 11px; color: var(--text); text-decoration: none; min-width: 0; }
.ch-item:hover { background: var(--hover); text-decoration: none; }
.ch-item.on { background: var(--brand-soft); }
.ch-item .grow { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ch-item .row { gap: 6px; min-width: 0; }
.ch-item .count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11.5px;
  font-weight: 800; display: grid; place-items: center; flex: none; }
.chat-conv { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat-conv > .empty { margin: auto; }
.chat-h { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.chat-h .back { display: none; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 6px; background: var(--panel-2); }
.chat-msgs .empty { margin: auto; }
.msg { max-width: min(560px, 78%); align-self: flex-start; background: var(--panel); border: 1px solid var(--line); border-radius: 14px 14px 14px 4px;
  padding: 7px 11px 5px; box-shadow: var(--shadow-sm); }
.msg.mine { align-self: flex-end; background: var(--brand); color: #fff; border-color: transparent; border-radius: 14px 14px 4px 14px; }
.msg .from { display: block; font-size: 12px; color: var(--brand-text); margin-bottom: 1px; }
.msg .txt { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.4; }
.msg time { display: block; text-align: right; font-size: 10.5px; color: var(--faint); margin-top: 2px; }
.msg.mine time { color: rgba(255, 255, 255, .75); }
.day-sep { text-align: center; margin: 10px 0 4px; }
.day-sep span { font-size: 11.5px; font-weight: 800; color: var(--muted); background: var(--soft); padding: 3px 10px; border-radius: 999px; }
.older { text-align: center; margin-bottom: 6px; }
.chat-in { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--line); }
.chat-in textarea { flex: 1; resize: none; min-height: 42px; max-height: 160px; padding-top: 10px; line-height: 1.35; }
.chat-in .btn { height: 42px; width: 42px; }
@media (max-width: 760px) {
  .chat { grid-template-columns: 1fr; height: calc(100vh - 170px); height: calc(100dvh - 170px); }
  .chat.has-conv .chat-list { display: none; }
  .chat:not(.has-conv) .chat-conv { display: none; }
  .chat-list { border-right: 0; }
  .chat-h .back { display: inline-flex; }
  .msg { max-width: 88%; }
  .assign-sel { max-width: 150px; }
}

/* allegati della chat */
.chat-in .attach { flex: none; height: 42px; width: 42px; cursor: pointer; color: var(--muted); }
.chat-in .attach:hover { color: var(--brand-text); }
.chat-pending { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px 0; border-top: 1px solid var(--line); }
.pend-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 240px; height: 30px; padding: 0 4px 0 9px; border-radius: 8px;
  background: var(--soft); font-size: 12.5px; font-weight: 700; }
.pend-chip svg { flex: none; font-size: 14px; color: var(--muted); }
.pend-chip button { border: 0; background: none; cursor: pointer; color: var(--muted); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; }
.pend-chip button:hover { background: var(--hover); color: var(--rosso); }
.chat-pending + .chat-in { border-top: 0; }
.chat-conv.drop { box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--brand) 55%, transparent); }
.msg-att { display: flex; flex-direction: column; gap: 6px; margin: 2px 0 4px; }
.att-img img { display: block; max-width: min(280px, 100%); max-height: 260px; border-radius: 10px; object-fit: cover; }
.att-file { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 10px; min-width: 200px; max-width: 320px;
  background: color-mix(in srgb, var(--soft) 80%, transparent); color: var(--text); text-decoration: none; }
.att-file:hover { text-decoration: none; filter: brightness(.97); }
.att-file svg { flex: none; font-size: 22px; color: var(--brand-text); }
.att-file .grow { min-width: 0; display: flex; flex-direction: column; }
.att-file b { font-size: 13px; }
.att-file small { color: var(--muted); font-size: 11.5px; }
.msg.mine .att-file { background: rgba(255, 255, 255, .16); color: #fff; }
.msg.mine .att-file svg, .msg.mine .att-file small { color: rgba(255, 255, 255, .85); }
.msg.only-att { padding: 5px 5px 4px; }
.msg.only-att time { padding: 0 6px; }
