:root {
  /* ADA Cards — azzurro logo (#40E0FF → #0080FF) */
  --ada-sky: #40e0ff;
  --ada-azure: #20b8ff;
  --ada-blue: #0099ff;
  --ada-deep: #0080ff;
  --ada-navy: #01579b;
  --ada-dark: #0c1220;
  --ada-black: #06080d;

  --bg: #eef8ff;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #bae6fd;
  --brand: var(--ada-deep);
  --brand-2: var(--ada-blue);
  --accent: var(--ada-azure);
  --accent-soft: #e0f2fe;
  --danger: #dc2626;
  --shadow: 0 8px 28px rgba(2, 136, 209, 0.12);
  --radius: 12px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: linear-gradient(180deg, var(--bg) 0%, #f0f9ff 100%);
  min-height: 100vh;
}

.topbar {
  background: linear-gradient(135deg, #0f2d52 0%, #1a4a7a 100%);
  color: #fff;
  box-shadow: 0 2px 12px rgba(15, 45, 82, 0.25);
  border-bottom: none;
}
.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand-mark {
  display: block;
  flex-shrink: 0;
}
.brand-text {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: #fff;
  white-space: nowrap;
}
.brand-ada {
  background: linear-gradient(180deg, var(--ada-sky) 0%, #7ee8ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-logo {
  display: block;
  height: 44px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
}
.brand-icon {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: contain;
  background: transparent;
  box-shadow: 0 2px 12px rgba(56, 189, 248, 0.35);
}

.pt-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  flex-wrap: wrap;
}
/* Stile Plus Technologies — pill bianca attiva, testo navy */
.pt-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.pt-nav-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.pt-nav-btn--active {
  background: #fff;
  color: #0f2d52;
  border-color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  font-weight: 700;
}
.pt-nav-btn--active:hover {
  background: #fff;
  color: #0f2d52;
}
.pt-nav-btn--ghost {
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  background: transparent;
  border-color: transparent;
}
.pt-nav-btn--ghost:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* Icone topbar destra — casetta + indietro */
.pt-nav-btn--icon {
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 10px;
  font-size: 1.15rem;
  line-height: 1;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
}
.pt-nav-btn--icon:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.pt-nav-btn--icon-active {
  background: #fff;
  color: #0f2d52;
  border-color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}
.pt-nav-btn--icon-active:hover {
  background: #fff;
  color: #0f2d52;
}
.ada-nav-back {
  font-size: 1.35rem;
  font-weight: 700;
}
.ada-nav-logout {
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.85rem;
}

.topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.user-pill {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(125, 211, 252, 0.3);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
}
.link-muted { color: rgba(255,255,255,0.75); text-decoration: none; font-size: 0.85rem; }
.link-muted:hover { color: #fff; }

.page { max-width: 1200px; margin: 0 auto; padding: 24px 20px 72px; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel-head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.panel-head h1 { margin: 0; font-size: 1.35rem; }
.panel-meta { color: var(--muted); font-size: 0.9rem; }

.table-wrap { overflow: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.data-table th, .data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.data-table th {
  background: var(--accent-soft);
  color: var(--ada-navy);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.data-table tbody tr:hover { background: #f0f9ff; }
.mono { font-family: ui-monospace, monospace; font-weight: 600; }
.amount { font-variant-numeric: tabular-nums; white-space: nowrap; }
.notes { color: var(--muted); max-width: 280px; }

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--ada-deep);
  font-size: 0.78rem;
  font-weight: 600;
}

.btn-sm, .btn-primary {
  display: inline-block;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font: inherit;
}
.btn-sm {
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
}
.btn-sm:hover { background: #bae6fd; }
.btn-primary {
  width: 100%;
  padding: 12px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--ada-azure), var(--ada-deep));
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 18px rgba(2, 136, 209, 0.45);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--ada-sky), var(--ada-blue));
  color: var(--ada-black);
}

.alert {
  margin: 16px 24px;
  padding: 12px 16px;
  border-radius: 8px;
  background: #fff5f5;
  color: var(--danger);
  border: 1px solid #fed7d7;
}
.empty, .empty-inline { color: var(--muted); padding: 24px; }

.login-wrap,
.auth-shell {
  min-height: calc(100vh - 56px);
  display: grid;
  place-items: center;
  padding: 32px 16px 80px;
  position: relative;
}
.auth-back {
  position: absolute;
  top: 20px;
  left: 20px;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
}
.auth-back:hover {
  text-decoration: underline;
}
.auth-card {
  width: min(420px, 100%);
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(15, 45, 82, 0.08);
  padding: 36px 32px 28px;
}
.auth-card--wide {
  width: min(760px, 100%);
  padding: 36px 32px 32px;
}
.auth-brand {
  text-align: center;
  margin-bottom: 24px;
}
.auth-mark {
  display: block;
  margin: 0 auto 14px;
}
.auth-title {
  margin: 0 0 6px;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #1a1a2e;
  line-height: 1.2;
}
.auth-title span.auth-ada,
.auth-ada {
  background: linear-gradient(180deg, var(--ada-sky) 0%, var(--ada-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.auth-powered {
  margin: 0;
  font-size: 0.88rem;
  color: #64748b;
}
.auth-powered strong {
  color: var(--ada-deep);
  font-weight: 700;
}
.auth-note {
  margin: 18px 0 0;
  text-align: center;
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.4;
}
.alert-login {
  margin: 0 0 16px;
  padding: 10px 12px;
  font-size: 0.88rem;
}
.login-card {
  width: min(420px, 100%);
  background: #fff;
  border: 1px solid #d0d5dd;
  border-radius: var(--radius);
  box-shadow: 0 8px 28px rgba(15, 45, 82, 0.08);
  padding: 36px 32px;
}
.login-brand { text-align: center; margin-bottom: 28px; }
.login-logo {
  display: block;
  max-width: 260px;
  width: 100%;
  height: auto;
  margin: 0 auto;
}
.login-icon {
  display: block;
  margin: 0 auto 12px;
  border-radius: 16px;
  box-shadow: var(--shadow);
}

body.page-login {
  background: #f0f2f5;
}
body.page-login .page {
  padding: 0;
  max-width: none;
}
body.page-login .site-footer {
  display: none;
}
.login-form label span {
  display: block;
  font-size: 0.82rem;
  color: #374151;
  margin-bottom: 6px;
  font-weight: 600;
}
.login-form input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font: inherit;
  background: #fff;
  color: var(--text);
}
.login-form input::placeholder {
  color: #9ca3af;
}
.login-form input:focus {
  outline: none;
  border-color: var(--ada-azure);
  box-shadow: 0 0 0 3px rgba(32, 184, 255, 0.18);
}

.login-form label { display: block; margin-bottom: 14px; }

.btn-accendi {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 13px 16px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(180deg, var(--ada-azure) 0%, var(--ada-deep) 100%);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 128, 255, 0.35);
  transition: filter 0.15s ease, transform 0.15s ease;
}
.btn-accendi:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}
.btn-accendi--inline {
  display: inline-block;
  width: auto;
  min-width: 160px;
  text-align: center;
  text-decoration: none;
}
.dash-guest-actions {
  text-align: center;
  margin: 0 0 20px;
}

.back-link {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
}
.detail-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 0;
}
.detail-layout {
  display: grid;
  grid-template-columns: minmax(280px, 340px) 1fr;
  gap: 0;
  align-items: start;
}
.detail-sidebar {
  border-right: 1px solid var(--line);
  background: #fafbfc;
}
.detail-main {
  min-width: 0;
}
.detail-card--section {
  border-top: 1px solid var(--line);
  padding: 18px 20px;
}
.detail-card--section + .detail-card--section {
  border-left: none;
}
.detail-link-row a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.detail-link-row a:hover {
  text-decoration: underline;
}
@media (max-width: 900px) {
  .detail-grid { grid-template-columns: 1fr; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-sidebar { border-right: none; border-bottom: 1px solid var(--line); }
}
.detail-card {
  padding: 24px;
  border-top: 1px solid var(--line);
}
.detail-card + .detail-card { border-left: 1px solid var(--line); }
@media (max-width: 900px) {
  .detail-card + .detail-card { border-left: none; }
}
.detail-card h2 { margin: 0 0 16px; font-size: 1rem; }
.detail-card dl { margin: 0; }
.detail-card dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-top: 12px;
}
.detail-card dd { margin: 4px 0 0; }

.site-footer {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  padding: 10px 20px;
  background: rgba(255,255,255,0.92);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(8px);
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
}
.site-footer .dot { margin: 0 6px; }
.site-footer .powered strong {
  color: var(--ada-deep);
  font-weight: 700;
}

/* ── Lista Plus-style (Orders / Quote) ── */
.panel-plus {
  border-color: #d0d5dd;
  max-width: 1400px;
  margin: 0 auto;
}
.plus-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ada-deep);
  letter-spacing: -0.02em;
}
.plus-toolbar {
  align-items: flex-start;
  gap: 16px;
}
.plus-pager {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.btn-plus {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn-plus-secondary {
  background: #dce1e8;
  color: #1a1a2e;
}
.btn-plus-secondary:hover {
  opacity: 0.88;
}
.plus-tbl-wrap {
  overflow-x: auto;
  background: #fff;
}
.plus-tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  color: #1a1a2e;
}
.plus-tbl th {
  background: #d0d5dd;
  color: #1a1a2e;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 8px 10px;
  text-align: left;
  white-space: nowrap;
}
.plus-tbl-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.plus-tbl td {
  padding: 8px 10px;
  border-bottom: 1px solid #e0e4ea;
  vertical-align: middle;
}
.plus-tbl tbody tr:nth-child(even):not(.plus-row) td {
  background: #f0f2f5;
}
.plus-tbl tbody tr.plus-row td {
  background-color: inherit;
}
.plus-tbl .col-eur {
  width: 30px;
  text-align: center;
  vertical-align: middle;
  padding: 2px 1px;
}
.plus-tbl .col-eur .eur-h {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1;
}
.check-sel {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--ada-deep, #0080ff);
}
.plus-tbl .col-flag {
  width: 32px;
  text-align: center;
  vertical-align: middle;
  padding: 2px 1px;
}
.chk-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 20px;
}
.chk-box input {
  margin: 0;
}
.ada-actbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 6px;
  padding: 6px 8px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
}
.ada-actbar-sp {
  flex: 1;
}
.ada-actbar .selcount {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
}
.ada-act-btn {
  font-size: 12px;
  padding: 4px 10px;
}
.plus-row--flagged td {
  box-shadow: inset 3px 0 0 #0080ff;
}
.plus-tbl .eur-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  line-height: 1;
}
.plus-tbl .ada-eur-btn:hover {
  opacity: 0.85;
  transform: scale(1.08);
}
.ada-pay-ov {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(15, 45, 82, 0.45);
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.ada-pay-ov.is-open {
  display: flex;
}
.ada-pay-box {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(15, 45, 82, 0.25);
  max-width: 420px;
  width: 100%;
  padding: 18px 20px;
}
.ada-pay-h {
  font-size: 17px;
  font-weight: 700;
  color: #0f2d52;
  margin-bottom: 12px;
}
.ada-pay-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.ada-pay-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid #e8f4fc;
  font-size: 14px;
}
.ada-pay-lbl {
  color: #64748b;
  flex: 1;
}
.ada-pay-val {
  font-weight: 600;
  color: #0f172a;
  text-align: right;
  white-space: nowrap;
}
.ada-pay-f {
  text-align: right;
}
.plus-tbl .col-wc {
  width: 28px;
  text-align: center;
  vertical-align: middle;
  padding: 2px 1px;
}
.wc-clip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: #1a3a5c;
  color: #7ec8e3;
  text-decoration: none;
  font-size: 13px;
  line-height: 1;
  flex-shrink: 0;
}
.wc-clip:hover {
  background: #254e8f;
  color: #b8e4f5;
}
.wc-clip--hdr {
  margin-right: 4px;
}
.fic-clip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 24px;
  padding: 0 6px;
  border-radius: 4px;
  background: #0d7a44;
  color: #fff;
  text-decoration: none;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  flex-shrink: 0;
  border: none;
  cursor: pointer;
}
.fic-clip:hover {
  background: #0a6236;
  color: #fff;
}
.fic-clip--hdr {
  margin-right: 4px;
}
.fic-clip--btn {
  font-family: inherit;
}
.plus-tbl .col-ord {
  width: 72px;
  max-width: 72px;
  font-weight: 600;
  color: #8e44ad;
  white-space: nowrap;
  padding-left: 6px;
  padding-right: 6px;
}
.plus-tbl .col-cli {
  max-width: 120px;
  width: 120px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-left: 6px;
  padding-right: 6px;
}
.plus-tbl .col-data {
  width: 82px;
  max-width: 82px;
  white-space: nowrap;
  text-align: center;
  padding-left: 4px;
  padding-right: 4px;
}
.plus-tbl .col-job,
.plus-tbl .col-art {
  max-width: 160px;
  word-break: break-word;
}
.plus-tbl .col-qty {
  width: 72px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.plus-tbl .col-fatt {
  min-width: 216px;
  width: 216px;
  max-width: 280px;
  font-size: 11px;
  white-space: normal;
  word-break: break-word;
  line-height: 1.35;
  text-align: center;
}
.plus-tbl .col-stato {
  font-size: 11px;
  white-space: nowrap;
}
.ada-flag-blue {
  color: #2980b9;
  font-size: 12px;
  margin-left: 2px;
}
.ada-plan-ship {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 4px;
  font-size: 11px;
  vertical-align: middle;
}
.ada-plan-ship-ico {
  font-size: 12px;
}
.ada-plan-ship-date {
  font-size: 10px;
  color: #555;
}
.plus-row {
  cursor: pointer;
}
.plus-row:hover td {
  background: #e0f2fe !important;
}
.plus-tbl .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.plus-tbl .cust {
  max-width: 220px;
  font-weight: 600;
}
.plus-tbl .notes {
  max-width: 320px;
  color: #4a4a6a;
  font-size: 12px;
}
.plus-tbl .muted {
  color: #64748b;
  font-size: 11px;
}
.detail-dl dd {
  margin: 4px 0 0;
  font-size: 0.92rem;
}
.detail-dl dt:first-child {
  margin-top: 0;
}
.plus-tbl-items th,
.plus-tbl-items td {
  font-size: 12px;
}
.page {
  max-width: 1400px;
}

.alert-weclapp {
  background: #fef2f2;
  border-color: #fecaca;
}
.alert-weclapp strong {
  display: block;
  margin-bottom: 6px;
  color: #991b1b;
}
.alert-weclapp p {
  margin: 0 0 8px;
  color: #7f1d1d;
  line-height: 1.45;
}
.alert-hint {
  font-size: 0.88rem;
  color: #0369a1 !important;
}
.alert-hint code {
  background: rgba(0, 0, 0, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85rem;
}
.detail-grid--full {
  grid-template-columns: 1fr;
  margin-top: 16px;
}
.detail-card--full {
  margin-top: 16px;
}
.mail-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mail-list-meta {
  font-size: 11px;
  color: #64748b;
  margin: 0 0 8px;
}
.mail-list-scroll {
  max-height: 19rem;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px 8px 4px 4px;
  border: 1px solid #d0d7de;
  border-radius: 8px;
  background: #fafbfc;
}

body:not(.page-plus-detail) .wc-email-row {
  background: #f4f6f9;
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 6px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: start;
}
.wc-email-row:nth-child(even) {
  background: #eceff4;
}
.wc-email-when {
  font-size: 10px;
  color: #64748b;
  margin-bottom: 2px;
}
.wc-email-subj {
  font-weight: 600;
  font-size: 12px;
  color: #1a1a2e;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wc-email-prev {
  font-size: 11px;
  color: #4a4a6a;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wc-email-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}
.btn-mail {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  font-family: inherit;
}
.btn-mail-outlook {
  background: #0078d4;
  color: #fff;
}
.btn-mail-outlook:hover {
  opacity: 0.9;
}
.btn-mail-preview {
  background: #5a6268;
  color: #fff;
}
.btn-mail-preview:hover {
  opacity: 0.9;
}
.mail-item-inline {
  grid-column: 1 / -1;
  border: 1px solid #e0e4ea;
  border-radius: 6px;
  background: #fff;
}
.mail-item-inline .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.mail-item {
  border: 1px solid #e0e4ea;
  border-radius: 8px;
  background: #fafbfc;
}
.mail-item summary {
  cursor: pointer;
  padding: 10px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 13px;
}
.mail-date { color: #64748b; font-size: 12px; }
.mail-from { font-weight: 600; }
.mail-subj { flex: 1; min-width: 200px; }
.mail-body {
  padding: 12px;
  border-top: 1px solid #e0e4ea;
  font-size: 13px;
  max-height: 320px;
  overflow: auto;
  background: #fff;
}
.parse-block {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #e0e4ea;
}
.parse-head {
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.parse-meta {
  font-size: 12px;
  color: #64748b;
  margin: 8px 0 0;
}
.parse-note {
  font-size: 12px;
  color: #0369a1;
  margin-top: 12px;
}
.badge-soft {
  background: #e0f2fe;
  color: #0369a1;
  font-size: 10px;
}

/* ── Home dashboard Plus-style ── */
body.page-home {
  background: #f0f2f5;
}
body.page-home .page {
  max-width: 980px;
  padding: 20px 16px 80px;
}
.dash-home {
  padding: 8px 0 24px;
}
.dash-hero {
  text-align: center;
  margin-bottom: 20px;
}
.dash-mark {
  display: block;
  margin: 0 auto 10px;
}
.dash-title {
  margin: 0 0 6px;
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  font-weight: 800;
  color: #1a1a2e;
  letter-spacing: 0.02em;
}
.dash-powered {
  margin: 0;
  font-size: 0.95rem;
  color: #64748b;
}
.dash-powered strong {
  color: var(--ada-deep);
  font-weight: 700;
}
.dash-welcome {
  margin: 0 auto 28px;
  max-width: 640px;
  text-align: center;
  font-size: 0.98rem;
  line-height: 1.55;
  color: #4a5568;
}
.dash-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
@media (max-width: 720px) {
  .dash-tiles {
    grid-template-columns: 1fr;
  }
  .topbar-inner {
    padding: 10px 12px;
    gap: 10px;
  }
  .pt-nav-btn {
    min-height: 36px;
    padding: 0 14px;
    font-size: 0.85rem;
  }
  .brand-text {
    font-size: 0.95rem;
  }
  .user-pill {
    display: none;
  }
}
.dash-status {
  margin: 0;
  text-align: center;
  font-size: 0.85rem;
  color: #64748b;
}
.dash-status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  margin-right: 6px;
  vertical-align: middle;
}
.hub-tile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 130px;
  padding: 20px 18px;
  border-radius: 10px;
  text-decoration: none;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 14px rgba(15, 45, 82, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.hub-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(15, 45, 82, 0.28);
  filter: brightness(1.05);
}
.hub-tile-icon {
  font-size: 1.5rem;
  line-height: 1;
  opacity: 0.95;
}
.hub-tile-title {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}
.hub-tile-desc {
  font-size: 0.84rem;
  opacity: 0.92;
  line-height: 1.35;
}
.hub-tile--orders {
  background: linear-gradient(145deg, #7c3aed 0%, #6d28d9 100%);
}
.hub-tile--quote {
  background: linear-gradient(145deg, #1d4ed8 0%, #1e3a8a 100%);
}
.hub-tile--invoices {
  background: linear-gradient(145deg, #059669 0%, #047857 100%);
}

/* Quote — pulsanti Friendly (lista + dettaglio) */
.ada-quote-head-actions {
  flex-shrink: 0;
}
.ada-sync-bar {
  margin: 6px 0 10px;
  display: flex;
  justify-content: flex-end;
}
.ada-quote-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 12px;
}
.ada-quote-search-inp {
  flex: 1;
  min-width: 0;
  max-width: 420px;
  padding: 8px 12px;
  border: 1px solid #c5cad3;
  border-radius: 8px;
  font-size: 13px;
}
.ada-quote-search-clear {
  background: #6c757d !important;
  padding: 6px 10px !important;
  border-radius: 6px;
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: 700;
}
a.ada-quote-cta,
a.ada-quote-cta:hover,
a.ada-quote-cta:focus,
a.ada-quote-cta:active {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(180deg, #f59a4a 0%, #e87722 55%, #d96a18 100%);
  color: #fff !important;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none !important;
  text-transform: uppercase;
  box-shadow: 0 3px 12px rgba(232, 119, 34, 0.45);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}
a.ada-quote-cta:hover {
  filter: brightness(1.06);
  box-shadow: 0 5px 16px rgba(232, 119, 34, 0.55);
  transform: translateY(-1px);
}
a.ada-quote-cta:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(232, 119, 34, 0.4);
}
.ada-quote-cta-label {
  line-height: 1.1;
}
.ada-quote-cta-arrow {
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}
.ada-quote-cta--xl {
  padding: 16px 32px;
  font-size: 16px;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(232, 119, 34, 0.5);
}
.ada-quote-cta--xl .ada-quote-cta-arrow {
  font-size: 22px;
}
a.ada-quote-cta--arrow,
a.ada-quote-cta--arrow:hover,
a.ada-quote-cta--arrow:focus {
  width: 34px;
  height: 34px;
  min-width: 34px;
  padding: 0;
  gap: 0;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 900;
  text-transform: none;
  background: linear-gradient(180deg, #20b8ff 0%, #0080ff 100%);
  box-shadow: 0 2px 8px rgba(0, 128, 255, 0.35);
  color: #fff !important;
  text-decoration: none !important;
}
a.ada-quote-cta--arrow:hover {
  filter: brightness(1.08);
  box-shadow: 0 4px 12px rgba(0, 128, 255, 0.45);
}
.plus-tbl .col-act {
  width: 44px;
  text-align: center;
  padding: 4px 6px !important;
}
/* Bozze quotazione — colonne compatte, cestino sempre visibile */
.ada-drafts-panel .plus-tbl-wrap {
  overflow-x: visible;
}
.ada-drafts-tbl {
  table-layout: fixed;
  width: 100%;
}
.ada-drafts-tbl th,
.ada-drafts-tbl td {
  padding: 6px 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ada-drafts-tbl .col-draft-label {
  width: auto;
  min-width: 0;
}
.ada-drafts-tbl .col-draft-cust {
  width: 72px;
  max-width: 72px;
}
.ada-drafts-tbl .col-draft-art {
  width: 88px;
  max-width: 88px;
}
.ada-drafts-tbl .col-draft-date {
  width: 92px;
  max-width: 92px;
  font-variant-numeric: tabular-nums;
}
.ada-drafts-tbl .col-draft-wc {
  width: 88px;
  max-width: 88px;
  text-align: center;
  font-weight: 700;
  color: #1d4ed8;
}
.ada-drafts-tbl .col-act {
  width: 82px;
  min-width: 82px;
  max-width: 82px;
  padding: 4px 4px !important;
  overflow: visible;
  white-space: nowrap;
}
.ada-draft-actions {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: nowrap;
}
.ada-drafts-panel {
  margin-bottom: 14px;
  padding: 12px 14px;
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 10px;
}
.ada-drafts-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.ada-drafts-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #14532d;
}
.ada-drafts-count {
  font-size: 12px;
  font-weight: 600;
  color: #166534;
}
.ada-draft-row td {
  background: #ecfdf5 !important;
}
.ada-draft-name {
  font-weight: 700;
  color: #15803d !important;
}
.ada-wc-archive {
  margin-top: 8px;
}
.ada-wc-archive-sum {
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  padding: 8px 0;
  list-style: none;
}
.ada-wc-archive-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  margin: 8px 0;
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  border: 1px solid #cbd5e1;
  color: #1e293b;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}
.ada-wc-archive-btn:hover {
  background: linear-gradient(180deg, #fff 0%, #e8f0fe 100%);
  border-color: #0080ff;
}
a.ada-quote-cta--del,
button.ada-quote-cta--del {
  width: 34px;
  height: 34px;
  min-width: 34px;
  padding: 0;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  background: linear-gradient(180deg, #f87171 0%, #dc2626 100%);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
  color: #fff !important;
  cursor: pointer;
}
.ada-draft-save-status {
  font-size: 11px;
  color: #27ae60;
  font-weight: 700;
  margin-left: 6px;
}

/* legacy */
.home-hero,
.home-logo-wrap,
.home-modules,
.home-plus,
.home-hub,
.hub-panel {
  display: none;
}
