:root {
  --bg:#020617;
  --panel:rgba(15,23,42,.86);
  --soft:rgba(30,41,59,.7);
  --text:#e5f3ff;
  --muted:#94a3b8;
  --blue:#38bdf8;
  --violet:#8b5cf6;
  --border:rgba(56,189,248,.22);
}

body[data-theme="day"] {
  --bg:#edf7ff;
  --panel:rgba(255,255,255,.88);
  --soft:rgba(255,255,255,.72);
  --text:#0f172a;
  --muted:#526173;
  --border:rgba(14,116,144,.22);
}

body {
  margin:0;
  background:
    radial-gradient(circle at 75% 0%, rgba(139,92,246,.2), transparent 30%),
    radial-gradient(circle at 35% 15%, rgba(56,189,248,.15), transparent 35%),
    var(--bg);
  color:var(--text);
  font-family:Inter,system-ui,sans-serif;
}

.ops-shell {
  min-height:100vh;
  display:grid;
  grid-template-columns:300px 1fr;
}

.rail {
  padding:28px;
  border-right:1px solid var(--border);
  background:rgba(2,6,23,.72);
}

.rail h1 {
  color:var(--blue);
  margin:0;
}

.rail p {
  color:var(--muted);
  margin-bottom:28px;
}

.rail button {
  display:block;
  width:100%;
  margin-bottom:10px;
  padding:14px;
  border-radius:14px;
  border:1px solid transparent;
  background:transparent;
  color:var(--text);
  text-align:left;
}

.rail button.active,
.rail button:hover {
  background:rgba(56,189,248,.14);
  border-color:var(--border);
}

.stage {
  padding:30px;
}

header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:22px;
}

header h2 {
  font-size:34px;
  margin:0;
}

header p {
  color:var(--muted);
}

button,
input,
select {
  font-family:inherit;
}

button {
  padding:12px 16px;
  border-radius:14px;
  border:1px solid var(--border);
  color:var(--text);
  background:linear-gradient(135deg,rgba(56,189,248,.18),rgba(139,92,246,.18));
  cursor:pointer;
}

input,
select {
  width:100%;
  padding:13px;
  border-radius:14px;
  border:1px solid var(--border);
  background:var(--soft);
  color:var(--text);
  box-sizing:border-box;
}

.cards {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:16px;
  margin-bottom:18px;
}

.cards article,
.panel {
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:22px;
  box-shadow:0 0 40px rgba(56,189,248,.07);
  backdrop-filter:blur(18px);
}

.cards article {
  padding:20px;
}

.cards span {
  color:var(--muted);
}

.cards strong {
  display:block;
  font-size:36px;
  margin-top:8px;
}

.grid {
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:16px;
}

.panel {
  padding:22px;
  display:grid;
  gap:12px;
}

.panel h3 {
  margin:0 0 6px;
}

.wide {
  grid-column:span 2;
}

pre {
  white-space:pre-wrap;
  color:var(--blue);
  background:rgba(2,6,23,.55);
  padding:16px;
  border-radius:14px;
  max-height:360px;
  overflow:auto;
}

@media(max-width:1000px){
  .ops-shell,
  .cards,
  .grid {
    grid-template-columns:1fr;
  }

  .rail {
    display:none;
  }

  .wide {
    grid-column:auto;
  }
}

.rail-bottom {
  margin-top: 32px;
  display: grid;
  gap: 10px;
}

.identity-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

.identity-strip article {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px;
}

.identity-strip span {
  display: block;
  color: var(--muted);
  margin-bottom: 10px;
}

.uuid-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.uuid-row code {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  background: rgba(2,6,23,.55);
  color: var(--blue);
  overflow-x: auto;
}

body[data-theme="day"] .uuid-row code {
  background: rgba(255,255,255,.65);
}

.aco-modal-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(18px);
  z-index: 9999;
}

.aco-modal-backdrop.open {
  display: grid;
}

.aco-login-card {
  position: relative;
  width: min(460px, 92vw);
  padding: 30px;
  border-radius: 26px;
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.18), transparent 38%),
    rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(56, 189, 248, 0.28);
  box-shadow:
    0 0 60px rgba(56, 189, 248, 0.16),
    0 0 120px rgba(139, 92, 246, 0.12);
}

.aco-login-card h2 {
  margin: 0 0 8px;
  font-size: 28px;
  color: var(--blue);
}

.aco-login-card p {
  margin: 0 0 22px;
  color: var(--muted);
}

.aco-login-card label {
  display: block;
  margin: 14px 0 6px;
  color: var(--muted);
  font-size: 13px;
}

.aco-login-card input {
  width: 100%;
}

.aco-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 999px;
}

.aco-login-submit {
  width: 100%;
  margin-top: 20px;
  font-weight: 800;
  background: linear-gradient(135deg, #0284c7, #0f766e);
}

.aco-login-status {
  margin-top: 14px;
  color: var(--blue);
  font-size: 14px;
}
