/* ============================================================
   AUMC — base stylesheet
   Dark mode: Variant B Deep Slate per design-guidelines.md §7.2
   Surface base unified with KB at oklch(19% 0.008 260) / #252830
   No external dependencies. System font stack.
   ============================================================ */

/* --- Reset & base ----------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* html font-size intentionally omitted — inherits browser default (16px) so
   user zoom preferences and OS text scaling work correctly */

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* --- Links ------------------------------------------------ */
/* Scoped to a:not(.btn) — buttons carry text-decoration:none and their own
   colour rules; this rule must not reach them.
   --accent (#e8913a, L 74%) on --bg-elev-1 (#2c2f38, L 22%) = ~5.0:1 — passes
   WCAG AA for body text (≥ 4.5:1). Confirmed against existing WCAG table §7.2. */
a:not(.btn) {
  color: var(--accent);
  text-decoration: underline;
}

a:not(.btn):visited {
  color: var(--accent);
}

a:not(.btn):hover,
a:not(.btn):focus {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* --- Design tokens ---------------------------------------- */
:root {
  /* Surface — Variant B Deep Slate (unified with KB, §7.2) */
  --bg-page:    oklch(19% 0.008 260);   /* #252830 */
  --bg-elev-1:  oklch(22% 0.008 260);  /* #2c2f38 */
  --bg-elev-2:  oklch(27% 0.008 260);  /* #363940 */
  --bg-elev-3:  oklch(31% 0.008 260);  /* #3f4249 */
  --sidebar-bg: oklch(15% 0.008 260);  /* #1e2129 — darker than page, distinct topbar zone */

  /* Text */
  --text-primary:   oklch(91% 0.008 260);   /* #e6e8eb */
  --text-secondary: oklch(70% 0.008 260);   /* #a8aeb8 */
  --text-muted:     oklch(46% 0.008 260);   /* #6e757f */
  --text-accent:    oklch(74% 0.19 55);     /* #e8913a */

  /* Borders */
  --border-subtle:  oklch(33% 0.008 260);   /* #434750 */
  --border-default: oklch(38% 0.008 260);   /* #4d5058 */

  /* Brand accent */
  --accent:        oklch(74% 0.19 55);      /* #e8913a */
  --accent-hover:  oklch(80% 0.19 55);      /* #f4aa5e */
  --accent-active: oklch(66% 0.19 55);      /* #d07220 */
  --accent-text:   oklch(14% 0.05 55);      /* #1c0c00 — text on accent bg */
  --accent-subtle: oklch(74% 0.19 55 / 0.12);

  /* State — dark-surface variants
     Backgrounds are tinted at low opacity against --bg-elev-1 (#2c2f38)
     Borders use the semantic state color at reduced opacity
     Text uses the full semantic state color (all pass 3:1 on --bg-elev-1) */
  --color-error-bg:     oklch(60% 0.20 25 / 0.12);   /* danger tint */
  --color-error-border: oklch(60% 0.20 25 / 0.45);   /* danger at 45% */
  --color-error-text:   oklch(60% 0.20 25);           /* #f87171 — danger */

  --color-warning-bg:     oklch(78% 0.16 75 / 0.10); /* warning tint */
  --color-warning-border: oklch(78% 0.16 75 / 0.40); /* warning at 40% */
  --color-warning-text:   oklch(78% 0.16 75);         /* #fbbf24 — warning */

  --color-success-bg:     oklch(82% 0.14 160 / 0.10); /* success tint */
  --color-success-border: oklch(82% 0.14 160 / 0.40); /* success at 40% */
  --color-success-text:   oklch(82% 0.14 160);         /* #6ee7b7 — success */

  --color-danger-text:    oklch(60% 0.20 25);          /* delete action hover — danger */

  /* Shadows */
  --shadow-sm:     0 1px 2px oklch(0% 0 0 / 0.3);
  --shadow-md:     0 4px 12px oklch(0% 0 0 / 0.4);
  --shadow-accent: 0 0 0 3px oklch(74% 0.19 55 / 0.25);
  --shadow-focus:  0 0 0 3px oklch(74% 0.19 55 / 0.25);

  --radius:   8px;
  --shadow:   var(--shadow-sm);
}

/* --- Auth page layout ------------------------------------- */
.page-center {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px 16px;
}

/* --- Card ------------------------------------------------- */
.card {
  background: var(--bg-elev-1);
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 400px;
  padding: 40px 36px;
}

.card__header {
  text-align: center;
  margin-bottom: 28px;
}

.logo-mark {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-accent);
  background: oklch(74% 0.19 55 / 0.10);
  border: 1px solid oklch(74% 0.19 55 / 0.30);
  border-radius: 4px;
  padding: 3px 8px;
  margin-bottom: 12px;
}

.card__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.4;
}

.card__body {
  margin-top: 24px;
}

/* --- Buttons ---------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  padding: 12px 20px;
  transition: background-color 0.15s ease, color 0.15s ease,
              border-color 0.15s ease;
}

.btn--primary {
  background-color: var(--accent);
  color: var(--accent-text);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background-color: var(--accent-hover);
  color: var(--accent-text);
}

.btn--full {
  width: 100%;
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
  font-size: 14px;
  padding: 8px 14px;
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: var(--bg-elev-2);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

/* Focus ring for accessibility */
.btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* --- Alert ------------------------------------------------ */
.alert {
  border-radius: var(--radius);
  border: 1px solid;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 20px;
}

.alert--error {
  background-color: var(--color-error-bg);
  border-color: var(--color-error-border);
  color: var(--color-error-text);
}

.alert--warning {
  background-color: var(--color-warning-bg);
  border-color: var(--color-warning-border);
  color: var(--color-warning-text);
}

/* --- Console layout --------------------------------------- */
.layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  background: var(--sidebar-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 56px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border-subtle);
}

.topbar .logo-mark {
  color: var(--text-primary);
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  text-transform: none;
  letter-spacing: normal;
  font-size: 16px;
  margin-bottom: 0;
}

.topbar .btn--ghost {
  color: var(--text-secondary);
  border-color: var(--border-default);
  font-size: 13px;
}

.topbar .btn--ghost:hover,
.topbar .btn--ghost:focus-visible {
  background: var(--bg-elev-2);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.main {
  flex: 1;
  padding: 40px 24px;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
}

/* --- Welcome block ---------------------------------------- */
.welcome {
  margin-top: 16px;
}

.welcome__heading {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.welcome__sub {
  font-size: 15px;
  color: var(--text-secondary);
}

/* --- Responsive ------------------------------------------- */
@media (max-width: 480px) {
  .card {
    padding: 28px 20px;
  }

  .topbar {
    padding: 0 16px;
  }

  .main {
    padding: 24px 16px;
  }

  .welcome__heading {
    font-size: 22px;
  }
}


/* ============================================================
   ACCOUNTS SECTION
   Added: accounts management UI — cards, empty state, header,
   modal, forms, loading state, delete confirmation.
   ============================================================ */

/* --- Alert: success variant (mirrors error/warning pattern) - */
.alert--success {
  background-color: var(--color-success-bg);
  border-color: var(--color-success-border);
  color: var(--color-success-text);
}

/* --- Section header --------------------------------------- */
/*
   <div class="accounts-header">
     <h2 class="accounts-header__title">Analytics Accounts</h2>
     <button class="btn btn--primary accounts-header__action">Add account</button>
   </div>
*/
.accounts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 24px;
}

.accounts-header__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

/* --- Account card ----------------------------------------- */
/*
   <div class="account-card">
     <div class="account-card__top">
       <span class="account-card__badge">Yandex Metrica</span>
       <div class="account-card__actions">
         <button class="btn btn--ghost">Edit</button>
         <button class="btn btn--ghost btn--danger-ghost">Delete</button>
       </div>
     </div>
     <div class="account-card__name">My Main Counter</div>
     <div class="account-card__status">
       <span class="status-dot status-dot--connected"></span>
       <span class="account-card__status-label">Connected</span>
     </div>
     <div class="account-card__token">Token: ••••••••••••abcd</div>
   </div>
*/
.account-card {
  background: var(--bg-elev-1);
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px 20px 16px;
  margin-bottom: 16px;
}

.account-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 12px;
}

.account-card__badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-accent);
  background: oklch(74% 0.19 55 / 0.10);
  border: 1px solid oklch(74% 0.19 55 / 0.30);
  border-radius: 4px;
  padding: 2px 7px;
  flex-shrink: 0;
}

.account-card__actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.account-card__name {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.3;
}

/* Status row */
.account-card__status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.account-card__status-label {
  font-size: 13px;
  font-weight: 500;
}

/* Status dot */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot--connected {
  background-color: var(--color-success-text);
}

.status-dot--error {
  background-color: var(--color-error-text);
}

.status-dot--pending {
  background-color: var(--text-muted);
}

/* Status label colors — paired with dot modifiers */
.account-card__status--connected .account-card__status-label {
  color: var(--color-success-text);
}

.account-card__status--error .account-card__status-label {
  color: var(--color-error-text);
}

.account-card__status--pending .account-card__status-label {
  color: var(--text-muted);
}

/* Token hint */
.account-card__token {
  font-size: 12px;
  color: var(--text-muted);
  font-family: "SF Mono", "Consolas", "Menlo", monospace;
  letter-spacing: 0.02em;
}

/* Ghost danger button — delete action */
.btn--danger-ghost {
  color: var(--text-secondary);
}

.btn--danger-ghost:hover,
.btn--danger-ghost:focus-visible {
  color: var(--color-danger-text);
  border-color: var(--color-error-border);
  background: var(--color-error-bg);
}

/* --- Empty state ------------------------------------------ */
/*
   <div class="accounts-empty">
     <div class="accounts-empty__icon" aria-hidden="true"></div>
     <h3 class="accounts-empty__heading">No accounts yet</h3>
     <p class="accounts-empty__description">
       Connect your first analytics account to start managing access.
     </p>
     <button class="btn btn--primary">Add account</button>
   </div>
*/
.accounts-empty {
  text-align: center;
  padding: 64px 24px;
}

/* Pure-CSS decorative icon: stacked document shape */
.accounts-empty__icon {
  width: 48px;
  height: 56px;
  margin: 0 auto 24px;
  position: relative;
  background: var(--bg-elev-2);
  border: 2px solid var(--border-default);
  border-radius: 4px;
}

.accounts-empty__icon::before {
  content: "";
  position: absolute;
  top: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  background: var(--bg-elev-3);
  border-bottom: 2px solid var(--border-default);
  border-left: 2px solid var(--border-default);
  border-radius: 0 4px 0 0;
}

/* Three horizontal lines suggesting content */
.accounts-empty__icon::after {
  content: "";
  position: absolute;
  top: 20px;
  left: 8px;
  right: 8px;
  height: 2px;
  background: var(--border-subtle);
  box-shadow: 0 6px 0 var(--border-subtle), 0 12px 0 var(--border-subtle);
}

.accounts-empty__heading {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.accounts-empty__description {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 320px;
  margin: 0 auto 24px;
  line-height: 1.6;
}

/* --- Modal overlay ---------------------------------------- */
/*
   <div class="modal-overlay" id="modal-add-account">
     <div class="modal" role="dialog" aria-modal="true" aria-labelledby="modal-title">
       <div class="modal__header">
         <h3 class="modal__title" id="modal-title">Add account</h3>
         <button class="modal__close btn btn--ghost" aria-label="Close">&times;</button>
       </div>
       <div class="modal__body"> ... </div>
       <div class="modal__footer">
         <button class="btn btn--ghost">Cancel</button>
         <button class="btn btn--primary">Save</button>
       </div>
     </div>
   </div>
   JS: element.classList.add('modal--open') / remove('modal--open')
*/
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: oklch(8% 0.008 260 / 0.85);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
}

.modal-overlay.modal--open {
  display: flex;
}

/* Prevent body scroll while modal is open — JS adds this class to <body> */
body.modal-active {
  overflow: hidden;
}

.modal {
  background: var(--bg-elev-1);
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px oklch(0% 0 0 / 0.5);
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  /* Keep modal within viewport on short screens */
  max-height: calc(100vh - 48px);
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.modal__title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}

.modal__close {
  padding: 4px 8px;
  font-size: 20px;
  line-height: 1;
  color: var(--text-secondary);
  border-color: transparent;
  flex-shrink: 0;
}

.modal__close:hover,
.modal__close:focus-visible {
  color: var(--text-primary);
  border-color: var(--border-default);
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.modal__body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

/* --- Form fields ------------------------------------------ */
/*
   <div class="form-group">
     <label class="form-label" for="field-id">Label text</label>
     <input class="form-input" type="text" id="field-id" name="field_name">
     <span class="form-hint">Hint text goes here.</span>
     <span class="form-error">Validation error message.</span>
   </div>
   For select:
   <select class="form-input" id="field-platform" name="platform">
     <option value="yandex_metrica">Yandex Metrica</option>
     <option value="appmetrica" disabled>AppMetrica — Coming soon</option>
   </select>
   Inline feedback after API call:
   <div class="form-feedback form-feedback--success"> ... </div>
   <div class="form-feedback form-feedback--error"> ... </div>
*/
.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.4;
}

.form-input {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  color: var(--text-primary);
  background: var(--bg-elev-2);
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  padding: 10px 14px;
  line-height: 1.5;
  appearance: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--shadow-accent);
}

.form-input::placeholder {
  color: var(--text-muted);
}

/* Password and text inputs are intentionally identical — no special treatment */
.form-input[type="password"] {
  /* inherits all form-input rules; letter-spacing adjusted for bullet chars */
  letter-spacing: 0.1em;
}

/* Select: restore chevron removed by appearance:none — stroke colour updated for dark bg */
select.form-input {
  letter-spacing: normal;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23a8aeb8' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
  cursor: pointer;
  /* Dark bg for select dropdown options — browser handles option styling */
  color-scheme: dark;
}

/* Disabled option: coming-soon platforms */
select.form-input option:disabled {
  color: var(--text-muted);
}

/* Invalid state — applied by JS adding .is-invalid to the input */
.form-input.is-invalid {
  border-color: var(--color-error-border);
  box-shadow: 0 0 0 3px oklch(60% 0.20 25 / 0.15);
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 5px;
  line-height: 1.5;
}

.form-error {
  font-size: 12px;
  color: var(--color-error-text);
  margin-top: 5px;
  line-height: 1.5;
  /* Hidden by default; JS removes hidden attribute or toggles display */
  display: none;
}

.form-error.is-visible {
  display: block;
}

/* Inline form feedback — shown below form after API call */
.form-feedback {
  border-radius: var(--radius);
  border: 1px solid;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.5;
  margin-top: 20px;
}

.form-feedback--success {
  background-color: var(--color-success-bg);
  border-color: var(--color-success-border);
  color: var(--color-success-text);
}

.form-feedback--error {
  background-color: var(--color-error-bg);
  border-color: var(--color-error-border);
  color: var(--color-error-text);
}

/* --- Button: loading state -------------------------------- */
/*
   JS swaps button to:
   <button class="btn btn--primary btn--loading" disabled>
     <span class="btn__text">Verifying…</span>
   </button>
   The spinner is the ::after pseudo-element; btn__text provides the label.
*/
.btn--loading {
  position: relative;
  cursor: not-allowed;
  opacity: 0.85;
  /* Reserve space for spinner + text side by side */
  gap: 8px;
}

.btn--loading::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid oklch(14% 0.05 55 / 0.35);
  border-top-color: var(--accent-text);
  border-radius: 50%;
  animation: btn-spin 0.65s linear infinite;
  flex-shrink: 0;
  order: -1;   /* spinner precedes text */
}

/* Ghost loading variant — spinner color adapts */
.btn--ghost.btn--loading::after {
  border-color: oklch(70% 0.008 260 / 0.30);
  border-top-color: var(--text-secondary);
}

@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

/* --- Delete confirmation modal ---------------------------- */
/*
   Same .modal structure; add .modal--sm for narrower width.
   Warning content sits inside .modal__body with .modal-confirm class.
   <div class="modal-confirm">
     <p class="modal-confirm__message">
       Delete account <strong class="modal-confirm__name">My Main Counter</strong>?
     </p>
     <p class="modal-confirm__sub">This action cannot be undone.</p>
   </div>
   Footer buttons: Cancel (.btn--ghost) + Delete (.btn--primary .btn--destructive)
*/
.modal--sm {
  max-width: 360px;
}

.modal-confirm {
  /* No extra padding — inherits .modal__body */
}

.modal-confirm__message {
  font-size: 15px;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 6px;
}

.modal-confirm__name {
  font-weight: 700;
}

.modal-confirm__sub {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Destructive primary button — used only in delete confirm */
.btn--destructive {
  background-color: oklch(60% 0.20 25);   /* --danger / #f87171 */
  color: var(--text-primary);             /* near-white — spec §9.3, ~9:1 on danger */
}

.btn--destructive:hover,
.btn--destructive:focus-visible {
  background-color: oklch(52% 0.20 25);   /* darkened danger — hover state */
  color: oklch(91% 0.008 260);            /* --text-primary for legibility at darker bg */
}

/* --- Responsive: accounts section ------------------------- */
@media (max-width: 480px) {
  .accounts-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .account-card__top {
    flex-direction: column;
    gap: 8px;
  }

  .account-card__actions {
    align-self: flex-end;
  }

  .modal {
    max-width: 100%;
    margin: 0;
    border-radius: var(--radius);
  }

  .modal__header,
  .modal__body,
  .modal__footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .modal__footer {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .modal__footer .btn {
    width: 100%;
    justify-content: center;
  }
}


/* ============================================================
   CLASS-NAMING REFERENCE — Accounts Section
   (For Dima's implementation guide)
   ============================================================

   TOKENS IN :root (dark Variant B Deep Slate)
   --------------------------------------------
   --bg-page              Page background         #252830
   --bg-elev-1            Cards, panels           #2c2f38
   --bg-elev-2            Raised cards, inputs    #363940
   --bg-elev-3            Deepest raised surface  #3f4249
   --sidebar-bg           Topbar / sidebar bg     #1e2129
   --text-primary         Body text, headings     #e6e8eb
   --text-secondary       Supporting text         #a8aeb8
   --text-muted           Placeholders, hints     #6e757f
   --text-accent          Accent-colored text     #e8913a
   --border-subtle        Dividers, separators    #434750
   --border-default       Inputs, card borders    #4d5058
   --accent               Brand accent            #e8913a
   --accent-hover         Hover state             #f4aa5e
   --accent-active        Pressed state           #d07220
   --accent-text          Text on accent bg       #1c0c00
   --accent-subtle        Accent tint bg          rgba(232,145,58,0.12)
   --color-error-*        Dark-surface danger tints
   --color-warning-*      Dark-surface warning tints
   --color-success-*      Dark-surface success tints
   --color-danger-text    Danger text for delete hover

   SECTION HEADER
   --------------
   .accounts-header              flex row, space-between, bottom border divider
   .accounts-header__title       h2 — section title, left side
   .accounts-header__action      btn -- goes on the "Add account" primary button, right side

   ACCOUNT CARD
   ------------
   .account-card                 card wrapper (--bg-elev-1, border, shadow)
   .account-card__top            flex row — badge left, action buttons right
   .account-card__badge          platform label pill (accent tint)
   .account-card__actions        button group wrapper
   .account-card__name           prominent account name (17px bold)
   .account-card__status         flex row — dot + label; also add .account-card__status--connected
                                   / --error / --pending to this element to colour the label
   .status-dot                   8px circle; add .status-dot--connected / --error / --pending
   .account-card__status-label   status text node inside .account-card__status
   .account-card__token          token hint line (monospace, muted, 12px)
   .btn--danger-ghost            add to Delete button alongside .btn.btn--ghost — muted default,
                                   danger colour on hover

   EMPTY STATE
   -----------
   .accounts-empty               centred wrapper shown when account list is empty
   .accounts-empty__icon         pure-CSS document icon (::before = dog-ear, ::after = lines)
   .accounts-empty__heading      h3 — "No accounts yet"
   .accounts-empty__description  paragraph — short description text
   (Add account button uses standard .btn.btn--primary)

   MODAL
   -----
   .modal-overlay                fixed full-screen backdrop; hidden by default (display:none)
   .modal-overlay.modal--open    JS adds this class to show the overlay (display:flex)
   body.modal-active             JS adds this to <body> when modal is open to block scroll
   .modal                        centred dialog card (max-width 480px)
   .modal--sm                    narrower variant (max-width 360px) for delete confirmation
   .modal__header                flex row — title + close button
   .modal__title                 h3 inside header (id= for aria-labelledby)
   .modal__close                 × button; add .btn.btn--ghost to it
   .modal__body                  scrollable content area
   .modal__footer                flex row right-aligned — action buttons
   (use .modal-overlay id attr as hook for JS open/close targeting)

   DELETE CONFIRMATION
   -------------------
   .modal--sm                    narrower modal width
   .modal-confirm                wrapper inside .modal__body
   .modal-confirm__message       primary message paragraph
   .modal-confirm__name          <strong> wrapping the account name inside the message
   .modal-confirm__sub           secondary warning line ("This action cannot be undone.")
   .btn--destructive             add to Delete button alongside .btn.btn--primary

   FORM FIELDS
   -----------
   .form-group                   column flex wrapper for one field
   .form-label                   <label> — 13px semibold, links to input via for/id
   .form-input                   <input> or <select> — consistent height, border, focus ring
   .form-input[type="password"]  inherits .form-input; letter-spacing adds visual bullet spacing
   select.form-input             inherits .form-input; SVG chevron injected via background-image
                                   color-scheme: dark applied so browser option list renders dark
   option[disabled]              greyed colour for "Coming soon" options — no extra class needed
   .form-input.is-invalid        JS adds this class on validation failure (red border + glow)
   .form-hint                    <span> below input — muted 12px helper text (always visible)
   .form-error                   <span> below hint — error message; hidden until .is-visible added
   .form-error.is-visible        JS adds this class to reveal the error message
   .form-feedback                block below the whole form after API response
   .form-feedback--success       success variant (green tint)
   .form-feedback--error         error variant (red tint)

   BUTTON STATES
   -------------
   .btn--loading                 add to .btn alongside size/style modifier; disables pointer, shows spinner
                                   spinner is ::after pseudo-element (CSS animation, no JS library)
                                   add <span class="btn__text"> inside button to hold the label text
   .btn--ghost.btn--loading      spinner colour adapts to ghost palette (text-secondary border-top)
   .btn--destructive             danger-toned primary button; use only for irreversible delete action

   ============================================================ */

/* --- Motion sensitivity --------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
