/* ═══════════════════════════════════════════════════════
   ZENRA — Admin System Console
   Style: dark telemetry HUD on black · cyan / pink split
   ═══════════════════════════════════════════════════════ */

:root {
  --void: #04060a;
  --panel: rgba(8, 12, 20, .72);
  --cyan: #6ee7f7;
  --pink: #ff5fa2;
  --pink-soft: #ff8cc6;
  --ice: #eaf6ff;
  --dim: #5f7488;
  --dimmer: #3a4a5c;
  --line: rgba(110, 231, 247, .22);
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background:
    radial-gradient(1100px 500px at 75% -10%, rgba(255, 95, 162, .10), transparent 60%),
    radial-gradient(900px 480px at 15% 110%, rgba(110, 231, 247, .08), transparent 60%),
    var(--void);
  color: var(--ice);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

#adminStars { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: .8; }

/* ── Header ────────────────────────────────────────── */
.chead {
  position: sticky; top: 0; z-index: 10;
  background: rgba(4, 6, 10, .88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.chead-in {
  max-width: 1480px; margin-inline: auto;
  padding: 18px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  position: relative; z-index: 2; flex-wrap: wrap;
}
.chead-brand { display: flex; align-items: center; gap: 12px; }
.chead-name { font-size: 19px; font-weight: 700; letter-spacing: .14em; color: #ff2f7e; }
.chead-name em { font-style: normal; color: var(--cyan); }
.chead-sep { width: 1px; height: 22px; background: var(--line); }
.chead-title { font-size: 12px; letter-spacing: .32em; text-transform: uppercase; color: #ff7ab0; }
.chead-right { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.chead-clock { text-align: right; font-size: 13px; font-weight: 500; letter-spacing: .08em; color: var(--ice); }
.chead-clock-date { display: block; font-size: 11px; color: var(--dim); }
.vault-chip {
  font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--dim);
  border: 1px solid var(--line); padding: 9px 14px;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.vault-chip i { display: inline-block; width: 6px; height: 6px; background: var(--pink); border-radius: 50%; margin-right: 8px; vertical-align: 1px; box-shadow: 0 0 8px var(--pink); }
.vault-chip b { color: var(--ice); font-weight: 700; }
.btn-back {
  font-size: 12px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: var(--cyan); text-decoration: none;
  border: 1px solid rgba(110, 231, 247, .45); padding: 10px 18px;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  transition: background .2s ease, color .2s ease;
}
.btn-back:hover { background: var(--cyan); color: #031018; }

/* ── Layout ────────────────────────────────────────── */
.cwrap { max-width: 1480px; margin-inline: auto; padding: 34px 28px 60px; position: relative; z-index: 2; }
/* ── Stat cards ────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-bottom: 34px; }
.stat {
  position: relative;
  background: linear-gradient(180deg, rgba(110, 231, 247, .05), rgba(110, 231, 247, .01) 55%, transparent);
  border: 1px solid rgba(110, 231, 247, .14);
  padding: 22px 20px 18px;
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
}
.stat::before {
  content: ''; position: absolute; top: 0; left: 0; width: 34px; height: 34px;
  border-top: 1px solid rgba(255, 95, 162, .55); border-left: 1px solid rgba(255, 95, 162, .55);
}
.stat::after {
  content: ''; position: absolute; bottom: 0; right: 0; width: 34px; height: 34px;
  border-bottom: 1px solid rgba(110, 231, 247, .5); border-right: 1px solid rgba(110, 231, 247, .5);
}
.stat-num {
  font-size: 34px; font-weight: 700; letter-spacing: .04em;
  color: var(--ice); text-shadow: 0 0 18px rgba(110, 231, 247, .35);
}
.stat-label { margin-top: 10px; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--dim); }
/* ── Panels ────────────────────────────────────────── */
.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid rgba(110, 231, 247, .16);
  padding: 26px 28px 24px;
  margin-bottom: 34px;
}
.panel::before {
  content: ''; position: absolute; top: -1px; left: 40px; right: 40px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(110, 231, 247, .6), rgba(255, 95, 162, .6), transparent);
}
.panel-corner { position: absolute; width: 16px; height: 16px; }
.pc-bl { left: -1px; bottom: -1px; border-left: 2px solid var(--cyan); border-bottom: 2px solid var(--cyan); }
.pc-br { right: -1px; bottom: -1px; border-right: 2px solid var(--pink); border-bottom: 2px solid var(--pink); }
.panel-tag {
  position: absolute; right: 14px; bottom: -11px;
  font-size: 10px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--cyan); background: var(--void);
  border: 1px solid rgba(110, 231, 247, .4); padding: 4px 10px;
}
.pt-tag2 { color: var(--pink-soft); border-color: rgba(255, 95, 162, .4); }

.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  flex-wrap: wrap; margin-bottom: 20px;
}
.panel-title { font-size: 17px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ice); }
.pt-accent { color: var(--cyan); }
.pt-accent2 { color: #ff2f7e; }
.panel-note { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); }
.panel-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Console buttons ───────────────────────────────── */
.cbtn {
  font-family: var(--mono);
  font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  padding: 12px 20px; cursor: pointer; border: 1px solid;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: filter .2s ease, background .2s ease, color .2s ease;
}
.cbtn-export {
  background: linear-gradient(90deg, var(--cyan), var(--pink));
  color: #06131c; border-color: transparent;
}
.cbtn-export:hover { filter: brightness(1.15); }
.cbtn-sample { background: rgba(110, 231, 247, .06); color: var(--cyan); border-color: rgba(110, 231, 247, .5); }
.cbtn-sample:hover { background: rgba(110, 231, 247, .16); }
.cbtn-clear { background: rgba(255, 95, 162, .06); color: var(--pink-soft); border-color: rgba(255, 95, 162, .5); }
.cbtn-clear:hover { background: rgba(255, 95, 162, .16); }




/* ── Tables ────────────────────────────────────────── */
.table-scroll { overflow-x: auto; }
.ctable { width: 100%; border-collapse: collapse; min-width: 720px; }
.ctable thead th {
  text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--dim); padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.ctable tbody td {
  padding: 13px 14px; font-size: 13px;
  border-bottom: 1px solid rgba(110, 231, 247, .07);
  vertical-align: middle; white-space: nowrap;
}
.ctable tbody tr:hover td { background: rgba(110, 231, 247, .04); }
.empty { text-align: center; letter-spacing: .2em; color: var(--dimmer); padding: 46px 14px !important; text-transform: uppercase; }

.th-ix, .td-ix { width: 46px; color: var(--dim); }
.th-num, .td-num { text-align: right; }
.td-flag { font-size: 18px; line-height: 1; }
.td-code { color: var(--dim); font-size: 11px; letter-spacing: .14em; margin-top: 2px; }
.td-name { font-weight: 500; letter-spacing: .04em; }
.td-share { color: var(--pink-soft); font-weight: 500; }
.td-time { color: var(--dim); font-size: 12px; }
.td-agent { color: var(--cyan); }
.td-msg { color: var(--dim); max-width: 320px; overflow: hidden; text-overflow: ellipsis; }

/* gauge */
.gauge { position: relative; height: 8px; min-width: 180px; background: rgba(110, 231, 247, .08); }
.gauge i {
  position: absolute; inset: 0 auto 0 0;
  background: linear-gradient(90deg, var(--cyan), var(--pink));
  box-shadow: 0 0 10px rgba(255, 95, 162, .35);
}
/* status chip */
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); }
.status i { width: 7px; height: 7px; border-radius: 50%; background: var(--dimmer); }
.status.is-live { color: var(--cyan); }
.status.is-live i { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }

.panel-foot { margin-top: 16px; font-size: 11px; letter-spacing: .1em; color: var(--dim); text-transform: uppercase; }
.panel-foot code { color: var(--cyan); }


/* ── Footer ────────────────────────────────────────── */
.cfoot {
  max-width: 1480px; margin-inline: auto;
  padding: 22px 28px 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--dimmer);
  border-top: 1px solid rgba(110, 231, 247, .1);
  position: relative; z-index: 2;
}

.cfoot a { color: var(--dim); text-decoration: none; }
.cfoot a:hover { color: var(--cyan); }

/* ── Toast ─────────────────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px);
  background: rgba(6, 19, 28, .95);
  border: 1px solid rgba(110, 231, 247, .5);
  color: var(--cyan);
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  padding: 12px 20px;
  opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease;
  z-index: 20;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ── Access gate ─────────────────────────────────────── */
#gateLock {
  display: none; position: fixed; inset: 0; z-index: 200;
  align-items: center; justify-content: center; padding: 20px;
  background:
    radial-gradient(ellipse at 50% 28%, rgba(110, 231, 247, .07), transparent 62%),
    #04060a;
}
.admin-locked #gateLock { display: flex; }
.admin-locked body > *:not(#gateLock) { visibility: hidden; }

#gateLock .gate-card {
  position: relative; width: min(420px, 100%);
  padding: 36px 32px 24px;
  background: linear-gradient(160deg, #071019, #04060a 70%);
  border: 1px solid rgba(110, 231, 247, .32);
  box-shadow: 0 0 70px rgba(110, 231, 247, .14), inset 0 0 44px rgba(110, 231, 247, .04);
  clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
}
#gateLock .gate-card.is-shake { animation: gate-shake .4s; }
@keyframes gate-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-9px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(4px); }
}

#gateLock .gate-kicker {
  display: block; margin-bottom: 10px;
  font: 500 10px/1 'JetBrains Mono', ui-monospace, Menlo, monospace;
  letter-spacing: .28em; color: var(--pink);
}
#gateLock .gate-title {
  margin: 0 0 6px; font-size: 24px; font-weight: 700;
  letter-spacing: .04em; color: var(--ice);
  text-transform: uppercase;
}
#gateLock .gate-sub {
  margin: 0 0 22px; font-size: 11px;
  color: var(--dim); letter-spacing: .08em;
}

#gateLock .gate-field { display: flex; gap: 8px; }
#gateLock .gate-field input {
  flex: 1; min-width: 0; padding: 13px 14px;
  background: rgba(110, 231, 247, .05);
  border: 1px solid rgba(110, 231, 247, .3); border-radius: 0;
  color: var(--ice); outline: none;
  font: 500 15px 'JetBrains Mono', ui-monospace, Menlo, monospace;
  letter-spacing: .12em;
}
#gateLock .gate-field input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 1px rgba(110, 231, 247, .35), 0 0 18px rgba(110, 231, 247, .2);
}
#gateLock .gate-field input::placeholder { color: rgba(110, 231, 247, .3); letter-spacing: .1em; }

#gateLock .gate-go {
  padding: 0 18px; cursor: pointer;
  background: var(--cyan); border: 0; color: #04121a;
  font: 700 17px/1 'JetBrains Mono', ui-monospace, Menlo, monospace;
  transition: filter .15s, transform .15s;
}
#gateLock .gate-go:hover { filter: brightness(1.2); }
#gateLock .gate-go:active { transform: scale(.96); }

#gateLock .gate-err {
  margin: 12px 0 0;
  font: 500 11px/1.5 'JetBrains Mono', ui-monospace, Menlo, monospace;
  letter-spacing: .12em; color: var(--pink);
}
#gateLock .gate-err[hidden] { display: none; }

#gateLock .gate-foot {
  display: block; margin-top: 24px; padding-top: 14px;
  border-top: 1px solid rgba(110, 231, 247, .14);
  font: 500 9px/1 'JetBrains Mono', ui-monospace, Menlo, monospace;
  letter-spacing: .24em; color: var(--dimmer);
}

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stat-num { font-size: 28px; }
}
@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .chead-in { padding: 14px 16px; }
  .cwrap { padding: 24px 16px 44px; }
  .panel { padding: 20px 16px 18px; }
  .panel-actions { width: 100%; }
  .cbtn { flex: 1; padding: 11px 12px; }
  .chead-clock { display: none; }
}
@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 16px 14px 12px; }
  .stat-num { font-size: 22px; }
  .stat-label { font-size: 9px; letter-spacing: .14em; }
  .chead-title { display: none; }
}
