/* OceanAC panel — ocean theme. Dark-first, one accent gradient, calm surfaces. */
:root {
  --bg: #0a0f1c; --bg2: #0e1526; --card: #121b30; --card2: #16223b;
  --line: #1e2c48; --line2: #2a3d63;
  --text: #e6eefb; --muted: #8298bd; --dim: #5c7099;
  --aqua: #7ff3ff; --sea: #22d3ee; --deep: #2563eb; --blue: #0ea5e9;
  --ok: #34d399; --warn: #fbbf24; --bad: #f87171;
  --grad: linear-gradient(135deg, #7ff3ff, #2563eb);
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --sans: 'Inter', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: radial-gradient(1200px 600px at 70% -10%, #12213f 0%, var(--bg) 55%) fixed;
  color: var(--text); font-family: var(--sans); font-size: 15px; line-height: 1.5;
  min-height: 100vh;
}
a { color: var(--sea); text-decoration: none; }
a:hover { color: var(--aqua); }
h1 { font-size: 26px; font-weight: 700; margin: 4px 0 18px; }
h2 { font-size: 16px; font-weight: 600; margin: 0 0 14px; color: var(--text); }
code { font-family: var(--mono); font-size: .88em; color: var(--aqua); }
.muted { color: var(--muted); }
.tiny { font-size: 12px; color: var(--dim); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 28px 20px 60px; }

/* top bar */
.topbar {
  display: flex; align-items: center; gap: 24px; padding: 0 22px; height: 60px;
  background: rgba(12,19,36,.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
}
.brand { font-weight: 700; font-size: 19px; color: var(--text); letter-spacing: -.3px; }
.brand .ac { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand .wave { -webkit-text-fill-color: initial; }
.topbar nav { display: flex; gap: 4px; flex: 1; }
.topbar nav a {
  color: var(--muted); padding: 8px 14px; border-radius: 8px; font-weight: 500; font-size: 14px;
}
.topbar nav a:hover { background: var(--card); color: var(--text); }
.topbar nav a.on { color: var(--aqua); background: var(--card2); }
.who { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }

/* buttons + forms */
button { font-family: var(--sans); cursor: pointer; border: 0; border-radius: 8px; font-size: 14px; padding: 9px 16px; font-weight: 600; }
button.primary { background: var(--grad); color: #051225; }
button.primary:hover { filter: brightness(1.08); }
button.ghost { background: transparent; border: 1px solid var(--line2); color: var(--muted); padding: 7px 12px; }
button.ghost:hover { border-color: var(--sea); color: var(--aqua); }
button.mini { padding: 4px 10px; font-size: 12px; }
input, select {
  font-family: var(--sans); font-size: 14px; background: var(--bg2); color: var(--text);
  border: 1px solid var(--line2); border-radius: 8px; padding: 9px 11px; width: 100%;
}
input:focus, select:focus { outline: none; border-color: var(--sea); }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }

/* cards */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.card .k { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.card .v { font-size: 30px; font-weight: 700; margin-top: 6px; }
.panelbox { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin-bottom: 18px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; color: var(--dim); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:hover td { background: var(--card2); }
.tbl .keyprefix { font-family: var(--mono); color: var(--aqua); }
.pill { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.pill.active, .pill.on { background: rgba(52,211,153,.15); color: var(--ok); }
.pill.suspended { background: rgba(251,191,36,.15); color: var(--warn); }
.pill.revoked, .pill.off { background: rgba(248,113,113,.15); color: var(--bad); }

/* live feed */
.feed { list-style: none; margin: 0; padding: 0; max-height: 340px; overflow-y: auto; }
.feed li { padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 13px; display: flex; gap: 10px; align-items: baseline; }
.feed .t { color: var(--dim); font-family: var(--mono); font-size: 11px; }
.feed .who2 { font-weight: 600; }
.feed .sev0 { color: var(--muted); } .feed .sev1 { color: var(--warn); } .feed .sev2 { color: var(--bad); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--dim); margin-left: 6px; }
.dot.live { background: var(--ok); box-shadow: 0 0 8px var(--ok); }

.row-form { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr auto; gap: 12px; align-items: end; }
.row-form button { height: 39px; }
.banner { padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; font-size: 14px; }
.banner.ok { background: rgba(52,211,153,.1); border: 1px solid rgba(52,211,153,.3); }
.keybox { display: inline-block; font-family: var(--mono); background: var(--bg); padding: 4px 10px; border-radius: 6px; color: var(--aqua); margin-left: 6px; user-select: all; }
.err { color: var(--bad); font-size: 14px; }
.back { color: var(--muted); font-size: 13px; }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; }
.login-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 34px; width: 340px; }
.login-brand { font-size: 26px; font-weight: 700; text-align: center; }
.login-brand .ac { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-card p.muted { text-align: center; margin-top: 4px; }
.login-card form { display: flex; flex-direction: column; gap: 14px; margin-top: 22px; }
.login-card button { margin-top: 6px; }

/* code + docs */
.code { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; overflow-x: auto; font-family: var(--mono); font-size: 12.5px; color: #cfe3ff; line-height: 1.55; }
.doclist { margin: 0; padding-left: 18px; } .doclist li { margin: 6px 0; }
.docs-brand { display: inline-block; font-size: 22px; margin-bottom: 8px; }

/* replay */
.replay { display: grid; grid-template-columns: 720px 1fr; gap: 20px; align-items: start; }
#replay-canvas { background: var(--bg); border: 1px solid var(--line2); border-radius: 12px; width: 100%; max-width: 720px; }
.replay-side { display: flex; flex-direction: column; gap: 12px; }
.replay-readout { font-family: var(--mono); font-size: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 12px; white-space: pre-wrap; min-height: 90px; }
.replay-controls { display: flex; gap: 10px; } .rng input { width: 100%; }

.foot { text-align: center; color: var(--dim); font-size: 12px; padding: 24px; border-top: 1px solid var(--line); }

@media (max-width: 860px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .replay { grid-template-columns: 1fr; }
  .row-form { grid-template-columns: 1fr 1fr; }
  #replay-canvas { max-width: 100%; }
}

/* ============================================================
   Polish pass — motion and depth for the panel.
   Additive only: nothing above changes, these just make the
   existing structure feel modern (entrance animation, hover
   lift + glow, smooth transitions, animated brand).
   ============================================================ */
@keyframes oac-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes oac-shimmer { 0% { background-position: 0% 50%; } 100% { background-position: 200% 50%; } }
@keyframes oac-pop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }

/* the brand wordmark gently shimmers */
.brand .ac, .login-brand .ac {
  background: linear-gradient(100deg, #7ff3ff, #22d3ee, #2563eb, #7ff3ff);
  background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: oac-shimmer 6s linear infinite;
}

/* cards and panels rise in, staggered, and lift on hover with an aqua glow */
.card, .panelbox { animation: oac-rise .5s cubic-bezier(.2,.7,.2,1) both; transition: transform .22s, border-color .22s, box-shadow .22s; }
.cards .card:nth-child(1){animation-delay:.02s}.cards .card:nth-child(2){animation-delay:.08s}
.cards .card:nth-child(3){animation-delay:.14s}.cards .card:nth-child(4){animation-delay:.20s}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(34,211,238,.45);
  box-shadow: 0 16px 40px -18px rgba(34,211,238,.35);
}
.card .v { background: linear-gradient(120deg,#e6eefb,#7ff3ff); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* buttons get a subtle press + primary glow */
button { transition: transform .12s, filter .18s, box-shadow .18s, border-color .18s, color .18s; }
button:active { transform: translateY(1px) scale(.98); }
button.primary { box-shadow: 0 8px 24px -10px rgba(34,211,238,.5); }
button.primary:hover { transform: translateY(-2px); }

/* table rows and feed items animate and respond smoothly */
.tbl tbody tr { transition: background .15s; }
.tbl tbody tr td { transition: background .15s; }
.feed li { animation: oac-pop .3s ease both; transition: background .15s; }
.feed li:hover { background: var(--card2); }

/* nav links slide their underline */
.topbar nav a { position: relative; transition: color .18s, background .18s; }
.topbar nav a.on::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg,#7ff3ff,#2563eb);
}

/* login / pending card floats in */
.login-card { animation: oac-pop .5s cubic-bezier(.2,.7,.2,1) both; box-shadow: 0 30px 80px -30px rgba(14,165,233,.4); }

/* headings get a faint accent bar */
h1 { position: relative; }
h1::before {
  content: ""; position: absolute; left: -14px; top: 4px; bottom: 4px; width: 4px; border-radius: 3px;
  background: linear-gradient(180deg,#7ff3ff,#2563eb);
}

/* the whole main area fades in on navigation */
.wrap { animation: oac-rise .4s ease both; }

/* respect reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, .card, .panelbox, .feed li, .login-card, .wrap { animation: none !important; transition: none !important; }
}
