:root {
  --bg: #09100e;
  --surface-2: #15211d;
  --border: #25352f;
  --text: #edf7f2;
  --muted: #98aaa2;
  --accent: #50e3a4;
  --accent-strong: #26bd7e;
  --danger: #ff7d86;
  --warning: #f2c66d;
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 0%, rgba(42, 158, 112, 0.18), transparent 32rem),
    radial-gradient(circle at 95% 20%, rgba(42, 107, 87, 0.15), transparent 28rem),
    var(--bg);
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.topbar { min-height: 82px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(152, 170, 162, 0.16); }
.brand { color: var(--text); text-decoration: none; display: flex; gap: 12px; align-items: center; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; color: #06110c; background: var(--accent); border-radius: 13px; font-weight: 900; box-shadow: 0 10px 35px rgba(80, 227, 164, 0.2); }
.brand strong, .brand small { display: block; }
.brand small { color: var(--muted); margin-top: 1px; }
.identity { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.hero { padding: 84px 0 58px; max-width: 850px; }
.eyebrow { margin: 0 0 10px; color: var(--accent); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.72rem; font-weight: 800; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 22px; font-size: clamp(2.5rem, 7vw, 5.4rem); line-height: 0.98; letter-spacing: -0.055em; }
h2 { margin-bottom: 0; font-size: clamp(1.7rem, 4vw, 2.5rem); letter-spacing: -0.035em; }
h3 { font-size: 1.2rem; }
.hero-copy { color: var(--muted); max-width: 720px; font-size: 1.08rem; line-height: 1.7; }
.section { padding: 34px 0 56px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin-bottom: 24px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)); gap: 16px; }
.app-card, .panel, .session-row { border: 1px solid var(--border); background: linear-gradient(145deg, rgba(21, 33, 29, 0.97), rgba(13, 22, 19, 0.97)); border-radius: var(--radius); }
.app-card { min-height: 230px; padding: 24px; display: flex; flex-direction: column; }
.app-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; background: rgba(80, 227, 164, 0.12); color: var(--accent); font-weight: 900; }
.app-card h3 { margin: 28px 0 8px; font-size: 1.32rem; }
.app-card p { color: var(--muted); line-height: 1.5; flex: 1; }
.button { border: 1px solid var(--border); border-radius: 11px; padding: 10px 14px; color: var(--text); background: var(--surface-2); transition: border-color 140ms ease, background 140ms ease, transform 140ms ease; }
.button:hover { border-color: var(--accent-strong); transform: translateY(-1px); }
.button:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.button.primary { color: #06110c; border-color: var(--accent); background: var(--accent); font-weight: 800; }
.button.danger { border-color: rgba(255, 125, 134, 0.45); color: var(--danger); }
.button.quiet { background: transparent; }
.button.small { padding: 7px 10px; font-size: 0.86rem; }
.session-list, .compact-list { display: grid; gap: 10px; }
.session-row { padding: 17px 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.session-main { min-width: 0; }
.session-main strong { display: block; text-transform: capitalize; }
.session-main small { color: var(--muted); }
.session-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.badge { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; padding: 5px 9px; color: var(--muted); font-size: 0.75rem; }
.badge.RUNNING, .badge.ACTIVE, .badge.VALIDATED, .badge.SENT { color: var(--accent); border-color: rgba(80, 227, 164, 0.38); }
.badge.ERROR, .badge.REJECTED, .badge.FAILED { color: var(--danger); border-color: rgba(255, 125, 134, 0.38); }
.badge.CREATING, .badge.VALIDATING, .badge.PENDING, .badge.CLAIMED { color: var(--warning); border-color: rgba(242, 198, 109, 0.38); }
.admin { border-top: 1px solid rgba(152, 170, 162, 0.16); }
.admin-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 16px; }
.panel { padding: 24px; }
.panel > p { color: var(--muted); line-height: 1.55; }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.panel-heading p { color: var(--muted); margin-bottom: 0; }
.versions-panel { margin-top: 16px; }
.danger-panel { border-color: rgba(255, 125, 134, 0.34); }
.danger-text { color: var(--danger) !important; }
.audit-list { max-height: 480px; overflow: auto; }
form { display: grid; gap: 12px; }
label { color: var(--muted); font-size: 0.86rem; font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid var(--border); border-radius: 12px; padding: 12px 13px; color: var(--text); background: #09120f; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--accent-strong); box-shadow: 0 0 0 3px rgba(80, 227, 164, 0.1); }
textarea { resize: vertical; min-height: 280px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.82rem; line-height: 1.5; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-grid > div { display: grid; gap: 8px; align-content: start; }
.form-grid small { color: var(--muted); }
.check-grid { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.check-row { display: inline-flex; align-items: center; gap: 7px; }
.check-row input { width: auto; }
.inline-form { margin-top: 22px; grid-template-columns: minmax(220px, 1fr) auto; align-items: end; }
.inline-form > div { display: grid; gap: 8px; }
.compact-item { border-top: 1px solid var(--border); padding: 14px 0 4px; display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.compact-item:first-child { margin-top: 14px; }
.compact-item small { display: block; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
.compact-actions { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.notice { padding: 14px 16px; border-radius: 12px; margin-bottom: 14px; }
.notice.error { color: #ffd9dc; background: rgba(158, 44, 54, 0.25); border: 1px solid rgba(255, 125, 134, 0.35); }
.notice.success { color: #d9ffed; background: rgba(37, 150, 103, 0.2); border: 1px solid rgba(80, 227, 164, 0.32); }
.empty { color: var(--muted); padding: 28px 0; }
footer { min-height: 90px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); border-top: 1px solid rgba(152, 170, 162, 0.16); font-size: 0.84rem; }
@media (max-width: 780px) {
  .shell { width: min(100% - 22px, 1180px); }
  .hero { padding-top: 54px; }
  .admin-grid { grid-template-columns: 1fr; }
  .form-grid, .inline-form { grid-template-columns: 1fr; }
  .session-row, .compact-item { align-items: flex-start; flex-direction: column; }
  .session-actions, .compact-actions { justify-content: flex-start; }
  #identity-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
}
