/* Same palette as the old site; shapes modernised: thin borders, bigger radii,
   soft layered shadows, short transitions. */
@import url(https://fonts.googleapis.com/css2?family=ABeeZee&family=Source+Code+Pro:wght@400;600&display=swap);

:root {
  --background-color: #212121;
  --box-background-color: #263238;
  --box-border-color: lightgray;
  --box-shadow-color: gray;
  --selection-color: gold;
  --selection-shadow-color: sienna;
  --font-color: #eff;
  --muted-color: #9aa5ab;
  --on-color: greenyellow;
  --on-shadow-color: darkgreen;
  --off-color: crimson;
  --off-shadow-color: darkred;

  --radius: 14px;
  --radius-sm: 10px;
  --border: 1.5px;
  --shadow: 0 2px 0 rgba(128, 128, 128, 0.6), 0 10px 28px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 2px 0 rgba(128, 128, 128, 0.6), 0 4px 12px rgba(0, 0, 0, 0.3);
  --font-ui: "ABeeZee", system-ui, sans-serif;
  --font-code: "Source Code Pro", ui-monospace, Menlo, Consolas, monospace;
  --gap: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: clamp(16px, 4vw, 48px);
  background: var(--background-color);
  color: var(--font-color);
  font-family: var(--font-ui);
  font-size: 18px;
  line-height: 1.45;
}

h1, h2, h3 { font-weight: 400; letter-spacing: 0.01em; margin: 0 0 0.5em; }
h1 { font-size: 1.6em; }
h2 { font-size: 1.2em; color: var(--muted-color); }
a { color: var(--selection-color); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted-color); font-size: 0.85em; }
code, .code { font-family: var(--font-code); }

/* layout */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap); }
.stack { display: flex; flex-direction: column; gap: var(--gap); }
.grow { flex: 1 1 auto; }
.center { margin-inline: auto; text-align: center; width: fit-content; }

/* surfaces */
.box {
  background: var(--box-background-color);
  border: var(--border) solid rgba(211, 211, 211, 0.45);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: inherit;
  font: inherit;
  padding: 10px 14px;
  min-height: 2.4em;
}
.card { padding: 16px 20px; }

/* controls */
.button {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--box-border-color);
  color: var(--background-color);
  border: none;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  padding: 8px 16px;
  min-height: 2.4em;
  font: inherit; font-weight: 600;
  cursor: pointer;
  transition: background-color 120ms ease, box-shadow 120ms ease, transform 80ms ease;
}
.button:hover { background: var(--selection-color); box-shadow: 0 2px 0 var(--selection-shadow-color), 0 6px 16px rgba(0, 0, 0, 0.35); }
.button:active { transform: translateY(2px); box-shadow: none; }
.button:focus-visible { outline: 2px solid var(--selection-color); outline-offset: 2px; }
.button.quiet { background: transparent; color: var(--font-color); border: var(--border) solid rgba(211, 211, 211, 0.45); box-shadow: none; }
.button.quiet:hover { background: rgba(255, 215, 0, 0.12); color: var(--selection-color); border-color: var(--selection-color); box-shadow: none; }
.button.danger:hover { background: var(--off-color); color: var(--font-color); box-shadow: 0 2px 0 var(--off-shadow-color); }
.button.small { padding: 4px 10px; min-height: 1.9em; font-size: 0.85em; }

.input, select.input, textarea.input {
  background: var(--box-background-color);
  color: var(--font-color);
  border: var(--border) solid rgba(211, 211, 211, 0.45);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  min-height: 2.4em;
  font: inherit;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.input:focus { outline: none; border-color: var(--selection-color); box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.18); }
.input::placeholder { color: var(--muted-color); }

/* on/off indicator */
.indicator {
  width: 0.9em; height: 0.9em; border-radius: 50%;
  background: var(--off-color);
  box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.2), 0 0 12px rgba(220, 20, 60, 0.5);
  transition: background-color 200ms ease, box-shadow 200ms ease;
}
.indicator.on { background: var(--on-color); box-shadow: 0 0 0 3px rgba(173, 255, 47, 0.2), 0 0 14px rgba(173, 255, 47, 0.6); }

/* cards (admin): single column on phones, grid when there is room */
.page { max-width: 1200px; margin: 0 auto; }
.cards { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.card-title { font-weight: 600; font-size: 1.05em; overflow-wrap: anywhere; }
a.card-title { color: var(--selection-color); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 0.9em; align-items: baseline; }
.kv .k { color: var(--muted-color); }
.kv .v { overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.actions .button { flex: 1 1 auto; justify-content: center; min-height: 44px; }
.badge { font-size: 0.75em; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.badge.on { background: rgba(173, 255, 47, 0.15); color: var(--on-color); }
.badge.off { background: rgba(220, 20, 60, 0.15); color: var(--off-color); }
.count { color: var(--muted-color); font-size: 0.8em; margin-left: 0.4em; }
.form-row { display: grid; gap: 8px; grid-template-columns: 1fr; }
.form-row .input, .form-row .button { width: 100%; min-height: 44px; justify-content: center; }
@media (min-width: 720px) { .form-row { grid-template-columns: 2fr 2fr 1fr auto; } .form-row .button { width: auto; } }
.activity-line { padding: 2px 0; }
.kind { color: var(--selection-color); }
.kind.claim, .kind.resume { color: var(--on-color); }
.kind.ban, .kind.revoke, .kind.block, .kind.reject { color: var(--off-color); }

@media (max-width: 480px) {
  body { font-size: 17px; }
  h1 { font-size: 1.35em; }
  .toolbar .button.small { min-height: 40px; }
}

/* editor-specific */
textarea.code-area, .code-area {
  width: 100%; min-height: 48vh; resize: vertical;
  font-family: var(--font-code); font-size: 16px; line-height: 1.5;
  tab-size: 2; white-space: pre; overflow: auto;
}
.log { font-family: var(--font-code); font-size: 15px; white-space: pre-wrap; word-break: break-word; min-height: 6em; max-height: 40vh; overflow: auto; }
.log .err { color: var(--off-color); }
.log .warn { color: var(--selection-color); }
.log .result { color: var(--on-color); }
.log .cmd { color: var(--muted-color); }
#feedback { color: var(--off-color); font-size: 0.9em; }
