:root {
  color-scheme: light;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #242127;
  background: #fff9ee;
  --ink: #242127;
  --muted: #615964;
  --surface: #fffdf8;
  --coral: #ff806b;
  --lilac: #c5b5ff;
  --yellow: #f5e260;
  --line: #242127;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
::selection { color: var(--ink); background: var(--yellow); }
header {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 78px;
  padding: 17px max(24px, calc((100vw - 1102px) / 2));
  border-bottom: 2px solid var(--ink);
  background: #fffdf8;
}
header > a {
  display: inline-block;
  font-size: 25px;
  font-weight: 900;
  letter-spacing: -1.2px;
  text-decoration: none;
  color: var(--ink);
}
header > a::after { content: "."; color: #c34f3c; }
header span { flex: 1; font-size: 13px; color: var(--muted); }
main { max-width: 1150px; margin: auto; padding: 24px; }
.pilot {
  margin: 0 0 16px;
  padding: 11px 14px;
  border: 1.5px solid var(--ink);
  background: #fcf1b5;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 550;
  line-height: 1.6;
  color: var(--ink);
}
.card {
  margin: 18px 0;
  padding: 23px;
  border: 1.5px solid var(--ink);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 3px 3px 0 var(--ink);
}
#auth {
  max-width: 550px;
  margin: 34px auto 25px;
  padding: 30px;
  border-width: 2px;
  box-shadow: 6px 6px 0 var(--ink);
}
#auth::before {
  content: "DEIN PLAN. DEIN ZUGANG.";
  display: inline-block;
  padding: 5px 8px;
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  background: var(--lilac);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .7px;
  transform: rotate(-2deg);
}
#auth h1 { margin-top: 19px; font-size: clamp(25px, 4vw, 31px); letter-spacing: -1px; }
#auth > p { max-width: 43ch; }
#auth form > button { width: 100%; margin: 7px 0 0; }
#login-message:empty, #account-message:empty, #message:empty { display: none; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 18px; }
.grid .card { margin: 0; border-top-width: 7px; }
.grid .card:nth-child(3n + 1) { border-top-color: var(--lilac); }
.grid .card:nth-child(3n + 2) { border-top-color: var(--coral); }
.grid .card:nth-child(3n) { border-top-color: var(--yellow); }
.grid .card p { margin-top: 6px; }
.heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
#dashboard > .heading { margin: 7px 0 21px; }
h1, h2, h3 { color: var(--ink); line-height: 1.22; }
h1 { margin: 7px 0 14px; font-size: 29px; font-weight: 850; letter-spacing: -.9px; }
h2 { margin: 0 0 12px; font-size: 21px; font-weight: 800; letter-spacing: -.5px; }
h3 { margin: 25px 0 10px; font-size: 16px; font-weight: 800; }
p { line-height: 1.6; color: #514a53; }
.card > p:last-child { margin-bottom: 0; }
.heading h1, .heading h2 { margin-bottom: 0; }
label { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; font-size: 13px; font-weight: 700; color: var(--ink); }
.check { flex-direction: row; align-items: center; gap: 9px; font-weight: 500; line-height: 1.5; }
.check input { flex: 0 0 auto; width: 17px; height: 17px; margin: 0; accent-color: var(--ink); }
input, select {
  width: 100%;
  min-height: 44px;
  padding: 11px 13px;
  border: 1.5px solid var(--ink);
  border-radius: 7px;
  background: white;
  color: var(--ink);
  font: inherit;
  font-weight: 400;
  transition: box-shadow .15s, background .15s;
}
input::placeholder { color: #7b727d; }
input:hover, select:hover { background: #fffef9; }
input:focus, select:focus { outline: 2px solid var(--ink); outline-offset: 3px; box-shadow: 0 0 0 6px var(--lilac); }
input[readonly] { background: #f1ebff; }
select option { background: white; color: var(--ink); }
button, .download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin: 0 8px 0 0;
  padding: 10px 16px;
  border: 1.5px solid var(--ink);
  border-radius: 7px;
  background: var(--coral);
  color: var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, box-shadow .15s, transform .15s;
}
button:hover, .download:hover { background: #ff9786; box-shadow: 4px 4px 0 var(--ink); transform: translate(-1px, -1px); }
button:active, .download:active { box-shadow: none; transform: translate(2px, 2px); }
button:focus-visible, a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; box-shadow: 0 0 0 6px var(--yellow); }
button:disabled { opacity: .5; cursor: wait; transform: none; box-shadow: none; }
header button, .heading button, .row button, #sessions-revoke { background: var(--lilac); color: var(--ink); }
header button:hover, .heading button:hover, .row button:hover, #sessions-revoke:hover { background: #d5c9ff; }
.heading button, header button { margin-right: 0; }
.download { background: var(--yellow); }
.download:hover { background: #f9eb8f; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.help, small { font-size: 12px; font-weight: 400; line-height: 1.6; color: var(--muted); }
.operator-limits-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,260px),1fr)); align-items: start; gap: 16px; margin: 24px 0 14px; }
.operator-limit { min-width: 0; margin: 0; padding: 20px; border: 1.5px solid var(--ink); border-radius: 10px; background: #f1ebff; }
.operator-limit h2 { font-size: 18px; }
.operator-limit > p { margin: 8px 0; font-size: 13px; }
.operator-limit progress { display: block; width: 100%; height: 10px; margin: 12px 0 16px; accent-color: var(--coral); }
#operator-limits label { width: 100%; margin: 0; }
#operator-limits label + label { margin-top: 14px; }
.resource-details { margin-top: 12px; }
.resource-details summary { cursor: pointer; font-size: 12px; font-weight: 650; }
.operator-limit-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
#operator-limits button { margin: 0; }
#operator-limits-refresh { background: var(--lilac); }
#operator-worker-draining:empty { display: none; }
#operator-limit-message:empty { display: none; }
#operator-limit-message { flex-basis: 100%; margin: 0; font-size: 13px; font-weight: 600; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid #24212735; overflow-wrap: anywhere; }
.row:last-child { border-bottom: 0; }
.row p { min-width: 0; margin: 0; font-size: 13px; }
.row button { flex-shrink: 0; min-height: 35px; margin-right: 0; padding: 7px 11px; font-size: 12px; }
#message:not(:empty), #login-message:not(:empty), #account-message:not(:empty) {
  padding: 13px 15px;
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  background: #e9e0ff;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
dialog {
  width: min(650px, 94vw);
  max-height: calc(100dvh - 40px);
  padding: 25px;
  overflow: auto;
  border: 2px solid var(--ink);
  border-radius: 13px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 7px 7px 0 var(--ink);
}
dialog::backdrop { background: #24212770; backdrop-filter: blur(3px); }
#account-identity { overflow-wrap: anywhere; }
#operator-audit { max-height: 330px; overflow: auto; }
#operator-audit p { margin: 0; padding: 10px 0; border-bottom: 1px solid #24212735; font-size: 12px; overflow-wrap: anywhere; }
footer { max-width: 700px; margin: auto; padding: 21px 24px 28px; text-align: center; font-size: 11px; line-height: 1.7; color: #6a616b; }
[hidden] { display: none !important; }

@media (max-width: 650px) {
  header { min-height: 69px; gap: 15px; padding: 14px 18px; }
  header span { display: none; }
  header > a { margin-right: auto; font-size: 24px; }
  .two { grid-template-columns: 1fr; gap: 0; }
  main { padding: 18px 15px; }
  .heading, .row { flex-wrap: wrap; }
  .heading { gap: 12px; }
  .card { margin: 15px 0; padding: 19px; border-radius: 10px; }
  #auth { margin-top: 24px; padding: 23px; box-shadow: 4px 4px 0 var(--ink); }
  .grid { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  h1 { font-size: 26px; }
  dialog { padding: 20px; border-radius: 11px; box-shadow: 4px 4px 0 var(--ink); }
  dialog .heading { align-items: flex-start; }
  .pilot { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* Wusel accompanies sign-in and the area overview without covering controls. */
#auth.auth-shell { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: center; gap: 35px; max-width: 940px; padding: 35px; }
#auth.auth-shell::before { display: none; }
.auth-copy { min-width: 0; }
.auth-copy::before { content: "DEIN PLAN. DEIN ZUGANG."; display: inline-block; padding: 5px 8px; border: 1.5px solid var(--ink); border-radius: 4px; background: var(--lilac); font-size: 10px; font-weight: 850; letter-spacing: .7px; transform: rotate(-2deg); }
.auth-copy > p { max-width: 43ch; }
.auth-art { width: 100%; max-width: 340px; margin: 0; justify-self: center; }
.auth-art img { width: 100%; aspect-ratio: 1; }
.dashboard-art { width: 105px; margin: 0; flex: 0 0 auto; }
.dashboard-art img { width: 100%; aspect-ratio: 1; }
.region-fields { min-width: 0; margin: 22px 0; padding: 15px 18px; border: 1.5px solid #b6a2d6; border-radius: 10px; background: #f8f4ff; }
.region-fields legend { padding-inline: 7px; font-size: 13px; font-weight: 800; }
.region-fields .check { align-items: flex-start; font-size: 12px; }
.region-fields .check input { margin-top: 3px; }
.region-fields .help { margin-bottom: 0; }
#region-message:not(:empty) { padding: 12px; background: #ffe1d7; border-radius: 8px; font-size: 13px; }
#areas .card button { margin-top: 8px; }
.billing-admin { margin: 12px 0 32px; padding-top: 24px; border-top: 2px solid var(--ink); }
.billing-admin > .heading small, .billing-dialog .heading small { font-size: 10px; font-weight: 800; letter-spacing: 1px; }
.billing-metrics { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0; }
.billing-metrics > div { display: flex; flex-direction: column; gap: 8px; min-width: 150px; padding: 16px 20px; background: #eee6ff; border: 1.5px solid var(--ink); border-radius: 9px; }
.billing-metrics strong { font-size: 25px; letter-spacing: -.5px; }
.billing-config { margin-bottom: 24px; padding: 16px; border: 1.5px solid var(--ink); border-radius: 8px; background: #fffbef; }
.billing-admin summary, .billing-dialog summary { cursor: pointer; font-size: 13px; font-weight: 750; padding: 12px 0; }
.billing-methods { display: flex; flex-wrap: wrap; gap: 12px 22px; padding: 14px 18px; border: 1px solid #b6a2d6; border-radius: 8px; }
.billing-methods legend { padding: 0 6px; font-size: 12px; font-weight: 700; }
.billing-methods label { margin: 0; }
.billing-filter { min-width: 200px; margin: 0; font-size: 11px; }
.billing-filter select { min-height: 36px; padding: 8px 10px; font-size: 12px; }
.billing-scroll { overflow-x: auto; }
.billing-table { width: 100%; border-collapse: collapse; font-size: 12px; text-align: left; }
.billing-table th { background: #eee6ff; color: var(--ink); font-size: 11px; }
.billing-table th, .billing-table td { padding: 13px 12px; border-bottom: 1px solid #24212725; vertical-align: top; min-width: 100px; max-width: 260px; overflow-wrap: anywhere; }
.billing-table button { margin: 0; min-height: 32px; padding: 6px 9px; font-size: 11px; }
.billing-table a { display: block; margin-bottom: 7px; }
.billing-ok { color: #285d42; font-size: 12px; }
.billing-dialog { width: min(800px,94vw); }
.billing-status { display: inline-block; padding: 7px 12px; border: 1px solid var(--ink); border-radius: 6px; background: #efe8ff; font-size: 13px; font-weight: 700; }
.billing-contract { margin: 20px 0; padding: 20px; background: #fffbef; border: 1.5px solid var(--ink); border-radius: 9px; }
.billing-contract > strong { font-size: 29px; letter-spacing: -.7px; }
.billing-contract p { font-size: 13px; }
.billing-links, .billing-actions { display: flex; flex-wrap: wrap; gap: 10px 18px; font-size: 12px; }
.billing-links { margin-top: 12px; }
.billing-actions { margin: 16px 0; }
.billing-actions button { margin: 0; min-height: 35px; padding: 8px 11px; font-size: 12px; background: var(--lilac); }
#billing-settings-message:empty, #billing-message:empty, #operator-billing-message:empty { display: none; }
#billing-settings-message, #billing-message, #operator-billing-message { padding: 12px; border-radius: 7px; background: #eee6ff; font-size: 13px; line-height: 1.6; }
#dashboard > .heading > div { flex: 1; min-width: 180px; }
@media (max-width: 800px) {
  #auth.auth-shell { gap: 18px; padding: 26px; }
  .auth-art { max-width: 260px; }
}
@media (max-width: 650px) {
  #auth.auth-shell { grid-template-columns: 1fr; padding: 23px; gap: 14px; }
  .auth-art { max-width: 175px; }
  .dashboard-art { width: 75px; }
}

.database-config{margin:24px 0;padding:20px 0;border-top:1px solid #e8e0f1;border-bottom:1px solid #e8e0f1}.database-config details{margin:12px 0}.database-config textarea{box-sizing:border-box;width:100%;border:1px solid #d9cce9;border-radius:10px;padding:10px;font:inherit;resize:vertical}.database-actions{display:flex;gap:10px;flex-wrap:wrap}.database-config summary{cursor:pointer;font-weight:600}
