:root {
  color-scheme: dark;
  --bg: #090d12;
  --surface: #111821;
  --surface-2: #17202b;
  --panel: #202a36;
  --line: #273443;
  --text: #f4f7f9;
  --muted: #9aaaba;
  --brand: #1f8d78;
  --brand-strong: #42c3a2;
  --brand-soft: rgba(49, 165, 150, .14);
  --accent: #3d6df2;
  --warning: #d8a443;
  --danger: #e15d52;
  --input: #0d131a;
  --shadow: 0 20px 50px rgba(0, 0, 0, .32);
  --shadow-soft: 0 12px 28px rgba(0, 0, 0, .22);
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f7fa;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --panel: #edf3f6;
  --line: #d9e3ea;
  --text: #14212b;
  --muted: #657582;
  --brand: #167b69;
  --brand-strong: #0e6c5e;
  --brand-soft: rgba(24, 118, 109, .11);
  --accent: #315bdc;
  --warning: #9b6f1f;
  --danger: #b94738;
  --input: #ffffff;
  --shadow: 0 18px 42px rgba(37, 47, 58, .10);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-2) 30%, transparent), transparent 320px),
    var(--bg);
  color: var(--text);
  font: 14px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: inherit; text-decoration: none; }

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-panel, .panel {
  width: min(100%, 420px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--brand) 8%, transparent), transparent 260px),
    color-mix(in srgb, var(--surface) 94%, black);
  padding: 16px 14px;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px 18px;
}

.brand strong {
  display: block;
  font-size: 16px;
  letter-spacing: 0;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 1px;
}

.brand-mark, .metric-icon {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  color: var(--brand-strong);
  background: var(--brand-soft);
  border: 1px solid color-mix(in srgb, var(--brand) 35%, transparent);
}

.brand-image {
  overflow: hidden;
}

.brand-image img {
  width: 72%;
  height: 72%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 6px 10px rgba(20, 184, 166, .26));
}

.nav {
  display: grid;
  gap: 3px;
}

.nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  padding: 9px 10px;
  border-radius: 7px;
  min-height: 39px;
  font-weight: 700;
  font-size: 13px;
  transition: color .16s ease, background .16s ease, transform .16s ease;
}

.nav a.active,
.nav a:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--panel) 78%, transparent);
}

.nav a:hover {
  transform: translateX(2px);
}

.nav a.active::before {
  content: "";
  position: absolute;
  left: 0;
  width: 3px;
  height: 18px;
  border-radius: 99px;
  background: var(--brand-strong);
}

.sidebar-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 8px;
  padding: 11px;
  font-size: 13px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--brand-strong);
  box-shadow: 0 0 0 4px var(--brand-soft);
}

.main {
  min-width: 0;
  padding: 24px 28px 34px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin: -24px -28px 24px;
  padding: 18px 28px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button, .user-chip {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 10px;
  box-shadow: 0 1px 0 rgba(255,255,255,.03) inset;
  transition: border-color .16s ease, transform .16s ease, background .16s ease;
}

.icon-button:hover,
.user-chip:hover,
.button:hover,
button:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--brand) 48%, var(--line));
}

.icon-button {
  width: 38px;
  padding: 0;
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #495b8f);
  font-weight: 750;
  font-size: 12px;
}

.grid, .metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.stat, .table-wrap, .metric, .admin-hero {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.stat, .metric {
  padding: 18px;
}

.stat strong, .metric strong {
  display: block;
  font-size: 24px;
  line-height: 1;
  margin-top: 8px;
}

.metric {
  display: grid;
  gap: 10px;
}

.metric-icon {
  width: 38px;
  height: 38px;
}

.admin-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  margin-bottom: 14px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand) 14%, transparent), transparent 48%),
    var(--surface);
}

.metric-grid {
  margin-bottom: 14px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 18px 12px;
}

.table-wrap {
  overflow: hidden;
}

.admin-table {
  margin-top: 0;
}

.person-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.person-cell strong,
.person-cell span {
  display: block;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--line);
}

.badge.role {
  color: var(--brand-strong);
  background: var(--brand-soft);
  border-color: color-mix(in srgb, var(--brand) 35%, transparent);
}

.badge.status {
  color: #8ff5c2;
  background: rgba(35, 133, 122, .16);
  border-color: rgba(91, 232, 166, .46);
  box-shadow:
    0 0 0 1px rgba(91, 232, 166, .08),
    0 0 18px rgba(55, 221, 145, .24);
  text-shadow: 0 0 12px rgba(143, 245, 194, .34);
}

.badge.status::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 999px;
  background: #56e8a6;
  box-shadow: 0 0 10px #56e8a6;
  animation: statusGlow 1.8s ease-in-out infinite;
}

[data-theme="light"] .badge.status {
  color: #126b45;
  background: rgba(34, 197, 94, .14);
  border-color: rgba(22, 163, 74, .28);
  box-shadow: 0 0 18px rgba(22, 163, 74, .16);
  text-shadow: none;
}

.admin-console {
  display: grid;
  gap: 16px;
}

.admin-command {
  min-height: 164px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand) 18%, transparent), transparent 38%),
    linear-gradient(90deg, color-mix(in srgb, #495b8f 16%, transparent), transparent 54%),
    var(--surface);
  box-shadow: var(--shadow);
}

.admin-command h2 {
  font-size: 30px;
  margin-bottom: 8px;
}

.admin-command-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-overview {
  display: grid;
  grid-template-columns: 1.15fr repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-kpi {
  min-height: 118px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.admin-kpi.primary {
  background:
    linear-gradient(135deg, var(--brand-soft), transparent 56%),
    var(--surface);
}

.admin-kpi strong {
  display: block;
  font-size: 30px;
  line-height: 1;
  margin-top: 8px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
}

.admin-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.admin-users-panel {
  min-width: 0;
}

.section-head.compact {
  padding-bottom: 16px;
}

.user-list {
  display: grid;
}

.user-row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto minmax(150px, auto) 38px;
  gap: 16px;
  align-items: center;
  padding: 15px 18px;
  border-top: 1px solid var(--line);
}

.user-row:hover {
  background: color-mix(in srgb, var(--panel) 52%, transparent);
}

.user-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.row-actions form {
  display: inline-flex;
  gap: 0;
}

.inline-edit-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 130px auto;
  gap: 10px;
  align-items: center;
}

.inline-edit-row input,
.inline-edit-row select {
  min-height: 38px;
}

.last-login {
  display: grid;
  gap: 2px;
  text-align: right;
}

.last-login strong {
  font-size: 13px;
  font-weight: 700;
}

.admin-side {
  display: grid;
  gap: 16px;
}

.health-list {
  display: grid;
  padding: 0 18px 18px;
}

.health-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  border-top: 1px solid var(--line);
}

.health-list span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
}

.security-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 18px 18px;
}

.security-stack span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.pro-admin {
  animation: pageIn .38s ease both;
}

.pro-hero {
  position: relative;
  min-height: 244px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 22px;
  align-items: stretch;
  overflow: hidden;
  padding: 26px;
  border: 1px solid color-mix(in srgb, var(--brand) 24%, var(--line));
  border-radius: 12px;
  background:
    linear-gradient(120deg, rgba(31, 141, 120, .24), transparent 34%),
    linear-gradient(145deg, rgba(61, 109, 242, .16), transparent 48%),
    var(--surface);
  box-shadow: var(--shadow);
}

.pro-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .22;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(120deg, black, transparent 72%);
  animation: gridDrift 14s linear infinite;
}

.pro-hero::after {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand-strong), transparent);
  animation: scanLine 2.8s ease-in-out infinite;
}

.pro-hero-content,
.pro-live-card {
  position: relative;
  z-index: 1;
}

.pro-hero h2 {
  max-width: 720px;
  font-size: clamp(32px, 4vw, 50px);
  line-height: .98;
  margin: 0 0 14px;
}

.pro-hero p {
  max-width: 560px;
  font-size: 15px;
}

.pro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.pro-live-card {
  display: grid;
  align-content: space-between;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--brand) 28%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-2) 86%, transparent);
  backdrop-filter: blur(12px);
  animation: floatCard 5s ease-in-out infinite;
}

.live-card-top {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
}

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--brand-strong);
  box-shadow: 0 0 0 0 rgba(49, 165, 150, .42);
  animation: pulse 1.8s ease-out infinite;
}

.pro-live-card strong {
  display: block;
  font-size: 46px;
  line-height: 1;
  margin-top: 22px;
}

.mini-bars {
  height: 62px;
  display: flex;
  align-items: end;
  gap: 8px;
  margin-top: 22px;
}

.mini-bars span {
  flex: 1;
  min-width: 0;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--brand-strong), color-mix(in srgb, var(--brand) 34%, transparent));
  animation: barRise .8s ease both;
}

.mini-bars span:nth-child(2) { animation-delay: .08s; }
.mini-bars span:nth-child(3) { animation-delay: .16s; }
.mini-bars span:nth-child(4) { animation-delay: .24s; }
.mini-bars span:nth-child(5) { animation-delay: .32s; }
.mini-bars span:nth-child(6) { animation-delay: .40s; }

.pro-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.pro-kpi {
  position: relative;
  display: grid;
  gap: 14px;
  min-height: 150px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
  animation: riseIn .45s ease both;
}

.pro-kpi:nth-child(2) { animation-delay: .05s; }
.pro-kpi:nth-child(3) { animation-delay: .10s; }
.pro-kpi:nth-child(4) { animation-delay: .15s; }

.pro-kpi::after {
  content: "";
  position: absolute;
  inset: auto -20% -35% 38%;
  height: 84px;
  background: radial-gradient(circle, color-mix(in srgb, var(--brand) 18%, transparent), transparent 62%);
}

.pro-kpi:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--brand) 42%, var(--line));
}

.pro-kpi strong {
  display: block;
  font-size: 34px;
  line-height: 1;
  margin-top: 7px;
}

.pro-kpi small {
  color: var(--muted);
  font-weight: 700;
}

.pro-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  align-items: start;
}

.pro-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  animation: riseIn .48s ease both;
}

.pro-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-2) 54%, transparent);
}

.pro-card-head.compact {
  border-bottom: 0;
  padding-bottom: 12px;
}

.pro-search {
  width: min(330px, 100%);
}

.pro-user-list {
  display: grid;
}

.pro-user-row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto minmax(150px, auto) auto;
  gap: 14px;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transform: translateY(10px);
  animation: rowIn .38s ease forwards;
  animation-delay: var(--delay);
  transition: background .18s ease, transform .18s ease;
}

.pro-user-row:hover {
  background: color-mix(in srgb, var(--brand) 8%, var(--surface-2));
  transform: translateX(3px);
}

.pro-user-row:last-child {
  border-bottom: 0;
}

.pro-avatar {
  width: 38px;
  height: 38px;
}

.pro-side {
  display: grid;
  gap: 16px;
}

.pro-health {
  display: grid;
  padding: 0 20px 20px;
}

.pro-health div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  border-top: 1px solid var(--line);
}

.pro-health span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-weight: 700;
}

.security-card {
  padding: 22px;
  text-align: center;
}

.security-ring {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  border-radius: 999px;
  color: var(--brand-strong);
  background:
    conic-gradient(from 0deg, var(--brand-strong), color-mix(in srgb, var(--brand) 18%, transparent), var(--brand-strong));
  animation: rotateRing 8s linear infinite;
}

.security-ring span {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: inherit;
  background: var(--surface);
}

.security-card .security-stack {
  justify-content: center;
  padding: 18px 0 0;
}

.dashboard-pro {
  display: grid;
  gap: 16px;
}

.dashboard-hero {
  min-height: 280px;
}

.finance-live-card strong {
  font-size: 38px;
}

.dashboard-kpis .pro-kpi {
  min-height: 142px;
}

.dashboard-list {
  display: grid;
}

.dashboard-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  align-items: center;
  gap: 13px;
  min-height: 68px;
  padding: 15px 20px;
  border-top: 1px solid var(--line);
  opacity: 0;
  transform: translateY(10px);
  animation: rowIn .38s ease forwards;
  animation-delay: var(--delay);
  transition: background .18s ease, transform .18s ease;
}

.dashboard-row:hover {
  background: color-mix(in srgb, var(--brand) 8%, var(--surface-2));
  transform: translateX(3px);
}

.dashboard-row:only-child {
  border-bottom: 0;
}

.dashboard-row > div {
  display: grid;
  gap: 2px;
}

.compact-list {
  display: grid;
  padding: 0 20px 20px;
}

.compact-list > div {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  border-top: 1px solid var(--line);
}

.compact-list strong,
.compact-list span {
  display: block;
}

.form-card {
  max-width: 980px;
}

.pro-form {
  padding: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-grid label {
  display: grid;
  gap: 7px;
  font-weight: 700;
  color: color-mix(in srgb, var(--muted) 88%, var(--text));
}

.field-hint {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.span-2 {
  grid-column: span 2;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 18px;
}

.bank-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 16px;
  padding: 20px;
}

.bank-card {
  position: relative;
  min-height: 190px;
  display: grid;
  align-content: space-between;
  overflow: hidden;
  padding: 20px;
  border: 1px solid color-mix(in srgb, var(--brand) 38%, var(--line));
  border-radius: 16px;
  color: #f7fbff;
  background:
    radial-gradient(circle at 82% 18%, rgba(255,255,255,.20), transparent 24%),
    linear-gradient(135deg, #132738, #1d7569 55%, #27365f);
  box-shadow: 0 22px 46px rgba(0, 0, 0, .28);
  opacity: 0;
  transform: translateY(12px);
  animation: riseIn .45s ease forwards;
  animation-delay: var(--delay);
}

.bank-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .18;
  background-image:
    linear-gradient(rgba(255,255,255,.24) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.20) 1px, transparent 1px);
  background-size: 34px 34px;
  animation: gridDrift 16s linear infinite;
}

.bank-card > * {
  position: relative;
  z-index: 1;
}

.bank-card-top,
.bank-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.bank-card-top {
  color: rgba(255,255,255,.78);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.card-chip {
  width: 38px;
  height: 28px;
  border-radius: 7px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.78), rgba(255,255,255,.24));
  border: 1px solid rgba(255,255,255,.38);
}

.bank-card strong {
  display: block;
}

.bank-card > div:nth-child(2) strong {
  font-size: 21px;
}

.bank-card p {
  margin-top: 10px;
  color: rgba(255,255,255,.82);
  font-size: 17px;
  letter-spacing: 0;
}

.bank-card-debt {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 10px;
  background: rgba(0,0,0,.18);
}

.bank-card-debt span {
  color: rgba(255,255,255,.72);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.bank-card-debt strong {
  color: #fff;
  font-size: 24px;
  line-height: 1;
}

.bank-card-bottom {
  color: rgba(255,255,255,.70);
  font-size: 12px;
}

.bank-card-bottom strong {
  margin-top: 3px;
  color: #fff;
  font-size: 13px;
}

.card-edit-link {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 999px;
  color: #fff;
  background: rgba(255,255,255,.12);
  font-weight: 800;
}

.card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.account-limit-meter {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.18);
}

.account-limit-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--danger), var(--warning));
  box-shadow: 0 0 18px rgba(212, 93, 76, .38);
}

.money-in {
  color: #8ff5c2;
  font-weight: 800;
}

.money-out {
  color: color-mix(in srgb, var(--danger) 82%, #fff);
  font-weight: 800;
}

.wide-left {
  grid-template-columns: minmax(0, 1fr) 390px;
}

.mini-form-card {
  max-width: none;
}

.mini-form-card .pro-form {
  padding-top: 0;
}

.statement-table {
  display: grid;
}

.statement-row {
  display: grid;
  grid-template-columns: 120px minmax(220px, 1fr) 120px 120px 44px;
  gap: 12px;
  align-items: center;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
}

.statement-row.head {
  color: var(--muted);
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 800;
}

.statement-row strong,
.statement-row small {
  display: block;
}

.statement-row small {
  color: var(--muted);
  margin-top: 2px;
}

.danger-button {
  color: var(--danger);
}

.chart-panel {
  height: 220px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  align-items: end;
  gap: 12px;
  padding: 8px 20px 12px;
}

.chart-month {
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 8px;
  align-items: end;
  text-align: center;
}

.chart-bars {
  height: 100%;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 5px;
  padding-top: 8px;
  border-bottom: 1px solid var(--line);
}

.chart-bars span {
  width: 12px;
  min-height: 4px;
  border-radius: 999px 999px 2px 2px;
  animation: barRise .7s ease both;
}

.income-bar {
  background: linear-gradient(180deg, var(--brand-strong), var(--brand));
}

.expense-bar {
  background: linear-gradient(180deg, var(--danger), color-mix(in srgb, var(--danger) 45%, transparent));
}

.chart-month small,
.chart-legend {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0 20px 18px;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chart-legend i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.income-dot { background: var(--brand-strong); }
.expense-dot { background: var(--danger); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.feature-card {
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.feature-card h2 {
  margin-top: 14px;
}

.inline-filter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.inline-filter input {
  width: auto;
  min-width: 150px;
}

.debt-overview-card {
  border-color: color-mix(in srgb, var(--danger) 24%, var(--line));
}

.debt-total {
  color: var(--danger);
  font-size: 28px;
  line-height: 1;
}

.debt-row {
  color: inherit;
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes rowIn {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 10px rgba(49, 165, 150, 0); }
  100% { box-shadow: 0 0 0 0 rgba(49, 165, 150, 0); }
}

@keyframes gridDrift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 42px 42px, 42px 42px; }
}

@keyframes scanLine {
  0%, 100% { opacity: .25; transform: scaleX(.35); }
  50% { opacity: 1; transform: scaleX(1); }
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes barRise {
  from { transform: scaleY(.25); transform-origin: bottom; opacity: .35; }
  to { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
}

@keyframes rotateRing {
  to { transform: rotate(360deg); }
}

@keyframes statusGlow {
  0%, 100% { opacity: .72; transform: scale(.92); }
  50% { opacity: 1; transform: scale(1.18); }
}

.search-box {
  width: min(280px, 100%);
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  background: var(--input);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 10px;
  min-height: 40px;
}

.search-box input {
  border: 0;
  padding-inline: 0;
  background: transparent;
}

.muted, label {
  color: var(--muted);
}

.eyebrow {
  display: inline-block;
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 7px;
  text-transform: none;
}

h1, h2 {
  line-height: 1.2;
  margin: 0 0 8px;
  letter-spacing: 0;
}

h1 {
  font-size: 26px;
}

h2 {
  font-size: 18px;
}

p {
  margin: 0;
}

form {
  display: grid;
  gap: 14px;
}

input, select {
  width: 100%;
  color: var(--text);
  background: var(--input);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 11px;
  outline: none;
}

input:focus, select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

button, .button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--brand);
  border-radius: 9px;
  background: var(--brand);
  color: white;
  cursor: pointer;
  font-weight: 700;
  padding: 10px 13px;
  white-space: nowrap;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

button:not(.secondary):not(.icon-button), .button:not(.secondary):not(.icon-button) {
  box-shadow: 0 10px 20px color-mix(in srgb, var(--brand) 20%, transparent);
}

.button.secondary, button.secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.alert {
  border-radius: 9px;
  padding: 10px 12px;
  margin-bottom: 14px;
  background: color-mix(in srgb, var(--danger) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--danger) 45%, transparent);
}

.success {
  background: var(--brand-soft);
  border-color: color-mix(in srgb, var(--brand) 45%, transparent);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 800;
}

tbody tr:hover {
  background: color-mix(in srgb, var(--panel) 55%, transparent);
}

tbody tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar-footer {
    display: none;
  }

  .grid, .metric-grid {
    grid-template-columns: 1fr;
  }

  .main {
    padding: 18px;
  }

  .topbar,
  .admin-hero,
  .admin-command,
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-command {
    min-height: 0;
  }

  .admin-command h2 {
    font-size: 24px;
  }

  .admin-command-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .admin-command-actions button {
    flex: 1 1 160px;
  }

  .admin-overview,
  .admin-grid,
  .pro-kpi-grid,
  .pro-layout,
  .wide-left,
  .pro-hero {
    grid-template-columns: 1fr;
  }

  .pro-hero {
    min-height: 0;
    padding: 20px;
  }

  .pro-hero h2 {
    font-size: 34px;
  }

  .pro-live-card {
    animation: none;
  }

  .pro-card-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .user-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .pro-user-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .dashboard-row,
  .compact-list > div,
  .statement-row,
  .inline-edit-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .bank-card-grid {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .span-2 {
    grid-column: auto;
  }

  .form-actions {
    flex-direction: column-reverse;
  }

  .user-meta,
  .last-login {
    justify-content: flex-start;
    text-align: left;
  }

  .topbar-actions {
    width: 100%;
  }

  .user-chip {
    flex: 1;
    justify-content: flex-start;
  }

  .table-wrap {
    overflow-x: auto;
  }

  table {
    min-width: 720px;
  }
}

/* 2026 SaaS redesign layer */
:root {
  --bg: #070a0f;
  --surface: #101720;
  --surface-2: #151f2b;
  --panel: #1d2a39;
  --line: rgba(139, 162, 181, .18);
  --text: #f6f8fb;
  --muted: #91a2b4;
  --brand: #14b8a6;
  --brand-strong: #5eead4;
  --brand-soft: rgba(20, 184, 166, .14);
  --accent: #7c3aed;
  --accent-2: #38bdf8;
  --warning: #f59e0b;
  --danger: #fb7185;
  --input: rgba(8, 13, 22, .82);
  --shadow: 0 24px 70px rgba(0, 0, 0, .38);
  --shadow-soft: 0 16px 44px rgba(0, 0, 0, .24);
}

[data-theme="light"] {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f3f6fb;
  --panel: #e9eef7;
  --line: rgba(47, 66, 86, .14);
  --text: #101828;
  --muted: #667085;
  --brand: #0f766e;
  --brand-strong: #0d9488;
  --brand-soft: rgba(13, 148, 136, .11);
  --accent: #6d28d9;
  --accent-2: #0284c7;
  --danger: #e11d48;
  --input: #ffffff;
  --shadow: 0 22px 60px rgba(15, 23, 42, .10);
  --shadow-soft: 0 12px 34px rgba(15, 23, 42, .08);
}

body {
  overflow-x: hidden;
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--brand) 10%, transparent), transparent 26%),
    linear-gradient(220deg, color-mix(in srgb, var(--accent) 10%, transparent), transparent 30%),
    var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: .20;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, black, transparent 76%);
  animation: gridDrift 22s linear infinite;
}

.loading-veil {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 22px;
  pointer-events: none;
  background: var(--bg);
  animation: veilOut .72s ease .18s forwards;
}

.loading-veil span {
  border-radius: 12px;
  background: linear-gradient(110deg, var(--surface), var(--surface-2), var(--surface));
  background-size: 200% 100%;
  animation: skeletonWave 1.1s ease-in-out infinite;
}

.app-shell {
  grid-template-columns: 292px minmax(0, 1fr);
}

.sidebar {
  width: 292px;
  padding: 18px 14px;
  background:
    linear-gradient(180deg, rgba(20, 184, 166, .12), transparent 28%),
    rgba(12, 18, 27, .86);
  backdrop-filter: blur(18px);
  border-right-color: var(--line);
}

[data-theme="light"] .sidebar {
  background: rgba(255, 255, 255, .86);
}

.brand {
  min-height: 68px;
  padding: 10px 10px 18px;
}

.brand-mark,
.metric-icon {
  border-radius: 12px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand) 24%, transparent), color-mix(in srgb, var(--accent-2) 16%, transparent));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 10px 26px rgba(20,184,166,.12);
}

.nav {
  gap: 5px;
}

.nav-label {
  margin: 14px 10px 4px;
  color: color-mix(in srgb, var(--muted) 74%, transparent);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.nav a {
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 13px;
  min-height: 42px;
}

.nav a.active {
  color: var(--text);
  border-color: color-mix(in srgb, var(--brand) 28%, var(--line));
  background:
    linear-gradient(90deg, var(--brand-soft), transparent),
    color-mix(in srgb, var(--surface-2) 72%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}

.nav a.active::before {
  left: -5px;
  height: 24px;
  box-shadow: 0 0 18px var(--brand-strong);
}

.sidebar-footer {
  min-height: 46px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-2) 72%, transparent);
}

.main {
  padding: 24px clamp(18px, 3vw, 34px) 38px;
}

.topbar {
  margin: -24px calc(clamp(18px, 3vw, 34px) * -1) 24px;
  padding: 17px clamp(18px, 3vw, 34px);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(18px);
}

.topbar h1 {
  font-size: 25px;
}

.mobile-menu-button {
  display: none;
}

.page-content {
  animation: pageIn .38s ease both;
}

.finance-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
  gap: 24px;
  min-height: 332px;
  overflow: hidden;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid color-mix(in srgb, var(--brand) 24%, var(--line));
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(20, 184, 166, .22), transparent 34%),
    linear-gradient(235deg, rgba(124, 58, 237, .18), transparent 40%),
    color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: var(--shadow);
}

.finance-hero::after {
  content: "";
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand-strong), var(--accent-2), transparent);
  animation: scanLine 3s ease-in-out infinite;
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
}

.hero-copy h2 {
  max-width: 760px;
  font-size: clamp(34px, 4.6vw, 62px);
  line-height: .95;
  margin-bottom: 16px;
}

.hero-copy p {
  max-width: 610px;
  font-size: 15px;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.balance-orbit {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 270px;
}

.balance-card {
  width: min(100%, 320px);
  min-height: 188px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 24px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 18px;
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(16px);
  box-shadow: 0 28px 70px rgba(0,0,0,.25);
}

.balance-card span,
.balance-card small,
.orbit-metric span {
  color: var(--muted);
  font-weight: 800;
}

.balance-card strong {
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1;
}

.orbit-metric {
  position: absolute;
  width: 132px;
  min-height: 78px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-2) 84%, transparent);
  box-shadow: var(--shadow-soft);
  animation: floatCard 5s ease-in-out infinite;
}

.orbit-metric.income {
  top: 12px;
  right: 4px;
}

.orbit-metric.expense {
  bottom: 14px;
  left: 2px;
  animation-delay: .35s;
}

.orbit-metric strong {
  font-size: 22px;
}

.kpi-grid,
.analytics-grid {
  display: grid;
  gap: 16px;
}

.kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 16px;
}

.kpi-card,
.pro-card,
.auth-panel,
.panel,
.table-wrap {
  border-radius: 16px;
  border-color: var(--line);
  background:
    linear-gradient(180deg, rgba(255,255,255,.035), transparent),
    color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--shadow-soft);
}

.kpi-card {
  position: relative;
  min-height: 156px;
  display: grid;
  align-content: space-between;
  gap: 14px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  animation: riseIn .45s ease both;
}

.kpi-card::after {
  content: "";
  position: absolute;
  inset: auto -22% -36% 42%;
  height: 110px;
  background: radial-gradient(circle, color-mix(in srgb, var(--brand) 24%, transparent), transparent 68%);
}

.kpi-card.danger::after {
  background: radial-gradient(circle, color-mix(in srgb, var(--danger) 22%, transparent), transparent 68%);
}

.kpi-card strong {
  display: block;
  margin-top: 7px;
  font-size: 31px;
  line-height: 1;
}

.kpi-card small {
  color: var(--muted);
  font-weight: 750;
}

.analytics-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  margin-top: 16px;
  align-items: stretch;
}

.secondary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pro-card {
  overflow: hidden;
}

.pro-card-head {
  min-height: 76px;
  padding: 18px 20px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface-2) 64%, transparent), transparent);
}

.pro-card-head h2 {
  font-size: 20px;
}

.chart-card {
  min-height: 350px;
}

.chart-panel.tall {
  height: 270px;
}

.chart-bars {
  gap: 7px;
}

.chart-bars span {
  width: 16px;
  box-shadow: 0 0 22px rgba(94,234,212,.16);
}

.progress-list,
.debt-stack,
.dashboard-list,
.compact-list {
  padding: 16px 20px 20px;
}

.progress-row,
.debt-tile,
.dashboard-row,
.compact-list > div {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-2) 48%, transparent);
  margin-bottom: 10px;
  animation: rowIn .42s ease forwards;
  animation-delay: var(--delay);
}

.progress-row {
  display: grid;
  gap: 10px;
  padding: 14px;
  opacity: 0;
  transform: translateY(10px);
}

.progress-row div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.progress-row span,
.debt-tile small {
  color: var(--muted);
  font-weight: 750;
}

.progress-track {
  display: block;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 72%, transparent);
}

.progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--accent-2));
  box-shadow: 0 0 18px color-mix(in srgb, var(--brand) 32%, transparent);
  animation: widthIn .65s ease both;
}

.debt-tile {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  opacity: 0;
  transform: translateY(10px);
}

.debt-tile:hover,
.dashboard-row:hover,
.compact-list > div:hover,
.progress-row:hover {
  border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
  background: color-mix(in srgb, var(--brand) 8%, var(--surface-2));
}

.debt-tile b {
  color: var(--danger);
  font-size: 16px;
}

.empty-state {
  min-height: 74px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-2) 34%, transparent);
  font-weight: 750;
}

.form-card {
  max-width: 1080px;
}

.pro-form {
  padding: 22px;
}

.form-grid {
  gap: 18px;
}

.form-grid label {
  position: relative;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

input,
select {
  min-height: 46px;
  border-radius: 12px;
  background: var(--input);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

input:hover,
select:hover {
  border-color: color-mix(in srgb, var(--brand) 26%, var(--line));
}

input:focus,
select:focus {
  transform: translateY(-1px);
  border-color: var(--brand-strong);
  box-shadow: 0 0 0 4px var(--brand-soft), inset 0 1px 0 rgba(255,255,255,.05);
}

.field-hint {
  padding-left: 2px;
}

.form-actions {
  padding-top: 22px;
}

button,
.button,
.icon-button,
.user-chip {
  border-radius: 12px;
}

button,
.button {
  min-height: 44px;
  padding-inline: 15px;
  font-weight: 850;
}

.button.secondary,
button.secondary {
  background: color-mix(in srgb, var(--surface-2) 64%, transparent);
}

.icon-button,
.user-chip {
  background: color-mix(in srgb, var(--surface-2) 78%, transparent);
}

.bank-card {
  border-radius: 18px;
  background:
    radial-gradient(circle at 86% 12%, rgba(255,255,255,.24), transparent 22%),
    linear-gradient(135deg, #0f172a 0%, #155e75 48%, #312e81 100%);
}

.bank-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.18), transparent 58%);
  transform: translateX(-120%);
  animation: cardShine 4.8s ease-in-out infinite;
}

.statement-row,
.user-row,
.pro-user-row {
  border-color: var(--line);
}

table {
  border-collapse: separate;
  border-spacing: 0;
}

th {
  background: color-mix(in srgb, var(--surface-2) 86%, transparent);
}

td,
th {
  border-bottom-color: var(--line);
}

.alert {
  border-radius: 14px;
  animation: riseIn .3s ease both;
}

.badge.status {
  color: #bbf7d0;
  background: rgba(34, 197, 94, .15);
  border-color: rgba(74, 222, 128, .42);
  box-shadow: 0 0 20px rgba(34, 197, 94, .20);
}

@keyframes skeletonWave {
  from { background-position: 180% 0; }
  to { background-position: -80% 0; }
}

@keyframes veilOut {
  to { opacity: 0; visibility: hidden; }
}

@keyframes widthIn {
  from { width: 0; }
}

@keyframes cardShine {
  0%, 45% { transform: translateX(-120%); }
  70%, 100% { transform: translateX(120%); }
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 252px minmax(0, 1fr);
  }

  .sidebar {
    width: 252px;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analytics-grid,
  .secondary-grid {
    grid-template-columns: 1fr;
  }

  .auth-stage {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .auth-stage-mascot {
    grid-template-columns: 1fr;
  }

  .auth-showcase {
    min-height: 520px;
  }
}

@media (max-width: 900px) {
  .loading-veil {
    grid-template-columns: 1fr;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    width: min(86vw, 330px);
    height: 100vh;
    transform: translateX(-102%);
    transition: transform .24s ease;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 30;
    opacity: 0;
    visibility: hidden;
    background: rgba(0,0,0,.46);
    backdrop-filter: blur(2px);
    transition: opacity .2s ease, visibility .2s ease;
  }

  body.sidebar-open .sidebar-backdrop {
    opacity: 1;
    visibility: visible;
  }

  .nav {
    display: grid;
    grid-template-columns: 1fr;
  }

  .mobile-menu-button {
    display: inline-flex;
    width: 44px;
    padding: 0;
    flex: 0 0 44px;
  }

  .topbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
  }

  .topbar-title {
    min-width: 0;
  }

  .topbar-actions {
    grid-column: 1 / -1;
  }

  .finance-hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hero-copy h2 {
    font-size: 34px;
  }

  .balance-orbit {
    min-height: 250px;
  }

  .orbit-metric {
    position: static;
    width: 100%;
    margin-top: 10px;
    animation: none;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .pro-card-head,
  .progress-row div,
  .debt-tile {
    align-items: flex-start;
  }

  .debt-tile {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .debt-tile b {
    grid-column: 2;
  }

  .chart-panel.tall {
    height: 220px;
  }

  .topbar-actions .user-chip span:last-child {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 560px) {
  .main {
    padding: 16px 12px 26px;
  }

  .topbar {
    margin: -16px -12px 18px;
    padding: 14px 12px;
  }

  .finance-hero,
  .pro-form,
  .progress-list,
  .debt-stack,
  .dashboard-list,
  .compact-list {
    padding: 16px;
  }

  .quick-actions,
  .form-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .button,
  button {
    width: 100%;
  }

  .icon-button {
    width: 42px;
  }

  .balance-card {
    min-height: 160px;
  }

  .chart-bars span {
    width: 11px;
  }

  .auth-shell {
    padding: 12px;
  }

  .auth-stage {
    gap: 12px;
  }

  .auth-showcase {
    min-height: 420px;
    padding: 20px;
    border-radius: 20px;
  }

  .auth-copy h1 {
    font-size: 36px;
  }

  .auth-copy p {
    font-size: 14px;
  }

  .auth-preview {
    min-height: 160px;
  }

  .main-preview {
    width: 100%;
    min-height: 158px;
  }

  .main-preview strong {
    font-size: 28px;
  }

  .mini-preview,
  .list-preview {
    display: none;
  }

  .wolf-stage {
    min-height: 250px;
  }

  .wolf-emblem-stage {
    min-height: 270px;
  }

  .wolf-emblem {
    width: min(100%, 280px);
  }

  .wolf-glow {
    width: 250px;
    height: 250px;
  }

  .moon-ring {
    width: 210px;
    height: 210px;
  }

  .wolf-body {
    width: 204px;
    height: 138px;
  }

  .wolf-tail {
    right: calc(50% - 168px);
    bottom: 88px;
    width: 124px;
    height: 32px;
  }

  .wolf-head {
    bottom: 108px;
    width: 158px;
    height: 130px;
  }

  .wolf-ear {
    width: 56px;
    height: 82px;
    top: -44px;
  }

  .wolf-eye {
    top: 50px;
    width: 25px;
    height: 8px;
  }

  .wolf-eye.left {
    left: 36px;
  }

  .wolf-eye.right {
    right: 36px;
  }

  .wolf-brow {
    top: 40px;
    width: 32px;
  }

  .wolf-brow.left {
    left: 30px;
  }

  .wolf-brow.right {
    right: 30px;
  }

  .wolf-snout {
    width: 86px;
    height: 76px;
    bottom: -2px;
  }

  .wolf-nose {
    bottom: 32px;
    width: 28px;
    height: 18px;
  }

  .wolf-paws {
    gap: 48px;
  }

  .wolf-paws span {
    width: 44px;
    height: 28px;
  }

  .privacy-badge {
    left: 0;
    bottom: 22px;
  }

  .finance-runes {
    display: none;
  }

  .auth-card {
    padding: 20px;
    border-radius: 20px;
  }

  .auth-card-head h2 {
    font-size: 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

.auth-shell {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 48px);
  background:
    linear-gradient(135deg, rgba(20,184,166,.18), transparent 34%),
    linear-gradient(225deg, rgba(124,58,237,.20), transparent 34%),
    var(--bg);
}

.auth-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .16;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 42px 42px;
  animation: gridDrift 18s linear infinite;
}

.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: clamp(22px, 3vw, 34px);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.06), transparent),
    color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(20px);
  box-shadow: 0 30px 90px rgba(0,0,0,.34);
}

.auth-stage {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  min-height: min(760px, calc(100vh - 48px));
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, .72fr);
  gap: 28px;
  align-items: stretch;
}

.auth-showcase {
  position: relative;
  display: grid;
  align-content: space-between;
  min-height: 620px;
  overflow: hidden;
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--line));
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(20,184,166,.24), transparent 38%),
    linear-gradient(225deg, rgba(56,189,248,.14), transparent 36%),
    rgba(15, 23, 42, .58);
  box-shadow: var(--shadow);
}

.auth-showcase::after {
  content: "";
  position: absolute;
  inset: auto 30px 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand-strong), var(--accent-2), transparent);
  animation: scanLine 3s ease-in-out infinite;
}

.auth-logo,
.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.auth-logo {
  width: fit-content;
}

.auth-logo strong {
  display: block;
  font-size: 17px;
}

.auth-logo small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.auth-copy {
  max-width: 620px;
}

.auth-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 5vw, 68px);
  line-height: .93;
}

.auth-copy p {
  max-width: 540px;
  color: color-mix(in srgb, var(--muted) 86%, white);
  font-size: 16px;
}

.auth-preview {
  position: relative;
  min-height: 210px;
}

.preview-card {
  position: absolute;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 70px rgba(0,0,0,.26);
}

.main-preview {
  left: 0;
  bottom: 0;
  width: min(420px, 78%);
  min-height: 190px;
  padding: 22px;
  animation: riseIn .55s ease both;
}

.preview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-weight: 850;
}

.preview-top i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--brand-strong);
  box-shadow: 0 0 16px var(--brand-strong);
}

.main-preview strong {
  display: block;
  margin-top: 18px;
  font-size: 36px;
}

.preview-chart {
  height: 70px;
  display: flex;
  align-items: end;
  gap: 10px;
  margin-top: 18px;
}

.preview-chart span {
  flex: 1;
  border-radius: 999px 999px 3px 3px;
  background: linear-gradient(180deg, var(--brand-strong), rgba(20,184,166,.18));
  animation: barRise .75s ease both;
}

.mini-preview {
  right: 0;
  top: 14px;
  width: 190px;
  padding: 18px;
  animation: floatCard 5s ease-in-out infinite;
}

.mini-preview span,
.list-preview span {
  color: var(--muted);
}

.mini-preview strong {
  display: block;
  margin-top: 8px;
  color: var(--danger);
  font-size: 24px;
}

.list-preview {
  right: 34px;
  bottom: 8px;
  width: 220px;
  display: grid;
  gap: 10px;
  padding: 16px;
  animation: floatCard 5s ease-in-out infinite .35s;
}

.list-preview span {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,255,255,.16), rgba(255,255,255,.34), rgba(255,255,255,.16));
  background-size: 200% 100%;
  animation: skeletonWave 1.4s ease-in-out infinite;
}

.list-preview span:nth-child(2) {
  width: 74%;
}

.list-preview span:nth-child(3) {
  width: 54%;
}

.auth-card {
  align-self: center;
}

.auth-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.auth-card-head h2 {
  margin-bottom: 4px;
  font-size: 30px;
}

.auth-form {
  padding: 0;
}

.auth-form label {
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.auth-form button {
  margin-top: 4px;
  min-height: 48px;
}

.auth-footnote {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.auth-stage-mascot {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
}

.mascot-showcase {
  background:
    linear-gradient(135deg, rgba(14, 165, 233, .18), transparent 36%),
    linear-gradient(225deg, rgba(20, 184, 166, .18), transparent 34%),
    linear-gradient(180deg, rgba(15, 23, 42, .72), rgba(8, 13, 22, .82));
}

.wolf-stage {
  position: relative;
  min-height: 350px;
  display: grid;
  place-items: end center;
  overflow: hidden;
  perspective: 900px;
}

.moon-ring {
  position: absolute;
  width: 286px;
  height: 286px;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(226, 244, 255, .10) 0 35%, transparent 36%),
    conic-gradient(from 120deg, rgba(94, 234, 212, .05), rgba(56, 189, 248, .46), rgba(15, 23, 42, .08), rgba(94, 234, 212, .05));
  filter: drop-shadow(0 0 38px rgba(56, 189, 248, .20));
  animation: rotateRing 16s linear infinite;
}

.wolf-body {
  position: absolute;
  bottom: 24px;
  width: 264px;
  height: 178px;
  border-radius: 54% 46% 30px 30px;
  background:
    linear-gradient(90deg, transparent 0 42%, rgba(255,255,255,.16) 43% 55%, transparent 56%),
    linear-gradient(135deg, #d9e3ea 0%, #7e94a5 38%, #34475a 100%);
  box-shadow:
    inset 0 -22px 36px rgba(15, 23, 42, .24),
    0 30px 72px rgba(0,0,0,.30);
  clip-path: polygon(9% 18%, 42% 2%, 80% 13%, 100% 48%, 88% 100%, 12% 100%, 0 48%);
  animation: wolfBreathe 3.8s ease-in-out infinite;
}

.wolf-body::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -6px;
  width: 132px;
  height: 150px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #f7fbff, rgba(217, 227, 234, .26));
  clip-path: polygon(8% 0, 24% 100%, 38% 25%, 50% 100%, 62% 25%, 76% 100%, 92% 0);
}

.wolf-tail {
  position: absolute;
  right: calc(50% - 215px);
  bottom: 105px;
  width: 166px;
  height: 42px;
  background: linear-gradient(90deg, #2f4357 0%, #657c8f 54%, #eef6fa 100%);
  transform-origin: 8% 50%;
  transform: rotate(-33deg);
  clip-path: polygon(0 45%, 26% 10%, 80% 0, 100% 50%, 80% 100%, 26% 90%, 0 55%);
  filter: drop-shadow(0 18px 30px rgba(0,0,0,.22));
  animation: tailWag 4.2s ease-in-out infinite;
}

.fur-mark {
  position: absolute;
  display: block;
  height: 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .20);
}

.fur-mark.one {
  width: 88px;
  left: 34px;
  top: 58px;
  transform: rotate(-18deg);
}

.fur-mark.two {
  width: 70px;
  right: 42px;
  top: 86px;
  transform: rotate(16deg);
}

.wolf-head {
  position: absolute;
  bottom: 142px;
  width: 210px;
  height: 170px;
  background:
    linear-gradient(90deg, transparent 0 43%, rgba(15,23,42,.13) 44% 56%, transparent 57%),
    linear-gradient(135deg, #f1f7fa 0%, #9eb1bf 48%, #34485d 100%);
  clip-path: polygon(50% 0, 82% 16%, 98% 50%, 76% 88%, 50% 100%, 24% 88%, 2% 50%, 18% 16%);
  filter: drop-shadow(0 24px 50px rgba(0,0,0,.26));
  animation: wolfLook 5.4s ease-in-out infinite;
}

.wolf-head::before {
  content: "";
  position: absolute;
  inset: 28px 24px 20px;
  background:
    linear-gradient(90deg, transparent 0 45%, rgba(15,23,42,.10) 46% 54%, transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,.42), rgba(255,255,255,.16));
  clip-path: polygon(14% 0, 86% 0, 70% 68%, 50% 100%, 30% 68%);
}

.wolf-head::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -50px;
  width: 142px;
  height: 82px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #f7fbff, rgba(217,227,234,.34));
  clip-path: polygon(0 0, 16% 100%, 33% 18%, 50% 100%, 67% 18%, 84% 100%, 100% 0);
}

.wolf-ear {
  position: absolute;
  top: -56px;
  width: 76px;
  height: 110px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.38), transparent 36%),
    linear-gradient(135deg, #d7e3ea, #34485d);
  clip-path: polygon(50% 0, 94% 100%, 6% 100%);
  transform-origin: 50% 100%;
  z-index: -1;
}

.wolf-ear.left {
  left: 6px;
  transform: rotate(-28deg);
}

.wolf-ear.right {
  right: 6px;
  transform: rotate(28deg);
}

.wolf-ear::after {
  content: "";
  position: absolute;
  inset: 22px 20px 18px;
  background: rgba(251, 113, 133, .20);
  clip-path: polygon(50% 0, 88% 100%, 12% 100%);
}

.wolf-face {
  display: none;
}

.wolf-eye {
  position: absolute;
  top: 66px;
  width: 34px;
  height: 10px;
  border-radius: 999px;
  background: #07111e;
  box-shadow: 0 0 0 3px rgba(255,255,255,.14), 0 0 18px rgba(94,234,212,.34);
  transition: height .2s ease, transform .2s ease, box-shadow .2s ease;
}

.wolf-eye.left {
  left: 47px;
  transform: rotate(10deg);
}

.wolf-eye.right {
  right: 47px;
  transform: rotate(-10deg);
}

.wolf-brow {
  position: absolute;
  top: 52px;
  width: 42px;
  height: 7px;
  border-radius: 999px;
  background: rgba(7, 17, 30, .34);
  transition: transform .22s ease;
}

.wolf-brow.left {
  left: 39px;
  transform: rotate(18deg);
}

.wolf-brow.right {
  right: 39px;
  transform: rotate(-18deg);
}

.wolf-snout {
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 112px;
  height: 100px;
  transform: translateX(-50%);
  background:
    linear-gradient(180deg, #fbfdff, #d6e2ea);
  clip-path: polygon(18% 0, 82% 0, 100% 50%, 50% 100%, 0 50%);
  box-shadow: inset 0 -10px 18px rgba(15,23,42,.12);
}

.wolf-snout::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 18px;
  width: 2px;
  height: 30px;
  transform: translateX(-50%);
  background: rgba(7,17,30,.28);
}

.wolf-nose {
  position: absolute;
  left: 50%;
  bottom: 42px;
  width: 36px;
  height: 23px;
  transform: translateX(-50%);
  border-radius: 62% 62% 72% 72%;
  background: #07111e;
  box-shadow: 0 6px 12px rgba(15,23,42,.22);
}

.wolf-paws {
  position: absolute;
  bottom: 12px;
  display: flex;
  gap: 82px;
}

.wolf-paws span {
  width: 64px;
  height: 38px;
  border-radius: 20px 20px 14px 14px;
  background:
    linear-gradient(180deg, #f4f9fb, #94aaba);
  box-shadow: 0 16px 30px rgba(0,0,0,.22);
  transition: transform .22s ease;
}

.privacy-badge,
.finance-runes {
  position: absolute;
  z-index: 2;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 16px;
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 44px rgba(0,0,0,.22);
}

.privacy-badge {
  left: 10%;
  bottom: 46px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 14px;
}

.finance-runes {
  right: 8%;
  bottom: 78px;
  display: grid;
  gap: 8px;
  padding: 14px;
}

.finance-runes span {
  min-width: 86px;
  padding: 7px 10px;
  border-radius: 999px;
  color: color-mix(in srgb, var(--text) 82%, transparent);
  background: rgba(255,255,255,.08);
  font-size: 12px;
  font-weight: 850;
}

.wolf-privacy .wolf-eye {
  height: 4px;
  transform: translateY(7px);
  border-radius: 999px;
  background: #07111e;
  box-shadow: 0 0 0 0 transparent;
}

.wolf-privacy .wolf-brow.left {
  transform: translateY(8px) rotate(8deg);
}

.wolf-privacy .wolf-brow.right {
  transform: translateY(8px) rotate(-8deg);
}

.wolf-privacy .wolf-paws span {
  transform: translateY(-24px);
}

.wolf-privacy .privacy-badge {
  border-color: rgba(94, 234, 212, .34);
  box-shadow: 0 0 26px rgba(94, 234, 212, .20), 0 18px 44px rgba(0,0,0,.22);
}

@keyframes wolfBreathe {
  0%, 100% { transform: translateY(0) scaleY(1); }
  50% { transform: translateY(3px) scaleY(.985); }
}

@keyframes wolfLook {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  40% { transform: translateX(-4px) rotate(-1deg); }
  70% { transform: translateX(4px) rotate(1deg); }
}

@keyframes tailWag {
  0%, 100% { transform: rotate(-34deg); }
  50% { transform: rotate(-25deg); }
}

.wolf-emblem-stage {
  min-height: 360px;
  place-items: center;
}

.wolf-glow {
  position: absolute;
  width: 330px;
  height: 330px;
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(94,234,212,.22) 0 18%, rgba(56,189,248,.12) 36%, transparent 68%),
    conic-gradient(from 180deg, rgba(94,234,212,.08), rgba(124,58,237,.30), rgba(56,189,248,.24), rgba(94,234,212,.08));
  filter: blur(.2px) drop-shadow(0 0 38px rgba(56,189,248,.20));
  animation: rotateRing 18s linear infinite;
}

.wolf-emblem {
  position: relative;
  z-index: 1;
  width: min(100%, 390px);
  max-height: 390px;
  overflow: visible;
  filter: drop-shadow(0 28px 60px rgba(0,0,0,.34));
  animation: wolfEmblemFloat 5.2s ease-in-out infinite;
}

.wolf-halo {
  fill: rgba(15, 23, 42, .38);
  stroke: rgba(94, 234, 212, .32);
  stroke-width: 1.5;
}

.wolf-shadow {
  fill: rgba(0, 0, 0, .22);
}

.wolf-main {
  fill: url(#wolfSteel);
  stroke: rgba(255,255,255,.18);
  stroke-width: 2;
}

.wolf-side.left {
  fill: url(#wolfDark);
  opacity: .72;
}

.wolf-cheek.left {
  fill: #b7c9d6;
  opacity: .92;
}

.wolf-cheek.right {
  fill: #52687b;
  opacity: .94;
}

.wolf-muzzle {
  fill: url(#wolfIce);
  stroke: rgba(255,255,255,.34);
  stroke-width: 1.5;
}

.wolf-snout-mark {
  fill: rgba(206, 223, 233, .72);
}

.wolf-nose-svg {
  fill: #07111e;
  filter: drop-shadow(0 8px 10px rgba(0,0,0,.20));
}

.wolf-eye-svg,
.wolf-brow-svg,
.wolf-lid {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wolf-eye-svg {
  stroke: #06101d;
  stroke-width: 10;
  transition: opacity .18s ease, transform .18s ease;
}

.wolf-brow-svg {
  stroke: rgba(6, 16, 29, .48);
  stroke-width: 7;
  transition: transform .22s ease;
}

.wolf-lid {
  opacity: 0;
  stroke: #06101d;
  stroke-width: 8;
  transition: opacity .18s ease, transform .18s ease;
}

.wolf-privacy .wolf-eye-svg {
  opacity: 0;
}

.wolf-privacy .wolf-lid {
  opacity: 1;
  transform: translateY(2px);
}

.wolf-privacy .wolf-brow-svg.left {
  transform: translate(8px, 10px) rotate(5deg);
}

.wolf-privacy .wolf-brow-svg.right {
  transform: translate(-8px, 10px) rotate(-5deg);
}

.wolf-privacy .wolf-emblem {
  animation-duration: 3.2s;
}

@keyframes wolfEmblemFloat {
  0%, 100% { transform: translateY(0) rotateX(0deg); }
  50% { transform: translateY(-8px) rotateX(2deg); }
}

label:has(input[type="checkbox"]) {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: color-mix(in srgb, var(--surface-2) 44%, transparent);
  cursor: pointer;
}

input[type="checkbox"] {
  width: 38px;
  min-width: 38px;
  height: 22px;
  min-height: 22px;
  appearance: none;
  padding: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 72%, transparent);
  border-color: var(--line);
  position: relative;
}

input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--muted);
  transition: transform .18s ease, background .18s ease;
}

input[type="checkbox"]:checked {
  background: color-mix(in srgb, var(--brand) 28%, transparent);
  border-color: color-mix(in srgb, var(--brand) 58%, var(--line));
}

input[type="checkbox"]:checked::after {
  transform: translateX(16px);
  background: var(--brand-strong);
  box-shadow: 0 0 12px color-mix(in srgb, var(--brand-strong) 54%, transparent);
}

/* Final mobile hardening */
@media (max-width: 980px) {
  .auth-shell {
    min-height: 100dvh;
    padding: 14px;
    align-items: start;
  }

  .auth-stage,
  .auth-stage-mascot {
    width: 100%;
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .auth-showcase,
  .mascot-showcase {
    min-height: auto;
    padding: 22px;
    border-radius: 22px;
  }

  .auth-copy {
    max-width: none;
    margin-top: 30px;
  }

  .auth-copy h1 {
    max-width: 720px;
    font-size: clamp(34px, 8vw, 54px);
    line-height: 1;
  }

  .wolf-emblem-stage {
    min-height: 300px;
    margin-top: 16px;
  }

  .wolf-emblem {
    width: min(72vw, 330px);
  }

  .wolf-glow {
    width: min(78vw, 310px);
    height: min(78vw, 310px);
  }

  .auth-card {
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 640px) {
  .auth-shell {
    padding: 10px;
  }

  .auth-stage,
  .auth-stage-mascot {
    gap: 10px;
  }

  .auth-showcase,
  .mascot-showcase,
  .auth-card {
    border-radius: 18px;
  }

  .auth-showcase,
  .mascot-showcase {
    padding: 18px;
  }

  .auth-logo {
    gap: 10px;
  }

  .auth-logo .brand-mark {
    width: 38px;
    height: 38px;
  }

  .auth-logo strong {
    font-size: 15px;
  }

  .auth-logo small {
    font-size: 11px;
  }

  .auth-copy {
    margin-top: 24px;
  }

  .auth-copy h1 {
    font-size: clamp(30px, 10vw, 40px);
    line-height: 1.03;
    margin-bottom: 12px;
  }

  .auth-copy p {
    font-size: 14px;
    line-height: 1.55;
  }

  .wolf-emblem-stage {
    min-height: 230px;
    margin-top: 8px;
  }

  .wolf-emblem {
    width: min(78vw, 245px);
  }

  .wolf-glow {
    width: min(82vw, 240px);
    height: min(82vw, 240px);
  }

  .privacy-badge {
    left: 50%;
    bottom: 8px;
    transform: translateX(-50%);
    padding: 9px 11px;
    white-space: nowrap;
    font-size: 12px;
  }

  .finance-runes {
    display: none;
  }

  .auth-card {
    padding: 18px;
  }

  .auth-card-head {
    align-items: flex-start;
    margin-bottom: 18px;
  }

  .auth-card-head h2 {
    font-size: 24px;
  }

  .auth-form {
    gap: 12px;
  }

  .auth-form input {
    min-height: 44px;
    font-size: 16px;
  }

  .auth-form button {
    min-height: 46px;
  }

  .auth-footnote {
    align-items: flex-start;
    line-height: 1.4;
  }
}

@media (max-width: 380px) {
  .auth-copy h1 {
    font-size: 28px;
  }

  .wolf-emblem-stage {
    min-height: 205px;
  }

  .wolf-emblem {
    width: 218px;
  }

  .auth-card-head {
    gap: 10px;
  }
}
