/* Hideway Reseller: flat graphite, one accent, hairline borders. No gradients, glows or pill shapes. */
:root {
  --bg: #0f0f11;
  --panel: #161619;
  --panel-2: #1c1c20;
  --line: #29292f;
  --line-2: #3a3a42;
  --text: #e9e9ec;
  --muted: #8c8c96;
  --accent: #8b7df2;
  --accent-2: #7567e6;
  --ok: #5bd48a;
  --warn: #e8b657;
  --bad: #ef7b7b;
  --radius: 10px;
  --mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 "Segoe UI Variable Text", "Segoe UI", system-ui, Roboto, sans-serif; -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
body { min-height: 100vh; }
.boot { text-align: center; margin-top: 30vh; color: var(--muted); }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.25; font-weight: 600; }
h2 { font-size: 1.05rem; }
h3 { font-size: .95rem; color: var(--muted); }
a { color: var(--accent); }
.muted { color: var(--muted); }

/* sign in */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login { width: min(360px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 26px 22px; }
.login img { width: 34px; height: 34px; display: block; margin: 0 0 18px; border-radius: 7px; }
.login h1 { font-size: 1.25rem; }
.login p.sub { color: var(--muted); margin: 0 0 20px; font-size: .92rem; }
.login label { margin-top: 12px; }
.login form > p:last-child { margin: 18px 0 0; }

/* top bar */
.top { display: flex; align-items: center; gap: 14px; padding: 0 22px; height: 52px; border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 5; }
.top img { width: 24px; height: 24px; border-radius: 5px; }
.top .brand { font-weight: 600; font-size: .98rem; }
.top .spacer { flex: 1; }
.top .who { color: var(--muted); font-size: .88rem; }
.pill { color: var(--text); font-weight: 600; white-space: nowrap; padding-right: 14px; border-right: 1px solid var(--line); }
main { max-width: 960px; margin: 0 auto; padding: 26px 22px 64px; }

/* navigation: plain tabs with an underline */
.nav { display: flex; gap: 22px; margin-bottom: 22px; border-bottom: 1px solid var(--line); max-width: 100%; }
.nav-i { background: transparent; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 9px 2px 10px; cursor: pointer; color: var(--muted); font-weight: 500; white-space: nowrap; }
.nav-i:hover { color: var(--text); }
.nav-i.on { color: var(--text); border-bottom-color: var(--accent); }
.subnav { display: flex; gap: 4px; margin: -8px 0 20px; flex-wrap: wrap; }
.sub-i { background: transparent; border: 0; border-radius: 6px; padding: 5px 11px; cursor: pointer; color: var(--muted); font-size: .88rem; }
.sub-i:hover { color: var(--text); background: var(--panel); }
.sub-i.on { background: var(--panel-2); color: var(--text); }

/* cards */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 16px; }
details.card summary { font-weight: 500; color: var(--text); }
.grid { display: grid; gap: 14px; }
label { display: block; font-size: .82rem; color: var(--muted); margin-bottom: 5px; }
input, select, textarea { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 8px 11px; }
textarea { resize: vertical; min-height: 90px; line-height: 1.45; }
input:hover, select:hover, textarea:hover { border-color: var(--line-2); }
input:focus, select:focus, textarea:focus, .btn:focus-visible, .tile:focus-visible, .step:focus-visible, .nav-i:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.row { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.row > * { flex: 1 1 140px; }
.row > .fit { flex: 0 0 auto; }

/* balance: a plain line, not a banner */
.hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding: 0 0 18px; margin-bottom: 20px; }
.hero-l { color: var(--muted); font-size: .85rem; }
.hero-n { font-size: 2rem; font-weight: 600; line-height: 1.15; }

/* plans */
.step-title { font-weight: 600; margin: 2px 0 10px; font-size: .92rem; }
.tiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 22px; }
.tile { display: flex; flex-direction: column; gap: 2px; text-align: left; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 14px 15px; cursor: pointer; transition: border-color .12s, background .12s; }
.tile:hover { border-color: var(--line-2); }
.tile.on { border-color: var(--accent); background: #17162a; }
.tile-name { font-weight: 500; }
.tile-price { font-size: 1.5rem; font-weight: 600; color: var(--text); }
.tile-sub { font-size: .82rem; color: var(--muted); }
.was { font-size: .78rem; color: var(--muted); }
.qty-row { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.qty-row input.qty { width: 72px; text-align: center; font-size: 1.1rem; font-weight: 600; padding: 7px; -moz-appearance: textfield; }
.qty-row input.qty::-webkit-outer-spin-button, .qty-row input.qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.step { width: 38px; height: 38px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); cursor: pointer; font-size: 1.2rem; line-height: 1; }
.step:hover { border-color: var(--line-2); background: var(--panel-2); }
.note-box { margin-bottom: 18px; }
.note-box summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
.note-box summary:hover { color: var(--text); }
.note-box input { margin-top: 8px; }
.checkout { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 18px; }
.total-l { color: var(--muted); font-size: .82rem; }
.total { font-size: 1.7rem; font-weight: 600; }
.keys-out { border-color: #2b5a3d; }

/* buttons */
.btn { background: var(--accent-2); border: 1px solid transparent; border-radius: 6px; padding: 8px 16px; cursor: pointer; color: #fff; font-weight: 500; transition: background .12s; }
.btn:hover { background: var(--accent); }
.btn:disabled { opacity: .45; cursor: not-allowed; background: var(--accent-2); }
.btn.big { padding: 10px 22px; }
.btn.alt { background: #b9701f; }
.btn.alt:hover { background: #cc7f27; }
.btn.ghost { background: transparent; border-color: var(--line-2); color: var(--text); }
.btn.ghost:hover { background: var(--panel-2); }
.btn.small { padding: 4px 10px; font-size: .84rem; }
.btn.danger { background: #a83a32; }
.btn.danger:hover { background: #bd463d; }

.msg { border-radius: 6px; padding: 10px 13px; margin: 0 0 16px; font-size: .92rem; border: 1px solid; }
.msg.err { background: #2a1517; border-color: #6b2c31; color: #f3c3c6; }
.msg.ok { background: #14261b; border-color: #2b5a3d; color: #bfe9cf; }
.msg.warn { background: #28210f; border-color: #695316; color: #efd9a0; }
.login .msg { margin: 12px 0 0; }

/* tables */
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; }
tbody tr:hover { background: #18181c; }
.table-wrap { overflow-x: auto; }
.mono { font-family: var(--mono); font-size: .86rem; }
.keybox { background: var(--bg); border: 1px solid var(--line-2); border-radius: 6px; padding: 10px 13px; font-family: var(--mono); font-size: .92rem; word-break: break-all; user-select: all; }
.keybox div { padding: 2px 0; }
.badge { display: inline-block; border-radius: 4px; padding: 0 7px; font-size: .76rem; border: 1px solid var(--line-2); color: var(--muted); }
.badge.done, .badge.paid, .badge.ok { color: var(--ok); border-color: #2b5a3d; }
.badge.failed, .badge.rejected, .badge.refunded, .badge.expired { color: var(--muted); }
.badge.unknown, .badge.pending, .badge.reserved, .badge.created { color: var(--warn); border-color: #695316; }
.badge.flag { color: var(--bad); border-color: #6b2c31; }
.badge.open { color: var(--warn); border-color: #695316; }
.badge.answered { color: var(--ok); border-color: #2b5a3d; }
.top a { color: var(--muted); text-decoration: none; font-size: .9rem; }
.top a:hover { color: var(--text); }
.result { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.result th { width: 190px; }
.ticket { border-top: 1px solid var(--line); padding: 12px 0; }
.ticket:first-of-type { border-top: 0; }
.reply { background: var(--bg); border: 1px solid var(--line-2); border-radius: 6px; padding: 10px 13px; white-space: pre-wrap; }
pre.bundle { background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; max-height: 320px; overflow: auto; font-family: var(--mono); font-size: .8rem; white-space: pre; }
.level-warn { border-left: 3px solid var(--warn); } .level-bad { border-left: 3px solid var(--bad); }

/* balance packs */
.packs { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.pack { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 18px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; transition: border-color .12s; }
.pack:hover { border-color: var(--line-2); }
.pack .btn { margin-top: auto; width: 100%; }
.pack .muted { margin-bottom: 14px; font-size: .86rem; }
.pack.best { border-color: var(--accent); background: #17162a; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; min-height: 22px; margin-bottom: 4px; }
.chip { color: var(--ok); border: 1px solid #2b5a3d; border-radius: 4px; padding: 0 7px; font-size: .76rem; font-weight: 500; }
.chip.hot { background: var(--accent-2); border-color: transparent; color: #fff; }
.pack-credits { font-size: 1.7rem; font-weight: 600; color: var(--text); }
.warn-text { color: var(--warn); }
.pos { color: var(--ok); } .neg { color: var(--bad); }
details summary { cursor: pointer; color: var(--accent); }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.temp { font-family: var(--mono); font-size: 1rem; background: var(--bg); border: 1px solid #695316; padding: 6px 10px; border-radius: 6px; display: inline-block; margin: 4px 0; user-select: all; }
.actions input.amt { width: 120px; }
.actions input.why { width: 150px; }

@media (max-width: 600px) {
  main { padding: 16px 14px 50px; }
  .top { padding: 0 14px; }
  .top .who { display: none; }
  .hero-n { font-size: 1.7rem; }
  .nav { gap: 16px; overflow-x: auto; overflow-y: hidden; }
  .checkout .btn { width: 100%; }
}
