/*
 * YC Design System — application.css
 * Exact YC aesthetic: cream + black. Source Serif 4 + Outfit. No accent colors.
 * See DESIGN.md for the full design system specification.
 */

/* ===== CSS Custom Properties ===== */
:root {
  /* Surfaces — YC exact */
  --bg-page: #FFFFFF;
  --bg-surface: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-elevated: #F0EFE8;
  --bg-inset: #F5F5F5;

  /* Borders — YC uses none; we use ultra-subtle for data tables */
  --border-subtle: rgba(0, 0, 0, 0.06);

  /* Text */
  --text-primary: #16140F;
  --text-secondary: #16140F;
  --text-muted: #16140F;

  /* Score colors — semantic, not accent */
  --score-high: #16803C;
  --score-mid: #EAB308;
  --score-low: #F97316;
  --score-critical: #EF4444;

  /* Fonts — YC exact */
  --font-display: "Outfit", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Outfit", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

/* ===== Base ===== */
body {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 300;
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.5;
}
.font-mono, code, pre, kbd, samp {
  font-family: var(--font-mono);
}

/* Global interaction */
a, button, [role="button"], select, label[for], summary {
  cursor: pointer;
}
:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== Typography — YC scale ===== */
h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
  line-height: 1.2;
}
h1 {
  font-family: var(--font-display);
  font-size: 80px;
  font-weight: 400;
  line-height: 1.1;
}
h2 {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 400;
  line-height: 1.2;
}
h3 {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 500;
}
h4 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
}
/* Interior pages: scale down headings from hero sizes */
main h1 {
  font-size: 48px;
  line-height: 1.2;
}
main h1.hero-heading {
  font-size: 56px;
  line-height: 1.1;
}
.section-heading {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.2;
}
main h2 {
  font-size: 28px;
}
@media (max-width: 768px) {
  h1 { font-size: 32px; line-height: 1.2; }
  h2 { font-size: 22px; }
  main h1 { font-size: 32px; }
  main h2 { font-size: 22px; }
  .section-heading { font-size: 24px; }
}

/* ===== Navigation — YC exact ===== */
nav.nav-bar {
  background: #16140F;
}
nav.nav-bar a,
nav.nav-bar button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  font-weight: 400;
  color: #FFFFFF;
  text-decoration: none;
}
.nav-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 200;
  color: #FFFFFF;
  text-decoration: none;
}
.nav-user-menu {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}
.nav-user-menu form {
  display: inline;
  margin: 0;
  padding: 0;
  line-height: 1;
}
.nav-user-email {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}
.nav-logout {
  font-size: 12px !important;
  color: rgba(255, 255, 255, 0.45) !important;
  min-height: auto !important;
  padding: 0 !important;
  background: none !important;
  border: none !important;
  cursor: pointer;
  transition: color 0.15s ease;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.nav-logout:hover {
  color: rgba(255, 255, 255, 0.85) !important;
}
.nav-cta {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF !important;
  padding: 4px 16px 6px;
  border-radius: 9999px;
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.01em;
}
.nav-cta:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* ===== Card System — YC: no borders, spacing creates hierarchy ===== */
.card {
  background: var(--bg-card);
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
}
.card-accent-top {
  background: var(--bg-card);
  border-radius: 6px;
}
.surface {
  background: var(--bg-surface);
  border-radius: 6px;
}
.inset {
  background: var(--bg-inset);
  border-radius: 4px;
}
.copy-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 6px;
  padding: 14px 16px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.copy-block:hover {
  background: #FAFAF6;
}
.copy-block:active {
  background: var(--bg-elevated);
}
.copy-block-icon {
  color: var(--text-muted);
  flex-shrink: 0;
  transition: color 0.15s ease;
}
.copy-block:hover .copy-block-icon {
  color: var(--text-primary);
}

/* Card hover */
.card-hover {
  transition: background-color 0.15s ease;
}
.card-hover:hover {
  background: #F8F8F4;
}

/* ===== Admin-only indicator ===== */
.admin-only {
  position: relative;
  border: 1px dashed var(--text-muted);
  border-radius: 6px;
  padding: 12px;
  transition: opacity 150ms ease, max-height 300ms ease;
}
.admin-only::before {
  content: "Admin";
  position: absolute;
  top: -8px;
  left: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-page);
  padding: 0 6px;
  letter-spacing: 0.05em;
}
/* Hide admin panels when toggled */
body.admin-hidden .admin-only {
  display: none;
}
/* Admin toggle button */
.admin-toggle-btn {
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 50;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--text-primary);
  color: var(--bg-page);
  border: none;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 150ms ease;
}
.admin-toggle-btn:hover {
  opacity: 1;
}

/* ===== Overall Score Ring ===== */
.overall-score-ring {
  width: 7rem;
  height: 7rem;
  border-radius: 50%;
  border: 2px solid var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
}
.score-ring-value {
  font-family: var(--font-body);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}
.score-ring-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ===== Score Bars (animated) ===== */
.score-bar {
  height: 0.5rem;
  background: var(--bg-elevated);
  border-radius: 9999px;
  overflow: hidden;
  flex: 1;
}
.score-bar-fill {
  height: 100%;
  border-radius: 9999px;
  width: 0%;
  animation: scoreGrow 0.6s ease-out forwards;
}
@keyframes scoreGrow {
  from { width: 0%; }
  to { width: var(--target-width); }
}

/* Score fill colors */
.score-fill-high { background: var(--score-high); }
.score-fill-mid { background: var(--score-mid); }
.score-fill-low { background: var(--score-low); }
.score-fill-critical { background: var(--score-critical); }
.score-fill-neutral { background: #9CA3AF; }

/* Tabular numbers for scores and data */
.score-bar, .dimension-chip, .data-table td {
  font-variant-numeric: tabular-nums;
}

/* ===== Dimension Chips (compact inline scores) ===== */
.dimension-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.mini-bar {
  width: 2.5rem;
  height: 0.25rem;
  background: var(--bg-inset);
  border-radius: 9999px;
  overflow: hidden;
}
.mini-bar-fill {
  height: 100%;
  border-radius: 9999px;
}

/* ===== Prose / Markdown Overrides ===== */
.prose {
  max-width: 68ch;
}
.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  color: var(--text-primary);
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}
.prose h2 {
  font-family: var(--font-display);
  font-weight: 400;
}
.prose h3,
.prose h4 {
  font-family: var(--font-body);
}
.prose p {
  color: var(--text-primary);
  line-height: 1.7;
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
}
.prose li {
  color: var(--text-primary);
  line-height: 1.7;
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
}
.prose strong {
  color: var(--text-primary);
  font-weight: 600;
}
.prose a {
  color: var(--text-primary);
  text-decoration: underline;
  text-decoration-color: rgba(0, 0, 0, 0.3);
}
.prose a:hover {
  text-decoration-color: var(--text-primary);
}
.prose code {
  color: var(--text-primary);
  background: var(--bg-inset);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.875em;
}
.prose pre {
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 1rem;
  overflow-x: auto;
}
.prose pre code {
  background: transparent;
  padding: 0;
  color: var(--text-primary);
}
.prose blockquote {
  border-left: 2px solid var(--text-muted);
  padding-left: 1rem;
  color: var(--text-secondary);
  font-style: italic;
}
.prose ul {
  list-style: disc;
  padding-left: 1.5rem;
}
.prose ol {
  list-style: decimal;
  padding-left: 1.5rem;
}
.prose ul > li::marker,
.prose ol > li::marker {
  color: var(--text-muted);
}
.prose hr {
  border-color: var(--border-subtle);
}
.prose table {
  width: 100%;
  border-collapse: collapse;
}
.prose th {
  text-align: left;
  padding: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.875rem;
}
.prose td {
  padding: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

/* ===== Ghost session de-emphasis ===== */
.ghost-session {
  opacity: 0.4;
  transition: opacity 0.2s ease;
}
.ghost-session:hover {
  opacity: 0.7;
}

/* ===== Custom scrollbar ===== */
.scroll::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.scroll::-webkit-scrollbar-track {
  background: var(--bg-inset);
  border-radius: 4px;
}
.scroll::-webkit-scrollbar-thumb {
  background: #C5C0B8;
  border-radius: 4px;
}
.scroll::-webkit-scrollbar-thumb:hover {
  background: #A09A93;
}

/* ===== Details/summary marker transitions ===== */
details > summary {
  list-style: none;
}
details > summary::-webkit-details-marker {
  display: none;
}
details > summary::before {
  content: "\25B8";
  display: inline-block;
  margin-right: 0.4em;
  transition: transform 0.15s ease;
  font-size: 0.75em;
  color: var(--text-muted);
}
details[open] > summary::before {
  transform: rotate(90deg);
}

/* Rubric popover */
.rubric-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  margin-left: 0.25rem;
}
.rubric-popover {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  width: 320px;
  padding: 0.75rem;
  border-radius: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
.rubric-trigger:hover .rubric-popover,
.rubric-trigger:focus .rubric-popover,
.rubric-trigger:focus-within .rubric-popover {
  display: block;
}
.rubric-popover-left {
  left: 0;
  transform: none;
}
.rubric-popover-title {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.rubric-popover-desc {
  font-size: 0.6875rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}
.rubric-row {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 0.5rem;
  align-items: center;
  padding: 0.3rem 0.4rem;
  border-radius: 4px;
  font-size: 0.75rem;
}
.rubric-row-active {
  background: var(--bg-elevated);
}
.rubric-range {
  font-family: ui-monospace, monospace;
  font-size: 0.6875rem;
  color: var(--text-muted);
}
.rubric-desc {
  color: var(--text-secondary);
  font-size: 0.6875rem;
}

/* Episode cards: no disclosure arrow */
details.episode-card > summary::before {
  display: none;
}

/* Details expand/collapse smooth transition */
details .details-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.2s ease;
}
details[open] .details-content {
  grid-template-rows: 1fr;
}
details .details-content > div {
  overflow: hidden;
}

/* ===== Word-break for long evidence text in tables ===== */
.break-words-cell {
  max-width: 24rem;
  word-break: break-word;
  overflow-wrap: break-word;
}

/* ===== Badge System ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

/* ===== Data Table ===== */
.data-table thead tr {
  border-bottom: 1px solid var(--border-subtle);
}
.data-table th {
  color: var(--text-secondary);
  font-weight: 500;
}
.data-table tbody tr {
  border-bottom: 1px solid var(--border-subtle);
}
.data-table tbody tr:hover {
  background: rgba(0, 0, 0, 0.03);
}
.data-table td {
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.data-table tfoot tr {
  border-top: 2px solid var(--border-subtle);
}

/* ===== Accent link — YC: black text, underline on hover ===== */
.accent-link {
  color: var(--text-primary);
  transition: color 0.15s ease;
}
.accent-link:hover {
  text-decoration: underline;
}

/* ===== Primary button — YC exact: pill, serif, black ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 8px 40px 10px;
  background: #000000;
  color: #F5F5EE;
  border: none;
  border-radius: 9999px;
  font-size: 14px;
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.24px;
  transition: opacity 0.15s ease;
  cursor: pointer;
  min-height: 44px;
}
.btn-primary:hover {
  opacity: 0.85;
}
.btn-primary:active {
  transform: scale(0.98);
}
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
/* CTA pill — larger version of btn-primary for landing page CTAs */
.cta-pill {
  display: inline-flex;
  align-items: center;
  padding: 14px 40px 16px;
  background: #000000;
  color: #F5F5EE;
  border: none;
  border-radius: 9999px;
  font-size: 16px;
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.24px;
  transition: opacity 0.15s ease;
  cursor: pointer;
  text-decoration: none;
  min-height: 44px;
}
.cta-pill:hover { opacity: 0.85; }
.cta-pill:active { transform: scale(0.98); }
@media (max-width: 768px) {
  .cta-pill { width: 100%; justify-content: center; }
}
/* Small variant for inline/compact contexts */
.btn-primary-sm {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px 8px;
  background: #000000;
  color: #F5F5EE;
  border: none;
  border-radius: 9999px;
  font-size: 13px;
  font-family: var(--font-display);
  font-weight: 400;
  transition: opacity 0.15s ease;
  cursor: pointer;
}
.btn-primary-sm:hover { opacity: 0.85; }
/* Secondary button: cream bg, dark text, pill shape */
.btn-secondary-sm {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px 8px;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: none;
  border-radius: 9999px;
  font-size: 13px;
  font-family: var(--font-body);
  font-weight: 400;
  transition: color 0.15s ease, background 0.15s ease;
  cursor: pointer;
}
.btn-secondary-sm:hover {
  color: var(--text-primary);
  background: #E8E7DF;
}

/* ===== Progress bar (processing state) ===== */
.progress-track {
  background: var(--bg-elevated);
  border-radius: 9999px;
}
.progress-bar {
  background: var(--text-primary);
  border-radius: 9999px;
  transition: width 0.5s ease;
}

/* ===== Details Sidebar Nav ===== */
.details-layout {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}
.details-sidebar {
  position: sticky;
  top: 1rem;
  width: 220px;
  min-width: 220px;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  padding: 0.75rem 0;
  scrollbar-width: thin;
  scrollbar-color: #C5C0B8 transparent;
}
.details-sidebar::-webkit-scrollbar {
  width: 4px;
}
.details-sidebar::-webkit-scrollbar-thumb {
  background: #C5C0B8;
  border-radius: 2px;
}
.details-main {
  flex: 1;
  min-width: 0;
}
.sidebar-section-label {
  display: block;
  padding: 0.125rem 0.75rem;
  margin-top: 0.75rem;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.sidebar-section-label:first-child {
  margin-top: 0;
}
.sidebar-date-label {
  display: block;
  padding: 0.125rem 0.75rem;
  margin-top: 0.5rem;
  font-size: 0.625rem;
  font-weight: 500;
  color: var(--text-secondary);
  font-family: ui-monospace, monospace;
}
.sidebar-link {
  display: block;
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.12s ease, background 0.12s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.sidebar-link:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.03);
}
.sidebar-link.sidebar-active {
  color: var(--text-primary);
  font-weight: 500;
  background: rgba(0, 0, 0, 0.04);
}
.sidebar-link.sidebar-session {
  padding-left: 1.25rem;
  font-size: 0.6875rem;
}

[data-sidebar-nav-target="section"] {
  scroll-margin-top: 1rem;
}

@media (max-width: 1024px) {
  .details-sidebar {
    display: none;
  }
  .details-layout {
    display: block;
  }
}

/* ===== Chat Interface ===== */
.chat-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
/* Remove nav bottom margin when chat is full_bleed */
body:has(.chat-layout) .nav-bar {
  margin-bottom: 0;
}

/* Chat Sidebar */
.chat-sidebar {
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.chat-sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}
.chat-sidebar-header h2 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}
.chat-new-btn {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  background: #000000;
  color: #F5F5EE;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  transition: opacity 0.15s ease;
}
.chat-new-btn:hover {
  opacity: 0.85;
}
.chat-sidebar-list {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #C5C0B8 transparent;
}
.chat-sidebar-item {
  display: block;
  padding: 0.75rem 1rem;
  text-decoration: none;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.12s ease;
}
.chat-sidebar-item:hover {
  background: rgba(0, 0, 0, 0.04);
}
.chat-sidebar-item.active {
  background: rgba(0, 0, 0, 0.06);
  font-weight: 500;
}
.chat-sidebar-title {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-sidebar-date {
  display: block;
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
}
.chat-sidebar-empty {
  padding: 2rem 1rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: center;
}
.chat-sidebar-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  gap: 0.75rem;
  font-size: 0.75rem;
}
.chat-back-link {
  color: var(--text-secondary);
  text-decoration: none;
}
.chat-back-link:hover { color: var(--text-primary); }
.chat-export-link {
  color: var(--text-primary);
  text-decoration: none;
}
.chat-export-link:hover { text-decoration: underline; }
.chat-delete-link {
  color: var(--score-low);
  text-decoration: none;
  margin-left: auto;
}
.chat-delete-link:hover { opacity: 0.8; }

/* Main chat area */
.chat-main {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem max(1.5rem, calc((100% - 680px) / 2));
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}
.chat-header-title {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}
.chat-header-title h1 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}
.chat-header-slug {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}
.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
/* Model/thinking select dropdowns */
.chat-select {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.15s ease;
  font-family: var(--font-body);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 1.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%238A847D' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.35rem center;
}
.chat-select:hover { border-color: var(--text-muted); }
.chat-select:focus { border-color: var(--text-primary); }
.chat-select option {
  background: var(--bg-card);
  color: var(--text-primary);
}
.chat-shortcut-hint {
  font-size: 0.6875rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Messages — centered 680px column via dynamic padding */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 2rem max(2.5rem, calc((100% - 680px) / 2));
  scrollbar-width: thin;
  scrollbar-color: #C5C0B8 transparent;
  background: var(--bg-page);
}
.chat-empty-state {
  text-align: center;
  min-height: calc(100% - 2rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.chat-empty-state h3 {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.chat-empty-state p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  max-width: 400px;
  margin: 0 auto;
}

/* Conversation starters */
.chat-starters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  max-width: 500px;
  margin: 1.5rem auto 0;
}
.chat-starter-btn {
  background: var(--bg-card);
  border: none;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  text-align: left;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  line-height: 1.4;
}
.chat-starter-btn:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

/* Bubbles */
.chat-bubble {
  margin-bottom: 1.5rem;
  line-height: 1.6;
}
.chat-bubble-user {
  margin-left: auto;
  max-width: 70%;
  width: fit-content;
  background: var(--text-primary);
  color: var(--bg-page);
  border-radius: 1.25rem 1.25rem 0.25rem 1.25rem;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  white-space: pre-line;
}
.chat-bubble-assistant {
  max-width: 100%;
  background: transparent;
  padding: 0 0.25rem;
  font-size: 0.9375rem;
  color: var(--text-primary);
}
.chat-bubble-assistant p:first-child { margin-top: 0; }
.chat-bubble-assistant p:last-child { margin-bottom: 0; }
/* Chat-scoped heading scale — much smaller than page headings */
.chat-bubble-assistant h1 {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 1rem 0 0.5rem;
}
.chat-bubble-assistant h2 {
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0.75rem 0 0.375rem;
}
.chat-bubble-assistant h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0.75rem 0 0.25rem;
}
.chat-bubble-assistant h4 {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0.5rem 0 0.25rem;
}
/* Prose-like spacing for markdown inside chat bubbles */
.chat-bubble-assistant p {
  margin: 0.5rem 0;
  line-height: 1.6;
}
.chat-bubble-assistant ul,
.chat-bubble-assistant ol {
  padding-left: 1.5rem;
  margin: 0.5rem 0;
}
.chat-bubble-assistant li {
  margin: 0.25rem 0;
}
.chat-bubble-assistant blockquote {
  border-left: 2px solid var(--text-muted);
  padding-left: 1rem;
  color: var(--text-secondary);
  font-style: italic;
  margin: 0.5rem 0;
}
.chat-bubble-assistant a {
  color: var(--text-primary);
  text-decoration: underline;
}
.chat-bubble-assistant pre {
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 0.75rem;
  overflow-x: auto;
  font-size: 0.8125rem;
}
.chat-bubble-assistant code {
  font-size: 0.8125rem;
  background: var(--bg-inset);
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
}
.chat-bubble-assistant pre code {
  background: none;
  padding: 0;
}
/* Thinking bubble (live streaming) */
.chat-bubble-thinking {
  background: transparent;
  border: none;
  border-left: 2px solid var(--bg-elevated);
  border-radius: 0;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  max-width: 100%;
  margin-bottom: 0.5rem;
}
.chat-thinking-header {
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-style: italic;
}
.chat-thinking-counter {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  opacity: 0.7;
}
.chat-thinking-text {
  white-space: pre-wrap;
  font-style: italic;
}

/* Tool chips (inline, wrapping) */
.chat-tool-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 0.5rem;
  max-width: 100%;
  align-items: center;
  font-size: 0.75rem;
  font-family: var(--font-mono);
}
.chat-tool-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  background: transparent;
  border: none;
  border-radius: 0;
  color: var(--text-muted);
  white-space: nowrap;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-tool-chip-done {
  color: var(--text-secondary);
}
.chat-tool-chip-check {
  color: var(--text-secondary);
  font-size: 0.75rem;
  flex-shrink: 0;
}
.chat-tool-overflow {
  display: inline;
}
.chat-tool-overflow .chat-tool-chip {
  margin-top: 0.125rem;
}
.chat-tool-overflow-toggle {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  background: none;
  border: 1px dashed var(--border-subtle);
  border-radius: 1rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  cursor: pointer;
  white-space: nowrap;
}
.chat-tool-overflow-toggle:hover {
  color: var(--text-secondary);
  border-color: var(--text-muted);
}
.chat-tool-overflow-details {
  display: inline;
}
.chat-tool-overflow-details[open] .chat-tool-overflow-toggle {
  margin-bottom: 0.25rem;
}
.chat-tool-overflow-details[open] .chat-tool-overflow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

/* Reasoning traces (historical messages) */
.chat-reasoning-details {
  max-width: 100%;
  margin-bottom: 0.25rem;
}
.chat-reasoning-summary {
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem 0;
  font-family: var(--font-mono);
}
.chat-reasoning-summary:hover { color: var(--text-secondary); }
.chat-reasoning-content {
  border-left: 2px solid var(--border-subtle);
  padding-left: 0.75rem;
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
}
.chat-reasoning-thinking {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: pre-wrap;
  font-style: italic;
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 0.5rem;
}
.chat-reasoning-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: pre-wrap;
  margin-bottom: 0.5rem;
}
.chat-reasoning-tool {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  padding: 0.125rem 0;
}
.chat-reasoning-tool-check {
  color: var(--score-high);
}
.chat-reasoning-tool-name {
  font-weight: 500;
  color: var(--text-secondary);
}
.chat-reasoning-tool-query {
  color: var(--text-muted);
}
.chat-reasoning-tool-duration {
  color: var(--text-muted);
  margin-left: auto;
}

/* Cost badge */
.chat-cost-badge {
  display: block;
  font-size: 0.625rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-align: right;
  margin-top: 0.5rem;
  opacity: 0.7;
}

.chat-typing {
  color: var(--text-muted);
  font-style: italic;
}

/* Bouncing dots loading animation */
.chat-loading-dots {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0;
}
.chat-dot {
  width: 0.5rem;
  height: 0.5rem;
  background: var(--text-secondary);
  border-radius: 50%;
  animation: chat-bounce 1.2s ease-in-out infinite;
}
.chat-dot:nth-child(2) { animation-delay: 0.15s; }
.chat-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes chat-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-0.5rem); opacity: 1; }
}

/* Tool status spinner */
.chat-tool-spinner {
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  border: 2px solid rgba(0, 0, 0, 0.15);
  border-top-color: var(--text-primary);
  border-radius: 50%;
  animation: chat-spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 0.35rem;
}
@keyframes chat-spin {
  to { transform: rotate(360deg); }
}

/* Retry notice for orphaned messages */
.chat-retry-notice {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  color: var(--score-low);
  background: rgba(220, 38, 38, 0.06);
  border: 1px solid rgba(220, 38, 38, 0.15);
  border-radius: 6px;
  margin-bottom: 1rem;
}
.chat-retry-btn {
  background: rgba(220, 38, 38, 0.1);
  color: var(--score-low);
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: 6px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  cursor: pointer;
  font-weight: 500;
}
.chat-retry-btn:hover {
  background: rgba(220, 38, 38, 0.15);
}

/* Session links */
.chat-session-link {
  color: var(--text-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.chat-session-link:hover {
  opacity: 0.7;
}

/* Input area */
.chat-input-area {
  padding: 1rem max(1.5rem, calc((100% - 680px) / 2));
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}
.chat-input-wrapper {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}
.chat-textarea {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-family: var(--font-body);
  color: var(--text-primary);
  resize: none;
  outline: none;
  transition: border-color 0.15s ease;
  max-height: 200px;
}
.chat-textarea:focus {
  border-color: var(--text-primary);
}
.chat-textarea::placeholder {
  color: var(--text-muted);
}
.chat-send-btn {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000000;
  color: #F5F5EE;
  font-size: 0;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.chat-send-btn:hover { opacity: 0.85; }
.chat-send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .chat-layout {
    grid-template-columns: 1fr;
  }
  .chat-sidebar {
    display: none;
  }
}

/* ===== Print Stylesheet ===== */
@media print {
  body {
    background: white;
  }
  .overall-score-ring {
    animation: none;
  }
  .score-bar-fill {
    animation: none;
  }
  .card, .card-accent-top, .surface {
    box-shadow: none;
    border-color: #e5e7eb;
  }
}

/* ===== Admin Panel ===== */
.admin-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
.admin-sidebar {
  background: #16140F;
  border-right: none;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.admin-sidebar-header {
  padding: 20px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.admin-sidebar-brand {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: 18px;
  color: #FFFFFF;
}
.admin-sidebar-badge {
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.4);
}
.admin-sidebar-nav {
  flex: 1;
  padding: 8px 0;
}
.admin-nav-group-label {
  padding: 20px 16px 6px;
  font-size: 10px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.admin-nav-group-label:first-child {
  padding-top: 4px;
}
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  border-left: 3px solid transparent;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.admin-nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.9);
}
.admin-nav-item.active {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  font-weight: 500;
  border-left-color: #FF6600;
}
.admin-nav-badge {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: 9999px;
}
.admin-sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: auto;
}
.admin-main {
  padding: 32px;
  max-width: 1200px;
}
.admin-page-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 24px;
  margin-bottom: 24px;
  color: var(--text-primary);
}
.admin-page-subtitle {
  font-size: 14px;
  color: #B5B0A5;
  margin-bottom: 24px;
}
.admin-section-title {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.admin-card {
  background: #FFFFFF;
  border-radius: 6px;
  padding: 20px 24px;
  margin-bottom: 24px;
}
/* ── Admin buttons ── */
.admin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s ease;
  text-decoration: none;
  border: none;
  line-height: 1;
}
.admin-btn:hover { opacity: 0.85; }
.admin-btn:active { transform: scale(0.98); }
.admin-btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.admin-btn-primary {
  padding: 8px 20px;
  height: 34px;
  background: #000000;
  color: #F5F5EE;
}
.admin-btn-secondary {
  padding: 8px 20px;
  height: 34px;
  background: #fff;
  color: var(--text-secondary);
  border: 1px solid rgba(0, 0, 0, 0.1);
}
.admin-btn-secondary:hover { color: var(--text-primary); border-color: rgba(0, 0, 0, 0.2); opacity: 1; }
.admin-btn-warning {
  padding: 4px 12px 5px;
  color: #b45309;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
}
.admin-btn-danger {
  padding: 4px 12px 5px;
  color: #dc2626;
  background: rgba(220, 38, 38, 0.06);
  border: 1px solid rgba(220, 38, 38, 0.15);
}
.admin-btn-ghost {
  padding: 4px 12px 5px;
  color: var(--text-muted);
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
}
.admin-btn-ghost:hover { color: var(--text-secondary); border-color: rgba(0, 0, 0, 0.15); opacity: 1; }
.admin-btn-sm {
  font-size: 12px;
  padding: 4px 12px 5px;
}
.admin-btn-pagination {
  padding: 5px 14px 6px;
  font-size: 12px;
  font-weight: 500;
  background: #fff;
  color: var(--text-secondary);
  border: 1px solid rgba(0, 0, 0, 0.08);
}
.admin-btn-pagination:hover { color: var(--text-primary); border-color: rgba(0, 0, 0, 0.15); opacity: 1; }
.admin-input {
  padding: 8px 16px;
  height: 34px;
  border-radius: 9999px;
  font-size: 13px;
  background: #fff;
  color: var(--text-primary);
  border: 1px solid rgba(0, 0, 0, 0.1);
  outline: none;
  transition: border-color 0.15s ease;
  box-sizing: border-box;
}
.admin-input:focus { border-color: rgba(0, 0, 0, 0.3); }
.admin-input::placeholder { color: var(--text-muted); }
input[type="number"].admin-input {
  -moz-appearance: textfield;
}
input[type="number"].admin-input::-webkit-outer-spin-button,
input[type="number"].admin-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
select.admin-input {
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23999' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.admin-flash-success {
  background: rgba(22, 128, 60, 0.08);
  color: #16803C;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 20px;
}
.admin-flash-error {
  background: rgba(220, 38, 38, 0.08);
  color: #DC2626;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 20px;
}
.admin-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.admin-stat-card {
  background: #FFFFFF;
  border-radius: 6px;
  padding: 16px;
}
.admin-stat-label {
  font-size: 12px;
  color: #B5B0A5;
  margin-bottom: 4px;
}
.admin-stat-value {
  font-size: 28px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.admin-table-card {
  background: #FFFFFF;
  border-radius: 6px;
  overflow: hidden;
}
.admin-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
}
.admin-table-card table {
  width: 100%;
  border-collapse: collapse;
}
.admin-table-card th {
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 600;
  color: #B5B0A5;
  letter-spacing: 0.5px;
  padding: 10px 20px;
  text-align: left;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.admin-table-card td {
  padding: 12px 20px;
  font-size: 13px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  vertical-align: middle;
}
.admin-table-card tbody tr:hover {
  background: rgba(0, 0, 0, 0.03);
}
.admin-table-card tr:last-child td {
  border-bottom: none;
}

/* ===== Spec List (performance + archetype) ===== */
.spec-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.spec-row {
  display: flex;
  align-items: baseline;
  gap: 24px;
}
.spec-label {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  color: var(--text-muted);
  min-width: 104px;
  flex-shrink: 0;
}
.archetype-pill {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  padding: 4px 14px;
  border-radius: 9999px;
  background: #F0EFE8;
  color: var(--text-secondary);
}
.spec-scale,
.spec-value {
  display: flex;
  align-items: baseline;
  gap: 0;
  flex-wrap: wrap;
}
.spec-scale-dot {
  font-size: 16px;
  color: var(--text-muted);
  margin: 0 6px;
  user-select: none;
}
.spec-scale-arrow {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 4px;
  opacity: 0.4;
  user-select: none;
}
.spec-scale-step {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 300;
  color: var(--text-muted);
  cursor: default;
  opacity: 0.5;
}
.spec-scale-step.passed {
  opacity: 0.7;
}
.spec-scale-step.active {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  opacity: 1;
}
.spec-value-item {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: default;
}

/* ===== Admin Context Bar ===== */
.admin-bar {
  background: var(--text-primary);
  padding: 6px 12px;
  border-radius: 8px;
}
.admin-bar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.admin-bar-nav {
  display: flex;
  align-items: center;
  gap: 1px;
  flex-wrap: wrap;
}
.admin-bar-link {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  padding: 2px 6px;
  border-radius: 3px;
  transition: color 120ms ease, background 120ms ease;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.admin-bar-link:hover {
  color: rgba(255,255,255,0.95);
  background: rgba(255,255,255,0.08);
}
.admin-bar-link--back {
  color: rgba(255,255,255,0.8);
  font-weight: 500;
}
.admin-bar-sep {
  width: 1px;
  height: 10px;
  background: rgba(255,255,255,0.15);
  margin: 0 4px;
  flex-shrink: 0;
}
.admin-bar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.admin-bar-stars {
  display: flex;
  gap: 0;
}
.admin-bar-star-btn {
  width: 16px;
  height: 16px;
  border: none;
  background: transparent;
  font-size: 11px;
  color: rgba(255,255,255,0.2);
  cursor: pointer;
  transition: color 120ms ease;
  padding: 0;
  line-height: 16px;
  text-align: center;
}
.admin-bar-star-btn:hover,
.admin-bar-star-btn:hover ~ .admin-bar-star-btn {
  color: rgba(255,255,255,0.2);
}
.admin-bar-stars:hover .admin-bar-star-btn {
  color: #FF6600;
}
.admin-bar-stars .admin-bar-star-btn:hover ~ .admin-bar-star-btn {
  color: rgba(255,255,255,0.2);
}
.admin-bar-star-btn.filled {
  color: #FF6600;
}
.admin-bar-status {
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(255,255,255,0.3);
  white-space: nowrap;
}
.admin-bar-textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 4px;
  padding: 4px 8px;
  margin-top: 4px;
  color: rgba(255,255,255,0.7);
  resize: none;
  transition: background 120ms ease;
}
.admin-bar-textarea:focus {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.9);
  outline: none;
  resize: vertical;
}
.admin-bar-textarea::placeholder {
  color: rgba(255,255,255,0.25);
}

/* ===== Chat Sidebar Sections (admin dual mode) ===== */
.chat-sidebar-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}
