/* Design tokens ------------------------------------------------------------ */
:root {
  --ground: #E7EDE8;
  --panel: #FFFFFF;
  --tint: #F2F6F3;
  --pine: #0D3B2E;
  --pine-2: #14503F;
  --pine-3: #2B7A62;
  --deep: #08291F;
  --sun: #FFC72C;
  --sun-2: #F2B400;
  --ink: #17251F;
  --muted: #56675F;
  --line: #C9D5CD;
  --line-2: #DCE5DF;
  --ok: #17784A; --ok-bg: #DCF2E5;
  --warn: #8A5600; --warn-bg: #FFEFC7;
  --bad: #B42318; --bad-bg: #FBE2DE;
  --info: #1F5F99; --info-bg: #DDEBF8;
  --mute-bg: #E1E8E3;
  --r: 8px;
  --r-lg: 14px;
  --body: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 400 16px/1.55 var(--body); font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--pine); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--pine-3); }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.15; font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
code { font: 600 .88em ui-monospace, Menlo, Consolas, monospace; background: var(--tint); padding: .1em .35em; border-radius: 4px; overflow-wrap: anywhere; }
:focus-visible { outline: 3px solid var(--sun-2); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--sun); color: var(--pine); padding: 8px 14px; z-index: 100; font-weight: 700; }
.skip:focus { left: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.display { font-family: var(--display); font-stretch: 68%; font-weight: 800; letter-spacing: 0; line-height: .94; margin: 0; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.small { font-size: .875rem; }
.lead { font-size: 1.15rem; line-height: 1.5; color: var(--ink); max-width: 58ch; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.mt { margin-top: 24px; }
.mb { margin-bottom: 24px; }

/* Buttons ------------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; min-height: 44px; border-radius: var(--r); border: 2px solid transparent;
  font: 700 15px/1.2 var(--body); text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--pine); color: #fff; }
.btn-primary:hover { background: var(--pine-2); color: #fff; }
.btn-sun { background: var(--sun); color: var(--pine); }
.btn-sun:hover { background: var(--sun-2); color: var(--pine); }
.btn-ghost { background: transparent; border-color: var(--pine); color: var(--pine); }
.btn-ghost:hover { background: var(--tint); color: var(--pine); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-danger:hover { background: #8E1A11; color: #fff; }
.btn-sm { padding: 6px 12px; min-height: 34px; font-size: 13px; }
.btn-block { width: 100%; }
.on-dark .btn-ghost { border-color: #fff; color: #fff; }
.on-dark .btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--pine); text-decoration: underline; cursor: pointer; }

/* Forms -------------------------------------------------------------------- */
.field { margin-bottom: 16px; }
.field label, .label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 6px; }
input, select, textarea {
  width: 100%; padding: 11px 12px; min-height: 44px; background: #fff; color: var(--ink);
  border: 1.5px solid #8FA79B; border-radius: var(--r); font: 400 16px/1.4 var(--body);
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(255, 199, 44, .65); border-color: var(--pine); }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; min-height: 0; accent-color: var(--pine); flex: none; }
.hint { font-size: .85rem; color: var(--muted); margin: 6px 0 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check label { font-weight: 400; margin: 0; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.inline-form { display: inline; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 18px; }
.filters .field { margin: 0; min-width: 150px; }
.filters input, .filters select { min-height: 40px; padding: 8px 10px; }

/* Panels, tables, badges --------------------------------------------------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 22px; }
.panel + .panel { margin-top: 20px; }
:is(.grid-2, .grid-3, .order-layout) > .panel + .panel { margin-top: 0; }
.panel h2 { font-size: 1.2rem; }
.panel-flush { padding: 0; overflow: hidden; }
.panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.bulk-bar select, .bulk-bar input { width: auto; max-width: 100%; min-height: 36px; }
.bulk-bar input[type=number] { width: 110px; }
.panel-head h2 { margin: 0; font-size: 1.1rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 20px; }
.stat { background: var(--panel); padding: 18px 20px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); margin: 0 -1px -1px 0; min-width: 0; }
.stat b { display: block; font: 800 1.7rem/1.1 var(--display); font-stretch: 75%; color: var(--pine); margin-bottom: 6px; overflow-wrap: anywhere; }
.stat span { color: var(--muted); font-size: .875rem; }
.stat.is-alert b { color: var(--bad); }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.table th { text-align: left; font-size: .8rem; font-weight: 700; color: var(--muted); padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--tint); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; }
.table .trunc { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-click tbody tr:hover { background: var(--tint); }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.b-ok { background: var(--ok-bg); color: var(--ok); }
.b-warn { background: var(--warn-bg); color: var(--warn); }
.b-bad { background: var(--bad-bg); color: var(--bad); }
.b-info { background: var(--info-bg); color: var(--info); }
.b-mute { background: var(--mute-bg); color: var(--muted); }

.flash { padding: 12px 16px; border-radius: var(--r); margin-bottom: 16px; border-left: 5px solid; font-weight: 500; }
.flash-ok { background: var(--ok-bg); border-color: var(--ok); color: #0F4F30; }
.flash-err { background: var(--bad-bg); border-color: var(--bad); color: #7A1710; }
.flash-info { background: var(--info-bg); border-color: var(--info); color: #173F66; }
.flash ul { margin: 0; padding-left: 1.2em; }

.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--line-2); font-size: .9rem; }
.pager a, .pager span { padding: 6px 4px; }
.pager span:not(.pager-now) { color: var(--muted); }
.pager-now { color: var(--muted); }
.code { background: var(--deep); color: #E3F1EA; padding: 14px 16px; border-radius: var(--r); overflow-x: auto; font: 500 .85rem/1.6 ui-monospace, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-all; }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { padding: 6px 0; }
.checklist .is-ok { color: var(--ok); }
.checklist .is-bad { color: var(--bad); font-weight: 700; }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 8px 16px; margin: 0; }
.kv dt { color: var(--muted); font-size: .9rem; }
.kv dd { margin: 0; font-weight: 600; word-break: break-word; overflow-wrap: anywhere; min-width: 0; }

/* Public header & footer --------------------------------------------------- */
.site-header { background: var(--ground); position: relative; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 800 1.45rem/1 var(--display); font-stretch: 72%; color: var(--pine); text-decoration: none; letter-spacing: .01em; }
.brand:hover { color: var(--pine); }
.brand-mark { width: 26px; height: 26px; flex: none; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a:not(.btn) { padding: 10px 12px; text-decoration: none; font-weight: 600; color: var(--ink); border-radius: var(--r); }
.nav a:not(.btn):hover, .nav a.is-active { background: rgba(13, 59, 46, .09); }
.nav-toggle { display: none; background: var(--pine); color: #fff; border: 0; border-radius: var(--r); padding: 10px 14px; font: 700 14px var(--body); min-height: 44px; }

.site-footer { background: var(--deep); color: #B9CFC6; padding: 56px 0 28px; margin-top: 0; }
.site-footer a { color: #E8F2ED; text-decoration: none; }
.site-footer a:hover { color: var(--sun); text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h3 { font-size: .95rem; color: #fff; margin-bottom: 12px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { padding: 4px 0; }
.site-footer .brand { color: #fff; margin-bottom: 14px; }
.footer-legal { border-top: 1px solid rgba(255,255,255,.14); margin-top: 36px; padding-top: 20px; font-size: .85rem; line-height: 1.6; }

/* Home --------------------------------------------------------------------- */
.hero { padding: 40px 0 80px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.8rem, 8vw, 5.6rem); color: var(--pine); margin-bottom: 24px; }
.hero h1 em { font-style: normal; background: linear-gradient(transparent 62%, var(--sun) 62%); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hero .lead { margin-bottom: 28px; }
.hero .note { margin-top: 18px; font-size: .9rem; color: var(--muted); }

.board { background: var(--pine); color: #fff; border-radius: var(--r-lg); padding: 6px 24px 18px; box-shadow: 0 2px 0 var(--deep); }
.board-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 0 12px; border-bottom: 2px solid var(--sun); }
.board-head strong { font-size: 1.05rem; }
.board-head a { color: var(--sun); font-weight: 700; font-size: .9rem; }
.board-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.14); text-decoration: none; color: #fff; }
.board-row:last-child { border-bottom: 0; }
.board-row:hover { color: #fff; }
.board-row:hover .board-name { text-decoration: underline; }
.board-cat { display: block; font-size: .8rem; color: #A9C7BA; }
.board-name { display: block; font-weight: 600; line-height: 1.3; }
.board-price { font: 800 2.3rem/1 var(--display); font-stretch: 68%; color: var(--sun); text-align: right; }
.board-price small { display: block; font: 500 .72rem/1.2 var(--body); font-stretch: 100%; color: #A9C7BA; margin-top: 2px; }
.board-empty { padding: 28px 0 14px; color: #CFE3D9; }
.board-empty a { color: var(--sun); }

.band { padding: 80px 0; }
.band-white { background: #fff; }
.band-pine { background: var(--pine); color: #fff; }
.band-sun { background: var(--sun); color: var(--pine); }
.band h2.display { font-size: clamp(2.2rem, 5.4vw, 3.8rem); margin-bottom: 36px; }
.band-pine h2.display { color: #fff; }

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 3px solid var(--pine); }
.step { padding: 24px 24px 8px 0; }
.step-n { font: 800 4rem/1 var(--display); font-stretch: 68%; color: var(--pine-3); display: block; margin-bottom: 8px; }
.step h3 { margin-bottom: 6px; }
.step p { color: var(--muted); max-width: 30ch; }

.plain { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: start; }
.plain dl { margin: 0; }
.plain dt { font-weight: 800; font-size: 1.1rem; color: var(--sun); margin-top: 22px; }
.plain dt:first-child { margin-top: 0; }
.plain dd { margin: 4px 0 0; color: #DCEAE3; max-width: 60ch; }

.catlist { list-style: none; margin: 0; padding: 0; border-top: 3px solid var(--pine); }
.catlist a { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; font: 800 clamp(1.7rem, 4.2vw, 2.8rem)/1.05 var(--display); font-stretch: 68%; color: var(--pine); }
.catlist a:hover { background: var(--sun); padding-left: 12px; padding-right: 12px; }
.catlist small { font: 600 .9rem var(--body); font-stretch: 100%; color: var(--muted); white-space: nowrap; }

.cta { text-align: left; }
.cta h2 { font-size: clamp(2.4rem, 6vw, 4.4rem); margin-bottom: 20px; max-width: 14ch; }
.cta .btn-primary { background: var(--pine); }

.faq-list { border-top: 3px solid var(--pine); }
details.faq-item { border-bottom: 1px solid var(--line); }
details.faq-item summary { list-style: none; cursor: pointer; padding: 18px 44px 18px 0; font-weight: 700; font-size: 1.08rem; position: relative; }
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font: 400 1.8rem/1 var(--body); color: var(--pine-3); }
details.faq-item[open] summary::after { content: "\2212"; }
details.faq-item .answer { padding: 0 44px 20px 0; max-width: 72ch; color: #2C3C35; }
.faq-group { margin-top: 44px; }
.faq-group h2 { font-size: 1.7rem; font-family: var(--display); font-stretch: 70%; font-weight: 800; color: var(--pine); }

/* Pricing page ------------------------------------------------------------- */
.page-head { padding: 36px 0 28px; }
.page-head h1 { font-size: clamp(2.4rem, 6.5vw, 4.4rem); color: var(--pine); margin-bottom: 14px; }
.price-group { margin-bottom: 36px; }
.price-group h2 { font: 800 1.9rem/1.1 var(--display); font-stretch: 70%; color: var(--pine); margin-bottom: 10px; }
.price-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.price-row .name { font-weight: 600; }
.price-row .meta { display: block; font-size: .83rem; color: var(--muted); font-weight: 400; margin-top: 2px; }
.price-row .price { font: 800 1.5rem/1 var(--display); font-stretch: 72%; color: var(--pine); white-space: nowrap; text-align: right; }
.price-row .price small { display: block; font: 500 .72rem var(--body); font-stretch: 100%; color: var(--muted); }
.price-row .id { color: var(--muted); font-weight: 400; margin-right: 6px; }
.search { max-width: 420px; margin-top: 16px; }

/* Legal / prose ------------------------------------------------------------ */
.doc { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; align-items: start; padding-bottom: 80px; }
.toc { position: sticky; top: 20px; font-size: .9rem; }
.toc strong { display: block; margin-bottom: 8px; }
.toc ol { margin: 0; padding: 0; list-style: none; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 14px; text-decoration: none; color: var(--muted); margin-left: -2px; border-left: 2px solid transparent; }
.toc a:hover { color: var(--pine); border-left-color: var(--sun-2); }
.prose { max-width: 72ch; min-width: 0; overflow-wrap: break-word; }
.prose table { display: block; overflow-x: auto; max-width: 100%; }
.grid-2 > *, .grid-3 > * { min-width: 0; }
.prose h2 { font-size: 1.55rem; margin-top: 2.2em; padding-top: .2em; scroll-margin-top: 20px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.6em; }
.prose p, .prose li { line-height: 1.75; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: .45em; }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0 1.4em; font-size: .94rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--tint); }
.summary-box { background: var(--pine); color: #fff; border-radius: var(--r-lg); padding: 22px 24px; margin-bottom: 2em; }
.summary-box h2 { color: var(--sun); font-size: 1.1rem; margin: 0 0 8px; padding: 0; }
.summary-box ul { margin: 0; padding-left: 1.2em; }
.summary-box li { margin-bottom: .35em; color: #E6F1EB; }
.updated { color: var(--muted); font-size: .9rem; margin-bottom: 1.6em; }

/* Auth --------------------------------------------------------------------- */
.auth { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); min-height: calc(100vh - 72px); }
.auth-side { background: var(--pine); color: #fff; padding: 64px 48px; display: flex; flex-direction: column; justify-content: center; }
.auth-side h2 { font: 800 clamp(2.4rem, 5vw, 3.8rem)/.96 var(--display); font-stretch: 68%; color: var(--sun); margin-bottom: 28px; }
.auth-side ul { list-style: none; margin: 0; padding: 0; max-width: 38ch; }
.auth-side li { padding: 12px 0; border-top: 1px solid rgba(255,255,255,.18); color: #DCEAE3; }
.auth-main { padding: 56px 24px; display: flex; align-items: center; justify-content: center; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font-size: 2.2rem; color: var(--pine); font-family: var(--display); font-stretch: 70%; margin-bottom: 8px; }
.auth-card .alt { margin-top: 18px; font-size: .95rem; }

/* Customer app shell ------------------------------------------------------- */
.app-top { background: var(--pine); color: #fff; position: sticky; top: 0; z-index: 30; }
.app-top .wrap { display: flex; align-items: center; gap: 20px; height: 64px; }
.app-top .brand { color: #fff; }
.app-nav { display: flex; gap: 2px; margin-left: 12px; }
.app-nav a { color: #DCEAE3; text-decoration: none; font-weight: 600; padding: 8px 13px; border-radius: var(--r); }
.app-nav a:hover { background: rgba(255,255,255,.1); color: #fff; }
.app-nav a.is-active { background: var(--sun); color: var(--pine); }
.app-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.bal { display: inline-flex; flex-direction: column; text-align: right; text-decoration: none; color: #fff; line-height: 1.15; }
.bal small { color: #A9C7BA; font-size: .72rem; }
.bal b { color: var(--sun); font: 800 1.25rem/1 var(--display); font-stretch: 75%; }
.app-right form button { color: #DCEAE3; }
.app-main { padding: 32px 0 80px; min-height: 70vh; }
.app-main > .wrap > h1, .page-title { font: 800 clamp(2rem, 5vw, 3rem)/1 var(--display); font-stretch: 68%; color: var(--pine); margin-bottom: 22px; }
.tabbar { display: none; }
.banner { background: var(--warn-bg); border-bottom: 1px solid #E8CF8A; color: #5C3A00; padding: 10px 0; font-size: .93rem; }
.banner .wrap { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

.news { border-left: 5px solid var(--sun); background: #fff; padding: 14px 18px; border-radius: 0 var(--r) var(--r) 0; margin-bottom: 14px; }
.news b { display: block; }

.order-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px; align-items: start; }
.summary { position: sticky; top: 84px; }
.summary .total { font: 800 3rem/1 var(--display); font-stretch: 70%; color: var(--pine); }
.summary dl { margin: 14px 0 0; }
.svc-desc { background: var(--tint); border-radius: var(--r); padding: 12px 14px; font-size: .92rem; white-space: pre-line; }
.warn-text { color: var(--bad); font-weight: 600; }

.rail { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 6px 0 22px; }
.rail div { border-top: 5px solid var(--line); padding-top: 8px; font-size: .85rem; color: var(--muted); font-weight: 600; }
.rail .is-done { border-color: var(--pine-3); color: var(--ink); }
.rail .is-now { border-color: var(--sun-2); color: var(--ink); }
.rail .is-bad { border-color: var(--bad); color: var(--bad); }

.chat { display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 86%; padding: 12px 16px; border-radius: 12px; background: #fff; border: 1px solid var(--line); white-space: pre-wrap; word-break: break-word; }
.msg.staff { align-self: flex-end; background: var(--pine); color: #fff; border-color: var(--pine); }
.msg small { display: block; opacity: .75; margin-bottom: 4px; font-size: .78rem; }
.key-box { background: var(--sun); color: var(--pine); padding: 14px 16px; border-radius: var(--r); font: 700 1rem ui-monospace, Menlo, Consolas, monospace; word-break: break-all; }

/* Admin shell -------------------------------------------------------------- */
.admin { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--deep); color: #CFE3D9; padding: 22px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .brand { color: #fff; padding: 0 10px 18px; font-size: 1.35rem; }
.side-group { margin: 18px 0 6px; padding: 0 10px; font-size: .78rem; font-weight: 700; color: #7FA596; }
.side a.item { display: flex; justify-content: space-between; align-items: center; padding: 9px 10px; border-radius: var(--r); color: #DCEAE3; text-decoration: none; font-weight: 600; font-size: .95rem; }
.side a.item:hover { background: rgba(255,255,255,.08); }
.side a.item.is-active { background: var(--sun); color: var(--pine); }
.side .count { background: var(--bad); color: #fff; border-radius: 999px; font-size: .72rem; padding: 1px 7px; font-weight: 700; }
.admin-main { padding: 28px 32px 80px; min-width: 0; }
.admin-main > h1 { font: 800 2.6rem/1 var(--display); font-stretch: 68%; color: var(--pine); margin-bottom: 20px; }
.admin-bar { display: none; }

/* Password field -------------------------------------------------------------- */
.pw-wrap { position: relative; display: flex; }
.pw-wrap input { padding-right: 76px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--pine); font: 700 .9rem var(--body); min-height: 36px; padding: 0 12px; cursor: pointer; border-radius: 6px; }
.pw-toggle:hover { background: var(--tint); }
.pw-rules { list-style: none; margin: 10px 0 0; padding: 0; font-size: .85rem; color: var(--muted); }
.pw-rules li { position: relative; padding: 2px 0 2px 22px; }
.pw-rules li::before { content: ""; position: absolute; left: 0; top: .6em; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--line); }
.pw-rules li.is-ok { color: var(--ok); }
.pw-rules li.is-ok::before { background: var(--ok); border-color: var(--ok); }
.pw-rules li.is-bad { color: var(--bad); }
.pw-rules li.is-bad::before { border-color: var(--bad); }

/* Payment method picker and admin alerts ------------------------------------ */
.method-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(145px, 220px)); gap: 10px; margin-bottom: 18px; }
.method { text-align: left; background: var(--panel); color: var(--ink); border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; min-height: 68px; cursor: pointer; font: inherit; display: flex; flex-direction: column; gap: 2px; }
.method b { font-size: 1.05rem; }
.method small { color: var(--muted); font-size: .82rem; line-height: 1.35; }
.method:hover { border-color: var(--pine-3); }
.method.is-on { background: var(--pine); border-color: var(--pine); color: #fff; }
.method.is-on small { color: #CFE3D9; }
.method-panels { max-width: 620px; }
.method-panel[hidden] { display: none; }
.method-panel + .method-panel { margin-top: 20px; }
.alert-list.is-dim { opacity: .45; }

/* Install ------------------------------------------------------------------ */
.install { background: var(--ground); }
.install-wrap { max-width: 640px; margin: 0 auto; padding: 48px 20px 80px; }
.install-wrap h1 { font-size: 3.4rem; color: var(--pine); margin-bottom: 14px; }
.install-wrap .panel { margin-bottom: 20px; }

.cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; max-width: 520px; background: var(--deep); color: #E3F1EA; padding: 16px 18px; border-radius: 12px; z-index: 60; display: none; font-size: .92rem; box-shadow: 0 8px 30px rgba(0,0,0,.25); }
.cookie.is-on { display: block; }
.cookie a { color: var(--sun); }
.cookie .btn { margin-top: 10px; }

/* Responsive --------------------------------------------------------------- */
@media (max-width: 960px) {
  .hero-grid, .plain, .order-layout, .doc { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .toc { position: static; }
  .summary { position: static; }
  .admin { grid-template-columns: 1fr; }
  .side { position: static; height: auto; padding: 12px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
  .side .brand { width: 100%; padding-bottom: 6px; }
  .side-group { display: none; }
  .side a.item { padding: 8px 10px; }
  .admin-main { padding: 20px 16px 60px; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .nav-toggle { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 72px; background: var(--ground); flex-direction: column; align-items: stretch; padding: 8px 20px 20px; border-bottom: 1px solid var(--line); }
  .nav.is-open { display: flex; }
  .nav .btn { margin-top: 6px; }
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .app-nav { display: none; }
  .tabbar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; background: var(--pine); z-index: 40; padding-bottom: env(safe-area-inset-bottom); border-top: 2px solid var(--deep); }
  .tabbar a { text-align: center; padding: 14px 4px 12px; color: #CFE3D9; text-decoration: none; font-weight: 700; font-size: .82rem; border-top: 4px solid transparent; margin-top: -2px; min-height: 52px; }
  .tabbar a.is-active { color: var(--sun); border-top-color: var(--sun); }
  .app-main { padding-bottom: 96px; }
  .app-right .hide-sm { display: none; }
}
@media (max-width: 640px) {
  .bulk-bar { width: 100%; }
  .bulk-bar select, .bulk-bar input, .bulk-bar input[type=number], .bulk-bar .btn { flex: 1 1 100%; width: 100%; }
  .band { padding: 56px 0; }
  .grid-2, .grid-3, .field-row { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .step { border-bottom: 1px solid var(--line); padding-bottom: 20px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 10px; }
  .board { padding: 4px 18px 14px; }
  .hero { padding-bottom: 56px; }
  .panel { padding: 18px; }
  .msg { max-width: 96%; }
  .table-stack thead { display: none; }
  .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
  .table-stack tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .table-stack td { display: flex; justify-content: space-between; gap: 16px; border: 0; padding: 4px 16px; text-align: right; }
  .table-stack td::before { content: attr(data-label); color: var(--muted); font-size: .82rem; text-align: left; flex: none; }
  .table-stack .trunc { max-width: none; white-space: normal; word-break: break-all; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
