:root {
  --bg: #f4f5f9;
  --surface: #fff;
  --ink: #101828;
  --muted: #667085;
  --line: #e6e8ef;
  /* 品牌蓝：信任、稳重（主按钮、链接、选中、焦点） */
  --brand: #3355ff;
  --brand-strong: #2540e0;
  --brand-soft: #e8ecff;
  --brand-line: #cdd6ff;
  /* 行动橙：只用在"要点的那一下"和高光时刻（每屏至多 1 处大面积） */
  --pop: #ff6b35;
  --pop-strong: #cf440f;
  --pop-soft: #fff1ea;
  /* AI 紫：只在 AI 正在工作 / AI 给出建议时出现，与 logo 蓝紫呼应 */
  --ai: #8b5cf6;
  --ai-strong: #6d28d9;
  --ai-soft: #f3eeff;
  --ai-gradient: linear-gradient(135deg, var(--brand), var(--ai));
  --nav: #0c1633;
  --nav-ink: #aab3cf;
  --ok: #12b76a;
  --warn: #f79009;
  --bad: #e5484d;
  --r: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.06);
  --font: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-height: 100%;
}
body {
  font: 14px/1.6 var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img,
video {
  display: block;
  max-width: 100%;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
a {
  color: var(--brand);
  text-decoration: none;
}
h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.01em;
}
p {
  margin: 0;
}
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 6px;
}
[disabled],
.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
[hidden] {
  display: none !important;
}
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-thumb {
  background: #d3d7e0;
  border-radius: 8px;
}

.app {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 22px 14px;
  background: var(--nav);
  color: var(--nav-ink);
  overflow-y: auto;
  z-index: 40;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 22px;
  color: #fff;
  font-weight: 600;
  font-size: 16px;
}
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--ai-gradient);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 40%, transparent);
}
.nav-label {
  padding: 16px 12px 6px;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: #5e6a8f;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--nav-ink);
  text-align: left;
  cursor: pointer;
  transition:
    background 0.2s,
    color 0.2s;
}
.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.nav-item.active {
  background: color-mix(in srgb, var(--brand) 18%, transparent);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--brand);
}
.nav-item .badge {
  margin-left: auto;
}
.nav-bottom {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}

.workspace {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 40px;
  background: rgba(244, 245, 249, 0.84);
  backdrop-filter: saturate(1.4) blur(14px);
}
.topbar-title {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.main {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 48px 80px;
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.page-head h1 {
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 650;
}
.page-head p {
  margin-top: 8px;
  max-width: 620px;
  color: var(--muted);
}
.page-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.eyebrow {
  margin-bottom: 10px;
  font-size: 12px;
  letter-spacing: 0.14em;
  font-weight: 600;
  color: var(--brand);
}
.muted {
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 550;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition:
    background 0.2s,
    border-color 0.2s,
    color 0.2s,
    transform 0.1s;
}
.btn:active {
  transform: translateY(1px);
}
.btn.primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--brand) 60%, transparent);
}
.btn.primary:hover {
  background: var(--brand-strong);
}
.btn.secondary {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}
.btn.secondary:hover {
  background: #fafbfd;
  border-color: #cfd3de;
}
.btn.ghost {
  background: transparent;
  color: var(--muted);
}
.btn.ghost:hover {
  background: rgba(16, 24, 40, 0.05);
  color: var(--ink);
}
.btn.danger {
  background: #fff1f1;
  border-color: #ffd6d6;
  color: var(--bad);
}
.btn.danger:hover {
  background: var(--bad);
  color: #fff;
}
.btn.small {
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 13px;
}
.icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.btn.small .icon {
  width: 16px;
  height: 16px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
}
.badge.success {
  background: #e7f8ef;
  color: #067647;
}
.badge.warning {
  background: #fff4e5;
  color: #b54708;
}
.badge.neutral {
  background: #f0f2f5;
  color: var(--muted);
}
.badge.success::before,
.badge.warning::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}
.hero-media {
  position: relative;
  min-height: 440px;
  border-radius: 20px;
  overflow: hidden;
  background: #1a2140;
}
.hero-media img,
.hero-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 12, 32, 0) 35%, rgba(8, 12, 32, 0.8));
}
.hero-copy {
  position: absolute;
  left: 32px;
  right: 32px;
  bottom: 28px;
  z-index: 1;
  color: #fff;
}
.hero-copy .eyebrow {
  color: #e4dcff;
}
.hero-copy h2 {
  margin-bottom: 10px;
  font-size: 30px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.hero-copy p {
  max-width: 460px;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.8);
}
.hero-bottom {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.action-grid {
  display: grid;
  grid-auto-rows: 1fr;
  gap: 12px;
}
.action-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    transform 0.2s;
}
.action-card:hover {
  border-color: var(--brand-line);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.action-card > .icon {
  width: 40px;
  height: 40px;
  padding: 10px;
  border-radius: 11px;
  background: var(--brand-soft);
  color: var(--brand);
}
.action-card h3 {
  font-size: 15px;
}
.action-card p {
  font-size: 13px;
  color: var(--muted);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 40px 0 16px;
}
.section-head h2 {
  font-size: 20px;
}
.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 20px;
}
.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.panel {
  min-width: 0;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.panel > h3 {
  margin-bottom: 16px;
  font-size: 16px;
}
.fields {
  display: grid;
  gap: 18px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.field > label,
.field > .label {
  font-size: 13px;
  font-weight: 550;
}
.field small {
  font-size: 12px;
  color: var(--muted);
}
.input,
.select,
.textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.textarea {
  min-height: 140px;
  line-height: 1.7;
  resize: vertical;
}
.select {
  appearance: none;
  padding-right: 36px;
  background: var(--surface)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23667085' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")
    no-repeat right 12px center;
}
.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 12%, transparent);
}
.input::placeholder,
.textarea::placeholder {
  color: #a0a7b5;
}

.tabs {
  display: inline-flex;
  gap: 4px;
  max-width: 100%;
  padding: 4px;
  background: #eceef4;
  border-radius: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 16px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--muted);
  font-weight: 550;
  white-space: nowrap;
  cursor: pointer;
}
.tab.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.1);
}
.steps {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
  counter-reset: step;
  overflow-x: auto;
}
.step {
  flex: 1;
  min-width: 150px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  font-weight: 550;
  counter-increment: step;
}
.step::before {
  content: counter(step);
  width: 26px;
  height: 26px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f0f2f5;
  font-size: 12px;
}
.step.active {
  border-color: var(--brand);
  color: var(--ink);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 10%, transparent);
}
.step.active::before {
  background: var(--brand);
  color: #fff;
}
.step.done {
  color: var(--ink);
  cursor: pointer;
}
.step.done::before {
  content: "✓";
  background: #e7f8ef;
  color: #067647;
}
.progress {
  height: 8px;
  border-radius: 99px;
  background: #eceef4;
  overflow: hidden;
}
.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), #5b7bff);
  transition: width 0.5s var(--ease);
}
.task-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding: 14px 18px;
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  border-radius: 12px;
}
.task-banner .progress {
  flex: 1;
  min-width: 120px;
}
.empty {
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 56px 24px;
  border: 1px dashed #d5d9e3;
  border-radius: var(--r);
  text-align: center;
  color: var(--muted);
}
.empty .icon {
  width: 36px;
  height: 36px;
  color: #b3b9c7;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
}
.media-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  cursor: pointer;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    transform 0.2s;
}
.media-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.media-card.selected {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}
.media-card.selected::after {
  content: "✓";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
}
.media-cover {
  position: relative;
  aspect-ratio: 16/10;
  background: #e9ebf1;
  overflow: hidden;
}
.media-cover.portrait {
  aspect-ratio: 9/16;
}
.media-cover.square {
  aspect-ratio: 1;
}
.media-cover img,
.media-cover video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 12px 14px;
}
.media-body h4 {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.media-body p {
  font-size: 12px;
  color: var(--muted);
}
.avatar {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  object-fit: cover;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
}
.persona-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f0f2f5;
  color: var(--muted);
  font-size: 12px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13px;
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s,
    color 0.2s;
}
.chip:hover {
  border-color: var(--brand-line);
}
.chip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
}
th,
td {
  padding: 14px 18px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
}
th {
  background: #fafbfc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
}
tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover td {
  background: #f7f9ff;
}

.map-layout {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  height: calc(100dvh - 280px);
  min-height: 520px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.map-list {
  overflow-y: auto;
  overscroll-behavior: contain;
  border-right: 1px solid var(--line);
}
.merchant {
  display: flex;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.15s;
}
.merchant:hover {
  background: #f7f9ff;
}
.merchant.selected {
  background: var(--brand-soft);
  box-shadow: inset 3px 0 0 var(--brand);
}
.merchant img {
  width: 64px;
  height: 64px;
  flex: none;
  border-radius: 10px;
  object-fit: cover;
}
.map-canvas {
  position: relative;
  overflow: hidden;
  background: #e8edf3 radial-gradient(circle at 1px 1px, #d3dae5 1px, transparent 0) 0 0/22px 22px;
}
.map-canvas .pin {
  position: absolute;
  width: 28px;
  height: 28px;
  translate: -50% -100%;
  rotate: -45deg;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  background: var(--brand);
  box-shadow: 0 4px 10px rgba(16, 24, 40, 0.25);
  cursor: pointer;
  transition: scale 0.2s;
}
.map-canvas .pin.selected {
  background: var(--bad);
  scale: 1.25;
  z-index: 2;
}

.inbox {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 320px;
  height: calc(100dvh - 280px);
  min-height: 540px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.conversations {
  overflow-y: auto;
  overscroll-behavior: contain;
  border-right: 1px solid var(--line);
}
.conversation {
  display: flex;
  gap: 12px;
  min-width: 0;
  padding: 14px 16px;
  border-bottom: 1px solid #f1f2f6;
  cursor: pointer;
}
.conversation:hover {
  background: #f7f9ff;
}
.conversation.active {
  background: var(--brand-soft);
}
.conversation .meta {
  flex: 1;
  min-width: 0;
}
.conversation .meta p {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.chat-body > header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}
.messages {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  background: #fafbfc;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.bubble {
  max-width: 72%;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px 14px 14px 4px;
  overflow-wrap: anywhere;
}
.bubble.outgoing {
  align-self: flex-end;
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  border-radius: 14px 14px 4px 14px;
}
.bubble small {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  opacity: 0.65;
}
.chat-compose {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}
.chat-compose .textarea {
  min-height: 42px;
  max-height: 140px;
  resize: none;
}
.assistant-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  border-left: 1px solid var(--line);
  overflow-y: auto;
}
.stat-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f1f2f6;
  font-size: 13px;
}
.stat-line > :first-child {
  color: var(--muted);
}
.divider {
  height: 1px;
  margin: 24px 0;
  border: 0;
  background: var(--line);
}
.split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.record-button {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--bad);
  color: #fff;
  box-shadow: 0 0 0 8px rgba(229, 72, 77, 0.12);
  cursor: pointer;
}
.record-button.recording {
  animation: pulse 1.4s infinite;
}
@keyframes pulse {
  50% {
    box-shadow: 0 0 0 16px rgba(229, 72, 77, 0.04);
  }
}
.interview {
  display: grid;
  gap: 14px;
  padding: 24px;
  background: linear-gradient(160deg, #fff, var(--brand-soft));
  border: 1px solid var(--brand-line);
  border-radius: var(--r);
}
.interview .q {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  z-index: 100;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 12px 32px rgba(16, 24, 40, 0.25);
  opacity: 0;
  translate: -50% 20px;
  pointer-events: none;
  transition:
    opacity 0.25s,
    translate 0.25s var(--ease);
}
.toast.show {
  opacity: 1;
  translate: -50% 0;
}
dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 64px rgba(8, 12, 32, 0.3);
  overflow: hidden;
}
dialog[open] {
  display: flex;
  flex-direction: column;
  animation: pop 0.22s var(--ease);
}
dialog::backdrop {
  background: rgba(8, 12, 32, 0.45);
  backdrop-filter: blur(4px);
}
@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}
.dialog-head h3 {
  font-size: 17px;
}
.dialog-body {
  padding: 24px;
  overflow-y: auto;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  background: #fafbfc;
  border-top: 1px solid var(--line);
}
.overlay {
  position: fixed;
  inset: 0;
  z-index: 35;
  background: rgba(8, 12, 32, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.player {
  position: relative;
  aspect-ratio: 9/16;
  max-height: 640px;
  margin: 0 auto;
  border-radius: 18px;
  background: #000;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(8, 12, 32, 0.25);
}
.player video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.video-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
}
.video-layout > aside {
  position: sticky;
  top: 88px;
}
.flow-footer {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 32px -48px -80px;
  padding: 16px 48px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.mobile-toggle {
  display: none;
}

@media (max-width: 1200px) {
  .main {
    padding: 28px 32px 72px;
  }
  .flow-footer {
    margin: 32px -32px -72px;
    padding: 14px 32px;
  }
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .video-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
  .inbox {
    grid-template-columns: 260px minmax(0, 1fr);
    grid-template-rows: minmax(520px, calc(100dvh - 280px)) auto;
    height: auto;
  }
  .assistant-panel {
    grid-column: 1/-1;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}
@media (max-width: 900px) {
  .app {
    grid-template-columns: minmax(0, 1fr);
  }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 260px;
    transform: translateX(-100%);
    transition: transform 0.3s var(--ease);
  }
  .app.nav-open .sidebar {
    transform: none;
  }
  .app.nav-open .overlay {
    opacity: 1;
    pointer-events: auto;
  }
  .mobile-toggle {
    display: inline-flex;
  }
  .topbar {
    padding: 0 16px;
  }
  .main {
    padding: 20px 16px 64px;
  }
  .flow-footer {
    margin: 24px -16px -64px;
    padding: 12px 16px;
  }
  .page-head {
    margin-bottom: 24px;
  }
  .page-head h1 {
    font-size: 26px;
  }
  .hero,
  .grid-2,
  .grid-3,
  .grid-4,
  .video-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-media {
    min-height: 360px;
  }
  .hero-copy {
    left: 20px;
    right: 20px;
    bottom: 20px;
  }
  .hero-copy h2 {
    font-size: 22px;
  }
  .video-layout > aside {
    position: static;
  }
  .map-layout {
    grid-template-columns: 1fr;
    grid-template-rows: 260px auto;
    height: auto;
  }
  .map-canvas {
    order: -1;
  }
  .map-list {
    border-right: 0;
  }
  .inbox {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .conversations {
    max-height: 240px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .chat-body {
    height: 70dvh;
  }
  .bubble {
    max-width: 86%;
  }
  .media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .step {
    min-width: auto;
    padding: 10px 12px;
    font-size: 13px;
  }
  .topbar-actions .btn .label {
    display: none;
  }
  dialog {
    width: 100vw;
    max-width: 100vw;
    margin: auto 0 0;
    border-radius: 18px 18px 0 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
