/* Wared Play EFRIS Connector - same look as the WEAF EFRIS API (GitHub-dark), with a light theme. */
:root {
  --bg: #0e1117; --panel: #161b22; --panel-2: #1c2129; --ink: #e6edf3; --muted: #8b949e; --line: #30363d; --line-soft: #21262d;
  --field: #0d1117;
  --brand: #238636; --brand-hover: #2ea043; --brand-ink: #ffffff; --brand-soft: rgba(46,160,67,.15);
  --link: #58a6ff; --accent-soft: rgba(56,139,253,.12);
  --ok: #3fb950; --ok-bg: rgba(46,160,67,.15); --warn: #d29922; --warn-bg: rgba(187,128,9,.15);
  --bad: #f85149; --bad-bg: rgba(248,81,73,.15); --info: #58a6ff; --info-bg: rgba(56,139,253,.15); --mute-bg: rgba(110,118,129,.18);
  --radius: 12px; --radius-sm: 8px; --shadow: 0 6px 24px rgba(0,0,0,.35);
  --font: Inter, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Consolas, "Cascadia Mono", Menlo, monospace;
  --j-key: #79c0ff; --j-str: #a5d6ff; --j-num: #ffa657; --j-bool: #ff7b72; --j-null: #8b949e;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f6f8fa; --panel: #ffffff; --panel-2: #f6f8fa; --ink: #1f2328; --muted: #59636e; --line: #d1d9e0; --line-soft: #e8ecf0;
  --field: #ffffff;
  --brand: #1f883d; --brand-hover: #1a7f37; --brand-soft: rgba(31,136,61,.1);
  --link: #0969da; --accent-soft: rgba(9,105,218,.07);
  --ok: #1a7f37; --ok-bg: #dafbe1; --warn: #9a6700; --warn-bg: #fff8c5;
  --bad: #cf222e; --bad-bg: #ffebe9; --info: #0969da; --info-bg: #ddf4ff; --mute-bg: #eff2f5;
  --shadow: 0 1px 3px rgba(31,35,40,.08), 0 1px 0 rgba(31,35,40,.04);
  --j-key: #0550ae; --j-str: #0a3069; --j-num: #953800; --j-bool: #cf222e; --j-null: #6e7781;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 14px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0 0 4px; font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: 16px; margin: 0 0 12px; font-weight: 650; }
h3 { font-size: 14px; margin: 16px 0 8px; font-weight: 650; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.mt0 { margin-top: 0; } .mb0 { margin-bottom: 0; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { background: var(--panel); border-right: 1px solid var(--line); padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.brand { display: flex; gap: 10px; align-items: center; padding: 0 8px 16px; border-bottom: 1px solid var(--line); margin-bottom: 12px; color: var(--ink); }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, #2ea043, #238636); color: #fff; display: grid; place-items: center; font-weight: 800; flex: 0 0 auto; }
.brand b { display: block; font-size: 14px; }
.brand span { font-size: 11.5px; color: var(--muted); }
.company-box { margin: 0 4px 12px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--field); }
.company-box .label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.company-box b { display: block; font-size: 13.5px; margin-top: 2px; }
.company-box select { margin-top: 6px; padding: 6px 8px; font-size: 12.5px; }
.nav a { display: flex; gap: 10px; align-items: center; padding: 7px 10px; border-radius: var(--radius-sm); color: var(--ink); margin-bottom: 2px; font-weight: 500; }
.nav a .ico { width: 16px; height: 16px; opacity: .75; flex: 0 0 auto; }
.nav a .count { margin-left: auto; }
.nav a:hover { background: var(--mute-bg); text-decoration: none; }
.nav a.active { background: var(--mute-bg); font-weight: 650; box-shadow: inset 3px 0 0 var(--brand-hover); }
.nav .sep { margin: 16px 10px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; }
.side-foot { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); }
.count { background: var(--warn-bg); color: var(--warn); border-radius: 99px; padding: 0 7px; font-size: 11.5px; font-weight: 650; }
.main { padding: 22px 28px 56px; min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--line-soft); }
.env { display: inline-flex; gap: 6px; align-items: center; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 650; border: 1px solid transparent; }
.env::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.env.sandbox { background: var(--info-bg); color: var(--info); border-color: color-mix(in srgb, var(--info) 30%, transparent); }
.env.production { background: var(--bad-bg); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.user-box { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--link); display: inline-grid; place-items: center; font-weight: 700; font-size: 12px; text-transform: uppercase; }
.theme-toggle { background: transparent; border: 1px solid var(--line); color: var(--muted); border-radius: var(--radius-sm); width: 32px; height: 30px; cursor: pointer; display: inline-grid; place-items: center; font-size: 14px; }
.theme-toggle:hover { color: var(--ink); border-color: var(--muted); }
.crumbs { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.crumbs a { color: var(--muted); }

/* ---------- panels, stats ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; }
.panel.flush { padding: 0; overflow: hidden; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-head h2, .panel-head h3 { margin: 0; }
.panel-body { padding: 16px 18px; }
.grid { display: grid; gap: 14px; }
.grid.k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.k3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.k2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.item-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; position: relative; overflow: hidden; }
.kpi::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--kpi, var(--line)); }
.kpi.ok { --kpi: var(--ok); } .kpi.warn { --kpi: var(--warn); } .kpi.bad { --kpi: var(--bad); } .kpi.info { --kpi: var(--info); }
.kpi .label { color: var(--muted); font-size: 12.5px; }
.kpi .value { font-size: 24px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi a.value { display: block; color: var(--ink); }
.kpi .sub { font-size: 12px; color: var(--muted); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 650; background: var(--panel-2); position: sticky; top: 0; white-space: nowrap; }
tbody tr:hover td, table > tr:hover td { background: var(--accent-soft); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.actions-cell, th.actions-cell { text-align: right; white-space: nowrap; }
td .sub { display: block; font-size: 12px; color: var(--muted); }
.empty { text-align: center; padding: 34px 12px !important; color: var(--muted); }

/* ---------- badges & action chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 1px 9px; border-radius: 99px; font-size: 12px; font-weight: 650; white-space: nowrap; border: 1px solid transparent; line-height: 1.6; }
.badge.ok { background: var(--ok-bg); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.badge.warn { background: var(--warn-bg); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.badge.bad { background: var(--bad-bg); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.badge.info { background: var(--info-bg); color: var(--info); border-color: color-mix(in srgb, var(--info) 35%, transparent); }
.badge.muted { background: var(--mute-bg); color: var(--muted); border-color: var(--line); }
.badge.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.actions { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.act { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 6px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); cursor: pointer; white-space: nowrap; font-family: inherit; line-height: 1.5; }
.act:hover { text-decoration: none; border-color: var(--muted); }
.act.view { color: var(--link); border-color: color-mix(in srgb, var(--link) 35%, transparent); background: var(--info-bg); }
.act.go { color: #fff; background: var(--brand); border-color: var(--brand); }
.act.go:hover { background: var(--brand-hover); }
.act.verify { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); background: var(--ok-bg); }
.act.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, transparent); background: var(--warn-bg); }
.act.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, transparent); background: var(--bad-bg); }
.act[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- filters & pagination ---------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--panel-2); }
.filters > div { flex: 1 1 150px; min-width: 130px; }
.filters > div.wide { flex: 2 1 240px; }
.filters > .shrink { flex: 0 0 auto; min-width: 0; }
.filters label { margin-top: 0; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 18px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.pages { display: flex; gap: 4px; flex-wrap: wrap; }
.pages a, .pages span { min-width: 32px; height: 30px; padding: 0 9px; display: inline-grid; place-items: center; border-radius: 6px; border: 1px solid var(--line); color: var(--ink); font-weight: 600; background: var(--panel); }
.pages a:hover { border-color: var(--muted); text-decoration: none; }
.pages .current { background: var(--brand); border-color: var(--brand); color: #fff; }
.pages .disabled { opacity: .4; }
.pages .gap { border: 0; background: transparent; min-width: 18px; }
.page-size { display: inline-flex; gap: 6px; align-items: center; }
.page-size select { width: auto; padding: 4px 8px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs a { padding: 8px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.active { color: var(--ink); border-bottom-color: #f78166; }

/* ---------- flash ---------- */
.flash { padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; border: 1px solid transparent; }
.flash.ok { background: var(--ok-bg); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.flash.err { background: var(--bad-bg); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.flash.warn { background: var(--warn-bg); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.flash.info { background: var(--info-bg); color: var(--info); border-color: color-mix(in srgb, var(--info) 35%, transparent); }

/* ---------- forms ---------- */
form.inline { display: inline; }
label { display: block; font-weight: 600; font-size: 12.5px; margin: 12px 0 5px; color: var(--ink); }
label.check { display: flex; gap: 8px; align-items: center; font-weight: 500; font-size: 14px; }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=search], input[type=email], input[type=url], input[type=tel], select, textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--field); color: var(--ink); font: inherit;
}
input::placeholder { color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--link) 45%, transparent); outline-offset: 0; border-color: var(--link); }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.row > * { flex: 1 1 160px; }
.row > .shrink { flex: 0 0 auto; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px 14px 14px; margin: 14px 0; }
legend { padding: 0 6px; font-weight: 650; font-size: 13px; }

.btn { display: inline-flex; gap: 6px; align-items: center; justify-content: center; padding: 8px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--panel-2); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { text-decoration: none; border-color: var(--muted); }
.btn.primary { background: var(--brand); border-color: rgba(240,246,252,.1); color: var(--brand-ink); }
.btn.primary:hover { background: var(--brand-hover); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: var(--bad-bg); border-color: var(--bad); }
.btn.small { padding: 4px 10px; font-size: 12.5px; }
.btn[disabled], .btn.loading { opacity: .65; cursor: progress; }
.btn.loading::before, .act.loading::before { content: ""; width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.step { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; background: var(--panel-2); }
.step.done { border-color: color-mix(in srgb, var(--ok) 45%, transparent); background: var(--ok-bg); }
.step b { display: block; }
dl.kv { display: grid; grid-template-columns: 170px 1fr; gap: 7px 14px; margin: 0; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; word-break: break-word; }

/* ---------- JSON viewer + copy ---------- */
.code-box { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--field); overflow: hidden; margin-bottom: 14px; }
.code-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; border-bottom: 1px solid var(--line); background: var(--panel-2); font-size: 12px; color: var(--muted); font-weight: 600; }
.code-head .actions { gap: 4px; }
pre.json { margin: 0; padding: 12px 14px; max-height: 420px; overflow: auto; font: 12.5px/1.55 var(--mono); white-space: pre; tab-size: 2; background: transparent; border: 0; color: var(--ink); }
pre.json.wrap { white-space: pre-wrap; word-break: break-all; }
pre.json.expanded { max-height: none; }
.j-key { color: var(--j-key); } .j-str { color: var(--j-str); } .j-num { color: var(--j-num); } .j-bool { color: var(--j-bool); } .j-null { color: var(--j-null); font-style: italic; }
.copy { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font: 600 11.5px var(--font); cursor: pointer; vertical-align: middle; }
.copy:hover { color: var(--ink); border-color: var(--muted); }
.copy.done { color: var(--ok); border-color: var(--ok); }
.copy-inline { margin-left: 6px; }

.results { border: 1px solid var(--line); border-radius: var(--radius-sm); max-height: 300px; overflow-y: auto; margin-top: 6px; background: var(--field); }
.results:empty { display: none; }
.results button { display: block; width: 100%; text-align: left; padding: 8px 12px; border: 0; border-bottom: 1px solid var(--line-soft); background: transparent; color: var(--ink); cursor: pointer; font: inherit; }
.results button:hover { background: var(--accent-soft); }
.results button[disabled] { cursor: not-allowed; opacity: .55; }
.results .more { text-align: center; color: var(--link); font-weight: 600; }

.verify-box { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin-top: 12px; background: var(--panel-2); }
.verify-box.ok { border-color: color-mix(in srgb, var(--ok) 45%, transparent); background: var(--ok-bg); }
.verify-box.bad { border-color: color-mix(in srgb, var(--bad) 45%, transparent); background: var(--bad-bg); }
.qr { background: #fff; padding: 8px; border-radius: 8px; display: inline-block; }
dialog.modal { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--ink); padding: 0; width: min(560px, calc(100vw - 32px)); box-shadow: var(--shadow); }
dialog.modal::backdrop { background: rgba(1,4,9,.6); }
dialog.modal .panel-head { border-bottom: 1px solid var(--line); }

.auth { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.auth .panel { width: 100%; max-width: 460px; box-shadow: var(--shadow); }

@media (max-width: 1100px) { .grid.k4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; }
  .grid.k2, .grid.k3, .steps, .item-grid { grid-template-columns: 1fr; }
  .main { padding: 16px; }
  dl.kv { grid-template-columns: 1fr; }
}
@media print {
  .side, .topbar, .acting-bar, .no-print, .filters, .pagination { display: none !important; }
  .shell { display: block; }
  body { background: #fff; color: #000; }
}

/* ---------------- Landing page ---------------- */
.landing { background: var(--panel); }
.l-wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.l-top { border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; z-index: 5; }
.l-bar { display: flex; justify-content: space-between; align-items: center; height: 64px; gap: 16px; }
.l-bar .brand:hover { text-decoration: none; }
.l-bar .brand b { color: var(--ink); }
.l-links { display: flex; gap: 18px; align-items: center; }
.l-links a:not(.btn) { color: var(--muted); font-weight: 500; }
.l-hero { background: linear-gradient(180deg, var(--brand-soft), var(--panel)); padding: 56px 0 40px; }
.l-hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: center; }
.l-eyebrow { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--brand); margin-bottom: 10px; }
.l-title { font-size: 38px; line-height: 1.15; margin: 0 0 14px; letter-spacing: -.01em; }
.l-lead { font-size: 16.5px; color: var(--muted); max-width: 600px; margin: 0 0 22px; }
.l-flow { text-align: center; }
.l-node { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--bg); }
.l-node b { display: block; }
.l-node span { font-size: 12.5px; color: var(--muted); }
.l-node-brand { border-color: var(--brand); background: var(--brand-soft); }
.l-arrow { font-size: 12px; color: var(--muted); padding: 6px 0; }
.l-section { padding: 48px 0; }
.l-alt { background: var(--bg); }
.l-h2 { font-size: 22px; margin: 0 0 16px; }
.l-step { width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; }
.l-list { padding-left: 18px; margin: 0; }
.l-list li { margin-bottom: 8px; }
.l-demo { display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 24px; align-items: center; margin: 0; }
.l-creds { grid-template-columns: 90px 1fr; }
.l-foot { border-top: 1px solid var(--line); padding: 20px 0; }
@media (max-width: 900px) {
  .l-hero-grid, .l-demo { grid-template-columns: 1fr; }
  .l-title { font-size: 28px; }
  .l-links a:not(.btn) { display: none; }
}

/* ---------------- Landing: illustration + cards ---------------- */
.l-hero-art img { width: 100%; height: auto; display: block; }
.l-card { position: relative; transition: transform .15s ease, box-shadow .15s ease; }
.l-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(16,24,40,.08); }
.l-card h3 { margin: 12px 0 6px; font-size: 16px; }
.l-icon { width: 44px; height: 44px; display: block; }
.l-num { position: absolute; top: 14px; right: 16px; font-size: 28px; font-weight: 800; color: var(--line); }
.l-icon-inline { width: 28px; height: 28px; vertical-align: -7px; margin-right: 4px; }

/* ---------------- Sign-in: split layout ---------------- */
.split { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.split-art { background: linear-gradient(160deg, var(--brand-soft), var(--bg) 70%); padding: 32px 48px; display: flex; flex-direction: column; justify-content: center; gap: 18px; border-right: 1px solid var(--line); }
.split-brand { border: 0; margin: 0; padding: 0; }
.split-brand:hover { text-decoration: none; }
.split-brand b { color: var(--ink); }
.split-img { width: 100%; max-width: 560px; height: auto; align-self: center; }
.split-points { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; max-width: 560px; align-self: center; width: 100%; }
.split-points li { padding-left: 26px; position: relative; color: var(--ink); }
.split-points li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 18px; height: 18px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.split-form { display: grid; place-items: center; padding: 32px 20px; background: var(--panel); }
.split-box { width: 100%; max-width: 380px; }
.split-box h1 { font-size: 26px; }
.btn-lg { padding: 11px 16px; font-size: 15px; }
.demo-card { margin-top: 22px; border: 1px dashed color-mix(in srgb, var(--warn) 45%, transparent); background: var(--warn-bg); border-radius: 12px; padding: 14px 16px; }
.demo-head { display: flex; gap: 8px; align-items: center; }
.demo-kv { grid-template-columns: 90px 1fr; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .split-art { border-right: 0; border-bottom: 1px solid var(--line); padding: 24px 16px; }
  .split-img { max-width: 380px; }
}

/* ---------------- Small bar chart (dashboard / summary) ---------------- */
.bars { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; align-items: end; height: 160px; padding: 6px 0 0; border-bottom: 1px solid var(--line); }
.bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.bar-fill { width: 100%; max-width: 38px; min-height: 2px; background: linear-gradient(180deg, var(--brand-hover), var(--brand)); border-radius: 4px 4px 0 0; }
.bar-label { font-size: 11px; color: var(--muted); }
.meter { height: 8px; background: var(--mute-bg); border-radius: 99px; overflow: hidden; min-width: 80px; }
.meter > span { display: block; height: 100%; background: var(--brand-hover); }

/* ---------------- polish ---------------- */
.shell { background: linear-gradient(to right, var(--panel) 248px, var(--bg) 248px); }
td.actions-cell .actions { flex-wrap: nowrap; justify-content: flex-end; }
@media (max-width: 900px) { .shell { background: var(--bg); } td.actions-cell .actions { flex-wrap: wrap; } }

/* ---------------- phone: collapsible menu ---------------- */
.side-menu { display: flex; flex-direction: column; flex: 1 1 auto; }
.menu-toggle { display: none; }
@media (max-width: 900px) {
  .side { padding: 12px 14px; }
  .side .brand { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
  .menu-toggle { display: inline-flex; position: absolute; right: 14px; top: 16px; padding: 6px 12px; border-radius: 8px;
    border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); font: 600 13px var(--font); cursor: pointer; }
  .side { position: relative; }
  .side-menu { display: none; margin-top: 12px; }
  .side.open .side-menu { display: flex; }
  .topbar .user-box { width: 100%; }
}

/* Invoice documents (A4 / POS) on the EFRIS invoice page */
.doc-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.doc-preview { padding: 0; overflow: hidden; }
.doc-preview iframe { display: block; width: 100%; height: 900px; border: 0; background: #e9ecef; }
@media (max-width: 700px) { .doc-preview iframe { height: 640px; } }
/* Rows with document actions (Preview / A4 / POS / Print): chips wrap onto two lines instead of
   pushing the table wider than the page. */
td.actions-cell { white-space: normal; min-width: 236px; width: 236px; }
td.actions-cell > .actions { display: flex; flex-wrap: wrap; justify-content: flex-end; }
td.actions-cell.narrow { min-width: 176px; width: 176px; }
@media (max-width: 1500px) { .wide-only { display: none; } }
/* Superadmin inside a company: always say which company is being changed. */
.acting-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
  margin: -6px 0 14px; padding: 8px 12px; border-radius: 8px; font-size: 13px;
  background: var(--warn-bg); color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); }
