:root {
  --bg:#f6f6f7; --surface:#ffffff; --surface-2:#fafafa; --surface-3:#f1f1f3;
  --border:#e7e7ea; --border-strong:#d4d4d8;
  --text:#0a0a0a; --text-2:#3f3f46; --muted:#71717a; --faint:#a1a1aa;
  --primary:#0a0a0a; --primary-ink:#ffffff;
  --brand-1:#FDB022; --brand-2:#FF7A2F; --brand-3:#FF4A2A;
  --brand-grad:linear-gradient(135deg,#FDB022 0%,#FF7A2F 50%,#FF4A2A 100%);
  --chart:#FF6A2B;
  --success:#059669; --success-bg:#ecfdf5;
  --warning:#b45309; --warning-bg:#fffbeb;
  --danger:#dc2626;  --danger-bg:#fef2f2;
  --info:#2563eb;    --info-bg:#eff6ff;
  --radius-sm:8px; --radius:12px; --radius-lg:16px; --radius-xl:20px; --radius-pill:999px;
  --shadow-pop:0 16px 48px -16px rgba(0,0,0,.22);
  --focus:0 0 0 3px rgba(255,122,47,.35);
  --font:"Geist",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --mono:"Geist Mono",ui-monospace,SFMono-Regular,Consolas,monospace;

  --raised:#ffffff;
  --danger-ink:#ffffff;
  --overlay:rgba(9,9,11,.42);
  --shadow-hover:0 12px 32px -18px rgba(0,0,0,.28);
  --chart-area-opacity:.26;
  --sidebar-w:248px;
  --page-max:1200px;
  --ease:cubic-bezier(.2,.8,.2,1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:#09090b; --surface:#111113; --surface-2:#0c0c0e; --surface-3:#1a1a1d;
    --border:#232326; --border-strong:#2e2e33;
    --text:#fafafa; --text-2:#d4d4d8; --muted:#a1a1aa; --faint:#71717a;
    --primary:#fafafa; --primary-ink:#0a0a0a;
    --success:#34d399; --success-bg:#052e22; --warning:#fbbf24; --warning-bg:#2a1d05;
    --danger:#f87171;  --danger-bg:#2a0f10;  --info:#60a5fa;    --info-bg:#0b1a33;

    --raised:#26262a;
    --danger-ink:#0a0a0a;
    --overlay:rgba(0,0,0,.6);
    --shadow-pop:0 16px 48px -16px rgba(0,0,0,.7);
    --shadow-hover:0 12px 32px -18px rgba(0,0,0,.8);
    --chart-area-opacity:.32;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg:#09090b; --surface:#111113; --surface-2:#0c0c0e; --surface-3:#1a1a1d;
  --border:#232326; --border-strong:#2e2e33;
  --text:#fafafa; --text-2:#d4d4d8; --muted:#a1a1aa; --faint:#71717a;
  --primary:#fafafa; --primary-ink:#0a0a0a;
  --success:#34d399; --success-bg:#052e22; --warning:#fbbf24; --warning-bg:#2a1d05;
  --danger:#f87171;  --danger-bg:#2a0f10;  --info:#60a5fa;    --info-bg:#0b1a33;

  --raised:#26262a;
  --danger-ink:#0a0a0a;
  --overlay:rgba(0,0,0,.6);
  --shadow-pop:0 16px 48px -16px rgba(0,0,0,.7);
  --shadow-hover:0 12px 32px -18px rgba(0,0,0,.8);
  --chart-area-opacity:.32;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
h1, h2, h3, h4, h5, h6 { font-weight: 500; letter-spacing: -0.01em; color: var(--text); }
ul[class], ol[class] { list-style: none; margin: 0; padding: 0; }
img, video, canvas { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
hr { border: 0; }
table { border-collapse: collapse; }
code, kbd, samp, pre { font-family: var(--mono); }
[hidden] { display: none !important; }
::selection { background: rgba(255,122,47,.24); }
:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; }

.icon { display: inline-block; flex-shrink: 0; vertical-align: middle; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.link, .alert a, .hint a, .empty-text a, .card-sub a, .page-sub a, .auth-switch a {
  color: var(--text);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 3px;
  transition: text-decoration-color .15s;
}
.link:hover, .alert a:hover, .hint a:hover, .empty-text a:hover, .card-sub a:hover,
.page-sub a:hover, .auth-switch a:hover { text-decoration-color: currentColor; }

:not(pre):not(.copy-field) > code:not([class]) {
  font-size: .88em; padding: 2px 6px; border-radius: 6px;
  background: var(--surface-3); color: var(--text); border: 1px solid var(--border);
}

.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 1100;
  padding: 8px 14px; border-radius: var(--radius-pill);
  background: var(--primary); color: var(--primary-ink); font-weight: 500;
  transform: translateY(-160%); transition: transform .15s var(--ease);
}
.skip-link:focus { transform: none; }

.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
}
.content { min-width: 0; display: flex; flex-direction: column; }

.sidebar {
  position: sticky; top: 0;
  height: 100vh; height: 100dvh;
  display: flex; flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 18px 12px 14px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
  z-index: 60;
}
.sidebar-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 2px 8px 22px;
}
.sidebar-brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 16px; font-weight: 600; letter-spacing: -0.02em; color: var(--text);
  border-radius: var(--radius-sm);
}
.sidebar .sidebar-close { display: none; }

.nav { display: flex; flex-direction: column; gap: 22px; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-label {
  padding: 0 12px 6px;
  font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em;
  color: var(--faint);
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; min-height: 38px; padding: 0 12px;
  border: 0; border-radius: 10px; background: transparent;
  color: var(--muted); font-size: 14px; font-weight: 400; text-align: left;
  transition: background-color .15s, color .15s;
}
.nav-item .icon { color: var(--faint); transition: color .15s; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item:hover .icon { color: var(--text-2); }
.nav-item.is-active, .nav-item[aria-current="page"] {
  background: var(--surface-3); color: var(--text); font-weight: 500;
}
.nav-item.is-active .icon, .nav-item[aria-current="page"] .icon { color: var(--text); }
.nav-item:focus-visible { outline: none; box-shadow: var(--focus); }

.sidebar-foot {
  margin-top: auto; padding-top: 18px;
  display: flex; flex-direction: column; gap: 10px;
}
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 10px 4px; margin-top: 4px;
  border-top: 1px solid var(--border);
  min-width: 0;
}
.sidebar-user-text { min-width: 0; flex: 1; }
.sidebar-user-name {
  font-size: 13px; font-weight: 500; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-user-email {
  font-size: 12px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.avatar {
  flex: 0 0 auto;
  width: 32px; height: 32px; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: var(--surface-3); color: var(--text-2);
  font-size: 12px; font-weight: 600; letter-spacing: .02em;
  border: 1px solid var(--border);
}

.mobilebar { display: none; }
.sidebar-backdrop { display: none; }

@media (max-width: 899px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: min(300px, 86vw); height: auto;
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform .26s var(--ease), visibility 0s linear .26s;
    border-right: 1px solid var(--border);
  }
  .drawer-open .sidebar {
    transform: none; visibility: visible;
    box-shadow: var(--shadow-pop);
    transition: transform .26s var(--ease), visibility 0s;
  }
  .sidebar .sidebar-close { display: inline-flex; }
  .sidebar-backdrop {
    display: block; position: fixed; inset: 0; z-index: 55;
    background: var(--overlay);
    opacity: 0; pointer-events: none;
    transition: opacity .2s;
  }
  .drawer-open .sidebar-backdrop { opacity: 1; pointer-events: auto; }
  html.drawer-open { overflow: hidden; }

  .mobilebar {
    display: flex; align-items: center; gap: 8px;
    position: sticky; top: 0; z-index: 40;
    height: 56px; padding: 0 10px;
    background: color-mix(in srgb, var(--bg) 86%, transparent);
    -webkit-backdrop-filter: saturate(1.4) blur(12px);
    backdrop-filter: saturate(1.4) blur(12px);
    border-bottom: 1px solid var(--border);
  }
  .mobilebar-brand {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 15px; font-weight: 600; letter-spacing: -0.02em;
  }
}

@media (min-width: 900px) {
  body[data-page]:not(.has-shell) > main.page {
    margin-left: max(var(--sidebar-w), calc((100% + var(--sidebar-w) - var(--page-max)) / 2));
    margin-right: 0;
  }
}

.page {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 40px 48px 72px;
}
.page > .container { padding: 0; }
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px 24px; flex-wrap: wrap;
  margin-bottom: 32px;
}
.page-head > div:first-child { min-width: 0; }
.page-title {
  font-size: 28px; line-height: 1.15; font-weight: 300;
  letter-spacing: -0.02em; color: var(--text);
}
.page-sub { margin-top: 6px; font-size: 14px; color: var(--muted); }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

@media (max-width: 899px) {
  .page { padding: 28px 20px 56px; }
  .page-head { margin-bottom: 24px; align-items: flex-start; }
  .page-title { font-size: 24px; }
}
@media (max-width: 479px) {
  .page { padding: 22px 16px 48px; }
  .page-actions { width: 100%; }
}

.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-lg { display: flex; flex-direction: column; gap: 24px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.spacer { flex: 1 1 auto; }

.grid-2, .grid-3, .grid-4 { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1279px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1099px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 719px)  { .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 479px)  { .grid-4 { grid-template-columns: minmax(0, 1fr); } }

.card {
  position: relative;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.card-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px 16px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.card-head > div:first-child { min-width: 0; }
.card-title { font-size: 15px; font-weight: 500; line-height: 1.35; letter-spacing: -0.01em; color: var(--text); }
.card-sub { margin-top: 3px; font-size: 13px; color: var(--muted); }
.card-body { min-width: 0; }
.card:has(> .card-foot) { display: flex; flex-direction: column; }
.card:has(> .card-foot) > .card-body { flex: 1 1 auto; }
.card:has(> .card-foot) > .card-foot { margin-top: auto; }
.card:has(> .card-foot) > :nth-last-child(2) { margin-bottom: 20px; }
.card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin: 20px -24px -24px;
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 0 0 calc(var(--radius-lg) - 1px) calc(var(--radius-lg) - 1px);
  font-size: 13px; color: var(--muted);
}
a.card, .card.is-clickable {
  display: block; cursor: pointer;
  transition: border-color .15s, box-shadow .2s var(--ease), transform .2s var(--ease);
}
a.card:hover, .card.is-clickable:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}
a.card:focus-visible, .card.is-clickable:focus-visible { outline: none; box-shadow: var(--focus); }
@media (max-width: 479px) {
  .card { padding: 20px 18px; }
  .card-foot { margin: 18px -18px -20px; padding: 12px 18px; }
}

.divider { display: block; height: 1px; margin: 20px 0; background: var(--border); border: 0; }

.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono { font-family: var(--mono); font-size: .93em; }
.tabular { font-variant-numeric: tabular-nums; }
.label-caps {
  font-size: 11px; font-weight: 500; line-height: 1.4;
  text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
}
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.truncate { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.btn {
  --spin: currentColor;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px;
  border: 1px solid transparent; border-radius: var(--radius-pill);
  background: transparent; color: var(--text);
  font-size: 14px; font-weight: 500; line-height: 1; white-space: nowrap;
  text-decoration: none; user-select: none; -webkit-user-select: none;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s, transform .12s var(--ease), opacity .15s;
}
.btn:focus-visible { outline: none; box-shadow: var(--focus); }
.btn:active:not(:disabled):not(.is-loading) { transform: scale(.98); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; pointer-events: none; }

.btn-primary { background: var(--primary); color: var(--primary-ink); --spin: var(--primary-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--primary) 84%, var(--bg)); }

.btn-secondary { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-secondary:hover { background: var(--surface-3); border-color: var(--border-strong); }

.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }

.btn-danger { background: var(--danger); color: var(--danger-ink); --spin: var(--danger-ink); }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 86%, #000); }

.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; gap: 6px; }
.btn-lg { height: 48px; padding: 0 24px; font-size: 15px; }
.btn-block { display: flex; width: 100%; }
.btn-icon { width: 40px; padding: 0; }
.btn-icon.btn-sm { width: 32px; }
.btn-icon.btn-lg { width: 48px; }

.btn.is-loading { color: transparent !important; pointer-events: none; cursor: progress; }
.btn.is-loading > * { visibility: hidden; }
.btn.is-loading::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 16px; height: 16px; margin: -8px 0 0 -8px;
  border-radius: 50%;
  border: 2px solid var(--spin);
  border-right-color: transparent;
  animation: sp-spin .7s linear infinite;
}
.btn-secondary.is-loading, .btn-ghost.is-loading { --spin: var(--text); }

@keyframes sp-spin { to { transform: rotate(360deg); } }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field + .field { margin-top: 16px; }
.stack > .field + .field, .stack-lg > .field + .field, .row > .field + .field,
.grid-2 > .field + .field, .grid-3 > .field + .field, .grid-4 > .field + .field { margin-top: 0; }

.label { font-size: 13px; font-weight: 500; color: var(--text-2); }
.label .optional { font-weight: 400; color: var(--faint); }

.input, .select, .textarea {
  display: block; width: 100%;
  height: 42px; padding: 0 14px;
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--text);
  font-size: 14px; line-height: 1.4;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background-color .15s;
  -webkit-appearance: none; appearance: none;
}
.input::placeholder, .textarea::placeholder { color: var(--faint); opacity: 1; }
.input:hover, .select:hover, .textarea:hover { border-color: color-mix(in srgb, var(--border-strong) 70%, var(--text)); }
.input:focus, .select:focus, .textarea:focus,
.input:focus-visible, .select:focus-visible, .textarea:focus-visible {
  border-color: var(--brand-2); box-shadow: var(--focus); outline: none;
}
.input:disabled, .select:disabled, .textarea:disabled,
.input[readonly] {
  background: var(--surface-3); color: var(--muted); cursor: not-allowed;
}
.input[readonly] { cursor: text; }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: var(--danger); }
.input.is-invalid:focus, .select.is-invalid:focus, .textarea.is-invalid:focus {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 25%, transparent);
}
.textarea { height: auto; min-height: 96px; padding: 10px 14px; line-height: 1.5; resize: vertical; }
.select {
  padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b8b93' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
input[type="number"].input { -moz-appearance: textfield; }
input[type="number"].input::-webkit-outer-spin-button,
input[type="number"].input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.hint { font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.field-error { font-size: 12.5px; line-height: 1.45; color: var(--danger); }
.field-error:empty { display: none; }

.input-group {
  display: flex; align-items: center;
  width: 100%; height: 42px;
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
  overflow: hidden;
}
.input-group:hover { border-color: color-mix(in srgb, var(--border-strong) 70%, var(--text)); }
.input-group:focus-within { border-color: var(--brand-2); box-shadow: var(--focus); }
.input-group .input {
  flex: 1 1 auto; min-width: 0; height: 100%;
  border: 0; border-radius: 0; background: transparent; box-shadow: none !important;
}
.input-group .input:disabled { background: transparent; }
.input-group.is-invalid, .input-group:has(.input.is-invalid) { border-color: var(--danger); }
.input-prefix, .input-suffix {
  flex: 0 0 auto; display: inline-flex; align-items: center;
  height: 100%; color: var(--muted); font-size: 14px; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.input-prefix { padding-left: 14px; }
.input-prefix + .input { padding-left: 8px; }
.input-suffix { padding-right: 14px; }
.input-group .input:has(+ .input-suffix) { padding-right: 8px; }
.input-action {
  flex: 0 0 auto; display: inline-grid; place-items: center;
  width: 34px; height: 34px; margin-right: 4px;
  border: 0; border-radius: 50%; background: transparent; color: var(--muted);
  transition: background-color .15s, color .15s;
}
.input-action:hover { background: var(--surface-3); color: var(--text); }
.input-action:focus-visible { outline: none; box-shadow: var(--focus); }
.input-group > .btn { margin-right: 4px; }

.switch {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  cursor: pointer; font-size: 14px; color: var(--text); user-select: none;
}
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.switch > span {
  position: relative; flex: 0 0 auto;
  width: 36px; height: 20px; border-radius: var(--radius-pill);
  background: var(--border-strong);
  transition: background-color .2s var(--ease), box-shadow .15s;
}
.switch > span::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0,0,0,.25);
  transition: transform .2s var(--ease), background-color .2s;
}
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { transform: translateX(16px); background: var(--primary-ink); }
.switch input:focus-visible + span { box-shadow: var(--focus); }
.switch input:disabled + span { opacity: .45; cursor: not-allowed; }

.checkbox {
  display: inline-flex; align-items: flex-start; gap: 10px;
  cursor: pointer; font-size: 14px; line-height: 20px; color: var(--text); user-select: none;
}
.checkbox input, input.checkbox {
  -webkit-appearance: none; appearance: none;
  flex: 0 0 auto; display: inline-grid; place-content: center;
  width: 18px; height: 18px; margin: 1px 0 0;
  border: 1.5px solid var(--border-strong); border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
  transition: background-color .15s, border-color .15s, box-shadow .15s;
}
.checkbox input[type="radio"], input.checkbox[type="radio"] { border-radius: 50%; }
.checkbox input::before, input.checkbox::before {
  content: ""; width: 10px; height: 10px;
  background: var(--primary-ink);
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
  transform: scale(0); transition: transform .12s var(--ease);
}
.checkbox input[type="radio"]::before, input.checkbox[type="radio"]::before { clip-path: circle(50%); width: 8px; height: 8px; }
.checkbox input:checked, input.checkbox:checked { background: var(--primary); border-color: var(--primary); }
.checkbox input:checked::before, input.checkbox:checked::before { transform: scale(1); }
.checkbox input:hover:not(:checked), input.checkbox:hover:not(:checked) { border-color: var(--muted); }
.checkbox input:focus-visible, input.checkbox:focus-visible { outline: none; box-shadow: var(--focus); }
.checkbox input:disabled, input.checkbox:disabled { opacity: .45; cursor: not-allowed; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1279px) { .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 479px)  { .kpi-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; } }

.kpi {
  display: flex; flex-direction: column;
  min-width: 0;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.kpi-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--muted);
}
.kpi-label .icon { color: var(--faint); }
.kpi-value {
  margin-top: 10px;
  font-size: 28px; line-height: 1.15; font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  overflow-wrap: anywhere;
}
.kpi-value .kpi-of, .kpi-value small { font-size: .6em; font-weight: 400; letter-spacing: 0; color: var(--muted); }
.kpi-foot { margin-top: 8px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 899px) { .kpi-value { font-size: 26px; } }
@media (max-width: 479px) { .kpi { padding: 18px; } }

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
.card > .table-wrap, .card-body > .table-wrap:only-child { margin-left: -24px; margin-right: -24px; width: auto; }
.card > .table-wrap:last-child { margin-bottom: -10px; }
.card > .table-wrap .table :is(th, td):first-child { padding-left: 24px; }
.card > .table-wrap .table :is(th, td):last-child { padding-right: 24px; }
@media (max-width: 479px) {
  .card > .table-wrap { margin-left: -18px; margin-right: -18px; }
  .card > .table-wrap .table :is(th, td):first-child { padding-left: 18px; }
  .card > .table-wrap .table :is(th, td):last-child { padding-right: 18px; }
}

table.table {
  width: 100%;
  border-collapse: separate; border-spacing: 0;
  font-size: 14px; color: var(--text);
}
.table th {
  padding: 10px 16px;
  text-align: left; white-space: nowrap; vertical-align: bottom;
  font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.table td {
  padding: 14px 16px;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
}
.table tbody tr:last-child td { border-bottom: 0; }
.table th.num, .table td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table tr.is-clickable { cursor: pointer; }
.table tr.is-clickable td { transition: background-color .12s; }
.table tr.is-clickable:hover td { background: var(--surface-2); }
.table tr.is-clickable:focus-visible { outline: 2px solid var(--brand-2); outline-offset: -2px; }

.list { display: flex; flex-direction: column; }
.list-item {
  display: flex; align-items: center; gap: 14px;
  min-width: 0;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}
.list-item:first-child { border-top: 0; padding-top: 4px; }
.list-item:last-child { padding-bottom: 2px; }
a.list-item, .list-item.is-clickable { transition: opacity .15s; cursor: pointer; }
a.list-item:hover .list-title, .list-item.is-clickable:hover .list-title { text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.list-icon {
  flex: 0 0 auto; display: inline-grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface-3); color: var(--text-2);
}
.list-main { flex: 1 1 auto; min-width: 0; }
.list-title { font-size: 14px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-sub { margin-top: 2px; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-end { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.amount { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: -0.01em; }
.amount-in { color: var(--success); }
.amount-out { color: var(--text); }
.amount-muted { color: var(--muted); font-weight: 500; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 9px;
  border-radius: var(--radius-pill);
  background: var(--surface-3); color: var(--text-2);
  font-size: 12px; font-weight: 500; line-height: 1; white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger); }
.badge-info    { background: var(--info-bg);    color: var(--info); }
.badge-neutral { background: var(--surface-3);  color: var(--muted); }

.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 48px 24px; text-align: center;
}
.empty-icon {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; margin-bottom: 8px;
  border-radius: 14px; background: var(--surface-3); color: var(--muted);
  border: 1px solid var(--border);
}
.empty-title { font-size: 15px; font-weight: 500; color: var(--text); }
.empty-text { max-width: 380px; font-size: 13.5px; color: var(--muted); }
.empty .btn, .empty .row { margin-top: 12px; }

.skeleton {
  display: block;
  min-height: 1em;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--surface-3) 0%, color-mix(in srgb, var(--surface-3) 45%, var(--surface)) 50%, var(--surface-3) 100%);
  background-size: 200% 100%;
  animation: sp-shimmer 1.4s ease-in-out infinite;
  color: transparent !important;
  user-select: none; pointer-events: none;
}
span.skeleton { display: inline-block; vertical-align: middle; }
@keyframes sp-shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

.alert {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface-2); color: var(--text-2);
  font-size: 14px; line-height: 1.5;
}
.alert > .icon { margin-top: 2px; color: var(--muted); }
.alert > div { flex: 1; min-width: 0; }
.alert strong, .alert .alert-title { color: var(--text); font-weight: 500; }
.alert .btn { flex: 0 0 auto; margin: -4px 0; }
.alert-info    { background: var(--info-bg);    border-color: color-mix(in srgb, var(--info) 22%, transparent); }
.alert-success { background: var(--success-bg); border-color: color-mix(in srgb, var(--success) 22%, transparent); }
.alert-warning { background: var(--warning-bg); border-color: color-mix(in srgb, var(--warning) 25%, transparent); }
.alert-danger  { background: var(--danger-bg);  border-color: color-mix(in srgb, var(--danger) 22%, transparent); }
.alert-info > .icon    { color: var(--info); }
.alert-success > .icon { color: var(--success); }
.alert-warning > .icon { color: var(--warning); }
.alert-danger > .icon  { color: var(--danger); }
@media (max-width: 479px) { .alert { flex-wrap: wrap; } }

.seg {
  display: inline-flex; align-items: center; gap: 2px;
  max-width: 100%;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: var(--surface-3);
  overflow-x: auto; scrollbar-width: none;
}
.seg::-webkit-scrollbar { display: none; }
.seg button {
  flex: 0 0 auto;
  height: 32px; padding: 0 14px;
  border: 0; border-radius: var(--radius-pill);
  background: transparent; color: var(--muted);
  font-size: 13px; font-weight: 500; white-space: nowrap;
  transition: background-color .15s, color .15s, box-shadow .15s;
}
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] {
  background: var(--raised); color: var(--text);
  box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 0 0 1px var(--border);
}
.seg button:focus-visible { outline: none; box-shadow: var(--focus); }
.seg button:disabled { opacity: .45; cursor: not-allowed; }

.tabs {
  display: flex; align-items: stretch; gap: 24px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 2px; margin-bottom: -1px;
  border: 0; border-bottom: 2px solid transparent;
  background: transparent; color: var(--muted);
  font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--text); }
.tab:focus-visible { outline: none; box-shadow: inset 0 -2px 0 var(--brand-2); color: var(--text); }

.copy-field {
  display: flex; align-items: center; gap: 8px;
  min-width: 0; min-height: 44px;
  padding: 4px 4px 4px 14px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface-2);
}
.copy-field > code, .copy-field > .copy-value, .copy-field > span:first-child {
  flex: 1 1 auto; min-width: 0;
  font-family: var(--mono); font-size: 13px; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: none; border: 0; padding: 0;
}
.copy-field.is-wrap > code, .copy-field.is-wrap > .copy-value { white-space: normal; word-break: break-all; }
.copy-field > .btn { flex: 0 0 auto; }

.code-block {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid #232326;
  background: #0f0f11; color: #e4e4e7;
  font-family: var(--mono); font-size: 13px; line-height: 1.65;
  white-space: pre; tab-size: 2;
  scrollbar-width: thin; scrollbar-color: #3a3a40 transparent;
}
.code-block code { font: inherit; background: none; border: 0; padding: 0; color: inherit; }
.code-block .k { color: #fdba74; }
.code-block .s { color: #86efac; }
.code-block .n { color: #93c5fd; }
.code-block .c { color: #71717a; }
.code-block .p { color: #f9a8d4; }

.chart { position: relative; width: 100%; min-width: 0; outline: none; }
.chart:focus-visible { box-shadow: var(--focus); border-radius: var(--radius); }
.chart-svg { display: block; width: 100%; overflow: visible; touch-action: pan-y; -webkit-tap-highlight-color: transparent; }
.chart-grid line { stroke: var(--border); stroke-width: 1; shape-rendering: crispEdges; }
.chart-grid line.is-base { stroke: var(--border-strong); }
.chart-axis text { fill: var(--faint); font-size: 11px; font-family: var(--font); font-variant-numeric: tabular-nums; }
.chart-area { opacity: var(--chart-area-opacity); }
.chart-line { fill: none; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.chart-guide { stroke: var(--border-strong); stroke-width: 1; stroke-dasharray: 3 4; }
.chart-dot { fill: var(--surface); stroke: var(--chart); stroke-width: 2.5; }
.chart-halo { fill: var(--chart); opacity: .18; transform-box: fill-box; transform-origin: center; animation: sp-halo 2.6s ease-out infinite; }
.chart-animate .chart-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: sp-draw 1s var(--ease) forwards; }
.chart-animate .chart-area { animation: sp-fade-in .9s ease both; }
@keyframes sp-draw { to { stroke-dashoffset: 0; } }
@keyframes sp-fade-in { from { opacity: 0; } }
@keyframes sp-halo { 0% { transform: scale(.6); opacity: .28; } 70%, 100% { transform: scale(1.6); opacity: 0; } }

.chart-tip {
  position: absolute; top: 0; left: 0; z-index: 5;
  min-width: 120px; padding: 8px 12px;
  border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-pop);
  pointer-events: none; white-space: nowrap;
  transition: opacity .12s;
}
.chart-tip-label { font-size: 12px; color: var(--muted); }
.chart-tip-value { margin-top: 2px; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; color: var(--text); }
.chart-tip-sub { margin-top: 1px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chart-empty {
  position: absolute; inset: 0 0 30px 0;
  display: grid; place-items: center;
  font-size: 13px; color: var(--muted); pointer-events: none;
}
.chart-empty span { padding: 6px 12px; border-radius: var(--radius-pill); background: var(--surface); border: 1px solid var(--border); }

.sensitive { transition: filter .2s var(--ease); }
.privacy-on .sensitive,
.privacy-on .chart-axis-y,
.privacy-on .chart-tip-value,
.privacy-on .chart-tip-sub { filter: blur(8px); user-select: none; -webkit-user-select: none; }
.privacy-on .chart-axis-y { filter: blur(5px); }

.brand-mark {
  display: inline-block; flex: 0 0 auto;
  width: 32px; height: 32px;
  border-radius: 10px;
  background: url("/assets/logo/safi-white.png") 46% 54% / 76% auto no-repeat, var(--brand-grad);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.04);
}
img.brand-mark { object-fit: cover; background: var(--brand-grad); }
.brand-mark-sm { width: 26px; height: 26px; border-radius: 8px; }
.brand-mark-lg { width: 44px; height: 44px; border-radius: 13px; }

.toast-stack {
  position: fixed; right: 24px; bottom: 24px; z-index: 1000;
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex; align-items: flex-start; gap: 10px;
  width: max-content; min-width: 260px; max-width: min(420px, calc(100vw - 32px));
  padding: 12px 10px 12px 12px;
  border-radius: 14px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-pop);
  font-size: 14px; line-height: 1.45;
  pointer-events: auto;
  animation: sp-toast-in .22s var(--ease) both;
}
.toast.is-leaving { animation: sp-toast-out .18s ease both; }
.toast-icon {
  flex: 0 0 auto; display: inline-grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--surface-3); color: var(--text-2);
}
.toast-success .toast-icon { background: var(--success-bg); color: var(--success); }
.toast-error .toast-icon   { background: var(--danger-bg);  color: var(--danger); }
.toast-warning .toast-icon { background: var(--warning-bg); color: var(--warning); }
.toast-info .toast-icon    { background: var(--surface-3);  color: var(--text); }
.toast-msg { flex: 1; min-width: 0; padding-top: 1px; overflow-wrap: anywhere; }
.toast-close {
  flex: 0 0 auto; display: inline-grid; place-items: center;
  width: 24px; height: 24px; border: 0; border-radius: 50%;
  background: transparent; color: var(--faint);
}
.toast-close:hover { background: var(--surface-3); color: var(--text); }
.toast-close:focus-visible { outline: none; box-shadow: var(--focus); }
@keyframes sp-toast-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes sp-toast-out { to { opacity: 0; transform: translateY(6px) scale(.98); } }
@media (max-width: 559px) {
  .toast-stack { left: 16px; right: 16px; bottom: 16px; align-items: stretch; }
  .toast { width: auto; min-width: 0; max-width: none; }
}

html.modal-open { overflow: hidden; }
.modal-backdrop {
  position: fixed; inset: 0; z-index: 900;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  background: var(--overlay);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  overflow-y: auto;
  animation: sp-fade-in .18s ease both;
}
.modal-backdrop.is-closing { animation: sp-fade-out .16s ease both; }
.modal {
  position: relative;
  display: flex; flex-direction: column;
  width: 100%; max-width: 520px;
  max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
  margin: auto;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-pop);
  outline: none;
  animation: sp-modal-in .22s var(--ease) both;
}
.modal-backdrop.is-closing .modal { animation: sp-modal-out .16s ease both; }
.modal-sm { max-width: 420px; }
.modal-lg { max-width: 720px; }
.modal-xl { max-width: 960px; }
.modal-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 20px 20px 0 24px;
}
.modal-title { padding-top: 4px; font-size: 17px; font-weight: 500; line-height: 1.35; letter-spacing: -0.01em; }
.modal-body { padding: 14px 24px 4px; overflow-y: auto; color: var(--text-2); min-height: 0; }
.modal-text { font-size: 14px; line-height: 1.55; color: var(--muted); white-space: pre-line; }
.modal-foot {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap;
  padding: 20px 24px 20px;
}
@keyframes sp-fade-out { to { opacity: 0; } }
@keyframes sp-modal-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes sp-modal-out { to { opacity: 0; transform: translateY(6px) scale(.98); } }
@media (max-width: 559px) {
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal, .modal-sm, .modal-lg, .modal-xl {
    max-width: none; margin: 0;
    max-height: calc(100dvh - 24px);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    border-bottom: 0;
    animation-name: sp-sheet-in;
  }
  .modal-foot { padding-bottom: max(20px, env(safe-area-inset-bottom)); }
  .modal-foot .btn { flex: 1 1 auto; }
  @keyframes sp-sheet-in { from { transform: translateY(24px); opacity: 0; } }
}

body.auth-page { background: var(--surface); }
.auth {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 100vh; min-height: 100dvh;
}
@media (min-width: 1280px) { .auth { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); } }

.auth-art {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  min-height: 100vh; min-height: 100dvh;
  padding: 34px 48px 32px;
  background: #09090b; color: #fafafa;
  color-scheme: dark;
}
.auth-art-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; transition: opacity .9s ease .25s; }
.auth-glow {
  position: absolute; left: -25%; right: -25%; bottom: -42%; height: 78%;
  border-radius: 50%;
  background: var(--brand-grad);
  filter: blur(90px);
  opacity: .9;
}
.auth-art-bg::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, #09090b 0%, rgba(9,9,11,.55) 45%, rgba(9,9,11,0) 100%);
}
.auth-art-bg::after {
  content: ""; position: absolute; inset: 0; z-index: 2; opacity: .14; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.auth-brand {
  position: relative; z-index: 3; align-self: flex-start;
  font-size: 19px; font-weight: 600; line-height: 1.2; letter-spacing: -0.03em; color: #fafafa;
  transition: color .8s ease .35s;
}
.auth-bird {
  align-self: center;
  width: min(82%, 540px);
  margin: 0 auto;
  pointer-events: none; user-select: none; -webkit-user-select: none;
}
.auth-bird img {
  display: block; width: 100%; height: auto; max-height: 34vh; object-fit: contain; object-position: center;
  transition: opacity .55s cubic-bezier(.4,0,.2,1), transform .9s cubic-bezier(.4,0,.2,1), filter .55s ease;
}
@media (max-height: 720px) { .auth-bird { width: min(60%, 380px); } }

.auth-art-foot {
  position: relative; z-index: 3;
  display: flex; align-items: center; gap: 6px 22px; flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid rgba(250,250,250,.16);
  font-family: var(--mono); font-size: 10.5px; line-height: 1.4; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(250,250,250,.62);
}
.auth-cap, .auth-count-n { display: inline-grid; }
.auth-cap > span { grid-area: 1 / 1; transition: opacity .45s ease .5s; }
.auth-cap > span + span { opacity: 0; transition-delay: 0s; }
.auth-art[data-slide="2"] .auth-cap > span:first-child { opacity: 0; transition-delay: 0s; }
.auth-art[data-slide="2"] .auth-cap > span + span { opacity: 1; transition-delay: .5s; }
.auth-count-n > span { grid-area: 1 / 1; transition: opacity .4s ease .35s; }
.auth-count-n > span + span, .auth-art[data-slide="2"] .auth-count-n > span:first-child { opacity: 0; }
.auth-art[data-slide="2"] .auth-count-n > span + span { opacity: 1; }
.auth-count { margin-left: auto; font-variant-numeric: tabular-nums; opacity: 0; transition: opacity .6s ease; }
.auth-art.has-cycle .auth-count { opacity: 1; }
@media (min-width: 900px) and (max-width: 1099px) { .auth-cap { display: none; } }

.auth-scene {
  --pad: 48px;
  --enter: .55s;
  position: absolute; inset: 0; z-index: 1;
  container-type: size;
  pointer-events: none; user-select: none; -webkit-user-select: none;
}
.auth-art.is-cycling .auth-scene { --enter: 1.15s; }
.auth-slide {
  --ar: .85055;
  --ax: .7; --ay: .3;
  --iw: max(100cqw, 100cqh * var(--ar));
  --ih: max(100cqh, 100cqw / var(--ar));
  --ix: calc((100cqw - var(--iw)) * var(--ax));
  --iy: calc((100cqh - var(--ih)) * var(--ay));
  position: absolute; inset: 0; z-index: 0;
}
.auth-slide.is-active { z-index: 2; }
.auth-slide.is-leaving { z-index: 1; }

.auth-photo {
  position: absolute; inset: 0; overflow: hidden;
  background: #dde7ee;
  opacity: 0;
}
.auth-photo img {
  position: absolute; max-width: none;
  left: var(--ix); top: var(--iy); width: var(--iw); height: var(--ih);
  transform: scale(1.06); transform-origin: 72% 38%;
}
.auth-slide.is-active .auth-photo { opacity: 1; transition: opacity 1s cubic-bezier(.33,1,.68,1) .08s; }
.auth-slide.is-active .auth-photo img { transform: none; transition: transform 2.6s cubic-bezier(.16,1,.3,1) .08s; }
.auth-art.is-cycling .auth-slide.is-active .auth-photo { transition: opacity 1.3s cubic-bezier(.4,0,.2,1) .3s; }
.auth-art.is-cycling .auth-slide.is-active .auth-photo img { transition: transform 3.2s cubic-bezier(.16,1,.3,1) .3s; }
.auth-slide.is-leaving .auth-photo { opacity: 1; }
.auth-slide.is-leaving .auth-photo img { transform: none; }

.auth-slide [data-reveal] { opacity: 0; transform: translate3d(0, 10px, 0); }
.auth-slide.is-leaving [data-reveal] {
  transform: translate3d(0, -6px, 0);
  transition: opacity .35s ease, transform .5s ease;
  transition-delay: calc(var(--d, 0) * 35ms);
}
.auth-art.is-photo .auth-slide.is-active [data-reveal] {
  opacity: 1; transform: none;
  transition: opacity .7s ease, transform 1s cubic-bezier(.16,1,.3,1);
  transition-delay: calc(var(--enter) + var(--d, 0) * 110ms);
}
.auth-art.is-photo .auth-art-bg { opacity: 0; }
.auth-art.is-photo .auth-bird img { opacity: 0; transform: scale(.95); filter: blur(6px); }
.auth-art.is-photo .auth-brand { color: #0a0a0b; }

.auth-pin {
  position: absolute; left: 0; top: 0;
  width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(10,10,12,.5), 0 0 0 6px rgba(255,255,255,.22);
}
.auth-pin.is-ink { background: #0a0a0b; box-shadow: 0 0 0 2px #fff, 0 0 0 7px rgba(10,10,12,.2); }
.auth-wire { position: absolute; left: 0; top: 0; border: 0 solid currentColor; color: rgba(255,255,255,.62); opacity: 0; }
.auth-wire.is-ink { color: rgba(10,10,12,.42); }
.auth-slide.is-leaving .auth-wire { transition: opacity .3s ease; }
.auth-slide.is-active .auth-wire {
  opacity: 1;
  animation: sp-wire .8s cubic-bezier(.65,0,.35,1) both;
  animation-delay: calc(var(--enter) + var(--d, 0) * 110ms);
}
.auth-slide.is-active .auth-wire.is-rtl { animation-name: sp-wire-rtl; }
.auth-slide.is-active .auth-wire.is-down { animation-name: sp-wire-down; }
.auth-slide.is-active .auth-wire.is-up { animation-name: sp-wire-up; }
@keyframes sp-wire { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes sp-wire-rtl { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0 0 0 0); } }
@keyframes sp-wire-down { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes sp-wire-up { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
.auth-slide .is-off { visibility: hidden !important; }

.auth-notes { position: absolute; inset: 0; }
.auth-note {
  position: absolute; left: 0; top: 0;
  display: flex; flex-direction: column; gap: 4px;
  width: max-content; max-width: 232px;
  padding: 10px 14px 11px;
  border-radius: 14px;
  font-size: 13px; line-height: 1.35; letter-spacing: -0.005em; font-weight: 450;
  -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
}
.auth-note-k {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 10px; line-height: 1.3; letter-spacing: .09em; text-transform: uppercase;
  opacity: .66;
}
.auth-note-k::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brand-grad); }
.auth-code { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0; white-space: nowrap; opacity: .8; }
.auth-note.is-light {
  background: rgba(255,255,255,.52); border: 1px solid rgba(255,255,255,.72);
  color: #0a0a0b;
  box-shadow: 0 12px 32px -16px rgba(18,38,56,.4);
}
.auth-note.is-dark {
  background: rgba(14,14,17,.42); border: 1px solid rgba(255,255,255,.14);
  color: #fafafa;
  box-shadow: 0 16px 40px -20px rgba(0,0,0,.6);
}

.auth-toast {
  position: absolute; left: var(--pad);
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 2px 10px;
  width: 256px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(246,248,250,.62); border: 1px solid rgba(255,255,255,.7);
  color: #0a0a0b;
  -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 18px 40px -22px rgba(10,24,40,.55);
}
.auth-toast-icon {
  grid-row: span 2;
  display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 9px;
  background: #0a0a0b;
}
.auth-toast-icon img { width: 21px; height: auto; }
.auth-toast-title { font-size: 13px; line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; }
.auth-toast-time { font-size: 11px; line-height: 1.25; color: rgba(10,10,11,.5); }
.auth-toast-sub { grid-column: 2 / 4; font-size: 12.5px; line-height: 1.3; color: rgba(10,10,11,.66); font-variant-numeric: tabular-nums; }

.auth-hero { position: absolute; left: var(--pad); right: var(--pad); bottom: 100px; max-width: 560px; }
.auth-kicker {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 11px; line-height: 1.4; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(250,250,250,.74);
}
.auth-kicker::before { content: ""; flex: 0 0 auto; width: 20px; height: 2px; border-radius: 2px; background: var(--brand-grad); }
.auth-display {
  margin-top: 16px;
  font-size: clamp(34px, 6.3cqw, 62px); line-height: 1.02; font-weight: 300; letter-spacing: -0.045em;
  color: #fafafa;
  text-wrap: balance;
}
.auth-display span { color: #c9d9e3; }

.auth-slide--ski .auth-photo::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(0deg, rgba(5,6,8,.9) 0%, rgba(5,6,8,.7) 17%, rgba(5,6,8,.28) 36%, rgba(5,6,8,0) 50%),
    radial-gradient(90% 42% at 0% 100%, rgba(5,6,8,.55) 0%, rgba(5,6,8,0) 100%);
}
.auth-slide--ski .auth-toast { top: calc(var(--iy) + var(--ih) * .455); }

.auth-slide--car { --ar: .85106; --ax: .5; --ay: 0; }
.auth-slide--car .auth-photo { background: #b8c7d3; }
.auth-slide--car .auth-photo img { transform-origin: 48% 52%; }
.auth-slide--car .auth-photo::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(226,234,241,.66) 0%, rgba(226,234,241,.38) 20%, rgba(226,234,241,0) 33%),
    linear-gradient(0deg, rgba(5,6,8,.8) 0%, rgba(5,6,8,.45) 8%, rgba(5,6,8,0) 19%);
}
.auth-hero--sky { top: 104px; bottom: auto; }
.auth-hero--sky .auth-kicker { color: rgba(10,10,11,.7); }
.auth-hero--sky .auth-display { color: #0a0a0b; }
.auth-hero--sky .auth-display span { color: #2b3c4a; }
.auth-toast--sky { left: auto; right: var(--pad); top: 100px; }
.auth-note--taillight { max-width: 210px; }

@container (max-width: 640px) or (max-aspect-ratio: 37 / 50) {
  .auth-slide--ski { --ax: .95; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-art .auth-bird img, .auth-art .auth-slide .auth-photo, .auth-art .auth-slide .auth-photo img,
  .auth-art .auth-art-bg, .auth-art .auth-brand, .auth-art .auth-slide [data-reveal] {
    transform: none !important; filter: none !important;
    transition: opacity .35s ease, color .35s ease !important;
    transition-delay: 0s !important;
  }
  .auth-art .auth-slide.is-active .auth-wire { animation: none !important; }
}

.auth-main { display: flex; flex-direction: column; min-width: 0; background: var(--surface); }
.auth-top {
  display: flex; align-items: center; justify-content: flex-end; gap: 12px;
  padding: 20px 28px 0;
}
.auth-top .auth-mobile-brand { margin-right: auto; }
.auth-mobile-brand {
  display: none; align-items: center;
  font-size: 18px; font-weight: 600; line-height: 1.2; letter-spacing: -0.03em; color: var(--text);
}
.auth-card {
  width: 100%; max-width: 400px;
  margin: auto;
  padding: 32px 24px 56px;
}
.auth-title { font-size: 30px; line-height: 1.15; font-weight: 300; letter-spacing: -0.025em; }
.auth-sub { margin-top: 8px; margin-bottom: 28px; font-size: 14.5px; color: var(--muted); }
.auth-card .alert { margin-bottom: 18px; }
.auth-card form .btn-block { margin-top: 8px; }
.auth-switch { margin-top: 24px; text-align: center; font-size: 14px; color: var(--muted); }
.pw-rule { display: inline-flex; align-items: center; gap: 6px; transition: color .15s; }
.pw-rule .icon { opacity: .5; transition: opacity .15s; }
.pw-rule.is-ok { color: var(--success); }
.pw-rule.is-ok .icon { opacity: 1; }

@media (max-width: 899px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-art { display: none; }
  .auth-mobile-brand { display: inline-flex; }
  .auth-top { padding: 16px 16px 0; }
  .auth-card { margin: 0 auto; padding: 36px 20px 48px; }
  .auth-title { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .chart-halo { display: none; }
  .skeleton { animation: none; }
}

html, body, * {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}

@keyframes sp-edge-fade {
  0% { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
  12%, 88% { -webkit-mask-image: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent); }
  100% { -webkit-mask-image: linear-gradient(to right, transparent, #000 28px); mask-image: linear-gradient(to right, transparent, #000 28px); }
}
@supports (animation-timeline: scroll()) {
  .table-wrap, .code-block, .seg, .tabs, .code-tabs, .kyc-steps, .hub-filters {
    animation: sp-edge-fade linear both;
    animation-timeline: scroll(self inline);
  }
}

html.sp-gating { background: var(--bg); }
html.sp-gating body > :not(.sp-gate) { visibility: hidden !important; }
html.sp-gating::before,
html.sp-gating::after {
  position: fixed; top: 50%; z-index: 2147483647;
  pointer-events: none;
}
html.sp-gating::before {
  content: "";
  left: 50%;
  width: 14px; height: 14px; margin: -24px 0 0 -7px;
  border-radius: 50%;
  background: var(--chart);
  animation: sp-gate-pulse 1.6s ease-in-out infinite;
}
html.sp-gating::after {
  content: "Carregando informações…";
  content: "Carregando informações…" / "";
  left: 0; right: 0;
  margin-top: 3px; padding: 0 24px;
  font-family: var(--font); font-size: 14px; font-weight: 400; line-height: 20px;
  color: var(--muted); text-align: center;
  -webkit-font-smoothing: antialiased;
}
html.sp-gating.sp-gate-stale::after { content: "Não foi possível carregar. Recarregue a página."; }
html.sp-gating.sp-gate-failed::before,
html.sp-gating.sp-gate-stale::before { animation: none; }
html.sp-gating.sp-gate-failed::after { content: none; }
@keyframes sp-gate-pulse {
  0%, 100% { transform: scale(.82); box-shadow: 0 0 0 0 color-mix(in srgb, var(--chart) 42%, transparent); }
  60% { transform: scale(1); box-shadow: 0 0 0 10px color-mix(in srgb, var(--chart) 0%, transparent); }
}
.sp-gate {
  position: fixed !important; top: 50%; left: 0;
  width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
html.sp-gate-failed .sp-gate {
  right: 0; z-index: 2147483647;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  width: auto; height: auto; margin: 3px 0 0; padding: 0 24px;
  overflow: visible; clip: auto; white-space: normal; text-align: center;
}
.sp-gate-msg { margin: 0; font-size: 14px; line-height: 20px; color: var(--muted); }
.sp-noscript {
  position: fixed; inset: 0; z-index: 2147483647;
  display: flex; align-items: center; justify-content: center;
  margin: 0; padding: 24px;
  background: var(--bg); color: var(--text-2);
  font-size: 14px; line-height: 20px; text-align: center;
}
@media (prefers-reduced-motion: reduce) {
  html.sp-gating::before { animation: none; }
}
