:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--background);
  letter-spacing: 0;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button, input, select { border-radius: 4px; }
button:disabled { cursor: wait; opacity: .55; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: 24px; font-weight: 650; line-height: 1.35; }
h2 { font-size: 17px; font-weight: 600; }
h3 { font-size: 14px; font-weight: 600; }
small { font-size: 12px; }
code, pre, .mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
svg.lucide { width: 18px; height: 18px; flex-shrink: 0; stroke-width: 1.7; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand img { flex-shrink: 0; image-rendering: auto; }
.brand strong { font-size: 18px; font-weight: 650; display: block; white-space: nowrap; }
.brand small { display: block; color: var(--muted); margin-top: 3px; }
.muted { color: var(--muted); }
.eyebrow { color: var(--muted); font-size: 11px; font-weight: 650; text-transform: uppercase; }
.topbar { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 28px; border-bottom: 1px solid var(--border); background: var(--surface); }
.account, .account > span { display: flex; align-items: center; gap: 10px; }
.account > span { max-width: 200px; overflow-wrap: anywhere; font-size: 13px; }
.icon-button { width: 34px; height: 34px; flex: 0 0 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; background: transparent; color: var(--muted); border-radius: 4px; }
.icon-button:hover { background: var(--subtle); color: var(--text); border-color: var(--border); }
.button { min-height: 38px; padding: 8px 14px; border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; border-radius: 4px; white-space: nowrap; }
.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.primary:hover { filter: brightness(.94); }
.secondary { background: var(--surface); color: var(--text); }
.secondary:hover { background: var(--subtle); }
input[type="text"], input[type="password"], select {
  border: 1px solid var(--border); color: var(--text); background: var(--surface); min-height: 40px; padding: 9px 12px; width: 100%; min-width: 0;
}
input::placeholder { color: var(--muted); opacity: .85; }
input[type="checkbox"] { accent-color: var(--accent); width: 15px; height: 15px; margin: 0; }
.password-field { position: relative; }
.password-field input { padding-right: 46px; }
.password-field .icon-button { position: absolute; right: 4px; top: 3px; }
.login-form { display: flex; flex-direction: column; gap: 9px; margin-top: 26px; }
.login-form > label { font-size: 13px; font-weight: 600; margin-top: 7px; }
.verification-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; }
.verification-heading label { font-size: 13px; font-weight: 600; }
.verification-heading > span { color: var(--muted); font-size: 11px; }
.challenge-field { background: var(--subtle); border: 1px solid var(--border); border-radius: 4px; padding: 10px 9px 10px 12px; display: flex; align-items: center; gap: 5px; }
.challenge-field code { font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; min-width: 0; flex: 1; }
.challenge-field > div { display: flex; }
.challenge-field .icon-button { width: 28px; height: 30px; flex-basis: 28px; }
.challenge-field svg { width: 15px; height: 15px; }
.nonce-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; }
.nonce-row .button { font-size: 12px; padding: 8px 10px; }
.field-status { min-height: 16px; font-size: 12px; color: var(--muted); }
.form-actions { display: flex; align-items: center; gap: 10px; }
.form-actions .primary { flex: 1; justify-content: space-between; }
.error-message { padding: 12px; margin-top: 18px; display: flex; align-items: flex-start; gap: 8px; background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-border); border-radius: 4px; font-size: 13px; line-height: 1.5; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.page-heading .eyebrow { margin-bottom: 7px; }
.page-heading p { color: var(--muted); font-size: 13px; margin-top: 8px; line-height: 1.5; }
.refresh-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.auto-control { display: flex; align-items: center; gap: 7px; font-size: 12px; white-space: nowrap; color: var(--muted); }
.sync-status { color: var(--success); font-size: 12px; display: inline-flex; align-items: center; gap: 6px; }
.sync-status::before, .status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.sync-status[data-state="error"] { color: var(--danger); }
.sync-status[data-state="paused"] { color: var(--muted); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-heading h2, .section-heading h3 { display: flex; align-items: center; gap: 9px; }
.section-heading > span { font-size: 12px; color: var(--muted); }
.table-scroll { overflow-x: auto; max-width: 100%; }
table { border-collapse: collapse; width: 100%; font-size: 13px; text-align: left; }
th { color: var(--muted); font-weight: 500; font-size: 11px; white-space: nowrap; background: var(--subtle); padding: 12px 16px; border-bottom: 1px solid var(--border); }
td { padding: 15px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; overflow-wrap: anywhere; }
td small { display: block; margin-top: 5px; color: var(--muted); }
tbody tr:last-child td { border-bottom: 0; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--success); white-space: nowrap; }
.status.warning { color: var(--warning); }
.status.off { color: var(--muted); }
.badge { padding: 3px 7px; border: 1px solid var(--border); border-radius: 3px; font-size: 11px; color: var(--muted); background: var(--surface); white-space: nowrap; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 28px; border-bottom: 1px solid var(--border); padding-bottom: 24px; gap: 24px; }
.metric small { color: var(--muted); display: block; font-size: 12px; margin-bottom: 9px; }
.metric strong { font-size: 26px; font-weight: 600; display: block; margin-bottom: 7px; }
.metric strong span { color: var(--muted); font-size: 13px; font-weight: 400; }
.metric p { color: var(--muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
progress { appearance: none; height: 5px; width: 100%; display: block; border: 0; border-radius: 2px; background: var(--border); overflow: hidden; margin-top: 10px; }
progress::-webkit-progress-bar { background: var(--border); }
progress::-webkit-progress-value { background: var(--accent); }
progress::-moz-progress-bar { background: var(--accent); }
.filter { position: relative; width: 250px; max-width: 100%; }
.filter svg { position: absolute; left: 10px; top: 11px; width: 16px; height: 16px; color: var(--muted); }
.filter input { padding-left: 34px; font-size: 12px; }
.tabs { display: flex; border-bottom: 1px solid var(--border); gap: 24px; margin-bottom: 24px; overflow-x: auto; }
.tabs button { padding: 12px 0; border: 0; border-radius: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 13px; white-space: nowrap; }
.tabs button[aria-selected="true"] { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.empty-state { padding: 28px 16px; color: var(--muted); font-size: 13px; text-align: center; }
.page-footer { display: flex; justify-content: space-between; gap: 12px; font-size: 11px; color: var(--muted); padding-top: 22px; border-top: 1px solid var(--border); margin-top: 28px; flex-wrap: wrap; }
.detail-list { display: grid; grid-template-columns: 130px minmax(0, 1fr); margin: 0; font-size: 13px; }
.detail-list dt, .detail-list dd { border-bottom: 1px solid var(--border); padding: 13px 0; margin: 0; overflow-wrap: anywhere; }
.detail-list dt { color: var(--muted); }
[hidden] { display: none !important; }
@media (max-width: 760px) {
  .topbar { padding: 12px 18px; gap: 12px; }
  .topbar .brand small { display: none; }
  .topbar .brand strong { font-size: 16px; }
  .account > span { max-width: 80px; font-size: 12px; }
  .account > span svg { display: none; }
  .page-heading { flex-direction: column; gap: 16px; margin-bottom: 22px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .metric strong { font-size: 23px; }
  .section-heading { flex-wrap: wrap; }
  .section-heading .filter { width: 100%; }
  .tabs { gap: 20px; }
  th, td { padding-left: 12px; padding-right: 12px; }
}
