@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('./fonts/inter-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('./fonts/inter-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
:root {
  color-scheme: light;
  --background: #f5f7fb;
  --surface: #fff;
  --ink: #0b1533;
  --muted: #697692;
  --border: #d6dce8;
  --accent: #5934ef;
  --accent-hover: #4824d5;
  --success: #0cbd77;
  --danger: #b83142;
  --radius: 9px;
  font-family: Inter, Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--background);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; display: flex; flex-direction: column; }
button, input { font: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: wait; }
button:focus-visible, a:focus-visible { outline: 3px solid #a894ff; outline-offset: 4px; }
button, a, input { touch-action: manipulation; }
svg { width: 24px; height: 24px; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; fill: none; flex-shrink: 0; }
[hidden] { display: none !important; }
.header { height: 80px; min-height: 80px; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; background: var(--surface); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 18px; color: var(--ink); text-decoration: none; font-size: 36px; font-weight: 700; letter-spacing: -.7px; }
.brand-mark { display: grid; place-items: center; width: 47px; height: 47px; border-radius: 8px; background: var(--accent); color: white; box-shadow: inset 0 0 8px #8a6cff; }
.brand-mark svg { width: 34px; height: 34px; stroke-width: 1.8; }
.header-caption { font-size: 18px; color: #26324e; margin-right: 8px; }
main { flex: 1; padding: 52px 24px 50px; }
.intro { text-align: center; margin: 0 auto 30px; }
h1 { font-size: clamp(32px, 4vw, 54px); letter-spacing: -1.8px; line-height: 1.2; margin: 0 0 21px; font-weight: 700; }
.intro p { font-size: 22px; line-height: 1.5; margin: 0; color: var(--muted); }
.workspace { width: 100%; max-width: 900px; margin: 0 auto; }
.add-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 34px 34px; }
h2 { margin: 0; font-size: 24px; line-height: 1.3; letter-spacing: -.5px; font-weight: 600; }
.add-panel h2 { margin-bottom: 21px; }
label { display: block; font-size: 18px; margin-bottom: 8px; color: #18233e; }
.input-row { display: flex; gap: 16px; }
input { min-width: 0; width: 100%; height: 62px; padding: 0 18px; border: 1px solid #afb9cd; border-radius: 6px; background: var(--surface); color: var(--ink); font-size: 20px; transition: border-color .15s, box-shadow .15s; }
input::placeholder { color: #8590a8; }
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px #5934ef16; }
input[aria-invalid="true"] { border-color: var(--danger); }
.primary-button { min-width: 186px; height: 62px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; border: 1px solid var(--accent); border-radius: 6px; background: var(--accent); color: white; font-size: 18px; font-weight: 500; white-space: nowrap; transition: background .15s; }
.primary-button:hover { background: var(--accent-hover); }
.primary-button:disabled { opacity: .65; }
.helper { margin: 13px 0 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.form-message { margin: 14px 0 0; font-size: 15px; line-height: 1.5; color: var(--danger); }
.form-message[data-success="true"] { color: #087e52; }
.accounts-section { margin-top: 25px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.refresh-button { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border: 0; background: transparent; color: var(--accent); font-size: 18px; min-height: 40px; }
.refresh-button:hover { color: var(--accent-hover); }
.refresh-button svg { width: 22px; height: 22px; }
.refresh-button:disabled { opacity: .55; }
.refresh-button[aria-busy="true"] svg { animation: spin 1s linear infinite; }
.accounts-list { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.accounts-list:empty { display: none; }
.account-row { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; align-items: center; column-gap: 30px; padding: 22px 24px; min-height: 104px; }
.account-row + .account-row { border-top: 1px solid var(--border); }
.server-icon { display: grid; place-items: center; width: 61px; height: 61px; border: 1px solid #cbc0ff; border-radius: 8px; color: #7452ff; background: #faf8ff; }
.server-icon svg { width: 41px; height: 41px; stroke-width: 1.15; }
.account-number { margin: 0 0 5px; font-size: 23px; letter-spacing: -.25px; line-height: 1.25; font-weight: 600; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.account-info p { margin: 0; color: var(--muted); font-size: 17px; }
.account-info .account-expiration { margin-top: 7px; font-size: 14px; line-height: 1.5; }
.account-expiration time { color: #36435e; font-variant-numeric: tabular-nums; white-space: nowrap; }
.account-controls { display: flex; align-items: center; gap: 38px; }
.state { display: flex; align-items: center; gap: 11px; min-width: 144px; font-size: 17px; color: #26324e; }
.state-dot { width: 13px; height: 13px; flex: 0 0 13px; border-radius: 50%; background: #a7aab1; }
.account-row[data-state="running"] .state-dot { background: var(--success); }
.account-row[data-state="unknown"] .state-dot { background: #d99a29; }
.toggle { position: relative; width: 70px; height: 38px; padding: 3px; border: 1px solid #99a1b2; border-radius: 24px; background: #a1a8b6; flex-shrink: 0; transition: background .18s, border-color .18s; }
.toggle-knob { display: block; width: 30px; height: 30px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #19223d33; transition: transform .18s; }
.toggle[aria-checked="true"] { background: var(--accent); border-color: var(--accent); }
.toggle[aria-checked="true"] .toggle-knob { transform: translateX(32px); }
.toggle:disabled { opacity: .5; }
.toggle[aria-busy="true"] .toggle-knob::after { content: ''; display: block; position: relative; top: 6px; left: 6px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #d9d0fa; border-top-color: var(--accent); animation: spin .7s linear infinite; }
.remove-button { display: grid; place-items: center; padding: 8px; width: 40px; height: 40px; border: 0; border-radius: 6px; background: transparent; color: #77849c; }
.remove-button:hover { background: #fff0f2; color: var(--danger); }
.remove-button:disabled { opacity: .4; }
.row-message { grid-column: 2 / -1; margin: 12px 0 0; color: var(--danger); font-size: 14px; line-height: 1.5; }
.empty-state { text-align: center; padding: 30px 20px; border: 1px dashed #cbd2e1; border-radius: var(--radius); background: #ffffff70; }
.empty-state .server-icon { margin: 0 auto 14px; width: 48px; height: 48px; }
.empty-state .server-icon svg { width: 30px; height: 30px; }
.empty-state h3 { margin: 0 0 8px; font-size: 18px; font-weight: 600; }
.empty-state p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.footnote { margin: 16px 0 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.notice { margin: 0 0 14px; padding: 12px 16px; background: #fff8e8; color: #785615; border: 1px solid #f0deb0; border-radius: 6px; font-size: 15px; line-height: 1.5; }
.footer { text-align: center; border-top: 1px solid var(--border); background: var(--surface); padding: 26px 20px 35px; }
.footer > span { font-size: 24px; font-weight: 700; }
.footer p { font-size: 18px; color: var(--muted); margin: 10px 0 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 700px) {
  .header { height: 68px; min-height: 68px; padding: 0 20px; }
  .brand { font-size: 25px; gap: 11px; letter-spacing: -.4px; }
  .brand-mark { width: 35px; height: 35px; border-radius: 6px; }
  .brand-mark svg { width: 26px; height: 26px; }
  .header-caption { font-size: 14px; margin-right: 0; }
  main { padding: 38px 20px; }
  .intro { margin-bottom: 27px; }
  h1 { font-size: 36px; line-height: 1.12; letter-spacing: -1.2px; max-width: 400px; margin: 0 auto 16px; text-wrap: balance; }
  .intro p { font-size: 17px; max-width: 370px; margin: auto; }
  .add-panel { padding: 22px; }
  h2 { font-size: 20px; }
  .add-panel h2 { margin-bottom: 20px; }
  label { font-size: 15px; }
  .input-row { flex-direction: column; gap: 10px; }
  input { height: 52px; font-size: 18px; padding: 0 14px; }
  .primary-button { width: 100%; height: 50px; font-size: 16px; }
  .helper { font-size: 13px; }
  .accounts-section { margin-top: 25px; }
  .refresh-button { font-size: 15px; gap: 7px; }
  .account-row { grid-template-columns: 44px minmax(0, 1fr); gap: 14px; padding: 20px; }
  .server-icon { width: 44px; height: 44px; border-radius: 6px; }
  .server-icon svg { width: 30px; height: 30px; }
  .account-number { font-size: 20px; margin-bottom: 4px; }
  .account-info p { font-size: 14px; }
  .account-info .account-expiration { font-size: 13px; }
  .account-controls { grid-column: 1 / -1; gap: 20px; }
  .state { font-size: 15px; flex: 1; min-width: 0; }
  .state-dot { width: 10px; height: 10px; flex-basis: 10px; }
  .toggle { width: 62px; height: 34px; }
  .toggle-knob { width: 26px; height: 26px; }
  .toggle[aria-checked="true"] .toggle-knob { transform: translateX(28px); }
  .toggle[aria-busy="true"] .toggle-knob::after { top: 4px; left: 4px; }
  .remove-button { width: 34px; height: 34px; }
  .row-message { grid-column: 1 / -1; margin-top: 0; }
  .footnote { font-size: 13px; }
  .footer { padding: 22px 20px; }
  .footer > span { font-size: 20px; }
  .footer p { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
