/* Global theme for the OTP app - orange/yellow gradient admin panel. */

:root {
  --bg:#100d0b; --bg2:#171310; --panel:#1c1713; --panel2:#231c17;
  --border:#392e25; --border2:#4a3a2d;
  --fg:#fdf7f0; --muted:#b5a292; --dim:#8a7767;
  --o1:#ff5e00; --o2:#ff9500; --y1:#ffc21a; --y2:#ffe14d;
  --grad:linear-gradient(135deg,#ff5e00 0%,#ff9500 48%,#ffd60a 100%);
  --gradSoft:linear-gradient(135deg,rgba(255,94,0,.16),rgba(255,214,10,.10));
  --ok:#ffbf20; --bad:#ff5f56;
  --shadow:0 18px 40px rgba(0,0,0,.45);
  --r:14px;
}
* { box-sizing:border-box; }
html, body { height:100%; }
body {
  margin:0; color:var(--fg); font-size:15px;
  font-family:'Segoe UI', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing:antialiased;
  background:
    radial-gradient(1100px 560px at 88% -12%, rgba(255,149,0,.11), transparent 62%),
    radial-gradient(880px 480px at -12% 112%, rgba(255,214,10,.07), transparent 62%),
    var(--bg);
}
.mono { font-family:ui-monospace, Consolas, 'Courier New', monospace; }
a { color:var(--y1); text-decoration:none; }
a:hover { text-decoration:underline; }

/* ---------- public OTP page ---------- */
.otpPage {
  min-height:100vh; display:flex; flex-direction:column;
  align-items:center; justify-content:center; gap:14px; padding:24px;
}
.otpBig {
  font-size:clamp(3rem,17vw,8.5rem); font-weight:800; letter-spacing:.08em;
  line-height:1.1; font-variant-numeric:tabular-nums; text-align:center;
  background:var(--grad); -webkit-background-clip:text; background-clip:text; color:transparent;
}
.otpBig.waiting {
  background:none; color:var(--dim); font-weight:500;
  font-size:clamp(1.4rem,6vw,2.4rem); letter-spacing:0;
}
@keyframes pop { 0% { transform:scale(1.14); opacity:.3; } 100% { transform:scale(1); opacity:1; } }
.flash { animation:pop .45s ease-out; }
.otpStatus {
  max-width:560px; text-align:center; font-size:.8rem; color:var(--dim);
  font-family:ui-monospace, Consolas, 'Courier New', monospace; line-height:1.5;
  word-break:break-word;
}
.otpStatus.ok { color:var(--y1); }
.otpStatus.bad { color:var(--bad); }

/* ---------- buttons + inputs ---------- */
.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:11px 17px; border:0; border-radius:10px; font:inherit; font-weight:600;
  cursor:pointer; color:#2a1600; background:var(--grad);
  transition:filter .15s ease, transform .12s ease;
}
.btn:hover { filter:brightness(1.08); }
.btn:active { transform:translateY(1px); }
.btn.block { width:100%; }
.btn.sm { padding:7px 13px; font-size:.85rem; }
.btn.ghost { background:transparent; color:var(--fg); border:1px solid var(--border2); }
.btn.ghost:hover { border-color:var(--o2); color:var(--y1); filter:none; }
.btn.danger { background:transparent; color:var(--bad); border:1px solid rgba(255,95,86,.45); }
.btn.danger:hover { background:rgba(255,95,86,.10); filter:none; }
.btn[disabled] { opacity:.5; cursor:not-allowed; filter:none; transform:none; }
.btn:focus-visible, input:focus-visible, .nav:focus-visible {
  outline:2px solid var(--y1); outline-offset:2px;
}
label { display:block; font-size:.8rem; font-weight:600; color:var(--muted); margin:16px 0 6px; }
label .hint { font-weight:400; color:var(--dim); }
input {
  width:100%; padding:11px 13px; background:var(--bg2); border:1px solid var(--border);
  border-radius:10px; color:var(--fg); font:inherit;
}
input::placeholder { color:#6d5b4d; }
input:focus { outline:none; border-color:var(--o2); box-shadow:0 0 0 3px rgba(255,149,0,.15); }
.error { color:var(--bad); font-size:.83rem; margin-top:12px; min-height:1.15em; }
.error.good { color:var(--y1); }
.ok { color:var(--ok); } .bad { color:var(--bad); } .muted { color:var(--muted); }

/* ---------- login ---------- */
.loginWrap { min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px; }
.loginCard {
  width:100%; max-width:400px; background:var(--panel); border:1px solid var(--border);
  border-radius:18px; padding:30px 28px 26px; box-shadow:var(--shadow);
  position:relative; overflow:hidden;
}
.loginCard::before { content:''; position:absolute; left:0; right:0; top:0; height:4px; background:var(--grad); }
.logoBig {
  width:54px; height:54px; border-radius:16px; background:var(--grad); color:#2a1600;
  display:grid; place-items:center; font-size:1.45rem; font-weight:800;
  box-shadow:0 10px 26px rgba(255,138,0,.35); margin-bottom:18px;
}
.loginCard h1 { margin:0; font-size:1.3rem; }
.loginCard .sub { margin:6px 0 4px; color:var(--dim); font-size:.86rem; }

/* ---------- shell ---------- */
.shell { min-height:100vh; display:flex; flex-direction:column; }
.topbar {
  position:sticky; top:0; z-index:20;
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  padding:12px 22px; background:rgba(28,23,19,.94);
  border-bottom:1px solid var(--border); backdrop-filter:blur(8px);
}
.topbar::after { content:''; position:absolute; left:0; right:0; bottom:-1px; height:2px; background:var(--grad); }
.brand { display:flex; align-items:center; gap:11px; }
.logo {
  width:38px; height:38px; border-radius:11px; background:var(--grad); color:#2a1600;
  display:grid; place-items:center; font-weight:800; font-size:1.05rem;
  box-shadow:0 6px 18px rgba(255,138,0,.30);
}
.bt { font-weight:700; }
.bs { font-size:.7rem; color:var(--dim); text-transform:uppercase; letter-spacing:.13em; }
.topRight { display:flex; align-items:center; gap:12px; }
.pill {
  display:inline-flex; align-items:center; gap:7px; font-size:.78rem; color:var(--y1);
  background:var(--gradSoft); border:1px solid rgba(255,170,0,.35);
  padding:5px 11px; border-radius:999px;
}
.pill .dot { width:7px; height:7px; border-radius:50%; background:var(--y2); box-shadow:0 0 0 3px rgba(255,214,10,.18); }
.pill.off { color:var(--bad); border-color:rgba(255,95,86,.4); background:rgba(255,95,86,.08); }
.pill.off .dot { background:var(--bad); box-shadow:none; }
.user { display:flex; align-items:center; gap:8px; font-size:.86rem; color:var(--muted); }
.avatar {
  width:28px; height:28px; border-radius:50%; background:var(--grad); color:#2a1600;
  display:grid; place-items:center; font-weight:700; font-size:.8rem;
}

/* ---------- sidebar + main ---------- */
.body { flex:1; display:flex; align-items:stretch; }
.side {
  width:216px; flex:none; padding:18px 14px; border-right:1px solid var(--border);
  display:flex; flex-direction:column; gap:4px;
}
.nav {
  position:relative; display:flex; align-items:center; gap:10px; width:100%;
  padding:10px 12px; border:0; border-radius:10px; background:transparent;
  color:var(--muted); font:inherit; font-size:.9rem; text-align:left; cursor:pointer;
}
.nav .ic { width:18px; height:18px; flex:none; opacity:.9; }
.nav:hover { background:rgba(255,149,0,.07); color:var(--fg); }
.nav.active { background:var(--gradSoft); color:var(--y1); font-weight:600; }
.nav.active::before {
  content:''; position:absolute; left:0; top:8px; bottom:8px; width:3px;
  border-radius:0 3px 3px 0; background:var(--grad);
}
.sideFoot {
  margin-top:auto; padding:12px; border-top:1px solid var(--border);
  font-size:.72rem; color:var(--dim); line-height:1.7;
}
.main { flex:1; min-width:0; max-width:960px; padding:24px 26px 44px; }
.secHead { margin:0; font-size:1.15rem; font-weight:700; }
.secSub { margin:5px 0 20px; color:var(--dim); font-size:.86rem; }
.card {
  background:var(--panel); border:1px solid var(--border); border-radius:var(--r);
  padding:20px 22px; margin-bottom:18px;
}
.card h3 { margin:0; font-size:.95rem; }
.card .ch { margin:4px 0 2px; color:var(--dim); font-size:.8rem; }
.rowBtns { display:flex; gap:10px; flex-wrap:wrap; margin-top:20px; }
.warn {
  display:flex; gap:10px; align-items:flex-start; margin-bottom:18px;
  background:rgba(255,95,86,.08); border:1px solid rgba(255,95,86,.35);
  border-radius:var(--r); padding:13px 16px; font-size:.85rem; color:#ffd0cc;
}
.warn b { color:var(--bad); }

/* ---------- stat tiles ---------- */
.stats { display:grid; grid-template-columns:repeat(auto-fit,minmax(158px,1fr)); gap:14px; margin-bottom:18px; }
.stat {
  position:relative; overflow:hidden; background:var(--panel);
  border:1px solid var(--border); border-radius:var(--r); padding:15px 16px;
}
.stat::before { content:''; position:absolute; left:0; top:0; bottom:0; width:3px; background:var(--grad); }
.stat .k { font-size:.68rem; text-transform:uppercase; letter-spacing:.11em; color:var(--dim); }
.stat .v { margin-top:7px; font-size:1.35rem; font-weight:700; font-variant-numeric:tabular-nums; }
.stat .s {
  margin-top:4px; font-size:.75rem; color:var(--muted); min-height:1.1em;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}

/* ---------- OTP hero ---------- */
.otpCard {
  padding:2px; border-radius:18px; background:var(--grad);
  box-shadow:0 16px 40px rgba(255,120,0,.14); margin-bottom:18px;
}
.otpInner {
  border-radius:16px; background:linear-gradient(180deg,#1f1914,#171310);
  padding:26px 24px; text-align:center;
}
.otpLabel { font-size:.7rem; letter-spacing:.17em; text-transform:uppercase; color:var(--muted); }
.otpValue {
  margin:10px 0 4px; font-size:clamp(2.3rem,9vw,3.5rem); font-weight:800;
  letter-spacing:.1em; line-height:1.15; font-variant-numeric:tabular-nums;
  background:var(--grad); -webkit-background-clip:text; background-clip:text; color:transparent;
}
.otpValue.empty { background:none; color:var(--dim); font-size:1.4rem; font-weight:500; letter-spacing:0; }
.otpMeta { color:var(--muted); font-size:.82rem; min-height:1.2em; }
.otpActions { display:flex; gap:10px; justify-content:center; flex-wrap:wrap; margin-top:18px; }

/* ---------- key/value list ---------- */
.kv {
  display:flex; justify-content:space-between; align-items:baseline; gap:14px;
  padding:10px 0; border-bottom:1px dashed var(--border); font-size:.86rem;
}
.kv:last-child { border-bottom:0; }
.kv .kvk { color:var(--muted); flex:none; }
.kv .kvv { text-align:right; word-break:break-all; }

/* ---------- toasts ---------- */
.toasts {
  position:fixed; top:74px; right:18px; z-index:80; max-width:340px;
  display:flex; flex-direction:column; gap:10px; pointer-events:none;
}
.toast {
  position:relative; overflow:hidden; background:#221b16;
  border:1px solid var(--border2); border-radius:12px;
  padding:12px 15px 12px 18px; font-size:.85rem; box-shadow:var(--shadow);
  animation:toastIn .2s ease-out both;
}
.toast::before { content:''; position:absolute; left:0; top:0; bottom:0; width:4px; background:var(--grad); }
.toast.bad::before { background:var(--bad); }
.toast b { display:block; margin-bottom:3px; color:var(--y1); }
.toast.bad b { color:var(--bad); }
.toast .tmsg { color:var(--muted); line-height:1.45; }
@keyframes toastIn { from { opacity:0; transform:translateX(14px); } to { opacity:1; transform:none; } }

/* ---------- responsive ---------- */
@media (max-width:820px) {
  .body { flex-direction:column; }
  .side {
    width:100%; flex-direction:row; overflow-x:auto; padding:10px;
    border-right:0; border-bottom:1px solid var(--border);
  }
  .nav { width:auto; white-space:nowrap; }
  .nav.active::before { display:none; }
  .sideFoot { display:none; }
  .main { padding:18px 15px 34px; }
  .topbar { padding:10px 14px; }
  .bs, .user b { display:none; }
}
@media (prefers-reduced-motion: reduce) {
  .btn { transition:none; }
  .toast { animation:none; }
  .flash { animation:none; }
}
