:root { --navy: #183964; --blue: #0b5cad; --ink: #16181d; --muted: #5b6270; --line: #e1e5eb; --bg: #f4f6f9; --ok: #1f7a4a; --warn: #9a5b00; --bad: #b42318; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--blue); }
h1 { margin: 0; font-size: 28px; font-weight: 700; }
h2 { margin: 0 0 12px; font-size: 17px; font-weight: 700; }
h3 { margin: 0 0 6px; font-size: 16px; }
p { margin: 0 0 10px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; background: #eef0f3; padding: 1px 5px; border-radius: 4px; }
pre { margin: 0; padding: 16px; border-radius: 10px; background: var(--ink); color: #e8ebf0; font-size: 13px; line-height: 1.6; overflow-x: auto; }
.muted { color: var(--muted); } .small { font-size: 13px; } .ok { color: var(--ok); font-weight: 600; } .warn { color: var(--warn); font-weight: 600; } .bad { color: var(--bad); font-weight: 600; }
.center { text-align: center; }
.mark { display: inline-flex; align-items: flex-start; gap: 2px; } .mark img { display: block; border-radius: 4px; } .tm { font-size: 10px; font-weight: 700; line-height: 1; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #e8eefb; color: var(--navy); font-size: 12px; font-weight: 600; } .pill.grey { background: #f1f3f6; color: #3d434d; }

/* buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1px solid #c9d0da; border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; } .btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; } .btn.small { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.link { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; font: inherit; cursor: pointer; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; } .label { font-weight: 600; }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea { min-height: 44px; border: 1px solid #c9d0da; border-radius: 10px; padding: 8px 12px; font: inherit; color: var(--ink); background: #fff; width: 100%; }
input:disabled, select:disabled, textarea:disabled { background: var(--bg); color: #3d434d; }
input.code { font-size: 24px; letter-spacing: .2em; font-weight: 600; text-align: center; }
.hint { font-size: 13px; color: var(--muted); }
.check { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 6px 0; font-size: 14px; } .check input { width: 20px; height: 20px; margin-top: 2px; } .check small { display: block; color: var(--muted); }
.radios { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 14px; }
.radio { display: flex; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; } .radio.on { border: 2px solid var(--blue); background: #f6f9fe; } .radio small { display: block; color: var(--muted); }
.group { border: 0; padding: 14px 0; margin: 0; border-top: 1px solid #eef0f3; border-bottom: 1px solid #eef0f3; } .group legend, .group summary { font-weight: 700; padding: 0; cursor: pointer; }
fieldset { min-width: 0; }
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; border: 1px solid; }
.flash.ok { background: #e6f4ea; border-color: #b7dfc3; color: #14532d; } .flash.bad { background: #fde8e6; border-color: #f5b5b0; color: #7a1f17; } .flash.info { background: #e8eefb; border-color: #c3d3f2; color: var(--navy); } .flash.warn { background: #fff4e0; border-color: #f2d49a; color: #6b4100; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; } .or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.codes { list-style: none; padding: 0; margin: 0 0 18px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; } .codes code { font-size: 16px; display: block; padding: 8px; text-align: center; }

/* auth layout */
.auth { min-height: 100vh; display: flex; flex-wrap: wrap; }
.auth-side { flex: 1 1 400px; background: var(--navy); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.auth-side .eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #c7d3e6; } .auth-side h1 { font-size: 34px; line-height: 1.15; max-width: 440px; margin-bottom: 14px; } .auth-side p { color: #dbe3ef; max-width: 440px; }
.auth-side .legal { font-size: 13px; color: #c7d3e6; margin: 0; }
.auth-main { flex: 1 1 480px; display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.card { width: 100%; max-width: 400px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 32px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 12px 32px rgba(16,24,40,.08); } .card.wide { max-width: 760px; }
.card h1 { font-size: 24px; } .card .flash { margin: 0; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; } .two section, .two > div { display: flex; flex-direction: column; gap: 12px; }
.alts h2 { font-size: 15px; color: #3d434d; }
.alt { display: flex; flex-direction: column; align-items: flex-start; width: 100%; text-align: left; min-height: 56px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font: inherit; color: var(--ink); cursor: pointer; } .alt small { color: var(--muted); }
details summary.alt { list-style: none; }
#qr { display: block; width: 180px; height: 180px; border: 1px solid var(--line); border-radius: 8px; }

/* app layout */
.app { min-height: 100vh; display: flex; flex-wrap: wrap; }
.side { flex: 1 1 232px; max-width: 100%; padding: 24px 16px; display: flex; flex-direction: column; gap: 6px; }
.app.console .side { background: var(--navy); color: #fff; } .app.admin .side { background: #fff; border-right: 1px solid var(--line); }
.side a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 8px; text-decoration: none; font-size: 15px; }
.console .side a { color: #dbe3ef; } .console .side a.active { background: rgba(255,255,255,.14); color: #fff; font-weight: 600; }
.admin .side a { color: #3d434d; } .admin .side a.active { background: #e8eefb; color: var(--navy); font-weight: 600; }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 20px; } .side-brand span { display: flex; flex-direction: column; } .side-brand small { font-size: 12px; opacity: .8; }
.side-logo { width: 36px; height: 36px; object-fit: contain; border-radius: 6px; } .side-initial { width: 36px; height: 36px; border-radius: 8px; background: var(--navy); color: #fff; display: flex !important; align-items: center; justify-content: center; font-weight: 700; }
.grow { flex-grow: 1; }
.side-user { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; font-size: 13px; border-top: 1px solid rgba(128,128,128,.25); }
.console .side-user .link { color: #c7d3e6; }
.side-legal { display: flex; align-items: center; gap: 8px; padding: 10px 8px 0; font-size: 12px; } .console .side-legal { color: #c7d3e6; } .admin .side-legal { color: var(--muted); }
.main { flex: 999 1 560px; min-width: 0; padding: 32px 40px 80px; display: flex; flex-direction: column; gap: 22px; }
@media (max-width: 720px) { .main { padding: 20px 16px 60px; } }
.head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; } .head h2 { margin: 0; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; }
.panel.rec { border: 2px solid var(--blue); } .panel.split { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; } .grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; } .grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; } .stats div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; } .stats span { font-size: 13px; color: var(--muted); } .stats strong { font-size: 26px; }
.table { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; } .panel .table { border: 0; }
table { width: 100%; border-collapse: collapse; font-size: 14px; } th { text-align: left; padding: 12px 16px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--line); } td { padding: 12px 16px; border-bottom: 1px solid #eef0f3; vertical-align: middle; } tr:last-child td { border-bottom: 0; } td.center, th.center { text-align: center; }
td form { margin: 0; }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; margin: 0; font-size: 14px; } .kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 600; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid #eef0f3; font-size: 14px; } .row small { display: block; color: var(--muted); } .row.total { font-weight: 700; font-size: 16px; } .row form { margin: 0; }
.activity { list-style: none; margin: 0; padding: 0; font-size: 14px; } .activity li { display: flex; gap: 16px; padding: 8px 0; border-bottom: 1px solid #eef0f3; } .when { flex: 0 0 130px; color: var(--muted); }
details.inline summary { list-style: none; } .inline-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; align-items: end; margin-top: 12px; }
.inline-add { display: flex; gap: 8px; margin-top: 8px; }
.code-box { display: flex; align-items: center; gap: 10px; } code.big { font-size: 26px; font-weight: 700; letter-spacing: .08em; padding: 8px 16px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--line); } .tabs button { min-height: 44px; padding: 0 14px; border: 0; border-bottom: 3px solid transparent; background: none; font: inherit; font-size: 14px; color: #3d434d; cursor: pointer; } .tabs button[aria-selected=true] { border-bottom-color: var(--blue); color: var(--navy); font-weight: 600; }
.plain { padding-left: 18px; margin: 0 0 12px; } .method { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); border-radius: 12px; padding: 16px; font-size: 14px; } .method p { color: var(--muted); font-size: 13px; }
.savebar { position: sticky; bottom: 12px; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 18px; box-shadow: 0 -4px 20px rgba(16,24,40,.06); }
.stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.settings-grid { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; } .settings-grid form { flex: 2 1 520px; } .preview-col { flex: 1 1 300px; display: flex; flex-direction: column; gap: 10px; align-items: center; position: sticky; top: 24px; }
.brand-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; } .logo-box { width: 160px; height: 64px; border: 1px dashed #c9d0da; border-radius: 10px; display: flex; align-items: center; justify-content: center; } .logo-box img { max-height: 56px; max-width: 150px; object-fit: contain; }
.popup-preview { width: 300px; background: #fff; border-radius: 12px; box-shadow: 0 16px 40px rgba(16,24,40,.18); overflow: hidden; font-size: 13px; }
.pp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid #e3e6eb; min-height: 52px; } .pp-brand { display: flex; align-items: center; gap: 8px; min-width: 0; } .pp-brand img { height: 26px; max-width: 120px; object-fit: contain; }
.pp-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; } .pp-eyebrow { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pp-row { display: flex; justify-content: space-between; background: #f5f6f8; border: 1px solid #e3e6eb; border-radius: 10px; padding: 10px 12px; } .pp-row small { font-weight: 500; color: var(--muted); }
.pp-foot { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); padding-top: 4px; } .pp-foot span { text-decoration: underline; }
.pp-legal { border-top: 1px solid #e3e6eb; padding: 8px; text-align: center; font-size: 11px; color: var(--muted); }
[hidden] { display: none !important; }

/* test / live configurations */
.settings-grid > .stack { flex: 2 1 520px; }
.subtabs { margin-bottom: 4px; } .subtabs a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-bottom: 3px solid transparent; font-size: 14px; color: #3d434d; text-decoration: none; } .subtabs a[aria-selected=true] { border-bottom-color: var(--blue); color: var(--navy); font-weight: 600; }
.panel.publish.pending { border: 2px solid var(--warn); background: #fffaf0; } .publish-form { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; } .btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.panel.try { border-left: 4px solid var(--blue); } .steps { margin: 0; padding-left: 20px; font-size: 14px; display: flex; flex-direction: column; gap: 8px; }
.pp-test { background: #fff4e0; color: #6b4100; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; text-align: center; padding: 5px 8px; }
.radio input[type=radio] { width: 20px; height: 20px; margin-top: 2px; flex: none; }
