/* We Should Probably… — account area styles (builds on ../style.css)
   Implements the Hearth "Subscription web app" design:
   1. account shell (sidebar + content)
   2. panels, plans, comparison
   3. states (loading, error, past due)
   4. auth split (sign in / create account / password reset)
   5. reward (upgrade success)
   6. buttons, forms, helpers
   7. responsive
   ========================================================= */

body.app-page { min-height: 100vh; background: var(--bg-default); }

/* ---------- 1. account shell ---------- */
.shell { min-height: 100vh; display: flex; }

.shell-nav {
  flex: 0 0 268px;
  width: 268px;
  background: var(--bg-sunken);
  border-right: 1px solid var(--border-subtle);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px;
  color: var(--text-primary);
  text-decoration: none;
}
.nav-brand:hover { color: var(--text-primary); text-decoration: none; }
.nav-brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav-brand span {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.4px;
}

.nav-list { display: flex; flex-direction: column; gap: 4px; }

.nav-overline {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 0 12px 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--duration-fast) var(--easing-gentle), color var(--duration-fast);
}
.nav-item:hover { background: var(--overlay-press-light); color: var(--text-primary); text-decoration: none; }
.nav-item[aria-current="page"] {
  background: var(--surface-default);
  box-shadow: var(--shadow-sm);
  color: var(--accent-primary);
  font-weight: 700;
}
.nav-item .ico {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border: 1.7px solid currentColor;
  border-radius: 5px;
}
.nav-item--soon { color: var(--taupe-500); cursor: default; }
.nav-item--soon:hover { background: transparent; color: var(--taupe-500); }
.nav-soon {
  margin-left: auto;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--taupe-500);
}

.nav-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }

.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  background: var(--surface-default);
  box-shadow: var(--shadow-sm);
}
.nav-avatar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: var(--clay-100);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  color: var(--clay-600);
}
.nav-avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.nav-user-text { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.nav-user-name { font-size: 13px; font-weight: 700; }
.nav-user-mail {
  font-size: 11px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-actions { display: flex; gap: 8px; }

.shell-main { flex: 1 1 auto; min-width: 0; padding: clamp(24px, 4vw, 40px); }
.shell-inner { width: 100%; max-width: 640px; display: flex; flex-direction: column; gap: 24px; }
.shell-inner--wide { max-width: 680px; }

.page-head { display: flex; flex-direction: column; gap: 6px; }
.page-head h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(24px, 3.4vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.8px;
}
.page-head p { margin: 0; font-size: 15px; line-height: 23px; color: var(--text-secondary); }

.stack-16 { display: flex; flex-direction: column; gap: 16px; }

/* ---------- 2. panels, plans, comparison ---------- */
.panel {
  background: var(--surface-default);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.panel--tight { gap: 14px; }
.panel--accent { background: var(--surface-accent-subtle); box-shadow: none; gap: 16px; }
.panel--row { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; }

.panel-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.3px;
}

.overline-sm {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.plan-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.plan-head-text { display: flex; flex-direction: column; gap: 6px; }
.plan-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.badge {
  flex: 0 0 auto;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--radius-badge);
  font-size: 10px;
  font-weight: 800;
  line-height: 24px;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge--active { background: var(--accent-secondary-subtle); color: var(--sage-600); }
.badge--warning { background: var(--status-warning-subtle); color: var(--amber-700); }
.badge--neutral { background: var(--cream-200); color: var(--espresso-800); }
.badge--save {
  height: 22px;
  line-height: 22px;
  padding: 0 9px;
  margin-left: auto;
  background: var(--accent-secondary-subtle);
  color: var(--sage-600);
}

.price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price-amount {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(30px, 5vw, 36px);
  line-height: 1;
  letter-spacing: -1px;
}
.price-note { font-size: 15px; font-weight: 600; color: var(--text-secondary); }

.detail-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 24px;
  margin: 0;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--surface-muted);
}
.detail-grid dt { font-size: 14px; font-weight: 600; line-height: 1.3; color: var(--text-secondary); }
.detail-grid dd { margin: 0; font-size: 14px; font-weight: 700; line-height: 1.3; }
.detail-grid div[hidden] { display: none; }

.rule { height: 1px; margin: 0; border: 0; background: var(--border-subtle); }

.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.check-list li {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
}
.check-list li::before {
  content: '';
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  background: var(--accent-secondary-subtle);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%232F5239' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

.cta-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.5px;
}
.cta-body {
  margin: 0;
  max-width: 44ch;
  font-size: 15px;
  line-height: 23px;
  color: var(--espresso-800);
  text-wrap: pretty;
}
.cta-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cta-note { font-size: 14px; font-weight: 600; color: var(--espresso-800); }

.compare { display: grid; grid-template-columns: 1fr auto auto; gap: 12px 20px; align-items: center; }
.compare-col {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-align: right;
  min-width: 72px;
}
.compare-col--premium { color: var(--accent-primary); }
.compare-label { font-size: 14px; font-weight: 600; }
.compare-free { font-size: 14px; font-weight: 600; color: var(--text-secondary); text-align: right; }
.compare-premium { font-size: 14px; font-weight: 700; text-align: right; }

.foot-note { margin: 0; font-size: 14px; line-height: 21px; color: var(--text-secondary); }
.hint { font-size: 13px; line-height: 19px; color: var(--text-secondary); }
.hint--wrap { max-width: 34ch; }

/* ---------- plan chooser (upgrade) ---------- */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 14px;
}
.plan-option {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-card);
  background: var(--surface-default);
  cursor: pointer;
  transition: border-color var(--duration-fast), background var(--duration-fast);
}
.plan-option:hover { border-color: var(--border-strong); }
.plan-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.plan-option-top { display: flex; align-items: center; gap: 10px; }
.plan-dot {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  border: 2px solid var(--border-default);
  background: var(--surface-default);
}
.plan-dot i { display: block; width: 10px; height: 10px; border-radius: var(--radius-full); background: transparent; }
.plan-title { font-family: var(--font-display); font-weight: 800; font-size: 17px; letter-spacing: -0.3px; }
.plan-price {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: -1px;
}
.plan-per { font-size: 14px; font-weight: 600; line-height: 1.3; color: var(--text-secondary); }

.plan-option.is-selected {
  border: 2px solid var(--accent-primary);
  padding: 19px;
  background: var(--surface-accent-subtle);
}
.plan-option.is-selected .plan-dot { border-color: var(--accent-primary); }
.plan-option.is-selected .plan-dot i { background: var(--accent-primary); }
.plan-option.is-selected .plan-per { color: var(--espresso-800); }
.plan-option:focus-within { box-shadow: 0 0 0 3px var(--focus-ring-clay); }

.subscribe-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

/* ---------- 3. states ---------- */
.notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--status-warning-subtle);
}
.notice-mark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  background: var(--amber-700);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
}
.notice-body { display: flex; flex-direction: column; gap: 6px; }
.notice-title { font-size: 15px; font-weight: 700; line-height: 1.35; color: var(--espresso-900); }
.notice-text { font-size: 14px; line-height: 20px; color: var(--espresso-800); }
.notice-link { font-size: 14px; font-weight: 700; line-height: 1.3; }

.state { align-items: flex-start; gap: 18px; }
.state-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--status-warning-subtle);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  color: var(--amber-700);
}
.state-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.4px;
}
.state-text { margin: 0; font-size: 15px; line-height: 23px; color: var(--text-secondary); text-wrap: pretty; }
.state-actions { display: flex; gap: 10px; flex-wrap: wrap; }

@keyframes shimmer { 0% { background-position: -260px 0; } 100% { background-position: 260px 0; } }

.sk {
  display: block;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--cream-100), var(--cream-200), var(--cream-100));
  background-size: 260px 100%;
  animation: shimmer 1.3s linear infinite;
}
.sk--overline { width: 88px; height: 10px; }
.sk--title { width: 150px; height: 20px; border-radius: 6px; }
.sk--price { width: 190px; height: 34px; border-radius: 8px; }
.sk--badge { width: 64px; height: 24px; border-radius: 6px; background: var(--cream-100); animation: none; }
.sk--btn { width: 188px; height: 48px; border-radius: var(--radius-md); background: var(--cream-100); animation: none; }
.sk-block {
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--surface-muted);
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.sk-line { display: block; height: 12px; border-radius: var(--radius-full); background: var(--cream-200); }

/* ---------- 4. auth split ---------- */
.auth-split { min-height: 100vh; display: flex; }

.auth-aside {
  position: relative;
  overflow: hidden;
  flex: 0 0 460px;
  width: 460px;
  background: var(--surface-inverse);
  color: var(--text-on-inverse);
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.auth-aside::after {
  content: '';
  position: absolute;
  right: -70px;
  bottom: -70px;
  width: 220px;
  height: 220px;
  border-radius: var(--radius-full);
  background: rgba(255, 197, 61, 0.12);
}

.auth-brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--cream-50);
  text-decoration: none;
}
.auth-brand:hover { color: var(--cream-50); text-decoration: none; }
.auth-brand img { width: 34px; height: 34px; border-radius: 9px; }
.auth-brand span {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.4px;
}

.auth-pitch { position: relative; margin-top: auto; display: flex; flex-direction: column; gap: 14px; }
.auth-pitch h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(26px, 3.2vw, 34px);
  line-height: 1.15;
  letter-spacing: -1px;
  color: var(--cream-50);
  text-wrap: pretty;
}
.auth-pitch p { margin: 0; max-width: 32ch; font-size: 16px; line-height: 25px; color: var(--cream-200); }
.auth-foot { position: relative; margin: 0; font-size: 13px; line-height: 20px; color: var(--taupe-500); }

.auth-aside .lang-seg { position: relative; align-self: flex-start; background: rgba(253, 248, 243, 0.1); }
.auth-aside .lang-seg button { color: var(--cream-200); }
.auth-aside .lang-seg button[aria-pressed="true"] {
  background: var(--cream-50);
  color: var(--espresso-900);
  box-shadow: none;
}

.auth-panel {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 4vw, 40px);
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface-default);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-md);
  padding: clamp(24px, 3vw, 32px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.auth-head { display: flex; flex-direction: column; gap: 6px; }
.auth-head h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.5px;
}
.auth-head p { margin: 0; font-size: 15px; line-height: 23px; color: var(--text-secondary); }

.auth-alt { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.auth-alt .app-btn { width: 100%; }

.link-quiet {
  align-self: center;
  padding: 4px 0;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-link);
  cursor: pointer;
}
.link-quiet:hover { text-decoration: underline; }
.link-back { color: var(--text-secondary); }
.center-note { align-self: center; font-size: 14px; color: var(--text-secondary); }

.otp { display: flex; gap: 8px; }
.otp input {
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
  height: 60px;
  padding: 0;
  text-align: center;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--surface-default);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  color: var(--text-primary);
}
.otp input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--focus-ring-clay);
}

/* ---------- 5. reward (upgrade success) ---------- */
.reward-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 5vw, 48px);
}
.reward-wrap {
  position: relative;
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}
@keyframes drift {
  0% { transform: translateY(0) rotate(0); }
  100% { transform: translateY(-10px) rotate(8deg); }
}
@keyframes pop {
  0% { transform: scale(0.6); opacity: 0; }
  60% { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}
.confetti { position: absolute; z-index: 2; display: block; animation: drift 2.6s var(--easing-gentle) infinite alternate; }
.confetti--1 { left: 34px; top: -6px; width: 12px; height: 12px; border-radius: 3px; background: var(--coral-400); }
.confetti--2 { right: 52px; top: 22px; width: 10px; height: 10px; border-radius: var(--radius-full); background: var(--marigold-400); animation-duration: 3.1s; }
.confetti--3 { left: 8px; bottom: 64px; width: 9px; height: 9px; border-radius: 2px; background: var(--sky-300); animation-duration: 2.2s; }
.confetti--4 { right: 14px; bottom: 96px; width: 13px; height: 13px; border-radius: 3px; background: var(--marigold-300); animation-duration: 2.9s; }

.reward-panel {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--reward-backdrop);
  border-radius: var(--radius-reward-panel);
  padding: clamp(32px, 5vw, 44px) clamp(24px, 4vw, 40px) clamp(28px, 4vw, 40px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  box-shadow: 0 20px 46px rgba(74, 42, 85, 0.28);
}
.reward-glow {
  position: absolute;
  top: -190px;
  left: 50%;
  margin-left: -210px;
  width: 420px;
  height: 420px;
  border-radius: var(--radius-full);
  background: radial-gradient(circle, rgba(255, 197, 61, 0.34) 0%, rgba(255, 197, 61, 0.14) 45%, rgba(255, 197, 61, 0) 72%);
}
.reward-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  background: var(--reward-primary);
  animation: pop 620ms var(--easing-bouncy) both;
}
.reward-copy { position: relative; display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center; }
.reward-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(34px, 6vw, 44px);
  line-height: 1.05;
  letter-spacing: -1.2px;
  color: var(--reward-primary);
}
.reward-text {
  margin: 0;
  max-width: 30ch;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--reward-on-backdrop);
  text-wrap: pretty;
}
.btn-reward {
  position: relative;
  margin-top: 6px;
  display: grid;
  place-items: center;
  height: 52px;
  padding: 0 30px;
  border: 0;
  border-radius: var(--radius-button);
  background: var(--reward-primary);
  color: var(--reward-on-primary);
  font-family: inherit;
  font-size: 17px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.btn-reward:hover { background: var(--reward-primary-subtle); color: var(--reward-on-primary); text-decoration: none; }
.btn-reward:active { transform: scale(var(--press-scale)); }
.reward-foot { margin: 0; text-align: center; font-size: 14px; line-height: 21px; color: var(--text-secondary); }

/* ---------- 6. buttons, forms, helpers ---------- */
.app-btn {
  display: grid;
  place-items: center;
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: var(--radius-button);
  background: var(--accent-primary);
  color: var(--text-on-accent);
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--duration-fast) var(--easing-gentle), opacity var(--duration-fast);
}
.app-btn:hover { background: var(--accent-primary-pressed); color: var(--text-on-accent); text-decoration: none; }
.app-btn:active { transform: scale(var(--press-scale)); }
.app-btn:disabled { opacity: 0.55; cursor: default; }
.app-btn--secondary {
  background: var(--surface-default);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
}
.app-btn--secondary:hover { background: var(--overlay-press-light); color: var(--text-primary); }

.btn-primary {
  display: inline-grid;
  place-items: center;
  width: fit-content;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--radius-button);
  background: var(--accent-primary);
  color: var(--text-on-accent);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--duration-fast) var(--easing-gentle);
}
.btn-primary:hover { background: var(--accent-primary-pressed); color: var(--text-on-accent); text-decoration: none; }
.btn-primary:active { transform: scale(var(--press-scale)); }
.btn-primary:disabled { opacity: 0.55; cursor: default; }
.btn-primary--lg { min-height: 52px; padding: 0 26px; font-size: 17px; }

.btn-secondary {
  display: inline-grid;
  place-items: center;
  width: fit-content;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-button);
  background: var(--surface-default);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.btn-secondary:hover { background: var(--overlay-press-light); color: var(--text-primary); text-decoration: none; }

.btn-signout {
  flex: 1 1 auto;
  height: 34px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  background: var(--surface-default);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
}
.btn-signout:hover { background: var(--overlay-press-light); color: var(--text-primary); }

.lang-seg { flex: 0 0 auto; display: flex; padding: 3px; border-radius: var(--radius-full); background: var(--cream-200); }
.lang-seg button {
  min-width: 40px;
  height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius-full);
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
}
.lang-seg button[aria-pressed="true"] {
  background: var(--surface-default);
  box-shadow: var(--shadow-sm);
  color: var(--text-primary);
  font-weight: 800;
}

.app-tabs {
  display: flex;
  padding: 4px;
  background: var(--bg-sunken);
  border-radius: var(--radius-full);
  gap: 4px;
}
.app-tab {
  flex: 1 1 0;
  height: 36px;
  border: 0;
  border-radius: var(--radius-full);
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--duration-fast) var(--easing-gentle), color var(--duration-fast);
}
.app-tab:hover { color: var(--text-primary); }
.app-tab[aria-selected="true"] {
  background: var(--surface-default);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.form-stack { display: flex; flex-direction: column; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 14px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.1px; }
.form-input {
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-input);
  background: var(--surface-default);
  font-family: inherit;
  font-size: 16px;
  color: var(--text-primary);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
.form-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--focus-ring-clay);
}
.form-input::placeholder { color: var(--text-muted); }
.form-input--error { border-color: var(--status-danger); }
.form-select {
  appearance: none;
  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='%23A99685' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.form-error {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--red-600);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--status-danger-subtle);
}

.form-divider { display: flex; align-items: center; gap: 12px; color: var(--text-secondary); font-size: 13px; font-weight: 600; }
.form-divider::before,
.form-divider::after { content: ''; flex: 1 1 auto; height: 1px; background: var(--border-subtle); }

.info-box {
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--surface-muted);
  font-size: 15px;
  line-height: 22px;
  color: var(--text-secondary);
}
.info-box a { color: var(--text-link); font-weight: 700; }

@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: var(--radius-full);
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

.text-center { text-align: center; }

/* ---------- 7. responsive ---------- */
@media (max-width: 880px) {
  .shell { flex-direction: column; }
  .shell-nav {
    flex: 0 0 auto;
    width: auto;
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    row-gap: 10px;
    column-gap: 12px;
    padding: 12px 16px;
    background: var(--bg-default);
    border-right: 0;
    border-bottom: 1px solid var(--border-subtle);
  }
  .nav-brand { grid-column: 1; padding: 0; }
  .nav-foot { grid-column: 2; margin-top: 0; flex-direction: row; align-items: center; gap: 8px; }
  .nav-user { display: none; }
  .nav-overline { display: none; }
  .nav-list { grid-column: 1 / -1; flex-direction: row; gap: 6px; overflow-x: auto; }
  .nav-item { min-height: 40px; }
  .nav-item--soon { display: none; }
  .shell-main { padding: 20px 16px 40px; }
}

@media (max-width: 900px) {
  .auth-split { flex-direction: column; }
  .auth-aside { flex: 0 0 auto; width: auto; padding: 24px 20px 28px; gap: 18px; }
  .auth-aside::after { display: none; }
  .auth-pitch { margin-top: 0; }
  .auth-pitch h2 { font-size: 26px; }
  .auth-pitch p { max-width: none; font-size: 15px; line-height: 23px; }
  .auth-panel { padding: 20px 16px 40px; }
}

@media (max-width: 560px) {
  .panel { padding: 20px; }
  .panel--row { flex-direction: column; align-items: flex-start; }
  .detail-grid { gap: 8px 16px; }
  .btn-primary, .btn-secondary { width: 100%; }
  .state-actions { width: 100%; }
  .otp input { height: 52px; font-size: 20px; }
}
