/* S-Data — design system gestionali v0.1 (condiviso 10 prodotti) */
:root {
  --bg: #eef2f8;
  --bg-login: linear-gradient(135deg, #0c1929 0%, #1a3a5c 45%, #0d4f6e 100%);
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --brand: #0ea5e9;
  --brand-dark: #0284c7;
  --brand-soft: #e0f2fe;
  --accent: #14b8a6;
  --ok: #059669;
  --warn: #d97706;
  --err: #dc2626;
  --border: #e2e8f0;
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  --radius: 12px;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.top {
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 100%);
  color: #f8fafc;
  padding: 0.65rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px solid var(--brand);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.top strong {
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.top strong::before {
  content: "◆ ";
  color: var(--brand);
  font-size: 0.75rem;
  vertical-align: middle;
}

.top a {
  color: #cbd5e1;
  text-decoration: none;
  margin-right: 0.65rem;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

.top a:hover {
  color: #fff;
  border-bottom-color: var(--brand);
}

.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; }

.muted { color: var(--muted); font-size: 0.85rem; }

.user {
  color: #94a3b8;
  font-size: 0.82rem;
  padding: 0.2rem 0.55rem;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
}

.main {
  max-width: 1140px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.35rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}

.stat-card {
  border-left: 4px solid var(--brand);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(14, 165, 233, 0.12);
}

.stat-card strong {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.stat-card p {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--brand-dark);
}

h1 {
  font-size: 1.45rem;
  font-weight: 700;
  margin: 0 0 1.1rem;
  letter-spacing: -0.02em;
}

h2 { font-size: 1.1rem; margin: 0 0 0.75rem; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th {
  background: #f8fafc;
  font-weight: 600;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

th, td {
  border-bottom: 1px solid var(--border);
  padding: 0.65rem 0.5rem;
  text-align: left;
}

tr:hover td { background: #f8fafc; }
html.dark tr:hover td { background: #1c3334; color: #e7eef0; }

.btn {
  display: inline-block;
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.35);
}

.btn:hover { filter: brightness(1.05); }

.btn.secondary {
  background: #64748b;
  box-shadow: none;
}

.btn.small {
  padding: 0.3rem 0.6rem;
  font-size: 0.78rem;
}

label {
  display: block;
  margin: 0.65rem 0 0.25rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #334155;
}

input, select, textarea {
  width: 100%;
  max-width: 480px;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: #fff;
  color: #0f172a;
}
html.dark input, html.dark select, html.dark textarea,
html[data-theme="dark"] input, html[data-theme="dark"] select, html[data-theme="dark"] textarea {
  background: #1e293b;
  color: #e7eef0;
  border-color: #334155;
  color-scheme: dark;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.grid2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.flash {
  padding: 0.7rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
}

.flash.ok { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }

.flash.err { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

.foot {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 2rem 0 0.5rem;
  border-top: 1px solid var(--border);
  margin-top: 1rem;
}

.badge {
  background: var(--brand-soft);
  color: var(--brand-dark);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: var(--bg-login);
}

.login-wrap .card {
  width: 100%;
  max-width: 420px;
  padding: 2rem 2rem 1.75rem;
  border: none;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.login-wrap h1 {
  margin-bottom: 0.35rem;
  font-size: 1.35rem;
}

.login-wrap .login-brand {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.5rem;
}

.login-wrap .btn {
  width: 100%;
  margin-top: 1rem;
  padding: 0.65rem;
}

@media (max-width: 700px) {
  .top { padding: 0.75rem 1rem; }
  .nav { width: 100%; }
  .main { padding: 1rem; }
}

@media print {
  .top, .foot, .btn { display: none !important; }
  .main { max-width: none; }
}

/* v0.4 */
.btn.danger{background:#c0392b;border-color:#c0392b;color:#fff}
.attachments table{margin-bottom:.8rem}
form.inline{display:flex;flex-wrap:wrap;gap:.6rem;align-items:flex-end}
form.inline label{display:flex;flex-direction:column;font-size:.9em}

/* v0.5 */
.navsearch{display:inline-block;margin-left:auto}
.navsearch input{padding:.3rem .5rem;border:1px solid #cbd5e1;border-radius:4px;width:150px;font-size:.9em}
.docpanel .docactions{display:flex;flex-wrap:wrap;gap:.5rem;margin:.5rem 0}
.docpanel .ok-line{color:#15803d;font-weight:600}
.docpanel .sigimg{max-height:110px;border:1px solid #e2e8f0;background:#fff;padding:4px}
.paysum .warn{color:#b45309}.paysum .ok{color:#15803d}
.payform{display:flex;flex-wrap:wrap;gap:.6rem;align-items:flex-end;margin-top:.6rem}
.payform label{display:flex;flex-direction:column;font-size:.9em}
.btn.small{padding:.2rem .5rem;font-size:.85em}
.btn.secondary{background:#64748b;border-color:#64748b;color:#fff}
.sigbox{border:1px dashed #94a3b8;background:#fff;border-radius:6px;margin:.6rem 0}
.sigbox canvas{display:block}
.msgpre{white-space:pre-wrap;background:#f8fafc;padding:.6rem;border-radius:6px}
.filters{display:flex;flex-wrap:wrap;gap:.6rem;align-items:center;margin-bottom:.8rem}
.agenda{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:.4rem}
.aday{background:#f8fafc;border:1px solid #e2e8f0;border-radius:6px;padding:.4rem;min-height:120px}
.aday.today{border-color:#0d6efd;box-shadow:0 0 0 2px #dbeafe inset}
.ahead{font-weight:700;margin-bottom:.4rem}.ahead span{color:#64748b;font-weight:400}
.aitem{background:#fff;border-left:4px solid #0d6efd;border-radius:4px;padding:.3rem .4rem;margin-bottom:.35rem;font-size:.88em}
.aitem.done{opacity:.6}.aitem.cancelled{text-decoration:line-through;opacity:.5}
.aitem .asub{color:#64748b;font-size:.9em}.aitem .st{text-transform:uppercase;font-size:.75em}
.aitem.c1,.dot.c1{border-color:#16a34a}.aitem.c2,.dot.c2{border-color:#d97706}.aitem.c3,.dot.c3{border-color:#9333ea}.aitem.c4,.dot.c4{border-color:#dc2626}.aitem.c5,.dot.c5{border-color:#0891b2}
.dot{display:inline-block;width:10px;height:10px;border:3px solid #0d6efd;border-radius:50%;vertical-align:middle}
.legend{color:#475569;font-size:.9em}
.searchlist{list-style:none;padding:0}.searchlist li{padding:.35rem 0;border-bottom:1px solid #f1f5f9}
.badge.ok{background:#dcfce7;color:#14532d;padding:.1rem .4rem;border-radius:4px;font-size:.8em}
@media (max-width:800px){.agenda{grid-template-columns:1fr}.aday{min-height:auto}.navsearch input{width:110px}}
/* w2 recur */
.wdays{display:flex;gap:.5rem;flex-wrap:wrap}.wdays label.inline{flex-direction:row;align-items:center;gap:.2rem;font-size:.85em}
.donerow td{opacity:.6}
td.actions form{display:inline-block;margin-right:.2rem}

/* w2 sla */
.badge.warn{background:#fef3c7;color:#92400e;padding:.1rem .4rem;border-radius:4px;font-size:.8em}
.badge.late{background:#fee2e2;color:#991b1b;padding:.1rem .4rem;border-radius:4px;font-size:.8em}
p.filters .btn{margin-right:.3rem}

/* license */
.nav .badge.lic{background:#dbeafe;color:#1e3a8a;padding:.15rem .5rem;border-radius:999px;font-size:.78em;align-self:center}
.nav .badge.lic.warn{background:#fef3c7;color:#92400e}
.nav .badge.lic.late{background:#fee2e2;color:#991b1b}

/* Wave 3 — guida in linea + rifinitura chrome */
.hq {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  margin-left: 0.4rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #0ea5e9;
  color: #fff;
  font: 700 0.78rem/1 "Segoe UI", system-ui, sans-serif;
  cursor: pointer;
  vertical-align: middle;
  box-shadow: 0 1px 4px rgba(14, 165, 233, 0.35);
}
.hq-s { width: 1.1rem; height: 1.1rem; font-size: 0.7rem; background: #64748b; box-shadow: none; }
.hq:hover, .hq.active { background: #0284c7; transform: scale(1.08); }
.hq-s:hover, .hq-s.active { background: #0ea5e9; }
h1 .hq, h2 .hq, h3 .hq, summary .hq, legend .hq { position: relative; top: -0.08em; }

.help-fab {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 999px;
  padding: 0.65rem 0.95rem 0.65rem 0.7rem;
  background: #0f172a;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.35);
}
.help-fab:hover { filter: brightness(1.1); }
.help-fab span { font-size: 0.85rem; font-weight: 600; }

.help-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 100vw);
  height: 100vh;
  z-index: 50;
  background: #fff;
  border-left: 1px solid #e2e8f0;
  box-shadow: -12px 0 40px rgba(15, 23, 42, 0.18);
  transform: translateX(110%);
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
}
.help-drawer.open { transform: none; }
.help-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1rem;
  background: #0f172a;
  color: #fff;
}
.help-x { background: transparent; border: 0; color: #fff; font-size: 1.4rem; cursor: pointer; line-height: 1; }
.help-body { padding: 1rem 1.1rem; overflow: auto; flex: 0 1 auto; max-height: 46vh; font-size: 0.92rem; }
.help-body ul { padding-left: 1.15rem; }
.help-body li { margin: 0.3rem 0; }
.help-idx { border-top: 1px solid #e2e8f0; padding: 0.75rem 1rem 1rem; overflow: auto; flex: 1; }
.help-idx input { width: 100%; max-width: none; margin-bottom: 0.6rem; }
.help-g { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: #64748b; margin: 0.55rem 0 0.2rem; font-weight: 700; }
.help-i { display: block; padding: 0.28rem 0; color: #0f172a; text-decoration: none; font-size: 0.88rem; border-bottom: 1px solid #f1f5f9; }
.help-i:hover, .help-i.cur { color: #0284c7; }
.help-i.sub { padding-left: 0.7rem; color: #475569; }
.help-foot { margin: 0.8rem 0 0; font-size: 0.82rem; }
.help-foot a { color: #0284c7; }
.help-toc ul { padding-left: 1.1rem; }
.help-group { margin: 1.5rem 0 0.6rem; }
.help-sec h3 { margin-top: 0; }
.help-sub { margin-top: 0.9rem; padding-top: 0.7rem; border-top: 1px dashed #e2e8f0; }
.help-sub h4 { margin: 0 0 0.35rem; font-size: 0.95rem; }
kbd { background: #f1f5f9; border: 1px solid #cbd5e1; border-radius: 4px; padding: 0.05rem 0.35rem; font-size: 0.8em; }
.nav a.help-nav { color: #7dd3fc; }
@media (max-width: 700px) {
  .help-fab span { display: none; }
  .help-fab { padding: 0.75rem; border-radius: 50%; }
  .help-body { max-height: 38vh; }
}
@media print {
  .help-fab, .help-drawer, .hq { display: none !important; }
}

/* Wave 3 — guida in linea + rifinitura chrome */
.hq {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  margin-left: 0.4rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #0ea5e9;
  color: #fff;
  font: 700 0.78rem/1 "Segoe UI", system-ui, sans-serif;
  cursor: pointer;
  vertical-align: middle;
  box-shadow: 0 1px 4px rgba(14, 165, 233, 0.35);
}
.hq-s { width: 1.1rem; height: 1.1rem; font-size: 0.7rem; background: #64748b; box-shadow: none; }
.hq:hover, .hq.active { background: #0284c7; transform: scale(1.08); }
.hq-s:hover, .hq-s.active { background: #0ea5e9; }
h1 .hq, h2 .hq, h3 .hq, summary .hq, legend .hq { position: relative; top: -0.08em; }

.help-fab {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 999px;
  padding: 0.65rem 0.95rem 0.65rem 0.7rem;
  background: #0f172a;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.35);
}
.help-fab:hover { filter: brightness(1.1); }
.help-fab span { font-size: 0.85rem; font-weight: 600; }

.help-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 100vw);
  height: 100vh;
  z-index: 50;
  background: #fff;
  border-left: 1px solid #e2e8f0;
  box-shadow: -12px 0 40px rgba(15, 23, 42, 0.18);
  transform: translateX(110%);
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
}
.help-drawer.open { transform: none; }
.help-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1rem;
  background: #0f172a;
  color: #fff;
}
.help-x { background: transparent; border: 0; color: #fff; font-size: 1.4rem; cursor: pointer; line-height: 1; }
.help-body { padding: 1rem 1.1rem; overflow: auto; flex: 0 1 auto; max-height: 46vh; font-size: 0.92rem; }
.help-body ul { padding-left: 1.15rem; }
.help-body li { margin: 0.3rem 0; }
.help-idx { border-top: 1px solid #e2e8f0; padding: 0.75rem 1rem 1rem; overflow: auto; flex: 1; }
.help-idx input { width: 100%; max-width: none; margin-bottom: 0.6rem; }
.help-g { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: #64748b; margin: 0.55rem 0 0.2rem; font-weight: 700; }
.help-i { display: block; padding: 0.28rem 0; color: #0f172a; text-decoration: none; font-size: 0.88rem; border-bottom: 1px solid #f1f5f9; }
.help-i:hover, .help-i.cur { color: #0284c7; }
.help-i.sub { padding-left: 0.7rem; color: #475569; }
.help-foot { margin: 0.8rem 0 0; font-size: 0.82rem; }
.help-foot a { color: #0284c7; }
.help-toc ul { padding-left: 1.1rem; }
.help-group { margin: 1.5rem 0 0.6rem; }
.help-sec h3 { margin-top: 0; }
.help-sub { margin-top: 0.9rem; padding-top: 0.7rem; border-top: 1px dashed #e2e8f0; }
.help-sub h4 { margin: 0 0 0.35rem; font-size: 0.95rem; }
kbd { background: #f1f5f9; border: 1px solid #cbd5e1; border-radius: 4px; padding: 0.05rem 0.35rem; font-size: 0.8em; }
.nav a.help-nav { color: #7dd3fc; }
@media (max-width: 700px) {
  .help-fab span { display: none; }
  .help-fab { padding: 0.75rem; border-radius: 50%; }
  .help-body { max-height: 38vh; }
}
@media print {
  .help-fab, .help-drawer, .hq { display: none !important; }
}

/* Wave 3 — guida in linea + rifinitura chrome */
.hq {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  margin-left: 0.4rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #0ea5e9;
  color: #fff;
  font: 700 0.78rem/1 "Segoe UI", system-ui, sans-serif;
  cursor: pointer;
  vertical-align: middle;
  box-shadow: 0 1px 4px rgba(14, 165, 233, 0.35);
}
.hq-s { width: 1.1rem; height: 1.1rem; font-size: 0.7rem; background: #64748b; box-shadow: none; }
.hq:hover, .hq.active { background: #0284c7; transform: scale(1.08); }
.hq-s:hover, .hq-s.active { background: #0ea5e9; }
h1 .hq, h2 .hq, h3 .hq, summary .hq, legend .hq { position: relative; top: -0.08em; }

.help-fab {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 999px;
  padding: 0.65rem 0.95rem 0.65rem 0.7rem;
  background: #0f172a;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.35);
}
.help-fab:hover { filter: brightness(1.1); }
.help-fab span { font-size: 0.85rem; font-weight: 600; }

.help-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 100vw);
  height: 100vh;
  z-index: 50;
  background: #fff;
  border-left: 1px solid #e2e8f0;
  box-shadow: -12px 0 40px rgba(15, 23, 42, 0.18);
  transform: translateX(110%);
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
}
.help-drawer.open { transform: none; }
.help-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1rem;
  background: #0f172a;
  color: #fff;
}
.help-x { background: transparent; border: 0; color: #fff; font-size: 1.4rem; cursor: pointer; line-height: 1; }
.help-body { padding: 1rem 1.1rem; overflow: auto; flex: 0 1 auto; max-height: 46vh; font-size: 0.92rem; }
.help-body ul { padding-left: 1.15rem; }
.help-body li { margin: 0.3rem 0; }
.help-idx { border-top: 1px solid #e2e8f0; padding: 0.75rem 1rem 1rem; overflow: auto; flex: 1; }
.help-idx input { width: 100%; max-width: none; margin-bottom: 0.6rem; }
.help-g { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: #64748b; margin: 0.55rem 0 0.2rem; font-weight: 700; }
.help-i { display: block; padding: 0.28rem 0; color: #0f172a; text-decoration: none; font-size: 0.88rem; border-bottom: 1px solid #f1f5f9; }
.help-i:hover, .help-i.cur { color: #0284c7; }
.help-i.sub { padding-left: 0.7rem; color: #475569; }
.help-foot { margin: 0.8rem 0 0; font-size: 0.82rem; }
.help-foot a { color: #0284c7; }
.help-toc ul { padding-left: 1.1rem; }
.help-group { margin: 1.5rem 0 0.6rem; }
.help-sec h3 { margin-top: 0; }
.help-sub { margin-top: 0.9rem; padding-top: 0.7rem; border-top: 1px dashed #e2e8f0; }
.help-sub h4 { margin: 0 0 0.35rem; font-size: 0.95rem; }
kbd { background: #f1f5f9; border: 1px solid #cbd5e1; border-radius: 4px; padding: 0.05rem 0.35rem; font-size: 0.8em; }
.nav a.help-nav { color: #7dd3fc; }
@media (max-width: 700px) {
  .help-fab span { display: none; }
  .help-fab { padding: 0.75rem; border-radius: 50%; }
  .help-body { max-height: 38vh; }
}
@media print {
  .help-fab, .help-drawer, .hq { display: none !important; }
}

html.dark .flash.ok, html.dark .flash.success, html[data-theme="dark"] .flash.ok { color: #d1fae5; background: #064e3b; border-color: #059669; }
html.dark .empty, html.dark .muted.empty, html.dark .stat-card .muted, html[data-theme="dark"] .empty { color: #cbd5e1; }
html.dark .agenda, html.dark .agenda td, html.dark .cal td, html[data-theme="dark"] .agenda { color: #e2e8f0; }
html.dark .ring, html.dark canvas, html[data-theme="dark"] .kpi-ring { filter: none; }
html.dark body { background: #0f172a; }

html.dark .flash.err, html.dark .flash.error, html[data-theme="dark"] .flash.err {
  color: #fecaca; background: #7f1d1d; border-color: #f87171;
}
html.dark .msg-box, html.dark .wa-preview, html.dark .client-msg, html.dark textarea[name="message"],
html[data-theme="dark"] .msg-box, html[data-theme="dark"] .wa-preview {
  color: #e2e8f0; background: #1e293b;
}
html.dark .btn.tiny, html.dark .btn.small.secondary { min-height: 2rem; padding: 0.35rem 0.7rem; font-size: 0.85rem; }
