:root {
  color-scheme: light;
  --ink: #17212b;
  --muted: #64748b;
  --line: #dbe3eb;
  --surface: #ffffff;
  --canvas: #f5f7fa;
  --accent: #155eef;
  --accent-dark: #0f46b5;
  --success: #067647;
  --warning: #a15c00;
  --danger: #b42318;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); line-height: 1.5; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 3px solid #84adff; outline-offset: 3px; }
.topbar { align-items: center; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; height: 4.5rem; justify-content: space-between; padding: 0 2rem; position: sticky; top: 0; z-index: 2; }
.brand { color: var(--ink); font-size: 1.05rem; font-weight: 700; text-decoration: none; letter-spacing: .01em; }
.sidebar { background: var(--surface); border-right: 1px solid var(--line); bottom: 0; padding: 2rem 1rem; position: fixed; top: 4.5rem; width: 15rem; }
.nav-link { border-radius: .5rem; display: block; padding: .65rem .8rem; text-decoration: none; }
.nav-link.is-current, .nav-link:hover { background: #eef4ff; color: var(--accent-dark); }
.page-shell { margin-left: 15rem; max-width: 80rem; padding: 3rem clamp(1.25rem, 4vw, 4rem); }
.auth-card, .error-state { background: var(--surface); border: 1px solid var(--line); border-radius: .9rem; margin: 6vh auto; max-width: 31rem; padding: clamp(1.5rem, 4vw, 3rem); box-shadow: 0 1rem 3rem rgba(18, 38, 63, .06); }
.section-heading { align-items: flex-start; display: flex; gap: 2rem; justify-content: space-between; margin-bottom: 2rem; }
.section-heading-compact { margin-bottom: 1rem; }
h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.03em; line-height: 1.1; margin: .2rem 0 .5rem; }
h2 { margin-top: 2.5rem; }
.eyebrow { color: var(--muted); font-size: .75rem; font-weight: 700; letter-spacing: .1em; margin: 0; text-transform: uppercase; }
.breadcrumbs { color: var(--muted); font-size: .75rem; font-weight: 700; letter-spacing: .1em; margin: 0 0 1rem; text-transform: uppercase; }
.breadcrumbs ol { align-items: center; display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; margin: 0; padding: 0; }
.breadcrumbs li + li::before { color: var(--muted); content: "/"; margin-right: .35rem; }
.breadcrumbs [aria-current="page"] { color: var(--ink); }
.lede { color: var(--muted); max-width: 55ch; }
.form-stack { display: grid; gap: .65rem; margin-top: 1.5rem; }
label { font-size: .9rem; font-weight: 650; }
input { border: 1px solid #b8c4d2; border-radius: .45rem; font: inherit; min-height: 2.75rem; padding: .55rem .7rem; }
input:focus { border-color: var(--accent); }
.button { background: var(--accent); border: 1px solid var(--accent); border-radius: .45rem; color: #fff; cursor: pointer; display: inline-block; font: inherit; font-weight: 650; padding: .65rem 1rem; text-decoration: none; }
.button:hover { background: var(--accent-dark); color: #fff; }
.button-quiet { background: transparent; border-color: transparent; color: var(--accent-dark); }
.logout-form { margin: 0; }
.alert { border-radius: .45rem; padding: .75rem 1rem; }
.alert-error { background: #fff0ee; color: var(--danger); }
.empty-state { background: var(--surface); border: 1px dashed #b8c4d2; border-radius: .8rem; padding: 2.5rem; text-align: center; }
.empty-state h2 { font-size: 1.25rem; margin: 0; }
.card-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.entity-card { background: var(--surface); border: 1px solid var(--line); border-radius: .75rem; display: grid; gap: .45rem; padding: 1.25rem; text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.entity-card:hover { border-color: #9ab8f5; box-shadow: 0 .65rem 1.5rem rgba(18, 38, 63, .08); transform: translateY(-1px); }
.service-card { background: var(--surface); border: 1px solid var(--line); border-radius: .75rem; display: grid; gap: 1rem; padding: 1.25rem; }
.service-card-link { color: inherit; text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.service-card-link:hover { border-color: #9ab8f5; box-shadow: 0 .65rem 1.5rem rgba(18, 38, 63, .08); color: inherit; transform: translateY(-1px); }
.service-card-heading { align-items: flex-start; display: flex; gap: 1rem; justify-content: space-between; }
.service-card h3 { font-size: 1.1rem; margin: 0; }
.service-grid { margin-bottom: 1rem; }
.service-facts { border-top: 1px solid var(--line); display: grid; gap: 0; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); margin: 0; }
.service-facts div { border-bottom: 1px solid var(--line); padding: .7rem .7rem .7rem 0; }
.service-facts dt { color: var(--muted); font-size: .72rem; font-weight: 700; text-transform: uppercase; }
.service-facts dd { margin: .2rem 0 0; }
.release-card { background: var(--surface); border: 1px solid var(--line); border-radius: .75rem; display: grid; gap: 1rem; padding: 1.25rem; }
.release-card-heading { align-items: flex-start; display: flex; gap: 1rem; justify-content: space-between; }
.release-card h3 { font-size: 1.1rem; margin: 0; }
.release-grid { margin-bottom: 1rem; }
.release-facts { border-top: 1px solid var(--line); display: grid; gap: 0; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); margin: 0; }
.release-facts div { border-bottom: 1px solid var(--line); padding: .7rem .7rem .7rem 0; }
.release-facts dt { color: var(--muted); font-size: .72rem; font-weight: 700; text-transform: uppercase; }
.release-facts dd { margin: .2rem 0 0; overflow-wrap: anywhere; }
.status-unknown { background: #f1f5f9; color: var(--muted); }
.service-empty { margin-top: 1rem; }
.service-empty h3 { font-size: 1.15rem; margin: 0; }
.service-empty p { color: var(--muted); margin-bottom: 0; }
.release-empty { margin-top: 1rem; }
.release-empty h3 { font-size: 1.15rem; margin: 0; }
.release-empty p { color: var(--muted); margin-bottom: 0; }
.entity-name { color: var(--ink); font-size: 1.1rem; font-weight: 700; }
.entity-id { color: var(--muted); display: grid; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; gap: .15rem; margin: .35rem 0 0; overflow-wrap: anywhere; }
.technical-label { font-family: inherit; font-size: .65rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.technical-value { font-size: .72rem; }
.status-row { align-items: center; display: flex; flex-wrap: wrap; gap: .65rem; }
.status-row-large { justify-content: flex-end; padding-top: .4rem; }
.status { border-radius: 99rem; display: inline-block; font-size: .78rem; font-weight: 700; padding: .2rem .55rem; }
.status-Active { background: #ecfdf3; color: var(--success); }
.status-Disabled { background: #fff7ed; color: var(--warning); }
.status-Retired { background: #fef3f2; color: var(--danger); }
.muted { color: var(--muted); font-size: .88rem; }
.facts { border-top: 1px solid var(--line); display: grid; gap: 0; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); margin: 2rem 0; }
.facts div { border-bottom: 1px solid var(--line); padding: 1rem 1rem 1rem 0; }
.facts dt { color: var(--muted); font-size: .78rem; font-weight: 700; text-transform: uppercase; }
.facts dd { margin: .25rem 0 0; }
.error-state { text-align: center; }

@media (max-width: 720px) {
  .topbar { padding: 0 1rem; }
  .sidebar { border-bottom: 1px solid var(--line); border-right: 0; height: auto; padding: .5rem 1rem; position: static; width: auto; }
  .page-shell { margin-left: 0; padding: 2rem 1rem; }
  .section-heading { display: block; }
  .status-row-large { justify-content: flex-start; }
}
