:root {
  color-scheme: dark;
  --bg: #080b0c;
  --panel: rgba(16, 21, 23, 0.96);
  --panel-2: #171d1f;
  --line: rgba(226, 232, 234, 0.14);
  --line-strong: rgba(226, 232, 234, 0.26);
  --text: #f2f4f4;
  --muted: #8f9a9e;
  --amber: #f0b84a;
  --amber-soft: rgba(240, 184, 74, 0.12);
  --red: #ff5a47;
  --green: #4bd37a;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 75% 15%, rgba(240,184,74,.07), transparent 28rem),
    radial-gradient(circle at 15% 80%, rgba(84,199,217,.045), transparent 24rem),
    var(--bg);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}
.language-switch { position:fixed;top:18px;right:18px;z-index:20;height:34px;padding:0 10px;color:#e9eded;background:#171d1e;border:1px solid #384143;border-radius:6px;cursor:pointer }
.language-switch.inline { position:static;height:36px }
button, input, textarea { font: inherit; }
button { cursor: pointer; }

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}
.auth-grid {
  width: min(100%, 930px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.auth-visual {
  min-height: 580px;
  position: relative;
  padding: 44px;
  overflow: hidden;
  background:
    linear-gradient(128deg, rgba(240,184,74,.055), transparent 38%),
    repeating-linear-gradient(145deg, transparent 0 72px, rgba(255,255,255,.022) 73px 74px),
    #0b0f10;
}
.auth-visual::before,
.auth-visual::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(240,184,74,.22);
  border-radius: 50%;
}
.auth-visual::before { width: 320px; height: 320px; right: -130px; top: -80px; }
.auth-visual::after { width: 190px; height: 190px; right: -65px; top: -15px; }
.brand-lockup { position: relative; z-index: 1; }
.brand-kicker {
  color: var(--amber);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.brand-name { margin: 10px 0 0; font-size: clamp(44px, 7vw, 82px); line-height: .9; letter-spacing: -.06em; }
.brand-name span { display: block; margin-top: 12px; color: var(--muted); font-size: 15px; letter-spacing: .16em; text-transform: uppercase; }
.visual-copy { position: absolute; z-index: 1; left: 44px; right: 44px; bottom: 44px; }
.visual-copy strong { display: block; max-width: 470px; font-size: 25px; line-height: 1.18; }
.visual-copy p { max-width: 450px; margin: 12px 0 0; color: var(--muted); line-height: 1.55; }

.auth-card { padding: 42px 38px; display: flex; flex-direction: column; justify-content: center; }
.section-kicker { color: var(--amber); font-size: 11px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
.auth-card h1 { margin: 9px 0 10px; font-size: 30px; letter-spacing: -.03em; }
.lead { margin-bottom: 28px; color: var(--muted); line-height: 1.5; }
.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field span { color: #c8ced0; font-size: 12px; font-weight: 650; }
.field input,
.field textarea {
  width: 100%;
  padding: 12px 13px;
  color: var(--text);
  background: #0c1011;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: none;
}
.field input:focus,
.field textarea:focus { border-color: rgba(240,184,74,.68); box-shadow: 0 0 0 3px var(--amber-soft); }
.primary,
.secondary,
.danger {
  min-height: 40px;
  padding: 0 15px;
  border-radius: 9px;
  border: 1px solid transparent;
  font-weight: 750;
}
.primary { color: #171208; background: var(--amber); }
.primary:hover { background: #f7c45d; }
.secondary { color: var(--text); background: #1b2224; border-color: var(--line); }
.secondary:hover { border-color: var(--line-strong); background: #232b2e; }
.danger { color: #ffd8d2; background: rgba(255,90,71,.1); border-color: rgba(255,90,71,.25); }
.danger:hover { background: rgba(255,90,71,.17); }
.wide { width: 100%; }
.message { min-height: 19px; margin-top: 12px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.message.error { color: #ff8879; }
.message.success { color: var(--green); }
.auth-hint { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.5; }

.admin-page { min-height: 100vh; }
.admin-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  background: rgba(8,11,12,.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.admin-brand { display: flex; align-items: center; gap: 11px; }
.admin-brand-mark { display: grid; place-items: center; width: 34px; height: 34px; color: var(--amber); border: 1px solid var(--line-strong); border-radius: 50%; }
.admin-brand strong { font-size: 16px; letter-spacing: .08em; }
.header-actions { display: flex; gap: 8px; }
.admin-main { width: min(calc(100% - 32px), 1180px); margin: 34px auto 70px; }
.page-heading { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 26px; }
.page-heading h1 { margin: 6px 0 0; font-size: 34px; letter-spacing: -.04em; }
.page-heading p { max-width: 520px; margin: 0; color: var(--muted); line-height: 1.45; }
.admin-grid { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 18px; align-items: start; }
.stack { display: grid; gap: 18px; }
.panel { padding: 22px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 15px 44px rgba(0,0,0,.18); }
.panel h2 { margin-bottom: 6px; font-size: 17px; }
.panel-note { margin-bottom: 18px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.permission-list { display: grid; gap: 8px; margin: 4px 0 18px; }
.check-row { display: flex; align-items: center; gap: 9px; color: #cbd1d3; font-size: 12px; }
.check-row input { accent-color: var(--amber); }
.cards { display: grid; gap: 10px; }
.empty { padding: 24px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 10px; }
.admin-card { padding: 16px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.018); }
.admin-card-head { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.admin-card h3 { margin: 0 0 4px; font-size: 15px; }
.meta { color: var(--muted); font-size: 11px; line-height: 1.55; }
.pill { display: inline-flex; align-items: center; min-height: 23px; padding: 0 8px; border-radius: 999px; color: #b9f2ca; background: rgba(75,211,122,.1); border: 1px solid rgba(75,211,122,.18); font-size: 10px; font-weight: 750; }
.pill.off { color: #ffc1b9; background: rgba(255,90,71,.1); border-color: rgba(255,90,71,.18); }
.card-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.card-actions button { min-height: 32px; padding: 0 10px; font-size: 11px; }
.code-box { display: none; margin-top: 12px; padding: 13px; color: var(--amber); background: #0b0f10; border: 1px solid rgba(240,184,74,.24); border-radius: 9px; font: 800 22px/1 ui-monospace, Consolas, monospace; letter-spacing: .12em; text-align: center; }
.code-box.visible { display: block; }
.ban-form { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 8px; }
.ban-form input { min-width: 0; padding: 10px; color: var(--text); background: #0c1011; border: 1px solid var(--line); border-radius: 8px; }
.ban-list { display: grid; gap: 8px; margin-top: 14px; }
.ban-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; background: rgba(255,90,71,.055); border: 1px solid rgba(255,90,71,.14); border-radius: 9px; }
.ban-row strong { display: block; font: 700 12px ui-monospace, Consolas, monospace; }
.ban-row span { color: var(--muted); font-size: 11px; }

@media (max-width: 840px) {
  .auth-grid { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .admin-grid { grid-template-columns: 1fr; }
  .page-heading { align-items: start; flex-direction: column; }
}
