body.auth {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 50% 16%, rgba(47, 91, 255, 0.38), transparent 46%),
    #070709;
  color: #fff;
}
.auth-wrap {
  width: min(440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0 72px;
}
.auth-frame {
  border-radius: 28px;
  overflow: hidden;
  background: #111;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}
.auth-frame img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.auth-line {
  margin: 28px 0 0;
  text-align: center;
  color: #8eb0ff;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.auth-brand {
  display: block;
  margin-top: 8px;
  text-align: center;
  color: #b9cbff;
  text-decoration: none;
  font-weight: 600;
}
.auth-card {
  margin-top: 28px;
  background: #fff;
  color: var(--ink);
  border-radius: 28px;
  padding: 28px 24px 22px;
}
.auth-card h1 {
  margin: 0 0 6px;
  text-align: center;
  font-size: 28px;
  letter-spacing: -0.03em;
}
.auth-card .hint {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}
.auth-card label,
.auth-card .label-row {
  display: block;
  margin: 14px 0 6px;
  font-size: 14px;
  font-weight: 650;
}
.auth-card .label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.auth-card .label-row a {
  font-weight: 550;
  font-size: 13px;
  color: var(--muted);
}
.auth-card input[type="email"],
.auth-card input[type="password"],
.auth-card input[type="text"] {
  width: 100%;
  height: 48px;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 0 16px;
  background: #fff;
}
.auth-card input:focus {
  outline: 2px solid #d9e0ff;
  border-color: var(--blue);
}
.auth-card .check {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 450;
  color: #3a3f46;
  line-height: 1.45;
}
.auth-card .check input { margin-top: 3px; }
.auth-card .check a { color: var(--blue-ink); }
.auth-card .go {
  width: 100%;
  height: 48px;
  margin-top: 18px;
  border: 0;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-weight: 650;
  cursor: pointer;
}
.auth-card .go:hover { background: #244cf0; }
.auth-card .go:disabled { opacity: 0.65; cursor: progress; }
.auth-error { min-height: 1.2em; margin: 10px 0 0; color: #b42318; font-size: 14px; }
.auth-foot { margin: 16px 0 0; text-align: center; color: var(--muted); font-size: 14px; }
.auth-foot a { color: var(--ink); font-weight: 650; }
.auth-note { margin: 16px 0 0; text-align: center; color: #9aa0a8; font-size: 13px; }
.auth-langs { display: flex; justify-content: center; gap: 12px; margin-top: 14px; font-size: 13px; font-weight: 650; }
.auth-langs a { color: #9aa0a8; text-decoration: none; }
.auth-langs a[aria-current="page"] { color: #fff; }
.side .auth-langs a { color: var(--faint); }
.side .auth-langs a[aria-current="page"] { color: var(--ink); }

body.shell { background: var(--wash); }
.shell-grid { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side {
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 18px 12px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.side .mark { padding: 6px 10px 12px; }
.side-label {
  margin: 8px 12px 6px;
  font-size: 12px;
  font-weight: 650;
  color: var(--faint);
}
.side nav, .side-foot { display: flex; flex-direction: column; gap: 2px; }
.side-foot { margin-top: auto; padding-top: 12px; }
.side a.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: #3a3f46;
  font-size: 14px;
  font-weight: 550;
}
.side a.nav svg { flex: none; }
.side a.nav:hover { background: var(--wash); color: var(--ink); }
.side a.nav[aria-current="page"] { background: var(--blue-soft); color: var(--blue-ink); }
.main { padding: 32px 32px 72px; min-width: 0; }
.main-bar { display: none; align-items: center; gap: 12px; margin-bottom: 18px; }
.shell-open {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.shell-open span { display: block; width: 16px; height: 1.5px; margin: 3px 0; background: #111; }
.main h1 { margin: 0 0 8px; font-size: 28px; letter-spacing: -0.03em; }
.main .lead { margin: 0 0 20px; color: var(--muted); max-width: 68ch; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
}
.panel .k { margin: 0; color: var(--faint); font-size: 13px; font-weight: 650; }
.panel .v { margin: 4px 0 0; font-size: 32px; font-weight: 700; letter-spacing: -0.03em; }
.panel h2 { margin: 0 0 12px; font-size: 16px; }
.ledger { width: 100%; border-collapse: collapse; font-size: 14px; }
.ledger th {
  text-align: left;
  color: var(--faint);
  font-weight: 650;
  font-size: 12px;
  padding: 8px;
  border-bottom: 1px solid var(--line);
}
.ledger td { padding: 12px 8px; border-bottom: 1px solid #f0f1f4; vertical-align: top; }
.ledger .num { text-align: right; font-variant-numeric: tabular-nums; }
.empty { margin: 4px 0 0; color: var(--faint); }
.stack { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field span { font-size: 14px; font-weight: 650; }
.field input {
  height: 46px;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 0 12px;
  background: #fff;
}
.field input:focus { outline: 2px solid #d9e0ff; border-color: var(--blue); }
.field input[readonly] { color: var(--muted); background: var(--wash); }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.warn { background: #fff; color: #b42318; border: 1px solid #f3c7c3; }
.form-note { min-height: 1.2em; margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.form-note.is-bad { color: #b42318; }
.scrim { display: none; }
.billing-note { margin: 0 0 16px; color: var(--muted); }

@media (max-width: 1099px) {
  .shell-grid { grid-template-columns: 1fr; }
  .side {
    position: fixed;
    z-index: 40;
    width: min(280px, 86vw);
    transform: translateX(-105%);
    transition: transform 0.18s ease;
    box-shadow: var(--shadow);
  }
  .side.open { transform: none; }
  .scrim:not([hidden]) { position: fixed; inset: 0; background: rgba(20, 20, 22, 0.35); z-index: 30; display: block; }
  .main { padding: 16px 16px 56px; }
  .main-bar { display: flex; }
  .stats { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .auth-wrap { padding-top: 28px; }
  .auth-line { font-size: 26px; }
  .auth-card { padding: 22px 16px 18px; }
}
