:root {
  --red: #c8102e; --red-hi: #e5213f; --red-dim: #5a0c19;
  --black: #0a0a0b; --char: #131316; --panel: #1a1a1e; --line: #2a2a30; --line-hi: #3a3a42;
  --silver: #b8bcc4; --text: #ececf0; --muted: #8a8d96;
  --ok: #3fb97f; --warn: #e0a23a; --info: #5b9bd5;
  --font: 'Inter', system-ui, sans-serif; --display: 'Rajdhani', 'Inter', sans-serif;
  --r: 8px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--black); color: var(--text); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--silver); text-decoration: none; } a:hover { color: #fff; }
h1, h2, h3 { font-family: var(--display); letter-spacing: .02em; margin: 0 0 .5rem; font-weight: 700; }
h1 { font-size: 1.9rem; } h2 { font-size: 1.35rem; } h3 { font-size: 1.1rem; }
.muted { color: var(--muted); } .mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85em; }
button, .btn { font: inherit; cursor: pointer; border: 1px solid var(--line-hi); background: var(--panel); color: var(--text); padding: .5rem .9rem; border-radius: var(--r); transition: border-color .15s, background .15s; display: inline-block; }
button:hover, .btn:hover { border-color: var(--silver); color: #fff; }
button:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; font-weight: 600; }
.btn-primary:hover { background: var(--red-hi); border-color: var(--red-hi); }
.btn-danger { border-color: var(--red); color: #ff7a8c; } .btn-sm { padding: .25rem .6rem; font-size: .85rem; }
input, select, textarea { font: inherit; background: var(--char); color: var(--text); border: 1px solid var(--line); border-radius: var(--r); padding: .5rem .7rem; max-width: 100%; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--red); outline-offset: 1px; }
textarea { width: 100%; min-height: 90px; }
label { display: block; font-size: .85rem; color: var(--muted); margin: .6rem 0 .2rem; }

/* ---------- public pages ---------- */
.hero { min-height: 100vh; position: relative; display: flex; flex-direction: column; overflow: hidden; isolation: isolate; }
.hero::before { content: ''; position: absolute; inset: -20%; z-index: -2; background:
  radial-gradient(60% 50% at 70% 30%, rgba(200,16,46,.28), transparent 70%),
  radial-gradient(50% 40% at 15% 80%, rgba(200,16,46,.14), transparent 70%), var(--black);
  animation: drift 24s ease-in-out infinite alternate; }
.hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px) 0 0/48px 48px,
  linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px) 0 0/48px 48px;
  mask-image: radial-gradient(70% 60% at 50% 40%, #000 20%, transparent 80%); }
@keyframes drift { to { transform: translate3d(-4%, 3%, 0) scale(1.08); } }
.pubnav { display: flex; align-items: center; justify-content: space-between; padding: 1.2rem 1.5rem; max-width: 1200px; width: 100%; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: .6rem; font-family: var(--display); font-weight: 700; font-size: 1.25rem; letter-spacing: .06em; color: #fff; }
.brand svg { width: 28px; height: 28px; }
.pubnav nav { display: flex; gap: 1.2rem; align-items: center; }
.hero-body { flex: 1; display: flex; align-items: center; max-width: 1200px; width: 100%; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.hero-copy { max-width: 640px; animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
.eyebrow { color: var(--red-hi); font-family: var(--display); letter-spacing: .25em; text-transform: uppercase; font-size: .9rem; font-weight: 600; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1.02; margin: .4rem 0 1rem; }
.hero p.lead { color: var(--silver); font-size: 1.1rem; max-width: 52ch; }
.hero .cta { display: flex; gap: .8rem; margin-top: 1.6rem; flex-wrap: wrap; align-items: center; }
.status-pill { display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .8rem; border: 1px solid var(--line-hi); border-radius: 99px; background: rgba(19,19,22,.7); font-size: .85rem; margin-top: 1.4rem; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); display: inline-block; }
.dot.ok { background: var(--ok); } .dot.bad { background: var(--red-hi); } .dot.warn { background: var(--warn); }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.footer { border-top: 1px solid var(--line); padding: 1.2rem 1.5rem; color: var(--muted); font-size: .85rem; text-align: center; background: rgba(10,10,11,.8); }
.page-simple { min-height: 100vh; display: flex; flex-direction: column; }
.page-simple main { flex: 1; max-width: 1100px; width: 100%; margin: 0 auto; padding: 2rem 1.5rem; }
.staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.staff-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 1.2rem; text-align: center; transition: transform .2s, border-color .2s; }
.staff-card:hover { transform: translateY(-3px); border-color: var(--red); }
.staff-card img { width: 84px; height: 84px; border-radius: 50%; border: 2px solid var(--red-dim); background: var(--char); }
.staff-card .n { font-weight: 600; margin-top: .6rem; } .staff-card .t { color: var(--muted); font-size: .85rem; }
.center-card { max-width: 460px; margin: 12vh auto; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 2rem; text-align: center; }

/* ---------- app shell ---------- */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { background: var(--char); border-right: 1px solid var(--line); padding: 1rem .8rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .brand { padding: .4rem .6rem 1rem; }
.side h4 { margin: 1rem .6rem .3rem; font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.side a { display: flex; justify-content: space-between; align-items: center; padding: .42rem .6rem; border-radius: 6px; color: var(--silver); font-size: .92rem; }
.side a:hover { background: var(--panel); color: #fff; }
.side a.active { background: var(--red-dim); color: #fff; box-shadow: inset 3px 0 0 var(--red); }
.badge { background: var(--red); color: #fff; border-radius: 99px; padding: 0 .45rem; font-size: .72rem; font-weight: 600; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; justify-content: space-between; align-items: center; padding: .8rem 1.4rem; border-bottom: 1px solid var(--line); background: rgba(19,19,22,.85); position: sticky; top: 0; z-index: 5; backdrop-filter: blur(6px); }
.top .user { display: flex; align-items: center; gap: .6rem; } .top img { width: 30px; height: 30px; border-radius: 50%; }
.content { padding: 1.4rem; max-width: 1400px; width: 100%; animation: rise .35s ease both; }
.menu-btn { display: none; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .9rem; margin-bottom: 1.2rem; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.1rem; }
.card .k { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; }
.card .v { font-family: var(--display); font-size: 2rem; font-weight: 700; line-height: 1.1; margin-top: .2rem; }
.card .s { color: var(--muted); font-size: .8rem; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.1rem; margin-bottom: 1.1rem; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1.1rem; }
.toolbar { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: .9rem; align-items: center; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { padding: .6rem .8rem; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
td.wrap { white-space: normal; min-width: 220px; }
th { color: var(--muted); font-weight: 500; font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; background: var(--char); position: sticky; top: 0; }
tbody tr:hover { background: rgba(255,255,255,.025); } tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; }
.tag { display: inline-block; padding: .08rem .55rem; border-radius: 99px; font-size: .75rem; border: 1px solid var(--line-hi); color: var(--silver); }
.tag.critical, .tag.failed, .tag.banned, .tag.guilty { border-color: var(--red); color: #ff7a8c; background: rgba(200,16,46,.12); }
.tag.high, .tag.warn, .tag.pending, .tag.review, .tag.incomplete, .tag.further_review, .tag.would_ban { border-color: var(--warn); color: var(--warn); }
.tag.ok, .tag.confirmed, .tag.online, .tag.complete, .tag.clean, .tag.stored, .tag.not_guilty, .tag.live { border-color: var(--ok); color: var(--ok); }
.pager { display: flex; gap: .6rem; align-items: center; justify-content: flex-end; margin-top: .7rem; color: var(--muted); font-size: .85rem; }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: .35rem 1rem; } .kv dt { color: var(--muted); } .kv dd { margin: 0; word-break: break-word; }
.notice { border-left: 3px solid var(--warn); background: rgba(224,162,58,.08); padding: .7rem 1rem; border-radius: 0 var(--r) var(--r) 0; margin-bottom: 1rem; font-size: .9rem; }
.notice.bad { border-color: var(--red); background: rgba(200,16,46,.1); } .notice.ok { border-color: var(--ok); background: rgba(63,185,127,.08); }
.empty { padding: 2.2rem 1rem; text-align: center; color: var(--muted); }
.monitor-view { background: #000; border: 1px solid var(--line); border-radius: 10px; aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; }
.monitor-view img { width: 100%; height: 100%; object-fit: contain; }
.monitor-view .overlay { position: absolute; left: .6rem; top: .6rem; background: rgba(0,0,0,.7); padding: .15rem .6rem; border-radius: 99px; font-size: .78rem; }
.grid-mon { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.switch { display: flex; align-items: center; gap: .5rem; } .switch input { width: auto; }
.toast { position: fixed; right: 1rem; bottom: 1rem; background: var(--panel); border: 1px solid var(--red); padding: .7rem 1rem; border-radius: var(--r); z-index: 50; max-width: 360px; animation: rise .3s ease; }
.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
code, pre { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .83rem; } pre { background: var(--char); padding: .8rem; border-radius: var(--r); overflow: auto; margin: 0; max-height: 320px; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; width: 260px; transform: translateX(-100%); transition: transform .2s; z-index: 20; }
  .side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.6); }
  .menu-btn { display: inline-block; }
  .content { padding: 1rem; } .kv { grid-template-columns: 1fr; }
  .pubnav { padding: 1rem; } .hero-body { padding-top: 1rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
