@charset "UTF-8";
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-subtle: #f1f5f9;
  --ink: #0f172a;
  --ink-secondary: #334155;
  --muted: #64748b;
  --muted-light: #94a3b8;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-soft: #eef2ff;
  --emerald: #10b981;
  --emerald-soft: #ecfdf5;
  --amber: #f59e0b;
  --amber-soft: #fffbeb;
  --side: #0b0f19;
  --side-border: #1e293b;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.03);
  --shadow-card: 0 1px 3px 0 rgba(15, 23, 42, 0.04), 0 1px 2px -1px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 32px -8px rgba(15, 23, 42, 0.12);
}


* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

button {
  cursor: pointer;
  transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

button:active:not(:disabled) {
  transform: translateY(1px);
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

input[type="checkbox"] {
  accent-color: var(--primary);
  width: 15px;
  height: 15px;
  border-radius: 4px;
  cursor: pointer;
}

.ic {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--muted);
}

/* ==================== SIDEBAR ==================== */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 248px;
  background: radial-gradient(circle at 0% 0%, rgba(99, 102, 241, 0.15), transparent 45%), var(--side);
  border-right: 1px solid var(--side-border);
  color: #94a3b8;
  display: flex;
  flex-direction: column;
  padding: 24px 16px 18px;
  z-index: 20;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sidebar::-webkit-scrollbar {
  display: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #f8fafc;
  padding: 0 8px;
  line-height: 1.2;
}

.brand-dot {
  color: #818cf8;
}

.mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.mark .ic {
  width: 20px;
  height: 20px;
  stroke-width: 2.2;
}

.workspace {
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
  border-radius: 12px;
  margin: 22px 0 24px;
  padding: 11px 12px;
  transition: background 0.15s, border-color 0.15s;
}

.workspace:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
}

.avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: none;
  background: linear-gradient(135deg, #312e81 0%, #4338ca 100%);
  color: #e0e7ff;
  font-size: 13px;
  font-weight: 700;
  border-radius: 9px;
  position: relative;
  border: 1px solid rgba(129, 140, 248, 0.3);
}

.avatar > span {
  position: absolute;
  bottom: -2px;
  right: -2px;
  background: var(--emerald);
  border: 2.5px solid var(--side);
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.workspace b, .user b {
  display: block;
  font-size: 13px;
  color: #f1f5f9;
  font-weight: 600;
  line-height: 1.3;
}

.workspace small, .user small {
  display: block;
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

.workspace .chev {
  margin-left: auto;
  color: #64748b;
  font-size: 14px;
}

.label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #475569;
  padding: 0 12px;
  margin-bottom: 8px;
}

.sidebar nav {
  display: grid;
  gap: 4px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px 12px;
  min-height: 42px;
  border: 0;
  background: transparent;
  border-radius: 10px;
  color: #94a3b8;
  text-align: left;
  font-size: 13.5px;
  font-weight: 500;
}

.nav:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #f1f5f9;
}

.nav.active {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

.nav .ic {
  width: 18px;
  height: 18px;
  opacity: 0.85;
}

.nav.active .ic {
  opacity: 1;
}

.nav i {
  margin-left: auto;
  font-style: normal;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 600;
  color: #cbd5e1;
}

.nav.active i {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.nav em {
  width: 6px;
  height: 6px;
  background: #818cf8;
  border-radius: 50%;
  margin-left: auto;
  box-shadow: 0 0 8px #818cf8;
}

.nav.active em {
  background: #ffffff;
}

.nav-new {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-left: auto;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.18);
  color: #a5b4fc;
}

.nav.active .nav-new {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.channel-label {
  margin-top: 26px;
}

.channel {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 500;
}

.channel:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.meta, .google {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex: none;
  background: #eff6ff;
  color: #2563eb;
  font-size: 18px;
  font-weight: 700;
  font-family: Inter, Arial, sans-serif;
}

.google {
  font-size: 15px;
  color: #059669;
  background: #ecfdf5;
  border: 1px solid #d1fae5;
}

.sidebar .meta, .sidebar .google {
  width: 24px;
  height: 24px;
  font-size: 15px;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.sidebar .google {
  font-size: 13px;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.channel > b {
  margin-left: auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #475569;
  transition: background 0.2s, box-shadow 0.2s;
}

.channel.is-connected::after {
  content: '已连接';
  color: #34d399;
  font-size: 11px;
  font-weight: 500;
  margin-left: 6px;
}

.add-channel {
  display: flex;
  gap: 9px;
  align-items: center;
  background: none;
  border: 1px dashed rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  color: #94a3b8;
  font-size: 12px;
  padding: 9px 12px;
  margin-top: 6px;
  text-align: left;
  width: 100%;
}

.add-channel:hover {
  border-color: rgba(129, 140, 248, 0.45);
  color: #e2e8f0;
  background: rgba(99, 102, 241, 0.08);
}

.add-channel .ic {
  width: 15px;
  height: 15px;
}

.side-bottom {
  margin-top: auto;
  padding-top: 24px;
}

.assistant-card {
  border: 1px solid rgba(99, 102, 241, 0.28);
  border-radius: 14px;
  padding: 16px;
  background: linear-gradient(155deg, rgba(79, 70, 229, 0.2) 0%, rgba(15, 23, 42, 0.85) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.assistant-orb {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  margin-bottom: 10px;
}

.assistant-orb .ic {
  width: 18px;
  height: 18px;
}

.assistant-card b {
  display: block;
  font-size: 13px;
  color: #f8fafc;
  font-weight: 600;
}

.assistant-card p {
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.65;
  margin: 6px 0 14px;
}

.assistant-card button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
}

.assistant-card button:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.assistant-card button .ic {
  width: 14px;
  height: 14px;
}

.user {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 14px 4px 0;
}

.user-avatar {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  color: #f8fafc;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.user > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}

.user b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
}

.user > button {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: #94a3b8;
  padding: 6px;
}

.user > button:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.user > button .ic {
  width: 16px;
  height: 16px;
}

/* ==================== MAIN & TOPBAR ==================== */
main {
  margin-left: 248px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  height: 64px;
  padding: 0 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}

.breadcrumb b {
  font-weight: 600;
  color: var(--ink);
}

.crumb-slash {
  color: #cbd5e1;
}

.top-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.synced {
  font-size: 12px;
  font-weight: 500;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 4px 12px;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-divider {
  width: 1px;
  height: 20px;
  background: var(--line);
}

.help {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-size: 12.5px;
  font-weight: 500;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 11px;
  color: var(--ink-secondary);
  box-shadow: var(--shadow-sm);
}

.help:hover {
  background: #f8fafc;
  border-color: var(--line-strong);
}

.help .ic {
  width: 15px;
  height: 15px;
  color: var(--primary);
}

.top-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-soft);
  border: 1px solid #c7d2fe;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}

.mobile-menu {
  display: none;
}

/* ==================== VIEWS & COMMON CONTROLS ==================== */
.view {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 36px 0;
  flex: 1;
}

.welcome, .page-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.welcome > div:first-child > small, .page-title > div > small {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 4px;
}

.welcome h1, .page-title h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
  margin: 2px 0 6px;
  color: var(--ink);
}

.title-dot {
  color: var(--primary);
}

.welcome p, .page-title p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
}

.welcome > div:last-child {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.button, .date {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 9px;
  padding: 9px 15px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  min-height: 38px;
  transition: all 0.16s ease;
}

.button .ic, .date .ic {
  width: 15px;
  height: 15px;
}

.button.light, .date {
  background: #ffffff;
  border: 1px solid var(--line-strong);
  color: var(--ink-secondary);
  box-shadow: var(--shadow-sm);
}

.button.light:hover:not(:disabled), .date:hover:not(:disabled) {
  background: #f8fafc;
  border-color: #94a3b8;
  color: var(--ink);
}

.button.dark {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  color: #ffffff;
  border: 1px solid #4338ca;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.28);
}

.button.dark:hover:not(:disabled) {
  background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.38);
}

/* ==================== OVERVIEW BANNER & PLATFORM BAR ==================== */
.growth-banner {
  border-radius: var(--radius-lg);
  background: linear-gradient(125deg, #0f172a 0%, #1e1b4b 55%, #312e81 100%);
  border: 1px solid rgba(99, 102, 241, 0.25);
  box-shadow: 0 10px 28px -8px rgba(30, 27, 75, 0.25);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 136px;
  padding: 22px 28px;
  color: #f8fafc;
  margin-bottom: 16px;
}

.banner-copy {
  position: relative;
  z-index: 2;
  max-width: 600px;
}

.eyebrow {
  display: inline-block;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: #a5b4fc;
  text-transform: uppercase;
}

.banner-copy h2 {
  font-size: 20px;
  letter-spacing: -0.025em;
  font-weight: 700;
  margin: 5px 0 6px;
  color: #ffffff;
}

.banner-copy p {
  font-size: 13px;
  color: #cbd5e1;
  margin: 0 0 14px;
}

.banner-button {
  background: #ffffff;
  border: 1px solid #ffffff;
  color: #1e1b4b;
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 14px;
  min-height: 36px;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.banner-button:hover {
  background: #eef2ff;
  color: var(--primary);
}

.banner-button .ic:last-child {
  margin-left: 6px;
}

.orbit-art {
  position: absolute;
  width: 320px;
  height: 260px;
  right: 3%;
  top: -55px;
  transform: rotate(-12deg);
  background: radial-gradient(ellipse at center, rgba(129, 140, 248, 0.22), transparent 65%);
  pointer-events: none;
}

.orbit {
  position: absolute;
  border: 1px solid rgba(165, 180, 252, 0.18);
  border-radius: 50%;
  inset: 22px 36px;
  transform: rotate(35deg);
}

.orbit-two {
  inset: 58px 0;
  transform: rotate(-20deg);
}

.orbit-three {
  inset: 10px 64px;
  transform: rotate(70deg);
}

.orbit-core {
  position: absolute;
  top: 98px;
  left: 128px;
  border-radius: 18px;
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  color: #e0e7ff;
  background: linear-gradient(140deg, rgba(99, 102, 241, 0.35), rgba(139, 92, 246, 0.12));
  border: 1px solid rgba(165, 180, 252, 0.4);
  box-shadow: 0 0 45px rgba(99, 102, 241, 0.4);
  transform: rotate(12deg);
}

.orbit-core .ic {
  width: 30px;
  height: 30px;
  stroke-width: 1.5;
}

.orbit-tag {
  position: absolute;
  border-radius: 999px;
  border: 1px solid rgba(165, 180, 252, 0.25);
  padding: 4px 11px;
  font-size: 11px;
  font-weight: 500;
  color: #e0e7ff;
  background: rgba(30, 27, 75, 0.85);
  backdrop-filter: blur(4px);
  transform: rotate(12deg);
}

.tag-one {
  top: 68px;
  left: 38px;
}

.tag-two {
  bottom: 42px;
  right: 8px;
}

.orbit-art > i {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #a5b4fc;
  border-radius: 50%;
  box-shadow: 0 0 12px #a5b4fc;
  top: 45px;
  left: 185px;
}

.orbit-art > i:last-child {
  top: 205px;
  left: 80px;
  width: 5px;
  height: 5px;
}

.platform {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 22px;
}

.platform > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stack {
  display: flex;
  padding-left: 2px;
}

.stack > span {
  border: 2px solid #ffffff;
  width: 28px;
  height: 28px;
  font-size: 16px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.stack .google {
  margin-left: -7px;
  font-size: 13px;
}

.platform b {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.platform small {
  font-size: 12px;
  color: var(--muted);
  margin-left: 10px;
}

.platform button {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-secondary);
}

.platform button:hover {
  background: var(--primary-soft);
  border-color: #c7d2fe;
  color: var(--primary);
}

.platform button .ic {
  width: 14px;
  height: 14px;
}

/* ==================== METRICS & PANELS ==================== */
.heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.heading > div {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.heading h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.heading small {
  font-size: 12px;
  color: var(--muted);
}

.date {
  font-size: 12px;
  min-height: 34px;
  padding: 6px 12px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.metrics article, .panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  min-width: 0;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.metrics article:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-md);
}

.metrics article {
  padding: 18px 20px 16px;
  overflow: hidden;
  position: relative;
}

.metric-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.metric-label > small {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}

.metric-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #eef2ff;
  color: #4f46e5;
  display: grid;
  place-items: center;
}

.metric-icon .ic {
  width: 17px;
  height: 17px;
}

.metrics article:nth-child(2) .metric-icon {
  background: #f5f3ff;
  color: #7c3aed;
}

.metrics article:nth-child(3) .metric-icon {
  background: #fffbeb;
  color: #d97706;
}

.metrics article:nth-child(4) .metric-icon {
  background: #ecfdf5;
  color: #059669;
}

.metrics article > b {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1.25;
  margin: 10px 0 14px;
  font-variant-numeric: tabular-nums;
}

.metrics footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--muted-light);
  border-top: 1px solid #f1f5f9;
  padding-top: 10px;
}

.metric-note {
  color: var(--muted);
  font-weight: 500;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(300px, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.panel {
  padding: 22px 24px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.panel h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 3px;
}

.panel-head small {
  font-size: 12px;
  color: var(--muted);
}

.legend {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-secondary);
  background: #f8fafc;
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 999px;
}

.legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  margin-right: 5px;
}

.chart {
  position: relative;
  height: 215px;
  padding: 12px 0 26px 46px;
}

.chart svg {
  height: 172px;
  width: 100%;
  overflow: visible;
}

.ticks {
  position: absolute;
  inset: 10px auto 28px 0;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted-light);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-variant-numeric: tabular-nums;
}

.grid {
  stroke: #f1f5f9;
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

.dates {
  position: absolute;
  bottom: 0;
  left: 46px;
  right: 0;
  display: flex;
  justify-content: space-between;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}

.chart-empty {
  position: absolute;
  inset: 12px 0 22px 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 39px, #f1f5f9 40px);
  border-radius: 10px;
  text-align: center;
}

.chart-empty .ic {
  width: 28px;
  height: 28px;
  color: #94a3b8;
  margin-bottom: 4px;
}

.chart-empty b {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-secondary);
}

.chart-empty span {
  font-size: 12px;
  color: var(--muted);
}

.channel-data {
  display: grid;
  gap: 18px;
  min-height: 130px;
  align-content: center;
  margin: 10px 0 16px;
}

.channel-data > .muted {
  text-align: center;
  font-size: 12.5px;
  background: #f8fafc;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  padding: 28px 14px;
  line-height: 1.7;
}

.channel-line {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
}

.channel-line > div {
  flex: 1;
  min-width: 0;
}

.channel-line > div > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  gap: 6px;
}

.channel-line b {
  font-weight: 600;
}

.channel-line i {
  display: block;
  height: 7px;
  border-radius: 999px;
  background: #e2e8f0;
  margin: 8px 0 6px;
  overflow: hidden;
}

.channel-line i > b {
  display: block;
  height: 100%;
  border-radius: 999px;
}

.channel-line small {
  font-size: 11.5px;
  color: var(--muted);
}

.tip {
  display: flex;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 15px;
  align-items: flex-start;
}

.tip > span {
  color: var(--primary);
  background: var(--primary-soft);
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  flex: none;
  font-size: 13px;
}

.tip b, .tip small {
  display: block;
}

.tip b {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-secondary);
}

.tip small {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}

.link {
  border: 0;
  background: none;
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  padding: 0;
}

.link:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* ==================== TABLES ==================== */
.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  white-space: nowrap;
}

th {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: #f8fafc;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
}

th:first-child {
  border-top-left-radius: 8px;
}

th:last-child {
  border-top-right-radius: 8px;
}

td {
  font-size: 13px;
  color: var(--ink-secondary);
  padding: 14px 12px;
  border-bottom: 1px solid #f1f5f9;
  font-variant-numeric: tabular-nums;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover td {
  background: #f8fafc;
}

.camp-name {
  color: var(--ink);
  font-weight: 600;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini {
  width: 22px;
  height: 22px;
  font-size: 14px;
  margin-right: 8px;
  vertical-align: middle;
  border-radius: 6px;
}

.google.mini {
  font-size: 12px;
}

.roas {
  font-weight: 700;
  color: #059669;
}

.pill {
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.active-pill {
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}

.paused-pill {
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.ai-panel {
  background: linear-gradient(145deg, #ffffff 0%, #f5f7ff 100%);
  border-color: #c7d2fe;
  display: flex;
  flex-direction: column;
}

.ai-title {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 14px;
}

.ai-title > span:first-child {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 10px;
  border: 1px solid #c7d2fe;
}

.ai-title b {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.ai-title small {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
}

.suggestion > b {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin: 6px 0;
}

.suggestion > small {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 2px 8px;
  border-radius: 999px;
}

.suggestion p {
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--muted);
  margin: 8px 0 16px;
}

.suggestion .button {
  font-size: 12px;
  padding: 7px 13px;
  min-height: 34px;
  margin-right: 6px;
  margin-bottom: 6px;
}

.ai-panel > .link {
  border-top: 1px solid #e0e7ff;
  display: block;
  width: 100%;
  text-align: left;
  padding-top: 14px;
  margin-top: auto;
}

/* ==================== CAMPAIGNS, INSIGHTS, APPROVALS, TEAM ==================== */
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.toolbar > input {
  width: 280px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #ffffff;
  padding: 9px 14px;
  font-size: 13px;
  min-height: 40px;
  box-shadow: var(--shadow-sm);
}

.toolbar > input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.tabs {
  display: flex;
  padding: 4px;
  border-radius: 10px;
  background: #e2e8f0;
  gap: 2px;
}

.tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 13px;
  border-radius: 7px;
}

.tab.active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.toolbar > select {
  margin-left: auto;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  min-height: 40px;
  box-shadow: var(--shadow-sm);
}

.table-panel {
  padding: 16px;
}

.full-table td {
  font-size: 13px;
  padding: 15px 12px;
}

.full-table th {
  font-size: 11.5px;
  padding: 12px;
}

.status-toggle, .budget-edit {
  border: 0;
  background: none;
  padding: 0;
}

.budget-edit {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px dashed #94a3b8;
  padding-bottom: 1px;
}

.budget-edit:hover {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.insight-summary {
  display: flex;
  gap: 14px;
  align-items: center;
  background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 100%);
  border: 1px solid #c7d2fe;
  border-radius: 14px;
  padding: 18px 22px;
  margin-bottom: 20px;
}

.insight-summary > span {
  color: var(--primary);
  background: #ffffff;
  border: 1px solid #c7d2fe;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 18px;
  flex: none;
}

.insight-summary > div {
  flex: 1;
}

.insight-summary b, .insight-summary small {
  display: block;
}

.insight-summary b {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.insight-summary small {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
}

.insight-grid, .approval-list {
  display: grid;
  gap: 16px;
}

.insight-card, .approval-card {
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 14px;
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.insight-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.kind {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
}

.insight-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin: 14px 0 10px;
}

.insight-card p {
  font-size: 13.5px;
  line-height: 1.85;
  white-space: pre-wrap;
  color: var(--ink-secondary);
}

.insight-card footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 16px;
  font-size: 13px;
}

.notice {
  padding: 14px 18px;
  background: #f8fafc;
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--primary);
  border-radius: 10px;
  font-size: 13px;
  color: var(--ink-secondary);
  margin-bottom: 18px;
}

.approval-head {
  display: flex;
  gap: 12px;
  align-items: center;
}

.approval-head > div {
  flex: 1;
}

.approval-head b {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.approval-head small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

.approval-age {
  font-size: 12px;
  color: var(--muted-light);
}

.approval-desc {
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--ink-secondary);
  white-space: pre-wrap;
  margin: 14px 0;
}

.change {
  display: flex;
  gap: 12px;
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 12.5px;
  flex-wrap: wrap;
}

.change span {
  color: var(--muted);
}

.change b {
  color: var(--ink);
  font-weight: 600;
}

.approval-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  gap: 16px;
}

.impact {
  color: var(--primary);
  font-size: 12px;
  font-weight: 500;
}

.reject, .approve {
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 600;
}

.reject {
  border: 1px solid var(--line-strong);
  background: #ffffff;
  color: var(--ink-secondary);
  margin-right: 8px;
}

.reject:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

.approve {
  border: 1px solid #059669;
  background: #059669;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
}

.approve:hover {
  background: #047857;
}

.empty {
  display: grid;
  justify-items: center;
  text-align: center;
  border: 1px dashed var(--line-strong);
  background: #ffffff;
  border-radius: 14px;
  padding: 60px 24px;
  color: var(--muted);
  font-size: 13px;
}

.empty b {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin: 12px 0 4px;
}

.team-layout {
  align-items: start;
}

.team-form {
  display: grid;
  gap: 14px;
}

.team-form label {
  display: grid;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-secondary);
}

.team-form input, .team-form select, .team-table select {
  min-height: 40px;
  border: 1px solid var(--line-strong);
  background: #ffffff;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
}

.team-form .button {
  justify-self: start;
  margin-top: 4px;
}

.role-help p {
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink-secondary);
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin: 0 0 12px;
}

.role-help p:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.team-table {
  margin-top: 20px;
}

.team-table .button {
  font-size: 12px;
  padding: 6px 10px;
  min-height: 32px;
}

.team-table select {
  min-height: 34px;
}

.account-connect-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 14px;
}

.account-import-grid {
  margin-top: 20px;
}

.account-import-grid .panel-head > div {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.account-import-list {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
  padding: 4px 2px;
}

.account-option {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.account-option:hover {
  border-color: var(--line-strong);
  background: #f8faf9;
}

.account-option:has(input:disabled) {
  cursor: default;
  opacity: .7;
}

.account-option input {
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  accent-color: var(--green);
}

.account-option span {
  min-width: 0;
}

.account-option b,
.account-option small,
.account-id {
  display: block;
}

.account-option b {
  color: var(--ink);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.account-option small,
.account-id {
  margin-top: 4px;
  color: var(--ink-muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.account-import-grid > .panel > .button {
  margin-top: 12px;
}

@media (max-width: 760px) {
  .account-connect-grid,
  .account-import-grid {
    grid-template-columns: 1fr;
  }
}

/* ==================== AI ASSISTANT / CHAT VIEW ==================== */
.chat-view {
  min-height: calc(100vh - 140px);
  max-width: 860px;
  padding-bottom: 36px;
}

.chat-intro {
  text-align: center;
  margin: 20px auto 24px;
}

.chat-intro > span {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  border: 1px solid #c7d2fe;
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
  color: var(--primary);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.12);
}

.chat-intro > span .ic {
  width: 26px;
  height: 26px;
}

.chat-intro > small {
  display: inline-block;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.chat-intro h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.03em;
  margin: 10px 0 6px;
}

.chat-intro p {
  font-size: 13.5px;
  color: var(--muted);
  margin: 0;
}

/* Unify width of model-panel, intelligence-panel, prompts, thread, composer */
.model-panel,
.intelligence-panel,
.prompts,
.thread,
.composer {
  max-width: 800px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.model-panel {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-card);
}

.model-panel > summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.model-panel > summary::-webkit-details-marker {
  display: none;
}

.model-panel summary b {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.model-panel summary small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.model-edit-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 5px 11px;
  border-radius: 999px;
  white-space: nowrap;
}

.model-panel form {
  padding: 16px 20px 20px;
  border-top: 1px solid var(--line);
}

.model-panel .profile-note {
  line-height: 1.65;
}

.model-actions, .connection-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.model-feedback {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--primary);
  line-height: 1.6;
  overflow-wrap: anywhere;
  margin-bottom: 0;
}

.chatgpt-connection {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  margin-top: 14px;
}

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

.chatgpt-heading a {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
}

.chatgpt-connection p {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-secondary);
}

.chatgpt-connection label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
}

.chatgpt-connection select {
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  max-width: 100%;
}

.intelligence-panel {
  margin-top: 0;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
}

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

.intelligence-top b {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.intelligence-top b span {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 2px 7px;
  border-radius: 6px;
  margin-left: 8px;
}

.intelligence-top small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

.expert-pill {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 9px;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-soft);
}

.knowledge-modules {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}

.knowledge-modules span {
  padding: 4px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: var(--ink-secondary);
  font-size: 11.5px;
  font-weight: 500;
}

.intelligence-panel details {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 12px;
}

.intelligence-panel summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-secondary);
}

.intelligence-panel summary span {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 8px;
}

.profile-note {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  margin: 10px 0;
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.profile-grid label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-secondary);
}

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

.profile-grid input, .profile-grid select, .profile-grid textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  padding: 9px 11px;
  font-size: 13px;
  min-height: 38px;
}

.profile-grid input:focus, .profile-grid select:focus, .profile-grid textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.profile-grid input::placeholder, .profile-grid textarea::placeholder {
  color: var(--muted-light);
}

.profile-grid textarea {
  resize: vertical;
}

.profile-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.profile-actions small {
  font-size: 12px;
  color: var(--muted);
}

.knowledge-details a {
  display: inline-flex;
  align-items: center;
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
  margin: 8px 16px 4px 0;
}

.knowledge-details a:hover {
  text-decoration: underline;
}

.knowledge-details a small {
  font-size: 11px;
  margin-left: 8px;
  color: var(--muted);
}

.knowledge-update-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.knowledge-update-row > small {
  font-size: 11.5px;
  color: var(--muted);
}

.prompts {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px auto 22px;
}

.prompts button {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-secondary);
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 9px 16px;
  box-shadow: var(--shadow-sm);
}

.prompts button:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.thread {
  display: grid;
  gap: 16px;
  margin: 20px auto;
}

.message {
  max-width: 88%;
  font-size: 13.5px;
  padding: 16px 20px;
  line-height: 1.75;
  overflow-wrap: anywhere;
  box-shadow: var(--shadow-sm);
}

.message.user {
  justify-self: end;
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  color: #ffffff;
  border-radius: 16px 16px 4px 16px;
}

.message.ai {
  justify-self: start;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px 16px 16px 4px;
  color: var(--ink-secondary);
  min-width: 200px;
}

.message.ai > b {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.03em;
}

.message-copy {
  white-space: pre-wrap;
  margin-top: 6px;
  color: var(--ink);
}

.message.ai.loading {
  color: var(--muted);
}

.message.ai.loading::after {
  content: ' ···';
  animation: pulse 1.2s infinite;
}

.composer {
  border: 1px solid var(--line-strong);
  background: #ffffff;
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: var(--shadow-md);
  transition: border-color 0.16s, box-shadow 0.16s;
}

.composer:focus-within {
  border-color: var(--primary);
  box-shadow: var(--shadow-md), 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.composer textarea {
  border: 0;
  outline: 0 !important;
  width: 100%;
  resize: vertical;
  min-height: 58px;
  max-height: 220px;
  font-size: 13.5px;
  line-height: 1.7;
  background: transparent;
  color: var(--ink);
}

.composer textarea::placeholder {
  color: var(--muted-light);
}

.composer > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
}

.composer small {
  font-size: 11.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
}

.model-dot {
  width: 7px;
  height: 7px;
  background: var(--emerald);
  border-radius: 50%;
  margin-right: 6px;
}

#analysisMode {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 500;
  background: #f8fafc;
  color: var(--ink-secondary);
  margin-left: auto;
  margin-right: 6px;
}

.composer button {
  background: var(--primary);
  color: #ffffff;
  border: 0;
  border-radius: 10px;
  width: 36px;
  height: 36px;
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
}

.composer button:hover:not(:disabled) {
  background: var(--primary-hover);
}

.disclaimer {
  text-align: center;
  font-size: 11.5px;
  color: var(--muted-light);
  margin-top: 12px;
}

.plan {
  background: #f8fafc;
  border: 1px solid #c7d2fe;
  border-radius: 10px;
  padding: 14px;
  margin-top: 14px;
}

.plan-row {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
}

.plan-row span {
  color: var(--muted);
}

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

.plan-actions small {
  font-size: 11.5px;
  color: var(--muted);
}

.plan-actions button {
  border: 0;
  background: var(--primary);
  color: #ffffff;
  padding: 7px 13px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
}

.answer-intelligence {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 10px;
}

.answer-intelligence summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
}

.answer-intelligence p {
  font-size: 11.5px;
  color: var(--muted-light);
  line-height: 1.6;
}

.answer-intelligence a {
  display: inline-block;
  font-size: 11.5px;
  color: var(--primary);
  margin-right: 12px;
}

.chat-view:has(.message) .chat-intro {
  margin-top: 8px;
}

.chat-view:has(.message) .chat-intro h1 {
  font-size: 22px;
}

.chat-view:has(.message) .chat-intro > span {
  width: 38px;
  height: 38px;
  margin-bottom: 8px;
}

.chat-view:has(.message) .prompts {
  display: none;
}

/* ==================== FOOTER, TOAST, MODAL ==================== */
main > footer {
  width: 100%;
  max-width: 1440px;
  margin: 32px auto 0;
  padding: 18px 36px 24px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted-light);
  font-size: 12px;
}

#aiStatusBadge {
  color: var(--primary);
  font-weight: 600;
  background: var(--primary-soft);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
}

.toast {
  position: fixed;
  z-index: 50;
  bottom: 26px;
  left: 50%;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  background: #0f172a;
  color: #f8fafc;
  border: 1px solid #334155;
  box-shadow: var(--shadow-lg);
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  max-width: min(600px, 90vw);
  white-space: pre-wrap;
}

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

.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  z-index: 40;
  padding: 24px;
}

.modal {
  width: min(460px, 100%);
  padding: 28px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.close {
  position: absolute;
  right: 16px;
  top: 14px;
  background: #f1f5f9;
  border: 0;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 18px;
  color: var(--muted);
  display: grid;
  place-items: center;
}

.close:hover {
  background: #e2e8f0;
  color: var(--ink);
}

.modal > span {
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 20px;
}

.modal h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin: 16px 0 8px;
}

.modal p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.75;
}

.modal > button:not(.close) {
  display: block;
  width: 100%;
  border: 1px solid var(--line-strong);
  background: #f8fafc;
  border-radius: 12px;
  text-align: left;
  padding: 14px 16px;
  margin: 10px 0;
}

.modal > button:not(.close):hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.modal > button b {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}

.modal > button small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.footnote {
  display: block;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 14px;
}

.sync-error {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
  border-left: 4px solid #f59e0b;
  overflow-wrap: anywhere;
}

.sync-error span {
  flex: 1;
}

.sync-error button {
  flex: none;
}

/* ==================== LOGIN GATE ==================== */
.login-gate {
  position: fixed;
  inset: 0;
  z-index: 35;
  background: #ffffff;
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  overflow: auto;
}

.login-story {
  background: radial-gradient(circle at 15% 15%, #312e81 0%, #0f172a 55%, #090d16 100%);
  min-height: 100vh;
  padding: 48px 64px;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.login-story::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 75%, rgba(99, 102, 241, 0.2), transparent 60%);
  pointer-events: none;
}

.login-story .brand {
  padding: 0;
}

.login-story > div:nth-child(2) {
  padding: 36px 0;
  position: relative;
  z-index: 1;
}

.login-story .eyebrow {
  font-size: 11px;
  color: #a5b4fc;
  letter-spacing: 0.14em;
}

.login-story h2 {
  font-size: 38px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.03em;
  margin: 16px 0;
}

.login-story p {
  font-size: 14.5px;
  line-height: 1.85;
  color: #cbd5e1;
}

.login-story > small {
  font-size: 12px;
  color: #64748b;
}

.login-visual {
  max-width: 420px;
  margin-top: 34px;
  border: 1px solid rgba(165, 180, 252, 0.2);
  border-radius: 16px;
  padding: 22px 24px;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(12px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.visual-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #a5b4fc;
}

.visual-caption span {
  font-size: 16px;
  color: #34d399;
}

.visual-bars {
  height: 110px;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin: 16px 0 18px;
}

.visual-bars i {
  flex: 1;
  background: linear-gradient(to top, rgba(99, 102, 241, 0.35), rgba(129, 140, 248, 0.85));
  border-radius: 5px 5px 0 0;
  height: 25%;
}

.visual-bars i:nth-child(2) { height: 35%; }
.visual-bars i:nth-child(3) { height: 30%; }
.visual-bars i:nth-child(4) { height: 52%; }
.visual-bars i:nth-child(5) { height: 43%; }
.visual-bars i:nth-child(6) { height: 65%; }
.visual-bars i:nth-child(7) { height: 60%; }
.visual-bars i:nth-child(8) { height: 76%; }
.visual-bars i:nth-child(9) { height: 85%; }
.visual-bars i:nth-child(10) {
  height: 100%;
  background: linear-gradient(to top, #4f46e5, #34d399);
}

.visual-foot {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 12px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: #94a3b8;
}

.login-form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  position: relative;
  padding: 48px 36px;
  background: #f8fafc;
}

.login-form-side form {
  width: min(380px, 100%);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 34px 32px;
  box-shadow: var(--shadow-md);
}

.login-mark {
  width: 46px;
  height: 46px;
  background: var(--primary-soft);
  border: 1px solid #c7d2fe;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--primary);
  margin-bottom: 22px;
}

.login-mark .ic {
  width: 22px;
  height: 22px;
}

.login-form-side .eyebrow {
  display: block;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--primary);
}

.login-gate h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.025em;
  margin: 6px 0;
}

.login-gate form p {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 24px;
}

.login-gate label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-secondary);
  margin: 14px 0 6px;
}

.login-gate input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #ffffff;
  font-size: 13.5px;
  height: 44px;
}

.login-gate input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.login-gate input::placeholder {
  color: var(--muted-light);
}

.login-gate form > .button {
  width: 100%;
  margin-top: 22px;
  min-height: 44px;
  justify-content: space-between;
  font-size: 13.5px;
  padding: 0 18px;
}

.login-gate #loginError {
  display: block;
  min-height: 20px;
  color: #dc2626;
  font-size: 12px;
  margin: 8px 0 0;
}

.login-help {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 10px;
}

.login-footer {
  display: flex;
  gap: 6px;
  align-items: center;
  position: absolute;
  bottom: 28px;
  font-size: 12px;
  color: var(--muted);
}

.login-footer .ic {
  width: 14px;
  height: 14px;
}

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(3px);
  z-index: 18;
}

body:has(#loginGate:not(.hidden)) > main,
body:has(#loginGate:not(.hidden)) > .sidebar {
  display: none;
}

body:has(#loginGate:not(.hidden)) {
  height: 100vh;
  overflow: hidden;
}

.retry-message {
  margin-top: 12px;
}

@keyframes pulse {
  50% { opacity: 0.35; }
}

/* ==================== RESPONSIVE BREAKPOINTS ==================== */
@media (max-width: 1200px) {
  .sidebar { width: 224px; padding-left: 14px; padding-right: 14px; }
  main { margin-left: 224px; }
  .topbar { padding: 0 24px; }
  .view { padding: 24px 24px 0; }
  .two-col { grid-template-columns: minmax(0, 1.45fr) minmax(270px, 1fr); }
  .metrics { gap: 12px; }
  .metrics article { padding: 16px; }
  .metrics article > b { font-size: 24px; }
  .orbit-art { right: -60px; opacity: 0.55; }
}

@media (max-width: 1000px) {
  .two-col { grid-template-columns: 1fr; }
  .channel-data { grid-template-columns: 1fr 1fr; min-height: 65px; gap: 14px; }
  .channel-data > .muted { grid-column: 1 / -1; }
  .toolbar { flex-wrap: wrap; }
  .toolbar > input { flex: 1; min-width: 200px; }
  .toolbar > select { margin-left: 0; }
}

@media (max-width: 760px) {
  .sidebar { width: 248px; transform: translateX(-100%); transition: transform 0.22s ease; }
  .sidebar.open { transform: translateX(0); }
  main { margin-left: 0; }
  .mobile-menu { display: inline-flex; background: none; border: 0; color: var(--ink); padding: 4px; }
  .topbar { height: 60px; padding: 0 18px; }
  .top-divider, .synced { display: none; }
  .view { padding: 20px 18px 0; }
  .welcome { flex-wrap: wrap; align-items: flex-start; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .login-story { display: none; }
  .login-gate { grid-template-columns: 1fr; }
  .login-form-side { min-height: 100vh; }
  .channel-data { grid-template-columns: 1fr; }
  main > footer { padding: 16px 18px; }
  main > footer > span:nth-child(2) { display: none; }
}

@media (max-width: 480px) {
  .metrics { grid-template-columns: 1fr; }
  .profile-grid { grid-template-columns: 1fr; }
  .profile-wide { grid-column: auto; }
  .welcome > div:last-child { width: 100%; }
  .welcome > div:last-child .button { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Persistent smart advertising assistant, using the uploaded UI palette. */
:root { --assistant-space: 222px; }
body.has-assistant main { padding-bottom: var(--assistant-space); }
.primary-nav { border: 1px solid #6366f144; margin-bottom: 10px; }
.primary-nav .nav-new { font-size: 10px; letter-spacing: 0; }
.assistant-shortcuts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 24px 0; }
.assistant-shortcuts button { border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 18px; text-align: left; display: grid; gap: 6px; }
.assistant-shortcuts button>span { color: var(--primary); font-size: 21px; }
.assistant-shortcuts b { font-size: 13px; font-weight: 650; }
.assistant-shortcuts small { font-size: 11px; color: var(--muted); }
.assistant-shortcuts button:hover { border-color: #a5b4fc; background: var(--primary-soft); }
.chat-view { min-height: 0; }
.auto-refresh-label { font-size: 11px; color: var(--muted); white-space: nowrap; }
.auto-refresh-label[data-error="true"] { color: #b45309; }
.global-refresh { padding: 7px 10px; min-height: 34px; }
.top-right { gap: 12px; }
.assistant-dock { position: fixed; left: 248px; right: 0; bottom: 0; z-index: 16; padding: 12px 28px max(14px, env(safe-area-inset-bottom)); background: linear-gradient(180deg,#f8fafc00,#f8fafcf5 20%,#f8fafc); }
.dock-inner { max-width: 1040px; margin: 0 auto; border: 1px solid #c7d2fe; border-radius: 18px; background: #fff; box-shadow: 0 -6px 32px #0f172a0d,0 8px 24px #4f46e512; overflow: hidden; }
.dock-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 15px; border-bottom: 1px solid #eef2ff; }
.dock-heading button { border: 0; background: none; padding: 4px; display: inline-flex; gap: 8px; align-items: center; color: var(--muted); font-size: 11px; }
.dock-heading b { font-size: 13px; color: var(--ink); }
.dock-spark { color: var(--primary); font-size: 19px; }
.dock-tools { display: flex; gap: 10px; }
.dock-tools button:hover { color: var(--primary); }
.page-context-bar { padding: 8px 18px 0; display: flex; align-items: center; gap: 12px; font-size: 11px; color: var(--muted); }
.page-context-bar label { display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0; cursor: pointer; }
.page-context-bar input { width: 13px; height: 13px; margin: 0; }
#currentPageContext { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--primary); }
#assistantSyncState { margin-left: auto; white-space: nowrap; }
.assistant-dock .composer { max-width: none; width: 100%; border: 0; border-radius: 0; padding: 9px 18px 12px; box-shadow: none; margin: 0; }
.assistant-dock .composer:focus-within { box-shadow: inset 0 0 0 1px #818cf855; }
.assistant-dock .composer textarea { min-height: 42px; height: 42px; max-height: 90px; resize: none; display: block; font-size: 14px; }
.assistant-dock .composer>div { margin-top: 4px; padding-top: 5px; }
.assistant-dock .composer-hint { display: inline; margin-left: 4px; }
.assistant-dock #analysisMode { padding: 4px 8px; font-size: 11px; }
.assistant-dock #chatSend { width: 32px; height: 32px; border-radius: 8px; }
.conversation-panel { height: clamp(180px,36vh,360px); overflow-y: auto; overscroll-behavior: contain; scroll-behavior: smooth; background: #f8faff; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.conversation-panel .thread { max-width: none; width: 100%; margin: 0; gap: 14px; }
.conversation-panel .message { padding: 12px 16px; font-size: 13px; max-width: 92%; }
.conversation-panel .message.ai { width: min(100%,780px); }
.conversation-panel .plan { margin-top: 12px; }
.message-page { display: block; color: var(--muted); font-size: 10px; margin-bottom: 4px; }
.conversation-empty { display: grid; gap: 8px; color: var(--muted); place-content: center; text-align: center; min-height: 140px; font-size: 12px; }
.conversation-empty b { color: var(--ink-secondary); font-size: 15px; }
body.has-assistant .toast { bottom: calc(var(--assistant-space) + 8px); }
body:has(#loginGate:not(.hidden))>.assistant-dock { display: none; }
@media(max-width:1200px) { .assistant-dock { left:224px; padding-left:24px; padding-right:24px; } .topbar .synced { display:none; } }
@media(max-width:960px) { .topbar .help span,.topbar .top-divider { display:none; } .assistant-dock .composer-hint { display:none; } }
@media(max-width:760px) {
 .assistant-dock { left:0; padding:8px 10px max(8px,env(safe-area-inset-bottom)); }
 .dock-inner { border-radius:14px; }
 .dock-heading { padding:7px 10px; gap:5px; }
 .dock-heading b { font-size:12px; } .dock-heading button { gap:5px; }
 .dock-tools { gap:5px; } #conversationToggleText { font-size:10px; }
 .page-context-bar { padding:7px 12px 0; gap:7px; font-size:10px; } #assistantSyncState { display:none; }
 .assistant-dock .composer { padding:8px 12px 10px; } .assistant-dock .composer textarea { font-size:16px; }
 .conversation-panel { height: min(34dvh,300px); padding:12px; }
 .conversation-panel .message { font-size:13px; max-width:100%; }
 .assistant-shortcuts { grid-template-columns:1fr; gap:8px; margin:18px 0; }
 .assistant-shortcuts button { grid-template-columns:24px 1fr; gap:4px 10px; padding:12px 14px; } .assistant-shortcuts small { grid-column:2; }
 .auto-refresh-label,.top-right .help,.top-avatar { display:none; }
 .topbar { padding:0 14px; } .breadcrumb { gap:8px; font-size:11px; } .global-refresh { font-size:11px; }
}
@media(max-width:380px) { #assistantRefresh { font-size:10px; } #conversationToggleText { display:none; } }
/* Excel report studio */
.report-modes{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:24px 0}
.report-mode{display:flex;align-items:center;gap:16px;text-align:left;border:1px solid #e3e5ef;background:#fff;border-radius:16px;padding:22px;cursor:pointer;color:#475569}
.report-mode.active{border-color:#818cf8;background:#eef2ff;box-shadow:0 0 0 1px #818cf8}
.report-mode>span{display:grid;place-items:center;width:44px;height:44px;background:#e0e7ff;color:#4f46e5;border-radius:12px;font-size:24px}
.report-mode b,.report-mode small{display:block}.report-mode b{font-size:16px;color:#1e293b;margin-bottom:7px}.report-mode small{color:#64748b;font-size:12px}.report-mode i{margin-left:auto;font-size:12px;color:#94a3b8;font-style:normal}
.report-layout{display:grid;grid-template-columns:minmax(280px,.8fr) minmax(360px,1.2fr);gap:22px;align-items:start}.report-inputs,.report-design{padding:26px;min-width:0}
.report-section-heading{display:flex;gap:12px;align-items:center;margin-bottom:24px}.report-section-heading>span{width:28px;height:28px;display:grid;place-items:center;background:#eef2ff;color:#4f46e5;border-radius:50%;font-weight:700}.report-section-heading h3{margin:0 0 5px;font-size:16px}.report-section-heading small{color:#94a3b8;font-size:12px}
.report-upload{display:flex;flex-direction:column;align-items:center;gap:8px;border:1px dashed #b6bcea;background:#fafaff;border-radius:13px;padding:22px 14px;cursor:pointer;position:relative;overflow:hidden}.report-upload>span{font-size:24px;color:#6366f1}.report-upload b{font-size:14px}.report-upload small{font-size:11px;color:#94a3b8}.report-upload input{font-size:11px;max-width:100%;margin-top:8px}.report-upload.compact{padding:16px}
.report-wide{width:100%;justify-content:center;margin-top:12px}.report-file-label{font-size:12px;color:#4f46e5;overflow-wrap:anywhere;margin:16px 0 12px}.report-fields{display:grid;grid-template-columns:1fr 1fr;gap:14px}.report-fields label,.report-request-label{display:block;font-size:12px;color:#64748b;font-weight:600}.report-fields input,.report-fields select,.report-design textarea,.report-map-row select{display:block;width:100%;box-sizing:border-box;border:1px solid #e2e5ee;border-radius:9px;background:#fff;padding:11px;color:#334155;font:inherit;min-width:0;margin-top:8px}.report-design textarea{font-size:13px;line-height:1.8;resize:vertical}.report-fields input:focus,.report-fields select:focus,.report-design textarea:focus,.report-map-row select:focus{outline:2px solid #c7d2fe;border-color:#818cf8}
.report-hint{font-size:11px;line-height:1.8;color:#8993a5;margin:12px 0}.report-divider{height:1px;background:#edf0f5;margin:24px 0}.report-ai-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:12px}.report-ai-row .link{font-size:12px}.report-empty{display:flex;align-items:center;flex-direction:column;text-align:center;padding:38px 12px;color:#94a3b8;gap:12px}.report-empty>span{color:#c7d2fe;font-size:44px}.report-empty b{font-size:15px;color:#64748b}.report-empty p{font-size:12px;line-height:1.8;margin:0}
.report-metrics{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}.report-metrics label{display:flex;align-items:center;gap:6px;padding:9px 11px;border:1px solid #e2e5ee;border-radius:8px;font-size:12px}.report-metrics input{accent-color:#4f46e5}.report-request-label{margin-top:18px}.report-actions{display:flex;justify-content:flex-end;gap:10px;border-top:1px solid #edf0f5;padding-top:20px;margin-top:24px}.report-message{font-size:12px;color:#4f46e5;line-height:1.8;white-space:pre-wrap;margin:18px 0 0}.report-message.error{color:#b45309}.report-map-head,.report-map-row{display:grid;grid-template-columns:minmax(100px,.8fr) minmax(160px,1.2fr);gap:15px;align-items:center}.report-map-head{font-size:11px;color:#94a3b8;border-bottom:1px solid #edf0f5;padding:14px 0}.report-map-row{padding:6px 0}.report-map-row b{font-size:12px;font-weight:500;overflow-wrap:anywhere}.report-map-row small{display:block;font-size:10px;color:#94a3b8;margin-top:4px}.report-map-row select{font-size:12px}
.report-preview{margin-top:24px;overflow:hidden;min-width:0}.report-preview>.report-hint{padding:0 24px}.report-preview table{width:100%;font-size:12px}.report-preview td,.report-preview th{white-space:nowrap;max-width:300px;overflow:hidden;text-overflow:ellipsis;padding:14px 18px}.report-preview th{background:#f8fafc;color:#64748b}.report-preview .table-wrap{max-height:470px;overflow:auto}#reports button:disabled{opacity:.5;cursor:wait}.assistant-shortcuts{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:1100px){.report-layout{grid-template-columns:1fr}.report-inputs .report-upload{padding:16px}.report-design{min-height:350px}}
@media(max-width:760px){.report-modes{gap:10px;grid-template-columns:1fr}.report-mode{padding:16px}.report-inputs,.report-design{padding:20px}.report-layout{gap:16px}.report-fields{grid-template-columns:1fr 1fr}.report-ai-row{align-items:flex-start;flex-wrap:wrap}.report-map-head,.report-map-row{grid-template-columns:90px minmax(0,1fr);gap:8px}.report-actions{justify-content:stretch}.report-actions button{flex:1}.assistant-shortcuts{grid-template-columns:1fr}.report-preview>.report-hint{padding:0 18px}}
/* Conversation-only home and restrained product chrome. */
.settings-nav{width:100%;margin:0 0 12px}
.settings-view{max-width:1100px;margin:auto;padding-bottom:28px}
.settings-view .model-panel,.settings-view .intelligence-panel{width:100%;max-width:none}
.settings-model-label{display:block;color:var(--muted);margin:-10px 0 20px}
.new-chat-button{display:none}
.chat-home .new-chat-button{display:inline-flex;margin-left:auto}
.chat-home .topbar .top-right{display:none}
.chat-home #chat{padding:0 24px;margin:0;max-width:none;width:100%;height:calc(100dvh - 76px - var(--assistant-space));min-height:160px;box-sizing:border-box}
.home-conversation{height:100%;max-width:840px;margin:0 auto}
.home-conversation .conversation-panel{height:100%;max-height:none;box-sizing:border-box;border:0;background:transparent;padding:24px 0 16px;scrollbar-width:thin}
.home-conversation .conversation-empty{height:100%;min-height:120px;box-sizing:border-box;gap:14px}
.home-conversation .conversation-empty b{font-size:26px;font-weight:600;letter-spacing:-.6px;color:#1e293b}
.home-conversation .conversation-empty span{color:#94a3b8;font-size:13px}
.home-conversation .message{font-size:14px;line-height:1.9;padding:18px 20px}
.home-conversation .message.ai{background:transparent;border:0;box-shadow:none;padding-left:2px;padding-right:2px;width:100%;max-width:100%}
.home-conversation .message-page{display:none}
.chat-home .assistant-dock .dock-heading,.chat-home .assistant-dock .page-context-bar{display:none}
.chat-home .assistant-dock .dock-inner{max-width:840px;border:1px solid #e2e5ee;box-shadow:0 4px 20px #0f172a06}
.chat-home .assistant-dock .composer{padding:18px 20px 14px}
.chat-home .assistant-dock .composer textarea{height:54px;min-height:54px}
.composer-model-button{border:0;background:transparent;color:var(--muted);padding:2px 3px;cursor:pointer;font:inherit}
.composer-model-button::after{content:'⌄';margin-left:6px}
.composer-model-button:hover{color:var(--primary)}
.assistant-dock .composer #composerModel{width:auto;height:auto;min-width:0;display:inline-flex;align-items:center;border:0;border-radius:4px;background:transparent;color:var(--muted);padding:3px 4px;box-shadow:none;font:inherit;font-size:12px;line-height:1.4}
.assistant-dock .composer #composerModel:hover{color:var(--primary);background:#eef2ff}
.chat-home #chat{height:calc(100dvh - 64px - var(--assistant-space));flex:none}
.chat-home .home-conversation{width:100%;flex:none}
.login-gate{grid-template-columns:1fr;background:#f8fafc}
.login-form-side{min-height:100dvh;background:transparent;align-items:center;justify-content:center}
.login-form-side form{background:white;border:1px solid var(--line);border-radius:18px;padding:36px;width:min(100% - 40px,400px);box-shadow:0 8px 32px #0f172a04}
.login-gate h1{font-size:23px;margin:0 0 28px}
@media(max-width:760px){
 .chat-home #chat{height:calc(100dvh - 60px - var(--assistant-space));padding:0 18px}
 .home-conversation .conversation-empty b{font-size:23px}
 .home-conversation .conversation-panel{padding-top:16px}
 .home-conversation .message{padding:12px 14px;font-size:14px}
 .chat-home .assistant-dock .composer{padding:14px}
 .chat-home .new-chat-button{font-size:11px;padding:7px 10px}
 .login-form-side form{padding:28px;box-sizing:border-box}
}
