:root {
  --bg: #0f1419;
  --panel: #1a2028;
  --panel-2: #232b36;
  --border: #2e3847;
  --text: #e6edf3;
  --muted: #8b98a5;
  --accent: #4b9fff;
  --accent-h: #66b0ff;
  --green: #2ecc71;
  --red: #ff5c5c;
  --orange: #f39c12;
  --danger: #c0392b;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text);
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-h); }

header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 24px; background: var(--panel);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
header h1 { margin: 0; font-size: 18px; letter-spacing: .3px; }
.header-actions { display: flex; gap: 8px; }

main { padding: 24px; max-width: 1280px; margin: 0 auto; }

button, .btn-like {
  background: var(--accent); color: #fff; border: 0;
  padding: 9px 16px; border-radius: 6px; cursor: pointer;
  font-size: 14px; font-weight: 500; display: inline-block;
  text-decoration: none;
}
button:hover, .btn-like:hover { background: var(--accent-h); }
button.secondary, .btn-like.secondary {
  background: var(--panel-2); color: var(--text); border: 1px solid var(--border);
}
button.secondary:hover { background: #2c3642; }
button.danger { background: var(--danger); }
button.danger:hover { background: #d04a3a; }
button.small { padding: 5px 10px; font-size: 12px; }
button:disabled { opacity: .5; cursor: not-allowed; }

code { background: var(--panel-2); padding: 2px 6px; border-radius: 3px; font-size: 12px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.err { color: var(--red); }
.hidden { display: none !important; }

.block {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; padding: 22px 26px; margin-bottom: 20px;
}
.block h2 {
  margin: 0 0 16px; font-size: 16px;
  text-transform: uppercase; letter-spacing: .5px; color: var(--muted);
}

.inline-form { display: flex; gap: 10px; margin-bottom: 16px; }
.inline-form input[type=text] {
  flex: 1; background: var(--panel-2); border: 1px solid var(--border);
  color: var(--text); padding: 9px 12px; border-radius: 6px; font-size: 14px;
}
.inline-form input[type=text]:focus { outline: none; border-color: var(--accent); }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td {
  text-align: left; padding: 10px 12px;
  border-bottom: 1px solid var(--border); vertical-align: top;
}
th { color: var(--muted); font-weight: 600; font-size: 11px;
     text-transform: uppercase; letter-spacing: .5px; }
tr:last-child td { border-bottom: 0; }
.copyable { cursor: pointer; user-select: all; word-break: break-all; }
.copyable:hover { color: var(--accent); }
.copyable.secret { color: var(--muted); }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.row-actions form { display: inline; margin: 0; }

.badge {
  display: inline-block; font-size: 11px; font-weight: 600;
  padding: 3px 10px; border-radius: 10px; letter-spacing: .3px;
  text-transform: uppercase;
}
.badge.st-pending  { background: rgba(243,156,18,.15);   color: var(--orange); }
.badge.st-approved { background: rgba(46,204,113,.15);   color: var(--green); }
.badge.st-denied   { background: rgba(255,92,92,.15);    color: var(--red); }
.badge.st-expired  { background: rgba(139,152,165,.15);  color: var(--muted); }

.warn-banner {
  background: rgba(243,156,18,.10);
  border: 1px solid rgba(243,156,18,.35);
  color: #f7c67f;
  padding: 14px 18px; border-radius: 8px; margin-bottom: 20px;
  font-size: 13px; line-height: 1.55;
}
.warn-banner code { background: rgba(0,0,0,.3); }

/* ─── Centered pages (login + demo) ──────────────────────────────── */
body.centered {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 20px;
  background: radial-gradient(ellipse at top, #141b26 0%, #0a0e14 70%);
  overflow: hidden; position: relative;
}
body.centered .card {
  max-width: 460px; width: 100%;
  position: relative; z-index: 1;
  text-align: center;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(26, 32, 40, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  padding: 34px 30px;
  border-radius: 14px;
}
body.centered h1 { margin: 0 0 14px; font-size: 26px; }
body.centered .lead { font-size: 15px; font-weight: 500; margin: 0 0 6px; }
body.centered .muted { font-size: 13px; line-height: 1.55; margin: 0 0 22px; }
body.centered form { text-align: left; }
body.centered label {
  display: block; margin-bottom: 14px; font-size: 12px;
  color: var(--muted); text-transform: uppercase; letter-spacing: .5px;
}
body.centered input, body.centered textarea {
  display: block; width: 100%; margin-top: 6px;
  background: rgba(15,20,25,.6); border: 1px solid var(--border);
  color: var(--text); padding: 10px 12px; border-radius: 8px;
  font-family: inherit; font-size: 14px;
  transition: border-color .15s, background .15s;
}
body.centered input:focus, body.centered textarea:focus {
  outline: none; border-color: var(--accent);
  background: rgba(15,20,25,.85);
}
body.centered button { width: 100%; margin-top: 10px; padding: 11px; font-size: 14px; }
body.centered .btn-like { display: inline-block; margin-top: 10px; }

.spinner {
  width: 36px; height: 36px; border: 3px solid var(--border);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin 0.9s linear infinite; margin: 20px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.error { text-align: center; padding: 20px 0; }

/* ─── Animated background orbs ───────────────────────────────────── */
.bg-orbs {
  position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0;
}
.orb {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: .5; will-change: transform;
}
.orb-1 {
  width: 460px; height: 460px;
  background: radial-gradient(circle, #4b9fff, transparent 70%);
  top: -140px; left: -120px;
  animation: drift-1 22s ease-in-out infinite alternate;
}
.orb-2 {
  width: 380px; height: 380px;
  background: radial-gradient(circle, #2ecc71, transparent 70%);
  bottom: -120px; right: -100px;
  animation: drift-2 26s ease-in-out infinite alternate;
}
.orb-3 {
  width: 320px; height: 320px;
  background: radial-gradient(circle, #f39c12, transparent 70%);
  top: 40%; right: -80px;
  animation: drift-3 30s ease-in-out infinite alternate;
}
.orb-4 {
  width: 260px; height: 260px;
  background: radial-gradient(circle, #e84393, transparent 70%);
  bottom: 20%; left: -60px;
  animation: drift-4 28s ease-in-out infinite alternate;
  opacity: .35;
}
@keyframes drift-1 { to { transform: translate(80px, 60px)  scale(1.15); } }
@keyframes drift-2 { to { transform: translate(-100px,-50px) scale(1.2);  } }
@keyframes drift-3 { to { transform: translate(-60px, 80px)  scale(1.1);  } }
@keyframes drift-4 { to { transform: translate(70px, -40px)  scale(1.18); } }
@media (prefers-reduced-motion: reduce) { .orb { animation: none; } }
