:root {
  color-scheme: light;
  --primary: #3d0a80;
  --primary-hover: #2b075c;
  --surface: #fff;
  --background: #f6f4ef;
  --border: #d7d2c9;
  --text: #292433;
  --muted: #625b69;
  --danger: #a51d36;
  --radius: .75rem;
  --space: 1rem;
  font: 100%/1.6 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--background);
}
* { box-sizing: border-box; }
body { margin: 0; }
.login-page { max-width: none; margin: 0; min-height: 100vh; padding: 1.5rem; display: grid; place-items: center; background: white; }
.login-button { display: inline-block; padding: .65rem 1.5rem; border-radius: .45rem; background: var(--primary); color: white; text-decoration: none; font-weight: 600; }
.login-button:hover { background: var(--primary-hover); }
.page-tabs { display: flex; flex-wrap: wrap; gap: 1.5rem; border-bottom: 1px solid var(--border); margin-bottom: 2rem; }
.page-tabs a { padding: .5rem 0; text-decoration: none; }
.page-tabs a[aria-current="page"] { border-bottom: 3px solid var(--primary); font-weight: 700; }
[hidden] { display: none !important; }
a { color: var(--primary); text-underline-offset: .2em; }
button, input { font: inherit; }
button { padding: .65rem 1.1rem; border: 1px solid transparent; border-radius: .45rem; color: white; background: var(--primary); font-weight: 600; cursor: pointer; min-height: 44px; }
button:hover:not(:disabled) { background: var(--primary-hover); }
button.secondary { color: var(--primary); background: var(--surface); border-color: var(--primary); }
button.secondary:hover:not(:disabled) { background: #f0e9fa; }
button.danger { background: var(--danger); }
button.danger:hover:not(:disabled) { background: #801429; }
button:disabled { opacity: .55; cursor: not-allowed; }
:focus-visible { outline: 3px solid #8a5300; outline-offset: 4px; }
.skip-link { position: absolute; left: 1rem; top: -5rem; background: white; padding: .6rem; z-index: 2; }
.skip-link:focus { top: 1rem; }
.topbar { padding: 1.25rem max(1.5rem, calc((100vw - 1120px) / 2)); display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; background: var(--primary); color: white; }
.topbar a { color: white; }
.brand { font-weight: 750; font-size: 1.3rem; text-decoration: none; }
.brand span { font-weight: 400; font-size: .95rem; margin-left: .8rem; }
.account { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; font-size: .9rem; overflow-wrap: anywhere; }
main { max-width: 1120px; margin: 0 auto; padding: 3rem 1.5rem; }
.intro { max-width: 760px; margin-bottom: 2rem; }
.eyebrow { color: var(--primary); font-size: .85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
h1 { font-size: clamp(1.8rem, 4vw, 2.65rem); line-height: 1.2; margin: .6rem 0 1rem; }
h2 { font-size: 1.3rem; margin: 0 0 1rem; }
h3 { font-size: 1.15rem; margin: 0; }
p { margin: .6rem 0 1rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.5rem; }
.card-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.card-heading h2 { margin: 0; }
#status { font-size: 1.15rem; font-weight: 650; color: var(--primary); }
.muted, .footer-note { color: var(--muted); font-size: .9rem; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: .65rem .5rem; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.app-state { display: inline-block; padding: .15rem .6rem; border-radius: 1rem; font-weight: 600; background: #eee8fa; }
.app-state.running { color: #185c38; background: #e7f3ea; }
.app-state.stopped { color: #625b69; background: #eeeae5; }
.app-state.transitioning, .app-state.unknown { color: #744700; background: #fff1d6; }
dl { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.5rem; }
dt { font-weight: 600; }
dd { margin: 0; overflow-wrap: anywhere; }
.actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.actions .card { display: flex; flex-direction: column; align-items: flex-start; }
.actions p { flex: 1; }
.notice { background: #eee8fa; border-left: 4px solid var(--primary); border-radius: .3rem; padding: 1rem; margin: 1rem 0; overflow-wrap: anywhere; }
.notice.error { background: #fff0f0; border-color: var(--danger); }
dialog { width: min(95vw, 600px); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; color: var(--text); }
dialog::backdrop { background: rgb(25 15 40 / 65%); }
.confirmation { display: flex; gap: .8rem; margin: 1.5rem 0; }
input[type="checkbox"] { width: 1.3rem; height: 1.3rem; flex-shrink: 0; accent-color: var(--primary); }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .75rem; }
@media (max-width: 760px) { .topbar { align-items: flex-start; flex-direction: column; } .actions { grid-template-columns: 1fr; } main { padding-top: 2rem; } dl { grid-template-columns: 1fr; gap: .2rem; } dd { margin-bottom: .6rem; } }
