:root {
  --navy-950: #031321;
  --navy-900: #062b4f;
  --navy-800: #0b3d69;
  --blue-700: #0879a5;
  --blue-600: #0c97bd;
  --blue-100: #dcf7fb;
  --brand-cyan: #25c5e5;
  --brand-cyan-soft: #e8faff;
  --slate-700: #344054;
  --slate-500: #667085;
  --slate-300: #d0d5dd;
  --slate-200: #e4e7ec;
  --slate-100: #f2f4f7;
  --slate-50: #f8fafc;
  --white: #fff;
  --green-700: #067647;
  --green-100: #dcfae6;
  --amber-700: #b54708;
  --amber-100: #fef0c7;
  --red-700: #b42318;
  --red-100: #fee4e2;
  --shadow-sm: 0 1px 2px rgb(16 24 40 / 6%), 0 1px 3px rgb(16 24 40 / 8%);
  --shadow-lg: 0 24px 48px rgb(3 19 33 / 18%);
  --radius: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--navy-900);
  background: var(--slate-50);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body { min-height: 100vh; margin: 0; background: var(--slate-50); line-height: 1.5; }
a { color: var(--blue-700); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }
button, summary, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid rgb(37 197 229 / 32%); outline-offset: 2px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(1.35rem, 2vw, 1.7rem); letter-spacing: -.025em; margin-bottom: 0; }
h2 { font-size: 1.2rem; letter-spacing: -.015em; margin-bottom: 0; }
h3 { font-size: 1rem; margin-bottom: .35rem; }
code { font: 500 .82rem ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--navy-800); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 100; left: 1rem; top: -5rem; padding: .65rem 1rem; border-radius: 8px; background: white; color: var(--navy-900); }
.skip-link:focus { top: 1rem; }
.eyebrow { display: block; margin-bottom: .22rem; color: var(--slate-500); font-size: .68rem; line-height: 1.2; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.muted { color: var(--slate-500); }
.grow { min-width: 0; flex: 1; }
.spaced { margin-top: 1.35rem; }
.full { width: 100%; }

.app-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; z-index: 30; display: flex; flex-direction: column; height: 100vh; padding: 1.25rem .9rem; overflow-y: auto; color: #d6e1f0; background: radial-gradient(circle at 15% 0, rgb(37 197 229 / 20%) 0, transparent 28%), linear-gradient(165deg, #08375e 0, var(--navy-900) 42%, var(--navy-950) 100%); }
.brand { display: block; margin: .1rem .55rem 1.7rem; color: white; }
.brand:hover { text-decoration: none; }
.brand-logo { display: block; max-width: 100%; height: auto; object-fit: contain; }
.sidebar-logo { width: 174px; }
.brand-product { display: block; margin: .45rem 0 0 .1rem; color: #a8ddea; font-size: .66rem; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
.brand small { margin-top: .2rem; color: #9db2cb; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; }
.brand-mark { display: inline-grid; place-items: center; width: 42px; height: 42px; flex: 0 0 auto; border: 1px solid rgb(255 255 255 / 18%); border-radius: 12px; color: white; background: linear-gradient(145deg, var(--brand-cyan), var(--blue-700)); box-shadow: 0 9px 22px rgb(12 151 189 / 30%); font-size: .78rem; font-weight: 850; letter-spacing: -.02em; }
.brand-mark.large { width: 58px; height: 58px; border-radius: 17px; font-size: 1rem; }
.nav-list { display: grid; gap: .35rem; }
.nav-list a { display: flex; align-items: center; gap: .75rem; padding: .7rem .8rem; border: 1px solid transparent; border-radius: 9px; color: #b9c9db; font-size: .88rem; font-weight: 570; }
.nav-list a span { display: inline-grid; width: 1.2rem; place-items: center; color: #7fa0c3; }
.nav-list a:hover { color: white; background: rgb(255 255 255 / 6%); text-decoration: none; }
.nav-list a.active { color: white; border-color: rgb(37 197 229 / 22%); background: rgb(37 197 229 / 13%); }
.nav-list a.active span { color: var(--brand-cyan); }
.sidebar-footer { margin-top: auto; padding: 1rem .55rem .1rem; border-top: 1px solid rgb(255 255 255 / 9%); }
.sidebar-footer strong { display: block; overflow: hidden; margin-bottom: .75rem; color: #e8eef7; font-size: .82rem; text-overflow: ellipsis; }
.sidebar-footer .eyebrow { color: #7891ae; }

.workspace { min-width: 0; }
.topbar { display: flex; align-items: center; min-height: 82px; padding: 1rem clamp(1.25rem, 3vw, 2.5rem); border-bottom: 1px solid var(--slate-200); background: rgb(255 255 255 / 88%); backdrop-filter: blur(16px); }
.topbar > div { flex: 1; }
.server-state { display: inline-flex; align-items: center; gap: .45rem; color: var(--slate-500); font-size: .74rem; font-weight: 600; }
.server-state i { width: 8px; height: 8px; border-radius: 50%; background: #17b26a; box-shadow: 0 0 0 4px #dcfae6; }
.menu-button { display: none; margin-right: .75rem; border: 0; background: transparent; color: var(--navy-900); font-size: 1.3rem; }
.content { width: min(1440px, 100%); margin: 0 auto; padding: clamp(1.25rem, 3vw, 2.5rem); }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: .55rem .9rem; border: 1px solid var(--slate-300); border-radius: 8px; color: var(--slate-700); background: white; box-shadow: var(--shadow-sm); cursor: pointer; font-size: .82rem; font-weight: 700; text-decoration: none; transition: transform .15s, box-shadow .15s, background .15s; }
.button:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgb(16 24 40 / 10%); text-decoration: none; }
.button.primary { border-color: var(--blue-700); color: white; background: linear-gradient(135deg, var(--blue-600), #08688f); box-shadow: 0 8px 18px rgb(8 121 165 / 16%); }
.button.secondary { color: var(--blue-700); border-color: #a8deea; background: var(--brand-cyan-soft); }
.button.ghost { min-height: 35px; color: #b9c9db; border-color: rgb(255 255 255 / 14%); background: rgb(255 255 255 / 5%); box-shadow: none; }
.button.danger { color: var(--red-700); border-color: #fda29b; background: white; }
.button.small { min-height: 34px; padding: .4rem .65rem; font-size: .75rem; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.metric-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric-card { position: relative; min-height: 132px; padding: 1.15rem; overflow: hidden; border: 1px solid var(--slate-200); border-radius: var(--radius); background: white; box-shadow: var(--shadow-sm); }
.metric-card::after { content: ""; position: absolute; right: -28px; top: -32px; width: 92px; height: 92px; border-radius: 50%; background: linear-gradient(135deg, var(--brand-cyan-soft), transparent); }
.metric-card span, .metric-card small { display: block; color: var(--slate-500); font-size: .76rem; font-weight: 600; }
.metric-card strong { display: block; margin: .35rem 0 .1rem; font-size: 2rem; line-height: 1; letter-spacing: -.04em; }
.section-heading, .panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1.8rem 0 .85rem; }
.panel-heading { margin: 0 0 1rem; }
.count-pill { padding: .3rem .58rem; border-radius: 999px; color: var(--slate-700); background: var(--slate-100); font-size: .73rem; font-weight: 700; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.product-card { display: block; padding: 1.15rem; border: 1px solid var(--slate-200); border-radius: var(--radius); color: inherit; background: white; box-shadow: var(--shadow-sm); transition: transform .18s, box-shadow .18s, border-color .18s; }
.product-card:hover { transform: translateY(-2px); border-color: #a8deea; box-shadow: 0 12px 28px rgb(8 121 165 / 12%); text-decoration: none; }
.product-card-head, .inline-title { display: flex; align-items: center; justify-content: space-between; gap: .7rem; }
.product-card h3 { margin-top: 1rem; }
.product-card p { min-height: 2.7rem; color: var(--slate-500); font-size: .82rem; }
.product-icon { display: inline-grid; place-items: center; width: 42px; height: 42px; flex: 0 0 auto; border-radius: 12px; color: var(--blue-700); background: var(--blue-100); font-weight: 850; }
.product-icon.small { width: 36px; height: 36px; border-radius: 10px; }
.product-icon.large { width: 58px; height: 58px; border-radius: 16px; font-size: 1.25rem; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 1rem 0 0; padding-top: .8rem; border-top: 1px solid var(--slate-200); }
.mini-stats div { padding: 0 .5rem; border-right: 1px solid var(--slate-200); }
.mini-stats div:first-child { padding-left: 0; }
.mini-stats div:last-child { border-right: 0; }
.mini-stats dt { color: var(--slate-500); font-size: .64rem; }
.mini-stats dd { margin: .1rem 0 0; font-size: .98rem; font-weight: 800; }

.panel, .hero-panel, .success-card { padding: clamp(1rem, 2.2vw, 1.4rem); border: 1px solid var(--slate-200); border-radius: var(--radius); background: white; box-shadow: var(--shadow-sm); }
.hero-panel { display: flex; align-items: center; gap: 1rem; }
.hero-panel p { margin: .25rem 0 .5rem; color: var(--slate-500); }
.breadcrumb { display: flex; gap: .5rem; margin-bottom: 1rem; color: var(--slate-500); font-size: .78rem; }
.breadcrumb span:last-child { color: var(--slate-700); }
.two-column { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(320px, .75fr); align-items: start; gap: 1.3rem; }
.two-column .section-heading { margin-top: 0; }
.sticky-panel { position: sticky; top: 1.2rem; }
.list-cards { display: grid; gap: .7rem; }
.list-card { display: flex; align-items: center; gap: .8rem; padding: .85rem; border: 1px solid var(--slate-200); border-radius: 11px; color: inherit; background: white; box-shadow: var(--shadow-sm); }
.list-card:hover { border-color: #a8deea; text-decoration: none; }
.list-card strong, td strong { display: block; }
.list-card small, td small { display: block; margin-top: .12rem; color: var(--slate-500); font-size: .7rem; }
.list-card .chevron { color: var(--slate-500); font-size: 1.6rem; }

.badge { display: inline-flex; align-items: center; padding: .25rem .5rem; border-radius: 999px; font-size: .68rem; line-height: 1.15; font-weight: 750; white-space: nowrap; }
.badge.positive { color: var(--green-700); background: var(--green-100); }
.badge.warning { color: var(--amber-700); background: var(--amber-100); }
.badge.negative { color: var(--red-700); background: var(--red-100); }
.badge.neutral { color: var(--slate-700); background: var(--slate-100); }
.table-wrap { position: relative; width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .79rem; }
th { padding: .7rem .75rem; border-bottom: 1px solid var(--slate-200); color: var(--slate-500); background: var(--slate-50); font-size: .68rem; letter-spacing: .03em; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { padding: .8rem .75rem; border-bottom: 1px solid var(--slate-200); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafcff; }
.actions-cell { position: relative; width: 3rem; text-align: right; }
.actions-menu { position: relative; }
.actions-menu summary { display: inline-grid; width: 32px; height: 32px; place-items: center; border: 1px solid var(--slate-300); border-radius: 8px; background: white; cursor: pointer; list-style: none; font-weight: 800; }
.actions-menu summary::-webkit-details-marker { display: none; }
.actions-menu > div { position: absolute; z-index: 20; top: 38px; right: 0; width: 250px; padding: .85rem; border: 1px solid var(--slate-200); border-radius: 10px; background: white; box-shadow: var(--shadow-lg); text-align: left; }
.actions-menu form + form { margin-top: .8rem; padding-top: .8rem; border-top: 1px solid var(--slate-200); }
.actions-menu label { font-size: .7rem; }
.actions-menu input { margin: .3rem 0 .55rem; }

.form-stack { display: grid; gap: .9rem; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.form-grid .span-2 { grid-column: span 2; }
.form-grid .span-full { grid-column: 1 / -1; }
label { display: block; color: var(--slate-700); font-size: .76rem; font-weight: 700; }
label small { display: block; margin-top: .3rem; color: var(--slate-500); font-weight: 450; }
input, select, textarea { width: 100%; margin-top: .35rem; padding: .6rem .7rem; border: 1px solid var(--slate-300); border-radius: 8px; color: var(--navy-900); background: white; box-shadow: inset 0 1px 2px rgb(16 24 40 / 4%); }
textarea { resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: #98a2b3; }
.short-input { max-width: 6rem; text-transform: uppercase; }
.form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .65rem; }
.info-box { display: flex; flex-direction: column; gap: .4rem; padding: 1rem 1.15rem; border: 1px solid #a8deea; border-radius: 9px; color: #075f82; background: var(--brand-cyan-soft); font-size: .82rem; line-height: 1.6; overflow-wrap: anywhere; }
.info-box > :last-child { margin-bottom: 0; }
.info-box + :is(.panel, .info-box) { margin-top: 1.35rem; }
.dialog-card > .info-box + :is(form, p) { margin-top: 1.25rem; }
.info-box.warning { border-color: #fedf89; color: #93370d; background: #fffaeb; }

.alert { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; padding: .75rem 1rem; border: 1px solid #abefc6; border-radius: 9px; color: var(--green-700); background: #ecfdf3; font-size: .8rem; }
.alert.error { border-color: #fecdca; color: var(--red-700); background: #fef3f2; }
.alert.warning { border-color: #fedf89; color: var(--amber-700); background: #fffaeb; }
.alert button { border: 0; color: inherit; background: transparent; cursor: pointer; font-size: 1.2rem; }
.empty-state { padding: 3rem 1rem; border: 1px dashed var(--slate-300); border-radius: var(--radius); color: var(--slate-500); text-align: center; }
.empty-state > span { display: block; margin-bottom: .5rem; color: #98a2b3; font-size: 2rem; }
.empty-state h3 { color: var(--navy-900); }
.empty-state.compact { padding: 1.8rem 1rem; }
.empty-inline { margin: 0; padding: 1rem; color: var(--slate-500); text-align: center; }

.success-card { width: min(700px, 100%); margin: 2rem auto; text-align: center; }
.success-icon { display: inline-grid; width: 54px; height: 54px; margin-bottom: 1rem; place-items: center; border-radius: 50%; color: var(--green-700); background: var(--green-100); font-size: 1.55rem; font-weight: 800; }
.success-card > p { color: var(--slate-500); }
.serial-box { display: flex; align-items: center; gap: .8rem; margin: 1.25rem 0 1rem; padding: 1rem; border: 1px solid #a8deea; border-radius: 12px; background: var(--brand-cyan-soft); }
.serial-box code { flex: 1; overflow-wrap: anywhere; color: #075f82; font-size: clamp(.9rem, 2.2vw, 1.2rem); font-weight: 750; letter-spacing: .06em; }
.detail-list { display: grid; grid-template-columns: repeat(2, 1fr); margin: 1rem 0; text-align: left; }
.detail-list div { padding: .7rem; border-bottom: 1px solid var(--slate-200); }
.detail-list dt { color: var(--slate-500); font-size: .68rem; }
.detail-list dd { margin: .15rem 0 0; font-size: .82rem; font-weight: 700; }
.timeline { margin-left: .4rem; border-left: 1px solid var(--slate-200); }
.timeline article { position: relative; display: flex; gap: 1rem; padding: .2rem 0 1.3rem 1.4rem; }
.timeline article:last-child { padding-bottom: .2rem; }
.timeline-dot { position: absolute; left: -5px; top: .35rem; width: 9px; height: 9px; border: 2px solid white; border-radius: 50%; background: var(--blue-600); box-shadow: 0 0 0 2px var(--blue-100); }
.timeline p { margin: .25rem 0; color: var(--slate-700); font-size: .8rem; }
.timeline small { color: var(--slate-500); }

/* Audit workspace */
.audit-page-heading { align-items: flex-end; }
.audit-page-heading h2 { margin: .1rem 0 .25rem; }
.audit-page-heading p { margin: 0; color: var(--slate-500); font-size: .8rem; }
.audit-page-heading .button { flex: 0 0 auto; }
.audit-filter-panel { padding-bottom: 1.15rem; }
.audit-filter-panel .panel-heading { align-items: flex-end; }
.audit-filter-panel h3 { margin-top: .12rem; }
.audit-filter-grid { display: grid; grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(140px, 1fr)); gap: .85rem; }
.audit-filter-grid .audit-filter-search { grid-column: span 2; }
.audit-filter-actions { display: flex; grid-column: 1 / -1; justify-content: flex-end; gap: .6rem; padding-top: .15rem; }
.audit-result-summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1.15rem 0 .65rem; color: var(--slate-500); font-size: .74rem; }
.audit-result-summary div { display: flex; align-items: baseline; gap: .4rem; }
.audit-result-summary strong { color: var(--navy-900); font-size: 1.2rem; }
.audit-results { padding-block: 1.25rem; }
.audit-timeline article { padding-bottom: 1.5rem; }
.audit-event-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.audit-event-title { display: flex; min-width: 0; align-items: center; gap: .55rem; }
.audit-event-title strong { overflow-wrap: anywhere; }
.audit-event-heading time { flex: 0 0 auto; color: var(--slate-500); font-size: .7rem; }
.audit-meta { display: flex; flex-wrap: wrap; gap: .45rem .7rem; margin-top: .55rem; color: var(--slate-500); font-size: .68rem; }
.audit-meta span { padding: .27rem .45rem; border-radius: 6px; background: var(--slate-50); }
.audit-meta b { margin-right: .2rem; color: var(--slate-700); }
.audit-meta code { overflow-wrap: anywhere; }
.audit-pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .75rem; margin-top: 1rem; color: var(--slate-500); font-size: .76rem; text-align: center; }
.audit-pagination > :last-child { justify-self: end; }
.audit-export-note { margin: .8rem 0 0; color: var(--slate-500); font-size: .68rem; text-align: center; }

.auth-page { overflow-x: hidden; background: var(--navy-950); }
.login-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 480px); align-items: center; min-height: 100vh; padding: clamp(1.5rem, 6vw, 6rem); gap: clamp(2rem, 8vw, 8rem); background: radial-gradient(circle at 15% 25%, rgb(37 197 229 / 24%) 0, transparent 32%), linear-gradient(145deg, #08375e, #031321 72%); }
.login-intro { max-width: 680px; color: white; }
.login-intro .eyebrow { margin: 1.5rem 0 .7rem; color: #83e6f5; }
.login-intro h1 { max-width: 620px; font-size: clamp(2.2rem, 5vw, 4.4rem); line-height: 1.03; letter-spacing: -.055em; }
.login-intro p:last-child { max-width: 520px; color: #afc4dc; font-size: 1rem; }
.login-card { padding: clamp(1.5rem, 4vw, 2.25rem); border: 1px solid rgb(37 197 229 / 18%); border-radius: 18px; background: white; box-shadow: 0 28px 80px rgb(0 0 0 / 35%); }
.login-wordmark { display: block; width: min(310px, 80%); height: auto; object-fit: contain; }
.login-card h2 { margin-bottom: .35rem; font-size: 1.55rem; }
.login-card > .muted { margin-bottom: 1.4rem; font-size: .84rem; }
.security-note { margin: 1.2rem 0 0; color: var(--slate-500); font-size: .72rem; text-align: center; }
.auth-alternative { display: grid; gap: .55rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--slate-200); color: var(--slate-500); font-size: .75rem; text-align: center; }

@media (max-width: 1100px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .audit-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 800px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; width: min(290px, 86vw); transform: translateX(-105%); transition: transform .2s ease; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .menu-button { display: inline-grid; place-items: center; }
  .server-state { display: none; }
  .two-column { grid-template-columns: 1fr; }
  .sticky-panel { position: static; }
  .login-layout { grid-template-columns: 1fr; }
  .login-intro { display: none; }
  .audit-page-heading { align-items: flex-start; }
  .audit-event-heading { align-items: flex-start; flex-direction: column; gap: .35rem; }
}

@media (max-width: 620px) {
  .topbar { min-height: 72px; padding: .8rem 1rem; }
  .content { padding: 1rem; }
  .metric-grid, .metric-grid.three, .product-grid, .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .form-grid .span-full { grid-column: 1; }
  .section-heading { align-items: flex-start; }
  .audit-page-heading { flex-direction: column; }
  .hero-panel { align-items: flex-start; flex-wrap: wrap; }
  .hero-panel .button { width: 100%; }
  .serial-box { flex-direction: column; }
  .serial-box .button { width: 100%; }
  .detail-list { grid-template-columns: 1fr; }
  .login-layout { padding: 1rem; }
  .audit-filter-grid { grid-template-columns: 1fr; }
  .audit-filter-grid .audit-filter-search { grid-column: auto; }
  .audit-filter-actions { display: grid; grid-template-columns: 1fr; }
  .audit-filter-actions .button, .audit-page-heading .button { width: 100%; }
  .audit-result-summary { align-items: flex-start; flex-direction: column; gap: .25rem; }
  .audit-pagination { grid-template-columns: 1fr; }
  .audit-pagination > *, .audit-pagination > :last-child { justify-self: center; }
}

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

.public-page { background: #f4f9fb; }
.public-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem clamp(1rem, 5vw, 5rem); border-bottom: 1px solid #d9e9ee; background: rgb(255 255 255 / 94%); }
.public-brand { display: flex; align-items: center; gap: .75rem; color: var(--navy-900); }
.public-brand:hover { text-decoration: none; }
.public-logo { width: clamp(118px, 11vw, 158px); }
.public-header nav { display: flex; align-items: center; gap: 1rem; font-size: .82rem; font-weight: 650; }
.public-main { width: min(1180px, calc(100% - 2rem)); min-height: calc(100vh - 160px); margin: 0 auto; padding: clamp(2rem, 5vw, 5rem) 0; }
.public-footer { display: flex; justify-content: center; gap: 1.5rem; padding: 1.5rem; color: var(--slate-500); font-size: .75rem; }
.catalog-hero { max-width: 850px; padding: clamp(1rem, 3vw, 2rem) 0 4rem; }
.catalog-hero h1 { max-width: 820px; margin: .7rem 0 1rem; font-size: clamp(2.3rem, 6vw, 4.8rem); line-height: 1.02; letter-spacing: -.06em; }
.catalog-hero p { max-width: 650px; color: var(--slate-500); font-size: 1.05rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.5rem; }
.commerce-notice { display: flex; align-items: center; gap: .7rem; margin-bottom: 2rem; padding: 1rem; border: 1px solid #fedf89; border-radius: 12px; color: #93370d; background: #fffaeb; }
.commerce-notice span { color: #b54708; font-size: .82rem; }
.catalog-section { margin-top: 2rem; }
.offer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.offer-card, .portal-card { padding: 1.4rem; border: 1px solid var(--slate-200); border-radius: var(--radius); background: white; box-shadow: var(--shadow-sm); }
.offer-card > small { display: block; margin: .8rem 0 .2rem; color: var(--slate-500); }
.offer-card > p { min-height: 3rem; color: var(--slate-500); font-size: .82rem; }
.offer-price { display: flex; align-items: baseline; gap: .35rem; margin: 1.2rem 0; }
.offer-price strong { font-size: 1.7rem; }
.offer-price span { color: var(--slate-500); font-size: .75rem; }
.offer-card ul { min-height: 6rem; padding-left: 1.1rem; color: var(--slate-700); font-size: .78rem; }
.portal-auth-card, .portal-message { width: min(520px, 100%); margin: 0 auto; padding: clamp(1.4rem, 4vw, 2.2rem); border: 1px solid var(--slate-200); border-radius: 18px; background: white; box-shadow: var(--shadow-lg); }
.portal-auth-card.wide { width: min(920px, 100%); }
.portal-auth-card h1, .portal-message h1 { margin: .35rem 0 .5rem; font-size: 1.8rem; }
.portal-message { text-align: center; }
.portal-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.portal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.reveal-form { min-width: 280px; margin-top: .8rem; padding: .8rem; border: 1px solid var(--slate-200); border-radius: 10px; }
.legal-text { margin-top: 2rem; white-space: pre-wrap; }
.inline-form { display: flex; align-items: center; gap: .6rem; }
.inline-form select { margin: 0; }
.legal-check { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: .55rem; }
.legal-check input { width: auto; margin-top: .2rem; }

@media (max-width: 800px) {
  .public-header nav > a:not(.button) { display: none; }
  .offer-grid, .portal-grid { grid-template-columns: 1fr; }
  .commerce-notice { align-items: flex-start; flex-direction: column; }
  .public-footer { flex-wrap: wrap; }
}

/* Customer portal and public catalog */
.portal-shell-page { color: var(--navy-900); background: radial-gradient(circle at 100% 0, rgb(37 197 229 / 7%), transparent 28rem), #f4f9fb; }
.portal-shell-page .public-header { position: sticky; z-index: 50; top: 0; min-height: 76px; padding-block: .72rem; box-shadow: 0 1px 14px rgb(3 19 33 / 6%); backdrop-filter: blur(18px); }
.public-brand-copy { display: flex; flex-direction: column; line-height: 1.05; }
.public-brand-copy { padding-left: .75rem; border-left: 1px solid #d6e7eb; }
.public-brand-copy small { margin-top: .25rem; color: var(--slate-500); font-size: .65rem; letter-spacing: .08em; text-transform: uppercase; }
.public-nav a:not(.button) { position: relative; padding: .45rem .15rem; color: var(--slate-600); }
.public-nav a:not(.button):hover, .public-nav a.active { color: var(--blue-700); text-decoration: none; }
.public-nav a.active::after { position: absolute; right: 0; bottom: -.88rem; left: 0; height: 2px; border-radius: 2px; background: var(--blue-600); content: ""; }
.nav-logout { margin: 0; }
.sandbox-ribbon { display: flex; align-items: center; justify-content: center; gap: .5rem; padding: .42rem 1rem; color: #7a2e0e; background: #fff3d6; font-size: .72rem; }
.sandbox-ribbon .status-dot { width: 7px; height: 7px; border-radius: 50%; background: #f79009; box-shadow: 0 0 0 3px rgb(247 144 9 / 16%); }
.portal-shell-page .public-main { width: min(1240px, calc(100% - 2rem)); padding-block: clamp(1.7rem, 4vw, 3.5rem); }
.portal-welcome, .portal-page-heading { display: flex; align-items: center; justify-content: space-between; gap: 2rem; margin-bottom: 1.6rem; }
.portal-welcome { position: relative; padding: clamp(1.5rem, 4vw, 2.5rem); overflow: hidden; border: 1px solid #bfe6ed; border-radius: 20px; background: radial-gradient(circle at 92% 10%, rgb(37 197 229 / 18%), transparent 34%), linear-gradient(135deg, white, #eaf9fc); box-shadow: var(--shadow-sm); }
.portal-welcome::after { position: absolute; right: -3rem; bottom: -5rem; width: 13rem; height: 13rem; border: 1.6rem solid rgb(8 121 165 / 5%); border-radius: 50%; content: ""; pointer-events: none; }
.portal-welcome h1, .portal-page-heading h1, .checkout-heading h1 { margin: .25rem 0 .4rem; font-size: clamp(1.8rem, 4vw, 2.7rem); line-height: 1.08; letter-spacing: -.045em; }
.portal-welcome p, .portal-page-heading p, .checkout-heading p { margin: 0; color: var(--slate-500); }
.portal-welcome-actions { display: flex; flex: 0 0 auto; gap: .65rem; }
.portal-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.portal-metric-card { position: relative; padding: 1.2rem; overflow: hidden; border: 1px solid var(--slate-200); border-radius: 14px; background: white; box-shadow: var(--shadow-sm); }
.portal-metric-card::before { position: absolute; top: 0; right: 0; left: 0; height: 3px; background: var(--blue-600); content: ""; }
.portal-metric-card.accent-violet::before { background: var(--brand-cyan); }
.portal-metric-card.accent-green::before { background: #12b76a; }
.portal-metric-card.accent-amber::before { background: #f79009; }
.portal-metric-card > span, .portal-metric-card small { display: block; color: var(--slate-500); font-size: .72rem; font-weight: 650; }
.portal-metric-card strong { display: block; margin: .55rem 0 .3rem; font-size: clamp(1.4rem, 2vw, 1.8rem); letter-spacing: -.04em; }
.portal-metric-card .metric-date { font-size: 1.35rem; }
.portal-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, .8fr); gap: 1rem; margin-top: 1rem; }
.portal-panel { padding: clamp(1.15rem, 2.5vw, 1.55rem); border: 1px solid var(--slate-200); border-radius: 15px; background: white; box-shadow: var(--shadow-sm); }
.portal-panel h2 { margin: .2rem 0; font-size: 1.15rem; }
.panel-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; }
.spending-chart { display: grid; gap: .8rem; }
.spending-row { display: grid; grid-template-columns: 58px minmax(90px, 1fr) 100px; align-items: center; gap: .7rem; font-size: .72rem; }
.spending-row progress { width: 100%; height: 9px; overflow: hidden; border: 0; border-radius: 99px; background: var(--slate-100); }
.spending-row progress::-webkit-progress-bar { border-radius: 99px; background: var(--slate-100); }
.spending-row progress::-webkit-progress-value { border-radius: 99px; background: linear-gradient(90deg, var(--blue-700), var(--brand-cyan)); }
.spending-row progress::-moz-progress-bar { border-radius: 99px; background: linear-gradient(90deg, var(--blue-700), var(--brand-cyan)); }
.spending-row strong { font-size: .76rem; text-align: right; }
.health-list { display: grid; gap: .45rem; }
.health-list > div { display: flex; align-items: center; gap: .75rem; padding: .7rem; border-radius: 10px; background: var(--slate-50); }
.health-list strong, .health-list small { display: block; }
.health-list small { margin-top: .15rem; color: var(--slate-500); font-size: .68rem; }
.health-icon { display: inline-grid; width: 31px; height: 31px; flex: 0 0 auto; place-items: center; border-radius: 9px; font-weight: 850; }
.health-icon.positive { color: var(--green-700); background: var(--green-100); }
.health-icon.neutral { color: var(--blue-700); background: var(--blue-100); }
.health-icon.warning { color: var(--amber-700); background: var(--amber-100); }
.portal-section { scroll-margin-top: 110px; }
.license-card-top, .order-product, .offer-product { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.license-card h3 { margin: 1rem 0; }
.license-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; padding: .8rem; border-radius: 10px; background: var(--slate-50); }
.license-facts small, .license-facts strong { display: block; }
.license-facts small { color: var(--slate-500); font-size: .62rem; }
.license-facts strong { margin-top: .15rem; font-size: .73rem; }
.secure-details { margin-top: 1rem; }
.secure-details summary, .action-details summary, .security-details summary { cursor: pointer; list-style: none; }
.secure-details summary::-webkit-details-marker, .action-details summary::-webkit-details-marker, .security-details summary::-webkit-details-marker { display: none; }
.subscription-list { display: grid; gap: .8rem; }
.subscription-card { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(170px, .6fr) auto; align-items: center; gap: 1rem; padding: 1.1rem 1.2rem; border: 1px solid var(--slate-200); border-radius: 13px; background: white; box-shadow: var(--shadow-sm); }
.subscription-card h3 { margin: .5rem 0 .15rem; }
.subscription-card p, .subscription-value span { color: var(--slate-500); font-size: .72rem; }
.subscription-value small, .subscription-value strong, .subscription-value span { display: block; }
.subscription-value strong { margin: .2rem 0; font-size: 1.1rem; }
.subscription-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; }
.subscription-actions form { margin: 0; }
.modern-table { border: 1px solid var(--slate-200); border-radius: 13px; background: white; box-shadow: var(--shadow-sm); }
.modern-table td:last-child { width: 1%; white-space: nowrap; }
.table-secondary { display: block; margin-top: .15rem; color: var(--slate-500); font-size: .68rem; font-weight: 600; }
.empty-icon { font-size: 2rem; }

/* Dialogs */
.app-dialog { width: min(560px, calc(100vw - 2rem)); max-height: min(760px, calc(100vh - 2rem)); padding: 0; overflow: visible; border: 0; border-radius: 20px; color: var(--navy-900); background: transparent; box-shadow: 0 32px 90px rgb(3 19 33 / 34%); text-align: left; white-space: normal; }
.app-dialog::backdrop { background: rgb(3 19 33 / 64%); backdrop-filter: blur(4px); }
.dialog-card { max-height: min(760px, calc(100vh - 2rem)); padding: clamp(1.25rem, 4vw, 1.8rem); overflow-y: auto; border: 1px solid rgb(255 255 255 / 55%); border-radius: 20px; background: white; }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.dialog-header h2 { margin-top: .2rem; font-size: 1.4rem; }
.dialog-close { display: inline-grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border: 1px solid var(--slate-200); border-radius: 10px; color: var(--slate-500); background: var(--slate-50); cursor: pointer; font-size: 1.25rem; line-height: 1; }
.dialog-close:hover { color: var(--navy-900); border-color: #a8deea; background: var(--brand-cyan-soft); }
.dialog-description { margin-bottom: 1.2rem; color: var(--slate-500); font-size: .82rem; }
.dialog-description strong { display: inline; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .6rem; margin-top: .35rem; }
.status-dialog::backdrop, .confirm-dialog::backdrop { background: rgb(3 19 33 / 36%); }
.status-dialog-card { border-top: 5px solid #f04438; }
.danger-text { color: var(--red-700); }
.dialog-warning { margin-bottom: 1.2rem; padding: .85rem 1rem; border: 1px solid #fedf89; border-radius: 10px; color: #93370d; background: #fffaeb; font-size: .76rem; }
.system-error { width: min(680px, 100%); }
.error-icon { display: inline-grid; width: 58px; height: 58px; margin-bottom: 1rem; place-items: center; border-radius: 50%; color: var(--red-700); background: var(--red-100); font-size: 1.7rem; font-weight: 850; }
.system-error > p { color: var(--slate-500); }
.request-reference { margin: 1.4rem 0; padding: .75rem; border-radius: 9px; background: var(--slate-50); font-size: .72rem; }
.request-reference code { overflow-wrap: anywhere; }
.error-actions { justify-content: center; }
.refund-summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; padding: .9rem 1rem; border: 1px solid #bfe6ed; border-radius: 11px; background: var(--brand-cyan-soft); }
.refund-summary span { color: var(--slate-500); font-size: .74rem; }
.refund-summary strong { color: var(--navy-800); font-size: 1.1rem; }
.review-reason { margin-bottom: 1rem; padding: 1rem; border-left: 3px solid var(--brand-cyan); border-radius: 0 10px 10px 0; background: var(--slate-50); }
.review-reason span { display: block; color: var(--slate-500); font-size: .68rem; font-weight: 750; text-transform: uppercase; }
.review-reason p { margin: .35rem 0 0; white-space: pre-wrap; }

/* Sales workspace */
.sales-tabs { position: sticky; z-index: 18; top: 0; display: flex; gap: .35rem; margin: -.35rem 0 1.35rem; padding: .45rem; overflow-x: auto; border: 1px solid var(--slate-200); border-radius: 12px; background: rgb(255 255 255 / 94%); box-shadow: var(--shadow-sm); backdrop-filter: blur(14px); scrollbar-width: thin; }
.sales-tab { display: inline-flex; min-height: 40px; flex: 0 0 auto; align-items: center; justify-content: center; padding: .55rem .85rem; border-radius: 8px; color: var(--slate-500); font-size: .78rem; font-weight: 750; white-space: nowrap; }
.sales-tab:hover { color: var(--blue-700); background: var(--slate-50); text-decoration: none; }
.sales-tab[aria-selected="true"] { color: #075f82; background: var(--brand-cyan-soft); box-shadow: inset 0 0 0 1px #a8deea; }
.sales-panel { animation: sales-panel-in .16s ease-out; }
.sales-panel[hidden] { display: none; }
.sales-panel-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; padding: 1.15rem 1.3rem; border: 1px solid #c9e8ee; border-radius: var(--radius); background: linear-gradient(120deg, white, var(--brand-cyan-soft)); box-shadow: var(--shadow-sm); }
.sales-panel-header h2 { margin: .15rem 0 .3rem; font-size: 1.45rem; }
.sales-panel-header p { max-width: 720px; margin: 0; color: var(--slate-500); font-size: .8rem; }
.sales-panel-header > .count-pill { flex: 0 0 auto; }
.sales-shortcuts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.sales-shortcut { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: .9rem; padding: 1rem; border: 1px solid var(--slate-200); border-radius: 12px; color: inherit; background: white; box-shadow: var(--shadow-sm); transition: border-color .15s, transform .15s, box-shadow .15s; }
.sales-shortcut:hover { transform: translateY(-1px); border-color: #a8deea; box-shadow: 0 8px 20px rgb(8 121 165 / 10%); text-decoration: none; }
.sales-shortcut > span { display: inline-grid; width: 42px; height: 42px; place-items: center; border-radius: 11px; color: var(--blue-700); background: var(--blue-100); font-size: .8rem; font-weight: 850; }
.sales-shortcut strong, .sales-shortcut small { display: block; }
.sales-shortcut small { margin-top: .12rem; color: var(--slate-500); font-size: .7rem; }
.sales-shortcut > b { color: var(--slate-300); font-size: 1.5rem; }
.catalog-config-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 1rem; }
.config-panel { min-width: 0; }
.config-panel .panel-heading { align-items: flex-end; }
.config-help { margin: -.25rem 0 1rem; color: var(--slate-500); font-size: .73rem; }
.config-list { display: grid; gap: .65rem; }
.config-item { display: flex; align-items: center; gap: .65rem; padding: .75rem; border: 1px solid var(--slate-200); border-radius: 10px; background: var(--slate-50); }
.config-item strong, .config-item small { display: block; }
.config-item small { margin-top: .12rem; color: var(--slate-500); font-size: .68rem; }
.compact-actions { display: flex; flex-wrap: wrap; gap: .45rem; }
.wide-dialog { width: min(780px, calc(100vw - 2rem)); }
.sales-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.checkbox-label { display: flex; align-items: center; gap: .55rem; padding: .7rem .8rem; border: 1px solid var(--slate-200); border-radius: 9px; background: var(--slate-50); }
.checkbox-label input { width: 17px; height: 17px; margin: 0; box-shadow: none; accent-color: var(--blue-600); }
@keyframes sales-panel-in { from { opacity: .25; transform: translateY(3px); } to { opacity: 1; transform: none; } }

/* Unified authentication */
.unified-login { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(360px, .75fr); min-height: 610px; overflow: hidden; border: 1px solid #cbe5eb; border-radius: 26px; background: white; box-shadow: 0 28px 70px rgb(3 19 33 / 13%); }
.unified-login-brand { position: relative; display: flex; flex-direction: column; justify-content: center; padding: clamp(2rem, 6vw, 5rem); overflow: hidden; color: white; background: radial-gradient(circle at 10% 5%, rgb(37 197 229 / 32%), transparent 35%), linear-gradient(145deg, #07365c, #031321 76%); }
.unified-login-brand::after { position: absolute; right: -7rem; bottom: -8rem; width: 22rem; height: 22rem; border: 2.7rem solid rgb(37 197 229 / 7%); border-radius: 50%; content: ""; }
.unified-login-brand .login-wordmark { position: relative; z-index: 1; width: min(290px, 80%); margin-bottom: 2.6rem; }
.unified-login-brand .eyebrow { position: relative; z-index: 1; color: #78e4f4; }
.unified-login-brand h1 { position: relative; z-index: 1; max-width: 560px; margin: .65rem 0 1rem; font-size: clamp(2.45rem, 5vw, 4.6rem); line-height: .98; letter-spacing: -.06em; }
.unified-login-brand > p { position: relative; z-index: 1; max-width: 580px; color: #c5dae4; }
.login-benefits { position: relative; z-index: 1; display: grid; gap: .65rem; margin: 1.6rem 0 0; padding: 0; color: #d8e8ee; font-size: .78rem; list-style: none; }
.login-benefits span { display: inline-grid; width: 22px; height: 22px; margin-right: .5rem; place-items: center; border-radius: 50%; color: #031321; background: var(--brand-cyan); font-size: .65rem; font-weight: 900; }
.unified-login-card { display: flex; flex-direction: column; justify-content: center; padding: clamp(2rem, 5vw, 4rem); }
.unified-login-card h2 { margin: .25rem 0 .45rem; font-size: clamp(1.65rem, 3vw, 2.2rem); letter-spacing: -.035em; }
.unified-login-card > .muted { margin-bottom: 1.3rem; }
.login-form input { min-height: 46px; }
.login-submit { min-height: 48px; margin-top: .2rem; }
.login-submit span { margin-left: .45rem; font-size: 1.1rem; }
.login-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .55rem 1.25rem; margin-top: 1.2rem; padding-top: 1.1rem; border-top: 1px solid var(--slate-200); font-size: .73rem; text-align: center; }
.login-links a:last-child { color: var(--slate-500); }
.unified-login-card .security-note { margin-top: 1.3rem; }

/* Catalog */
.catalog-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(360px, .85fr); align-items: center; max-width: none; min-height: 520px; gap: clamp(2rem, 6vw, 6rem); padding: 2rem 0 4rem; }
.catalog-hero h1 { max-width: 680px; }
.catalog-hero-copy > p { max-width: 610px; }
.hero-button { min-height: 46px; padding-inline: 1.15rem; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.5rem; color: var(--slate-500); font-size: .72rem; font-weight: 650; }
.hero-trust span::first-letter { color: var(--green-700); }
.hero-product-preview { padding: 1.2rem; transform: rotate(1.2deg); border: 1px solid #bfe6ed; border-radius: 24px; background: linear-gradient(145deg, #dcf7fb, #f4fbfd); box-shadow: 0 30px 70px rgb(8 121 165 / 16%); }
.preview-window { position: relative; min-height: 370px; padding: 4rem 2rem 2rem; overflow: hidden; border-radius: 16px; color: white; background: radial-gradient(circle at 95% 15%, rgb(37 197 229 / 55%) 0, transparent 36%), linear-gradient(145deg, #031b30, #0b4772); }
.preview-bar { position: absolute; top: 0; right: 0; left: 0; display: flex; gap: .35rem; padding: .8rem; background: rgb(255 255 255 / 7%); }
.preview-bar i { width: 7px; height: 7px; border-radius: 50%; background: rgb(255 255 255 / 35%); }
.preview-brand-logo { display: block; width: 150px; height: auto; margin-bottom: 1.3rem; }
.preview-label { color: #79e3f4; font-size: .65rem; font-weight: 800; letter-spacing: .12em; }
.preview-window > strong { display: block; max-width: 320px; margin-top: .8rem; font-size: clamp(1.45rem, 3vw, 2.3rem); line-height: 1.1; }
.preview-sheet { display: grid; gap: .5rem; margin-top: 2rem; padding: 1rem; border: 1px solid rgb(255 255 255 / 10%); border-radius: 12px; background: rgb(255 255 255 / 8%); }
.preview-sheet span { display: block; width: 88%; height: 9px; border-radius: 4px; background: rgb(255 255 255 / 14%); }
.preview-sheet span:nth-child(2) { width: 68%; }
.preview-sheet span:nth-child(3) { width: 95%; }
.preview-sheet span:nth-child(4) { width: 52%; }
.preview-status { position: absolute; right: 1.25rem; bottom: 1.25rem; padding: .6rem .8rem; border-radius: 9px; color: #067647; background: #dcfae6; font-size: .72rem; font-weight: 800; box-shadow: var(--shadow-lg); }
.how-it-works { padding: 1rem 0 3rem; }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--slate-200); }
.steps-grid article { display: flex; gap: .8rem; padding: 1.5rem; border-right: 1px solid var(--slate-200); }
.steps-grid article:last-child { border-right: 0; }
.steps-grid article > span, .step-number { display: inline-grid; width: 32px; height: 32px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: var(--blue-700); background: var(--blue-100); font-size: .75rem; font-weight: 850; }
.steps-grid h3 { margin: .1rem 0 .35rem; font-size: .92rem; }
.steps-grid p { margin: 0; color: var(--slate-500); font-size: .76rem; }
.plans-section { padding-top: 2rem; }
.centered-heading { justify-content: center; text-align: center; }
.centered-heading p { color: var(--slate-500); }
.offer-grid { grid-template-columns: repeat(2, minmax(280px, 430px)); justify-content: center; gap: 1.25rem; }
.offer-card { position: relative; padding: 1.7rem; }
.offer-card.featured { border-color: #77d7e7; box-shadow: 0 15px 35px rgb(8 121 165 / 14%); }
.offer-highlight { position: absolute; top: 0; right: 1.2rem; padding: .35rem .65rem; border-radius: 0 0 8px 8px; color: white; background: var(--blue-700); font-size: .64rem; font-weight: 800; }
.offer-product { justify-content: flex-start; margin-bottom: 1rem; }
.offer-product small, .offer-product h3 { display: block; margin: 0; }
.offer-product small { color: var(--slate-500); font-size: .67rem; }
.offer-card > p { min-height: 2.8rem; }
.offer-card .offer-price { margin-bottom: .35rem; }
.annual-equivalent { display: block; color: var(--green-700); font-size: .69rem; font-weight: 700; }
.plan-benefits, .order-benefits { display: grid; gap: .65rem; min-height: 0 !important; margin: 1.4rem 0; padding: 1.1rem 0 0 !important; border-top: 1px solid var(--slate-200); list-style: none; }
.plan-benefits li, .order-benefits li { display: flex; gap: .55rem; }
.plan-benefits li span, .order-benefits li span { color: var(--green-700); font-weight: 850; }
.plans-footnote { margin-top: 1.5rem; color: var(--slate-500); font-size: .72rem; text-align: center; }

/* Checkout */
.checkout-steps { display: flex; align-items: center; justify-content: center; gap: .7rem; margin-bottom: 2rem; color: var(--slate-400); font-size: .7rem; font-weight: 700; }
.checkout-steps span { display: flex; align-items: center; gap: .4rem; }
.checkout-steps b { display: inline-grid; width: 25px; height: 25px; place-items: center; border: 1px solid var(--slate-300); border-radius: 50%; background: white; }
.checkout-steps i { width: 60px; height: 1px; background: var(--slate-300); }
.checkout-steps .complete, .checkout-steps .current { color: var(--blue-700); }
.checkout-steps .complete b, .checkout-steps .current b { color: white; border-color: var(--blue-600); background: var(--blue-600); }
.checkout-heading { margin: 0 auto 1.5rem; text-align: center; }
.checkout-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); align-items: start; gap: 1.3rem; max-width: 1030px; margin: 0 auto; }
.checkout-form-panel fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.checkout-form-panel fieldset + fieldset { margin-top: .6rem; padding-top: 1.2rem; border-top: 1px solid var(--slate-200); }
.checkout-form-panel legend { display: flex; align-items: center; gap: .55rem; width: 100%; margin-bottom: .8rem; font-size: .84rem; font-weight: 800; }
.device-quantity { display: grid; grid-template-columns: minmax(0, 1fr) 110px; align-items: center; gap: 1rem; padding: 1rem; border: 1px solid var(--slate-200); border-radius: 11px; background: var(--slate-50); }
.device-quantity strong, .device-quantity small { display: block; }
.device-quantity small, .device-price-note { color: var(--slate-500); font-size: .72rem; }
.device-quantity input { margin: 0; font-size: 1rem; font-weight: 750; text-align: center; }
.device-price-note { margin: .55rem 0 0; }
.step-number.small { width: 25px; height: 25px; font-size: .68rem; }
.payment-option { display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: .75rem; margin-bottom: .65rem; padding: .9rem; border: 1px solid var(--slate-300); border-radius: 11px; cursor: pointer; }
.payment-option:has(input:checked) { border-color: var(--blue-600); background: #f5f9ff; box-shadow: 0 0 0 1px var(--blue-600); }
.payment-option input, .legal-consent input { width: 17px; height: 17px; margin: 0; box-shadow: none; accent-color: var(--blue-600); }
.payment-option-icon { display: inline-grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; color: var(--blue-700); background: var(--blue-100); font-size: 1rem; }
.payment-option strong, .payment-option small { display: block; }
.payment-option small { margin-top: .15rem; color: var(--slate-500); font-size: .67rem; font-weight: 500; }
.recommended-badge { padding: .25rem .45rem; border-radius: 99px; color: var(--green-700); background: var(--green-100); font-size: .6rem; }
.legal-consent { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: .7rem; padding: 1rem; border: 1px solid var(--slate-200); border-radius: 11px; color: var(--slate-700); background: var(--slate-50); font-size: .77rem; font-weight: 550; line-height: 1.55; cursor: pointer; }
.legal-consent input { margin-top: .1rem; }
.checkout-security-note { display: flex; align-items: center; gap: .7rem; padding: .75rem; color: var(--slate-600); font-size: .7rem; }
.checkout-security-note > span { display: inline-grid; width: 28px; height: 28px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: var(--green-700); background: var(--green-100); font-weight: 850; }
.checkout-security-note p, .checkout-security-note strong { display: block; margin: 0; }
.checkout-submit { min-height: 48px; font-size: .88rem; }
.checkout-submit span { margin-left: .4rem; font-size: 1.1rem; }
.checkout-back { color: var(--slate-500); font-size: .72rem; text-align: center; }
.order-summary { position: sticky; top: 110px; }
.order-product { justify-content: flex-start; margin: 1rem 0; padding-bottom: 1rem; border-bottom: 1px solid var(--slate-200); }
.order-product strong, .order-product small { display: block; }
.order-product small { margin-top: .2rem; color: var(--slate-500); }
.order-summary > p { color: var(--slate-500); font-size: .75rem; }
.order-total { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--slate-200); }
.order-total span { color: var(--slate-500); font-size: .72rem; }
.order-total strong { font-size: 1.55rem; letter-spacing: -.04em; }

/* Profile and security */
.portal-page-heading { padding: .4rem 0; }
.portal-page-heading.compact-heading { max-width: 1050px; margin-inline: auto; }
.portal-settings-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .65fr); align-items: start; gap: 1rem; }
.profile-form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.password-confirmation { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, .7fr); align-items: center; gap: 1rem; margin-top: .6rem; padding: 1rem; border-radius: 10px; background: var(--slate-50); }
.password-confirmation small { display: block; margin-top: .2rem; color: var(--slate-500); font-size: .68rem; }
.readonly-panel { position: sticky; top: 110px; }
.readonly-panel > p { color: var(--slate-500); font-size: .76rem; }
.readonly-list { display: grid; margin: 1.2rem 0; }
.readonly-list div { padding: .8rem 0; border-bottom: 1px solid var(--slate-200); }
.readonly-list dt { color: var(--slate-500); font-size: .66rem; }
.readonly-list dd { margin: .2rem 0 0; overflow-wrap: anywhere; font-size: .78rem; font-weight: 750; }
.security-layout { grid-template-columns: minmax(320px, .85fr) minmax(0, 1.15fr); }
.security-status-card { text-align: center; }
.security-status-card > p { color: var(--slate-500); font-size: .8rem; }
.security-status-card > small { color: var(--slate-500); }
.security-shield { display: inline-grid; width: 64px; height: 72px; margin-bottom: 1rem; place-items: center; clip-path: polygon(50% 0, 92% 15%, 86% 72%, 50% 100%, 14% 72%, 8% 15%); color: #b54708; background: #fef0c7; font-size: 1.4rem; font-weight: 850; }
.security-shield.enabled { color: var(--green-700); background: var(--green-100); }
.security-action-form { margin-top: 1.3rem; text-align: left; }
.security-actions-stack { display: grid; gap: .8rem; }
.security-tip { display: flex; gap: .85rem; }
.security-tip h3, .security-tip p { margin: 0; }
.security-tip p { margin-top: .3rem; color: var(--slate-500); font-size: .75rem; }
.security-mini-icon { display: inline-grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 10px; color: var(--blue-700); background: var(--blue-100); font-weight: 850; }
.security-details summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.security-details summary strong, .security-details summary small { display: block; }
.security-details summary small { margin-top: .2rem; color: var(--slate-500); font-size: .68rem; }
.security-details[open] summary { margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--slate-200); }
.danger-zone { border-color: #fecdca; }
.two-factor-setup-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 1rem; max-width: 1050px; margin: 0 auto; }
.setup-step { min-height: 100%; }
.setup-step h2 { margin: .8rem 0 .4rem; }
.setup-step > p, .setup-step details p { color: var(--slate-500); font-size: .75rem; }
.qr-step { text-align: center; }
.qr-step img { display: block; width: min(220px, 100%); height: auto; margin: .8rem auto; border: 8px solid white; border-radius: 8px; }
.qr-step details { font-size: .72rem; }
.qr-step summary { color: var(--blue-700); cursor: pointer; }
.manual-secret { display: block; padding: .7rem; overflow-wrap: anywhere; border-radius: 8px; background: var(--slate-100); font-size: .75rem; letter-spacing: .08em; }
.otp-input { font-size: 1.25rem; font-weight: 800; letter-spacing: .18em; text-align: center; }
.auth-focus-card { text-align: center; }
.auth-focus-card form { text-align: left; }
.recovery-card { text-align: center; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin: 1.2rem 0; }
.recovery-codes code { padding: .75rem; border: 1px solid var(--slate-200); border-radius: 8px; background: var(--slate-50); font-size: .9rem; font-weight: 750; letter-spacing: .07em; }
.recovery-card .info-box { margin-bottom: 1rem; text-align: left; }

@media (max-width: 1000px) {
  .portal-metrics { grid-template-columns: repeat(2, 1fr); }
  .portal-dashboard-grid, .checkout-layout, .portal-settings-layout, .security-layout { grid-template-columns: 1fr; }
  .unified-login { grid-template-columns: 1fr; }
  .unified-login-brand { min-height: 300px; padding-block: 2.5rem; }
  .unified-login-brand .login-wordmark { width: 220px; margin-bottom: 1.5rem; }
  .unified-login-brand h1 { font-size: clamp(2.2rem, 8vw, 3.4rem); }
  .order-summary, .readonly-panel { position: static; }
  .two-factor-setup-grid { grid-template-columns: 1fr; }
  .catalog-config-grid { grid-template-columns: 1fr; }
  .setup-step { min-height: 0; }
}

@media (max-width: 800px) {
  .portal-shell-page .public-header { position: static; flex-wrap: wrap; }
  .public-brand-copy small { display: none; }
  .portal-shell-page .public-nav { width: 100%; overflow-x: auto; padding-bottom: .15rem; }
  .portal-shell-page .public-nav > a:not(.button) { display: inline-flex; flex: 0 0 auto; }
  .public-nav a.active::after { bottom: -.15rem; }
  .nav-logout { margin-left: auto; }
  .catalog-hero { grid-template-columns: 1fr; min-height: 0; padding-top: 1rem; }
  .hero-product-preview { display: none; }
  .steps-grid { grid-template-columns: 1fr; }
  .steps-grid article { border-right: 0; border-bottom: 1px solid var(--slate-200); }
  .steps-grid article:last-child { border-bottom: 0; }
  .portal-welcome, .portal-page-heading { align-items: flex-start; flex-direction: column; }
  .portal-welcome-actions { width: 100%; }
  .portal-welcome-actions .button { flex: 1; }
  .subscription-card { grid-template-columns: 1fr; }
  .subscription-actions { justify-content: flex-start; }
  .profile-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modern-table table { min-width: 610px; }
  .checkout-steps i { width: 24px; }
  .checkout-steps span { font-size: .62rem; }
  .sales-tabs { top: .35rem; }
  .sales-panel-header { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 560px) {
  .portal-shell-page .public-main { width: min(100% - 1rem, 1240px); }
  .public-header { padding-inline: .75rem; }
  .public-footer { gap: .8rem 1.2rem; }
  .sandbox-ribbon { align-items: flex-start; justify-content: flex-start; }
  .portal-metrics, .offer-grid, .profile-form-grid { grid-template-columns: 1fr; }
  .portal-welcome-actions { flex-direction: column; }
  .portal-welcome-actions .button { width: 100%; }
  .spending-row { grid-template-columns: 45px minmax(75px, 1fr) 84px; gap: .45rem; }
  .license-facts { grid-template-columns: 1fr; }
  .payment-option { grid-template-columns: auto auto 1fr; }
  .recommended-badge { grid-column: 2 / -1; width: max-content; }
  .password-confirmation { grid-template-columns: 1fr; }
  .checkout-steps span { flex-direction: column; text-align: center; }
  .checkout-steps i { width: 14px; }
  .recovery-codes { grid-template-columns: 1fr; }
  .unified-login { min-height: 0; border-radius: 18px; }
  .unified-login-brand { min-height: 235px; padding: 1.6rem; }
  .unified-login-brand .login-wordmark { width: 175px; margin-bottom: 1.1rem; }
  .unified-login-brand h1 { margin-bottom: .65rem; font-size: 2.25rem; }
  .unified-login-brand > p { margin-bottom: 0; font-size: .8rem; }
  .login-benefits { display: none; }
  .unified-login-card { padding: 1.4rem; }
  .login-links { flex-direction: column; }
  .sales-shortcuts, .sales-form-grid { grid-template-columns: 1fr; }
  .sales-form-grid .span-full { grid-column: 1; }
  .config-item { align-items: flex-start; flex-wrap: wrap; }
  .config-item .grow { flex-basis: calc(100% - 8rem); }
  .compact-actions, .compact-actions form, .compact-actions .button { width: 100%; }
  .dialog-card { padding: 1.1rem; border-radius: 16px; }
  .dialog-actions { display: grid; grid-template-columns: 1fr; }
  .dialog-actions .button { width: 100%; }
}

/* Acesso por conta: orientação, vínculo e dispositivos. */
.access-navigation { margin-block: 2rem; padding: clamp(1rem, 2.5vw, 1.4rem); border: 1px solid var(--slate-200); border-radius: var(--radius); background: white; box-shadow: var(--shadow-sm); }
.access-navigation h2 { margin-bottom: .35rem; font-size: 1.05rem; }
.access-navigation > p { margin-bottom: 1rem; color: var(--slate-500); font-size: .82rem; }
.access-shortcuts { display: flex; flex-wrap: wrap; align-items: stretch; gap: .75rem; margin: 0; }
.access-shortcuts > .button { flex: 1 1 170px; min-height: 44px; white-space: normal; text-align: center; }
.license-card > .form-actions { margin-top: 1rem; }
@media (max-width: 560px) {
  .access-navigation { margin-block: 1.5rem; }
  .access-shortcuts > .button { flex-basis: 100%; }
}
.access-guide summary { cursor: pointer; font-weight: 700; padding: .35rem 0; }
.access-guide p { line-height: 1.6; }
.access-guide .steps-grid + p { margin-top: 1.25rem; margin-bottom: 0; }
.license-card .info-box + .license-facts { margin-top: 1rem; }
.access-help-steps { padding-left: 1.5rem; display: grid; gap: 1.2rem; line-height: 1.6; }
.access-help-steps strong { display: block; }
.access-device-list { list-style: none; padding: 0; display: grid; gap: .8rem; }
.access-device-list li { display: grid; gap: .3rem; border-bottom: 1px solid #dce5ed; padding-bottom: .8rem; }
.account-email, .access-device-list strong { overflow-wrap: anywhere; }
.access-manage-dialog form + form { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid #dce5ed; }
.access-manage-dialog form label { display: grid; gap: .4rem; margin-bottom: .6rem; }
.user-management-shortcuts { margin-block: 1.25rem; }
.user-management-actions { display: flex; flex-wrap: wrap; gap: .65rem; align-items: center; }
