/* CritForge AFK - same palette as critforge.de (styles.css :root). */

:root {
  --bg: #060708;
  --panel: #141416;
  --panel-2: #1c1c1f;
  --panel-3: #26262a;
  --text: #ffffff;
  --muted: #b8c7cd;
  --dim: #7f8b90;
  --violet: #b78cff;
  --violet-2: #7a57d1;
  --violet-muted: #8f78c7;
  --glow: rgba(183, 140, 255, .22);
  --cyan: #50d8c8;
  --amber: #d79a42;
  --red: #d45a55;
  --green: #5fd38d;
  --line: rgba(255, 255, 255, .1);
  --line-2: rgba(255, 255, 255, .17);
  --radius: 12px;
  --max: 1240px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(122, 87, 209, .16), transparent 70%),
    radial-gradient(700px 380px at -10% 10%, rgba(80, 216, 200, .06), transparent 70%),
    var(--bg);
  font: 15px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------------ top bar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 62px;
  padding: 0 max(16px, calc((100vw - var(--max)) / 2 + 20px));
  background: rgba(5, 8, 11, .92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand { display: flex; align-items: center; gap: 12px; font-weight: 900; font-size: 17px; letter-spacing: .5px; }
.brand img { width: 26px; height: 36px; object-fit: contain; filter: drop-shadow(0 0 12px var(--glow)); }
.brand b { color: var(--violet); }
.topbar-spacer { flex: 1; }
.userbox { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.userbox strong { color: var(--text); }

/* ------------------------------------------------------------------ buttons and inputs */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: var(--panel-3);
  color: var(--text);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .3px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, transform .1s ease;
}
.btn:hover { background: #303036; border-color: rgba(255, 255, 255, .26); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn.primary { color: #0b0b0d; border-color: transparent; background: linear-gradient(135deg, #cdb0ff, var(--violet-muted)); box-shadow: 0 6px 22px rgba(143, 120, 199, .3); }
.btn.primary:hover { background: linear-gradient(135deg, #d9c2ff, #9d87d4); }
.btn.go { color: #06110d; border-color: transparent; background: linear-gradient(135deg, #7fe6b0, #3fae78); }
.btn.go:hover { background: linear-gradient(135deg, #95eec0, #4cbd86); }
.btn.danger { color: #ffd9d7; border-color: rgba(212, 90, 85, .45); background: rgba(212, 90, 85, .14); }
.btn.danger:hover { background: rgba(212, 90, 85, .26); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.btn.small { min-height: 30px; padding: 0 11px; font-size: 12px; border-radius: 8px; }

.input, .select, .textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: #0d0d0f;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--violet-muted); box-shadow: 0 0 0 3px rgba(143, 120, 199, .2); }
.textarea { min-height: 160px; resize: vertical; font-family: var(--mono); font-size: 13px; line-height: 1.5; }
.select { appearance: none; padding-right: 32px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 17px, calc(100% - 12px) 17px; background-size: 5px 5px; background-repeat: no-repeat; }

.field { display: grid; gap: 6px; }
.field > span { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .8px; }
.field small { color: var(--dim); font-size: 12px; }
.check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 14px; }
.check input { width: 17px; height: 17px; accent-color: var(--violet-muted); }

/* ------------------------------------------------------------------ page */

.page { max-width: var(--max); margin: 0 auto; padding: 28px 20px 80px; }
.boot { color: var(--dim); }

.crest {
  flex: 0 0 auto;
  width: 30px;
  height: 36px;
  background: linear-gradient(135deg, #7f9096, var(--violet-muted));
  clip-path: polygon(50% 0, 92% 16%, 82% 72%, 50% 100%, 18% 72%, 8% 16%);
  box-shadow: 0 0 26px var(--glow);
}

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; }
.page-title { display: flex; align-items: center; gap: 14px; }
.page-title h1 { margin: 0; font-size: 26px; letter-spacing: 1.6px; text-transform: uppercase; color: #d6dde0; }
.page-title p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.panel { background: linear-gradient(180deg, rgba(28, 28, 31, .92), rgba(20, 20, 22, .92)); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-pad { padding: 18px; }
.panel h3 { margin: 0 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }

.tag { font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: 1px; color: var(--violet-muted); }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.mono { font-family: var(--mono); }

/* ------------------------------------------------------------------ login */

.login-wrap { min-height: calc(100vh - 200px); display: grid; place-items: center; }
.login-card { width: min(440px, 100%); padding: 32px 28px; text-align: center; }
.login-card .crest { margin: 0 auto 16px; width: 40px; height: 48px; }
.login-card h1 { margin: 0; font-size: 24px; letter-spacing: 1.6px; text-transform: uppercase; }
.login-card p { margin: 10px 0 22px; color: var(--muted); }
.login-form { display: flex; gap: 10px; }
.login-form .input { flex: 1; }
.form-error { min-height: 20px; margin: 12px 0 0 !important; color: #ff9d98 !important; font-size: 13px; }

/* ------------------------------------------------------------------ status pills */

.pill { display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; background: rgba(255, 255, 255, .06); color: var(--muted); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.online { color: var(--green); background: rgba(95, 211, 141, .12); }
.pill.online::before { box-shadow: 0 0 0 3px rgba(95, 211, 141, .2); animation: pulse 2s ease-in-out infinite; }
.pill.connecting, .pill.reconnecting { color: var(--amber); background: rgba(215, 154, 66, .13); }
.pill.error { color: #ff8a84; background: rgba(212, 90, 85, .14); }
.pill.needs_login { color: #ffbd70; background: rgba(215, 154, 66, .16); }
.pill.stopped { color: var(--dim); }

@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(95, 211, 141, 0); } }

/* ------------------------------------------------------------------ alt grid */

.summary { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.chip { padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); font-size: 13px; color: var(--muted); }
.chip b { color: var(--text); font-size: 15px; margin-right: 4px; }

.alt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }

.alt-card {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
  cursor: pointer;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.alt-card:hover { border-color: rgba(183, 140, 255, .35); transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0, 0, 0, .35); }
.alt-card .head { width: 56px; height: 56px; border-radius: 10px; image-rendering: pixelated; background: var(--panel-3); }
.alt-card.is-online .head { box-shadow: 0 0 0 2px rgba(95, 211, 141, .5); }
.alt-card .name { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 16px; overflow: hidden; }
.alt-card .name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alt-card .server { margin: 2px 0 8px; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alt-card .owner { font-size: 11px; color: var(--dim); }
.alt-card .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.alt-card .detail { margin-top: 8px; font-size: 12px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { padding: 1px 6px; border-radius: 5px; font-size: 10px; font-weight: 900; letter-spacing: .6px; text-transform: uppercase; background: rgba(255, 255, 255, .08); color: var(--muted); }
.badge.offline { background: rgba(215, 154, 66, .14); color: var(--amber); }

.meters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.meter { display: grid; gap: 4px; font-size: 11px; color: var(--dim); }
.meter-bar { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.meter-bar i { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--red); transition: width .4s ease; }
.meter.food .meter-bar i { background: var(--amber); }

.empty { padding: 48px 24px; text-align: center; }
.empty h2 { margin: 0 0 8px; font-size: 20px; }
.empty p { margin: 0 auto 20px; max-width: 520px; color: var(--muted); }

/* ------------------------------------------------------------------ alt detail */

.back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; color: var(--muted); font-weight: 700; font-size: 14px; }
.back:hover { color: var(--text); }

.alt-head { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 18px; margin-bottom: 14px; }
.alt-head .head { width: 72px; height: 72px; border-radius: 12px; image-rendering: pixelated; background: var(--panel-3); }
.alt-head h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0; font-size: 24px; }
.alt-head .sub { margin-top: 4px; color: var(--muted); font-size: 14px; }
.alt-head .reason { margin-top: 6px; font-size: 13px; color: var(--dim); word-break: break-word; }
.alt-head .reason.is-error { color: #ff9d98; }
.alt-head .actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.tabs { display: flex; gap: 4px; width: fit-content; max-width: 100%; overflow-x: auto; padding: 4px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 11px; background: rgba(16, 16, 18, .85); }
.tabs button { min-height: 36px; padding: 0 16px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 900; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; cursor: pointer; white-space: nowrap; }
.tabs button:hover { color: var(--text); }
.tabs button.is-active { color: #0b0b0d; background: linear-gradient(135deg, #c9a8ff, var(--violet-muted)); }

.console-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 14px; }

.console-box { display: flex; flex-direction: column; min-height: 520px; height: calc(100vh - 330px); max-height: 760px; }
.console-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.console-tools .left { display: flex; gap: 6px; }
.console {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  background: #0a0a0c;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.line { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 8px; }
.line time { color: #4f5a5f; user-select: none; }
.line .msg { white-space: pre-wrap; }
.line.k-sys .msg { color: #8fa4ad; }
.line.k-err .msg { color: #ff8a84; }
.line.k-out .msg { color: #c9a8ff; }
.line.k-out .msg::before { content: "> "; color: #6b5a91; }
.line.k-task .msg { color: var(--cyan); }
.line.k-task .msg::before { content: "\25B6  "; font-size: 10px; }
.line.k-bar .msg, .line.k-title .msg { color: #9aa6ab; font-style: italic; }
.console-empty { color: var(--dim); padding: 6px 0; }

.console-input { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: rgba(14, 14, 16, .9); }
.console-input .input { font-family: var(--mono); font-size: 13px; }
.console-input .textarea { min-height: 96px; }
.console-input.multi { flex-direction: column; }
.console-input.multi .row { display: flex; gap: 8px; justify-content: flex-end; }

.mc-b { font-weight: 800; }
.mc-i { font-style: italic; }
.mc-u { text-decoration: underline; }
.mc-s { text-decoration: line-through; }
.mc-u.mc-s { text-decoration: underline line-through; }

.stats { display: grid; gap: 14px; align-content: start; }
.stat-list { display: grid; gap: 9px; margin: 0; }
.stat-list div { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.stat-list dt { color: var(--dim); }
.stat-list dd { margin: 0; text-align: right; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.big-meters { display: grid; gap: 10px; }
.big-meters .meter { font-size: 12px; }
.big-meters .meter-bar { height: 8px; }
.menu-note { padding: 10px 12px; border-radius: 9px; background: rgba(183, 140, 255, .1); border: 1px solid rgba(183, 140, 255, .25); font-size: 13px; }
.menu-note b { display: block; margin-bottom: 6px; }

.help-list { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; font-size: 12.5px; }
.help-list code { font-family: var(--mono); color: var(--violet); white-space: nowrap; }
.help-list span { color: var(--muted); }
details.help { font-size: 13px; }
details.help summary { cursor: pointer; color: var(--muted); font-weight: 700; }
details.help[open] summary { margin-bottom: 10px; }

/* ------------------------------------------------------------------ tasks */

.task-list { display: grid; gap: 10px; }
.task { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; }
.task.is-off { opacity: .55; }
.task .title { font-weight: 800; }
.task .when { margin-top: 2px; font-size: 13px; color: var(--muted); }
.task .times { margin-top: 4px; font-size: 12px; color: var(--dim); }
.task .times .bad { color: #ff9d98; }
.task .times .good { color: var(--green); }
.task .buttons { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.task pre { margin: 8px 0 0; padding: 8px 10px; max-height: 92px; overflow: hidden; border-radius: 8px; background: #0a0a0c; font: 12px/1.45 var(--mono); color: #b9a5e3; white-space: pre-wrap; }

.switch { position: relative; width: 40px; height: 22px; border: 0; border-radius: 999px; background: #3a3a40; cursor: pointer; transition: background .15s ease; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #d3d3d8; transition: transform .15s ease; }
.switch.is-on { background: var(--violet-muted); }
.switch.is-on::after { transform: translateX(18px); background: #fff; }

.editor { display: grid; gap: 14px; padding: 18px; margin-bottom: 14px; border-color: rgba(183, 140, 255, .35); }
.editor-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.editor-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.days { display: flex; gap: 6px; flex-wrap: wrap; }
.days label { display: inline-flex; }
.days input { position: absolute; opacity: 0; pointer-events: none; }
.days span { display: inline-grid; place-items: center; min-width: 42px; height: 32px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: 8px; font-size: 12px; font-weight: 800; color: var(--muted); cursor: pointer; }
.days input:checked + span { color: #0b0b0d; border-color: transparent; background: var(--violet-muted); }
.days input:focus-visible + span { outline: 2px solid var(--violet); }

/* ------------------------------------------------------------------ shared tasks */

.send-now { margin-bottom: 14px; }
.broadcast { display: grid; gap: 14px; }
.textarea.short { min-height: 92px; }
.shared-head { margin: 18px 0 2px; }
.task.is-shared { border-style: dashed; }
.task.is-shared .badge { align-self: start; margin-top: 2px; }

.alt-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.pick { display: inline-flex; cursor: pointer; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick span { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 0 11px; border: 1px solid var(--line-2); border-radius: 8px; font-size: 13px; font-weight: 700; color: var(--muted); }
.pick input:checked + span { color: #0b0b0d; border-color: transparent; background: var(--violet-muted); }
.pick input:focus-visible + span { outline: 2px solid var(--violet); }

.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.dot.online { background: var(--green); }
.dot.connecting, .dot.reconnecting { background: var(--amber); }
.dot.error, .dot.needs_login { background: var(--red); }

.alt-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.chip-sm { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 6px; background: rgba(255, 255, 255, .06); font-size: 12px; color: var(--muted); }
.chip-sm.bad { color: #ff9d98; background: rgba(212, 90, 85, .12); }

/* ------------------------------------------------------------------ edit several */

.bulk-targets { margin-bottom: 14px; }
.bulk-section > :not(legend) { opacity: .5; transition: opacity .15s ease; }
.bulk-section.is-on { border-color: rgba(183, 140, 255, .5); box-shadow: 0 0 0 1px rgba(183, 140, 255, .18) inset; }
.bulk-section.is-on > :not(legend) { opacity: 1; }
.settings legend .apply { font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.bulk-section.is-on legend .apply { color: var(--violet); }

/* ------------------------------------------------------------------ settings */

.settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; align-items: start; }
.settings fieldset { margin: 0; padding: 18px; display: grid; gap: 14px; }
.settings legend { float: left; width: 100%; padding: 0; margin-bottom: 2px; font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.settings legend + * { clear: both; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checks { display: flex; gap: 10px 18px; flex-wrap: wrap; }
.savebar { position: sticky; bottom: 14px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 12px 16px; border: 1px solid var(--line-2); border-radius: 12px; background: rgba(20, 20, 23, .96); box-shadow: 0 12px 30px rgba(0, 0, 0, .45); }
.savebar small { color: var(--muted); }
.danger-zone { border-color: rgba(212, 90, 85, .3); }
.danger-zone .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.danger-zone p { margin: 0; font-size: 13px; color: var(--muted); }

/* ------------------------------------------------------------------ inventory */

.inv-layout { display: grid; gap: 14px; }
.slot-grid { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 6px; }
.slot {
  position: relative;
  min-height: 58px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d0d10;
  font-size: 10.5px;
  line-height: 1.2;
  text-align: left;
  color: var(--muted);
  overflow: hidden;
}
.slot.has { border-color: rgba(183, 140, 255, .28); background: linear-gradient(180deg, #1b1724, #121016); color: var(--text); }
button.slot.has { cursor: pointer; }
button.slot.has:hover { border-color: var(--violet); }
.slot .num { position: absolute; top: 3px; right: 5px; font-size: 9px; color: #545e63; }
.slot .label { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; padding-right: 10px; font-weight: 700; }
.slot .count { position: absolute; bottom: 3px; right: 6px; font-weight: 900; font-size: 12px; color: #fff; }
.slot.is-held { box-shadow: 0 0 0 2px var(--cyan); }
.inv-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.inv-head h3 { margin: 0; }

/* ------------------------------------------------------------------ modal */

.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .62); backdrop-filter: blur(4px); animation: fade .15s ease; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 24px; border: 1px solid var(--line-2); border-radius: 14px; background: #161619; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.modal.wide { width: min(820px, 100%); }
.modal h2 { margin: 0 0 6px; font-size: 20px; }
.modal > p { margin: 0 0 18px; color: var(--muted); }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }

.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { display: grid; gap: 6px; padding: 16px; text-align: left; border: 1px solid var(--line-2); border-radius: 12px; background: var(--panel-2); cursor: pointer; }
.choice:hover { border-color: var(--violet-muted); }
.choice strong { font-size: 15px; }
.choice small { color: var(--muted); font-size: 12.5px; }

.code-box { display: grid; gap: 14px; justify-items: center; padding: 22px; border-radius: 12px; background: #0c0c0f; border: 1px dashed rgba(183, 140, 255, .4); text-align: center; }
.code-box .code { font: 900 34px/1 var(--mono); letter-spacing: 6px; color: var(--violet); user-select: all; }
.code-box p { margin: 0; color: var(--muted); font-size: 13px; }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, .15); border-top-color: var(--violet); border-radius: 50%; animation: spin .8s linear infinite; }
.waiting { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
@keyframes spin { to { transform: rotate(360deg); } }

.access-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.access-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--dim); padding: 0 8px 8px; }
.access-table td { padding: 8px; border-top: 1px solid var(--line); vertical-align: middle; }
.access-table .input { min-height: 32px; width: 76px; padding: 4px 8px; }

/* ------------------------------------------------------------------ toasts */

.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: grid; gap: 8px; width: min(380px, calc(100vw - 32px)); }
.toast { padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line-2); background: #1b1b1f; box-shadow: 0 12px 30px rgba(0, 0, 0, .5); font-size: 14px; white-space: pre-line; animation: fade .2s ease; }
.toast.error { border-color: rgba(212, 90, 85, .5); background: #2a1615; }
.toast.ok { border-color: rgba(95, 211, 141, .4); }

/* ------------------------------------------------------------------ small screens */

@media (max-width: 900px) {
  .console-layout { grid-template-columns: 1fr; }
  .console-box { height: 62vh; min-height: 380px; }
}

@media (max-width: 640px) {
  .page { padding: 18px 16px 70px; }
  .topbar { padding: 0 16px; }
  .brand span { font-size: 15px; }
  .userbox .who { display: none; }
  .alt-grid { grid-template-columns: 1fr; }
  .alt-head { grid-template-columns: 56px minmax(0, 1fr); }
  .alt-head .head { width: 56px; height: 56px; }
  .alt-head .actions { grid-column: 1 / -1; justify-content: flex-start; }
  .alt-head h1 { font-size: 20px; }
  .task { grid-template-columns: auto minmax(0, 1fr); }
  .task .buttons { grid-column: 1 / -1; justify-content: flex-start; }
  .choice-grid, .pair { grid-template-columns: 1fr; }
  .settings { grid-template-columns: 1fr; }
  .slot-grid { gap: 4px; }
  .slot { min-height: 48px; padding: 4px; font-size: 9.5px; }
  .console { padding: 8px; font-size: 12px; }
  .line { grid-template-columns: 50px minmax(0, 1fr); gap: 6px; }
  .line time { font-size: 10px; padding-top: 2px; }
  .console-tools { padding: 8px; }
  .console-tools .btn.small { padding: 0 8px; }
  .tabs button { padding: 0 11px; }
  .login-form { flex-direction: column; }
  .access-table th:nth-child(4), .access-table td:nth-child(4) { display: none; }
}
