:root {
  color-scheme: light;
  --bg: #f5f7f6;
  --panel: #fff;
  --border: #dce4df;
  --text: #0c322c;
  --muted: #5d7068;
  --accent: #30ba78;
  --accent-dark: #00754b;
  --danger: #a82d19;
  --radius: 6px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-family: "SUSE", system-ui, sans-serif; color: var(--text); background: var(--bg); line-height: 1.5; }
button, input, select, textarea { font: inherit; }
a { color: var(--accent-dark); text-underline-offset: 3px; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
:focus-visible { outline: 3px solid #007f9b; outline-offset: 3px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 1.8rem; font-weight: 650; line-height: 1.25; margin-bottom: 6px; }
h2 { font-size: 1.1rem; font-weight: 650; margin-bottom: 8px; }
h3 { font-size: .95rem; font-weight: 650; margin-bottom: 8px; }
.skip-link { position: absolute; left: 12px; top: -100px; z-index: 100; padding: 8px 16px; background: white; }
.skip-link:focus { top: 8px; }
.demo-warning { padding: 10px 28px; background: #feccaf; border-bottom: 1px solid #f0ac83; color: #542611; display: flex; justify-content: center; flex-wrap: wrap; column-gap: 14px; font-size: .875rem; }
.demo-warning strong { font-weight: 750; }
.topbar { background: var(--text); color: white; padding: 14px max(28px, calc((100vw - 1120px) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { color: white; display: flex; align-items: center; gap: 16px; text-decoration: none; font-size: 1.2rem; font-weight: 600; }
.brand img { object-fit: contain; }
.brand small { display: block; font-size: .7rem; font-weight: 400; color: #b4d6c7; }
.session { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; font-size: .9rem; }
.button { display: inline-flex; justify-content: center; align-items: center; padding: 8px 15px; min-height: 40px; border: 1px solid transparent; border-radius: 4px; background: var(--accent-dark); color: white; font-weight: 600; font-size: .9rem; text-decoration: none; white-space: nowrap; }
.button:hover { background: #005c3b; }
.button.secondary { background: white; color: var(--text); border-color: #baccc2; }
.button.secondary:hover { background: #edf6f0; }
.button.ghost { border-color: #6b9480; color: white; background: transparent; }
.button.ghost:hover { background: #204b3e; }
.button.danger { background: transparent; border-color: #e8c3ba; color: var(--danger); }
.button.danger:hover { background: #fff2ee; }
main { max-width: 1176px; margin: 36px auto; padding: 0 28px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.field-hint { font-size: .85rem; color: var(--muted); margin-bottom: 12px; }
.section-heading p { margin-bottom: 0; }
.key-columns, .key-row { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(155px, .65fr) minmax(110px, .45fr) 146px; gap: 8px 20px; align-items: start; }
.key-columns { font-size: .75rem; color: var(--muted); padding: 0 20px 8px; }
.key-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.key-row { padding: 17px 20px; border-bottom: 1px solid var(--border); }
.key-row:last-child { border-bottom: 0; }
.key-name { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; min-width: 0; }
.key-name strong { overflow-wrap: anywhere; }
.key-kind { border: 1px solid #b3d6c0; border-radius: 3px; padding: 1px 6px; background: #f1f8f3; color: #315d44; font-size: .7rem; font-weight: 550; }
.key-kind.agent { background: #f0f5fa; border-color: #cad7e2; color: #385d77; }
.key-rate, .key-spend { font-size: .9rem; font-variant-numeric: tabular-nums; }
.key-rate small { display: block; color: var(--muted); font-size: .75rem; }
.key-actions { display: flex; justify-content: flex-end; gap: 6px; }
.key-actions .button { min-height: 34px; padding: 5px 11px; font-size: .8rem; }
.key-details { grid-column: 1 / -1; color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; }
.mobile-label { display: none; }
.empty { padding: 18px 20px; color: var(--muted); font-size: .9rem; margin: 0; }
.personal-section { padding: 22px 24px; margin: 26px 0 18px; background: #edf4ef; border-left: 3px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; }
.personal-section .field-hint { margin-bottom: 8px; }
.allocation-row { display: flex; align-items: start; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.allocation-row:last-child { border-bottom: 0; }
.allocation-title { font-size: .95rem; }
.allocation-rates { font-size: .87rem; margin-top: 4px; }
.allocation-meta { margin-top: 4px; font-size: .78rem; color: var(--muted); }
.read-only { font-size: .75rem; color: var(--muted); white-space: nowrap; padding-top: 4px; }
.disclosure { margin-top: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); }
summary { cursor: pointer; font-size: .95rem; font-weight: 600; padding: 16px 20px; }
summary:hover { background: #f2f7f4; }
.summary-note { color: var(--muted); font-size: .75rem; font-weight: 400; margin-left: 8px; }
.disclosure-body { padding: 2px 22px 20px; }
.disclosure-body h3 { margin-top: 16px; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .8rem; }
th, td { padding: 10px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; background: #f5f8f6; }
td small { color: var(--muted); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.status { font-size: .75rem; border-radius: 3px; background: #eef2ef; padding: 2px 6px; }
.status.settled { color: #206343; background: #edf6ee; }
.status.reserved, .status.pending, .status.uncertain { color: #755610; background: #fff4d6; }
.status.failed { color: var(--danger); background: #fff0ea; }
.login-panel { max-width: 510px; margin: 60px auto; padding: 30px; background: white; border: 1px solid var(--border); border-top: 3px solid var(--accent); border-radius: var(--radius); }
.login-panel .button { margin-bottom: 24px; }
.site-footer { max-width: 1176px; margin: 32px auto; padding: 0 28px; color: var(--muted); font-size: .75rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
dialog { width: min(560px, calc(100vw - 32px)); padding: 24px; color: var(--text); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 20px 80px #0c322c40; max-height: calc(100dvh - 48px); overflow-y: auto; }
dialog::backdrop { background: #092e2466; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.dialog-heading h2 { margin: 0; font-size: 1.25rem; overflow-wrap: anywhere; }
.icon-button { border: 0; border-radius: 4px; padding: 2px 10px; background: transparent; color: var(--muted); font-size: 1.5rem; }
.icon-button:hover { background: #edf4ef; }
.row { margin: 14px 0; }
label, legend { display: block; font-size: .86rem; font-weight: 600; margin-bottom: 5px; }
input, select, textarea { width: 100%; border: 1px solid #aabdb0; background: white; color: var(--text); padding: 9px 11px; border-radius: 4px; }
input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--accent-dark); flex-shrink: 0; }
.checkbox-row, .model-option { display: flex; align-items: center; gap: 8px; }
.checkbox-row label, .model-option label { margin: 0; font-weight: 400; }
.model-options { display: grid; gap: 8px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.restrictions { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin: 18px 0; }
.restrictions summary { padding: 12px 0; font-size: .85rem; }
.restrictions .summary-note { display: block; margin-left: 0; }
.input-action { display: flex; align-items: center; gap: 8px; }
.input-action input { min-width: 0; }
#limits-form, #monthly-form { border-top: 1px solid var(--border); padding-top: 18px; margin-top: 18px; }
.actions, .dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.dialog-actions { justify-content: flex-end; }
.secret { border: 1px solid #8fbc9f; border-left: 4px solid var(--accent-dark); background: #eff9f0; border-radius: var(--radius); padding: 20px; margin: 0 0 20px; }
.secret p { font-size: .85rem; margin-bottom: 10px; }
.secret textarea { font-family: ui-monospace, monospace; font-size: .85rem; resize: vertical; }
.error { border: 1px solid #eac0b6; background: #fff2ee; color: var(--danger); padding: 10px 12px; border-radius: 4px; font-size: .9rem; overflow-wrap: anywhere; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 32px); padding: 12px 18px; background: var(--text); color: white; border-radius: 5px; box-shadow: 0 3px 16px #0c322c30; z-index: 10; font-size: .9rem; }
@media (max-width: 800px) {
  .topbar { padding: 14px 20px; }
  main { margin-top: 26px; padding: 0 20px; }
  .key-columns { display: none; }
  .key-row { grid-template-columns: 1fr 1fr; gap: 10px 16px; }
  .key-name { grid-column: 1 / -1; }
  .key-actions { grid-column: 1 / -1; grid-row: 4; justify-content: flex-start; }
  .key-details { grid-row: 3; }
  .mobile-label { display: block; font-size: .7rem; color: var(--muted); }
  .site-footer { padding: 0 20px; }
}
@media (max-width: 520px) {
  .demo-warning { padding: 9px 16px; justify-content: flex-start; font-size: .78rem; }
  .topbar { padding: 12px 16px; flex-wrap: wrap; gap: 12px; }
  .brand { font-size: 1.05rem; }
  .session { width: 100%; gap: 8px; }
  .session #viewer-name { flex: 1; }
  .session .button { min-height: 34px; padding: 5px 10px; font-size: .8rem; }
  main { padding: 0 16px; }
  h1 { font-size: 1.5rem; }
  .section-heading { align-items: start; gap: 12px; }
  .section-heading .field-hint { font-size: .78rem; }
  .section-heading .button { padding: 8px 12px; }
  .key-row { padding: 16px; }
  .personal-section { padding: 18px; }
  .disclosure-body { padding: 0 16px 16px; }
  summary { padding: 15px 16px; }
  dialog { padding: 20px; }
  .login-panel { margin: 30px auto; padding: 24px; }
  .summary-note { display: block; margin-left: 0; }
}
