@font-face { font-family: "Manrope"; src: url("/manrope-latin-wght-normal.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Unbounded"; src: url("/unbounded-latin-wght-normal.woff2") format("woff2"); font-weight: 200 900; font-display: swap; }

/* Night (default) */
:root, [data-theme="dark"] {
  --bg: #121430;
  --rail: #0E1028;
  --surface: #1A1D42;
  --surface-2: #22265255;
  --raise: #232858;
  --line: #2E3368;
  --line-strong: #40468A;
  --text: #ECEEFF;
  --text-2: #A3A8D4;
  --text-3: #7479AC;
  --star: #FFC53D;
  --on-star: #241900;
  --link: #8CC8FF;
  --pending: #FFC53D;   --pending-bg: #FFC53D1F;
  --processing: #6CB8FF; --processing-bg: #6CB8FF1F;
  --completed: #4FD08F;  --completed-bg: #4FD08F1F;
  --rejected: #FF7A85;   --rejected-bg: #FF7A851F;
  --refunded: #C19BFF;   --refunded-bg: #C19BFF1F;
  --shadow: 0 18px 50px #00000066;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70;   /* G2A, GAMIVO, Telegram — validated on this surface */
  --grid: #2E336899;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #EEF0F7;
  --rail: #14163A;
  --surface: #FFFFFF;
  --surface-2: #F5F6FB;
  --raise: #F0F2FA;
  --line: #DCDFEC;
  --line-strong: #C3C7DC;
  --text: #171A3A;
  --text-2: #4F547E;
  --text-3: #7D82A6;
  --star: #E9A100;
  --on-star: #1D1400;
  --link: #1F6FC5;
  --pending: #A86A00;   --pending-bg: #FFC53D33;
  --processing: #1F6FC5; --processing-bg: #6CB8FF2E;
  --completed: #137A48;  --completed-bg: #4FD08F2E;
  --rejected: #C2283A;   --rejected-bg: #FF7A852B;
  --refunded: #6B3FC0;   --refunded-bg: #C19BFF33;
  --shadow: 0 18px 50px #171A3A26;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a;
  --grid: #DCDFEC;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 500 14.5px/1.5 "Manrope", system-ui, sans-serif; font-feature-settings: "tnum" 1; }
a { color: var(--link); text-underline-offset: 3px; }
h1, h2, h3 { letter-spacing: -0.015em; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 9px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: 650 13.5px/1 "Manrope", sans-serif; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--raise); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--star); border-color: var(--star); color: var(--on-star); }
.btn-primary:hover { background: var(--star); filter: brightness(1.08); }
.btn-danger { color: var(--rejected); border-color: color-mix(in srgb, var(--rejected) 45%, transparent); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--raise); color: var(--text); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn-block { width: 100%; height: 42px; }
input, select, textarea { font: 500 14px "Manrope", sans-serif; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 9px; padding: 0 11px; height: 36px; min-width: 0; }
textarea { height: auto; padding: 9px 11px; resize: vertical; width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--link); box-shadow: 0 0 0 3px color-mix(in srgb, var(--link) 25%, transparent); }
label { font-weight: 650; font-size: 12.5px; color: var(--text-2); }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: radial-gradient(70% 50% at 50% 0%, #2A2F7A55, transparent), var(--bg); }
.login-card { width: 100%; max-width: 360px; display: grid; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px; box-shadow: var(--shadow); }
.login-card h1 { margin: 10px 0 8px; font-size: 22px; }
.login-card input { height: 42px; margin-bottom: 6px; }
.login-brand { display: flex; align-items: center; gap: 10px; font: 600 16px "Unbounded", sans-serif; }
.login-brand svg, .rail-brand svg { width: 24px; height: 24px; fill: var(--star); }
.form-error { color: var(--rejected); margin: 0; font-weight: 600; }


/* ---------- modern login ---------- */
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(80% 60% at 50% 0%, #26347f66, transparent),
    radial-gradient(50% 45% at 0% 100%, #17215f55, transparent),
    var(--bg);
}

.login-card-modern {
  width: min(100%, 430px);
  gap: 0;
  padding: 28px;
  border-radius: 16px;
  background: linear-gradient(180deg, #101936 0%, #0d1630 100%);
  border: 1px solid #273761;
  box-shadow: 0 24px 70px #00000055;
}

.login-brand-modern {
  display: grid;
  justify-items: center;
  gap: 3px;
  margin-bottom: 26px;
}

.login-brand-name {
  font: 800 28px "Unbounded", sans-serif;
  letter-spacing: -1.5px;
}

.login-brand-name b {
  color: #f4f5ff;
}

.login-brand-name strong {
  color: #1688ff;
}

.login-brand-subtitle {
  color: #aeb7d8;
  font-size: 13px;
  font-weight: 600;
}

.login-heading {
  text-align: center;
  margin-bottom: 20px;
}

.login-heading h1 {
  margin: 0 0 4px;
  font-size: 21px;
}

.login-heading p {
  margin: 0;
  color: #9ba6ca;
  font-size: 12px;
}

.login-field {
  display: block;
  position: relative;
  margin-bottom: 10px;
}

.login-field input {
  width: 100%;
  height: 46px;
  margin: 0;
  box-sizing: border-box;
  padding: 0 14px;
  border-radius: 9px;
  background: #0c1631;
  border: 1px solid #26365d;
  color: #fff;
}

.login-field input::placeholder {
  color: #8490b5;
}

.login-field input:focus {
  border-color: #1688ff;
  box-shadow: 0 0 0 3px #1688ff22;
}

.password-field input {
  padding-right: 46px;
}

.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: #8c98bc;
  cursor: pointer;
  border-radius: 7px;
}

.password-toggle:hover {
  color: #fff;
  background: #ffffff0d;
}

.account-selector {
  margin: 13px 0 16px;
}

.account-selector-title {
  margin-bottom: 9px;
  color: #b5bedc;
  font-size: 12px;
  font-weight: 600;
}

.account-option {
  width: 100%;
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 10px 13px;
  text-align: left;
  border-radius: 10px;
  border: 1px solid #39466c;
  background: #151f3d;
  color: #fff;
  cursor: pointer;
}

.account-option:hover,
.account-option.is-selected {
  border-color: #1688ff;
  background: linear-gradient(180deg, #172957, #142243);
  box-shadow: 0 0 0 1px #1688ff44, 0 8px 25px #1688ff18;
}

.account-option-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  border-radius: 8px;
  background: #252f50;
  color: #fff;
  font-size: 22px;
}

.account-option b,
.account-option small {
  display: block;
}

.account-option b {
  font-size: 13px;
}

.account-option small {
  margin-top: 3px;
  color: #a9b3d2;
  font-size: 11px;
}

.login-submit {
  height: 46px;
  border-radius: 9px;
  font-weight: 700;
}

.login-submit span {
  margin-left: 5px;
}

.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;
}

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.rail { background: var(--rail); color: #D4D7F5; display: flex; flex-direction: column; padding: 18px 12px; position: sticky; top: 0; height: 100vh; }
.rail-brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font: 600 15px "Unbounded", sans-serif; padding: 4px 10px 18px; }
.rail nav { display: grid; gap: 1px; overflow-y: auto; min-height: 0; flex: 1; margin-right: -6px; padding-right: 6px; }
.rail nav a { font-size: 13.5px; }
.rail nav a { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border-radius: 8px; color: #B9BDE6; text-decoration: none; font-weight: 600; }
.rail nav a:hover { background: #FFFFFF0F; color: #fff; }
.rail nav a.is-active { background: #FFFFFF17; color: #fff; box-shadow: inset 3px 0 0 #FFC53D; }
.rail-group { margin: 12px 10px 3px; font-size: 12px; color: #7E83B8; font-weight: 600; }
.count { min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; background: #FFC53D; color: #241900; font-size: 11.5px; font-weight: 800; display: inline-grid; place-items: center; }
.rail-foot { margin-top: auto; border-top: 1px solid #FFFFFF14; padding: 12px 10px 0; }
.whoami { margin: 0 0 8px; display: grid; }
.whoami b { color: #fff; }
.whoami span { font-size: 12.5px; color: #8D92C5; text-transform: capitalize; }
.rail-actions { display: flex; gap: 6px; }
.rail .btn-ghost { color: #B9BDE6; }
.rail .btn-ghost:hover { background: #FFFFFF14; color: #fff; }

.main { min-width: 0; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 18px 28px 6px; }
.topbar h1 { margin: 0; font-size: 22px; font-weight: 750; }
.topbar-flags { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.flag { font-size: 12.5px; font-weight: 700; padding: 5px 10px; border-radius: 999px; }
.flag-stop { background: var(--rejected-bg); color: var(--rejected); }
.flag-shadow { background: var(--processing-bg); color: var(--processing); }
.flag-paused { background: var(--pending-bg); color: var(--pending); }
.menu-btn { display: none; }
#page { padding: 14px 28px 48px; outline: none; }

/* ---------- blocks ---------- */
.section { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 18px; }
.section-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.section-head h2 { margin: 0; font-size: 15px; font-weight: 750; margin-right: auto; }
.section-body { padding: 16px; }
.muted { color: var(--text-2); }
.nowrap { white-space: nowrap; }
[tabindex="-1"]:focus { outline: none; }
.faint { color: var(--text-3); }
.empty { padding: 28px 16px; text-align: center; color: var(--text-2); }

/* KPI strip: one bordered strip with dividers, not a row of floating cards */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 18px; overflow: hidden; }
.kpi { padding: 16px 18px; border-right: 1px solid var(--line); }
.kpi:last-child { border-right: 0; }
.kpi p { margin: 0; color: var(--text-2); font-weight: 600; font-size: 13px; }
.kpi strong { display: block; font: 650 26px/1.2 "Unbounded", sans-serif; letter-spacing: -0.03em; margin-top: 6px; }
.kpi small { color: var(--text-3); font-size: 12.5px; }
.kpi-star strong { color: var(--star); }

.grid-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; align-items: start; }

.alerts { list-style: none; margin: 0; padding: 0; }
.alerts li { padding: 11px 16px; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: baseline; }
.alerts li:last-child { border-bottom: 0; }
.alerts li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; transform: translateY(-1px); background: var(--processing); }
.alerts li.lv-warn::before { background: var(--pending); }
.alerts li.lv-error::before { background: var(--rejected); }

.integ { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0; }
.integ > div { padding: 14px 16px; border-right: 1px solid var(--line); }
.integ > div:last-child { border-right: 0; }
.integ h3 { margin: 0 0 4px; font-size: 14px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--text-3); }
.dot-ok { background: var(--completed); } .dot-warn { background: var(--pending); } .dot-bad { background: var(--rejected); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12.5px; font-weight: 650; color: var(--text-2); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: var(--raise); }
td.num, th.num { text-align: right; }
.mono { font-family: "Unbounded", sans-serif; font-weight: 400; font-size: 12px; letter-spacing: .03em; }
.user { font-weight: 700; }
.stars { font-weight: 750; }
.stars::after { content: " ★"; color: var(--star); }

.pill { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 750; text-transform: capitalize; white-space: nowrap; }
.pill-pending { background: var(--pending-bg); color: var(--pending); }
.pill-processing { background: var(--processing-bg); color: var(--processing); }
.pill-completed { background: var(--completed-bg); color: var(--completed); }
.pill-rejected { background: var(--rejected-bg); color: var(--rejected); }
.pill-refunded { background: var(--refunded-bg); color: var(--refunded); }
.pill-off { background: var(--raise); color: var(--text-3); }

/* Order queue status tabs */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tab { height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid transparent; background: none; color: var(--text-2); font: 650 13px "Manrope", sans-serif; cursor: pointer; }
.tab:hover { background: var(--raise); }
.tab.is-active { background: var(--raise); border-color: var(--line-strong); color: var(--text); }
.tab b { margin-left: 4px; font-weight: 800; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters input[type=search] { width: 260px; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; align-items: end; }
.form-grid > div { display: grid; gap: 5px; }
.form-grid input, .form-grid select { width: 100%; }

/* Codes: stacked status bar per batch */
.bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--raise); min-width: 140px; }
.bar span { display: block; height: 100%; }
.b-unused { background: var(--text-3); }
.b-reserved { background: var(--pending); }
.b-delivered { background: var(--processing); }
.b-redeemed { background: var(--completed); }
.b-dead { background: var(--rejected); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.counts { font-size: 12.5px; color: var(--text-2); margin-top: 5px; white-space: nowrap; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* Switch rows */
.switch-row { display: flex; gap: 16px; align-items: center; padding: 16px; border-bottom: 1px solid var(--line); }
.switch-row:last-child { border-bottom: 0; }
.switch-row div { flex: 1; }
.switch-row h3 { margin: 0 0 3px; font-size: 14.5px; }
.switch-row p { margin: 0; color: var(--text-2); font-size: 13.5px; }
.toggle { position: relative; width: 46px; height: 26px; border-radius: 13px; border: 0; background: var(--line-strong); cursor: pointer; flex: none; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; }
.toggle[aria-checked="true"] { background: var(--completed); }
.toggle[aria-checked="true"]::after { transform: translateX(20px); }
.toggle.is-danger[aria-checked="true"] { background: var(--rejected); }
.toggle:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- drawer ---------- */
.scrim { position: fixed; inset: 0; background: #05061599; z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 100vw); background: var(--surface); border-left: 1px solid var(--line); z-index: 50; display: flex; flex-direction: column; box-shadow: var(--shadow); animation: slide .18s ease-out; }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }
.drawer-head { display: flex; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 17px; margin-right: auto; }
.drawer-body { padding: 18px; overflow-y: auto; }
.big-user { display: flex; align-items: center; gap: 10px; padding: 14px; background: var(--raise); border-radius: 12px; margin-bottom: 14px; }
.big-user strong { font-size: 19px; flex: 1; word-break: break-all; }
.facts { display: grid; grid-template-columns: 130px 1fr; gap: 7px 12px; margin: 0 0 16px; }
.facts dt { color: var(--text-2); font-size: 13px; }
.facts dd { margin: 0; font-weight: 600; word-break: break-word; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.actions .btn-primary { flex: 1; min-width: 180px; height: 40px; }
.timeline { list-style: none; margin: 0 0 14px; padding: 0; }
.timeline li { padding: 0 0 12px 18px; position: relative; font-size: 13.5px; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.timeline li::after { content: ""; position: absolute; left: 3.5px; top: 16px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline .note { background: var(--raise); border-radius: 8px; padding: 7px 10px; margin-top: 4px; white-space: pre-wrap; }
.drawer h3 { font-size: 13.5px; margin: 0 0 10px; color: var(--text-2); }

/* ---------- dialog & toasts ---------- */
dialog { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); padding: 22px; width: min(440px, calc(100vw - 32px)); box-shadow: var(--shadow); }
dialog::backdrop { background: #05061599; }
dialog h2 { margin: 0 0 6px; font-size: 18px; }
dialog p { margin: 0 0 14px; color: var(--text-2); }
dialog label { display: block; margin-bottom: 5px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 100; width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--text); color: var(--bg); padding: 11px 14px; border-radius: 10px; font-weight: 650; box-shadow: var(--shadow); animation: slide .18s; }
.toast-error { background: var(--rejected); color: #fff; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) { .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .rail { position: fixed; z-index: 60; width: 250px; left: 0; transform: translateX(-100%); transition: transform .2s; }
  .rail.is-open { transform: none; box-shadow: var(--shadow); }
  .menu-btn { display: inline-flex; }
  .topbar, #page { padding-left: 16px; padding-right: 16px; }
  .filters input[type=search] { width: 100%; }
  .hide-sm { display: none; }
  .flag-shadow { display: none; }
  .topbar h1 { font-size: 19px; }
  .kpi { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- v0.2 components ---------- */
.mkt { display: inline-block; font-size: 11.5px; font-weight: 800; padding: 2px 7px; border-radius: 5px; border: 1px solid var(--line-strong); color: var(--text); white-space: nowrap; }
.mkt::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 2px; margin-right: 5px; vertical-align: 0; background: var(--text-3); }
.mkt-g2a::before { background: var(--s1); } .mkt-gamivo::before { background: var(--s2); } .mkt-telegram::before { background: var(--s3); } .mkt-fazercards::before { background: var(--star); }
.bad { color: var(--rejected); } .warn { color: var(--pending); }
.section-body.flush { padding: 0 0 14px; }
.setup { border: 1px dashed var(--line-strong); border-radius: 14px; padding: 18px 20px; margin-bottom: 18px; background: var(--surface); }
.setup h3 { margin: 0 0 4px; font-size: 16px; } .setup p { margin: 0 0 12px; color: var(--text-2); max-width: 70ch; }
.conn { display: block; padding: 14px 16px; border-right: 1px solid var(--line); color: var(--text); text-decoration: none; }
.conn:hover { background: var(--raise); }
.conn h3 { margin: 0 0 4px; font-size: 14px; } .conn p { margin: 0; }
.integ > .conn:last-child { border-right: 0; }
.conn-big p { margin-top: 4px; }
.chart { margin: 0; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--grid); stroke-width: 1; }
.chart text { fill: var(--text-2); font: 500 11px "Manrope", sans-serif; }
.chart .hit:hover { fill: color-mix(in srgb, var(--text) 6%, transparent); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.chart .legend { margin-top: 8px; }
.hbars { display: grid; gap: 8px; }
.hbar { display: grid; grid-template-columns: minmax(120px, 38%) 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.hbar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.hbar-track { height: 10px; background: var(--raise); border-radius: 0 4px 4px 0; }
.hbar-fill { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--s1); }
.hbar-fill.neg { background: var(--rejected); }
.hbar-value { font-weight: 700; white-space: nowrap; } .hbar-value small { color: var(--text-3); font-weight: 500; }
.bulkbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-top: 0; }
.bulkbar select { height: 30px; font-size: 12.5px; }
.pager { display: flex; gap: 10px; align-items: center; justify-content: center; }
.prod { display: flex; gap: 10px; align-items: center; min-width: 220px; }
.prod img, .prod .noimg { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; background: var(--raise); flex: none; }
.offer-chip { white-space: nowrap; }
.check { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 600; color: var(--text-2); }
.notifs { list-style: none; margin: 0; padding: 0; }
.notifs li { display: flex; gap: 12px; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); border-left: 3px solid var(--processing); }
.notifs li.lv-warn { border-left-color: var(--pending); } .notifs li.lv-error { border-left-color: var(--rejected); }
.notifs li.is-read { opacity: .62; }
.notifs p { margin: 3px 0; color: var(--text-2); }
.pref { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0; }
.checks { list-style: none; margin: 0; }
.checks li { padding: 4px 0; } .checks li.ok span { color: var(--completed); font-weight: 800; } .checks li.no span { color: var(--rejected); font-weight: 800; }
.flag { text-decoration: none; }
.flag-live { background: var(--completed-bg); color: var(--completed); }
.stack { display: grid; gap: 6px; margin-bottom: 14px; }
.stack input, .stack select, .stack textarea { width: 100%; }
.stack .check input, .check input[type=checkbox] { width: auto; height: auto; margin: 0; flex: none; }
.stack .check { justify-content: flex-start; }
.stack label { margin-top: 6px; }
.nowrap-row { flex-wrap: nowrap; }
.nowrap-row select { flex: 1; min-width: 0; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.two > div { display: grid; gap: 5px; }
.picklist { display: grid; gap: 4px; max-height: 240px; overflow-y: auto; }
.pick { text-align: left; background: var(--raise); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; color: var(--text); font: 600 13px "Manrope", sans-serif; cursor: pointer; }
.pick:hover { border-color: var(--link); }
.revealed { background: var(--raise); border-radius: 8px; padding: 10px; overflow-x: auto; font-size: 12.5px; white-space: pre-wrap; word-break: break-all; }
.plain { list-style: none; padding: 0; margin: 0 0 14px; } .plain li { padding: 5px 0; border-bottom: 1px solid var(--line); }
.prose p { margin: 0 0 10px; max-width: 75ch; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; background: var(--raise); padding: 1px 5px; border-radius: 4px; word-break: break-all; }
.drawer-img { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; margin-bottom: 12px; }
.numval { font-size: 18px; min-width: 50px; text-align: right; }
.loading { padding: 20px 0; }
.pill-delivered, .pill-active, .pill-ok, .pill-verified { background: var(--completed-bg); color: var(--completed); }
.pill-failed, .pill-error, .pill-expired, .pill-cancelled, .pill-unknown { background: var(--rejected-bg); color: var(--rejected); }
.pill-reserved, .pill-paid, .pill-requested, .pill-partial, .pill-inactive { background: var(--pending-bg); color: var(--pending); }
.pill-fulfilling, .pill-processing, .pill-created { background: var(--processing-bg); color: var(--processing); }
.pill-none, .pill-manual, .pill-skipped, .pill-banned { background: var(--raise); color: var(--text-3); }
.pill-banned { color: var(--rejected); }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; } .conn { border-right: 0; border-bottom: 1px solid var(--line); } .hbar { grid-template-columns: 1fr; } }

/* Small screens: KPI values must never collide; KPI strips nested in a section sit flush. */
.section .kpis { margin: 0; border: 0; border-radius: 0; border-top: 1px solid var(--line); }
@media (max-width: 560px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi { padding: 12px 14px; min-width: 0; }
  .kpi strong { font-size: 19px; overflow-wrap: anywhere; }
}
code, .mono { overflow-wrap: anywhere; }
.section { min-width: 0; max-width: 100%; }
.grid-2 > *, .grid-3 > *, #page > * { min-width: 0; }

/* ---- G2A catalogue ---- */
.g2a-safety { display: grid; gap: 10px; }
.g2a-live { font-size: 20px; letter-spacing: .02em; padding: 8px 14px; border-radius: 10px; justify-self: start; }
.g2a-live.is-off { background: var(--completed-bg); color: var(--completed); }
.g2a-live.is-on { background: var(--rejected-bg); color: var(--rejected); }
.g2a-switches { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; }
.g2a-sw { font-weight: 750; font-size: 11.5px; padding: 2px 7px; border-radius: 999px; margin-left: 4px; }
.g2a-sw.is-off { background: var(--raise); color: var(--text-3); }
.g2a-sw.is-on { background: var(--rejected-bg); color: var(--rejected); }
.g2a-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.g2a-table table { font-size: 12.5px; }
.g2a-table td, .g2a-table th { white-space: nowrap; }
.g2a-table tr.g2a-safe td:first-child { box-shadow: inset 3px 0 0 var(--completed); }
.g2a-verdict { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.g2a-verdict.ok { border-color: var(--completed); background: var(--completed-bg); }
.g2a-verdict.no { border-color: var(--line-strong); }
.g2a-verdict ul { margin: 6px 0 0 18px; padding: 0; }
.g2a-sw.is-ok { background: var(--completed-bg); color: var(--completed); }
.g2a-table .table-wrap { overflow-x: auto; }
.g2a-table td.g2a-name { white-space: normal; min-width: 220px; max-width: 320px; }

/* K4GDASH */ .mkt-k4g::before { background: #E11D2E; }
/* K4GCC: K4G page tabs, gift card offers, Telegram offers */
.k4cc-top { margin-bottom: 14px; }
.k4cc-top .tab { display: inline-flex; align-items: center; text-decoration: none; }
.k4cc-rule { margin: 0 0 14px; line-height: 1.5; }
.k4cc-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.k4cc-sp { flex: 1; }
.k4cc-l { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--text-2); }
.k4cc-n { width: 92px; }
.k4cc-pr { display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.k4cc-ok { color: var(--completed); font-weight: 700; }
.k4cc-cb { width: auto; height: auto; }
td.num { white-space: nowrap; }
