

:root {
  --primary: #6B9CF2;
  --primary-light: #A6C4F9;
  --primary-dark: #A6C4F9;
  --accent: #6B9CF2;
  --accent-muted: rgba(107, 156, 242, 0.12);

  --bg: #030407; 
  --bg-card: #0B0E14;
  --bg-sidebar: rgba(8, 10, 15, 0.75);
  --bg-code: #06080C;
  --text: #F2F5F9;
  --text-secondary: rgba(242, 245, 249, 0.72);
  --text-muted: rgba(242, 245, 249, 0.45);
  --border: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.06);
  --divider: rgba(255, 255, 255, 0.16);

  --success: #6CA37D;
  --success-bg: rgba(108, 163, 125, 0.15);
  --warning: #EFB68D;
  --warning-bg: rgba(239, 182, 141, 0.15);
  --error: #EF4444;
  --error-bg: rgba(239, 68, 68, 0.15);
  --info: #6B9CF2;
  --info-bg: rgba(107, 156, 242, 0.15);

  --body-bg-gradient:
    radial-gradient(circle at top left, rgba(107, 156, 242, 0.06) 0%, transparent 40%),
    radial-gradient(circle at bottom right, rgba(179, 154, 251, 0.05) 0%, transparent 40%),
    #030407;

  --font-display: 'Playfair Display', 'Georgia', serif;
  --font-body: 'Pretendard', 'Inter', -apple-system, 'Segoe UI', 'Noto Sans KR', sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', monospace;

  --space-xs: 4px; --space-sm: 8px; --space-md: 16px; --space-lg: 24px; --space-xl: 32px; --space-2xl: 48px; --space-3xl: 64px;
  --radius-sm: 4px; --radius-md: 8px; --radius-lg: 12px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.6);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.3);
  --sidebar-rail: 76px;
  --sidebar-panel: 264px;
  --sidebar-width: calc(var(--sidebar-rail) + var(--sidebar-panel));

  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-focus: rgba(8, 10, 15, 0.88);
}

[data-design="a1-light"] {
  --primary: #B38A4D;
  --primary-light: #DCB87D;
  --primary-dark: #8F6932;
  --accent: #B38A4D;
  --accent-muted: rgba(179, 138, 77, 0.15);

  --bg: #EBEAE4;
  --bg-card: #F0EEE6;
  --bg-sidebar: rgba(240, 238, 230, 0.75);
  --bg-code: #E4E2DA;
  --text: #2A2722;
  --text-secondary: rgba(42, 39, 34, 0.75);
  --text-muted: rgba(42, 39, 34, 0.5);
  --border: rgba(198, 164, 104, 0.15);
  --border-light: rgba(198, 164, 104, 0.08);
  --divider: rgba(198, 164, 104, 0.3);

  --success: #6CA37D;
  --success-bg: rgba(108, 163, 125, 0.15);
  --warning: #B38A4D;
  --warning-bg: rgba(220, 184, 125, 0.15);
  --error: #B45353;
  --error-bg: rgba(180, 83, 83, 0.13);
  --info: #8F6932;
  --info-bg: rgba(179, 138, 77, 0.15);

  --body-bg-gradient:
    radial-gradient(circle at top left, rgba(179, 138, 77, 0.08) 0%, transparent 45%),
    radial-gradient(circle at bottom right, rgba(229, 196, 139, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(239, 182, 141, 0.04) 0%, transparent 60%),
    #EBEAE4;
  --shadow-sm: 0 1px 3px rgba(91, 73, 38, 0.06);
  --shadow-md: 0 4px 12px rgba(91, 73, 38, 0.08);
  --shadow-lg: 0 8px 24px rgba(91, 73, 38, 0.10);
  --shadow-card: 0 1px 3px rgba(91, 73, 38, 0.04), 0 4px 12px rgba(91, 73, 38, 0.05);

  --glass-bg: rgba(252, 250, 246, 0.65);
  --glass-border: rgba(198, 164, 104, 0.25);
  --glass-focus: rgba(252, 250, 246, 0.78);
}

body, .sidebar, .input-card, .agent-card, .live-panel, 
.domain-card, .equip-card, button, input, textarea, select, .equip-modal {
  transition: background-color 0.8s ease, color 0.8s ease, border-color 0.8s ease, box-shadow 0.8s ease;
}

body {
  font-family: var(--font-body);
  background: var(--body-bg-gradient);
  background-size: 400% 400%;
  animation: auraGradient 18s ease infinite;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  transition: background 0.8s ease, color 0.8s ease;
}

[data-design="a1-light"] body {
  background: var(--body-bg-gradient);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.is-hidden { display: none !important; }

html::-webkit-scrollbar, body::-webkit-scrollbar {
  width: 0;
  height: 0;
}

@keyframes auraGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

button, input, select, textarea, p, a, li, th, td, span, div, section { 
  font-family: var(--font-body); 
  font-size: inherit; 
  color: inherit;
}

h1, h2, h3, h4, h5, h6 { 
  font-family: var(--font-body); 
  color: var(--primary-dark); 
  letter-spacing: 0; 
}

h1 { font-size: 2rem; font-weight: 700; line-height: 1.2; }
h2 { font-size: 1.5rem; font-weight: 600; line-height: 1.3; }
h3 { font-size: 1.15rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }
p { margin-bottom: 0.75em; color: var(--text); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 70%, transparent);
  outline-offset: 2px;
}

.sidebar-brand-text h2, .hero h1 { font-family: var(--font-display); }

.ui-icon {
  width: 1em;
  height: 1em;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.app-layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-width);
  background: color-mix(in srgb, var(--bg-sidebar) 88%, var(--bg) 12%);

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  border-right: 1px solid var(--border-light);
  padding: 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  overflow-x: hidden;
  overflow-y: auto;
  z-index: 100;
  transition: width 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-reduced-motion: reduce) {
  .sidebar,
  .sidebar-main,
  .sidebar-panel,
  .sidebar-brand-text,
  .main-content {
    transition: none;
  }
}

.sidebar-columns {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  width: 100%;
  align-items: stretch;
}

.sidebar:not(.collapsed) .sidebar-columns {
  flex-direction: row;
}

.sidebar.collapsed .sidebar-columns {
  flex-direction: column;
  align-items: center;
}

.sidebar-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 17px 14px 14px 8px;
  overflow: hidden;
  opacity: 1;
  visibility: visible;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--bg-sidebar) 72%, var(--bg-card) 28%) 0%,
    color-mix(in srgb, var(--bg-sidebar) 52%, transparent) 58%,
    transparent 100%
  );
  border-left: 1px solid color-mix(in srgb, var(--border-light) 82%, transparent);
  box-shadow: inset 1px 0 0 color-mix(in srgb, #fff 28%, transparent);
  transition: opacity 0.22s ease, visibility 0.22s ease, background-color 0.22s ease;
}

.sidebar-panel {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}

.sidebar-panel .saved-sessions-section {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

.sidebar:not(.collapsed) {
  box-shadow: 18px 0 48px rgba(0, 0, 0, 0.06);
}

[data-design="a1-dark"] .sidebar-main {
  border-left-color: rgba(107, 156, 242, 0.12);
  box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.18);
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-height: 62px;
  padding: 0 42px 12px 0;
  border-bottom: 1px solid var(--border-light);
}

.sidebar-rail {
  flex: 0 0 var(--sidebar-rail);
  width: var(--sidebar-rail);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 17px 0 12px;
  flex-shrink: 0;
}

.sidebar:not(.collapsed) .sidebar-rail {
  border-right: 0;
}

.sidebar:not(.collapsed) .sidebar-main {
  padding-left: 8px;
}

.sidebar:not(.collapsed) .brand-lockup {
  margin-left: 0;
}

.brand-lockup {
  width: 62px;
  height: 62px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 8px;
  cursor: pointer;
}
.brand-lockup:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 70%, transparent);
  outline-offset: 3px;
}
.brand-logo-mark {
  width: 62px;
  height: 62px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 62px;
  color: var(--primary-dark);
  background: transparent;
  border: 0;
  overflow: hidden;
}
.brand-logo-mark img {
  display: block;
  width: auto;
  height: 54px;
  max-width: 62px;
  object-fit: contain;
}

.sidebar-brand-text {
  width: 100%;
  min-width: 0;
  min-height: 62px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.sidebar-brand-text h2 {
  font-family: var(--font-display);
}
.sidebar-brand-text h2 {
  font-size: 1.42rem;
  line-height: 1.28;
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-brand-text .brand-sub {
  font-family: var(--font-body);
  font-size: 0.62rem;
  line-height: 1.28;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 720;
  white-space: nowrap;
  letter-spacing: 0.07em;
}

.sidebar-toggle {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.sidebar:not(.collapsed) .sidebar-toggle {
  position: absolute;
  top: 18px;
  right: 12px;
}
.sidebar-toggle:hover {
  background: color-mix(in srgb, var(--bg-card) 55%, transparent);
  color: var(--primary-dark);
}
.sidebar-toggle:focus { outline: none; }
.sidebar-toggle:focus-visible { box-shadow: 0 0 0 3px var(--accent-muted); }

.sidebar.collapsed {
  width: var(--sidebar-rail);
  box-shadow: none;
}
.sidebar.collapsed .sidebar-main {
  display: contents;
}

.sidebar.collapsed .sidebar-head,
.sidebar.collapsed .sidebar-panel {
  display: none !important;
}
.sidebar.collapsed .sidebar-toggle {
  position: static;
}

.sidebar.collapsed .tracker-container:not([hidden]) {
  margin: 0;
  padding: 0 6px 8px;
  width: 100%;
  max-width: var(--sidebar-rail);
}

.app-layout.pipeline-running .sidebar:not(.collapsed) {
  gap: 12px;
}
.app-layout.pipeline-running .sidebar:not(.collapsed) .sidebar-panel .theme-section,
.app-layout.pipeline-running .sidebar:not(.collapsed) .sidebar-panel .sidebar-advanced,
.app-layout.pipeline-running .sidebar:not(.collapsed) .sidebar-panel .saved-sessions-section {
  display: none;
}
.app-layout.pipeline-running .sidebar:not(.collapsed) .tracker-container {
  flex: 0 0 auto;
  max-height: calc(100vh - 220px);
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--bg-card) 68%, transparent);
  box-shadow: var(--shadow-sm);
  overflow-y: auto;
}

.sidebar-section { display: flex; flex-direction: column; gap: 8px; }
.sidebar-section-title { font-size: 0.68rem; font-weight: 680; text-transform: uppercase; color: var(--text-muted); padding-bottom: 0; border-bottom: 0; }
.sidebar select { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-card); font-size: 0.85rem; cursor: pointer; }
.sidebar select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-muted); }

.sidebar-action-btn {
  width: 100%;
  border: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--bg-card) 76%, transparent);
  color: var(--text-secondary);
  padding: 8px 10px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.sidebar-action-btn:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  color: var(--primary-dark);
  background: color-mix(in srgb, var(--accent-muted) 54%, var(--bg-card) 46%);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.06);
}
.session-history-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
  padding-right: 2px;
}
.session-history-empty {
  color: var(--text-muted);
  font-size: 0.74rem;
  line-height: 1.45;
}
.sidebar-note {
  color: var(--text-muted);
  font-size: 0.72rem;
  line-height: 1.45;
  padding: 8px 9px;
  border: 1px dashed var(--border-light);
  border-radius: 10px;
  background: color-mix(in srgb, var(--bg-card) 34%, transparent);
}
.session-history-item {
  width: 100%;
  border: 1px solid color-mix(in srgb, var(--border-light) 88%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg-card) 72%, transparent);
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.session-history-item:hover,
.session-history-item.active {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent-muted) 68%, transparent);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}
.session-history-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.32;
  color: var(--text);
}
.session-history-meta {
  display: block;
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 0.64rem;
  line-height: 1.3;
}

.sidebar-advanced {
  border: 1px solid color-mix(in srgb, var(--border) 76%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg-card) 62%, transparent);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  overflow: visible;
  flex-shrink: 0;
}
.sidebar-advanced-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.sidebar-advanced-summary::-webkit-details-marker { display: none; }
.sidebar-advanced-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.sidebar-advanced-title {
  font-size: 0.74rem;
  font-weight: 720;
  color: var(--text-secondary);
}
.sidebar-advanced-hint {
  font-size: 0.62rem;
  color: var(--text-muted);
  font-weight: 560;
}
.sidebar-advanced-chevron,
.model-group-chevron {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--text-muted);
  border-bottom: 1.5px solid var(--text-muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.sidebar-advanced[open] .sidebar-advanced-chevron,
.model-group.open .model-group-chevron {
  transform: rotate(225deg);
}
.sidebar-advanced-body {
  padding: 0 8px 10px;
  border-top: 1px solid var(--border-light);
  overflow: visible;
}
.sidebar-advanced:not([open]) .sidebar-advanced-body {
  display: none;
}

.model-group { border: 1px solid var(--border-light); border-radius: 10px; overflow: visible; margin-bottom: 6px; background: color-mix(in srgb, var(--bg-card) 40%, transparent); }
.model-group:last-child { margin-bottom: 0; }
.model-group-header { display: flex; align-items: center; gap: 7px; padding: 7px 9px; background: transparent; cursor: pointer; font-size: 0.72rem; font-weight: 650; border: none; width: 100%; text-align: left; color: var(--text-secondary); }
.model-group-title { display: inline-flex; align-items: center; gap: 7px; min-width: 0; flex: 1; }
.group-icon { width: 14px; height: 14px; color: var(--primary-light); flex-shrink: 0; }
.model-group-body { display: none; padding: 6px 9px 10px; background: color-mix(in srgb, var(--bg) 78%, transparent); border-top: 1px solid var(--border-light); }
.model-group.open .model-group-body { display: block; }
.model-role-row { margin-bottom: 8px; }
.model-role-row label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.66rem;
  font-weight: 650;
  color: var(--text-muted);
  text-transform: uppercase;
}
.model-role-help {
  display: block;
  margin: -1px 0 7px;
  font-size: 0.66rem;
  line-height: 1.35;
  color: var(--text-muted);
}
.model-select-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
}
.provider-badge {
  height: 32px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: color-mix(in srgb, var(--bg-card) 70%, transparent);
  color: var(--text-secondary);
  font-size: 0.62rem;
  font-weight: 720;
}
.provider-icon { width: 14px; height: 14px; }
.provider-badge[data-provider="perplexity"] { color: #6CA37D; }
.provider-badge[data-provider="google"] { color: #EFB68D; }
.provider-badge[data-provider="upstage"] { color: #B39AFB; }

.main-content {
  position: relative; margin-left: var(--sidebar-width); width: calc(100% - var(--sidebar-width));
  display: flex; flex-direction: column; min-height: 100vh; padding: 0 var(--space-xl);
  transition: margin-left 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), width 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.app-layout.sidebar-collapsed .main-content {
  margin-left: var(--sidebar-rail);
  width: calc(100% - var(--sidebar-rail));
}

.hero {
  text-align: center;
  margin-top: 18vh;
  padding-top: 0;
  padding-bottom: var(--space-md);
  transition: margin-top 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.main-content.pipeline-active .hero,
.main-content.catalog-active .hero,
.main-content.results-active .hero,
.main-content:has(#equip-browser[style*="block"]) .hero,
.main-content:has(.event-log:not(:empty)) .hero,
.main-content:has(.live-output:not(:empty)) .hero,
.main-content:has(#results-section[style*="block"]) .hero {
  margin-top: 80px;
}

.input-section { max-width: 800px; width: 100%; margin: 0 auto; padding: 0; display: flex; flex-direction: column; gap: 12px; }

.mode-context {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 4px 6px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  box-shadow: none;
  transition: border-color 0.35s ease, box-shadow 0.35s ease, opacity 0.35s ease, transform 0.35s ease;
}
.mode-context.is-switching {
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);
  box-shadow: 0 0 0 3px var(--accent-muted);
}
.mode-context-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-dark);
  background: color-mix(in srgb, var(--accent-muted) 72%, transparent);
}
.mode-context-svg { width: 18px; height: 18px; stroke-width: 1.7; }
.mode-context-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mode-context-label {
  font-size: 0.92rem;
  font-weight: 760;
  color: var(--primary-dark);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mode-context-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
[data-design="a1-light"] .mode-context[data-domain="nnfc"] .mode-context-icon { color: var(--accent); }
.main-content.pipeline-active .mode-context,
.main-content.catalog-active .mode-context,
.main-content.results-active .mode-context {
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  max-height: 0;
  padding: 0;
  margin: 0;
  border-width: 0;
  overflow: hidden;
}

.mobile-pipeline-tracker {
  display: none;
  max-width: 800px;
  width: 100%;
  margin: 0 auto 12px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-card) 82%, transparent);
  box-shadow: var(--shadow-sm);
}
.mobile-tracker-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}
.mobile-tracker-dots {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.mobile-tracker-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--border-light);
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.mobile-tracker-dot.done { background: color-mix(in srgb, var(--success) 55%, transparent); }
.mobile-tracker-dot.active {
  background: var(--accent);
  transform: scale(1.25);
  box-shadow: 0 0 0 3px var(--accent-muted);
}
.mobile-tracker-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.mobile-tracker-step {
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.mobile-tracker-copy strong {
  font-size: 0.82rem;
  color: var(--primary-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.input-card {
  --prompt-rail-height: 74px;
  position: relative; 
  background: var(--glass-bg);
  backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.01);
  height: 300px;
  min-height: 300px;
  padding: 0; overflow: hidden; display: flex; flex-direction: column;
  transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.input-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--prompt-rail-height);
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--glass-bg) 20%, transparent),
    color-mix(in srgb, var(--bg-card) 70%, transparent) 44%,
    color-mix(in srgb, var(--bg-card) 84%, transparent)
  );
}

.input-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 48px;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--bg-card) 46%, transparent),
    color-mix(in srgb, var(--glass-bg) 18%, transparent) 58%,
    transparent
  );
}

.input-card:focus-within {
  background: var(--glass-focus);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2), 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.input-card textarea {
  width: 100%;
  height: calc(100% - var(--prompt-rail-height));
  flex: 0 0 calc(100% - var(--prompt-rail-height));
  min-height: 0;
  max-height: none;
  border: none; 
  background: transparent;
  padding: 32px 34px 14px;
  margin-bottom: var(--prompt-rail-height);
  font-family: var(--font-body);
  font-size: 1.08rem; 
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: 0;
  caret-color: var(--accent);
  resize: none; 
  outline: none; 
  box-shadow: none;
  overflow-y: auto;
  word-break: break-word;
  overflow-wrap: break-word;
  scrollbar-gutter: stable;
  position: relative;
  z-index: 1;
  color: var(--text); 
  transition: color 0.8s ease;
}

.input-card textarea::placeholder {
  color: var(--text-muted); 
  font-weight: 300; 
  line-height: 1.75; 
  letter-spacing: 0; 
  transition: color 0.8s ease;
}

.input-actions { position: absolute; bottom: 16px; right: 20px; z-index: 6; }

.prompt-mode-dock {
  position: absolute;
  left: 20px;
  bottom: 15px;
  z-index: 6;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(64px, max-content);
  align-items: center;
  gap: 4px;
}

.mode-mini-btn {
  min-width: 64px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 9px;
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 650;
  line-height: 1;
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.mode-glyph {
  width: 15px;
  height: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.mode-glyph .ui-icon {
  width: 15px;
  height: 15px;
  stroke-width: 1.65;
}

.mode-mini-btn:hover {
  color: var(--text);
  border-color: var(--border-light);
  background: color-mix(in srgb, var(--bg-card) 34%, transparent);
}

.mode-mini-btn.selected {
  color: var(--primary-dark);
  border-color: color-mix(in srgb, var(--primary) 34%, transparent);
  background: color-mix(in srgb, var(--accent-muted) 54%, transparent);
}

[data-design="a1-light"] .mode-mini-btn.selected {
  color: var(--primary-dark);
  border-color: color-mix(in srgb, var(--accent) 32%, transparent);
  background: var(--accent-muted);
}

.submit-icon-btn {
  width: 40px; height: 40px; border-radius: 50%; background: transparent; color: var(--text-secondary);
  border: none; display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.submit-icon-btn svg { width: 22px; height: 22px; stroke-width: 2px; }
.submit-icon-btn:hover {
  background: transparent; color: var(--primary);
  transform: scale(1.15) translateY(-2px);
  filter: drop-shadow(0 4px 12px color-mix(in srgb, var(--accent) 40%, transparent));
}
.submit-icon-btn:active {
  transform: scale(0.95) translateY(0);
  filter: drop-shadow(0 1px 2px color-mix(in srgb, var(--accent) 22%, transparent));
}
.submit-icon-btn:disabled { color: var(--text-muted); background: transparent; cursor: not-allowed; transform: none; filter: none; }

.toggle-icon-btn {
  width: 38px;
  height: 38px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: color-mix(in srgb, var(--bg-card) 26%, transparent);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 1;
  transform: scale(1);
  transition: color 0.18s ease, background-color 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
}
.toggle-icon-btn .ui-icon,
.toggle-icon-btn svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.7;
}
.toggle-icon-btn:hover,
.toggle-icon-btn.active {
  color: var(--primary-dark);
  border-color: var(--border-light);
  background: color-mix(in srgb, var(--accent-muted) 48%, transparent);
  transform: translateY(-1px);
}
[data-design="a1-light"] .toggle-icon-btn:hover,
[data-design="a1-light"] .toggle-icon-btn.active {
  color: var(--primary-dark);
  background: var(--accent-muted);
}
.input-card.has-prompt-text .toggle-icon-btn {
  opacity: 0;
  transform: scale(0.84);
  pointer-events: none;
}

.prompt-suggestions {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 2px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.prompt-suggestion-btn {
  min-height: 44px;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: color-mix(in srgb, var(--bg-card) 62%, transparent);
  color: var(--text-secondary);
  padding: 9px 12px;
  text-align: left;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 720;
  line-height: 1.25;
}

.prompt-suggestion-btn:hover,
.prompt-suggestion-btn:focus-visible {
  color: var(--primary-dark);
  border-color: color-mix(in srgb, var(--accent) 34%, transparent);
  background: color-mix(in srgb, var(--accent-muted) 56%, var(--bg-card) 44%);
}

.main-content.pipeline-active .input-card textarea {
  height: calc(100% - var(--prompt-rail-height));
  flex-basis: calc(100% - var(--prompt-rail-height));
  min-height: 0;
  max-height: none;
  padding-top: 20px;
  padding-bottom: 10px;
  margin-bottom: var(--prompt-rail-height);
}
.main-content.pipeline-active .input-card {
  --prompt-rail-height: 62px;
  height: 176px;
  min-height: 176px;
  overflow: hidden;
  border-radius: 18px;
  margin-bottom: var(--space-lg);
}

.main-content.pipeline-active .prompt-suggestions,
.main-content.catalog-active .prompt-suggestions,
.main-content.results-active .prompt-suggestions {
  display: none;
}

.partner-logo {
  display: none;
}

.mvp-badge {
  position: fixed; top: 27px; right: 32px; transform: none; z-index: 900;
  min-height: 28px;
  padding: 5px 11px;
  border: 1px solid var(--border-light);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.66rem;
  font-weight: 780;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--bg-card) 76%, transparent);
  opacity: 0.9;
  pointer-events: none;
}

.tracker-container {
  width: 100%;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
  overflow: visible;
}

.pipeline-tracker { 
  display: flex; 
  flex-direction: column; 
  align-items: flex-start;
  padding: 8px 0; 
  gap: 0; 
  width: 100%; 
}

.sidebar.collapsed .pipeline-tracker { 
  align-items: center; 
  width: 100%;
  padding-top: 8px;
}

.tracker-step { 
  display: flex; 
  flex-direction: row; 
  align-items: center; 
  gap: 12px; 
  min-height: 28px; 
  cursor: default;
}

.tracker-step .step-num { 
  width: 24px; 
  height: 24px; 
  border-radius: 50%; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  font-size: 0.65rem; 
  font-weight: 700; 
  color: var(--text-muted); 
  background: var(--bg); 
  border: 1px solid var(--border); 
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); 
  flex-shrink: 0; 
  z-index: 2; 
}

.tracker-step .step-label { 
  font-size: 0.8rem; 
  font-weight: 500; 
  color: var(--text-muted); 
  transition: all 0.3s ease; 
  white-space: nowrap; 
  letter-spacing: 0; 
}

.sidebar.collapsed .tracker-step .step-label { 
  display: none; 
}

.sidebar.collapsed .tracker-step {
  gap: 0;
  min-height: 26px;
  width: 100%;
  justify-content: center;
}

.sidebar.collapsed .tracker-step .step-num {
  width: 24px;
  height: 24px;
  font-size: 0.64rem;
  background: color-mix(in srgb, var(--bg-card) 72%, transparent);
}

.tracker-connector { 
  width: 2px; 
  height: 18px; 
  background: var(--border-light); 
  margin-left: 11px;
  transition: background 0.4s ease; 
  z-index: 1; 
}

.sidebar.collapsed .tracker-connector { 
  align-self: center;
  margin-left: 0; 
  height: 14px;
  width: 1px;
}

.tracker-step.done .step-num { 
  background: var(--success-bg); 
  border-color: transparent; 
  color: var(--success); 
}
.tracker-step.done .step-label { 
  color: var(--text-secondary); 
}
.tracker-connector.done { 
  background: color-mix(in srgb, var(--success) 35%, transparent); 
}

.tracker-step.active .step-num { 
  background: var(--primary); 
  border-color: var(--primary); 
  color: #fff; 
  box-shadow: 0 0 0 4px var(--accent-muted); 
  transform: scale(1.1); 
}
.tracker-step.active .step-label { 
  color: var(--primary-dark); 
  font-weight: 700; 
}

.event-log, .live-output, .live-controls, #results-section { max-width: 800px; margin: 0 auto; width: 100%; }
.event-log { padding-top: var(--space-sm); }
.live-controls { margin: 6px auto var(--space-md); display: flex; justify-content: flex-end; }
.auto-follow-control {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-card) 72%, transparent);
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 720;
  box-shadow: var(--shadow-sm);
}
.auto-follow-control input {
  appearance: none;
  width: 14px;
  height: 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-card);
  display: inline-grid;
  place-content: center;
}
.auto-follow-control input:checked {
  border-color: var(--accent);
  background: var(--accent);
}
.auto-follow-control input:checked::after {
  content: "";
  width: 6px;
  height: 3px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
}
.pipeline-status-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 14px 16px;
  margin: 0 0 var(--space-md);
}
.pipeline-status-copy {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  align-items: baseline;
}
.pipeline-status-eyebrow {
  grid-column: 1 / -1;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0;
}
.pipeline-status-copy strong {
  color: var(--primary-dark);
  font-size: 0.98rem;
}
.pipeline-status-copy small {
  color: var(--text-muted);
  font-size: 0.78rem;
}
.pipeline-status-meter {
  height: 7px;
  margin-top: 12px;
  border-radius: 999px;
  background: var(--border-light);
  overflow: hidden;
}
.pipeline-status-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.45s ease;
}
.pipeline-status-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10px, 1fr));
  gap: 5px;
  margin-top: 10px;
}
.pipeline-status-steps span {
  height: 4px;
  border-radius: 999px;
  background: var(--border-light);
}
.pipeline-status-steps span.done,
.pipeline-status-steps span.active {
  background: var(--accent);
}
.pipeline-status-steps span.active {
  box-shadow: 0 0 0 3px var(--accent-muted);
}
.pipeline-status-panel.complete .pipeline-status-eyebrow,
.pipeline-status-panel.complete .pipeline-status-copy strong {
  color: var(--success);
}
.agent-card, .live-panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); overflow: hidden; margin-bottom: var(--space-md); animation: card-enter 0.3s ease-out; }
@keyframes card-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.agent-card-header, .live-panel-header { display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-md) var(--space-lg); background: var(--bg); border-bottom: 1px solid var(--border-light); }
.live-panel-header { justify-content: space-between; }
.agent-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-dark);
  background: var(--accent-muted);
  flex: 0 0 auto;
}
.agent-icon .ui-icon { width: 17px; height: 17px; }
.agent-card-body, .live-panel-body { padding: var(--space-lg); font-size: 0.9rem; line-height: 1.7; }
.status-chip { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.status-chip.running { background: var(--info-bg); color: var(--info); }
.status-chip.success { background: var(--success-bg); color: var(--success); }
.status-chip.warning { background: var(--warning-bg); color: var(--warning); border: 1px solid color-mix(in srgb, var(--warning) 45%, transparent); }
.status-chip.error { background: var(--error-bg); color: var(--error); }

[data-design="a1-light"] .live-panel { border: 1px solid color-mix(in srgb, var(--accent) 36%, transparent); border-radius: 6px; }
[data-design="a1-light"] .live-panel.active { border-color: var(--accent); box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 12%, transparent); }
[data-design="a1-light"] .live-agent { color: var(--accent); }

.panel-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 4px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: 8px;
}
.panel-toggle:hover {
  background: var(--bg-sidebar);
  color: var(--primary-dark);
  border-color: var(--border-light);
}

.live-panel-body {
    padding: var(--space-lg); 
    font-size: 0.9rem; 
    line-height: 1.7;
    max-height: 10000px;
    opacity: 1;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, padding 0.4s ease;
}

.live-panel.collapsed .live-panel-body {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin: 0;
    pointer-events: none;
}

.stream-content h1 { font-size: 1.55rem; border-bottom: 2px solid var(--primary); padding-bottom: 0.3em; margin: 1.2em 0 0.45em; }
.stream-content p { margin: 0 0 0.85em; }
.stream-content ul, .stream-content ol { margin: 0.5em 0 0.9em 1.35em; }
.stream-content table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: 0.84rem; text-align: left; }
.stream-content th, .stream-content td { border: 1px solid var(--border); padding: 7px 10px; }
.stream-content th { background: var(--primary-dark); color: #fff; }
.stream-content code { font-family: var(--font-mono); font-size: 0.84em; background: var(--bg-code); padding: 2px 5px; border-radius: var(--radius-sm); }

.hidden { display: none !important; }

.results-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
  padding: 30px 34px;
  margin: var(--space-lg) 0;
}

.results-card-nnfc {
  background: color-mix(in srgb, var(--bg-card) 96%, var(--accent-muted) 4%);
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}

.results-header h2 {
  margin: 0;
  color: var(--primary-dark);
  font-size: 1.42rem;
  line-height: 1.18;
}

.results-header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
  min-width: 220px;
}

.result-action-btn {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
  color: var(--text-secondary);
  padding: 7px 12px;
  font-size: 0.76rem;
  font-weight: 760;
  cursor: pointer;
}
.result-action-btn.primary {
  border-color: var(--accent);
  background: var(--accent-muted);
  color: var(--primary-dark);
}
.result-action-btn:hover {
  border-color: var(--accent);
  color: var(--primary-dark);
}

.results-kicker {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 5px;
  letter-spacing: 0.02em;
}

.download-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: var(--space-md);
}

.deliverables-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: 8px 10px;
  margin: 0 0 var(--space-lg);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg-card) 54%, transparent);
}

.deliverables-label {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.download-row .export-chip {
  cursor: pointer;
  min-height: 30px;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  font: inherit;
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 0.74rem;
  font-weight: 760;
  line-height: 1;
  transition: color 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

.download-row .export-chip.primary,
.runsheet-actions .export-chip.primary {
  color: var(--primary-dark);
  background: color-mix(in srgb, var(--accent-muted) 64%, transparent);
  border-color: color-mix(in srgb, var(--accent) 34%, transparent);
}

.download-row .export-chip:hover,
.runsheet-actions .export-chip:hover {
  color: var(--primary-dark);
  background: color-mix(in srgb, var(--bg) 72%, var(--bg-card) 28%);
  border-color: var(--border);
}

.download-row .export-chip:disabled,
.runsheet-actions .export-chip:disabled {
  cursor: wait;
  opacity: 0.65;
}

.empty-state {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.view-tabs {
  display: inline-flex;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 4px;
  background: color-mix(in srgb, var(--bg) 88%, var(--bg-card) 12%);
  margin-bottom: var(--space-md);
}

.view-tab {
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  padding: 8px 14px;
  font-size: 0.8rem;
  font-weight: 720;
  cursor: pointer;
}

.view-tab.active {
  background: var(--bg-card);
  color: var(--primary-dark);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent);
}

.report-viewer {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 24px 28px;
  max-height: 70vh;
  overflow: auto;
  color: var(--text);
  font-size: 0.96rem;
  line-height: 1.78;
}

.report-viewer h1,
.report-viewer h2,
.report-viewer h3,
.report-viewer h4 {
  color: var(--primary-dark);
  line-height: 1.25;
  margin: 1.25em 0 0.45em;
}

.report-viewer h2 { font-size: 1.42rem; }
.report-viewer h3 { font-size: 1.12rem; }

.report-viewer p {
  margin: 0 0 0.8em;
  color: var(--text);
}

.report-viewer ul,
.report-viewer ol {
  margin: 0.5em 0 0.95em 1.2em;
}

.report-viewer table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.15rem 0;
  font-size: 0.88rem;
  line-height: 1.58;
  overflow: hidden;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: var(--bg-card);
}
.report-viewer th,
.report-viewer td {
  padding: 11px 13px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
}
.report-viewer th {
  background: color-mix(in srgb, var(--bg-card) 84%, var(--bg) 16%);
  color: var(--primary-dark);
  font-weight: 800;
}
.report-viewer tr:last-child td {
  border-bottom: 0;
}
.report-viewer td + td,
.report-viewer th + th {
  border-left: 1px solid var(--border-light);
}

.link-log {
  margin-top: var(--space-lg);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg-card) 82%, var(--bg) 18%);
  overflow: hidden;
}

.link-log summary {
  cursor: pointer;
  padding: 12px 14px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.link-log-table-scroll {
  max-height: 300px;
  overflow: auto;
  border-top: 1px solid var(--border-light);
}

.link-log-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.78rem;
}

.link-log-table th,
.link-log-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.link-log-table th {
  color: var(--primary-dark);
  background: color-mix(in srgb, var(--bg-card) 76%, var(--bg) 24%);
  font-weight: 800;
}

.link-log-table-compact th:nth-child(1),
.link-log-table-compact td:nth-child(1) { width: 16%; }
.link-log-table-compact th:nth-child(2),
.link-log-table-compact td:nth-child(2) { width: 34%; }
.link-log-table-compact th:nth-child(3),
.link-log-table-compact td:nth-child(3) { width: 28%; }
.link-log-table-compact th:nth-child(4),
.link-log-table-compact td:nth-child(4) { width: 22%; }

.log-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-muted);
  color: var(--primary-dark);
  font-weight: 750;
}

.harness-trace {
  margin-top: var(--space-xl);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  overflow: hidden;
}

.harness-trace summary {
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 700;
  color: var(--primary-dark);
}

.harness-trace-table-scroll {
  max-height: 360px;
  overflow: auto;
  border-top: 1px solid var(--border-light);
}

.harness-trace-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.harness-trace-table th,
.harness-trace-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-light);
  text-align: left;
  vertical-align: top;
}

.harness-trace-table th {
  position: sticky;
  top: 0;
  background: var(--bg-card);
  z-index: 1;
}

.results-subtitle {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.nnfc-disclaimer-banner {
  position: relative;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent-muted) 58%, transparent) 0%, color-mix(in srgb, var(--success-bg) 42%, transparent) 100%);
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 14px 18px 14px 16px;
  margin-bottom: var(--space-lg);
  color: var(--text-secondary);
}

.nnfc-disclaimer-banner strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--primary-dark);
  letter-spacing: 0;
}
.nnfc-disclaimer-banner strong::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  background: var(--primary);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='16' x2='12' y2='12'/%3E%3Cline x1='12' y1='8' x2='12.01' y2='8'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='16' x2='12' y2='12'/%3E%3Cline x1='12' y1='8' x2='12.01' y2='8'/%3E%3C/svg%3E") center/contain no-repeat;
  flex-shrink: 0;
}

.nnfc-disclaimer-banner p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.55;
  font-weight: 400;
  color: var(--text-secondary);
}

[data-design="a1-light"] .nnfc-disclaimer-banner {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent-muted) 72%, transparent) 0%, color-mix(in srgb, var(--success-bg) 32%, transparent) 100%);
  border-color: color-mix(in srgb, var(--accent) 18%, transparent);
  border-left-color: var(--primary);
  color: var(--text-secondary);
}

.nnfc-primary-stack {
  display: grid;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.nnfc-next-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 var(--space-lg);
}

.nnfc-next-action {
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: color-mix(in srgb, var(--bg) 76%, var(--bg-card) 24%);
  padding: 12px 14px;
  min-width: 0;
}

.nnfc-next-label {
  display: block;
  color: var(--text-muted);
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
  margin-bottom: 4px;
}

.nnfc-next-action strong {
  display: block;
  color: var(--primary-dark);
  font-size: 0.88rem;
  line-height: 1.35;
}

.nnfc-result-block {
  display: grid;
  gap: 10px;
}

.nnfc-section-title {
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.nnfc-summary-view .nnfc-summary-panel {
  max-height: 42vh;
  background: color-mix(in srgb, var(--bg) 84%, var(--bg-card) 16%);
}

.view-tabs-nnfc {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(100%, 560px);
  margin: 0 auto 18px;
  flex-wrap: nowrap;
}

.view-tabs-nnfc .view-tab {
  min-width: 0;
  white-space: nowrap;
}

.secondary-view-dock {
  border-radius: 999px;
  padding: 5px;
  background: color-mix(in srgb, var(--bg) 88%, var(--bg-card) 12%);
}

.secondary-view-dock .view-tab {
  border-radius: 999px;
  padding: 9px 16px;
}

.nnfc-process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-md);
}

.nnfc-process-card {
  background: color-mix(in srgb, var(--bg-card) 84%, var(--bg) 16%);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  min-height: 150px;
}

.nnfc-process-step {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.nnfc-process-equip {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 6px;
}

.nnfc-process-note {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.runsheet-panel {
  background: color-mix(in srgb, var(--bg) 94%, var(--bg-card) 6%);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: var(--space-lg);
}
.runsheet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}
.runsheet-header h3 {
  margin: 2px 0 0;
  color: var(--primary-dark);
  font-size: 1.2rem;
}
.runsheet-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.runsheet-table-wrap {
  overflow: auto;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: var(--bg-card);
}
.runsheet-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.8rem;
}
.runsheet-table th,
.runsheet-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
  text-align: left;
  overflow-wrap: anywhere;
}
.runsheet-table th:nth-child(1),
.runsheet-table td:nth-child(1) { width: 46px; }
.runsheet-table th:nth-child(2),
.runsheet-table td:nth-child(2) { width: 17%; }
.runsheet-table th:nth-child(3),
.runsheet-table td:nth-child(3) { width: 24%; }
.runsheet-table th:nth-child(5),
.runsheet-table td:nth-child(5) { width: 16%; }
.runsheet-table th:nth-child(6),
.runsheet-table td:nth-child(6) { width: 16%; }
.runsheet-table th {
  background: color-mix(in srgb, var(--bg-card) 88%, var(--bg) 12%);
  color: var(--primary-dark);
  font-weight: 800;
}
.runsheet-table td + td,
.runsheet-table th + th {
  border-left: 1px solid var(--border-light);
}
.runsheet-table tr:last-child td {
  border-bottom: 0;
}

.runsheet-cell-note {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.7rem;
  line-height: 1.4;
}

.nnfc-engineer-details {
  margin-bottom: var(--space-md);
}

.nnfc-engineer-details summary {
  cursor: pointer;
  font-weight: 650;
  font-size: 0.88rem;
  margin-bottom: var(--space-sm);
  color: var(--text-muted);
}

.nnfc-download-row {
  margin: 0;
  justify-content: flex-end;
}

.slide-preview {
  display: grid;
  gap: var(--space-md);
}

.ppt-slide {
  position: relative;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  overflow: hidden;
}
.ppt-slide-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: var(--primary);
}
.ppt-slide-header {
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border-light);
}
.ppt-slide-header h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.2;
}
.ppt-slide-body {
  flex: 1;
  font-size: 0.92rem;
  line-height: 1.65;
}
.ppt-slide-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-lg);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border-light);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.slide-empty {
  text-align: center;
  color: var(--text-muted);
  padding: var(--space-2xl) var(--space-lg);
}

.equip-browser-section { text-align: center; }
.equip-browser { margin-bottom: var(--space-xl); margin-top: 16px; }
.equip-cat-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.equip-detail-section--spaced { margin-top: var(--space-xl); }
.equip-ai-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}
.equip-ai-section-header h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--primary-dark);
}

.session-history-list,
.report-viewer,
.link-log-table-scroll,
.harness-trace-table-scroll,
.runsheet-table-wrap,
.tracker-container,
.input-card textarea {
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--text-muted) 45%, transparent) transparent;
}
.session-history-list::-webkit-scrollbar,
.report-viewer::-webkit-scrollbar,
.input-card textarea::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.session-history-list::-webkit-scrollbar-thumb,
.report-viewer::-webkit-scrollbar-thumb,
.input-card textarea::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--text-muted) 40%, transparent);
  border-radius: 999px;
}

.equip-section { margin: var(--space-xl) auto; max-width: 920px; width: 100%; text-align: left; }
.equip-toolbar {
  position: sticky;
  top: 14px;
  z-index: 8;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  align-items: stretch;
  padding: 10px;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  background: color-mix(in srgb, var(--bg) 78%, var(--bg-card) 22%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.equip-search { 
  width: 100%; 
  padding: 12px 16px 12px 38px; 
  border: 1px solid var(--border); 
  border-radius: 20px; 
  background: var(--bg-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%238C91A6' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242.156a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E") no-repeat 14px center; 
  font-size: 0.85rem;
  color: var(--text);
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.equip-search:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent);
}

.equip-search::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.equip-cat-btn { padding: 6px 14px; border: 1px solid var(--border); border-radius: 20px; background: var(--bg-card); font-size: 0.75rem; cursor: pointer; }
.equip-cat-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.equip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--space-md); width: 100%; justify-items: stretch; align-items: stretch; }
.equip-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: var(--space-lg); cursor: pointer; display: flex; flex-direction: column; text-align: left; align-items: flex-start; justify-content: flex-start; transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1); min-height: 160px; }
.equip-card:hover { border-color: var(--primary-light); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.equip-card-header { width: 100%; display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-sm); }
.equip-id { color: var(--text-muted); font-size: 0.68rem; font-weight: 760; }
.equip-card-name { font-weight: 700; margin-bottom: 4px; }
.equip-card-maker { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: var(--space-md); }
.equip-count { text-align: left; margin-bottom: var(--space-md); font-size: 0.85rem; color: var(--text-secondary); }
.equip-card-footer {
  display: grid;
  gap: 6px;
  margin-top: auto;
  width: 100%;
  color: var(--text-muted);
  font-size: 0.74rem;
}
.equip-card-footer span {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.equip-card-footer .ui-icon { width: 14px; height: 14px; }
.equip-empty,
.equip-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg-card) 50%, transparent);
}
.equip-load-more {
  grid-column: 1 / -1;
  justify-self: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--primary-dark);
  padding: 10px 18px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 760;
}
.equip-load-more:hover {
  border-color: var(--accent);
  background: var(--accent-muted);
}

.equip-modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.34); display: flex; align-items: stretch; justify-content: flex-end; z-index: 9999; backdrop-filter: blur(4px); padding: 0; }
.equip-modal { background: var(--bg-card); border-left: 1px solid var(--border); border-radius: 18px 0 0 18px; width: min(720px, calc(100vw - 72px)); max-width: 720px; max-height: none; height: 100vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); text-align: left; }
.equip-modal-header { display: flex; justify-content: space-between; align-items: flex-start; padding: var(--space-lg); border-bottom: 1px solid var(--border); }
.equip-modal-body { padding: var(--space-lg); overflow-y: auto; text-align: left; }
.equip-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xl); }
.equip-detail-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--border-light); font-size: 0.85rem; }

.equip-modal-close { background: none; border: none; font-size: 1.5rem; color: var(--text-muted); cursor: pointer; padding: 4px 8px; border-radius: var(--radius-sm); transition: background 0.15s, color 0.15s; line-height: 1; }
.equip-modal-close:hover { background: var(--bg-code); color: var(--error); }

.equip-badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; background: var(--accent-muted); color: var(--primary); margin-bottom: 4px; }

.equip-detail-section { margin-top: var(--space-md); }
.equip-detail-section h3 { font-size: 0.95rem; font-weight: 700; color: var(--primary-dark); margin-bottom: var(--space-sm); padding-bottom: var(--space-xs); border-bottom: 1px solid var(--border-light); display: flex; align-items: center; gap: var(--space-sm); }

.equip-tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--space-sm); }
.equip-tag { padding: 4px 12px; border: 1px solid var(--border); border-radius: 14px; font-size: 0.75rem; font-weight: 500; color: var(--text-secondary); background: var(--bg); }
.equip-tag.gas { border-color: var(--accent); color: var(--accent); background: var(--accent-muted); }

.equip-raw-specs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.equip-raw-spec-item {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg);
  overflow: hidden;
}

.equip-raw-spec-item summary {
  cursor: pointer;
  padding: 9px 12px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.equip-raw-spec-item pre {
  margin: 0;
  padding: 12px;
  border-top: 1px solid var(--border-light);
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  line-height: 1.55;
  color: var(--text-secondary);
  max-height: 220px;
  overflow: auto;
}

.equip-ai-section { margin-top: var(--space-xl); padding-top: var(--space-lg); border-top: 1px solid var(--border); }
.equip-ai-btn { display: inline-flex; align-items: center; gap: var(--space-sm); padding: 8px 18px; background: linear-gradient(135deg, var(--primary), var(--accent)); color: var(--bg); border: none; border-radius: var(--radius-md); font-family: var(--font-body); font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s; box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 22%, transparent); }
.equip-ai-btn:hover { opacity: 0.95; transform: translateY(-2px); box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 32%, transparent); }
.equip-ai-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.equip-ai-result { margin-top: var(--space-md); padding: var(--space-lg); background: linear-gradient(135deg, var(--accent-muted), var(--bg)); border: 1px solid var(--border-light); border-radius: var(--radius-md); font-size: 0.88rem; line-height: 1.7; color: var(--text); }
.equip-ai-loading { display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-lg); color: var(--primary); font-size: 0.85rem; font-weight: 500; }

.footer { text-align: center; padding: var(--space-2xl) var(--space-lg) var(--space-xl) var(--space-lg); font-size: 0.75rem; color: var(--text-muted); border-top: 1px solid var(--border-light); margin-top: auto; }

@media (max-width: 768px) {
  .sidebar { display: none; }
  .mobile-pipeline-tracker:not(.is-hidden):not([hidden]) { display: block; }
  .main-content, .app-layout.sidebar-collapsed .main-content { margin-left: 0; width: 100%; padding: 0 var(--space-lg); }
  .mode-context {
    grid-template-columns: 36px minmax(0, 1fr);
    padding: 12px 14px;
  }
  .hero h1 { font-size: 1.8rem; }
  .mvp-badge { top: 12px; right: 16px; font-size: 0.68rem; }
  .partner-logo { top: 12px; right: 16px; height: 34px; }
  .prompt-mode-dock { left: 14px; bottom: 14px; gap: 2px; }
  .mode-mini-btn { min-width: 34px; height: 32px; padding: 0 7px; }
  .mode-mini-btn .mode-mini-label { display: none; }
  .prompt-suggestions { grid-template-columns: 1fr; }
  .input-actions { right: 14px; bottom: 12px; }
  .input-card { --prompt-rail-height: 66px; height: 270px; min-height: 270px; }
  .input-card textarea { padding: 24px 22px 12px; }
  .results-header,
  .deliverables-bar { align-items: flex-start; flex-direction: column; }
  .nnfc-download-row { justify-content: flex-start; }
  .view-tabs-nnfc { width: 100%; grid-template-columns: 1fr; border-radius: 14px; }
  .secondary-view-dock .view-tab { border-radius: 10px; }
  .runsheet-header { flex-direction: column; }
  .nnfc-next-actions { grid-template-columns: 1fr; }
  .equip-modal { width: 100vw; max-width: none; border-radius: 0; }
  .equip-detail-grid { grid-template-columns: 1fr; gap: var(--space-md); }
  .equip-toolbar { top: 0; border-radius: 0 0 14px 14px; }
}

.theme-section {
  gap: 6px;
}

.theme-switch-wrapper {
  display: flex;
  background: color-mix(in srgb, var(--bg-code) 66%, var(--bg-card) 34%);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  border: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 30%, transparent);
}

.theme-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: 1px solid transparent;
  padding: 7px 8px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 650;
  cursor: pointer;
  min-width: 0;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.theme-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.theme-icon .ui-icon { width: 15px; height: 15px; }

.theme-btn:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--bg-card) 52%, transparent);
}

.theme-btn.active {
  background: var(--bg-card);
  color: var(--primary-dark);
  border-color: color-mix(in srgb, var(--accent) 28%, transparent);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

[data-design="a1-dark"] .theme-btn.active {
  border-color: color-mix(in srgb, var(--primary-light) 35%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary-light) 18%, transparent);
}

.provider-badge[data-provider="alibaba"] {
  color: #EFB68D;
}
