body.dashboard-shell {
  --bg: #f3f4f8;
  --surface: rgba(246, 247, 251, 0.82);
  --surface-strong: rgba(252, 253, 255, 0.86);
  --card: rgba(252, 253, 255, 0.72);
  --card-elevated: rgba(255, 255, 255, 0.78);
  --label: #161726;
  --label2: rgba(22, 23, 38, 0.66);
  --label3: rgba(22, 23, 38, 0.42);
  --border: rgba(88, 92, 128, 0.11);
  --border2: rgba(88, 92, 128, 0.17);
  --blue: #377dff;
  --blue-strong: #7457f5;
  --violet: #7c3cff;
  --violet-soft: rgba(124, 60, 255, 0.12);
  --cyan: #3db8ff;
  --success: #67c69e;
  --danger: #ec6d7a;
  --ox: var(--blue);
  --sb: var(--blue);
  --sl: var(--violet);
  --sg: var(--success);
  --shadow: 0 22px 54px rgba(80, 84, 120, 0.13);
  --shadow-soft: 0 14px 34px rgba(80, 84, 120, 0.09);
  --radius-lg: 18px;
  --radius-md: 20px;
  --radius-sm: 14px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 8% -8%, rgba(124, 60, 255, 0.13), transparent 34rem),
    radial-gradient(circle at 72% 0%, rgba(61, 184, 255, 0.13), transparent 30rem),
    linear-gradient(180deg, #f8f9fc 0%, #eef0f6 100%);
  color: var(--label);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
}

@media (prefers-color-scheme: dark) {
  body.dashboard-shell:not(.light-mode-qa) {
    --bg: #060910;
    --surface: rgba(12, 18, 29, 0.82);
    --surface-strong: rgba(15, 23, 37, 0.9);
    --card: rgba(15, 23, 38, 0.76);
    --card-elevated: rgba(20, 30, 48, 0.88);
    --label: #f0f5ff;
    --label2: rgba(240, 245, 255, 0.68);
    --label3: rgba(240, 245, 255, 0.42);
    --border: rgba(255, 255, 255, 0.09);
    --border2: rgba(255, 255, 255, 0.15);
    --blue: #7db2ff;
    --blue-strong: #5f91ff;
    --violet: #a090ff;
    --violet-soft: rgba(160, 144, 255, 0.16);
    --cyan: #72dcff;
    --success: #85d9b7;
    --shadow: 0 28px 62px rgba(0, 0, 0, 0.36);
    --shadow-soft: 0 16px 42px rgba(0, 0, 0, 0.28);
    background:
      radial-gradient(circle at 20% -10%, rgba(94, 145, 255, 0.22), transparent 33rem),
      radial-gradient(circle at 84% 10%, rgba(160, 144, 255, 0.2), transparent 31rem),
      linear-gradient(180deg, #050810 0%, #08101a 48%, #060911 100%);
  }
}

body.dashboard-shell * {
  box-sizing: border-box;
}

body.dashboard-shell a {
  color: inherit;
}

body.dashboard-shell .page {
  width: min(1800px, 100%);
  max-width: none;
  min-height: 100vh;
  margin: 0 auto;
  padding: 20px;
}

.command-center-shell {
  display: grid;
  grid-template-columns: clamp(92px, 18vw, 252px) minmax(560px, 1fr) clamp(72px, 25vw, 392px);
  gap: 18px;
  min-height: calc(100vh - 40px);
}

.command-nav,
.command-main,
.command-chat {
  min-width: 0;
}

.command-nav,
.chat-panel {
  position: sticky;
  top: 20px;
  height: calc(100vh - 40px);
}

.glass-panel,
.command-nav,
.chat-panel,
.surface-card,
.morning-brief,
.focus-hero {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.32)),
    var(--card);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

@media (prefers-color-scheme: dark) {
  .glass-panel,
  body.dashboard-shell:not(.light-mode-qa) .command-nav,
  body.dashboard-shell:not(.light-mode-qa) .chat-panel,
  body.dashboard-shell:not(.light-mode-qa) .surface-card,
  body.dashboard-shell:not(.light-mode-qa) .morning-brief,
  body.dashboard-shell:not(.light-mode-qa) .focus-hero {
    background:
      radial-gradient(circle at top right, rgba(125, 178, 255, 0.09), transparent 24rem),
      linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01)),
      var(--card);
  }
}

.command-nav {
  display: flex;
  flex-direction: column;
  padding: 14px;
  overflow: auto;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 6px 22px;
}

.brand-monolith {
  --identity-size: 44px;
}

.brand-copy {
  min-width: 0;
}

.brand-wordmark-text {
  font-size: 28px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.055em;
}

.brand-kicker {
  margin-top: 3px;
  line-height: 1.05;
}

.brand-kicker,
.status-line,
.reader-meta,
.snapshot-meta,
.stat-label,
.timestamp,
.compact-note,
.loading,
.field-label {
  color: var(--label2);
}

.brand-kicker,
.section-label,
.card-title,
.reader-eyebrow {
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--label3);
}

.status-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 6px 20px;
  font-size: 0.78rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 14px rgba(103, 198, 158, 0.7);
}

.nav-section {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 8px;
}

.nav-item,
.nav-child {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 11px;
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--label2);
  font: inherit;
  font-size: 1.02rem;
  font-weight: 680;
  text-align: left;
  cursor: pointer;
  line-height: 1;
}

.nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-icon,
.snapshot-card-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  line-height: 0;
}

.nav-icon .identity-asset,
.snapshot-card-icon .identity-asset {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.snapshot-card-icon {
  width: 34px;
  height: 34px;
  margin-bottom: 8px;
  filter: drop-shadow(0 8px 14px rgba(72, 99, 170, 0.12));
}

.nav-item.active {
  color: var(--label);
  background:
    linear-gradient(135deg, rgba(124, 60, 255, 0.12), rgba(55, 125, 255, 0.07)),
    rgba(255, 255, 255, 0.6);
  border-color: rgba(124, 60, 255, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 10px 24px rgba(95, 72, 190, 0.08);
}

.nav-item:hover,
.nav-child:hover {
  color: var(--label);
  background: rgba(105, 167, 255, 0.08);
}

.nav-nested {
  margin: -1px 0 4px 22px;
  padding-left: 16px;
  border-left: 1px solid rgba(124, 60, 255, 0.18);
}

.nav-child {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.82rem;
  color: var(--label3);
}

.nav-footer {
  margin-top: auto;
  padding-top: 18px;
}

.presence-pill,
.home-pill,
.mode-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border2);
  background: var(--surface);
  color: var(--label);
  font-size: 0.85rem;
  font-weight: 750;
  text-decoration: none;
  box-shadow: var(--shadow-soft);
}

.presence-pill {
  width: 100%;
  padding: 8px 12px;
  border-color: rgba(124, 60, 255, 0.24);
  background: linear-gradient(135deg, rgba(124, 60, 255, 0.11), rgba(61, 184, 255, 0.07));
}

.presence-icon,
.focus-icon {
  --identity-size: 28px;
}

.command-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  max-width: 1120px;
  overflow: hidden;
  justify-self: center;
  min-height: calc(100vh - 40px);
}

.command-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
}

.topbar-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.topbar-title h1 {
  margin: 0;
  color: var(--label);
  font-size: clamp(1.55rem, 2vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.topbar-title p {
  margin: 0;
  color: var(--label2);
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-kicker {
  color: var(--violet);
  font-size: 0.72rem;
  font-weight: 760;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.topbar-search {
  min-width: min(360px, 32vw);
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  border: 1px solid var(--border2);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--label3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
}

.morning-brief {
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(80, 84, 120, 0.08);
}

.reader-brief-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(124, 60, 255, 0.08), rgba(61, 184, 255, 0.045));
}

.reader-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brief-brand-wordmark {
  display: block;
  color: var(--label);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
}

.brief-brand-sub {
  display: block;
  margin-top: 3px;
  color: var(--label3);
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.reader-toggle,
.mode-pill,
.btn-sm,
button,
.dock-btn {
  min-height: 38px;
  border: 1px solid var(--border2);
  border-radius: 999px;
  background: var(--surface);
  color: var(--label);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 750;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.icon-toggle {
  width: 38px;
  min-width: 38px;
  padding: 0;
  font-size: 1.1rem;
  line-height: 1;
}

.reader-toggle,
.btn-sm {
  padding: 0 14px;
}

button:hover,
.dock-btn:hover,
.presence-pill:hover,
.home-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(105, 167, 255, 0.36);
}

.reader-article {
  padding: 20px 22px 22px;
}

.brief-title-row,
.focus-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.reader-eyebrow {
  margin-bottom: 14px;
  color: var(--blue);
}

.reader-title {
  margin: 0;
  max-width: none;
  color: var(--label);
  font-size: clamp(1.25rem, 2vw, 1.9rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
}

.reader-subtitle {
  max-width: 70ch;
  margin: 12px 0 0;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  color: var(--label2);
  font-size: clamp(1rem, 1.25vw, 1.16rem);
  line-height: 1.58;
}

.reader-byline,
.capture-meta,
.row,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.reader-byline {
  margin: 14px 0 16px;
}

.byline-chip,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border2);
  border-radius: 999px;
  background: var(--surface);
  color: var(--label2);
  font-size: 0.75rem;
  font-weight: 650;
}

.byline-chip {
  padding: 6px 11px;
}

.tag {
  padding: 4px 9px;
}

.chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--blue);
}

.reader-article h2 {
  margin: 16px 0 7px;
  color: var(--label);
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.025em;
}

.reader-article p {
  margin: 0 0 14px;
  color: var(--label2);
  font-size: 0.98rem;
  line-height: 1.65;
}

.brief-callout,
.focus-rationale {
  border: 1px solid rgba(105, 167, 255, 0.24);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(105, 167, 255, 0.16), rgba(143, 125, 255, 0.08));
  color: var(--label);
  line-height: 1.55;
}

.brief-callout {
  margin: 12px 0;
  padding: 14px 16px;
}

.focus-rationale {
  padding: 13px 15px;
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.brief-collapsed {
  display: none;
  padding: 18px 22px;
}

.brief-collapsed-title {
  margin-bottom: 5px;
  color: var(--label);
  font-weight: 750;
  letter-spacing: -0.02em;
}

.brief-collapsed-summary {
  color: var(--label2);
  font-size: 0.92rem;
  line-height: 1.48;
}

.morning-brief.collapsed .reader-article {
  display: none;
}

.morning-brief.collapsed .brief-collapsed {
  display: block;
}

.action-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.focus-hero,
.surface-card {
  padding: 22px;
}

.focus-hero {
  container-type: inline-size;
  width: 100%;
  min-height: clamp(292px, 32vw, 430px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  border-color: rgba(124, 60, 255, 0.2);
  background:
    radial-gradient(circle at 18% 47%, rgba(124, 60, 255, 0.12), transparent 15rem),
    radial-gradient(circle at 85% 22%, rgba(61, 184, 255, 0.1), transparent 18rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(250, 251, 255, 0.64));
}

.focus-hero-main {
  display: grid;
  grid-template-columns: minmax(136px, 0.28fr) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 36px);
  align-items: start;
  padding-right: min(28%, 250px);
}

.focus-visual {
  width: clamp(118px, 14vw, 156px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  align-self: start;
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(124, 60, 255, 0.23) 0 9%, transparent 10% 100%),
    repeating-radial-gradient(circle, rgba(124, 60, 255, 0.22) 0 1px, transparent 1px 24px);
  box-shadow: inset 0 0 34px rgba(124, 60, 255, 0.06);
}

.focus-visual-label {
  align-self: end;
  color: var(--violet);
  font-size: 0.7rem;
  font-weight: 780;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.focus-visual .focus-icon {
  --identity-size: clamp(46px, 6vw, 60px);
  filter: drop-shadow(0 12px 24px rgba(124, 60, 255, 0.24));
}

.focus-visual .focus-icon .abie-identity,
.reader-article .focus-icon .abie-identity {
  display: none;
}

.focus-copy {
  min-width: 0;
  max-width: 100%;
}

.card-title {
  margin-bottom: 12px;
  color: var(--violet);
}

.focus-label,
.focus-progress-label {
  color: var(--violet);
  font-size: 0.75rem;
  font-weight: 780;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.focus-title {
  margin: 12px 0 11px;
  color: var(--label);
  font-size: clamp(1.55rem, 4.2cqw, 3.05rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.055em;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.focus-description {
  max-width: 62ch;
  margin-bottom: 12px;
  color: var(--label2);
  font-size: 1rem;
  line-height: 1.58;
  overflow-wrap: anywhere;
}

.focus-actions {
  margin-top: 12px;
}

.focus-progress {
  position: absolute;
  right: 18px;
  top: 18px;
  bottom: auto;
  width: min(178px, 26%);
  padding: 10px 12px;
  border: 1px solid rgba(124, 60, 255, 0.15);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.48);
}

.focus-progress-value {
  margin: 4px 0 6px;
  color: var(--label);
  font-size: 1.05rem;
  font-weight: 760;
  letter-spacing: -0.05em;
}

.focus-progress-track {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(124, 60, 255, 0.1);
}

.focus-progress-track span {
  display: block;
  width: 66%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--violet), var(--blue));
}

.focus-progress-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--label3);
  font-size: 0.68rem;
}

.focus-progress-meta span:first-child {
  color: var(--success);
  font-weight: 720;
}

.btn-primary {
  padding: 0 18px;
  border-color: rgba(105, 167, 255, 0.38);
  background: linear-gradient(180deg, var(--blue), var(--blue-strong));
  color: #fff;
  box-shadow: 0 13px 26px rgba(61, 120, 234, 0.25);
}

.btn-secondary {
  padding: 0 18px;
  background: linear-gradient(180deg, rgba(143, 125, 255, 0.2), rgba(143, 125, 255, 0.1));
  color: var(--label);
}

.review-score {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 18px 0 14px;
}

.review-score strong {
  color: var(--violet);
  font-size: 3.1rem;
  letter-spacing: -0.06em;
}

.review-score span {
  color: var(--label3);
  font-weight: 750;
}

.module-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.review-card,
.events-card,
.tasks-card {
  min-height: 220px;
}

.snapshot-card {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(250, 251, 255, 0.58)),
    var(--card);
}

.review-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 14px 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.review-metrics div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.review-metrics strong {
  color: var(--violet);
  font-size: 0.84rem;
}

.review-metrics span {
  color: var(--label3);
  font-size: 0.76rem;
}

.agreement-strip {
  margin-top: 14px;
  padding: 13px 14px;
  border: 1px solid rgba(124, 60, 255, 0.14);
  border-radius: 15px;
  background: rgba(124, 60, 255, 0.055);
}

.review-link {
  margin-top: 12px;
}

.list-stack,
.simple-list {
  display: flex;
  flex-direction: column;
}

.snapshot-item,
.inline-item,
.capture-item,
.search-result {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
}

.snapshot-item:last-child,
.inline-item:last-child,
.capture-item:last-child,
.search-result:last-child {
  border-bottom: 0;
}

.snapshot-title,
.capture-text {
  color: var(--label);
  font-weight: 680;
  letter-spacing: -0.018em;
  line-height: 1.38;
}

.snapshot-meta,
.timestamp,
.empty-state,
.compact-note,
.loading {
  font-size: 0.84rem;
  line-height: 1.5;
}

.empty-state {
  color: var(--label3);
}

.events-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.event-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}

.event-row:last-child {
  border-bottom: 0;
}

.event-time {
  color: var(--blue);
  font-weight: 750;
  font-size: 0.82rem;
}

.activity-panel {
  display: none;
  flex-direction: column;
  gap: 18px;
}

.activity-panel.active,
.focus-panel.active {
  display: flex;
}

.focus-panel {
  display: none;
  flex-direction: column;
  gap: 18px;
}

.activity-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

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

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--border2);
  border-radius: 16px;
  background: var(--surface);
  color: var(--label);
  font: inherit;
  font-size: 0.94rem;
  outline: 0;
  padding: 11px 13px;
}

textarea {
  min-height: 88px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(105, 167, 255, 0.46);
  box-shadow: 0 0 0 4px rgba(105, 167, 255, 0.12);
}

.brief-output {
  display: none;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--border2);
  border-radius: 16px;
  background: var(--surface);
  color: var(--label2);
  font-size: 0.9rem;
  line-height: 1.58;
  white-space: pre-wrap;
}

.template-form {
  display: none;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--border2);
  border-radius: 18px;
  background: var(--surface);
}

.template-form.active {
  display: block;
}

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

.template-grid .full {
  grid-column: 1 / -1;
}

.bar-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 9px;
}

.bar-label {
  min-width: 0;
  color: var(--label2);
  font-size: 0.78rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface);
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--violet));
}

.stat-number {
  color: var(--label);
  font-size: 3rem;
  font-weight: 750;
  letter-spacing: -0.06em;
  line-height: 1;
}

.chat-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(250, 251, 255, 0.66)),
    var(--card);
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(124, 60, 255, 0.065), rgba(61, 184, 255, 0.04));
}

.chat-persona {
  display: flex;
  align-items: center;
  gap: 11px;
}

.chat-title {
  color: var(--label);
  font-weight: 760;
  letter-spacing: -0.025em;
}

.chat-subtitle {
  margin-top: 3px;
  color: var(--label3);
  font-size: 0.76rem;
  font-weight: 650;
}

.chat-state {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 16px rgba(103, 198, 158, 0.6);
}

.chat-thread {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
}

.chat-bubble {
  max-width: 86%;
  padding: 13px 15px;
  border-radius: 16px;
  font-size: 0.94rem;
  line-height: 1.5;
  word-break: break-word;
  white-space: pre-wrap;
}

.abie-bubble {
  align-self: flex-start;
  border: 1px solid rgba(88, 92, 128, 0.13);
  border-bottom-left-radius: 7px;
  background: rgba(248, 249, 253, 0.86);
  color: var(--label);
  box-shadow: 0 10px 26px rgba(80, 84, 120, 0.08);
}

.user-bubble {
  align-self: flex-end;
  border-bottom-right-radius: 7px;
  background: linear-gradient(135deg, #8a5cff, #5f7bff);
  color: #fff;
  box-shadow: 0 12px 28px rgba(124, 60, 255, 0.22);
}

.chat-typing {
  align-self: flex-start;
  color: var(--label3);
  font-size: 0.84rem;
  font-style: italic;
}

.chat-compose {
  padding: 16px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(124, 60, 255, 0.04), rgba(255, 255, 255, 0.42));
}

.input-mode-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1.25fr;
  gap: 8px;
  margin-bottom: 10px;
}

.input-mode {
  min-height: 38px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.76rem;
  text-decoration: none;
}

.input-mode.active {
  border-color: rgba(105, 167, 255, 0.34);
  background: linear-gradient(180deg, rgba(105, 167, 255, 0.17), rgba(143, 125, 255, 0.08));
}

.voice-mode {
  gap: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.voice-chat-control {
  min-height: 46px;
  border-color: rgba(124, 60, 255, 0.24);
  background: radial-gradient(circle at 50% 50%, rgba(124, 60, 255, 0.16), rgba(255, 255, 255, 0.54));
  color: var(--label);
  font-weight: 760;
}

.voice-chat-control .presence-icon {
  --identity-size: 34px;
  filter: drop-shadow(0 8px 18px rgba(124, 60, 255, 0.26));
}

.chat-input-row {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  padding: 8px;
  border: 1px solid var(--border2);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

.chat-input-row textarea {
  min-height: 46px;
  max-height: 130px;
  resize: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 11px 4px;
}

.chat-input-row button {
  height: 40px;
  padding: 0;
  flex: 0 0 auto;
}

.chat-input-row textarea:focus {
  box-shadow: none;
}

.chat-icon-btn,
.send-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-height: 40px;
  border-radius: 999px;
  text-decoration: none;
  flex: 0 0 auto;
}

.chat-icon-btn {
  border: 0;
  background: transparent;
  color: var(--label2);
  font-size: 1.04rem;
  box-shadow: none;
}

.triad-btn .presence-icon {
  --identity-size: 28px;
}

.send-arrow {
  font-size: 1.3rem;
  font-weight: 800;
}

.chat-hint {
  margin-top: 7px;
  color: var(--label3);
  font-size: 0.76rem;
}

.floating-actions {
  position: fixed;
  right: 22px;
  top: 22px;
  bottom: auto;
  z-index: 40;
}

.fab-toggle {
  width: 58px;
  height: 58px;
  border-radius: 999px;
  border-color: rgba(105, 167, 255, 0.36);
  background: linear-gradient(135deg, #8a5cff, #4d7fff);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  box-shadow: 0 18px 38px rgba(61, 120, 234, 0.28);
}

.fab-menu {
  position: absolute;
  right: 0;
  top: 68px;
  bottom: auto;
  display: none;
  min-width: 210px;
  padding: 8px;
  border: 1px solid var(--border2);
  border-radius: 22px;
  background: var(--card-elevated);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.floating-actions:hover .fab-menu,
.floating-actions:focus-within .fab-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dock-btn {
  justify-content: flex-start;
  min-height: 40px;
  padding: 0 12px;
  text-decoration: none;
  box-shadow: none;
}

.tab-bar {
  display: none;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.focus-panel.active,
.activity-panel.active {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

@media (max-width: 1320px) {
  .command-center-shell {
    grid-template-columns: 92px minmax(560px, 1fr) 72px;
  }

  .command-chat {
    min-width: 72px;
  }

  .chat-panel {
    display: none;
  }

  .command-nav {
    padding: 14px 10px;
  }

  .nav-brand {
    justify-content: center;
    padding-bottom: 12px;
  }

  .nav-brand .brand-copy,
  .status-line,
  .nav-label,
  .nav-nested,
  .nav-footer span:not(.identity-stack) {
    display: none;
  }

  .nav-item {
    justify-content: center;
    padding: 0;
  }

  .nav-icon {
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 780px) {
  html,
  body.dashboard-shell {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body.dashboard-shell .page {
    width: 100%;
    max-width: 100%;
    padding: 12px;
    overflow-x: hidden;
  }

  .command-center-shell {
    width: 100%;
    max-width: 100%;
    grid-template-columns: 1fr;
    min-height: auto;
    overflow-x: hidden;
  }

  .command-main {
    order: 1;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .command-nav {
    order: 2;
  }

  .command-chat {
    order: 3;
  }

  .command-nav,
  .chat-panel {
    position: relative;
    top: auto;
    height: auto;
  }

  .command-nav {
    max-height: none;
  }

  .nav-brand .brand-copy,
  .status-line,
  .nav-label,
  .nav-nested,
  .nav-footer span:not(.identity-stack) {
    display: none;
  }

  .nav-item {
    justify-content: center;
    padding: 0;
  }

  .command-topbar,
  .reader-brief-header,
  .chat-header {
    width: 100%;
    max-width: 100%;
    align-items: flex-start;
    flex-direction: column;
  }

  .command-topbar {
    gap: 12px;
  }

  .topbar-title,
  .topbar-title p,
  .focus-panel,
  .action-grid,
  .focus-hero,
  .focus-hero-main,
  .focus-copy,
  .morning-brief,
  .reader-article,
  .reader-subtitle,
  .brief-callout,
  .surface-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .topbar-title p {
    max-width: min(100%, 270px) !important;
  }

  .focus-copy,
  .focus-title,
  .focus-description {
    max-width: min(100%, 270px) !important;
  }

  .topbar-title p,
  .focus-title,
  .focus-description,
  .focus-rationale,
  .reader-title,
  .reader-subtitle,
  .brief-callout {
    max-width: 100%;
  }

  .topbar-actions,
  .action-grid,
  .module-grid,
  .activity-grid,
  .utility-grid,
  .template-grid {
    grid-template-columns: 1fr;
  }

  .topbar-actions {
    display: grid;
    width: 100%;
  }

  .reader-title,
  .focus-title {
    max-width: none;
  }

  .focus-title {
    font-size: clamp(1.05rem, 5vw, 1.32rem);
    line-height: 1.1;
  }

  .focus-description,
  .focus-rationale {
    max-width: 100%;
  }

  .focus-hero {
    min-height: 0;
    padding: 20px 12px;
  }

  .focus-hero-main {
    grid-template-columns: 1fr;
    padding-right: 0;
  }

  .focus-visual {
    width: 142px;
  }

  .focus-progress {
    position: static;
    width: 100%;
    margin-top: 18px;
  }

  .floating-actions {
    top: 14px;
    right: 14px;
    bottom: auto;
  }

  .fab-toggle {
    width: 48px;
    height: 48px;
    font-size: 1.7rem;
  }

  .fab-menu {
    top: 58px;
    right: 0;
    bottom: auto;
  }

  .input-mode-row {
    grid-template-columns: 1fr;
  }
}
