:root {
  color-scheme: dark;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #090d1b;
  color: #f5f7fb;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at top, #14203f 0, #090d1b 42rem); }
button, input, textarea, select { font: inherit; }
button { border: 0; border-radius: 0.8rem; padding: 0.72rem 1rem; background: #00c8ff; color: #04111a; font-weight: 700; cursor: pointer; }
button.secondary { background: #23304f; color: #f5f7fb; }
button.danger { background: #ff6370; color: #220407; }
input, textarea, select { width: 100%; border: 1px solid #30405f; border-radius: 0.8rem; background: #111a32; color: #f5f7fb; padding: 0.75rem; }
label { display: grid; gap: 0.35rem; color: #c8d3eb; }
.topbar { display: flex; gap: 1rem; justify-content: space-between; align-items: center; padding: 1.4rem clamp(1rem, 3vw, 2.5rem); border-bottom: 1px solid #21314f; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
h2 { font-size: 1.2rem; margin-top: 0.2rem; }
.eyebrow { color: #00c8ff; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 800; }
.auth-box { display: flex; gap: 0.6rem; align-items: center; min-width: min(36rem, 100%); }
.layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; padding: clamp(1rem, 3vw, 2.5rem); }
.card { background: rgba(13, 22, 43, 0.9); border: 1px solid #243656; border-radius: 1.2rem; padding: 1rem; box-shadow: 0 1rem 2.4rem rgba(0,0,0,0.24); }
.span-2 { grid-column: span 2; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.stack { display: grid; gap: 0.8rem; margin-top: 1rem; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.8rem; margin-top: 1rem; }
.metric { border: 1px solid #2e4268; border-radius: 1rem; padding: 1rem; background: #111a32; }
.metric strong { display: block; font-size: 1.8rem; }
.table-wrap { overflow-x: auto; margin-top: 1rem; }
table { width: 100%; border-collapse: collapse; min-width: 48rem; }
th, td { text-align: left; border-bottom: 1px solid #253653; padding: 0.75rem; vertical-align: top; }
th { color: #96a8c8; font-size: 0.85rem; }
.badge { display: inline-flex; border-radius: 999px; padding: 0.25rem 0.55rem; background: #243656; color: #dce6fa; font-size: 0.8rem; font-weight: 700; }
.badge.approved { background: #0f4d3c; color: #b6ffe9; }
.badge.revoked { background: #5a1720; color: #ffd4da; }
.audit-list { display: grid; gap: 0.6rem; margin-top: 1rem; }
.audit-entry { border: 1px solid #253653; border-radius: 0.8rem; padding: 0.8rem; background: #101932; }
.audit-entry code { color: #00c8ff; }
.toast { position: fixed; right: 1rem; bottom: 1rem; max-width: 28rem; padding: 0.9rem 1rem; border-radius: 0.9rem; background: #00c8ff; color: #04111a; font-weight: 800; box-shadow: 0 1rem 2rem rgba(0,0,0,0.35); }
@media (max-width: 860px) {
  .topbar, .auth-box { flex-direction: column; align-items: stretch; }
  .layout { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.artifact-list { display: grid; gap: 0.45rem; margin: 0 0 0.75rem; padding-left: 1rem; }
.artifact-list li { color: #c8d3eb; }
.artifact-list a { color: #00c8ff; font-weight: 700; text-decoration: none; }
.upload-box { display: grid; grid-template-columns: minmax(12rem, 1fr) 9rem auto; gap: 0.45rem; align-items: center; }
.upload-box progress { grid-column: 1 / -1; width: 100%; height: 0.7rem; }
.actions { display: grid; gap: 0.45rem; min-width: 10rem; }
button.link { padding: 0; border-radius: 0; background: transparent; color: #00c8ff; font-weight: 800; }
button.link.danger { color: #ff9aa3; background: transparent; }
.badge.manifest-missing { background: #3c465c; color: #eef3ff; }
.badge.manifest-unsigned { background: #67450f; color: #ffe1a8; }
.badge.manifest-signed { background: #0f4d3c; color: #b6ffe9; }
.badge.manifest-invalid { background: #5a1720; color: #ffd4da; }
@media (max-width: 860px) {
  .upload-box { grid-template-columns: 1fr; }
  table { min-width: 70rem; }
}

.message-panel { margin-top: 1rem; border-radius: 0.9rem; padding: 0.85rem 1rem; font-weight: 800; }
.message-panel.info { border: 1px solid #2e4268; background: #111a32; color: #dce6fa; }
.message-panel.error { border: 1px solid #8e2630; background: #3a1118; color: #ffd4da; }
.entity-list { display: grid; gap: 0.65rem; margin-top: 1rem; }
.entity-card { border: 1px solid #2e4268; border-radius: 0.9rem; padding: 0.85rem; background: #111a32; display: grid; gap: 0.35rem; }
.entity-card code { color: #00c8ff; overflow-wrap: anywhere; }
.entity-card p, .muted { color: #c8d3eb; }
.hint-list { margin: 1rem 0 0; padding-left: 1.2rem; color: #c8d3eb; display: grid; gap: 0.45rem; }
button:disabled, select:disabled { opacity: 0.6; cursor: not-allowed; }
