:root {
  --plum: #4c3159;
  --plum-strong: #382041;
  --plum-soft: #715b7a;
  --lime: #b6d554;
  --lime-soft: #eef7d3;
  --ink: #241f26;
  --muted: #726779;
  --line: #e8e2ea;
  --surface: #ffffff;
  --surface-soft: #f7f5f8;
  --success: #237a4a;
  --shadow: 0 18px 55px rgba(56, 32, 65, .12);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--surface-soft);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--plum); text-decoration-thickness: 1px; text-underline-offset: 3px; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--plum); letter-spacing: -.04em; line-height: 1.04; }
h1 { font-size: clamp(2.25rem, 4vw, 4rem); margin-bottom: 20px; }
h2 { font-size: clamp(1.45rem, 2.4vw, 2rem); margin-bottom: 12px; }
p { color: var(--muted); }

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.skip-link {
  position: fixed;
  z-index: 1000;
  left: 20px;
  top: -80px;
  padding: 12px 18px;
  border-radius: 10px;
  background: var(--lime);
  color: var(--plum-strong);
  font-weight: 800;
}
.skip-link:focus { top: 20px; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 2px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  transition: transform .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .48; }
.button-primary { background: var(--lime); color: var(--plum-strong); border-color: var(--lime); }
.button-primary:hover { background: #c3e264; border-color: #c3e264; }
.button-outline { background: transparent; color: var(--plum); border-color: var(--plum); }
.button-outline:hover { background: var(--plum); color: white; }
.button-shop { background: #5433ff; color: #fff; border-color: #5433ff; }
.button-wide { width: 100%; }
.quiet-link { font-weight: 750; text-decoration: none; }
.text-link { font-weight: 800; }
.eyebrow {
  margin-bottom: 12px;
  color: var(--plum-soft);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .14em;
  line-height: 1.2;
  text-transform: uppercase;
}

/* Accesso */
.auth-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 15%, rgba(182, 213, 84, .22), transparent 28rem),
    linear-gradient(135deg, #fbfafb 0%, #f3eff5 100%);
}
.auth-header {
  display: flex;
  width: min(1280px, calc(100% - 48px));
  height: 96px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
}
.auth-header img { width: 190px; }
.auth-shell {
  display: grid;
  width: min(1180px, calc(100% - 48px));
  min-height: calc(100vh - 190px);
  margin: 0 auto;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 520px);
  gap: clamp(48px, 8vw, 110px);
  padding: 44px 0 70px;
}
.auth-intro h1 { max-width: 720px; font-size: clamp(3rem, 6vw, 5.75rem); }
.auth-lead { max-width: 640px; font-size: 1.22rem; }
.benefit-list { display: grid; gap: 14px; margin: 34px 0 0; padding: 0; list-style: none; color: var(--plum); font-weight: 750; }
.benefit-list li { display: flex; align-items: center; gap: 12px; }
.benefit-list span { display: inline-grid; width: 27px; height: 27px; place-items: center; border-radius: 50%; background: var(--lime); color: var(--plum-strong); }
.auth-card { padding: clamp(28px, 5vw, 52px); border: 1px solid rgba(76, 49, 89, .1); border-radius: var(--radius-lg); background: rgba(255, 255, 255, .94); box-shadow: var(--shadow); }
.auth-card h2 { font-size: clamp(2rem, 4vw, 3rem); }
.demo-badge, .demo-chip { display: inline-flex; padding: 6px 10px; border-radius: 999px; background: var(--lime); color: var(--plum-strong); font-size: .72rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.auth-form { display: grid; gap: 10px; margin-top: 26px; }
.auth-form label { color: var(--plum); font-weight: 800; }
.auth-form input { width: 100%; min-height: 58px; padding: 0 18px; border: 1.5px solid #d8cfdb; border-radius: 14px; background: #fff; color: var(--ink); font-size: 1rem; }
.auth-form input:focus { border-color: var(--plum); outline: 3px solid rgba(182, 213, 84, .45); }
.auth-form .button { margin-top: 6px; min-height: 56px; }
.divider { display: flex; align-items: center; gap: 14px; margin: 26px 0; color: var(--muted); font-size: .76rem; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.divider::before, .divider::after { height: 1px; content: ""; flex: 1; background: var(--line); }
.secure-note { display: flex; gap: 12px; margin-top: 24px; padding: 16px; border-radius: 14px; background: var(--surface-soft); color: var(--muted); font-size: .9rem; }
.secure-icon { display: inline-grid; width: 24px; height: 24px; flex: 0 0 24px; place-items: center; border-radius: 50%; background: var(--plum); color: white; font-weight: 900; }
.register-box { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 18px; padding-top: 22px; border-top: 1px solid var(--line); }
.register-box strong, .register-box span { display: block; }
.register-box span { margin-top: 3px; color: var(--muted); font-size: .88rem; }
.auth-footer { display: flex; justify-content: center; gap: 24px; padding: 24px; color: var(--muted); font-size: .85rem; }
.auth-footer a { color: var(--muted); }

/* Portale */
.portal-page { min-height: 100vh; }
.portal-topbar {
  position: sticky;
  z-index: 60;
  top: 0;
  display: flex;
  height: 82px;
  align-items: center;
  justify-content: space-between;
  padding: 0 34px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(16px);
}
.portal-logo img { width: 165px; }
.topbar-shop { padding: 10px 16px; border-radius: 12px; background: var(--surface-soft); font-weight: 800; text-decoration: none; }
.menu-toggle { display: none; width: 44px; height: 44px; padding: 10px; border: 0; border-radius: 12px; background: var(--surface-soft); }
.menu-toggle > span:not(.sr-only) { display: block; height: 2px; margin: 4px 0; border-radius: 2px; background: var(--plum); }
.portal-shell { display: grid; min-height: calc(100vh - 82px); grid-template-columns: 292px minmax(0, 1fr); }
.portal-sidebar { position: sticky; top: 82px; display: flex; height: calc(100vh - 82px); flex-direction: column; padding: 28px 18px 20px; border-right: 1px solid var(--line); background: var(--plum); color: white; overflow-y: auto; }
.sidebar-profile { display: flex; align-items: center; gap: 12px; padding: 0 10px 26px; border-bottom: 1px solid rgba(255,255,255,.14); }
.sidebar-profile > div { min-width: 0; flex: 1; }
.sidebar-profile span, .sidebar-profile strong { display: block; }
.sidebar-profile > div span { color: rgba(255,255,255,.7); font-size: .82rem; }
.sidebar-profile strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { display: grid !important; width: 44px; height: 44px; flex: 0 0 44px; place-items: center; border-radius: 14px; background: var(--lime); color: var(--plum) !important; font-weight: 900; }
.demo-chip { color: var(--plum) !important; }
.account-nav { display: grid; gap: 4px; padding: 22px 0; }
.account-nav a { display: flex; min-height: 50px; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px; color: rgba(255,255,255,.76); font-size: .94rem; font-weight: 750; text-decoration: none; }
.account-nav a:hover { background: rgba(255,255,255,.08); color: white; }
.account-nav a[aria-current="page"] { background: var(--lime); color: var(--plum-strong); }
.nav-icon { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid currentColor; border-radius: 9px; font-size: .68rem; font-weight: 900; }
.sidebar-footer { display: grid; gap: 4px; margin-top: auto; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.14); }
.sidebar-footer a, .sidebar-footer button { display: block; width: 100%; padding: 11px 12px; border: 0; background: transparent; color: rgba(255,255,255,.74); cursor: pointer; font-size: .9rem; font-weight: 700; text-align: left; text-decoration: none; }
.sidebar-footer a:hover, .sidebar-footer button:hover { color: white; }
.portal-content { width: 100%; max-width: 1440px; margin: 0 auto; padding: clamp(30px, 5vw, 72px); }
.flash-message { max-width: 920px; margin: 0 0 28px; padding: 15px 18px; border: 1px solid; border-radius: 14px; font-weight: 750; }
.flash-success { border-color: rgba(35, 122, 74, .28); background: #edf8f1; color: var(--success); }
.flash-error { border-color: rgba(172, 42, 50, .25); background: #fff1f2; color: #8d2530; }
.page-heading { max-width: 880px; margin-bottom: 38px; }
.page-heading h1 { margin-bottom: 12px; }
.page-heading > p:last-child { max-width: 700px; font-size: 1.08rem; }
.page-heading-welcome, .page-heading-action { display: flex; max-width: none; align-items: flex-end; justify-content: space-between; gap: 34px; }
.page-heading-welcome > div, .page-heading-action > div { max-width: 850px; }

.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 24px; }
.metric-card { position: relative; display: grid; min-height: 180px; align-content: space-between; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-md); background: white; overflow: hidden; }
.metric-card span { color: var(--muted); font-size: .88rem; font-weight: 750; }
.metric-card strong { color: var(--plum); font-size: 2rem; }
.metric-card a { font-size: .85rem; font-weight: 850; }
.metric-plum { border-color: var(--plum); background: var(--plum); }
.metric-plum span, .metric-plum strong, .metric-plum a { color: white; }
.metric-lime { border-color: var(--lime); background: var(--lime-soft); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr); gap: 24px; }
.panel { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius-md); background: white; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.panel-heading h2 { margin-bottom: 0; }
.panel-heading a, .panel-heading button { border: 0; background: transparent; color: var(--plum); font-weight: 850; }
.panel-heading button:disabled { color: var(--muted); opacity: .55; }
.order-highlight { display: grid; gap: 24px; }
.order-line { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.order-line strong, .order-line span { display: block; }
.order-line strong { color: var(--plum); font-size: 1.2rem; }
.order-line div span { color: var(--muted); font-size: .84rem; }
.status-pill { display: inline-flex; width: fit-content; padding: 7px 11px; border-radius: 999px; background: var(--surface-soft); color: var(--plum); font-size: .76rem; font-weight: 900; }
.status-live { background: var(--lime-soft); color: var(--success); }
.tracking-progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.tracking-progress span { height: 6px; border-radius: 999px; background: var(--line); }
.tracking-progress .done { background: var(--plum); }
.tracking-progress .active { background: var(--lime); }
.order-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.order-summary div { padding: 14px; border-radius: 12px; background: var(--surface-soft); }
.order-summary span, .order-summary strong { display: block; }
.order-summary span { color: var(--muted); font-size: .78rem; }
.order-summary strong { margin-top: 4px; color: var(--plum); }
.details-list { margin: 0; }
.details-list > div { padding: 14px 0; border-bottom: 1px solid var(--line); }
.details-list > div:first-child { padding-top: 0; }
.details-list > div:last-child { padding-bottom: 0; border-bottom: 0; }
.details-list dt { color: var(--muted); font-size: .76rem; font-weight: 750; }
.details-list dd { margin: 4px 0 0; color: var(--plum); font-weight: 750; overflow-wrap: anywhere; }

.order-list { display: grid; gap: 18px; }
.order-card { border: 1px solid var(--line); border-radius: var(--radius-md); background: white; overflow: hidden; }
.order-card-top { display: grid; align-items: center; grid-template-columns: .8fr 1fr .8fr auto; gap: 22px; padding: 22px 24px; }
.order-card-top div span, .order-card-top div strong { display: block; }
.order-card-top div span { color: var(--muted); font-size: .75rem; }
.order-card-top div strong { color: var(--plum); }
.order-card-body { display: flex; align-items: center; gap: 18px; padding: 18px 24px; border-top: 1px solid var(--line); background: var(--surface-soft); }
.tracking-copy { min-width: 0; flex: 1; }
.tracking-copy span, .tracking-copy strong { display: block; }
.tracking-copy span { color: var(--muted); font-size: .78rem; }
.tracking-copy strong { overflow-wrap: anywhere; color: var(--ink); font-size: .9rem; }

.integration-note { max-width: 920px; margin: -18px 0 28px; padding: 14px 16px; border-left: 4px solid var(--lime); border-radius: 0 10px 10px 0; background: var(--lime-soft); color: var(--plum); font-size: .88rem; }
.address-grid, .profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.address-card { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-md); background: white; }
.address-default { border: 2px solid var(--lime); }
.address-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.address-card-heading strong { color: var(--plum); font-size: 1.15rem; }
.address-card-heading span { padding: 5px 9px; border-radius: 999px; background: var(--lime-soft); color: var(--success); font-size: .7rem; font-weight: 900; }
.address-card address { color: var(--muted); font-style: normal; line-height: 1.65; }
.card-actions { display: flex; gap: 16px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.card-actions form { margin: 0; }
.card-actions button { padding: 0; border: 0; background: none; color: var(--plum); cursor: pointer; font-weight: 800; }
.card-actions button:disabled { color: var(--muted); opacity: .55; }
.card-actions .danger-action { color: #a52d38; }
.empty-state { padding: 44px 24px; border: 1px dashed #cfc5d3; border-radius: var(--radius-md); background: white; text-align: center; }
.empty-state strong { color: var(--plum); font-size: 1.2rem; }
.empty-state p { margin: 8px 0 0; }
.empty-state.compact { padding: 28px 0 0; border: 0; text-align: left; }
.empty-state.compact .button { margin-top: 18px; }

.account-dialog { width: min(720px, calc(100% - 32px)); max-height: min(860px, calc(100vh - 32px)); padding: 0; border: 0; border-radius: 24px; background: white; box-shadow: 0 30px 90px rgba(36, 31, 38, .28); overflow: auto; }
.account-dialog::backdrop { background: rgba(36, 31, 38, .62); backdrop-filter: blur(4px); }
.account-dialog[open] { animation: dialog-in .2s ease both; }
.account-form { padding: 30px; }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.dialog-heading h2 { margin: 0; }
.dialog-close { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; padding: 0; border: 0; border-radius: 12px; background: var(--surface-soft); color: var(--plum); cursor: pointer; font-size: 1.75rem; line-height: 1; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.account-form label > span { display: block; margin-bottom: 7px; color: var(--plum); font-size: .88rem; font-weight: 800; }
.account-form label small { color: var(--muted); font-size: .75rem; font-weight: 600; }
.account-form input:not([type="checkbox"]) { width: 100%; min-height: 50px; padding: 11px 14px; border: 1.5px solid #d8cfdb; border-radius: 12px; background: #fff; color: var(--ink); }
.account-form input:not([type="checkbox"]):focus { border-color: var(--plum); outline: 3px solid rgba(182, 213, 84, .42); }
.account-form input[readonly] { background: var(--surface-soft); color: var(--muted); }
.form-span { grid-column: 1 / -1; }
.check-row { display: flex; align-items: center; gap: 10px; margin-top: 22px; color: var(--plum); cursor: pointer; font-weight: 750; }
.check-row input { width: 20px; height: 20px; accent-color: var(--plum); }
.check-row > span { margin: 0 !important; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 28px; }
.compact-form { padding: 0; }
.compact-form .button { margin-top: 20px; }
.account-identifiers { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.field-note { margin: 20px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--surface-soft); font-size: .82rem; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }

.document-panel { display: flex; align-items: center; gap: 22px; }
.document-panel > div:nth-child(2) { flex: 1; }
.document-panel h2 { margin-bottom: 6px; }
.document-panel p { margin-bottom: 0; }
.document-icon { display: grid; width: 62px; height: 62px; flex: 0 0 62px; place-items: center; border-radius: 18px; background: var(--lime); color: var(--plum); font-size: 1.4rem; font-weight: 900; }
.phase-chip { padding: 6px 10px; border-radius: 999px; background: var(--surface-soft); color: var(--plum); font-size: .72rem; font-weight: 850; }
.process-panel { margin-top: 22px; }
.process-list { display: grid; margin: 22px 0 0; padding: 0; grid-template-columns: repeat(3, 1fr); list-style: none; }
.process-list li { display: flex; gap: 14px; padding: 0 22px; border-right: 1px solid var(--line); }
.process-list li:first-child { padding-left: 0; }
.process-list li:last-child { padding-right: 0; border-right: 0; }
.process-list li > span { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 10px; background: var(--plum); color: white; font-weight: 900; }
.process-list strong { color: var(--plum); }
.process-list p { margin: 5px 0 0; font-size: .88rem; }

.preference-list { padding: 0 26px; }
.preference-row { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.preference-row:last-child { border-bottom: 0; }
.preference-row strong { color: var(--plum); }
.preference-row p { max-width: 660px; margin: 5px 0 0; font-size: .9rem; }
.switch { position: relative; display: inline-block; width: 48px; height: 28px; flex: 0 0 48px; }
.switch input { width: 0; height: 0; opacity: 0; cursor: pointer; }
.switch > span:not(.sr-only) { position: absolute; inset: 0; border-radius: 999px; background: #d6d0d8; }
.switch > span:not(.sr-only)::before { position: absolute; width: 20px; height: 20px; left: 4px; top: 4px; border-radius: 50%; background: white; content: ""; transition: transform .2s ease; }
.switch input:checked + span { background: var(--plum); }
.switch input:checked + span::before { transform: translateX(20px); background: var(--lime); }
.preference-actions { padding: 22px 0 26px; border-top: 1px solid var(--line); text-align: right; }
.support-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.support-main { grid-column: 1 / -1; padding: 34px; background: var(--plum); }
.support-main h2, .support-main p { color: white; }
.support-main p { max-width: 650px; color: rgba(255,255,255,.74); }

/* Stato errore */
.error-page { display: grid; min-height: 100vh; place-items: center; padding: 24px; background: var(--surface-soft); }
.error-card { width: min(620px, 100%); padding: clamp(30px, 6vw, 60px); border: 1px solid var(--line); border-radius: var(--radius-lg); background: white; box-shadow: var(--shadow); text-align: center; }
.error-card img { width: 190px; margin: 0 auto 42px; }
.error-card .button { margin: 16px 8px 0; }
.error-card .quiet-link { display: inline-block; margin: 16px 8px 0; }
.error-reference { width: fit-content; margin: 18px auto 4px; padding: 8px 12px; border-radius: 10px; background: var(--surface-soft); color: var(--plum); font-size: .82rem; letter-spacing: .04em; }
.menu-backdrop { position: fixed; z-index: 69; inset: 82px 0 0; background: rgba(36,31,38,.5); }

@media (max-width: 1050px) {
  .auth-shell { grid-template-columns: 1fr; max-width: 720px; }
  .auth-intro { text-align: center; }
  .auth-intro h1, .auth-lead { margin-right: auto; margin-left: auto; }
  .benefit-list { width: fit-content; margin-right: auto; margin-left: auto; text-align: left; }
  .portal-shell { grid-template-columns: 250px minmax(0, 1fr); }
  .portal-content { padding: 38px 30px; }
  .dashboard-grid, .profile-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 150px; }
}

@media (max-width: 760px) {
  .auth-header { width: calc(100% - 32px); height: 78px; }
  .auth-header img { width: 150px; }
  .auth-header .quiet-link { font-size: .82rem; }
  .auth-shell { width: calc(100% - 28px); min-height: auto; gap: 28px; padding: 26px 0 50px; }
  .auth-intro h1 { font-size: 2.65rem; }
  .auth-intro { text-align: left; }
  .auth-lead { font-size: 1rem; }
  .benefit-list { width: auto; margin-left: 0; }
  .auth-card { padding: 26px 20px; border-radius: 22px; }
  .register-box { align-items: flex-start; flex-direction: column; }
  .register-box .button { width: 100%; }
  .auth-footer { flex-wrap: wrap; }

  .portal-topbar { height: 70px; padding: 0 16px; }
  .portal-logo img { width: 132px; }
  .topbar-shop { padding: 8px 10px; font-size: .78rem; }
  .menu-toggle { display: block; }
  .portal-shell { display: block; min-height: calc(100vh - 70px); }
  .portal-sidebar { position: fixed; z-index: 70; top: 70px; bottom: 0; left: 0; width: min(320px, 88vw); height: auto; transform: translateX(-104%); transition: transform .25s ease; box-shadow: var(--shadow); }
  body.menu-open { overflow: hidden; }
  body.menu-open .portal-sidebar { transform: translateX(0); }
  .menu-backdrop { inset: 70px 0 0; }
  .portal-content { padding: 30px 16px 54px; }
  .page-heading, .page-heading-welcome, .page-heading-action { display: block; margin-bottom: 28px; }
  .page-heading h1 { font-size: 2.35rem; }
  .page-heading-welcome .button, .page-heading-action .button { width: 100%; margin-top: 18px; }
  .metric-grid, .address-grid, .support-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 130px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .panel { padding: 22px 18px; }
  .order-card-top { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .order-card-top .status-pill { grid-column: 1 / -1; }
  .order-card-body { align-items: flex-start; flex-direction: column; }
  .order-card-body .button { width: 100%; }
  .process-list { grid-template-columns: 1fr; }
  .process-list li, .process-list li:first-child, .process-list li:last-child { padding: 18px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .process-list li:last-child { border-bottom: 0; }
  .document-panel { align-items: flex-start; flex-wrap: wrap; }
  .document-panel > div:nth-child(2) { min-width: calc(100% - 84px); }
  .support-main { grid-column: auto; }
  .account-form { padding: 24px 18px; }
  .compact-form { padding: 0; }
  .form-grid { grid-template-columns: 1fr; gap: 15px; }
  .form-span { grid-column: auto; }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions .button { width: 100%; }
  .card-actions { align-items: flex-start; flex-direction: column; gap: 12px; }
  .preference-actions .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
