:root {
  --bg-top: #eef4ff;
  --bg-mid: #f6f8fc;
  --bg-bottom: #edf2fb;
  --glass: rgba(255, 255, 255, 0.56);
  --glass-strong: rgba(255, 255, 255, 0.74);
  --glass-soft: rgba(255, 255, 255, 0.44);
  --stroke: rgba(255, 255, 255, 0.68);
  --stroke-soft: rgba(143, 169, 212, 0.18);
  --text: #122033;
  --muted: #6c7b93;
  --primary: #2f6bff;
  --primary-dark: #2554d6;
  --secondary: rgba(255, 255, 255, 0.66);
  --accent: #4f87ff;
  --success: #16845f;
  --danger: #c14646;
  --shadow-lg: 0 30px 70px rgba(73, 104, 168, 0.14);
  --shadow-md: 0 18px 36px rgba(90, 115, 163, 0.12);
  --radius-xl: 34px;
  --radius-lg: 28px;
  --radius-md: 22px;
  --radius-sm: 18px;
  --font-sans: "SF Pro Display", "SF Pro Text", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--text);
  background:
    radial-gradient(circle at 8% 14%, rgba(143, 190, 255, 0.32), transparent 28%),
    radial-gradient(circle at 88% 20%, rgba(255, 255, 255, 0.9), transparent 18%),
    radial-gradient(circle at 75% 78%, rgba(193, 224, 255, 0.38), transparent 24%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 46%, var(--bg-bottom) 100%);
  overflow-x: hidden;
}

.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(90px);
  opacity: 0.75;
  pointer-events: none;
}

.ambient-a {
  top: -56px;
  left: -20px;
  width: 240px;
  height: 240px;
  background: rgba(113, 170, 255, 0.3);
}

.ambient-b {
  top: 22%;
  right: -42px;
  width: 260px;
  height: 260px;
  background: rgba(255, 255, 255, 0.76);
}

.ambient-c {
  right: 18%;
  bottom: -42px;
  width: 280px;
  height: 280px;
  background: rgba(168, 210, 255, 0.28);
}

.shell {
  position: relative;
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 24px 0 calc(36px + var(--safe-bottom));
}

.hero,
.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--stroke);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.5)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04));
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
}

.hero::before,
.panel::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.05));
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  margin-bottom: 18px;
  padding: 30px;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(231, 240, 255, 0.82));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 14px 28px rgba(77, 117, 204, 0.16);
}

.brand-mark span {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(47, 107, 255, 0.96), rgba(84, 142, 255, 0.9));
  position: relative;
  box-shadow: 0 10px 18px rgba(47, 107, 255, 0.24);
}

.brand-mark span::before,
.brand-mark span::after {
  content: "";
  position: absolute;
  top: 7px;
  bottom: 7px;
  width: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
}

.brand-mark span::before {
  left: 8px;
}

.brand-mark span::after {
  right: 8px;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.hero p {
  margin: 0;
  max-width: 60ch;
  color: var(--muted);
  line-height: 1.78;
  font-size: 15px;
}

.hero-badge {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  align-content: end;
}

.hero-badge span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.75);
  color: #31537b;
  font-size: 13px;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.panel {
  padding: 24px;
}

.panel-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-head h2 {
  margin: 0 0 6px;
  font-size: 23px;
  letter-spacing: -0.02em;
}

.panel-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
  font-size: 14px;
}

.auth-panel {
  margin-bottom: 18px;
}

.app-tabs {
  position: sticky;
  top: 10px;
  z-index: 20;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  margin: 0 0 18px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
}

.tab-btn {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  color: #365678;
  background: transparent;
  font-weight: 800;
  white-space: nowrap;
}

.tab-btn.is-active {
  color: #fff;
  background: linear-gradient(180deg, #4b84ff, #2f6bff);
  box-shadow: 0 14px 28px rgba(47, 107, 255, 0.22);
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
  animation: panelIn 0.22s ease;
}

.auth-switch,
.button-row,
.tool-strip,
.account-stats,
.mode-switch {
  display: flex;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-form.is-hidden,
.is-hidden {
  display: none !important;
}

.field-grid,
.settings-grid,
.voice-filter-grid,
.top-grid,
.main-grid,
.commerce-grid {
  display: grid;
  gap: 18px;
}

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

.settings-grid .wide {
  grid-column: 1 / -1;
}

.voice-filter-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 18px;
}

.voice-filter-grid .wide {
  grid-column: 1 / -1;
}

.current-setting-card,
.custom-voice-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

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

.current-setting-card span,
.custom-voice-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.current-setting-card strong {
  display: block;
  margin-top: 6px;
  line-height: 1.6;
}

.custom-voice-card h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.custom-voice-card p {
  margin: 0;
}

.secondary-link {
  display: inline-flex;
  width: fit-content;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  background: rgba(255, 255, 255, 0.66);
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
}

label span {
  color: var(--text);
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.65);
  padding: 14px 16px;
  color: var(--text);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

input:focus,
select:focus,
textarea:focus {
  transform: translateY(-1px);
  border-color: rgba(47, 107, 255, 0.26);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 0 0 4px rgba(47, 107, 255, 0.1);
}

textarea {
  min-height: 156px;
  resize: vertical;
  line-height: 1.7;
}

small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

button {
  border: 0;
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease, background-color 0.18s ease;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
  transform: none !important;
}

.chip,
.primary-btn,
.secondary-btn,
.ghost-btn {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 700;
}

.chip {
  background: rgba(255, 255, 255, 0.6);
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.75);
}

.chip.is-active {
  color: #fff;
  background: linear-gradient(180deg, #4b84ff, #2f6bff);
  box-shadow: 0 16px 28px rgba(47, 107, 255, 0.28);
}

.primary-btn {
  color: #fff;
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
  box-shadow: 0 18px 30px rgba(47, 107, 255, 0.24);
}

.secondary-btn,
.ghost-btn {
  color: var(--text);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.74);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.chip:hover {
  transform: translateY(-1px);
}

.auth-switch,
.button-row,
.tool-strip,
.mode-switch {
  gap: 12px;
  flex-wrap: wrap;
}

.inline-status {
  min-height: 22px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.inline-status.is-error {
  color: var(--danger);
}

.inline-status.is-success {
  color: var(--success);
}

.top-grid {
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  margin-bottom: 18px;
}

.main-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 18px;
}

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

.account-stats {
  gap: 14px;
  flex-wrap: wrap;
}

.stat-card,
.info-list div,
.voice-meta,
.upload-card,
.chat-timeline,
.reply-result-card {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: var(--glass);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.stat-card {
  flex: 1 1 220px;
  padding: 18px;
  border-radius: 24px;
}

.stat-card.accent {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(226, 238, 255, 0.58));
}

.stat-label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.stat-card strong {
  display: block;
  font-size: 30px;
  line-height: 1.04;
}

.stat-card small {
  display: block;
  margin-top: 8px;
}

.info-list {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.info-list div,
.voice-meta {
  padding: 16px 18px;
  border-radius: 22px;
}

.pill-note {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.62);
  color: #325784;
  font-weight: 700;
}

.info-list span,
.voice-meta span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.voice-meta {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.info-list strong,
.voice-meta strong {
  font-size: 15px;
  line-height: 1.6;
}

.audio-player {
  position: relative;
  z-index: 1;
  width: 100%;
  margin-top: 14px;
}

.chat-timeline {
  display: grid;
  gap: 12px;
  min-height: 250px;
  max-height: 420px;
  overflow: auto;
  padding: 14px;
  border-radius: 26px;
  margin-bottom: 16px;
}

.chat-placeholder {
  align-self: center;
  justify-self: center;
  max-width: 360px;
  text-align: center;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

.bubble {
  max-width: 100%;
  padding: 16px 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 28px rgba(93, 119, 164, 0.12);
  animation: bubbleIn 0.22s ease;
}

.bubble.left {
  justify-self: stretch;
}

.bubble strong {
  display: block;
  margin-bottom: 8px;
  color: #30507d;
  font-size: 13px;
}

.bubble p {
  margin: 0;
  line-height: 1.72;
  white-space: pre-wrap;
}

.bubble .translation-block {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(143, 169, 212, 0.2);
}

.chat-workspace {
  display: grid;
  gap: 16px;
}

.aftersales-bar,
.package-card,
.history-card {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.payment-flow {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.payment-flow article {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.payment-flow strong {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(180deg, #4b84ff, #2f6bff);
  box-shadow: 0 10px 18px rgba(47, 107, 255, 0.2);
}

.payment-flow span {
  font-weight: 800;
}

.payment-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 16px;
  align-items: start;
}

.section-kicker {
  margin: 0 0 10px;
  color: #315681;
  font-size: 13px;
  font-weight: 800;
}

.aftersales-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 24px;
  margin-bottom: 16px;
}

.aftersales-bar span {
  color: var(--muted);
  font-size: 13px;
}

.aftersales-bar strong {
  font-size: 18px;
}

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

.package-card {
  padding: 18px;
  border-radius: 24px;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.package-card::after {
  content: "";
  position: absolute;
  inset: auto -30px -50px auto;
  width: 140px;
  height: 140px;
  border-radius: 999px;
  background: rgba(47, 107, 255, 0.08);
  pointer-events: none;
}

.package-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 46px rgba(73, 104, 168, 0.17);
}

.package-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.package-top strong {
  font-size: 24px;
  line-height: 1.1;
}

.package-credit {
  margin-bottom: 8px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.package-card p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 15px;
}

.provider-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.provider-row .primary-btn,
.provider-row .secondary-btn {
  flex: 1 1 180px;
}

.payment-order-card {
  position: sticky;
  top: 86px;
}

.order-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.order-progress span {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.order-progress span.is-active {
  color: #fff;
  background: linear-gradient(180deg, #4b84ff, #2f6bff);
  box-shadow: 0 12px 20px rgba(47, 107, 255, 0.2);
}

.qr-preview {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.78);
  margin-bottom: 14px;
}

.qr-preview img {
  width: min(100%, 260px);
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 20px;
  background: #fff;
  padding: 10px;
}

.history-card {
  padding: 18px;
  border-radius: 26px;
  margin-top: 16px;
}

.history-card h3 {
  margin: 0 0 14px;
  font-size: 18px;
}

.history-list {
  display: grid;
  gap: 12px;
}

.history-item {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.78);
}

.history-item strong {
  display: block;
  line-height: 1.5;
}

.history-item small {
  display: block;
}

.history-side {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.history-side span {
  font-size: 13px;
  color: #315681;
  font-weight: 700;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #315681;
  background: rgba(226, 238, 255, 0.82);
}

.status-pill.is-success,
.mini-badge.is-success {
  color: #0f6b4f;
  background: rgba(214, 247, 234, 0.88);
}

.status-pill.is-warn,
.mini-badge.is-warn {
  color: #8a5a12;
  background: rgba(255, 236, 190, 0.9);
}

.status-pill.is-danger,
.mini-badge.is-danger {
  color: #9f2f2f;
  background: rgba(255, 222, 222, 0.9);
}

.history-body {
  margin: 0;
  color: var(--text);
  line-height: 1.72;
  white-space: pre-wrap;
}

.empty-note {
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
  line-height: 1.7;
}

.upload-card {
  flex: 1 1 280px;
  padding: 16px 18px;
  border-radius: 24px;
}

.upload-card input[type="file"] {
  padding: 10px 0 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.reply-result-card {
  padding: 18px;
  border-radius: 26px;
}

.result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.result-title {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.result-head strong {
  display: block;
  white-space: pre-wrap;
  font-size: 16px;
  line-height: 1.72;
}

.mini-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(79, 135, 255, 0.12);
  color: #355ca5;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.72);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(18px + var(--safe-bottom));
  transform: translateX(-50%) translateY(14px);
  opacity: 0;
  pointer-events: none;
  min-width: 220px;
  max-width: min(90vw, 480px);
  padding: 14px 18px;
  border-radius: 20px;
  color: #fff;
  background: rgba(24, 34, 48, 0.84);
  box-shadow: 0 20px 44px rgba(16, 28, 48, 0.26);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 1000;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

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

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

@media (max-width: 980px) {
  .hero,
  .top-grid,
  .main-grid,
  .commerce-grid,
  .field-grid,
  .settings-grid,
  .voice-filter-grid {
    grid-template-columns: 1fr;
  }

  .hero-badge {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 640px) {
  .shell {
    width: min(100% - 16px, 100%);
    padding-top: 12px;
  }

  .hero,
  .panel {
    padding: 18px;
    border-radius: 26px;
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero-badge {
    grid-template-columns: 1fr;
  }

  .panel-head {
    flex-direction: column;
  }

  .button-row,
  .tool-strip,
  .auth-switch,
  .current-setting-card {
    display: grid;
    grid-template-columns: 1fr;
  }

  .chip,
  .primary-btn,
  .secondary-btn,
  .ghost-btn,
  .secondary-link {
    width: 100%;
  }

  textarea {
    min-height: 132px;
  }
}

.app-root {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.app-sidebar {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 18px;
  min-height: calc(100vh - 56px);
  padding: 18px;
  border: 1px solid var(--stroke);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
}

.side-brand,
.dashboard-head,
.side-card {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.68);
  background: rgba(255, 255, 255, 0.52);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.side-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 24px;
}

.side-brand strong,
.side-card strong {
  display: block;
  font-size: 18px;
}

.side-brand small,
.side-card small {
  color: var(--muted);
}

.side-logo {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 28% 28%, rgba(255, 255, 255, 0.96), transparent 26%),
    linear-gradient(135deg, #8aa8ff, #2f6bff);
  box-shadow: 0 16px 32px rgba(47, 107, 255, 0.22);
}

.app-sidebar .app-tabs {
  position: static;
  display: grid;
  gap: 8px;
  overflow: visible;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.app-sidebar .tab-btn {
  width: 100%;
  justify-content: flex-start;
  padding: 0 16px;
  border-radius: 16px;
  background: transparent;
}

.app-sidebar .tab-btn.is-active {
  color: #fff;
  background: linear-gradient(135deg, #7a6bff, #2f6bff);
  box-shadow: 0 18px 32px rgba(82, 103, 255, 0.24);
}

.side-card {
  align-self: end;
  padding: 18px;
  border-radius: 26px;
}

.app-main {
  min-width: 0;
}

.dashboard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 24px;
  border-radius: 32px;
}

.dashboard-head h2 {
  margin: 6px 0 2px;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.03em;
}

.dashboard-head p {
  margin: 0;
  color: var(--muted);
}

.eyebrow {
  color: var(--primary);
  font-weight: 800;
  font-size: 13px;
}

.warning-copy {
  color: var(--danger) !important;
  font-weight: 700;
}

.proof-preview {
  display: none;
  width: min(260px, 100%);
  max-height: 280px;
  object-fit: contain;
  margin: 12px 0;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.56);
  box-shadow: var(--shadow-md);
}

.proof-preview.is-visible {
  display: block;
}

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

  .app-sidebar {
    position: relative;
    top: auto;
    min-height: 0;
  }

  .app-sidebar .app-tabs {
    display: flex;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .app-sidebar .tab-btn {
    width: auto;
    min-width: max-content;
  }

  .side-card {
    display: none;
  }

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

  .payment-layout,
  .package-grid,
  .main-grid,
  .top-grid,
  .commerce-grid,
  .field-grid,
  .settings-grid,
  .voice-filter-grid {
    grid-template-columns: 1fr;
  }

  .payment-order-card {
    position: relative;
    top: auto;
  }

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

@media (max-width: 560px) {
  .shell {
    width: min(100% - 18px, 1180px);
    padding-top: 10px;
  }

  .hero,
  .panel,
  .dashboard-head {
    border-radius: 26px;
    padding: 18px;
  }

  .payment-flow {
    grid-template-columns: 1fr;
  }

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

  .provider-row .primary-btn,
  .provider-row .secondary-btn {
    flex-basis: 100%;
  }

  .history-side {
    align-items: flex-start;
    flex-direction: column;
  }
}
