:root {
  --paper: #070f22; --panel: #0e1b38; --ink: #e8eefb; --ink2: #c3d0ea; --muted: #93a5c8;
  --line: #1c2f5a; --line2: #2b4479; --brand: #2f6fe0; --brand-hover: #2558c2; --glow: #6aa6ff;
  --green: #34d399; --green-t: rgba(52, 211, 153, .14); --amber: #fbbf24; --amber-t: rgba(251, 191, 36, .13);
  --red: #f87171; --red-t: rgba(248, 113, 113, .14);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font: 15.5px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--glow); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2.5px solid var(--glow); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.015em; }
h1 { font-size: 24px; } h2 { font-size: 18px; } h3 { font-size: 16px; }
p { margin: 0 0 10px; }
.boot { padding: 40px; color: var(--muted); }
.muted { color: var(--muted); } .small { font-size: 13.5px; }
.mono { font-family: var(--mono); font-size: 13.5px; word-break: break-all; }
.num { font-variant-numeric: tabular-nums; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: #fff; }
.brand img { width: 32px; height: 32px; }
.brand small { display: block; font-weight: 500; font-size: 12px; color: #8ea2c8; }

.auth { max-width: 420px; margin: 0 auto; padding: 48px 16px; }
.auth .brand { margin-bottom: 22px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.card + .card { margin-top: 14px; }
.card h2 { margin-bottom: 8px; }
label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink2); margin: 12px 0 5px; }
input, textarea, select { width: 100%; background: #081329; border: 1px solid var(--line2); border-radius: 9px; padding: 10px 12px; }
textarea { min-height: 72px; resize: vertical; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line2); background: transparent; border-radius: 9px; padding: 9px 14px; font-weight: 600; cursor: pointer; }
.btn:hover { background: #12244a; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-hover); }
.btn.danger { border-color: rgba(248, 113, 113, .5); color: var(--red); }
.btn.wide { width: 100%; margin-top: 16px; }
.btn:disabled { opacity: .6; cursor: default; }
.error { color: var(--red); font-size: 14px; margin-top: 10px; min-height: 1em; }
.qr { width: 200px; height: 200px; background: #fff; border-radius: 10px; display: block; margin: 12px 0; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin: 10px 0; }
.codes span { background: #081329; border: 1px solid var(--line); border-radius: 7px; padding: 6px; text-align: center; font-family: var(--mono); }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px; border-bottom: 1px solid var(--line); background: #0a1730; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 22px 24px 60px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.note { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; color: var(--ink2); font-size: 14px; margin-bottom: 16px; }

.orgs { display: grid; gap: 12px; }
.org { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.org.suspended { border-color: rgba(248, 113, 113, .45); }
.org.pending { border-color: rgba(251, 191, 36, .45); }
.org-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.pill { display: inline-block; border-radius: 99px; padding: 1px 10px; font-size: 12.5px; font-weight: 700; }
.pill.active { background: var(--green-t); color: var(--green); }
.pill.suspended { background: var(--red-t); color: var(--red); }
.pill.pending { background: var(--amber-t); color: var(--amber); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px 16px; margin: 12px 0; }
.facts div { font-size: 13px; color: var(--muted); }
.facts b { display: block; color: var(--ink); font-size: 15px; font-weight: 650; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.reason { font-size: 14px; color: var(--ink2); margin-top: 8px; }

.log { margin-top: 18px; }
.events { list-style: none; margin: 0; padding: 0; }
.events li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.events time { color: var(--muted); font-size: 12.5px; display: block; }

.drawer { position: fixed; inset: 0; background: rgba(3, 8, 20, .7); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 10; }
.drawer .card { width: 100%; max-width: 460px; max-height: 90vh; overflow: auto; }
.row { display: flex; gap: 8px; margin-top: 16px; }
.row .btn { flex: 1; }
.keybox { background: #081329; border: 1px dashed var(--line2); border-radius: 10px; padding: 12px; margin: 10px 0; font-family: var(--mono); font-size: 15px; word-break: break-all; }

.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: #12244a; border: 1px solid var(--line2); border-radius: 10px; padding: 10px 16px; opacity: 0; pointer-events: none; transition: opacity .2s; }
.toast.on { opacity: 1; }

@media (max-width: 640px) {
  .top { padding: 12px 16px; }
  .wrap { padding: 18px 16px 48px; }
  .auth { padding: 32px 16px; }
}
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }
