﻿:root {
  --hero-scene-ratio: 20 / 9;
  --bg: #edf2ef;
  --bg-2: #f8f8f5;
  --panel: #fffefb;
  --panel-soft: #f7f6f1;
  --panel-strong: #14342f;
  --ink: #17201d;
  --ink-2: #2e3935;
  --muted: #77847d;
  --line: #dce3dd;
  --line-strong: #bfcbc2;
  --jade: #0d6b5f;
  --jade-dark: #07594f;
  --gold: #b88a38;
  --gold-soft: #f5e7c8;
  --danger: #9c4a44;
  --shadow: 0 18px 46px rgba(21, 32, 29, 0.13);
  --shadow-soft: 0 8px 22px rgba(21, 32, 29, 0.07);
}

[hidden] {
  display: none !important;
}

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #fff;
}

.auth-panel {
  width: min(430px, 100%);
  padding: 38px;
  border: none;
  border-radius: 8px;
  background: transparent;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

.auth-logo {
  width: 180px;
  max-height: 56px;
  margin-bottom: 28px;
  object-fit: contain;
  object-position: left center;
}

.auth-panel h1 {
  margin: 8px 0 10px;
  font-size: 30px;
  color: #fff;
}

.auth-panel > p {
  margin: 0 0 24px;
  color: rgba(255,255,255,0.6);
}

.auth-panel .eyebrow { color: rgba(255,255,255,0.5); }

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.75);
  margin-bottom: 6px;
}

.auth-input-wrap {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
  transition: border-color 0.15s;
}

.auth-input-wrap:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(216,177,95,0.15);
}

.auth-input-icon {
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: rgba(255,255,255,0.45);
}

.auth-input-wrap input {
  flex: 1;
  min-height: 46px;
  padding: 10px 12px 10px 0;
  border: none;
  outline: none;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 15px;
}

.auth-input-wrap input::placeholder {
  color: rgba(255,255,255,0.35);
}

.auth-remember {
  color: rgba(255,255,255,0.55) !important;
}

.auth-remember input[type="checkbox"] {
  accent-color: var(--gold);
}

.auth-link {
  color: var(--gold);
}

.auth-footer {
  color: rgba(255,255,255,0.5);
}

.auth-status {
  color: #e88;
}

.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-remember {
  display: flex !important;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  font-weight: 400 !important;
}

.auth-remember input[type="checkbox"] {
  width: 16px; height: 16px; min-height: auto;
  accent-color: var(--jade);
}

.auth-link {
  border: none;
  background: none;
  color: var(--jade);
  font-size: 13px;
  cursor: pointer;
}

.auth-submit {
  min-height: 46px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--muted);
}

.auth-status {
  min-height: 20px;
  margin: 0;
  color: #a33b35;
  font-size: 13px;
}

.account-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 14px 6px 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.account-button:hover {
  border-color: var(--jade);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--jade) 10%, transparent);
}

.account-button svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.account-button strong {
  color: var(--jade);
  font-size: 12px;
  font-weight: 700;
}

.account-dialog {
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  padding: 24px;
  color: var(--ink);
  background: var(--panel);
  border-radius: 12px;
}

.account-layout {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 24px;
  margin-top: 16px;
}

.account-main {
  min-width: 0;
}

.account-sidebar {
  border-left: 1px solid var(--line);
  padding-left: 20px;
}

.account-sidebar h3 {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 12px;
}

.account-subscribe-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--gold);
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gold-soft), rgba(245,231,200,.2));
  margin-bottom: 18px;
}

.account-subscribe-card strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}

.account-subscribe-card span {
  font-size: 12px;
  color: var(--muted);
}

/* sidebar-bottom-row 见下方统一定义 */

.sidebar-account {
  flex-shrink: 0;
  padding: 0 !important;
  border: none !important;
  min-height: auto !important;
  box-shadow: none !important;
}

.sidebar-account:hover {
  box-shadow: none !important;
  border: none !important;
}

.subscribe-sidebar-btn {
  flex: 1;
  min-height: 34px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--gold-soft), rgba(245,231,200,.3));
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.password-dialog {
  width: min(400px, calc(100vw - 32px));
  padding: 24px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
}

.change-password-form.standalone {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 14px;
}

.change-password-form.standalone label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}

.change-password-form.standalone input {
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
}

.settings-status {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}

.account-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 18px 0;
}

.account-summary > div {
  display: grid;
  gap: 7px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-soft);
}

.account-summary span,
.usage-item span {
  color: var(--muted);
  font-size: 12px;
}

.account-summary strong {
  font-size: 24px;
}

.usage-list {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
}

.usage-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
}

.usage-item strong {
  display: block;
  margin-bottom: 3px;
}

.password-panel {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.change-password-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  margin-top: 10px;
}

.change-password-form input {
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
}

.danger {
  color: #a33b35;
}

body[data-theme="night"] {
  --bg: #0d1110;
  --bg-2: #121816;
  --panel: #161d1a;
  --panel-soft: #101513;
  --panel-strong: #0b251f;
  --ink: #f0f3ef;
  --ink-2: #d7ded8;
  --muted: #96a39c;
  --line: #26332f;
  --line-strong: #38504a;
  --jade: #42b7a3;
  --jade-dark: #2f9a8a;
  --gold: #d2aa5f;
  --gold-soft: rgba(210, 170, 95, 0.16);
  --danger: #dc8178;
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.32);
  --shadow-soft: 0 12px 36px rgba(0, 0, 0, 0.24);
}

html {
  height: 100%;
  overflow: hidden;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-size: 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.78), rgba(255,255,255,0) 250px),
    var(--bg);
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
}

body[data-theme="night"] {
  background:
    linear-gradient(180deg, rgba(24, 52, 46, 0.28), transparent 280px),
    var(--bg);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 100vh;
  overflow-y: auto;
  padding: 12px 10px 0;
  background: color-mix(in srgb, var(--panel) 92%, var(--bg) 8%);
  border-right: 1px solid var(--line);
}

.sidebar-bottom-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.brand-row {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 0 2px;
}

.brand-logo {
  display: block;
  width: 200px;
  height: 60px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdfa;
  object-fit: fill;
  object-position: left center;
}

.edition-card {
  display: grid;
  grid-template-columns: 10px 1fr;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--panel-soft), color-mix(in srgb, var(--gold-soft) 40%, transparent));
}

.edition-card strong,
.edition-card span {
  display: block;
}

.edition-card strong {
  font-size: 14px;
}

.edition-card span {
  margin-top: 3px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.edition-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 18%, transparent);
}

.eyebrow,
.section-title,
.history-item span,
.attachment-label {
  color: var(--muted);
  font-size: 12px;
}


.eyebrow,
.section-title {
  font-weight: 800;
  letter-spacing: 0.02em;
}

.toggle-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border: none;
  background: none;
  color: #000;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.02em;
  cursor: pointer;
  padding: 4px 2px;
}

.toggle-section svg {
  transition: transform 0.2s;
  opacity: 0.5;
}


.history-list.history-collapsed {
  display: none;
}

.history-list.history-collapsed.history-open {
  display: grid;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.search-box input::placeholder,
.composer textarea::placeholder,
.field-group input::placeholder,
.field-group textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 76%, transparent);
}

.nav-section,
.history-wrap {
  display: grid;
  gap: 8px;
}

.agent-list {
  display: grid;
  gap: 6px;
}

body.is-replying .agent-button {
  pointer-events: none;
  opacity: 0.5;
}

.agent-button,
.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 39px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 5px 8px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  font-size: 12px;
}

.agent-button > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-time {
  color: var(--muted);
  font-size: 11px;
  flex-shrink: 0;
  margin-left: 8px;
}

.agent-button:hover,
.history-item:hover {
  border-color: var(--line);
  background: color-mix(in srgb, var(--panel-soft) 78%, transparent);
}

.agent-button.active {
  border-color: color-mix(in srgb, var(--jade) 40%, var(--line));
  background: linear-gradient(90deg, color-mix(in srgb, var(--jade) 12%, transparent), transparent);
  box-shadow: inset 3px 0 0 var(--jade);
}

.mini-avatar {
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: #fff;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18);
}

.mini-avatar-photo {
  background:
    radial-gradient(circle at 28% 24%, rgba(255,255,255,0.18), rgba(255,255,255,0) 34%),
    linear-gradient(180deg, rgba(9, 18, 18, 0.38), rgba(9, 18, 18, 0.14));
}

.mini-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.98) contrast(1.04);
}

.user-avatar {
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,0.22), transparent 28%),
    linear-gradient(145deg, #7b8782, #3a4541);
}

.compact .agent-button {
  grid-template-columns: 30px 1fr;
}

.compact .mini-avatar {
  width: 24px;
  height: 24px;
}

.history-wrap {
  min-height: 0;
  overflow: hidden;
}

.history-list {
  display: grid;
  gap: 4px;
  overflow-y: auto;
  padding-right: 2px;
  max-height: 180px;
}

.history-item-compact {
  min-height: 38px;
  font-size: 12px;
}

.workspace {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 12px 14px;
  gap: 10px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  min-height: 52px;
}

.title-stack {
  display: grid;
  gap: 4px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 26px;
  line-height: 1.18;
}

h2 {
  font-size: 17px;
}

.title-stack p {
  color: var(--muted);
  font-size: 12px;
}

.top-status,
.top-actions,
.composer-tools,
.composer-footer,
.mode-chips,
.quick-prompts {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-status {
  justify-content: flex-end;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.status-pill.online {
  color: var(--jade-dark);
  border-color: color-mix(in srgb, var(--jade) 34%, var(--line));
  background: color-mix(in srgb, var(--jade) 10%, var(--panel));
}

.theme-toggle,
.primary-button,
.ghost-button,
.icon-button,
.send-button,
.tool-button,
.tab {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0 11px;
  font-size: 12px;
  font-weight: 800;
}

.toggle-icon {
  color: var(--gold);
}

.primary-button {
  min-height: 36px;
  padding: 0 14px;
  border-color: var(--jade-dark);
  background: linear-gradient(180deg, var(--jade), var(--jade-dark));
  color: #fff;
  font-weight: 800;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  text-decoration: none;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  font-size: 20px;
}

.full {
  width: 100%;
}

.hero-band {
  position: relative;
  display: grid;
  grid-template-columns: minmax(620px, 1fr) 280px;
  align-items: start;
  gap: 0;
  min-height: 220px;
  max-height: 220px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--jade) 24%, var(--line));
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--panel-strong) 96%, #000), color-mix(in srgb, var(--jade-dark) 36%, var(--panel-strong))),
    var(--panel-strong);
  box-shadow: var(--shadow);
}

.hero-art-panel {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: var(--hero-scene-ratio);
  background: #030505;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.hero-art-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 76% 18%, rgba(218, 183, 111, 0.16), rgba(218, 183, 111, 0) 24%),
    linear-gradient(90deg, rgba(6, 12, 12, 0.14), rgba(6, 12, 12, 0.04) 42%, rgba(6, 12, 12, 0.26)),
    linear-gradient(180deg, rgba(255,255,255,0.025), rgba(0,0,0,0.14));
  pointer-events: none;
}

.hero-scene-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  transition: opacity 160ms ease;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.hero-image-guard {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.agent-brief {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  padding: 24px 28px;
  color: #fff;
  background: linear-gradient(90deg, rgba(12, 28, 24, 0.08), rgba(12, 28, 24, 0.82));
}

.agent-brief .eyebrow {
  color: rgba(255,255,255,0.6);
}

.agent-avatar {
  overflow: hidden;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(255, 240, 205, 0.28);
  border-radius: 999px;
  color: #12221f;
  font-size: 26px;
  font-weight: 900;
  background:
    radial-gradient(circle at 28% 24%, rgba(255,255,255,0.18), rgba(255,255,255,0) 34%),
    linear-gradient(180deg, rgba(9, 18, 18, 0.38), rgba(9, 18, 18, 0.14));
  box-shadow:
    0 18px 34px rgba(7, 16, 14, 0.26),
    inset 0 0 0 1px rgba(255,255,255,0.14),
    inset 0 0 0 3px rgba(216,177,95,0.18);
}

.agent-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.98) contrast(1.04);
}

.agent-brief p {
  margin-top: 5px;
  font-size: 17px;
  line-height: 1.5;
}

.mode-chips,
.quick-prompts {
  flex-wrap: wrap;
}

.chip,
.quick-prompt {
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 7px;
  padding: 6px 9px;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  font-size: 12px;
}

.chip.active,
.quick-prompt:hover {
  border-color: rgba(245, 215, 145, 0.78);
  background: rgba(245, 215, 145, 0.14);
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 312px;
  gap: 14px;
  min-height: 0;
  overflow: hidden;
}

.chat-column,
.inspector {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
}

.chat-column {
  display: grid;
  grid-template-rows: minmax(200px, 1fr) auto;
  gap: 12px;
  min-height: 0;
  overflow: hidden;
}

.chat-panel,
.composer,
.inspector,
.api-dialog,
.settings-dialog,
.account-dialog {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 97%, var(--bg) 3%);
  box-shadow: var(--shadow-soft);
}

.chat-panel {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.panel-head,
.dialog-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.compact-head {
  padding: 13px 14px 0;
}

.chat-window {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px;
  max-height: 60vh;
  min-height: 120px;
  overscroll-behavior-x: none;
}

.message {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  max-width: min(820px, 78%);
  min-width: 0;
  overflow: hidden;
}

.message.user {
  align-self: end;
  grid-template-columns: minmax(0, 1fr) 36px;
  max-width: min(500px, 70%);
}
.message.user .bubble {
  overflow: hidden;
}

.message.user .mini-avatar {
  order: 2;
}

.message-portrait {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid rgba(255,240,205,0.22);
  background:
    radial-gradient(circle at 28% 24%, rgba(255,255,255,0.18), rgba(255,255,255,0) 34%),
    linear-gradient(180deg, rgba(9,18,18,0.32), rgba(9,18,18,0.12));
  box-shadow:
    0 10px 18px rgba(18, 26, 24, 0.12),
    inset 0 0 0 1px rgba(255,255,255,0.08);
}

.message-portrait img {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: cover;
  filter: saturate(0.98) contrast(1.04);
}

.message.user .bubble {
  background: color-mix(in srgb, var(--jade) 9%, var(--panel));
}

.bubble {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--panel);
  line-height: 1.68;
  overflow-wrap: break-word;
  word-break: break-word;
  min-width: 0;
}

.bubble strong {
  display: block;
  margin-bottom: 6px;
}

.bubble ul,
.bubble ol {
  margin: 7px 0 0;
  padding-left: 20px;
}

.bubble code {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 5px;
  background: var(--panel-soft);
}

.streaming-text {
  word-break: break-word;
}

.stream-caret {
  display: none;
}

.streaming-text .stream-caret {
  display: inline-block;
  width: 9px;
  height: 1.1em;
  margin-left: 3px;
  vertical-align: -0.12em;
  border-radius: 2px;
  background: color-mix(in srgb, var(--jade) 72%, #fff);
  animation: blinkCaret 900ms steps(1) infinite;
}

.msg-attachment {
  margin-bottom: 8px;
}

.msg-image {
  max-width: 240px;
  max-height: 200px;
  border-radius: 8px;
  border: 1px solid var(--line);
  object-fit: cover;
  display: block;
}

.msg-file {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  color: var(--ink-2);
  background: var(--panel-soft);
}

.msg-image-wrap {
  position: relative;
  display: inline-block;
}

.msg-image-gen, .msg-image {
  max-width: 100%;
  max-height: 400px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--line);
  display: block;
}
.msg-image-wrap img {
  object-fit: contain;
  max-width: 100%;
  height: auto;
}
/* 用户上传的附件图片必须限制不溢出 */
.msg-attachment img {
  max-width: 100%;
  max-height: 300px;
  object-fit: contain;
  display: block;
  border-radius: 8px;
}
.msg-attachment {
  max-width: 100%;
  overflow: hidden;
}

.msg-image-actions {
  position: absolute;
  bottom: 8px;
  right: 8px;
  display: flex;
  gap: 6px;
}

.img-action-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background 0.15s;
}

.img-action-btn:hover {
  background: rgba(0, 0, 0, 0.85);
}

.composer {
  padding: 10px;
}

.tool-button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
}

.composer textarea {
  width: 100%;
  min-height: 74px;
  margin: 9px 0 8px;
  resize: vertical;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  line-height: 1.6;
}

.composer-footer {
  justify-content: space-between;
  align-items: center;
}

.send-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quick-prompts {
  color: var(--muted);
}

.quick-prompt {
  border-color: var(--line);
  background: var(--panel-soft);
  color: var(--ink);
}

.composer-action-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
}

.composer-action-btn:hover {
  border-color: var(--jade);
  color: var(--jade);
  background: color-mix(in srgb, var(--jade) 8%, var(--panel));
}

.composer-action-btn:disabled {
  opacity: 0.5;
  cursor: wait;
}

.send-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 34px;
  border-color: var(--jade);
  background: var(--jade);
  color: #fff;
}

.inspector {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  overflow: auto;
}

.status-badge {
  border-radius: 8px;
  padding: 5px 9px;
  background: var(--gold-soft);
  color: color-mix(in srgb, var(--gold) 75%, var(--ink));
  font-size: 12px;
  font-weight: 800;
}

.status-badge.ready {
  background: color-mix(in srgb, var(--jade) 12%, var(--panel));
  color: var(--jade-dark);
}

.intake-fields {
  display: grid;
  gap: 10px;
}

.field-group {
  display: grid;
  gap: 6px;
}

.field-group label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.field-group input,
.field-group textarea,
.field-group select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  outline: 0;
  background: var(--panel);
  color: var(--ink);
}

.field-group textarea {
  min-height: 56px;
  resize: vertical;
}

.result-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.tab {
  min-height: 34px;
}

.tab.active {
  border-color: var(--jade);
  background: color-mix(in srgb, var(--jade) 12%, var(--panel));
  color: var(--jade-dark);
  font-weight: 800;
}

.result-panel {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  line-height: 1.65;
}

.metric-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px;
  align-items: center;
}

.meter {
  height: 9px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--panel-soft);
}

.meter span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--jade), var(--gold));
}

.api-dialog,
.settings-dialog {
  width: min(920px, calc(100vw - 30px));
  max-height: min(760px, calc(100vh - 40px));
  padding: 18px;
  color: var(--ink);
}

.api-dialog::backdrop,
.settings-dialog::backdrop,
.account-dialog::backdrop {
  background: rgba(10, 18, 16, 0.54);
}

.api-map {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.api-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel);
}

.api-group h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.endpoint {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 8px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.method {
  color: var(--jade-dark);
  font-weight: 900;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.settings-grid .wide {
  grid-column: 1 / -1;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.settings-status {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--panel-soft);
  color: var(--muted);
  line-height: 1.5;
}

.settings-status.ok {
  border-color: color-mix(in srgb, var(--jade) 40%, var(--line));
  background: color-mix(in srgb, var(--jade) 10%, var(--panel));
  color: var(--jade-dark);
}

.settings-status.error {
  border-color: color-mix(in srgb, var(--danger) 48%, var(--line));
  background: color-mix(in srgb, var(--danger) 10%, var(--panel));
  color: var(--danger);
}

.dialog-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
}

.message.loading .bubble {
  color: var(--muted);
}

.typing-dots {
  display: inline-flex;
  gap: 4px;
  vertical-align: middle;
}

.typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--jade);
  animation: pulseDot 900ms ease-in-out infinite;
}

.typing-dots span:nth-child(2) {
  animation-delay: 120ms;
}

.typing-dots span:nth-child(3) {
  animation-delay: 240ms;
}

.loading-text {
  color: var(--muted);
  font-size: 13px;
}

.loading-dots {
  display: inline;
}

.loading-dots span {
  animation: dot-blink 1.2s ease-in-out infinite;
}

.loading-dots span:nth-child(1) { animation-delay: 0s; }
.loading-dots span:nth-child(2) { animation-delay: 0.15s; }
.loading-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes dot-blink {
  0%, 100% { opacity: 0.2; }
  50%      { opacity: 1; }
}

@keyframes pulseDot {
  0%, 100% {
    transform: translateY(0);
    opacity: 0.35;
  }
  50% {
    transform: translateY(-3px);
    opacity: 1;
  }
}

@keyframes blinkCaret {
  0%, 45% {
    opacity: 1;
  }
  46%, 100% {
    opacity: 0;
  }
}

.mobile-only {
  display: none;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 270px minmax(0, 1fr);
  }

  .topbar {
    grid-template-columns: 1fr;
  }

  .top-status,
  .top-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .hero-band,
  .main-grid {
    grid-template-columns: 1fr;
  }

  .agent-brief {
    background: rgba(12, 28, 24, 0.84);
  }
}

@media (max-width: 760px) {
  .auth-panel {
    padding: 26px 22px;
  }

  .account-summary {
    grid-template-columns: 1fr;
  }

  .change-password-form {
    grid-template-columns: 1fr;
  }

  .usage-item {
    grid-template-columns: 1fr auto;
  }
  .app-shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
  }

  .sidebar {
    position: fixed;
    height: 100vh;
    inset: 0 auto 0 0;
    z-index: 5;
    width: min(86vw, 320px);
    transform: translateX(-102%);
    transition: transform 180ms ease;
    box-shadow: var(--shadow);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .workspace {
    padding: 14px;
  }

  .mobile-only {
    display: grid;
  }

  h1 {
    font-size: 22px;
  }

  .hero-band {
    min-height: 260px;
  }

  .hero-scene-image {
    min-height: 0;
  }

  .agent-brief {
    padding: 18px;
  }

  .api-map,
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

.voice-bar {
  padding: 8px 0 2px;
}

.voice-bar-inner {
  display: grid;
  grid-template-columns: minmax(190px, 0.9fr) minmax(180px, 1fr) auto auto auto;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--danger) 42%, var(--line));
  border-radius: 8px;
  background:
    radial-gradient(circle at 8% 18%, rgba(156, 74, 68, 0.14), transparent 30%),
    linear-gradient(135deg, color-mix(in srgb, var(--danger) 7%, var(--panel)), var(--panel));
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.55),
    0 12px 28px rgba(92, 35, 30, 0.10);
}

.voice-status {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.voice-status strong,
.voice-status span {
  display: block;
}

.voice-status strong {
  color: var(--ink);
  font-size: 13px;
}

.voice-status span {
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-dot {
  position: relative;
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--danger);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--danger) 14%, transparent);
}

.voice-dot::after {
  content: "";
  position: absolute;
  inset: -7px;
  border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent);
  border-radius: inherit;
  animation: voice-ring 1.35s ease-out infinite;
}

.voice-wave-wrap {
  min-width: 0;
  padding: 6px 10px;
  border: 1px solid color-mix(in srgb, var(--jade) 16%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--jade) 5%, var(--panel));
}

.voice-bar-waves {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 30px;
  overflow: hidden;
}

.voice-bar-waves span {
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--jade), var(--gold));
  animation: bar-pop .58s ease-in-out infinite alternate;
}
.voice-bar-waves span:nth-child(1)  { height: 10px; animation-delay: .00s; }
.voice-bar-waves span:nth-child(2)  { height: 16px; animation-delay: .03s; }
.voice-bar-waves span:nth-child(3)  { height: 22px; animation-delay: .06s; }
.voice-bar-waves span:nth-child(4)  { height: 28px; animation-delay: .09s; }
.voice-bar-waves span:nth-child(5)  { height: 26px; animation-delay: .12s; }
.voice-bar-waves span:nth-child(6)  { height: 22px; animation-delay: .15s; }
.voice-bar-waves span:nth-child(7)  { height: 18px; animation-delay: .18s; }
.voice-bar-waves span:nth-child(8)  { height: 14px; animation-delay: .21s; }
.voice-bar-waves span:nth-child(9)  { height: 20px; animation-delay: .24s; }
.voice-bar-waves span:nth-child(10) { height: 26px; animation-delay: .27s; }
.voice-bar-waves span:nth-child(11) { height: 24px; animation-delay: .30s; }
.voice-bar-waves span:nth-child(12) { height: 18px; animation-delay: .33s; }
.voice-bar-waves span:nth-child(13) { height: 14px; animation-delay: .36s; }
.voice-bar-waves span:nth-child(14) { height: 10px; animation-delay: .39s; }
.voice-bar-waves span:nth-child(15) { height: 16px; animation-delay: .42s; }
.voice-bar-waves span:nth-child(16) { height: 22px; animation-delay: .45s; }
.voice-bar-waves span:nth-child(17) { height: 18px; animation-delay: .48s; }
.voice-bar-waves span:nth-child(18) { height: 12px; animation-delay: .51s; }
.voice-bar-waves span:nth-child(19) { height: 8px;  animation-delay: .54s; }

@keyframes bar-pop {
  0%   { transform: scaleY(.34); opacity: .34; }
  100% { transform: scaleY(1);  opacity: 1; }
}

.voice-bar-timer {
  min-width: 52px;
  padding: 5px 8px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-align: center;
  white-space: nowrap;
}

.voice-bar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 58px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  flex-shrink: 0;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.voice-bar-btn.cancel {
  background: color-mix(in srgb, var(--panel-soft) 78%, var(--panel));
  color: var(--muted);
}

.voice-bar-btn.done {
  border-color: var(--jade-dark);
  background: var(--jade);
  color: #fff;
}

.voice-recording {
  background: var(--danger) !important;
  color: #fff !important;
  border-color: var(--danger) !important;
  animation: voice-pulse 1.2s ease-in-out infinite;
}

.composer.is-recording {
  border-color: color-mix(in srgb, var(--danger) 38%, var(--line));
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--danger) 7%, transparent),
    var(--shadow-soft);
}

@keyframes voice-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(156, 74, 68, 0.5); }
  50% { box-shadow: 0 0 0 8px rgba(156, 74, 68, 0); }
}

@keyframes voice-ring {
  0% {
    transform: scale(0.7);
    opacity: 0.85;
  }
  100% {
    transform: scale(1.7);
    opacity: 0;
  }
}

@media (max-width: 760px) {
  .voice-bar-inner {
    grid-template-columns: 1fr auto;
  }

  .voice-wave-wrap {
    grid-column: 1 / -1;
    order: 2;
  }

  .voice-bar-timer {
    justify-self: end;
  }

  .voice-bar-btn {
    min-width: 0;
  }
}

/* Chat-first layout inspired by modern assistant apps. */
:root {
  --bg: #f5f6f8;
  --bg-2: #fbfbfc;
  --panel: #ffffff;
  --panel-soft: #f2f4f5;
  --ink: #171a1f;
  --ink-2: #303741;
  --muted: #7a838f;
  --line: #e5e8ec;
  --line-strong: #d5dbe1;
  --jade: #0b7a68;
  --jade-dark: #075f52;
  --gold: #c99a42;
  --gold-soft: #f5ead2;
  --shadow: 0 18px 50px rgba(30, 41, 59, 0.08);
  --shadow-soft: 0 10px 28px rgba(30, 41, 59, 0.07);
}

body {
  background:
    radial-gradient(circle at 56% 0%, rgba(255, 255, 255, 0.92), rgba(255,255,255,0) 34%),
    var(--bg);
}

.app-shell {
  grid-template-columns: 260px minmax(0, 1fr);
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}

.sidebar {
  gap: 12px;
  height: 100vh;
  min-height: 0;
  padding: 16px 12px;
  overflow: hidden;
  background: #f7f8fa;
  border-right: 1px solid #e8ebef;
}

.brand-row {
  min-height: 42px;
}

.brand-logo {
  width: 136px;
  height: 36px;
  border-color: transparent;
  background: transparent;
}

.edition-card {
  border-color: #ece2c9;
  border-radius: 12px;
  background: linear-gradient(135deg, #fffaf0, #f8f2e5);
  box-shadow: none;
}

.search-box {
  height: 38px;
  border-color: #e6e9ed;
  border-radius: 12px;
  background: #fff;
}

.section-title {
  padding: 0 4px;
  color: #8a939f;
  font-size: 12px;
}

.agent-list {
  gap: 3px;
}

.agent-button,
.history-item {
  min-height: 42px;
  padding: 6px 8px;
  border-radius: 12px;
  color: #303741;
}

.agent-button:hover,
.history-item:hover {
  border-color: transparent;
  background: #eef2f4;
}

.agent-button.active {
  border-color: #dce9e6;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.agent-button.active {
  box-shadow:
    inset 3px 0 0 var(--jade),
    0 8px 20px rgba(15, 23, 42, 0.06);
}

.mini-avatar {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  box-shadow: none;
}

.history-wrap {
  flex: 1;
  min-height: 0;
}

.workspace {
  grid-template-rows: auto auto minmax(0, 1fr);
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  padding: 16px 20px 18px;
  gap: 12px;
}

.topbar {
  min-height: 48px;
  padding: 0 2px;
}

.title-stack {
  gap: 2px;
}

h1 {
  font-size: 23px;
}

.title-stack p {
  font-size: 12px;
}

.status-pill,
.theme-toggle,
.account-button,
.ghost-button,
.primary-button {
  border-radius: 12px;
}

.status-pill,
.theme-toggle,
.account-button {
  min-height: 32px;
  background: #fff;
}

.primary-button {
  min-height: 38px;
  border-color: transparent;
  background: #111827;
}

#exportButton {
  background: var(--jade);
}

.hero-band {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 210px;
  max-height: 240px;
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(226, 231, 236, 0.92);
  border-radius: 20px;
  background: #07110f;
  box-shadow: 0 14px 38px rgba(30, 41, 59, 0.10);
}

.hero-art-panel {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  aspect-ratio: auto;
  background: #101815;
}

.hero-art-panel::after {
  background:
    radial-gradient(circle at 26% 22%, rgba(255, 231, 178, 0.16), transparent 30%),
    linear-gradient(90deg, rgba(4, 10, 9, 0.18), rgba(4, 10, 9, 0.34) 46%, rgba(4, 10, 9, 0.78)),
    linear-gradient(180deg, rgba(4, 10, 9, 0.12), rgba(4, 10, 9, 0.60));
}

.hero-scene-image {
  object-fit: cover;
  object-position: center center;
}

.agent-brief {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: min(980px, calc(100% - 32px));
  min-height: 78px;
  margin: 16px;
  padding: 14px 16px;
  color: #f8fbf9;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(6, 26, 22, 0.82), rgba(7, 55, 48, 0.70)),
    rgba(6, 22, 19, 0.74);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
}

.agent-brief .eyebrow {
  color: rgba(255, 255, 255, 0.58);
}

.agent-avatar {
  width: 48px;
  height: 48px;
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.20);
}

.agent-brief p {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  line-height: 1.45;
}

.mode-chips {
  justify-content: flex-end;
  max-width: 420px;
}

.chip {
  border-color: rgba(255, 255, 255, 0.20);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.82);
}

.chip.active {
  border-color: rgba(232, 203, 137, 0.62);
  background: rgba(232, 203, 137, 0.14);
  color: #fff4cf;
}

.main-grid {
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 14px;
  min-height: 0;
  overflow: hidden;
}

.chat-column {
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
}

.chat-panel {
  min-height: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.compact-head {
  display: none;
}

.chat-window {
  gap: 16px;
  padding: 18px 10px 20px;
  background: transparent;
}

.message {
  max-width: min(760px, 82%);
}

.message-portrait {
  width: 36px;
  height: 36px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.message-portrait img {
  width: 36px;
  height: 36px;
}

.bubble {
  border: 0;
  border-radius: 16px;
  padding: 14px 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(30, 41, 59, 0.06);
}

.message.user .bubble {
  background: #e9f5f2;
  box-shadow: none;
}

.composer {
  width: 100%;
  padding: 12px;
  border-color: #e2e7ec;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 50px rgba(30, 41, 59, 0.12);
  backdrop-filter: blur(18px);
}

.composer-tools {
  gap: 6px;
}

.tool-button {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #f7f8fa;
}

.composer textarea {
  min-height: 68px;
  margin: 8px 0 6px;
  padding: 0 2px;
}

.quick-prompts {
  gap: 6px;
}

.quick-prompt {
  border-color: #e6e9ed;
  border-radius: 999px;
  background: #f7f8fa;
  color: #596271;
}

.send-button {
  width: 40px;
  height: 36px;
  border-radius: 12px;
  border-color: transparent;
  background: #111827;
}

.inspector {
  border-color: #e3e8ed;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 34px rgba(30, 41, 59, 0.08);
  backdrop-filter: blur(16px);
}

.inspector .panel-head {
  padding-bottom: 4px;
}

.status-badge {
  border-radius: 999px;
}

.field-group input,
.field-group textarea,
.field-group select {
  border-color: #e2e7ec;
  border-radius: 12px;
  background: #fff;
}

.result-tabs {
  padding: 3px;
  border-radius: 12px;
  background: #f3f5f6;
}

.tab {
  border: 0;
  border-radius: 10px;
  background: transparent;
}

.tab.active {
  background: #fff;
  box-shadow: 0 4px 12px rgba(30, 41, 59, 0.06);
}

.result-panel {
  border-top-color: #edf0f2;
}

.voice-bar-inner {
  border-radius: 16px;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 240px minmax(0, 1fr);
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .workspace {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .agent-brief {
    width: calc(100% - 28px);
    margin: 14px;
  }

  .main-grid {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .chat-column {
    grid-template-rows: minmax(320px, auto) auto;
  }

  .chat-panel {
    min-height: 320px;
  }

  .inspector {
    min-height: 0;
  }
}

@media (max-width: 760px) {
  .workspace {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .agent-brief {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .mode-chips {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .message {
    max-width: 100%;
  }
}

body[data-theme="night"] {
  --bg: #101413;
  --bg-2: #151a18;
  --panel: #181e1c;
  --panel-soft: #202724;
  --ink: #f2f5f3;
  --ink-2: #d8dedb;
  --muted: #98a39e;
  --line: #2a3430;
  --line-strong: #3a4742;
  --jade: #3db7a5;
  --jade-dark: #2d9b8c;
  --gold: #d7b36c;
  --gold-soft: rgba(215, 179, 108, 0.15);
  background:
    radial-gradient(circle at 56% 0%, rgba(49, 75, 68, 0.38), rgba(16, 20, 19, 0) 34%),
    var(--bg);
}

body[data-theme="night"] .sidebar {
  background: #141918;
  border-right-color: #26302d;
}

body[data-theme="night"] .brand-logo {
  filter: brightness(0.96);
}

body[data-theme="night"] .edition-card {
  border-color: rgba(215, 179, 108, 0.20);
  background: linear-gradient(135deg, rgba(215, 179, 108, 0.12), rgba(255,255,255,0.03));
}

body[data-theme="night"] .search-box,
body[data-theme="night"] .status-pill,
body[data-theme="night"] .theme-toggle,
body[data-theme="night"] .account-button,
body[data-theme="night"] .tool-button,
body[data-theme="night"] .quick-prompt,
body[data-theme="night"] .field-group input,
body[data-theme="night"] .field-group textarea,
body[data-theme="night"] .field-group select {
  border-color: #2a3430;
  background: #181e1c;
  color: var(--ink);
}

body[data-theme="night"] .agent-button,
body[data-theme="night"] .history-item {
  color: #d8dedb;
}

body[data-theme="night"] .agent-button:hover,
body[data-theme="night"] .history-item:hover {
  background: #202724;
}

body[data-theme="night"] .agent-button.active {
  border-color: rgba(61, 183, 165, 0.25);
  background: #1a211f;
  box-shadow:
    inset 3px 0 0 var(--jade),
    0 8px 20px rgba(0, 0, 0, 0.16);
}

body[data-theme="night"] .agent-brief {
  border-color: rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(135deg, rgba(8, 35, 31, 0.86), rgba(10, 61, 54, 0.72)),
    rgba(6, 18, 16, 0.78);
}

body[data-theme="night"] .bubble {
  background: #181e1c;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

body[data-theme="night"] .message.user .bubble {
  background: rgba(61, 183, 165, 0.14);
}

body[data-theme="night"] .composer,
body[data-theme="night"] .inspector {
  border-color: #28322f;
  background: rgba(24, 30, 28, 0.92);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
}

body[data-theme="night"] .result-tabs {
  background: #202724;
}

body[data-theme="night"] .tab.active {
  background: #181e1c;
  color: var(--jade);
}

body[data-theme="night"] .voice-bar-inner {
  background:
    radial-gradient(circle at 8% 18%, rgba(220, 129, 120, 0.16), transparent 30%),
    linear-gradient(135deg, rgba(220, 129, 120, 0.10), rgba(24, 30, 28, 0.96));
}

/* Executive dashboard composition */
body {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.82), rgba(255,255,255,0) 240px),
    #f6f5f1;
}

.app-shell {
  grid-template-columns: 306px minmax(0, 1fr);
}

.sidebar {
  padding: 24px 24px 20px;
  background: #fbfaf6;
  border-right-color: #e5e1d8;
}

.brand-row {
  min-height: 54px;
}

.brand-logo {
  width: 162px;
  height: 48px;
  padding: 0;
}

.edition-card,
.search-box {
  display: none;
}

.section-title {
  margin-top: 6px;
  padding: 0;
  color: #b88433;
  font-size: 14px;
  font-weight: 900;
}

.agent-list {
  gap: 8px;
}

.agent-button {
  min-height: 58px;
  justify-content: flex-start;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 14px;
}

.agent-button > span:last-child {
  font-weight: 800;
}

.agent-button.active {
  border-color: rgba(11, 122, 104, 0.42);
  background: #f8fcfa;
  box-shadow: inset 3px 0 0 var(--jade);
}

.mini-avatar {
  width: 42px;
  height: 42px;
  border-radius: 8px;
}

.compact .agent-button {
  min-height: 42px;
}

.compact .mini-avatar {
  width: 30px;
  height: 30px;
}

.history-wrap {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid #ebe7de;
}

.workspace {
  padding: 30px 36px 28px;
  gap: 18px;
}

.topbar {
  grid-template-columns: minmax(340px, 1fr) auto auto;
  min-height: 52px;
}

.title-stack {
  grid-template-columns: auto auto;
  align-items: center;
  gap: 10px;
}

.title-stack .eyebrow {
  color: #1d2a27;
  font-size: 17px;
  font-weight: 800;
}

.title-stack .eyebrow::after {
  content: "：";
}

.title-stack h1 {
  color: #073d36;
  font-size: 30px;
  font-weight: 900;
}

.title-stack p {
  grid-column: 2;
  color: #8d8072;
  font-size: 12px;
}

.status-pill,
.theme-toggle,
.account-button {
  min-height: 42px;
  border-color: #dfd9cc;
  border-radius: 10px;
  background: #fffdfa;
}

.account-button {
  min-width: 190px;
  justify-content: center;
}

.account-button strong {
  color: #087466;
}

.primary-button {
  min-height: 44px;
  border-radius: 10px;
  background: linear-gradient(180deg, #0d7b6d, #075f52);
  box-shadow: 0 8px 18px rgba(7, 95, 82, 0.18);
}

.hero-band {
  min-height: 326px;
  max-height: 326px;
  border-color: #ddd8cc;
  border-radius: 10px;
}

.hero-art-panel::after {
  background:
    linear-gradient(90deg, rgba(3, 9, 8, 0.34), rgba(3, 9, 8, 0.16) 44%, rgba(3, 9, 8, 0.24)),
    linear-gradient(180deg, rgba(3, 9, 8, 0.04), rgba(3, 9, 8, 0.30));
}

.agent-brief {
  grid-template-columns: 178px minmax(0, 1fr);
  grid-template-rows: auto auto;
  width: min(650px, calc(100% - 64px));
  min-height: 252px;
  margin: 26px 34px;
  padding: 28px 32px;
  border-radius: 18px;
  border-color: rgba(255, 255, 255, 0.24);
  background:
    linear-gradient(135deg, rgba(8, 16, 15, 0.70), rgba(12, 31, 28, 0.54)),
    rgba(8, 18, 16, 0.60);
}

.agent-avatar {
  grid-row: 1 / 3;
  width: 148px;
  height: 148px;
  border-width: 2px;
}

.agent-brief .eyebrow {
  color: rgba(255, 236, 190, 0.72);
  font-size: 13px;
}

.agent-brief p {
  max-width: 360px;
  margin-top: 10px;
  font-size: 17px;
  font-weight: 800;
}

.mode-chips {
  grid-column: 2;
  justify-content: flex-start;
  max-width: none;
}

.chip {
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 12px;
}

.main-grid {
  grid-template-columns: minmax(0, 1fr) 410px;
  gap: 26px;
}

.chat-column {
  gap: 14px;
}

.chat-panel {
  min-height: 430px;
  border: 1px solid #e2ddd2;
  border-radius: 10px;
  background: #fffdfa;
  box-shadow: 0 10px 26px rgba(49, 39, 26, 0.06);
}

.compact-head {
  display: flex;
  padding: 22px 24px 0;
}

.compact-head h2 {
  font-size: 24px;
}

.chat-window {
  padding: 24px;
}

.message {
  max-width: min(720px, 76%);
}

.bubble {
  border: 1px solid #e1ddd3;
  border-radius: 10px;
  box-shadow: none;
}

.composer {
  border-color: #e2ddd2;
  border-radius: 10px;
  background: #fffdfa;
  box-shadow: 0 10px 26px rgba(49, 39, 26, 0.06);
}

.tool-button {
  border-color: #dfd9cc;
  border-radius: 8px;
  background: #fffdfa;
}

.tool-button[data-tool="voice"] {
  background: #087466;
  color: #fff;
}

.quick-prompt {
  border-color: #ded8cc;
  background: #f8f5ed;
  color: #756b60;
}

.send-button {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: #087466;
}

.inspector {
  gap: 16px;
  border-color: #e2ddd2;
  border-radius: 10px;
  background: #fffdfa;
  box-shadow: 0 10px 26px rgba(49, 39, 26, 0.06);
}

.field-group input,
.field-group textarea {
  min-height: 42px;
  border-color: #ded8cc;
  border-radius: 8px;
}

.result-tabs {
  border: 1px solid #e5dfd4;
  background: #faf7f0;
}

.result-panel {
  margin-top: 2px;
  padding-top: 16px;
}

body[data-theme="night"] {
  background:
    linear-gradient(180deg, rgba(24, 34, 31, 0.68), rgba(16, 20, 19, 0) 240px),
    #101413;
}

body[data-theme="night"] .sidebar,
body[data-theme="night"] .chat-panel,
body[data-theme="night"] .composer,
body[data-theme="night"] .inspector {
  border-color: #2f3935;
  background: #181e1c;
}

body[data-theme="night"] .title-stack .eyebrow,
body[data-theme="night"] .title-stack h1 {
  color: #f2f5f3;
}

body[data-theme="night"] .status-pill,
body[data-theme="night"] .theme-toggle,
body[data-theme="night"] .account-button,
body[data-theme="night"] .tool-button {
  border-color: #303a36;
  background: #181e1c;
}

body[data-theme="night"] .bubble,
body[data-theme="night"] .field-group input,
body[data-theme="night"] .field-group textarea {
  border-color: #303a36;
  background: #151a18;
}

body[data-theme="night"] .quick-prompt,
body[data-theme="night"] .result-tabs {
  border-color: #303a36;
  background: #202724;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 252px minmax(0, 1fr);
  }

  .workspace {
    padding: 20px;
  }

  .title-stack {
    grid-template-columns: 1fr;
  }

  .title-stack p {
    grid-column: auto;
  }

  .agent-brief {
    grid-template-columns: 82px minmax(0, 1fr);
    min-height: 160px;
  }

  .agent-avatar {
    width: 76px;
    height: 76px;
  }
}

/* Keep the original lightweight left sidebar while iterating on the main UI. */
.app-shell {
  grid-template-columns: 260px minmax(0, 1fr);
}

.sidebar {
  gap: 12px;
  height: 100vh;
  min-height: 0;
  padding: 16px 12px;
  overflow: hidden;
  background: #f7f8fa;
  border-right: 1px solid #e8ebef;
}

.brand-row {
  min-height: 42px;
}

.brand-logo {
  width: 136px;
  height: 36px;
  padding: 4px 7px;
  border-color: transparent;
  background: transparent;
}

.edition-card {
  display: grid;
  border-color: #ece2c9;
  border-radius: 12px;
  background: linear-gradient(135deg, #fffaf0, #f8f2e5);
  box-shadow: none;
}

.search-box {
  display: flex;
  height: 38px;
  border-color: #e6e9ed;
  border-radius: 12px;
  background: #fff;
}

.section-title {
  margin-top: 0;
  padding: 0 4px;
  color: #8a939f;
  font-size: 12px;
  font-weight: 800;
}

.agent-list {
  gap: 3px;
}

.agent-button,
.history-item {
  min-height: 42px;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 12px;
  color: #303741;
  font-size: 12px;
}

.agent-button > span:last-child {
  font-weight: 400;
}

.agent-button.active {
  border-color: #dce9e6;
  background: #ffffff;
  box-shadow:
    inset 3px 0 0 var(--jade),
    0 8px 20px rgba(15, 23, 42, 0.06);
}

.mini-avatar {
  width: 30px;
  height: 30px;
  border-radius: 10px;
}

.compact .agent-button {
  min-height: 39px;
}

.compact .mini-avatar {
  width: 24px;
  height: 24px;
}

.history-wrap {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

/* Main hero should feel premium, but not oversized. */
.hero-band {
  width: min(1280px, 100%);
  min-height: 286px;
  max-height: 286px;
}

.agent-brief {
  width: min(590px, calc(100% - 56px));
  min-height: 220px;
  margin: 24px 28px;
  padding: 24px 28px;
}

.agent-avatar {
  width: 124px;
  height: 124px;
}

body[data-theme="night"] .sidebar {
  background: #141918;
  border-right-color: #26302d;
}

body[data-theme="night"] .edition-card {
  border-color: rgba(215, 179, 108, 0.20);
  background: linear-gradient(135deg, rgba(215, 179, 108, 0.12), rgba(255,255,255,0.03));
}

body[data-theme="night"] .search-box {
  border-color: #2a3430;
  background: #181e1c;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .hero-band {
    width: 100%;
  }

  .agent-brief {
    width: calc(100% - 28px);
    min-height: 160px;
    margin: 14px;
  }

  .agent-avatar {
    width: 76px;
    height: 76px;
  }
}

/* Restore enterprise cockpit layout, with tighter vertical spacing. */
body {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.68), rgba(255,255,255,0) 220px),
    #eef1ee;
}

.app-shell {
  grid-template-columns: 242px minmax(0, 1fr);
  min-height: 100vh;
  height: auto;
  overflow: visible;
}

.workspace {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-width: 0;
  height: auto;
  min-height: 100vh;
  overflow: visible;
  padding: 14px 16px 16px;
  gap: 10px;
}

.topbar {
  grid-template-columns: minmax(260px, 1fr) auto auto;
  align-items: center;
  min-height: 46px;
  padding: 0;
}

.title-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
}

.title-stack .eyebrow {
  color: var(--muted);
  font-size: 12px;
}

.title-stack .eyebrow::after {
  content: "";
}

.title-stack h1 {
  color: var(--ink);
  font-size: 24px;
}

.title-stack p {
  grid-column: auto;
  color: var(--muted);
  font-size: 12px;
}

.status-pill,
.theme-toggle,
.account-button {
  min-height: 32px;
  border-color: var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.account-button {
  min-width: 0;
}

.primary-button {
  min-height: 36px;
  border-radius: 8px;
  background: linear-gradient(180deg, var(--jade), var(--jade-dark));
  box-shadow: none;
}

.hero-band {
  position: relative;
  display: grid;
  grid-template-columns: minmax(520px, 1fr) 324px;
  align-items: stretch;
  gap: 0;
  width: 100%;
  min-height: 246px;
  max-height: 246px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--jade) 20%, var(--line));
  border-radius: 8px;
  background: var(--panel-strong);
  box-shadow: var(--shadow-soft);
}

.hero-art-panel {
  position: relative;
  inset: auto;
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  overflow: hidden;
  background: #030505;
}

.hero-art-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 76% 18%, rgba(218, 183, 111, 0.14), rgba(218, 183, 111, 0) 24%),
    linear-gradient(90deg, rgba(6, 12, 12, 0.10), rgba(6, 12, 12, 0.04) 42%, rgba(6, 12, 12, 0.24)),
    linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.13));
  pointer-events: none;
}

.hero-scene-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.agent-brief {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 20px 22px;
  color: #fff;
  border: 0;
  border-radius: 0;
  background: linear-gradient(90deg, rgba(12, 28, 24, 0.12), rgba(12, 28, 24, 0.86));
  box-shadow: none;
  backdrop-filter: none;
}

.agent-avatar {
  width: 58px;
  height: 58px;
  border: 1px solid rgba(255, 240, 205, 0.28);
  box-shadow:
    0 14px 28px rgba(7, 16, 14, 0.22),
    inset 0 0 0 1px rgba(255,255,255,0.12);
}

.agent-brief .eyebrow {
  color: rgba(255,255,255,0.62);
  font-size: 12px;
}

.agent-brief p {
  max-width: none;
  margin-top: 4px;
  color: rgba(255,255,255,0.94);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
}

.mode-chips {
  grid-column: auto;
  justify-content: flex-start;
  max-width: none;
}

.chip {
  border-color: rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  padding: 6px 9px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
}

.chip.active {
  border-color: rgba(245, 215, 145, 0.78);
  background: rgba(245, 215, 145, 0.14);
  color: #fff4cf;
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 312px;
  gap: 12px;
  min-height: 0;
  overflow: visible;
}

.chat-column {
  display: grid;
  grid-template-rows: minmax(320px, 1fr) auto;
  gap: 10px;
  min-height: 0;
}

.chat-panel,
.composer,
.inspector {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 97%, var(--bg) 3%);
  box-shadow: var(--shadow-soft);
}

.chat-panel {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.compact-head {
  display: flex;
  padding: 12px 14px 0;
}

.compact-head h2 {
  font-size: 17px;
}

.chat-window {
  padding: 14px;
}

.bubble {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--panel);
  box-shadow: none;
}

.composer {
  width: 100%;
  padding: 10px;
}

.composer textarea {
  min-height: 62px;
  margin: 8px 0 6px;
}

.tool-button {
  width: 30px;
  height: 30px;
  border-color: var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.quick-prompt {
  border-color: var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--ink);
}

.send-button {
  width: 40px;
  height: 36px;
  border-radius: 8px;
  background: var(--jade);
}

.inspector {
  gap: 12px;
  padding: 14px;
}

body[data-theme="night"] .hero-band {
  border-color: #26332f;
  background: #0b1512;
}

body[data-theme="night"] .chat-panel,
body[data-theme="night"] .composer,
body[data-theme="night"] .inspector,
body[data-theme="night"] .bubble {
  border-color: #26332f;
  background: #161d1a;
}

@media (max-width: 1180px) {
  .hero-band,
  .main-grid {
    grid-template-columns: 1fr;
  }

  .hero-band {
    min-height: 300px;
    max-height: none;
  }

  .agent-brief {
    min-height: 160px;
  }
}

/* Match the provided reference: full-width hero image with a compact overlay card. */
.hero-band {
  position: relative;
  display: block;
  width: 100%;
  min-height: 226px;
  max-height: 226px;
  overflow: hidden;
  border: 1px solid #ded8cc;
  border-radius: 9px;
  background: #07110f;
  box-shadow: 0 10px 24px rgba(49, 39, 26, 0.08);
}

.hero-art-panel {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  background: #07110f;
}

.hero-art-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 9, 8, 0.30), rgba(3, 9, 8, 0.10) 46%, rgba(3, 9, 8, 0.20)),
    linear-gradient(180deg, rgba(3, 9, 8, 0.06), rgba(3, 9, 8, 0.28));
  pointer-events: none;
}

.hero-scene-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.agent-brief {
  position: absolute;
  left: 34px;
  top: 24px;
  z-index: 1;
  display: grid;
  grid-template-columns: 106px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: 10px 22px;
  width: min(570px, calc(100% - 68px));
  min-height: 162px;
  margin: 0;
  padding: 20px 24px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 16px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(7, 17, 15, 0.70), rgba(11, 31, 28, 0.54)),
    rgba(8, 18, 16, 0.58);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.20);
  backdrop-filter: blur(12px);
}

.agent-avatar {
  grid-row: 1 / 3;
  width: 96px;
  height: 96px;
  border: 2px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
}

.agent-brief .eyebrow {
  color: rgba(255, 232, 184, 0.76);
  font-size: 12px;
}

.agent-brief p {
  margin-top: 6px;
  max-width: 340px;
  color: rgba(255, 255, 255, 0.94);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
}

.mode-chips {
  grid-column: 2;
  gap: 7px;
  justify-content: flex-start;
}

.chip {
  padding: 5px 10px;
  border-color: rgba(255, 255, 255, 0.26);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
}

.chip.active {
  border-color: rgba(245, 215, 145, 0.76);
  background: rgba(216, 177, 95, 0.22);
  color: #fff0c6;
}

@media (max-width: 1180px) {
  .hero-band {
    min-height: 240px;
    max-height: 240px;
  }

  .agent-brief {
    left: 18px;
    top: 18px;
    width: calc(100% - 36px);
    min-height: 148px;
  }
}

/* Normalize the hero image size without changing the source artwork. */
.hero-band {
  height: clamp(220px, 24vh, 280px);
  min-height: 220px;
  max-height: 280px;
}

.hero-art-panel {
  height: 100%;
}

.hero-scene-image {
  height: 100%;
  object-fit: contain;
  object-position: center center !important;
  transform: none;
}

@media (max-width: 1180px) {
  .hero-band {
    height: 220px;
    min-height: 220px;
    max-height: none;
  }

  .hero-scene-image {
    object-position: center center !important;
  }
}

/* Reference-style top role bar. */
.topbar {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) auto auto;
  align-items: center;
  min-height: 54px;
  gap: 18px;
  padding: 0;
}

.title-stack {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.title-stack .eyebrow {
  flex: 0 0 auto;
  color: #1f2d29;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}

.msg-actions {
  display: flex;
  gap: 4px;
  margin-top: 8px;
  opacity: 0;
  transition: opacity 0.15s;
}

.bubble:hover .msg-actions {
  opacity: 1;
}

.msg-act-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.bubble-image, .bubble-music {
  padding: 0;
  overflow: hidden;
}
.msg-music-wrap {
  padding: 12px;
  background: var(--bg);
}
.msg-music-wrap audio {
  width: 100%;
  max-width: 360px;
  height: 40px;
  border-radius: 8px;
}
.music-meta {
  display: inline-block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--ink-2);
}
.msg-audio {
  width: 100%;
}

.bubble-image {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.msg-act-btn:hover {
  border-color: var(--jade);
  color: var(--jade);
}

.title-stack .eyebrow::after {
  content: ":";
}

.title-stack h1 {
  margin: 0;
  color: #073f37;
  font-size: 24px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

.title-stack p {
  margin: 0 0 0 4px;
  color: #8b8071;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.top-status {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
}

.top-status .status-pill {
  display: none;
}

.top-usage {
  width: 180px;
  display: grid;
  gap: 7px;
}

.top-usage-line {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: #3b4742;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.top-usage-line strong {
  color: #087466;
  font-size: 13px;
  font-weight: 950;
}

.top-usage-line em {
  color: #8b938e;
  font-style: normal;
  font-weight: 700;
}

.top-usage-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e1e6e0;
}

.top-usage-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0b6f62, #0e8a78);
}

.theme-toggle {
  min-width: 148px;
  min-height: 42px;
  justify-content: center;
  gap: 9px;
  border: 1px solid #ded8cc;
  border-radius: 10px;
  background: #fffdfa;
  color: #2b332f;
  font-weight: 900;
  box-shadow: none;
}

.theme-toggle .toggle-icon {
  color: #d99a34;
  font-size: 18px;
}

.top-actions {
  display: flex;
  align-items: center;
}

#exportButton {
  min-width: 132px;
  min-height: 44px;
  border-radius: 10px;
  background: linear-gradient(180deg, #0c6f63, #07594f);
  color: #fff;
  font-size: 14px;
  font-weight: 950;
  box-shadow: 0 8px 18px rgba(7, 95, 82, 0.18);
}

body[data-theme="night"] .title-stack .eyebrow,
body[data-theme="night"] .title-stack h1 {
  color: #eaf4ee;
}

body[data-theme="night"] .title-stack p,
body[data-theme="night"] .top-usage-line,
body[data-theme="night"] .top-usage-line em {
  color: #9ca9a3;
}

body[data-theme="night"] .theme-toggle {
  border-color: #33413b;
  background: #161d1a;
  color: #edf3ef;
}

body[data-theme="night"] .top-usage-track {
  background: #27332f;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .title-stack {
    flex-wrap: wrap;
  }

  .top-status,
  .top-actions {
    justify-content: flex-start;
  }
}

/* Reference-style hero information card. */
.agent-brief {
  position: absolute;
  left: 34px;
  top: 22px;
  z-index: 2;
  display: grid;
  grid-template-columns: 120px 1px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 24px;
  row-gap: 9px;
  width: min(575px, calc(100% - 68px));
  min-height: 166px;
  padding: 22px 24px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(7, 13, 13, 0.66), rgba(17, 28, 26, 0.50)),
    rgba(7, 15, 14, 0.44);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(12px);
}

.agent-brief::before {
  content: "";
  grid-column: 2;
  grid-row: 1 / 3;
  width: 1px;
  height: 116px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.36),
    rgba(255, 255, 255, 0)
  );
}

.agent-avatar {
  grid-column: 1;
  grid-row: 1 / 3;
  width: 116px;
  height: 116px;
  overflow: hidden;
  border: 1px solid rgba(238, 211, 157, 0.38);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow:
    0 14px 28px rgba(0, 0, 0, 0.30),
    inset 0 0 0 1px rgba(255, 255, 255, 0.10);
}

.agent-avatar img,
.agent-avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.agent-brief > div:not(.agent-avatar):not(.mode-chips) {
  grid-column: 3;
  min-width: 0;
}

.agent-brief .eyebrow {
  display: none;
}

.hero-agent-name {
  margin: 0;
  color: #f0c773;
  font-size: 26px;
  font-weight: 950;
  line-height: 1.1;
  letter-spacing: 0;
}

.agent-brief p {
  max-width: 360px;
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.55;
}

.mode-chips {
  grid-column: 3;
  grid-row: 2;
  align-self: end;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.chip {
  height: 26px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  font-weight: 850;
  line-height: 24px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.chip.active {
  border-color: rgba(240, 199, 115, 0.78);
  background: linear-gradient(180deg, rgba(236, 188, 92, 0.44), rgba(172, 122, 38, 0.34));
  color: #fff1c4;
}

body[data-theme="night"] .agent-brief {
  border-color: rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(135deg, rgba(3, 8, 8, 0.72), rgba(13, 25, 23, 0.54)),
    rgba(6, 13, 12, 0.50);
}

@media (max-width: 1180px) {
  .agent-brief {
    left: 18px;
    top: 18px;
    width: calc(100% - 36px);
    min-height: 148px;
    padding: 18px;
    grid-template-columns: 92px 1px minmax(0, 1fr);
    column-gap: 18px;
  }

  .agent-brief::before {
    height: 92px;
  }

  .agent-avatar {
    width: 88px;
    height: 88px;
  }

  .hero-agent-name {
    font-size: 21px;
  }

  .agent-brief p {
    font-size: 13px;
    line-height: 1.45;
  }

  .mode-chips {
    gap: 6px;
  }

  .chip {
    height: 24px;
    padding: 0 9px;
    font-size: 11px;
    line-height: 22px;
  }
}

.recharge-dialog {
  width: min(480px, calc(100vw - 32px));
  padding: 24px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
}

.recharge-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 16px 0;
}

.recharge-card {
  padding: 16px;
  border: 2px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s;
}

.recharge-card:hover {
  border-color: var(--gold);
}

.recharge-card.selected {
  border-color: var(--jade);
  background: color-mix(in srgb, var(--jade) 6%, var(--panel));
}

.recharge-card .rc-credits {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
}

.recharge-card .rc-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--jade);
  margin: 4px 0;
}

.wa-sub-btn {
  margin-top: 10px;
  width: 100%;
  min-height: 34px;
  font-size: 13px;
}
.recharge-card .rc-desc {
  font-size: 12px;
  color: var(--muted);
}

.pay-dialog {
  width: min(360px, calc(100vw - 32px));
  padding: 24px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  text-align: center;
}
.pay-qr-wrap { width: 200px; height: 200px; margin: 16px auto; border: 1px solid var(--line); border-radius: 8px; display: flex; align-items: center; justify-content: center; background: #fff; }
.pay-qr { width: 100%; height: 100%; object-fit: contain; display: none; }
.pay-qr-placeholder { color: var(--muted); font-size: 13px; }
.pay-amount { font-size: 24px; font-weight: 700; color: var(--ink); margin: 8px 0; }
.pay-note { font-size: 12px; color: var(--muted); }

.recharge-custom {
  margin: 12px 0 4px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
}
.recharge-custom-label { font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.recharge-custom-row { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.recharge-custom-row input {
  width: 140px; min-height: 38px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--ink); font: inherit;
}

.recharge-note {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin: 8px 0;
}

.txn-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.txn-item .txn-amount {
  font-weight: 700;
}

/* 页面固定，聊天框滚动 */
body, html { height: 100%; overflow: hidden; }
.app-shell { height: 100vh !important; overflow: hidden !important; }
.sidebar { height: 100vh !important; overflow-y: auto !important; }
.workspace { overflow: hidden !important; }
.chat-window { overflow-y: auto !important; min-height: 0; }

.txn-recharge .txn-amount { color: var(--jade); }
.txn-consumption .txn-amount { color: var(--danger); }

/* Knowledge-base preview sidebar polish: layout only, keep portraits and hero art unchanged. */
.app-shell {
  grid-template-columns: 212px minmax(0, 1fr);
}

.sidebar {
  gap: 10px;
  padding: 14px 12px 12px;
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.98), rgba(249, 248, 243, 0.96)),
    var(--panel);
}

.brand-row {
  min-height: 58px;
  padding: 0;
}

.brand-logo {
  width: 178px;
  height: 54px;
  padding: 0;
  border: 0;
  background: transparent;
  object-fit: contain;
}

.edition-card,
.search-box {
  display: none;
}

.nav-section {
  gap: 7px;
}

.toggle-section {
  min-height: 26px;
  padding: 0 2px;
  color: #c2872b;
  font-size: 14px;
  font-weight: 900;
}

.toggle-section svg {
  display: none;
}

.agent-list {
  gap: 6px;
}

.agent-button {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  justify-content: stretch;
  gap: 10px;
  min-height: 54px;
  padding: 6px 8px;
  border-radius: 7px;
  color: #1d2824;
  background: transparent;
  font-size: 13px;
}

.agent-button > span:last-child {
  white-space: normal;
}

.agent-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
  align-content: center;
}

.agent-copy strong {
  overflow: hidden;
  color: #16231f;
  font-size: 13px;
  font-weight: 950;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-copy small {
  overflow: hidden;
  color: #79847d;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-avatar {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  box-shadow:
    0 3px 8px rgba(19, 30, 27, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.agent-button:hover {
  border-color: #d9e3dd;
  background: rgba(255, 255, 255, 0.68);
}

.agent-button.active {
  border-color: rgba(12, 111, 99, 0.38);
  background: linear-gradient(90deg, rgba(11, 111, 99, 0.10), rgba(255, 255, 255, 0.70));
  box-shadow: inset 3px 0 0 #0b6f63;
}

.compact .agent-button {
  grid-template-columns: 30px minmax(0, 1fr);
  min-height: 40px;
}

.compact .mini-avatar {
  width: 25px;
  height: 25px;
}

#historyToggle {
  margin-top: 12px !important;
  color: #6c7771;
  font-size: 13px;
}

.history-list {
  gap: 3px;
}

.history-item {
  min-height: 34px;
  padding: 4px 6px;
  font-size: 12px;
}

.sidebar-bottom-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin: auto 0 0;
  padding: 9px;
  border-color: #e6dfd1;
  border-radius: 8px;
  background: linear-gradient(180deg, #fffefa, #fbf4e6);
  box-shadow: 0 8px 20px rgba(54, 43, 23, 0.06);
}

.sidebar-account {
  min-width: 0;
  min-height: 42px;
  justify-content: flex-start;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.sidebar-account svg:not(.account-chevron) {
  width: 32px;
  height: 32px;
  padding: 7px;
  border-radius: 999px;
  background: #0b2f2a;
  color: #d9b765;
  opacity: 1;
}

.sidebar-account::after {
  content: "";
  display: block;
  overflow: hidden;
  color: #17231f;
  font-size: 13px;
  font-weight: 950;
  line-height: 1.25;
  text-align: left;
  white-space: pre;
}

.account-page {
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 24px;
  min-height: 100vh;
}

.account-page-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.account-page-header h1 {
  margin: 0;
  font-size: 24px;
}

.back-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

.back-link:hover {
  color: var(--jade);
}

.account-page-body h3 {
  font-size: 15px;
  margin: 24px 0 12px;
}

.account-page-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.workspace-account {
  overflow-y: auto;
  padding: 0;
  grid-row: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.wa-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.wa-header h1 { margin: 0; font-size: 22px; }

.wa-body {
  max-width: 640px;
}

.wa-body h3 {
  font-size: 15px;
  margin: 24px 0 12px;
}

.wa-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.sidebar-admin-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-top: auto;
  text-align: left;
}
.sidebar-admin-btn::before { content: "⚙"; font-size: 14px; }
.sidebar-admin-btn:hover { border-color: var(--jade); background: color-mix(in srgb, var(--jade) 6%, var(--panel)); }

/* Polished bottom administrator account entry. */
.sidebar-admin-btn {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  margin-top: auto;
  padding: 9px 10px;
  border: 1px solid #eadfc9;
  border-radius: 9px;
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.98), rgba(252, 244, 229, 0.92)),
    #fffefa;
  color: #17231f;
  text-align: left;
  box-shadow: 0 10px 24px rgba(67, 49, 23, 0.07);
}

.sidebar-admin-btn::before {
  content: none;
}

.sidebar-admin-btn:hover {
  border-color: rgba(9, 116, 100, 0.34);
  background:
    linear-gradient(135deg, #fffefa, rgba(237, 248, 244, 0.95)),
    #fffefa;
}

.sidebar-admin-avatar {
  width: 40px;
  height: 40px;
  overflow: hidden;
  border: 1px solid rgba(214, 166, 72, 0.42);
  border-radius: 999px;
  background: #0b2f2a;
  box-shadow: 0 6px 14px rgba(20, 29, 26, 0.14);
}

.sidebar-admin-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-admin-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.sidebar-admin-copy strong,
.sidebar-admin-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-admin-copy strong {
  color: #17231f;
  font-size: 14px;
  font-weight: 950;
  line-height: 1;
}

.sidebar-admin-copy small {
  color: #a16f23;
  font-size: 11px;
  font-weight: 850;
}

.sidebar-admin-arrow {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: #63716b;
  font-size: 16px;
  line-height: 1;
}

body[data-theme="night"] .sidebar-admin-btn {
  border-color: #3a3427;
  background: #171b18;
}

body[data-theme="night"] .sidebar-admin-copy strong {
  color: #edf3ef;
}

.admin-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  margin-top: 4px;
}
.admin-entry:hover { border-color: var(--jade); background: color-mix(in srgb, var(--jade) 6%, var(--panel)); }
.admin-entry::before { content: "⚙"; font-size: 15px; }

.subscribe-sidebar-btn {
  min-width: 48px;
  min-height: 34px;
  align-self: center;
  border-radius: 7px;
  border: 1px solid rgba(12, 111, 99, 0.22);
  background: rgba(12, 111, 99, 0.08);
  color: #0a6a5f;
  font-size: 12px;
  font-weight: 900;
}

body[data-theme="night"] .sidebar {
  background: #111816;
}

body[data-theme="night"] .agent-copy strong {
  color: #edf3ef;
}

body[data-theme="night"] .agent-copy small,
body[data-theme="night"] #historyToggle {
  color: #97a49e;
}

body[data-theme="night"] .agent-button.active {
  background: rgba(66, 183, 163, 0.12);
}

/* Account center page opened from the lower-left administrator card. */
.account-dialog {
  position: fixed;
  inset: 0 0 0 212px;
  width: calc(100vw - 212px);
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  padding: 30px 34px;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.68) 180px),
    var(--bg);
  color: var(--ink);
  box-shadow: none;
}

.account-dialog::backdrop {
  background: transparent;
}

.account-page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.account-page-head h2 {
  margin: 0;
  color: #111b18;
  font-size: 30px;
  font-weight: 950;
  line-height: 1.1;
}

.account-page-head p {
  margin: 8px 0 0;
  color: #5f6d67;
  font-size: 16px;
  font-weight: 750;
}

.account-head-actions {
  display: flex;
  gap: 14px;
}

.account-upgrade,
.account-plan {
  min-width: 138px;
  min-height: 42px;
  border-radius: 8px;
  font-weight: 950;
}

.account-upgrade::before {
  content: "♛";
  margin-right: 8px;
  color: #f4c96d;
}

.account-plan {
  border: 1px solid rgba(9, 104, 93, 0.38);
  background: #fffefa;
  color: #12211d;
}

.account-close {
  opacity: 0.62;
}

.account-dashboard {
  display: grid;
  grid-template-columns: 1.05fr 1.2fr;
  gap: 20px;
  max-width: 1220px;
}

.account-panel,
.account-metric-card {
  border: 1px solid #dde5df;
  border-radius: 10px;
  background: rgba(255, 254, 251, 0.88);
  box-shadow: 0 8px 24px rgba(25, 36, 32, 0.05);
}

.account-panel {
  padding: 22px;
}

.account-panel h3 {
  margin: 0 0 18px;
  color: #18231f;
  font-size: 17px;
  font-weight: 950;
}

.account-profile-row {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  align-items: center;
  gap: 28px;
}

.account-profile-avatar {
  width: 120px;
  height: 120px;
  border: 2px solid rgba(207, 159, 64, 0.62);
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 10px 28px rgba(20, 29, 26, 0.16);
}

.account-name-line {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.account-name-line strong {
  color: #18231f;
  font-size: 24px;
  font-weight: 950;
}

.account-name-line span {
  padding: 4px 10px;
  border-radius: 6px;
  background: #fff0db;
  color: #bd7320;
  font-size: 12px;
  font-weight: 900;
}

.account-profile-meta dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.account-profile-meta dl div {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 8px;
  color: #53645e;
  font-size: 14px;
  font-weight: 750;
}

.account-profile-meta dt,
.account-profile-meta dd {
  margin: 0;
}

.account-profile-meta dt {
  color: #7c8983;
}

.account-ok-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 999px;
  background: #08836f;
}

.account-points-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 210px;
  overflow: hidden;
}

.account-points-panel span {
  display: block;
  margin: 18px 0 14px;
  color: #63716b;
  font-size: 15px;
  font-weight: 800;
}

.account-points-panel strong {
  display: block;
  color: #087466;
  font-size: 52px;
  font-weight: 950;
  line-height: 1;
}

.points-coin {
  position: relative;
  display: grid;
  place-items: center;
  width: 180px;
  height: 150px;
}

.points-coin::before {
  content: "";
  position: absolute;
  bottom: 18px;
  width: 140px;
  height: 34px;
  border-radius: 999px;
  background: rgba(13, 137, 114, 0.16);
}

.points-coin span {
  display: grid;
  place-items: center;
  width: 108px;
  height: 108px;
  margin: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #b9ead6, #5dc192);
  color: #fff;
  font-size: 48px;
  box-shadow: 0 18px 36px rgba(20, 126, 95, 0.22);
}

.account-metric-card {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 108px;
  padding: 20px;
}

.metric-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: rgba(9, 124, 105, 0.10);
  color: #087466;
  font-weight: 950;
}

.metric-icon.orange {
  background: rgba(235, 137, 32, 0.12);
  color: #e17a17;
}

.metric-icon.green {
  background: rgba(9, 124, 105, 0.10);
  color: #087466;
}

.account-metric-card span:not(.metric-icon) {
  display: block;
  color: #53645e;
  font-size: 14px;
  font-weight: 800;
}

.account-metric-card strong {
  display: block;
  margin-top: 8px;
  color: #17231f;
  font-size: 26px;
  font-weight: 950;
}

.account-security-panel {
  min-height: 250px;
}

.account-security-action {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 70px;
  padding: 12px;
  border: 1px solid #e1e7e2;
  border-radius: 8px;
  background: #fffefa;
  color: #17231f;
  text-align: left;
}

.account-security-action + .account-security-action {
  margin-top: 10px;
}

.account-security-action strong,
.account-security-action small {
  display: block;
}

.account-security-action strong {
  font-size: 15px;
  font-weight: 950;
}

.account-security-action small {
  margin-top: 5px;
  color: #7a8780;
  font-size: 12px;
  font-weight: 750;
}

.account-security-action em {
  color: #7b8982;
  font-style: normal;
  font-size: 26px;
}

.account-rules-panel {
  min-height: 250px;
}

.account-rule-list {
  overflow: hidden;
  border: 1px solid #e3e9e4;
  border-radius: 9px;
}

.account-rule-list > div {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  background: #fffefa;
}

.account-rule-list > div + div {
  border-top: 1px solid #e7ece8;
}

.rule-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(9, 124, 105, 0.12);
  color: #087466;
  font-size: 13px;
  font-weight: 950;
}

.rule-icon.blue {
  background: rgba(51, 133, 214, 0.12);
  color: #2478c8;
}

.rule-icon.purple {
  background: rgba(130, 77, 206, 0.12);
  color: #7d4dcc;
}

.account-rule-list p {
  margin: 0;
}

.account-rule-list strong,
.account-rule-list small {
  display: block;
}

.account-rule-list strong {
  color: #17231f;
  font-size: 14px;
  font-weight: 950;
}

.account-rule-list small {
  margin-top: 5px;
  color: #68756f;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.55;
}

@media (max-width: 1180px) {
  .account-dialog {
    inset: 0;
    width: 100vw;
    padding: 22px;
  }

  .account-dashboard {
    grid-template-columns: 1fr;
  }
}

/* Cleaner account center layout, same functions with a calmer enterprise composition. */
.account-dialog {
  overflow: auto;
  padding: 28px 36px 34px;
}

.account-page-head-v2 {
  max-width: 1180px;
  margin: 0 auto 18px;
}

.account-page-head-v2 h2 {
  font-size: 28px;
}

.account-page-head-v2 p {
  margin-top: 7px;
  font-size: 15px;
}

.account-dashboard-v2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto;
}

.account-overview-card {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(310px, 0.75fr);
  gap: 18px;
  padding: 22px;
  border: 1px solid #dfe6e1;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(249, 247, 239, 0.92)),
    #fffefb;
  box-shadow: 0 14px 34px rgba(25, 36, 32, 0.07);
}

.account-profile-compact {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  min-width: 0;
}

.account-profile-compact .account-profile-avatar {
  width: 104px;
  height: 104px;
}

.account-profile-compact p {
  margin: 8px 0 12px;
  color: #5c6963;
  font-size: 14px;
  font-weight: 800;
}

.account-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.account-status-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid #e5ebe6;
  border-radius: 999px;
  background: #fbfcf9;
  color: #65736c;
  font-size: 12px;
  font-weight: 800;
}

.account-credit-compact {
  display: grid;
  align-content: center;
  min-height: 144px;
  padding: 22px;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(7, 91, 80, 0.96), rgba(12, 119, 101, 0.90)),
    #075b50;
  color: #fff;
}

.account-credit-compact span {
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  font-weight: 850;
}

.account-credit-compact strong {
  margin-top: 10px;
  color: #fff;
  font-size: 36px;
  font-weight: 950;
  line-height: 1;
}

.account-credit-bar {
  height: 7px;
  margin: 18px 0 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.account-credit-bar em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #e9c66d, #fff4c8);
}

.account-credit-compact small {
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 750;
}

.account-metrics-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.account-metrics-row .account-metric-card {
  min-height: 92px;
  padding: 18px;
  border-radius: 10px;
}

.account-lower-grid {
  display: grid;
  grid-template-columns: minmax(340px, 0.8fr) minmax(0, 1.2fr);
  gap: 16px;
}

.account-lower-grid .account-panel {
  border-radius: 12px;
  background: rgba(255, 254, 251, 0.92);
}

.account-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.account-section-head h3 {
  margin: 0;
}

.account-section-head span {
  color: #7b8781;
  font-size: 12px;
  font-weight: 750;
}

.account-security-panel,
.account-rules-panel {
  min-height: 0;
}

.account-security-action {
  min-height: 66px;
  background: #fffdfa;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.account-security-action:hover {
  border-color: rgba(9, 116, 100, 0.35);
  background: #fbfffc;
  transform: translateY(-1px);
}

.account-rule-list {
  border: 0;
  border-radius: 0;
  display: grid;
  gap: 10px;
}

.account-rule-list > div {
  border: 1px solid #e5ebe6;
  border-radius: 10px;
}

.account-rule-list > div + div {
  border-top: 1px solid #e5ebe6;
}

@media (max-width: 1180px) {
  .account-overview-card,
  .account-lower-grid,
  .account-metrics-row {
    grid-template-columns: 1fr;
  }
}

/* Subscription and service center opened from account center. */
.subscription-page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  width: min(100%, 1480px);
  margin: 0 auto 22px;
}

.subscription-page-head h2 {
  margin: 0;
  color: #111b18;
  font-size: clamp(30px, 2.15vw, 42px);
  font-weight: 950;
  line-height: 1.1;
}

.subscription-page-head p {
  margin: 7px 0 0;
  color: #5f6d67;
  font-size: clamp(15px, 1.05vw, 18px);
  font-weight: 750;
}

.subscription-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  width: min(100%, 1480px);
  margin: 0 auto;
}

.subscription-main {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.subscription-side {
  display: grid;
  align-content: start;
  gap: 18px;
}

.subscription-panel {
  border: 1px solid #dde5df;
  border-radius: 12px;
  background: rgba(255, 254, 251, 0.92);
  box-shadow: 0 10px 28px rgba(25, 36, 32, 0.06);
  padding: 22px;
}

.subscription-section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.subscription-section-head h3,
.subscription-panel h3 {
  margin: 0;
  color: #17231f;
  font-size: 21px;
  font-weight: 950;
}

.subscription-section-head p {
  margin: 6px 0 0;
  color: #6a7771;
  font-size: 14px;
  font-weight: 750;
}

.membership-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.membership-card {
  position: relative;
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 18px 20px;
  padding: 24px;
  border: 1px solid #dfe6e1;
  border-radius: 11px;
  background: #fffefa;
  overflow: hidden;
}

.membership-card.recommended {
  border-color: rgba(218, 154, 52, 0.62);
  box-shadow: 0 12px 28px rgba(151, 103, 28, 0.08);
}

.recommend-ribbon {
  position: absolute;
  top: 0;
  right: 0;
  padding: 7px 18px;
  transform: translate(28%, 18%) rotate(45deg);
  transform-origin: center;
  background: #d99632;
  color: #fff;
  font-size: 12px;
  font-weight: 950;
}

.plan-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 9px;
  background: linear-gradient(135deg, #006b5f, #0b856f);
  color: #f3d57f;
  font-size: 24px;
  font-weight: 950;
}

.plan-icon.gold {
  background: linear-gradient(135deg, #d99a34, #b8761d);
  color: #fff7d4;
}

.membership-card h4 {
  margin: 0 0 7px;
  color: #17231f;
  font-size: 18px;
  font-weight: 950;
}

.plan-price {
  color: #111b18;
  font-size: 31px;
  font-weight: 950;
}

.plan-price span,
.plan-price em {
  font-size: 15px;
  font-style: normal;
  font-weight: 850;
}

.membership-card small {
  display: inline-block;
  margin-top: 7px;
  padding: 4px 10px;
  border-radius: 6px;
  background: #f5efe5;
  color: #b8741f;
  font-size: 12px;
  font-weight: 850;
}

.plan-credit-note {
  margin: 9px 0 0;
  color: #087466;
  font-size: 13px;
  font-weight: 950;
}

.membership-card ul {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 22px;
  margin: 10px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid #e6ebe7;
  list-style: none;
}

.membership-card li {
  color: #42504a;
  font-size: 13px;
  font-weight: 800;
}

.membership-card li::before {
  content: "✓";
  margin-right: 8px;
  color: #087466;
  font-weight: 950;
}

.membership-card .primary-button {
  grid-column: 1 / -1;
  min-height: 40px;
  margin-top: 8px;
}

.credit-package-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.credit-package {
  display: grid;
  gap: 5px;
  align-content: center;
  min-height: 108px;
  padding: 16px;
  border: 1px solid #e1e7e2;
  border-radius: 9px;
  background: #fffefa;
  color: #17231f;
  text-align: left;
}

.credit-package.selected {
  border-color: rgba(8, 116, 101, 0.66);
  box-shadow: inset 0 0 0 1px rgba(8, 116, 101, 0.30);
}

.credit-package strong {
  font-size: 21px;
  font-weight: 950;
}

.credit-package span,
.credit-package small {
  color: #64716b;
  font-size: 12px;
  font-weight: 800;
}

.credit-package em {
  color: #17231f;
  font-size: 19px;
  font-style: normal;
  font-weight: 950;
}

.custom-recharge-row {
  display: grid;
  grid-template-columns: auto minmax(160px, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.custom-recharge-row span {
  color: #17231f;
  font-weight: 900;
}

.custom-recharge-row input {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid #dfe6e1;
  border-radius: 8px;
  background: #fffefa;
}

.usage-rule-table {
  overflow: hidden;
  border: 1px solid #e2e8e3;
  border-radius: 9px;
}

.usage-rule-table > div {
  display: grid;
  grid-template-columns: 1fr 1.45fr 1fr 1fr;
}

.usage-rule-table span,
.usage-rule-table strong {
  padding: 12px 14px;
  border-right: 1px solid #e8ede9;
  border-bottom: 1px solid #e8ede9;
  color: #42504a;
  font-size: 13px;
  font-weight: 800;
}

.usage-rule-table strong {
  color: #087466;
}

.usage-rule-table .table-head span {
  background: #f7f8f4;
  color: #17231f;
  font-weight: 950;
}

.subscription-tip {
  margin: 12px 0 0;
  color: #6d7a73;
  font-size: 12px;
  font-weight: 750;
}

.side-account-item {
  padding: 18px 0;
  border-bottom: 1px solid #e7ede8;
}

.side-account-item span,
.side-account-item small {
  display: block;
  color: #707d76;
  font-size: 13px;
  font-weight: 800;
}

.side-account-item strong {
  display: block;
  margin-top: 8px;
  color: #d08a29;
  font-size: 20px;
  font-weight: 950;
}

.service-card {
  background: linear-gradient(135deg, #fffefa, #f4fbf8);
}

.service-card p {
  margin: 12px 0 0;
  color: #5f6d67;
  font-size: 14px;
  font-weight: 800;
}

@media (max-width: 1180px) {
  .subscription-dashboard,
  .membership-grid,
  .credit-package-grid {
    grid-template-columns: 1fr;
  }

  .membership-card ul,
  .usage-rule-table > div,
  .custom-recharge-row {
    grid-template-columns: 1fr;
  }
}

/* Password center page opened from account center. */
.password-page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  width: min(100%, 1480px);
  margin: 0 auto 34px;
}

.password-page-head h2 {
  margin: 0;
  color: #111b18;
  font-size: clamp(30px, 2.15vw, 42px);
  font-weight: 950;
  line-height: 1.1;
}

.password-page-head p {
  margin: 7px 0 0;
  color: #5f6d67;
  font-size: clamp(15px, 1.05vw, 18px);
  font-weight: 750;
}

.password-center-card {
  display: grid;
  grid-template-columns: minmax(260px, 0.34fr) minmax(0, 0.66fr);
  width: min(100%, 1480px);
  min-height: min(680px, calc(100vh - 170px));
  margin: 0 auto;
  border: 1px solid #dce4df;
  border-radius: 14px;
  background: rgba(255, 254, 251, 0.90);
  box-shadow: 0 16px 40px rgba(25, 36, 32, 0.06);
  overflow: hidden;
}

.password-security-side {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 14px;
  padding: 44px;
  border-right: 1px solid #e1e8e3;
  background:
    radial-gradient(circle at 50% 36%, rgba(9, 125, 105, 0.10), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.70), rgba(247, 250, 246, 0.72));
  text-align: center;
}

.security-shield {
  display: grid;
  place-items: center;
  width: 148px;
  height: 148px;
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.90), rgba(232, 247, 241, 0.62)),
    #eff8f5;
  box-shadow: 0 18px 50px rgba(9, 125, 105, 0.10);
}

.security-shield span {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 24px;
  background: linear-gradient(135deg, #0b7a68, #075c50);
  color: #e7c870;
  font-size: 40px;
  box-shadow: 0 14px 32px rgba(8, 106, 92, 0.24);
}

.password-security-side p,
.password-security-side small {
  margin: 0;
  color: #68766f;
  font-size: 14px;
  font-weight: 800;
}

.password-security-side strong {
  color: #087466;
  font-size: 32px;
  font-weight: 950;
}

.password-security-side time {
  color: #32413b;
  font-size: 17px;
  font-weight: 800;
}

.password-center-form {
  display: grid;
  align-content: center;
  gap: 22px;
  padding: clamp(44px, 5vw, 76px);
}

.password-form-title h3 {
  margin: 0;
  color: #111b18;
  font-size: 28px;
  font-weight: 950;
}

.password-form-title p {
  margin: 9px 0 0;
  color: #63716b;
  font-size: 16px;
  font-weight: 750;
}

.password-center-form label {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  color: #111b18;
  font-size: 16px;
  font-weight: 950;
}

.password-input-wrap {
  position: relative;
}

.password-input-wrap input {
  width: 100%;
  min-height: 54px;
  padding: 12px 48px 12px 20px;
  border: 1px solid #dce4df;
  border-radius: 9px;
  background: #fffefa;
  color: #17231f;
  font-size: 15px;
  font-weight: 750;
  outline: none;
}

.password-input-wrap input:focus {
  border-color: rgba(8, 116, 101, 0.55);
  box-shadow: 0 0 0 3px rgba(8, 116, 101, 0.08);
}

.password-eye {
  position: absolute;
  right: 12px;
  top: 50%;
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: #7b8781;
  transform: translateY(-50%);
}

.password-strength-row {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 24px;
  color: #53645e;
  font-size: 14px;
  font-weight: 850;
}

.password-strength {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.password-strength em,
.password-strength i {
  height: 7px;
  border-radius: 999px;
}

.password-strength em,
.password-strength i {
  background: #e7e9e7;
}

.password-strength[data-level="1"] em:first-child,
.password-strength[data-level="2"] em,
.password-strength[data-level="3"] em,
.password-strength[data-level="3"] i:first-of-type,
.password-strength[data-level="4"] em,
.password-strength[data-level="4"] i {
  background: linear-gradient(90deg, #e89a22, #f0b23c);
}

.password-strength.strong[data-level="4"] em,
.password-strength.strong[data-level="4"] i {
  background: linear-gradient(90deg, #087466, #2fb896);
}

.password-strength-row strong {
  color: #e29418;
  font-size: 16px;
  font-weight: 950;
}

.password-tip {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-left: 142px;
  padding: 14px 16px;
  border: 1px solid rgba(8, 116, 101, 0.16);
  border-radius: 9px;
  background: rgba(8, 116, 101, 0.04);
  color: #53645e;
}

.password-tip span {
  color: #087466;
  font-size: 20px;
  font-weight: 950;
}

.password-tip p {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
}

.password-actions {
  display: grid;
  grid-template-columns: 220px 220px;
  gap: 22px;
  margin: 20px 0 0 142px;
}

.password-actions .primary-button,
.password-actions .ghost-button {
  min-height: 54px;
  border-radius: 9px;
  font-size: 16px;
  font-weight: 950;
}

.password-center-status {
  margin: 8px 0 0 142px;
  color: #6a7771;
  font-size: 13px;
  font-weight: 750;
}

.password-center-status.ok {
  color: #087466;
}

.password-center-status.error {
  color: #b6463b;
}

@media (max-width: 1180px) {
  .password-center-card {
    grid-template-columns: 1fr;
  }

  .password-security-side {
    border-right: 0;
    border-bottom: 1px solid #e1e8e3;
  }

  .password-center-form label,
  .password-strength-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .password-tip,
  .password-actions,
  .password-center-status {
    margin-left: 0;
  }

  .password-actions {
    grid-template-columns: 1fr;
  }
}

/* Scale the account center up responsively without changing its inner elements. */
.account-dialog {
  padding: clamp(28px, 3.2vw, 48px);
}

.account-page-head-v2,
.account-dashboard-v2 {
  width: min(100%, 1480px);
  max-width: 1480px;
}

.account-page-head-v2 {
  margin-bottom: clamp(20px, 2vw, 30px);
}

.account-page-head-v2 h2 {
  font-size: clamp(30px, 2.15vw, 42px);
}

.account-page-head-v2 p {
  font-size: clamp(15px, 1.05vw, 18px);
}

.account-dashboard-v2 {
  gap: clamp(18px, 1.4vw, 26px);
}

.account-overview-card {
  grid-template-columns: minmax(0, 1.28fr) minmax(360px, 0.72fr);
  gap: clamp(20px, 1.6vw, 30px);
  padding: clamp(24px, 2vw, 34px);
}

.account-profile-compact {
  grid-template-columns: clamp(118px, 8vw, 148px) minmax(0, 1fr);
  gap: clamp(22px, 1.8vw, 34px);
}

.account-profile-compact .account-profile-avatar {
  width: clamp(112px, 7.5vw, 140px);
  height: clamp(112px, 7.5vw, 140px);
}

.account-name-line strong {
  font-size: clamp(25px, 1.75vw, 34px);
}

.account-profile-compact p,
.account-profile-meta dl div {
  font-size: clamp(14px, 0.95vw, 17px);
}

.account-status-row span {
  min-height: 32px;
  padding: 0 12px;
  font-size: clamp(12px, 0.82vw, 14px);
}

.account-credit-compact {
  min-height: clamp(170px, 12vw, 230px);
  padding: clamp(24px, 2vw, 34px);
}

.account-credit-compact span {
  font-size: clamp(14px, 0.95vw, 17px);
}

.account-credit-compact strong {
  font-size: clamp(42px, 3.2vw, 64px);
}

.account-credit-compact small {
  font-size: clamp(12px, 0.85vw, 15px);
}

.account-metrics-row {
  gap: clamp(14px, 1.2vw, 22px);
}

.account-metrics-row .account-metric-card {
  min-height: clamp(104px, 7.6vw, 140px);
  padding: clamp(20px, 1.6vw, 28px);
}

.metric-icon {
  width: clamp(50px, 3.8vw, 64px);
  height: clamp(50px, 3.8vw, 64px);
  font-size: clamp(16px, 1.2vw, 20px);
}

.account-metric-card span:not(.metric-icon) {
  font-size: clamp(14px, 0.9vw, 16px);
}

.account-metric-card strong {
  font-size: clamp(28px, 2vw, 38px);
}

.account-lower-grid {
  grid-template-columns: minmax(420px, 0.84fr) minmax(0, 1.16fr);
  gap: clamp(18px, 1.4vw, 26px);
}

.account-lower-grid .account-panel {
  padding: clamp(24px, 1.8vw, 32px);
}

.account-section-head h3,
.account-panel h3 {
  font-size: clamp(18px, 1.2vw, 22px);
}

.account-section-head span,
.account-security-action small,
.account-rule-list small {
  font-size: clamp(12px, 0.85vw, 14px);
}

.account-security-action {
  min-height: clamp(72px, 5.4vw, 96px);
  padding: clamp(14px, 1.2vw, 20px);
}

.account-security-action strong,
.account-rule-list strong {
  font-size: clamp(15px, 1vw, 18px);
}

.account-rule-list {
  gap: clamp(10px, 0.9vw, 16px);
}

.account-rule-list > div {
  padding: clamp(15px, 1.2vw, 22px);
}

.rule-icon {
  width: clamp(38px, 3vw, 50px);
  height: clamp(38px, 3vw, 50px);
  font-size: clamp(13px, 0.95vw, 16px);
}

@media (max-width: 1180px) {
  .account-overview-card {
    grid-template-columns: 1fr;
  }

  .account-lower-grid {
    grid-template-columns: 1fr;
  }
}

.auth-screen {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; padding: 24px;
  background: var(--bg);
}
.auth-card {
  width: min(400px, 100%); padding: 40px 36px;
  border: 1px solid var(--line); border-radius: 16px;
  background: var(--panel); box-shadow: var(--shadow);
  text-align: center;
}
.auth-logo { width: 170px; height: 48px; object-fit: contain; margin-bottom: 32px; }
.auth-card h1 { margin: 0 0 8px; font-size: 26px; color: var(--ink); }
.auth-card > p { margin: 0 0 28px; color: var(--muted); font-size: 14px; }
.auth-form { display: grid; gap: 16px; }
.auth-field {
  display: flex; align-items: center; gap: 12px;
  border: 1.5px solid var(--line); border-radius: 10px;
  padding: 0 14px; background: var(--panel);
  transition: border-color .15s;
}
.auth-field:focus-within { border-color: var(--jade); }
.auth-field-icon { font-size: 18px; opacity: .6; }
.auth-field,
.auth-field input {
  background: var(--panel) !important;
}
.auth-field input {
  flex: 1; min-height: 48px; border: none; outline: none;
  color: var(--ink); font-size: 15px;
}
.auth-field input::placeholder { color: var(--muted); }
.auth-options { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.auth-remember { color: var(--muted); cursor: pointer; display: flex; align-items: center; gap: 4px; }
.auth-remember input { accent-color: var(--jade); }
.auth-link { border: none; background: none; color: var(--jade); font-size: 13px; cursor: pointer; }
.auth-submit { min-height: 48px; font-size: 16px; font-weight: 700; border-radius: 10px; width: 100%; }
.auth-status { font-size: 13px; color: var(--danger); min-height: 20px; }
.auth-footer { margin-top: 20px; font-size: 13px; color: var(--muted); }
.auth-terms { font-size: 12px; color: var(--muted); margin: 12px 0 0; text-align: center; cursor: pointer; display: flex; align-items: flex-start; justify-content: center; gap: 4px; }
.auth-terms input { accent-color: var(--jade); margin-top: 2px; }
.auth-terms .auth-link { font-size: 12px; }
.auth-field input:-webkit-autofill,
.auth-field input:-webkit-autofill:hover,
.auth-field input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 30px var(--panel) inset !important;
  -webkit-text-fill-color: var(--ink) !important;
}

.video-options-panel { display: flex; gap: 8px; padding: 6px 0; }
.video-pill { display: flex; align-items: center; gap: 4px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); font-size: 12px; color: var(--ink-2); }
.video-pill select { border: 1px solid var(--line); background: var(--panel); font-size: 12px; color: var(--ink); cursor: pointer; outline: none; border-radius: 14px; padding: 3px 8px; }

.vop-row { display: flex; gap: 8px; align-items: center; padding: 4px 0; }
.vop-img-btn { flex: 1; min-height: 34px; border: 1px dashed var(--line); border-radius: 10px; background: var(--panel); color: var(--ink-2); font-size: 13px; cursor: pointer; }
.vop-img-btn:hover { border-color: var(--jade); color: var(--jade); }
.vop-select { min-height: 32px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); font-size: 12px; color: var(--ink); cursor: pointer; }
.vop-toggle { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.vop-tog { padding: 4px 10px; border: none; border-right: 1px solid var(--line); background: var(--panel); font-size: 12px; color: var(--ink-2); cursor: pointer; }
.vop-tog:last-child { border-right: none; }
.vop-tog.active { background: var(--jade); color: #fff; }

body.video-agent-mode .composer {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 190px;
  padding: 16px 16px 60px;
  overflow: visible;
  border: 1px solid rgba(15, 105, 96, 0.13);
  border-radius: 22px;
  background:
    radial-gradient(circle at 58% 0%, rgba(103, 89, 226, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(252, 253, 251, 0.94));
  box-shadow: 0 18px 46px rgba(27, 40, 36, 0.09);
}

body.video-agent-mode .composer > .composer-tools {
  display: none;
}

body.video-agent-mode #videoOptionsPanel:not([hidden]) {
  display: contents;
}

body.video-agent-mode .video-frame-row {
  order: 1;
  display: flex;
  align-items: stretch;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
}

body.video-agent-mode .video-frame-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 84px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  color: #1f2a27;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(20, 32, 29, 0.05);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

body.video-agent-mode .video-frame-card:hover,
body.video-agent-mode .video-frame-card.has-file {
  border-color: rgba(9, 116, 101, 0.38);
  box-shadow: 0 12px 28px rgba(9, 116, 101, 0.12);
}

body.video-agent-mode .video-frame-card:hover {
  transform: translateY(-1px);
}

body.video-agent-mode .video-frame-card.is-disabled,
body.video-agent-mode .video-music-toggle.is-disabled {
  opacity: 0.58;
  cursor: not-allowed;
  filter: grayscale(0.18);
}

body.video-agent-mode .video-frame-card.is-disabled:hover {
  border-color: transparent;
  box-shadow: 0 8px 22px rgba(20, 32, 29, 0.05);
  transform: none;
}

body.video-agent-mode .video-frame-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: rgba(244, 247, 246, 0.9);
  color: #5c6763;
}

body.video-agent-mode .video-frame-card.has-file .video-frame-icon {
  background: rgba(9, 116, 101, 0.12);
  color: var(--jade);
}

body.video-agent-mode .video-frame-text {
  display: grid;
  gap: 3px;
  min-width: 0;
  text-align: left;
}

body.video-agent-mode .video-frame-text strong {
  overflow: hidden;
  color: #27312e;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.video-agent-mode .video-frame-text small {
  color: #8a958f;
  font-size: 11px;
}

body.video-agent-mode .video-frame-plus {
  align-self: center;
  color: rgba(101, 114, 108, 0.42);
  font-size: 17px;
  font-weight: 300;
}

body.video-agent-mode .composer textarea {
  order: 2;
  height: 54px;
  min-height: 54px;
  max-height: 72px;
  margin: 12px 0 8px;
  padding: 2px 146px 2px 20px;
  resize: none;
  color: #16211e;
  font-size: 14px;
  line-height: 1.7;
}

body.video-agent-mode .composer textarea::placeholder {
  color: #909a95;
}

body.video-agent-mode .video-control-bar {
  position: absolute;
  left: 16px;
  right: 154px;
  bottom: 14px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding-right: 0;
  overflow: visible;
}

body.video-agent-mode .video-select-wrap {
  position: relative;
}

body.video-agent-mode .video-control-pill,
body.video-agent-mode .video-music-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border: 1px solid #e7ece8;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #1e2926;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(25, 34, 31, 0.04);
}

body.video-agent-mode .video-control-pill {
  min-width: 46px;
  padding: 0 11px;
}

body.video-agent-mode .video-resolution-pill {
  min-width: 82px;
}

body.video-agent-mode .video-control-pill:hover,
body.video-agent-mode .video-select-wrap.open .video-control-pill,
body.video-agent-mode .video-music-toggle:hover {
  border-color: rgba(9, 116, 101, 0.36);
  color: var(--jade);
}

body.video-agent-mode .video-music-toggle {
  gap: 7px;
  padding: 0 10px 0 6px;
}

body.video-agent-mode .video-switch {
  position: relative;
  width: 26px;
  height: 16px;
  border-radius: 999px;
  background: #dfe5e1;
  transition: background 0.16s ease;
}

body.video-agent-mode .video-switch i {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  transition: transform 0.16s ease;
}

body.video-agent-mode .video-music-toggle.active .video-switch {
  background: var(--jade);
}

body.video-agent-mode .video-music-toggle.active .video-switch i {
  transform: translateX(10px);
}

body.video-agent-mode .video-music-toggle.is-disabled:hover {
  border-color: #e7ece8;
  color: #1e2926;
}

body.video-agent-mode .video-music-toggle.is-disabled .video-switch {
  background: #e8ece9;
}

body.video-agent-mode .video-popover {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  z-index: 50;
  border: 1px solid rgba(220, 227, 221, 0.95);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 22px 54px rgba(22, 31, 29, 0.16);
  backdrop-filter: blur(20px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

body.video-agent-mode .video-select-wrap.open .video-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

body.video-agent-mode .video-ratio-popover {
  width: min(210px, calc(100vw - 42px));
  padding: 13px;
}

body.video-agent-mode .video-resolution-popover {
  width: 184px;
  padding: 12px;
}

body.video-agent-mode .video-popover-title {
  margin: 0 0 10px;
  color: #27312e;
  font-size: 13px;
  font-weight: 800;
}

body.video-agent-mode .video-popover-title.resolution-title {
  margin-top: 14px;
}

body.video-agent-mode .video-ratio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

body.video-agent-mode .video-ratio-option {
  display: grid;
  place-items: center;
  gap: 7px;
  min-height: 66px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #6e7974;
  font-size: 12px;
  cursor: pointer;
}

body.video-agent-mode .video-ratio-option:hover,
body.video-agent-mode .video-ratio-option.active {
  background: #f3f5f3;
  color: #1d2925;
}

body.video-agent-mode .video-ratio-option.active {
  box-shadow: inset 0 0 0 1px rgba(9, 116, 101, 0.18);
}

body.video-agent-mode .video-ratio-shape {
  display: block;
  width: var(--ratio-w);
  height: var(--ratio-h);
  min-width: 8px;
  min-height: 8px;
  border: 2px solid currentColor;
  border-radius: 5px;
}

body.video-agent-mode .video-resolution-segment {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

body.video-agent-mode .video-resolution-segment button {
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: #f3f4f3;
  color: #8b948f;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

body.video-agent-mode .video-resolution-segment button.active {
  border-color: rgba(7, 116, 102, 0.24);
  background: linear-gradient(180deg, #ffffff, #e9ece9);
  color: #1a2522;
  box-shadow: 0 8px 22px rgba(18, 28, 25, 0.12);
}

body.video-agent-mode .video-duration-popover {
  width: 68px;
  max-height: 362px;
  padding: 7px;
  overflow: auto;
}

body.video-agent-mode .video-duration-popover button {
  display: block;
  width: 100%;
  min-height: 30px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #4f5a56;
  font-size: 12px;
  cursor: pointer;
}

body.video-agent-mode .video-duration-popover button:hover,
body.video-agent-mode .video-duration-popover button.active {
  background: #f1f3f1;
  color: #151f1c;
  font-weight: 800;
}

body.video-agent-mode .composer-footer {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  margin: 0;
}

body.video-agent-mode #quickPrompts {
  display: none;
}

body.video-agent-mode .send-group {
  gap: 8px;
}

body.video-agent-mode #voiceComposerBtn,
body.video-agent-mode #refinePromptBtn {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #1f2926;
}

body.video-agent-mode #voiceComposerBtn {
  order: 1;
}

body.video-agent-mode #refinePromptBtn {
  order: 2;
  font-size: 16px;
}

body.video-agent-mode .send-button {
  order: 3;
}

body.video-agent-mode #voiceComposerBtn:hover,
body.video-agent-mode #refinePromptBtn:hover {
  background: #f3f5f3;
  color: var(--jade);
}

body.video-agent-mode .send-button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #171b1f;
  color: #fff;
}

body[data-theme="night"].video-agent-mode .composer {
  border-color: rgba(108, 122, 188, 0.24);
  background:
    radial-gradient(circle at 58% 0%, rgba(115, 96, 255, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(13, 18, 24, 0.97), rgba(9, 13, 18, 0.94));
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.32);
}

body[data-theme="night"].video-agent-mode .video-frame-card,
body[data-theme="night"].video-agent-mode .video-control-pill,
body[data-theme="night"].video-agent-mode .video-music-toggle,
body[data-theme="night"].video-agent-mode .video-popover {
  border-color: rgba(92, 104, 128, 0.42);
  background: rgba(18, 24, 31, 0.92);
  color: #d9e2df;
}

body[data-theme="night"].video-agent-mode .video-frame-icon,
body[data-theme="night"].video-agent-mode .video-ratio-option:hover,
body[data-theme="night"].video-agent-mode .video-ratio-option.active,
body[data-theme="night"].video-agent-mode .video-duration-popover button:hover,
body[data-theme="night"].video-agent-mode .video-duration-popover button.active {
  background: rgba(255, 255, 255, 0.08);
}

body[data-theme="night"].video-agent-mode .video-frame-text strong,
body[data-theme="night"].video-agent-mode .video-popover-title,
body[data-theme="night"].video-agent-mode .composer textarea {
  color: #eef5f2;
}

body[data-theme="night"].video-agent-mode .video-frame-text small,
body[data-theme="night"].video-agent-mode .video-ratio-option,
body[data-theme="night"].video-agent-mode .video-duration-popover button,
body[data-theme="night"].video-agent-mode .composer textarea::placeholder {
  color: #8f9b96;
}

body[data-theme="night"].video-agent-mode .video-resolution-segment button {
  background: rgba(255, 255, 255, 0.07);
  color: #9da9a6;
}

body[data-theme="night"].video-agent-mode .video-resolution-segment button.active {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.07));
  color: #f4faf7;
}

body[data-theme="night"].video-agent-mode #voiceComposerBtn,
body[data-theme="night"].video-agent-mode #refinePromptBtn {
  color: #d9e2df;
}

body[data-theme="night"].video-agent-mode #voiceComposerBtn:hover,
body[data-theme="night"].video-agent-mode #refinePromptBtn:hover {
  background: rgba(255, 255, 255, 0.08);
}

body[data-theme="night"].video-agent-mode .send-button {
  background: #f4f7f5;
  color: #11191f;
}

@media (max-width: 760px) {
  body.video-agent-mode .composer {
    min-height: 210px;
    padding-bottom: 72px;
  }

  body.video-agent-mode .video-frame-row {
    width: 100%;
  }

  body.video-agent-mode .video-frame-card {
    flex: 1;
    min-width: 0;
  }

  body.video-agent-mode .composer textarea {
    padding-right: 0;
  }

  body.video-agent-mode .video-control-bar {
    flex-wrap: wrap;
    right: 16px;
    bottom: 68px;
    padding-right: 0;
  }

  body.video-agent-mode .composer-footer {
    right: 16px;
    bottom: 16px;
  }

  body.video-agent-mode .video-ratio-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

body:not(.video-agent-mode) .composer {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 172px;
  padding: 16px 16px 58px;
  overflow: visible;
  border: 1px solid rgba(15, 105, 96, 0.12);
  border-radius: 22px;
  background:
    radial-gradient(circle at 60% 0%, rgba(13, 107, 95, 0.07), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(252, 253, 251, 0.94));
  box-shadow: 0 18px 46px rgba(27, 40, 36, 0.09);
  backdrop-filter: blur(18px);
}

body:not(.video-agent-mode) .composer-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
}

body:not(.video-agent-mode) .tool-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: #58635f;
  box-shadow: 0 8px 22px rgba(20, 32, 29, 0.05);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease, color 0.16s ease;
}

body:not(.video-agent-mode) .tool-button:hover {
  border-color: rgba(9, 116, 101, 0.34);
  color: var(--jade);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(9, 116, 101, 0.12);
}

body:not(.video-agent-mode) .attachment-label {
  max-width: min(420px, 58vw);
  overflow: hidden;
  color: #728078;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.video-agent-mode) .composer textarea {
  height: 58px;
  min-height: 58px;
  max-height: 92px;
  margin: 12px 0 8px;
  padding: 2px 148px 2px 8px;
  resize: none;
  color: #16211e;
  font-size: 14px;
  line-height: 1.7;
}

body:not(.video-agent-mode) .composer textarea::placeholder {
  color: #909a95;
}

body:not(.video-agent-mode) .composer-footer {
  position: absolute;
  left: 16px;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
}

body:not(.video-agent-mode) .quick-prompts {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}

body:not(.video-agent-mode) .quick-prompt {
  min-height: 28px;
  max-width: 220px;
  padding: 0 12px;
  overflow: hidden;
  border: 1px solid #e7ece8;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #4f5b56;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(25, 34, 31, 0.04);
}

body:not(.video-agent-mode) .quick-prompt:hover {
  border-color: rgba(9, 116, 101, 0.34);
  color: var(--jade);
}

body:not(.video-agent-mode) .send-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

body:not(.video-agent-mode) #voiceComposerBtn,
body:not(.video-agent-mode) #refinePromptBtn {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #1f2926;
}

body:not(.video-agent-mode) #voiceComposerBtn {
  order: 1;
}

body:not(.video-agent-mode) #refinePromptBtn {
  order: 2;
  font-size: 16px;
}

body:not(.video-agent-mode) .send-button {
  order: 3;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #171b1f;
  color: #fff;
}

body:not(.video-agent-mode) #voiceComposerBtn:hover,
body:not(.video-agent-mode) #refinePromptBtn:hover {
  background: #f3f5f3;
  color: var(--jade);
}

body[data-theme="night"]:not(.video-agent-mode) .composer {
  border-color: rgba(61, 83, 76, 0.42);
  background:
    radial-gradient(circle at 60% 0%, rgba(13, 107, 95, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(13, 18, 24, 0.97), rgba(9, 13, 18, 0.94));
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.32);
}

body[data-theme="night"]:not(.video-agent-mode) .tool-button,
body[data-theme="night"]:not(.video-agent-mode) .quick-prompt {
  border-color: rgba(92, 104, 128, 0.42);
  background: rgba(18, 24, 31, 0.92);
  color: #d9e2df;
}

body[data-theme="night"]:not(.video-agent-mode) .composer textarea {
  color: #eef5f2;
}

body[data-theme="night"]:not(.video-agent-mode) .composer textarea::placeholder,
body[data-theme="night"]:not(.video-agent-mode) .attachment-label {
  color: #8f9b96;
}

body[data-theme="night"]:not(.video-agent-mode) #voiceComposerBtn,
body[data-theme="night"]:not(.video-agent-mode) #refinePromptBtn {
  color: #d9e2df;
}

body[data-theme="night"]:not(.video-agent-mode) #voiceComposerBtn:hover,
body[data-theme="night"]:not(.video-agent-mode) #refinePromptBtn:hover {
  background: rgba(255, 255, 255, 0.08);
}

body[data-theme="night"]:not(.video-agent-mode) .send-button {
  background: #f4f7f5;
  color: #11191f;
}

@media (max-width: 760px) {
  body:not(.video-agent-mode) .composer {
    min-height: 196px;
    padding-bottom: 72px;
  }

  body:not(.video-agent-mode) .composer textarea {
    padding-right: 0;
  }

  body:not(.video-agent-mode) .composer-footer {
    flex-wrap: wrap;
    right: 16px;
  }

  body:not(.video-agent-mode) .quick-prompts {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; width: 260px; z-index: 200; transform: translateX(-100%); transition: transform .25s; }
  .sidebar.open { transform: translateX(0); box-shadow: 4px 0 20px rgba(0,0,0,.3); }
  .workspace { padding: 10px; gap: 8px; }
  .hero-band { min-height: auto; max-height: 160px; grid-template-columns: 1fr; }
  .hero-art-panel { display: none; }
  .agent-brief { padding: 12px; }
  .main-grid { grid-template-columns: 1fr; }
  .inspector { display: none; }
  .topbar { grid-template-columns: 40px 1fr auto; gap: 8px; }
  .top-actions { display: none; }
  .mobile-only { display: flex !important; }
  .chat-window { max-height: calc(100vh - 320px); }
  .composer { padding: 8px; }
  .auth-card { width: 90%; padding: 28px 20px; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
}
@media (max-width: 768px) {
  .sidebar-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 199; display: none; }
  .sidebar.open + .sidebar-backdrop { display: block; }
}
.auth-sms-btn { flex-shrink: 0; min-height: 38px; padding: 0 12px; border: 1px solid var(--jade); border-radius: 8px; background: var(--panel); color: var(--jade); font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; } .auth-sms-btn:disabled { opacity: .5; cursor: wait; }
