/* 海豚AI — 配色取自品牌标识：royal #2F5BEA、sky #3EC6F5、navy #14246B */
:root {
  --royal: #2F5BEA;
  --royal-600: #2448C9;
  --royal-700: #1C3AB0;
  --sky: #3EC6F5;
  --sky-soft: #B9EBFA;
  --navy: #14246B;
  --navy-2: #1E3470;
  --text: #14246B;
  --text-2: #3A4A7A;
  --muted: #6B7898;
  --cream: #F5F0E8;
  --cream-2: #EBE4D6;
  --app-wash: #E8EEFA;
  --card: #ffffff;
  --line: #E4E9F5;
  --line-2: #D5DCF0;
  --ok: #0F9D73;
  --ok-bg: #E6F7F1;
  --warn: #C5811A;
  --warn-bg: #FFF6E5;
  --danger: #D21C4A;
  --danger-bg: #FDE8EE;
  --alipay: #1677FF;
  --wechat: #07C160;
  --shadow: 0 12px 40px rgba(20, 36, 107, 0.08);
  --shadow-sm: 0 4px 16px rgba(20, 36, 107, 0.06);
  --radius: 20px;
  --radius-sm: 12px;
  --header-h: 56px;
  --side-w: 176px;
  --content-w: 860px;
  --app-max: 1052px;
  --font: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { height: 100%; }
html, body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  font-family: var(--font);
  font-weight: 400;
  color: var(--text);
  background: var(--cream);
  min-height: 100%;
}
h1, h2, h3 { font-weight: 700; }
button, input, select, textarea { font-family: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: var(--royal); }
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }
.hidden { display: none !important; }

/* Landing styles moved to css/landing.css */
.logo-wordmark {
  height: 52px;
  width: auto;
  object-fit: contain;
  object-position: left center;
}
.app-top .logo-wordmark { height: 32px; }

/* ========== App shell ========== */
#page-app {
  min-height: 100vh;
  background:
    radial-gradient(900px 480px at 0% -10%, rgba(62, 198, 245, 0.28), transparent 55%),
    radial-gradient(820px 520px at 100% 0%, rgba(47, 91, 234, 0.20), transparent 52%),
    radial-gradient(640px 420px at 70% 100%, rgba(196, 181, 253, 0.22), transparent 50%),
    #EEEAF8;
  display: flex;
  flex-direction: column;
  padding: 0;
}
.app-top {
  height: var(--header-h);
  background: #fff;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  box-shadow: 0 1px 0 rgba(20, 36, 107, 0.06);
  flex-shrink: 0;
  width: 100%;
  z-index: 20;
}
.app-top-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.app-top .logo-wordmark { height: 34px; }
.btn-menu {
  display: none;
  width: 36px; height: 36px;
  border-radius: 10px;
  align-items: center; justify-content: center;
}
.btn-menu:hover { background: var(--app-wash); }
.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.user-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sky), var(--royal));
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.user-email {
  font-size: 13px;
  color: var(--navy);
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-body-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 20px 24px 24px;
  min-height: 0;
}
.app-body {
  width: 100%;
  max-width: var(--app-max);
  display: grid;
  grid-template-columns: var(--side-w) var(--content-w);
  gap: 16px;
  align-items: start;
  min-height: 0;
}
.sidebar {
  background: transparent;
  border-radius: 0;
  padding: 4px 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: fit-content;
  position: sticky;
  top: 20px;
  width: var(--side-w);
}
.nav-group-label {
  font-size: 13px;
  font-weight: 400;
  color: #9AA3B8;
  padding: 20px 16px 8px;
  letter-spacing: 0;
}
.nav-group-label:first-child { padding-top: 8px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 11px 16px;
  border-radius: 999px;
  color: #4A5168;
  font-size: 15px;
  font-weight: 400;
  text-decoration: none;
}
.nav-item svg { flex-shrink: 0; width: 20px; height: 20px; opacity: 0.85; }
.nav-item:hover { background: rgba(255,255,255,0.55); color: var(--navy); }
.nav-item.active {
  background: #E8EAF8;
  color: #3A4270;
}
.nav-item.active svg { opacity: 1; }

.main-card {
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  padding: 22px 24px 20px;
  min-height: calc(100vh - var(--header-h) - 96px);
  width: var(--content-w);
  max-width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.main-card > section {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.page-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.02em;
}
.page-desc {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

/* ========== Subscribe ========== */
.sub-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(180deg, #F3F1FF 0%, #EEF2FF 100%);
  border-radius: 14px;
  padding: 14px 16px;
}
.sub-hero .kicker {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}
.sub-hero h1 {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  margin-top: 2px;
}
.btn-orders {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 400;
  color: var(--royal);
  background: #fff;
  border: 1px solid rgba(47, 91, 234, 0.25);
  text-decoration: none;
  white-space: nowrap;
}
.btn-orders:hover { background: #F3F6FF; }

.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  margin: 18px 0 8px;
  overflow-x: auto;
}
.step {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
  flex-shrink: 0;
}
.step .num {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--line-2);
  display: grid;
  place-items: center;
  font-size: 11px;
  background: #fff;
}
.step.active { color: var(--navy); }
.step.active .num,
.step.done .num {
  background: var(--royal);
  border-color: var(--royal);
  color: #fff;
}
.step.done { color: var(--navy); }
.step-line {
  height: 1.5px;
  flex: 1;
  min-width: 16px;
  background: var(--line-2);
  margin: 0 8px;
}
.step.done + .step-line { background: var(--royal); }

.upgrade-block {
  text-align: center;
  margin: 18px 0 16px;
}
.upgrade-block h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
}
.upgrade-block p {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.65;
}

.tabs-wrap { display: flex; justify-content: center; margin-bottom: 16px; }
.tabs {
  display: inline-flex;
  gap: 0;
  padding: 3px;
  background: #F2F4FA;
  border-radius: 999px;
}
.tab {
  padding: 6px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-2);
  background: transparent;
  border: 0;
}
.tab:hover { color: var(--navy); }
.tab.active {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 4px 10px rgba(20, 36, 107, 0.18);
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.plan-grid.single { grid-template-columns: minmax(240px, 320px); }
.plan-card {
  position: relative;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 14px 12px;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
  min-width: 0;
}
.plan-card:hover { border-color: rgba(47, 91, 234, 0.45); }
.plan-card.selected {
  border-color: var(--royal);
  box-shadow: 0 0 0 1px var(--royal);
}
.plan-card .radio {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid #C5CAD8;
  background: #fff;
}
.plan-card.selected .radio {
  border-color: var(--royal);
  background: #fff;
  box-shadow: inset 0 0 0 4px var(--royal);
}
.plan-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-right: 22px;
  flex-wrap: nowrap;
}
.plan-name { font-size: 14px; font-weight: 700; color: var(--navy); }
.tag {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 400;
  padding: 1px 6px;
  border-radius: 4px;
  line-height: 1.5;
}
.tag-ok { background: #EEF0FF; color: var(--royal); }
.tag-soon { background: #F1F3F8; color: var(--muted); }
.plan-summary {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
  min-height: 1.5em;
}
.plan-price {
  margin-top: 10px;
  color: var(--navy);
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex-wrap: wrap;
}
.plan-price .num {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
}
.plan-price .per {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}
.plan-price.pending .num {
  font-size: 16px;
  color: var(--muted);
}
.plan-divider {
  height: 1px;
  background: var(--line);
  margin: 10px 0 8px;
}
.plan-detail {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}
.plan-detail span:last-child { color: var(--text-2); font-weight: 400; }

#subscribe-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.step-footer {
  margin-top: auto;
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.step-footer .hint {
  font-size: 12px;
  color: var(--muted);
}
.step-footer .footer-actions { display: flex; gap: 8px; margin-left: auto; }
.step-footer .btn { border-radius: 999px; min-width: 96px; }
.step-footer .btn-primary:disabled {
  opacity: 1;
  background: #E4E8FB;
  color: #7B84B5;
}

.form-stack { width: 100%; display: flex; flex-direction: column; gap: 14px; }
.field label { display: block; font-size: 13px; font-weight: 400; margin-bottom: 8px; }
.field .hint { display: block; font-weight: 400; color: var(--muted); font-size: 12px; margin-top: 4px; }
.input, .select, textarea.input {
  width: 100%;
  height: 44px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  font-size: 14px;
  background: #fff;
  transition: border-color 0.15s;
}
textarea.input { height: auto; padding: 12px 14px; resize: vertical; min-height: 96px; }
.input:focus, .select:focus, textarea.input:focus {
  outline: none;
  border-color: var(--royal);
  box-shadow: 0 0 0 3px rgba(47, 91, 234, 0.12);
}
.notice {
  background: #F3F7FF;
  border: 1px solid #D5E2FF;
  color: var(--navy-2);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.6;
}

.pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pay-card {
  text-align: left;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  background: #fff;
  width: 100%;
}
.pay-card:hover { border-color: rgba(47, 91, 234, 0.4); }
.pay-card.selected {
  border-color: var(--royal);
  box-shadow: 0 0 0 3px rgba(47, 91, 234, 0.12);
}
.pay-mark {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
  font-size: 16px;
}
.pay-mark.alipay { background: var(--alipay); }
.pay-mark.wechat { background: var(--wechat); }
.pay-card .name { font-weight: 400; font-size: 15px; }
.pay-card .hint { margin-top: 4px; font-size: 12px; color: var(--muted); }

.summary {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--line);
}
.summary-row:last-child { border-bottom: 0; }
.summary-row .k { color: var(--muted); }
.summary-row .v { font-weight: 400; text-align: right; word-break: break-all; }
.summary-row.total .v { color: var(--royal); font-size: 18px; font-weight: 700; }

.qr-box {
  margin-top: 20px;
  width: 100%;
  border: 1.5px dashed var(--line-2);
  border-radius: 16px;
  padding: 22px;
  text-align: center;
  background: #FAFBFF;
}
.qr-fake {
  width: 168px; height: 168px;
  margin: 0 auto 12px;
  border-radius: 8px;
  background:
    repeating-linear-gradient(90deg, #14246B 0 8px, #fff 8px 12px),
    repeating-linear-gradient(0deg, #14246B 0 8px, #fff 8px 12px);
  background-blend-mode: multiply;
  position: relative;
}
.qr-fake::after {
  content: "";
  position: absolute;
  inset: 58px;
  background: #fff url("../assets/logo-icon.png") center/contain no-repeat;
  border-radius: 6px;
}
.qr-box p { font-size: 13px; color: var(--muted); }

.actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 400;
  transition: background 0.15s, transform 0.15s, opacity 0.15s;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--royal); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--royal-600); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover:not(:disabled) { background: #0E1B52; }
.btn-ghost {
  background: #F3F6FE;
  color: var(--navy);
}
.btn-ghost:hover:not(:disabled) { background: #E6ECFB; }
.btn-danger { background: var(--danger-bg); color: var(--danger); }
.btn-danger:hover { background: #F9D0DA; }
.btn-block { width: 100%; }

.success-panel { text-align: center; padding: 40px 16px; }
.success-mark {
  width: 72px; height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--ok-bg);
  color: var(--ok);
  display: grid;
  place-items: center;
}
.success-panel h2 { font-size: 22px; }
.success-panel p { margin-top: 8px; color: var(--muted); font-size: 14px; }

/* ========== Bills ========== */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 16px;
  align-items: end;
}
.filters .field { min-width: 140px; flex: 1; }
.filters .input, .filters .select { height: 40px; }
.order-list { display: flex; flex-direction: column; gap: 10px; }
.order-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr auto auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
}
.order-row .oid { font-size: 12px; color: var(--muted); margin-top: 2px; }
.order-row .amt { font-weight: 700; color: var(--navy); }
.status {
  font-size: 12px;
  font-weight: 400;
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.status-paid { background: var(--ok-bg); color: var(--ok); }
.status-pending { background: var(--warn-bg); color: var(--warn); }
.status-done { background: #E8EEFF; color: var(--royal); }

.empty {
  text-align: center;
  padding: 64px 16px;
  color: var(--muted);
}
.empty-art {
  width: 88px; height: 88px;
  margin: 0 auto 14px;
  border-radius: 24px;
  background: linear-gradient(180deg, #F3F7FF, #E8F7FC);
  display: grid;
  place-items: center;
}

/* ========== Invite ========== */
.invite-banner {
  margin-top: 16px;
  border-radius: 14px;
  padding: 16px 18px;
  background: linear-gradient(120deg, #2F5BEA 0%, #3A8EF0 52%, #3EC6F5 100%);
  color: #fff;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  overflow: hidden;
  position: relative;
}
.invite-banner h3 { font-size: 16px; font-weight: 700; }
.invite-banner p { margin-top: 6px; font-size: 13px; line-height: 1.65; opacity: 0.92; max-width: 560px; }
.invite-deco {
  width: 88px; height: 88px;
  flex-shrink: 0;
  opacity: 0.9;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 16px;
}
.stat-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
}
.stat-card .label { font-size: 13px; color: var(--muted); }
.stat-card .value { margin-top: 4px; font-size: 24px; font-weight: 700; color: var(--navy); letter-spacing: -0.03em; }
.copy-row {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
.copy-row .input { flex: 1; background: #F7F9FD; }
.section-h {
  margin-top: 28px;
  font-size: 15px;
  font-weight: 700;
}

/* ========== Settings ========== */
.settings-list {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
a.settings-row { text-decoration: none; color: inherit; }
.settings-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  text-align: left;
  background: #fff;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 400;
}
.settings-list .settings-row:last-child { border-bottom: 0; }
.settings-row:hover { background: #FAFBFF; }
.settings-row .icon {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: #F3F6FE;
  color: var(--royal);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.settings-row .grow { flex: 1; }
.settings-row .right { color: var(--muted); font-weight: 400; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.settings-row.exit { color: var(--danger); }
.settings-row.exit .icon { background: var(--danger-bg); color: var(--danger); }

.switch {
  width: 42px; height: 24px;
  border-radius: 999px;
  background: #D5DCF0;
  position: relative;
  transition: background 0.15s;
  flex-shrink: 0;
}
.switch.on { background: var(--royal); }
.switch i {
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: left 0.15s;
  display: block;
}
.switch.on i { left: 21px; }

/* ========== Chat / modal / toast ========== */
.chat-fab {
  position: fixed;
  right: 32px;
  bottom: 32px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sky), var(--royal));
  color: #fff;
  box-shadow: 0 10px 24px rgba(47, 91, 234, 0.35);
  display: grid;
  place-items: center;
  z-index: 40;
}
.chat-panel {
  position: fixed;
  right: 28px;
  bottom: 96px;
  width: 320px;
  height: 420px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(20, 36, 107, 0.2);
  z-index: 40;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.chat-head {
  padding: 14px 16px;
  background: linear-gradient(120deg, var(--royal), var(--sky));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
}
.chat-body { flex: 1; padding: 14px; overflow: auto; background: #F6F8FD; }
.bubble {
  max-width: 85%;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 8px;
}
.bubble.bot { background: #fff; color: var(--navy); box-shadow: var(--shadow-sm); }
.bubble.me { background: var(--royal); color: #fff; margin-left: auto; }
.chat-form { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--line); }
.chat-form .input { height: 38px; }

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 56, 0.45);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 20px;
  padding: 28px 26px 24px;
  box-shadow: 0 24px 60px rgba(16, 24, 56, 0.25);
  position: relative;
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
body.modal-open { overflow: hidden; }
.modal.wide { max-width: 480px; }
.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 32px; height: 32px;
  border-radius: 8px;
  color: var(--muted);
}
.modal-close:hover { background: #F3F6FE; }
.modal-logo { display: block; height: 48px; width: auto; margin: 0 auto 16px; }
.modal h2 { text-align: center; font-size: 20px; }
.modal .lead { text-align: center; color: var(--muted); font-size: 13px; margin: 8px 0 22px; }
.btn-google {
  width: 100%;
  height: 46px;
  border: 1.5px solid var(--line-2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 400;
  background: #fff;
}
.btn-google:hover { background: #F7F9FD; }
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--muted);
  font-size: 12px;
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.code-row { display: flex; gap: 8px; }
.code-row .input { flex: 1; }
.demo-note { margin-top: 14px; font-size: 12px; color: var(--muted); text-align: center; line-height: 1.5; }

.toast-wrap {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--navy);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 400;
  box-shadow: var(--shadow);
}

.lang-list { display: flex; flex-direction: column; gap: 8px; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  font-weight: 400;
}
.lang-opt.active { border-color: var(--royal); color: var(--royal); background: #F3F6FF; }
.lang-opt:disabled { opacity: 0.5; cursor: not-allowed; }

/* bottom tabs + mobile */
.bottom-nav { display: none; }
.sidebar-backdrop { display: none; }

@media (max-width: 860px) {
  .app-top { padding: 0 14px; }
  .app-top .logo-wordmark { height: 28px; }
  .btn-menu { display: inline-flex; }
  .user-email { max-width: 140px; }
  .app-body-wrap { padding: 10px 10px 96px; }
  .app-body {
    display: block;
    max-width: 100%;
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: none;
    position: fixed;
    z-index: 45;
    left: 10px; right: 10px; top: 66px;
    width: auto;
    height: auto;
  }
  .sidebar.open { display: flex; }
  .sidebar-backdrop.open {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(16, 24, 56, 0.28);
    z-index: 44;
  }
  .main-card {
    width: 100%;
    min-height: 0;
    padding: 16px 14px 88px;
  }
  .plan-grid { grid-template-columns: 1fr; }
  .pay-grid { grid-template-columns: 1fr; }
  .chat-fab { right: 16px; bottom: 86px; }
  .chat-panel { right: 12px; bottom: 150px; width: calc(100vw - 24px); max-width: 360px; }
  .order-row { display: flex; flex-wrap: wrap; align-items: center; }
  .order-row > :first-child { flex: 1 1 100%; }
  .order-row .amt { margin-right: auto; }
  .status { flex: 0 0 auto; }
  .stat-grid { grid-template-columns: 1fr; }
  .bottom-nav {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    position: fixed;
    left: 0; right: 0; bottom: 0;
    background: #fff;
    border-top: 1px solid var(--line);
    z-index: 35;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-decoration: none;
    color: var(--muted);
    font-size: 11px;
    font-weight: 400;
    padding: 4px 0;
  }
  .bottom-nav a.active { color: var(--royal); }
  .app-top .logo-wordmark { height: 28px; }
  .step-footer { padding-bottom: 8px; padding-right: 68px; }
}

@media (max-width: 420px) {
  .filters { flex-direction: column; }
  .filters .field { width: 100%; }
  .copy-row { flex-direction: column; }
  .step-line { min-width: 10px; margin: 0 4px; }
  .step { font-size: 11px; gap: 4px; }
  .step .lbl { display: none; }
  .step.active .lbl { display: inline; }
  .upgrade-block h2 { font-size: 18px; }
}
