:root {
  color-scheme: light;
  --ink: #17211d;
  --muted: #637069;
  --line: #dce3de;
  --paper: #ffffff;
  --wash: #f4f7f4;
  --accent: #1f6a4c;
  --accent-dark: #154a36;
  --safe: #e7f4ec;
  --danger: #a82f32;
  --danger-wash: #fff0ef;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--wash);
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #83bda4; outline-offset: 2px; }
.environment-banner { background: #183b2c; color: #fff; padding: 9px 24px; text-align: center; font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.topbar { min-height: 84px; padding: 18px clamp(20px, 5vw, 64px); background: var(--paper); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 24px; }
h2 { margin-bottom: 8px; font-size: 22px; }
h3 { margin-bottom: 12px; font-size: 16px; }
.eyebrow { margin-bottom: 4px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.identity { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.role-pill { background: var(--safe); color: var(--accent-dark); border-radius: 999px; padding: 5px 9px; font-size: 11px; font-weight: 800; }
.button { border: 0; border-radius: 10px; padding: 10px 15px; background: var(--accent); color: #fff; cursor: pointer; font-weight: 750; }
.button:hover:not(:disabled) { background: var(--accent-dark); }
.button:disabled { cursor: not-allowed; opacity: .45; }
.button-secondary { background: #e7ece8; color: var(--ink); }
.button-secondary:hover:not(:disabled) { background: #d8dfda; }
.button-danger { background: var(--danger); }
.app-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); min-height: calc(100vh - 119px); }
.tabs { padding: 24px 12px; border-right: 1px solid var(--line); background: #edf2ee; }
.tab { width: 100%; border: 0; border-radius: 9px; padding: 11px 12px; margin-bottom: 5px; background: transparent; color: var(--muted); text-align: left; cursor: pointer; }
.tab.active { background: var(--paper); color: var(--ink); box-shadow: 0 2px 10px #1a3b2b10; font-weight: 750; }
.workspace { padding: clamp(22px, 4vw, 52px); overflow: auto; }
.panel-stack { display: grid; gap: 18px; max-width: 1120px; margin: 0 auto; }
.release-editor { min-width: 0; margin: 0; padding: 0; border: 0; display: grid; gap: 18px; }
.release-editor:disabled { opacity: .82; }
.section-heading, .card-title { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.metric, .card, .login-card { border: 1px solid var(--line); border-radius: 16px; background: var(--paper); box-shadow: 0 7px 24px #1a3b2b0c; }
.metric { padding: 18px; display: grid; gap: 8px; }
.metric span { color: var(--muted); font-size: 12px; }
.metric strong { font-size: 19px; }
.metric.safe { border-color: #b9dbc7; background: var(--safe); }
.metric.danger { border-color: #e5b7b6; background: var(--danger-wash); }
.card { padding: 20px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.field { display: grid; gap: 7px; color: var(--muted); }
.field-label { color: var(--ink); font-size: 13px; font-weight: 700; }
.field-hint { font-size: 11px; }
input, select, textarea { width: 100%; border: 1px solid #bdc8c1; border-radius: 9px; padding: 10px 11px; background: #fff; color: var(--ink); }
input:disabled, select:disabled, textarea:disabled { background: #f0f2f0; color: #69736d; }
textarea { resize: vertical; }
.notice, .empty-state, .error-state, .workflow-output { border-radius: 12px; padding: 15px; }
.notice { background: #edf5ff; border: 1px solid #c8dff6; color: #24496f; }
.empty-state { background: #f0f3f0; border: 1px dashed #bcc7bf; color: var(--muted); text-align: center; }
.error-state { background: var(--danger-wash); border: 1px solid #e5b7b6; color: #772226; }
.workflow-output { border: 1px solid var(--line); background: #f8faf8; overflow: auto; }
.workflow-output pre { max-height: 380px; overflow: auto; font-size: 12px; }
.workflow-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.activation-card { border-left: 4px solid var(--danger); }
.center-state, .login-card { max-width: 520px; margin: 12vh auto; padding: 28px; text-align: center; }
.login-card { display: grid; gap: 14px; }
.login-card .button { justify-self: center; }
.login-card small { color: var(--muted); }
.spinner { width: 30px; height: 30px; margin: 0 auto 12px; border: 3px solid #d4dfd8; border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
code { overflow-wrap: anywhere; }
.table-wrap { overflow-x: auto; }
.audit-table { width: 100%; border-collapse: collapse; background: var(--paper); border: 1px solid var(--line); }
.audit-table th, .audit-table td { padding: 11px; border-bottom: 1px solid var(--line); text-align: left; font-size: 12px; }
.audit-table th { background: #edf2ee; }
@media (max-width: 760px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .identity { flex-wrap: wrap; }
  .app-layout { grid-template-columns: 1fr; }
  .tabs { display: flex; gap: 6px; overflow-x: auto; padding: 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .tab { width: auto; margin: 0; white-space: nowrap; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
