/* Wingspay Auth — base styles.
 *
 * This repository is new (created 2026-07-26, per
 * API_TOKENS_SCREEN.md §0 / MIGRATION_LOG.md AD-016). Its tokens and
 * authenticated-shell classes below are NOT invented here — they are
 * copied verbatim from wingspay-site (design tokens) and
 * wingspay-dashboard (the .dash-topbar/.dash-sidebar/.dash-main
 * "logged-in app" shell, since a Auth screen a person reaches while
 * signed in is the same kind of surface as Dashboard's, not the
 * marketing site's public <header role="banner">). Where this file
 * diverges from either source, the diff is called out in a comment.
 *
 * Platform Components (Copy Button, Secret Field, Token Row) are NOT
 * in this file — they ship as their own CSS files under components/,
 * copied from wingspay-site/components/ per the "components are
 * copied into consumer repos" strategy already documented in each
 * component's own README.
 */

:root{
  --navy:#0B1226;
  --navy-2:#0F1830;
  --ink:#1A2035;
  --ink-soft:#4A5568;
  --line:#DDE0E8;
  --line-dark:rgba(255,255,255,.12);
  --bg:#F1F0EC;
  --bg-soft:#E8E6DF;
  --surface:#F7F5F1;
  --text-on-dark:#ECEEF2;
  --shadow-1:0 1px 2px rgba(15,22,38,.05), 0 4px 12px rgba(15,22,38,.08);
  --shadow-2:0 2px 6px rgba(15,22,38,.06), 0 12px 28px rgba(15,22,38,.12);
  --shadow-3:0 4px 12px rgba(15,22,38,.10), 0 24px 56px rgba(15,22,38,.20);
  --gold:#C9952F;
  --gold-soft:#E0B05A;
  --gold-hover:#D29F40;
  --gold-text:#84621E;
  --status-operational:#2E9E5B; /* required by components/copy-button/ — see its README */
  --surface-code:#1D2438; /* required by components/secret-field/ — documented as a real, general-purpose Design Token in wingspay-site/engineering/architecture/DESIGN_TOKENS.md's Surface System table, not private to this component */
  --surface-menu-mobile:#111B39; /* mobile nav panel, copied from wingspay-site's own token — was a fallback-only value before, now a real token like the reference has */
  --surface-dark:#0F1726; /* lang-pending-toast, copied from wingspay-site's own token */
  --shadow-overlay-dark:0 2px 8px rgba(0,0,0,.45), 0 16px 40px rgba(0,0,0,.35);
  --shadow-btn-hover:0 2px 6px rgba(11,18,38,.18), 0 10px 24px rgba(11,18,38,.24);
  --shadow-btn-active:0 2px 4px rgba(11,18,38,.16), 0 4px 12px rgba(11,18,38,.20);
  --shadow-btn-ghost-hover:0 2px 6px rgba(0,0,0,.14), 0 10px 24px rgba(0,0,0,.20);
  --shadow-btn-ghost-active:0 2px 4px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.16);
  --max:1180px;
}

*{box-sizing:border-box;margin:0;padding:0;}
html{height:100%;scroll-behavior:smooth;}
body{
  background:var(--bg);
  color:var(--ink);
  font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
  font-size:15px;
  line-height:1.5;
  /* Sticky-footer pattern, not a min-height number on .auth-wrap and
   * not "no constraint at all" (both tried, both wrong -- see
   * README): body is a min-height:100vh flex column, <main> is the
   * only flex:1 child, so it grows to fill any leftover vertical
   * space and the footer is pushed to the bottom on short content /
   * tall viewports (4K), while on tall content / short viewports
   * (1366×768 laptop) main simply doesn't grow and the page scrolls
   * normally -- no layout shift either way, no magic px number. */
  min-height:100vh;
  display:flex;
  flex-direction:column;
}
main{flex:1 0 auto;}
footer{flex-shrink:0;}
a{color:inherit;text-decoration:none;}
button{font-family:inherit;}

/* Missing entirely until this fix -- root cause of the header/footer
 * "spread across the screen" bug found in manual testing. Every other
 * repo (site, dashboard, docs) has this; it was simply never copied
 * here. Centers .nav/.footer-grid/.footer-bottom content instead of
 * letting it span the full viewport width. */
.wrap{max-width:var(--max);margin:0 auto;padding:0 28px;}

.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;}

.logo{display:flex;align-items:center;gap:10px;font-family:'Space Grotesk',sans-serif;font-weight:700;font-size:18px;color:var(--text-on-dark);letter-spacing:.01em;}
.logo-text span{color:var(--gold-soft);}
.section-badge{display:inline-flex;align-items:center;padding:2px 8px;border-radius:4px;background:rgba(224,176,90,.12);color:var(--gold-soft);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;margin-left:10px;transition:background .15s ease,color .15s ease;}
.section-badge:hover{background:rgba(224,176,90,.22);color:var(--text-on-dark);}

/* ---- Authenticated shell (copied from wingspay-dashboard, with one
 * documented, intentional exception -- see .dash-topbar below) ---- */
:root{
  --auth-sidebar-width:216px;
  --auth-content-max-width:1140px;
  --auth-content-padding:48px;
}

/* Matches wingspay-dashboard's own .dash-topbar-inner -- as of
 * 2026-07-26, that canonical source was fixed directly (not patched
 * around here) after the person named its full-viewport-width
 * alignment as a real defect, more than once. Before that fix, this
 * file went back and forth: aligned locally, reverted to match the
 * (then-still-flawed) canonical version exactly, restored again --
 * see git history / README's own "Header alignment" note for the
 * full account. Now that wingspay-dashboard's source itself is
 * fixed, this is no longer a documented divergence from canon; it's
 * just a normal copy of it, the way every other shared element here
 * should be. Per CANONICAL_COMPONENTS_POLICY.md: "a canonical
 * implementation may contain defects" -- the fix belongs at the
 * source, propagated after, not preserved locally-only or copied
 * forward once found. */
.dash-shell{display:flex;min-height:100vh;background:var(--bg);}
.dash-topbar{position:fixed;top:0;left:0;right:0;height:64px;background:var(--navy);border-bottom:1px solid var(--line-dark);z-index:100;}
.dash-topbar-brand{position:absolute;left:14px;top:50%;transform:translateY(-50%);display:flex;align-items:center;}
.dash-topbar-inner{
  margin-left:var(--auth-sidebar-width);
  width:calc(100% - var(--auth-sidebar-width));
  max-width:calc(var(--auth-content-max-width) - var(--auth-content-padding));
  height:100%;
  display:flex;
  align-items:center;
  justify-content:flex-end;
}
.dash-topbar .logo{gap:8px;}
.dash-topbar-right{display:flex;align-items:center;gap:16px;font-size:13.5px;color:#B7BECF;}
.dash-user{position:relative;display:flex;align-items:center;gap:10px;padding-right:16px;border-right:1px solid var(--line-dark);}
.dash-user-avatar{width:30px;height:30px;border-radius:50%;background:var(--gold);color:var(--navy);border:none;padding:0;font-family:inherit;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:700;flex-shrink:0;}
.dash-user-menu{display:none;position:absolute;top:calc(100% + 12px);right:0;min-width:210px;background:var(--surface);border:1px solid var(--line);border-radius:8px;box-shadow:var(--shadow-2);padding:12px;z-index:600;}
.dash-user-menu.is-open{display:block;}
.dash-user-menu-info{display:flex;flex-direction:column;line-height:1.35;padding-bottom:10px;margin-bottom:10px;border-bottom:1px solid var(--line);}
.dash-user-menu-name{font-size:13.5px;color:var(--ink);font-weight:600;}
.dash-user-menu-email{font-size:12px;color:var(--ink-soft);}
.dash-user-menu-logout{display:block;font-size:13.5px;color:var(--ink);}
.dash-user-menu-logout:hover{color:var(--gold-text);}
.dash-user-info{display:flex;flex-direction:column;line-height:1.35;}
.dash-user-name{font-size:13.5px;color:var(--text-on-dark);font-weight:600;}
.dash-user-email{font-size:12px;color:#9AA3B6;}
.dash-logout{color:#B7BECF;font-size:13.5px;}
.dash-logout:hover{color:var(--text-on-dark);}

.dash-sidebar{position:fixed;top:64px;bottom:0;left:0;width:var(--auth-sidebar-width);background:var(--surface);border-right:1px solid var(--line);padding:24px 14px;overflow-y:auto;}
.dash-sidebar a{display:flex;align-items:center;gap:11px;padding:10px 14px;border-radius:6px;color:var(--ink-soft);font-size:14.5px;margin-bottom:2px;transition:background .15s ease,color .15s ease;}
.dash-sidebar a svg{width:17px;height:17px;flex-shrink:0;}
.dash-sidebar a.is-active{background:var(--bg-soft);color:var(--ink);font-weight:600;}
.dash-sidebar a:hover{color:var(--ink);background:var(--bg-soft);}
.dash-sidebar a:focus-visible{outline:2px solid var(--gold-text);outline-offset:-2px;}
.dash-sidebar-divider{height:1px;background:var(--line);margin:12px 10px;}
.dash-sidebar-disabled{display:flex;align-items:center;gap:11px;padding:10px 14px;border-radius:6px;color:var(--ink-soft);font-size:14.5px;margin-bottom:2px;opacity:.55;cursor:default;}
.dash-sidebar-disabled svg{width:17px;height:17px;flex-shrink:0;}
.dash-sidebar-disabled span:not(.badge-soon){flex:1;}
.badge-soon{display:inline-flex;align-items:center;padding:2px 9px;border-radius:20px;background:var(--bg-soft);color:var(--ink-soft);font-size:11px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;white-space:nowrap;flex-shrink:0;}

.dash-main{margin-left:var(--auth-sidebar-width);padding-top:64px;flex:1;min-width:0;overflow-x:hidden;}
/* NOT centered (margin:auto tried and reverted, manual testing
 * 2026-07-26): centering the content area within the space next to
 * the sidebar creates dead zones on BOTH sides (sidebar | gap |
 * content | gap), not the Stripe/GitHub/Linear pattern this is meant
 * to match. Content stays anchored to the sidebar; max-width only
 * prevents line-length from getting unreadably wide on very large
 * screens. Shares --auth-content-max-width/--auth-content-padding
 * with .dash-topbar-inner again -- see that rule's own comment for
 * why (an intentional divergence from wingspay-dashboard's current
 * topbar, not a rediscovered mistake). */
.dash-main-inner{width:100%;padding:44px var(--auth-content-padding);max-width:var(--auth-content-max-width);}

.dash-banner{display:flex;align-items:flex-start;gap:10px;background:var(--bg-soft);border:1px solid var(--line);border-radius:8px;padding:13px 18px;font-size:13.5px;color:var(--ink-soft);margin-bottom:22px;line-height:1.55;}
.dash-card{background:var(--surface);border:1px solid var(--line);border-radius:8px;padding:26px 28px;margin-bottom:20px;}
.dash-card-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px;gap:12px;}
.dash-card-title h3{font-size:16px;margin:0;}
.dash-banner svg{width:16px;height:16px;flex-shrink:0;margin-top:2px;color:var(--gold-text);}

/* ---- Pulled from wingspay-dashboard's canonical styles.css (§3a
 * Platform Parity Audit, SANDBOX_ARCHITECTURE.md) -- these rules exist
 * on the canonical App Shell but were absent from wingspay-auth's copy
 * (Auth never happened to use dash-row-2/dash-badge/dash-kv-row on any
 * of its own pages, so the gap was invisible until Sandbox's Overview
 * page needed them). Copied verbatim from source, not reinvented. */
.dash-row-2{display:grid;grid-template-columns:1.1fr 1fr;gap:20px;margin-bottom:20px;}
.dash-badge{display:inline-flex;align-items:center;padding:3px 10px;border-radius:20px;font-size:12px;font-weight:600;white-space:nowrap;}
.dash-badge-amber{background:#FCF3E3;color:#8A5A12;}
.dash-badge-green{background:#E7F5EC;color:#1F7A44;}
.dash-badge-gray{background:var(--bg-soft);color:var(--ink-soft);}
.dash-kv-row{display:flex;align-items:center;justify-content:space-between;padding:13px 0;border-bottom:1px solid var(--line);}
.dash-kv-row:last-child{border-bottom:none;}
.dash-kv-label{font-size:13.5px;color:var(--ink-soft);}
.dash-kv-value{font-size:14px;color:var(--ink);font-weight:600;}
.dash-table-note{margin-top:14px;font-size:12.5px;color:var(--ink-soft);font-style:italic;}

/* ---- Page-level content ---- */

.auth-page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:28px;flex-wrap:wrap;}
.auth-page-head h1{font-size:22px;font-weight:600;margin-bottom:6px;}
.auth-page-head p{font-size:14px;color:var(--ink-soft);}
.auth-page-head .btn-primary{flex-shrink:0;}

.btn{display:inline-flex;align-items:center;justify-content:center;padding:13px 26px;border-radius:4px;font-size:14.5px;font-weight:600;border:1px solid transparent;cursor:pointer;transition:background .2s ease,border-color .2s ease,transform .2s ease,box-shadow .2s ease;}
.btn-primary{background:var(--gold);color:var(--navy);border-color:transparent;}
.btn-primary:hover{background:var(--gold-hover);border-color:rgba(255,255,255,.4);transform:translateY(-3px);box-shadow:var(--shadow-btn-hover),inset 0 1px 0 rgba(255,255,255,.4);}
.btn-primary:active{background:var(--gold);border-color:rgba(255,255,255,.2);transform:translateY(-1px);box-shadow:var(--shadow-btn-active);}
.btn-primary:focus-visible{outline:2px solid var(--gold-soft);outline-offset:3px;}
.btn-ghost{border-color:rgba(255,255,255,.3);color:var(--text-on-dark);}
.btn-ghost:hover{border-color:var(--gold-soft);background:rgba(255,255,255,.06);transform:translateY(-3px);box-shadow:var(--shadow-btn-ghost-hover);}
.btn-ghost:active{transform:translateY(-1px);box-shadow:var(--shadow-btn-ghost-active);}
.btn-ghost:focus-visible{outline:2px solid var(--gold-soft);outline-offset:3px;}

.field{background:var(--bg);border:1px solid var(--line);border-radius:4px;padding:13px 14px;color:var(--ink);font-family:inherit;font-size:14.5px;width:100%;}
.field:focus{outline:2px solid var(--gold-text);outline-offset:2px;border-color:var(--gold-text);}
.field.field-invalid{border-color:#D14343;}
.field.field-invalid:focus{outline-color:#D14343;}
.field-wrap{position:relative;}
.field-wrap .field{padding-right:44px;}
.password-toggle{position:absolute;top:50%;right:6px;transform:translateY(-50%);background:none;border:none;padding:8px;cursor:pointer;color:var(--ink-soft);display:flex;align-items:center;justify-content:center;border-radius:4px;}
.password-toggle:focus-visible{outline:2px solid var(--gold-text);outline-offset:2px;}
.password-toggle:hover{color:var(--ink);}
.password-toggle svg{width:19px;height:19px;}
.auth-field-group{margin-bottom:18px;}
.auth-field-label{display:block;font-size:13px;font-weight:600;margin-bottom:6px;color:var(--ink);}
.field-error-text{display:none;color:#B23A3A;font-size:12.5px;margin-top:6px;line-height:1.4;}
.form-error-banner{display:none;background:#FDECEC;border:1px solid #F3C6C6;color:#9A2C2C;font-size:13.5px;padding:12px 14px;border-radius:6px;margin-bottom:18px;line-height:1.5;}
.btn-spinner{display:inline-block;width:13px;height:13px;border:2px solid rgba(11,18,38,.25);border-top-color:var(--navy);border-radius:50%;margin-right:8px;vertical-align:-2px;animation:btn-spin .6s linear infinite;}
@keyframes btn-spin{to{transform:rotate(360deg);}}
.btn[disabled]{cursor:default;opacity:.85;}

/* ---- Login / auth-card (copied from wingspay-dashboard's login.html) ---- */
/* No forced min-height (was calc(100vh - 78px - 260px)) -- that
 * pinned the footer to the bottom of the viewport regardless of
 * content, producing a large dead zone on any screen taller than the
 * card. The footer now simply follows the card, like the rest of the
 * platform's pages. */
.auth-wrap{display:flex;align-items:center;justify-content:center;padding:70px 20px;background:var(--bg);}
.auth-card{width:100%;max-width:420px;background:var(--surface);border:1px solid var(--line);border-radius:8px;padding:40px 36px;box-shadow:var(--shadow-2);}
.auth-logo{display:flex;align-items:center;gap:10px;font-family:'Space Grotesk',sans-serif;font-weight:700;font-size:18px;color:var(--navy);margin-bottom:28px;}
.auth-logo .logo-text span{color:var(--gold);}
.auth-card h1{font-size:22px;margin-bottom:8px;}
.auth-card .auth-sub{color:var(--ink-soft);font-size:14.5px;margin-bottom:28px;}
.auth-forgot{display:block;text-align:right;font-size:13.5px;color:var(--gold-text);font-weight:600;margin-top:10px;text-decoration:underline;text-decoration-color:transparent;text-underline-offset:3px;transition:text-decoration-color .15s ease;}
.auth-forgot:hover,.auth-forgot:focus-visible{text-decoration-color:currentColor;}
.auth-forgot:focus-visible{outline:2px solid var(--gold-text);outline-offset:3px;border-radius:2px;}
.auth-submit{width:100%;border:none;cursor:pointer;margin-top:8px;}
/* ---- Public header + footer (copied verbatim from
 * wingspay-dashboard/login.html, itself copied from the marketing
 * site's Reference Component — see COMPONENT_REGISTRY.md). Used only
 * on index.html (Login), the one page in this repo a person reaches
 * before authenticating. pages/api-tokens.html uses the authenticated
 * shell (.dash-topbar/.dash-sidebar) instead, matching
 * wingspay-dashboard/dashboard.html's own split between its
 * (marketing-header) login.html and its (dash-topbar) dashboard.html.
 *
 * Deliberate deviation from the Reference Component, per its own
 * documented exception ("unless a deviation is explicitly required by
 * functionality"): the lang-switcher is omitted entirely, not
 * included non-functional — this repo has no es/ mirror yet
 * (README's Known Limitations). Everything else matches exactly. ---- */
header{background:var(--navy);border-bottom:1px solid transparent;box-shadow:none;position:sticky;top:0;z-index:100;}
.nav{display:flex;align-items:center;justify-content:space-between;height:78px;}
.nav-links{display:flex;gap:34px;font-size:14.5px;font-weight:500;color:#B7BECF;}
.nav-links-mobile-extra{display:none;}
.nav-links > a{position:relative;}
.nav-links > a::after{content:'';position:absolute;left:0;bottom:-6px;width:100%;height:1px;background:var(--gold-soft);opacity:0;transition:opacity .12s ease;}
.nav-links > a:hover{color:var(--text-on-dark);}
.nav-links > a:hover::after{opacity:1;}
.nav-cta{display:inline-flex;align-items:center;padding:10px 22px;background:var(--gold);color:var(--navy);border-radius:4px;font-size:14px;font-weight:600;white-space:nowrap;border:1px solid transparent;transition:background .2s ease,border-color .2s ease,transform .2s ease,box-shadow .2s ease;}
.nav-cta:hover{background:var(--gold-hover);border-color:rgba(255,255,255,.4);transform:translateY(-3px);box-shadow:var(--shadow-btn-hover),inset 0 1px 0 rgba(255,255,255,.4);}
.nav-cta:active{background:var(--gold);border-color:rgba(255,255,255,.2);transform:translateY(-1px);box-shadow:var(--shadow-btn-active);}
.nav-cta:focus-visible{outline:2px solid var(--gold-soft);outline-offset:3px;}

.lang-switcher{display:flex;align-items:center;gap:6px;margin-right:12px;}
.lang-btn{padding:0;font-size:13px;font-weight:500;letter-spacing:.04em;color:#6B7490;cursor:pointer;background:transparent;border:none;font-family:inherit;transition:color .15s ease;}
.lang-btn:visited{color:#6B7490;}
.lang-btn:hover{color:#B7BECF;}
.lang-active{color:var(--gold-soft) !important;}
.lang-active:visited{color:var(--gold-soft) !important;}
.lang-sep{font-size:12px;color:#3A4158;user-select:none;}
.lang-more{position:relative;display:flex;margin-left:2px;}
.lang-more-trigger{display:flex;align-items:center;gap:2px;padding:11px 4px;margin:-11px -4px -11px 0;background:transparent;border:none;color:#6B7490;cursor:pointer;border-radius:4px;font-family:inherit;transition:color .15s ease;}
.lang-more-trigger:hover{color:#B7BECF;}
.lang-more-trigger:focus-visible{outline:2px solid var(--gold-soft);outline-offset:2px;}
.lang-more-trigger .icon-chevron{transition:transform .2s ease;}
.lang-more-trigger[aria-expanded="true"] .icon-chevron{transform:rotate(180deg);}
.lang-more-menu{position:absolute;top:calc(100% + 12px);right:0;min-width:180px;max-width:240px;max-height:280px;overflow-y:auto;background:var(--surface);border:1px solid var(--line);border-radius:8px;box-shadow:var(--shadow-2);padding:6px;z-index:600;opacity:0;visibility:hidden;transform:translateY(-6px);transition:opacity .15s ease,transform .15s ease,visibility 0s linear .15s;}
.lang-more-menu.is-open{opacity:1;visibility:visible;transform:translateY(0);transition:opacity .15s ease,transform .15s ease;}
.lang-more-item{display:flex;align-items:center;gap:8px;width:100%;padding:8px 10px;border-radius:5px;font-size:13.5px;color:var(--ink);text-decoration:none;background:transparent;border:none;text-align:left;cursor:pointer;font-family:inherit;box-sizing:border-box;}
a.lang-more-item:hover{background:var(--bg-soft);}
a.lang-more-item:focus-visible{outline:2px solid var(--gold-text);outline-offset:-2px;}
.lang-more-check{width:14px;font-size:12px;color:var(--gold-text);flex-shrink:0;}
.lang-more-code{font-weight:600;width:22px;flex-shrink:0;color:var(--ink-soft);}
.lang-more-name{flex:1;}
.lang-more-soon{cursor:default;color:var(--ink-soft);}
.lang-more-badge{font-size:10.5px;font-weight:600;letter-spacing:.03em;text-transform:uppercase;color:var(--ink-soft);background:var(--bg-soft);border-radius:20px;padding:2px 8px;flex-shrink:0;}
.lang-more-sep{height:1px;background:var(--line);margin:6px 2px;}

.lang-pending-toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%) translateY(12px);z-index:9998;display:flex;align-items:center;gap:14px;background:var(--surface-dark);color:#D8DCE8;border:1px solid rgba(224,176,90,.25);border-radius:8px;padding:12px 16px;font-size:13.5px;box-shadow:var(--shadow-3);opacity:0;visibility:hidden;transition:opacity .2s ease,transform .2s ease,visibility 0s linear .2s;max-width:calc(100vw - 32px);}
.lang-pending-toast.is-visible{opacity:1;visibility:visible;transform:translateX(-50%) translateY(0);transition:opacity .2s ease,transform .2s ease;}
.lang-pending-toast-close{background:transparent;border:none;color:#8A93A8;cursor:pointer;font-size:16px;line-height:1;padding:2px;flex-shrink:0;}
.lang-pending-toast-close:hover{color:var(--text-on-dark);}
.nav-login{display:inline-flex;align-items:center;font-size:14px;font-weight:500;color:#C3C9D6;white-space:nowrap;transition:color .15s ease;position:relative;}
.nav-login::after{content:'';position:absolute;left:0;bottom:-6px;width:100%;height:1px;background:var(--gold-soft);opacity:0;transition:opacity .12s ease;}
.nav-login:hover{color:var(--text-on-dark);}
.nav-login:hover::after,.nav-login:focus-visible::after{opacity:1;}
.menu-toggle{display:none;flex-direction:column;justify-content:center;gap:5px;width:34px;height:34px;background:transparent;border:none;padding:0;cursor:pointer;flex-shrink:0;}
.menu-toggle span{display:block;width:100%;height:2px;background:#fff;border-radius:2px;transition:transform .2s ease,opacity .2s ease;}
.menu-toggle.is-open span:nth-child(1){transform:translateY(7px) rotate(45deg);}
.menu-toggle.is-open span:nth-child(2){opacity:0;}
.menu-toggle.is-open span:nth-child(3){transform:translateY(-7px) rotate(-45deg);}

footer{background:var(--navy);color:#9AA3B6;padding:60px 0 30px;}
.footer-brand{padding-bottom:28px;margin-bottom:28px;border-bottom:1px solid var(--line-dark);}
.footer-brand .logo{margin-bottom:14px;}
.footer-brand p{font-size:14px;max-width:340px;color:#9AA3B6;}
.footer-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:32px;padding-bottom:44px;border-bottom:1px solid var(--line-dark);}
.footer-col h4{font-family:'Inter',sans-serif;font-size:13px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:#6E7790;margin-bottom:18px;}
.footer-col a{display:block;font-size:14.5px;color:#C3C9D6;margin-bottom:11px;}
.footer-col a:hover{color:var(--gold-soft);}
.footer-bottom{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:10px 24px;padding-top:26px;font-size:13px;}
.footer-bottom-copy{justify-self:start;}
.footer-bottom-links{justify-self:center;display:flex;flex-wrap:wrap;justify-content:center;row-gap:6px;}
.footer-bottom-links a{position:relative;color:#9AA3B6;}
.footer-bottom-links a:not(:first-child){margin-left:32px;}
.footer-bottom-links a:not(:first-child)::before{content:'·';position:absolute;left:-19px;top:0;color:#6B7490;}
.footer-bottom-links a::after{content:'';position:absolute;left:0;bottom:-4px;width:100%;height:1px;background:var(--gold-soft);opacity:0;transition:opacity .12s ease;}
.footer-bottom-links a:hover{color:var(--text-on-dark);}
.footer-bottom-links a:hover::after,.footer-bottom-links a:focus-visible::after{opacity:1;}
.footer-bottom-links a:focus-visible{outline:2px solid var(--gold-soft);outline-offset:3px;border-radius:2px;}
.footer-bottom-regions{justify-self:end;color:#6B7490;white-space:nowrap;}

@media (max-width:980px){
  .menu-toggle{display:flex;margin-left:auto;}
  .wrap.nav > .lang-switcher{display:flex;order:1;margin-left:auto;margin-right:26px;position:relative;top:1px;}
  .lang-btn{padding:12px 4px;margin:-12px -4px;}
  .lang-more{margin-left:20px;}
  .nav-cta{display:none;}
  .nav-links{display:flex;flex-direction:column;position:fixed;top:calc(78px + 10px);left:16px;right:16px;background:var(--surface-menu-mobile);border-radius:18px;padding:0 28px;max-height:0;overflow:hidden;gap:0;z-index:500;visibility:hidden;transition:top .22s ease,max-height .25s ease, visibility 0s linear .25s;}
  .nav-links.is-open{max-height:calc(100vh - 78px - 10px - 16px);overflow-y:auto;overscroll-behavior:contain;padding:8px 28px 24px;visibility:visible;transition:max-height .25s ease;box-shadow:var(--shadow-overlay-dark);}
  .nav-login{display:none;}
  .nav-links > a{padding:14px 0;border-top:1px solid var(--line-dark);color:#D8DCE8;font-size:15.5px;}
  .nav-links > a:first-child{border-top:none;}
  .nav-links-mobile-extra{display:flex;flex-direction:column;gap:14px;padding-top:18px;margin-top:6px;border-top:1px solid var(--line-dark);}
  .nav-links-mobile-actions{display:flex;flex-direction:column;gap:10px;align-items:center;}
  .nav-login-mobile,.nav-cta-mobile{min-width:190px;}
  .footer-grid{grid-template-columns:1fr 1fr;gap:32px;}
  .footer-bottom{grid-template-columns:1fr;justify-items:center;text-align:center;gap:12px;}
  .footer-bottom-copy,.footer-bottom-regions{justify-self:center;}
  .footer-bottom-links{row-gap:8px;}
  .footer-bottom-links a:not(:first-child){margin-left:14px;}
}

/* ---- Modal (copied from wingspay-dashboard's login.html forgot-password
 * pattern) — used by this page's own Forgot Password, and independently
 * duplicated inside components/token-row/token-row.css for its revoke
 * confirmation. Centralized here since two consumers exist now. ---- */
.modal-overlay{position:fixed;inset:0;background:rgba(11,18,38,.55);display:none;align-items:center;justify-content:center;z-index:2000;padding:20px;}
.modal-overlay.is-open{display:flex;}
.modal-card{background:var(--surface);border-radius:8px;padding:34px 30px;max-width:400px;width:100%;position:relative;box-shadow:var(--shadow-3);}
.modal-close{position:absolute;top:14px;right:16px;background:none;border:none;font-size:22px;line-height:1;color:var(--ink-soft);cursor:pointer;padding:6px;}
.modal-close:hover{color:var(--ink);}
.modal-close:focus-visible{outline:2px solid var(--gold-text);outline-offset:2px;border-radius:2px;}
.modal-card h2{font-size:19px;margin-bottom:12px;}
.modal-card p{font-size:14.5px;color:var(--ink-soft);line-height:1.6;margin-bottom:20px;}
.modal-card .auth-forgot{display:inline-block;margin-top:4px;}

/* ---- Data Table base styling (copied from wingspay-docs, canonical
 * source per COMPONENT_REGISTRY.md — same as components/token-row/'s
 * own demo.html header comment explains) ---- */
.data-table{width:100%;border-collapse:collapse;font-size:14.5px;}
.data-table th{text-align:left;font-size:12px;text-transform:uppercase;letter-spacing:.05em;color:var(--ink-soft);font-weight:600;padding:0 0 10px;border-bottom:1px solid var(--line);white-space:nowrap;}
.data-table th[data-sortable]{cursor:pointer;user-select:none;position:relative;padding-right:16px;}
.data-table th[data-sortable]:hover{color:var(--ink);}
.data-table th[data-sortable]:focus-visible{outline:2px solid var(--gold-text);outline-offset:2px;}
.data-table th[data-sortable]::after{content:'↕';position:absolute;right:0;opacity:.4;font-size:10px;}
.data-table th[data-sort-dir="asc"]::after{content:'↑';opacity:1;color:var(--gold-text);}
.data-table th[data-sort-dir="desc"]::after{content:'↓';opacity:1;color:var(--gold-text);}
.data-table td{padding:12px 0;border-bottom:1px solid var(--line);color:var(--ink-soft);vertical-align:top;}
/* Pulled from wingspay-docs's canonical stylesheet -- Data Table's
 * registered Canonical Repo per CANONICAL_COMPONENTS_POLICY.md §1 (not
 * wingspay-auth, which this repo's other Data Table rules were sourced
 * from -- same class of gap as the dash-row-2/dash-badge finding, this
 * time in the correct direction: a canonical rule missing from the
 * consumer copy, not a consumer extension missing from canonical). */
.data-table td:first-child{font-family:'DejaVu Sans Mono',monospace;color:var(--ink);font-weight:600;white-space:nowrap;padding-right:20px;}
.data-table tr:last-child td{border-bottom:none;}
.data-table tbody tr{transition:background-color .12s ease;}
.data-table tbody tr:hover{background:var(--bg-soft);}
.data-table .dt-empty td{padding:32px 0;text-align:center;color:var(--ink-soft);border-bottom:none;}
.data-table .dt-loading td{padding:32px 0;text-align:center;color:var(--ink-soft);border-bottom:none;}
.dt-empty-action{margin-top:14px;}

/* Page-local modifier, NOT part of the copied Data Table block above
 * -- api-tokens.html's own <colgroup> widths only take effect
 * reliably with table-layout:fixed; changing that on the shared
 * .data-table base rule would affect every future Data Table consumer
 * in this repo, not just this one table, so it's scoped to this
 * class instead of touching the canonical copy. */
/* width:auto overrides the copied Data Table block's own width:100%
 * (deliberately, only for this modifier) -- table-layout:fixed alone
 * does NOT make colgroup widths absolute; combined with width:100%
 * (inherited from the canonical .data-table rule), the browser still
 * stretches every column proportionally to fill the container, which
 * is exactly the "too much air" problem this was meant to fix, just
 * redistributed instead of removed. width:auto makes the table's own
 * width the sum of its columns (850px, from the colgroup in
 * api-tokens.html) -- it does not grow past that regardless of
 * viewport width, and max-width:100% keeps it from overflowing a
 * narrow one instead. */
.data-table--fixed-cols{table-layout:fixed;width:100%;min-width:850px;}
.data-table--fixed-cols td:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
/* The fixed-column table (850px total, from api-tokens.html's own
 * colgroup) is wider than most mobile viewports -- this wrapper lets
 * it scroll horizontally there instead of breaking the page's own
 * layout or forcing the table to compress below a usable width. */
.data-table-scroll{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;}

@media (max-width:860px){
  .dash-sidebar{display:none;}
  .dash-main{margin-left:0;}
  .dash-main-inner{padding:28px 20px;}
  .dash-topbar-inner{margin-left:0;width:100%;padding:0 20px;}
  .dash-user-info{display:none;}
  .dash-user{border-right:none;padding-right:0;}
  .dash-card{padding:22px 20px;}
  .dash-row-2{grid-template-columns:1fr;}
  .section-badge.section-badge{font-size:9.5px;padding:1px 6px;letter-spacing:.03em;margin-left:6px;}
  .dash-logout{display:none;}
  .auth-page-head{flex-direction:column;}
}
