/* ============================================================
   GLOBAL THEME — gax's utils
   JetBrains Mono only. Zero borders anywhere. Zero border-radius.
   Separation is done with spacing, background layers, and shadow.
   ============================================================ */

@font-face {
  font-family: 'JetBrains Mono';
  src: local('JetBrains Mono'), local('JetBrainsMono-Regular');
  font-weight: 400 800;
  font-display: swap;
}

:root {
  --bg:        #0f1013;
  --surface:   #16171c;
  --surface-2: #1c1d24;
  --surface-3: #22232b;
  --text:      #d4d4d8;
  --text-hi:   #e4e4e7;
  --muted:     #71717a;
  --accent:    #e4e4e7;
  --danger:    #f87171;
  --success:   #58cc02;
  --warning:   #ffc200;
  --shadow-1:  0 1px 0 rgba(255,255,255,0.04) inset, 0 6px 20px rgba(0,0,0,0.35);
  --shadow-2:  0 8px 30px rgba(0,0,0,0.45);
  --font: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f4f4f5; --surface:#ffffff; --surface-2:#ececef; --surface-3:#e2e2e6;
    --text:#27272a; --text-hi:#0f1013; --muted:#6b6b70;
  }
}
:root[data-theme="dark"] { color-scheme: dark; }

* , *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; border: none !important; border-radius: 0 !important; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100%;
}

body { line-height: 1.5; -webkit-font-smoothing: antialiased; }

a { color: inherit; text-decoration: none; }

img, svg { max-width: 100%; display: block; }

button, input, select, textarea {
  font-family: var(--font);
  font-size: 14px;
  color: var(--text-hi);
  background: var(--surface-2);
  outline: none;
}

button {
  cursor: pointer;
  background: var(--text-hi);
  color: var(--bg);
  font-weight: 700;
  padding: 12px 18px;
  letter-spacing: 0.02em;
  transition: background .15s, transform .1s, opacity .15s;
}
button:hover { background: #fff; }
button:active { transform: scale(.98); }
button.secondary { background: var(--surface-3); color: var(--text-hi); }
button.secondary:hover { background: var(--surface-2); }
button.danger { background: var(--danger); color: #1a0505; }
button:disabled { opacity: .4; cursor: not-allowed; }

input, textarea, select {
  width: 100%;
  padding: 11px 14px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06) inset;
}
input:focus, textarea:focus, select:focus {
  box-shadow: 0 0 0 2px var(--text-hi) inset;
}
label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; display: block; margin-bottom: 6px; }

.card {
  background: var(--surface);
  box-shadow: var(--shadow-1);
  padding: 24px;
}

.container { max-width: 760px; margin: 0 auto; padding: 40px 20px 80px; }
.container-wide { max-width: 1100px; margin: 0 auto; padding: 24px 20px 80px; }

.header { text-align: center; margin-bottom: 36px; }
.header h1 { font-size: 1.5rem; font-weight: 800; color: var(--text-hi); letter-spacing: -0.01em; }
.header p { color: var(--muted); font-size: 13px; margin-top: 6px; }

.grid { display: flex; flex-direction: column; gap: 14px; }

.tile {
  background: var(--surface);
  box-shadow: var(--shadow-1);
  padding: 24px 22px;
  display: flex; align-items: center; justify-content: center;
  text-align: center; font-weight: 700; color: var(--text);
  transition: background .15s, transform .15s;
}
.tile:hover { background: var(--surface-2); transform: scale(1.015); }

.empty { text-align: center; color: var(--muted); padding: 40px 0; }

.error-msg { color: var(--danger); font-size: 12px; text-align: center; }
.success-msg { color: var(--success); font-size: 12px; text-align: center; }

.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--text-hi); color: var(--bg); padding: 12px 20px;
  font-size: 13px; font-weight: 700; box-shadow: var(--shadow-2);
  z-index: 999; opacity: 0; pointer-events: none; transition: opacity .2s, bottom .2s;
}
.toast.show { opacity: 1; bottom: 32px; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 10px 12px; background: var(--surface); }
th { color: var(--muted); text-transform: uppercase; font-size: 11px; letter-spacing: .05em; }
tr + tr td { box-shadow: 0 1px 0 rgba(255,255,255,0.05) inset; }

.badge {
  display: inline-block; padding: 3px 8px; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; background: var(--surface-3); color: var(--text);
}
.badge.on { background: var(--success); color: #06210a; }
.badge.off { background: var(--surface-3); color: var(--muted); }

.toggle {
  position: relative; width: 46px; height: 26px; background: var(--surface-3);
  cursor: pointer; display: inline-block; flex-shrink: 0;
}
.toggle::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  background: var(--muted); transition: left .15s, background .15s;
}
.toggle.on { background: var(--success); }
.toggle.on::after { left: 23px; background: #06210a; }

:focus-visible { box-shadow: 0 0 0 2px var(--text-hi) !important; }

.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mt { margin-top: 16px; } .mt2 { margin-top: 28px; }

.nav-back { display: inline-block; margin-bottom: 20px; color: var(--muted); font-size: 12px; }
.nav-back:hover { color: var(--text-hi); }

@media (max-width: 560px) {
  .container, .container-wide { padding-left: 14px; padding-right: 14px; }
  .row { flex-direction: column; align-items: stretch; }
}
