@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600&display=swap');

:root {
  /* Typography */
  --font-family-sans: "DM Sans", "Segoe UI", sans-serif;
  --text-xs:  10px;
  --text-sm:  11px;
  --text-md:  12px;
  --text-lg:  13px;
  --text-xl:  15px;

  /* Surfaces */
  --color-surface-app:    #EDECE8;
  --color-surface-panel:  #F5F4F0;
  --color-surface-subtle: #F0EFE9;
  --color-surface-raised: #FFFFFF;
  --color-surface-muted:  #F5F4F0;
  --color-surface-soft:   #F0EFE9;

  /* Text */
  --color-text-primary: #1A1A1A;
  --color-text-muted:   #626262;

  /* Borders */
  --color-border-default: #D6D4CC;
  --color-border-soft:    #D6D4CC;
  --color-border-muted:   #D6D4CC;

  /* Accent */
  --color-accent-primary:      #2563EB;
  --color-accent-primary-soft: rgba(37, 99, 235, 0.12);

  /* Spine */
  --color-spine-bg:      #1E2A3A;
  --color-spine-border:  #283952;
  --color-spine-text:    #C8D4E0;
  --color-spine-muted:   #7A95B0;
  --color-spine-active:  #FFFFFF;
  --color-spine-hover:   rgba(255, 255, 255, 0.06);
  --color-spine-current: rgba(37, 99, 235, 0.18);

  /* Legacy kept for compatibility */
  --bg-deep: #0d1b2a;
  --bg-mid:  #1b263b;

  /* Radius */
  --radius-pill: 999px;
  --radius-md:   8px;
  --radius-lg:   12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-family-sans);
  background: var(--color-surface-app);
}

html,
body {
  width: 100%;
  height: 100%;
}

#root {
  width: 100%;
  height: 100%;
  display: flex;
}

.auth-runtime-bar {
  position: fixed;
  top: 14px;
  right: 16px;
  z-index: 1205;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid #d7d2c6;
  background: rgba(250, 248, 242, 0.86);
  backdrop-filter: blur(8px);
}

.auth-menu {
  position: relative;
}

.auth-menu-trigger {
  min-height: 34px;
  border-radius: 999px;
  border: 1px solid #d6d4cc;
  background: #ffffff;
  color: #1f2937;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px 0 6px;
  cursor: pointer;
}

.auth-menu-trigger:hover {
  background: #f7f6f3;
}

.auth-menu-avatar {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #e7eefc;
  color: #1f5eff;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.auth-menu-label {
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  font-weight: 600;
}

.auth-menu-chevron {
  font-size: 10px;
  color: #657287;
}

.auth-menu-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(270px, 75vw);
  border-radius: 12px;
  border: 1px solid #d6d4cc;
  background: #fffdfa;
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.16);
  padding: 8px;
  display: grid;
  gap: 4px;
}

.auth-menu-email {
  font-size: 11px;
  color: #667085;
  padding: 4px 8px 6px;
  border-bottom: 1px solid #ece8dc;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-menu-item {
  min-height: 34px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #1f2937;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  padding: 0 10px;
  cursor: pointer;
}

.auth-menu-item:hover {
  background: #f3f4f6;
  border-color: #e5e7eb;
}

.auth-menu-item-danger {
  color: #b42318;
}

.auth-menu-item-danger:hover {
  background: #fef3f2;
  border-color: #fecdca;
}

.auth-runtime-pill {
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  min-height: 30px;
  border-radius: 999px;
  border: 1px solid #d6d4cc;
  background: #f4f1e9;
  color: #1f2937;
  font-size: 12px;
  font-weight: 600;
}

.auth-runtime-button {
  min-height: 34px;
  border-radius: 999px;
  border: 1px solid #d6d4cc;
  background: #ffffff;
  color: #1f2937;
  font-size: 13px;
  font-weight: 600;
  padding: 0 14px;
  cursor: pointer;
}

.auth-runtime-button:hover {
  background: #f5f4f0;
}

.auth-runtime-button-primary {
  border-color: #1f5eff;
  background: #1f5eff;
  color: #ffffff;
}

.auth-runtime-button-primary:hover {
  background: #1749cb;
}

.auth-gate {
  width: 100%;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.14), transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(31, 122, 79, 0.14), transparent 45%),
    #ece9e2;
}

.auth-gate-card {
  width: min(460px, 100%);
  border-radius: 18px;
  border: 1px solid #d6d4cc;
  background: #fffcf6;
  box-shadow: 0 16px 42px rgba(17, 24, 39, 0.12);
  padding: 26px;
}

.auth-gate-card h2 {
  margin: 0;
  font-size: 1.36rem;
  line-height: 1.2;
  color: #1f2937;
}

.auth-gate-card p {
  margin: 10px 0 0;
  color: #4b5563;
}

.auth-gate-actions {
  margin-top: 16px;
  display: inline-flex;
  gap: 8px;
}

@media (max-width: 900px) {
  .auth-runtime-bar {
    top: 10px;
    right: 10px;
  }

  .auth-menu-label {
    display: none;
  }

  .auth-menu-trigger {
    padding-right: 8px;
  }
}

.page-aura {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
  display: none;
}

/* Fix Mantine AppShell layout */
[class*="mantine-AppShell-root"] {
  display: flex !important;
  flex-direction: row !important;
  width: 100% !important;
  height: 100vh !important;
}

[class*="mantine-AppShell-navbar"] {
  flex: 0 0 210px !important;
  min-width: 210px !important;
  display: flex !important;
  flex-direction: column !important;
}

[class*="mantine-AppShell-main"] {
  flex: 1 1 auto !important;
  display: block !important;
  width: auto !important;
  margin-inline-start: 210px !important;
  height: 100vh !important;
  overflow: hidden !important;
  position: relative !important;
}

html[dir="rtl"] [class*="mantine-AppShell-main"] {
  margin-inline-start: 210px !important;
  margin-inline-end: 0 !important;
}

.content-shell {
  width: 100%;
  margin: 0;
  padding: 0;
  height: 100vh;
}

.app-shell-fill-stack {
  height: 100%;
}

.app-shell-sidebar-content {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

.home-fullscreen-main {
  width: 100%;
  height: 100vh;
  overflow: auto;
  background: var(--color-surface-app);
}

.delivery-modern-shell {
  width: 100%;
  height: 100vh;
}

.delivery-modern-main {
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--color-surface-app);
  min-height: 0;
}

.delivery-modern-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.78rem 1rem;
  border-bottom: 1px solid var(--color-border-default);
  background: #f6f5f2;
}

.delivery-modern-topbar-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

.delivery-modern-topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.delivery-video-progress {
  padding: 0.7rem 1rem 0.75rem;
  border-bottom: 1px solid var(--color-border-default);
  background: #fbfaf7;
}

.delivery-video-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.delivery-video-progress-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text-primary);
}

.delivery-video-progress-meta {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.delivery-video-progress-track {
  margin-top: 0.4rem;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #e6e2da;
  overflow: hidden;
}

.delivery-video-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #1f7a4f, #4ea877);
  transition: width 120ms linear;
}

.delivery-video-progress-fill.is-encoding {
  background: linear-gradient(90deg, #235d9f, #4d88cf);
}

.delivery-video-progress-message {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: #54606b;
}

.delivery-modern-blank {
  width: 100%;
  height: 100%;
  background: var(--color-surface-app);
}

.delivery-modern-workspace {
  display: grid;
  min-height: 0;
  height: 100%;
}

.delivery-modern-pane {
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--color-surface-panel);
}

.delivery-modern-pane-top {
  border-bottom: 1px solid var(--color-border-default);
}

.delivery-modern-pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.72rem 0.95rem;
  border-bottom: 1px solid var(--color-border-default);
  background: var(--color-surface-subtle);
}

.delivery-modern-pane-title {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text-muted);
}

.delivery-modern-pane-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(54vw, 560px);
}

.delivery-modern-toc-list {
  padding: 0.92rem;
  display: grid;
  gap: 0.48rem;
  overflow-y: auto;
}

.delivery-modern-toc-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  border: 1px solid var(--color-border-soft);
  background: var(--color-surface-subtle);
  border-radius: 12px;
  padding: 0.52rem 0.72rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.delivery-modern-toc-row-selected {
  background: #e7d7c4;
  border-color: #c9b59d;
}

.delivery-modern-toc-row-in-progress {
  background: #ddcab1;
  border-color: #b99f7f;
}

.delivery-modern-toc-row input[type="radio"] {
  margin: 0;
}

.delivery-modern-toc-title {
  color: var(--color-text-primary);
  font-weight: 500;
  font-size: var(--text-md);
  line-height: 1.35;
  flex: 1 1 auto;
}

.delivery-modern-slide-check {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  border: 1px solid #1f5eff;
  color: #1f5eff;
  background: #eaf1ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  flex: 0 0 auto;
}

.delivery-modern-empty {
  border: 1px dashed var(--color-border-soft);
  border-radius: 10px;
  padding: 0.8rem;
  color: var(--color-text-muted);
  font-size: var(--text-md);
  text-align: center;
  background: var(--color-surface-subtle);
}

.delivery-modern-splitter {
  position: relative;
  cursor: row-resize;
  background: transparent;
}

.delivery-modern-splitter::before {
  content: "";
  position: absolute;
  top: 50%;
  inset-inline-start: 0.55rem;
  inset-inline-end: 0.55rem;
  height: 1px;
  background: var(--color-border-default);
  transform: translateY(-50%);
}

.delivery-modern-splitter:hover::before {
  background: #9ea3ab;
}

.delivery-modern-results {
  min-height: 0;
  background: var(--color-surface-app);
  padding: 0.95rem;
  overflow-y: auto;
}

.delivery-modern-results-error {
  border: 1px solid #f0c9c4;
  background: #fff4f2;
  color: #9c2c21;
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  font-size: var(--text-md);
}

.delivery-modern-slide-list {
  display: grid;
  gap: 0.9rem;
}

.delivery-modern-slide-card {
  border: 1px solid var(--color-border-soft);
  border-radius: 14px;
  background: var(--color-surface-panel);
  padding: 0.9rem 0.95rem;
  display: grid;
  gap: 0.72rem;
}

.delivery-modern-slide-head {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.delivery-modern-slide-view-toggle {
  margin-inline-start: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.16rem;
  border: 1px solid var(--color-border-soft);
  border-radius: 999px;
  background: var(--color-surface-subtle);
}

.delivery-modern-slide-view-button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  border-radius: 999px;
  padding: 0.22rem 0.58rem;
  cursor: pointer;
}

.delivery-modern-slide-view-button.is-active {
  background: #1f5eff;
  color: #ffffff;
}

.delivery-modern-slide-view-button:focus-visible {
  outline: 2px solid #1f5eff;
  outline-offset: 1px;
}

.delivery-modern-slide-view-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.delivery-modern-slide-index {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.delivery-modern-slide-title {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.3;
  color: var(--color-text-primary);
}

.delivery-modern-slide-body {
  color: var(--color-text-primary);
  font-size: var(--text-md);
  line-height: 1.5;
}

.delivery-modern-slide-body :is(h1, h2, h3, h4, h5, h6) {
  margin: 0.45rem 0;
}

.delivery-modern-slide-body p {
  margin: 0.4rem 0;
}

.delivery-modern-slide-body ul,
.delivery-modern-slide-body ol {
  margin: 0.35rem 0 0.35rem 1.15rem;
  padding: 0;
}

.delivery-modern-slide-notes {
  border-top: 1px dashed var(--color-border-default);
  padding-top: 0.6rem;
  display: grid;
  gap: 0.35rem;
}

.delivery-modern-slide-notes-label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.delivery-modern-slide-notes-text {
  color: var(--color-text-secondary);
  font-size: var(--text-md);
  line-height: 1.45;
}

.delivery-modern-slide-empty {
  color: var(--color-text-muted);
  font-size: var(--text-md);
}

.delivery-modern-slide-render {
  border-top: 1px dashed var(--color-border-default);
  padding-top: 0.7rem;
  display: grid;
  gap: 0.5rem;
}

.delivery-modern-slide-render-label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.delivery-modern-slide-render-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.delivery-modern-template-pack-picker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.delivery-modern-template-pack-picker span {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.delivery-modern-template-pack-picker select {
  appearance: none;
  border: 1px solid var(--color-border-soft);
  border-radius: 8px;
  background: #ffffff;
  color: var(--color-text-primary);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.2;
  padding: 0.28rem 0.48rem;
  min-width: 120px;
}

.delivery-modern-template-pack-picker select:focus-visible {
  outline: 2px solid #1f5eff;
  outline-offset: 1px;
}

.delivery-modern-slide-render-image {
  width: 100%;
  max-width: 960px;
  height: auto;
  border: 1px solid var(--color-border-soft);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(12, 20, 34, 0.08);
}

.delivery-modern-slide-template-frame {
  width: 100%;
  min-height: 420px;
  border: 1px solid var(--color-border-soft);
  border-radius: 10px;
  background: #ffffff;
}

.delivery-modern-slide-render-error {
  border: 1px solid #f0c9c4;
  background: #fff4f2;
  color: #9c2c21;
  border-radius: 10px;
  padding: 0.62rem 0.7rem;
  font-size: var(--text-sm);
}

.delivery-modern-slide-render-hint {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.home-modern-shell {
  max-width: 1180px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 0 1.2rem 2rem;
  color: #1f2122;
}

.home-modern-topbar {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #d9d9d9;
}

.home-modern-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.home-modern-logo {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--color-accent-primary);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.home-modern-brand-name {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.home-modern-user {
  display: flex;
  align-items: center;
  gap: 0.95rem;
}

.home-modern-avatar-button {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 999px;
}

.home-modern-avatar-button:focus-visible {
  outline: 2px solid var(--color-accent-primary);
  outline-offset: 2px;
}

.home-modern-email {
  color: #686868;
  font-size: var(--text-md);
}

.home-modern-email-button {
  border: 0;
  background: transparent;
  padding: 0.2rem 0.35rem;
  margin: 0;
  border-radius: 8px;
  cursor: pointer;
}

.home-modern-email-button:hover {
  background: rgba(34, 101, 171, 0.08);
}

.home-modern-email-button:focus-visible {
  outline: 2px solid var(--color-accent-primary);
  outline-offset: 2px;
}

.home-modern-email-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.home-modern-avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #d8d5eb;
  color: #5b4fb8;
  font-weight: 700;
}

.home-modern-main {
  padding-top: 2rem;
}

.home-modern-workspace-zone {
  margin-top: 0.7rem;
}

.home-modern-hero-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.home-modern-greeting {
  margin: 0;
  font-size: 1.6rem;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.home-modern-greeting-sub {
  margin: 0.35rem 0 0;
  color: #6a6a6a;
  font-size: var(--text-lg);
}

.home-modern-create {
  min-width: 180px;
  font-weight: 700;
}

.home-modern-projects-header {
  font-size: var(--text-lg);
  letter-spacing: 0.05em;
  color: #6d6d6d;
  font-weight: 700;
  margin-bottom: 0.9rem;
}

.home-modern-project-list {
  display: grid;
  gap: 0.85rem;
}

.home-projects-empty {
  margin: 0 0 0.85rem;
  color: #6d6d6d;
  font-size: 0.96rem;
}

.home-project-card {
  border: 1px solid #d7d7d7;
  border-radius: 14px;
  background: #fbfbfb;
  overflow: hidden;
}

.home-project-card.is-expanded {
  border-color: #6ca3db;
  box-shadow: inset 0 0 0 1px rgba(108, 163, 219, 0.2);
}

.home-project-card-top {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
}

.home-project-card-main {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  min-width: 0;
}

.home-project-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #d8e6f7;
  color: #205f9f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  font-weight: 700;
  flex: 0 0 auto;
}

.home-project-copy {
  min-width: 0;
}

.home-project-title {
  font-size: var(--text-lg);
  font-weight: 700;
  line-height: 1.2;
  color: #1f2122;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-project-title-button {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  min-width: 0;
  text-align: start;
  cursor: pointer;
}

.home-project-title-button:focus-visible {
  outline: 2px solid rgba(59, 125, 189, 0.3);
  outline-offset: 2px;
  border-radius: 6px;
}

.home-project-title-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.home-project-title-input {
  width: 100%;
  min-width: 0;
  border: 1px solid #cfd5dd;
  border-radius: 8px;
  background: #ffffff;
  color: #1f2122;
  font: inherit;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.15;
  padding: 0.28rem 0.46rem;
}

.home-project-title-input:focus {
  outline: 2px solid rgba(59, 125, 189, 0.3);
  border-color: var(--color-accent-primary);
}

.home-project-rename-button {
  width: 26px;
  height: 26px;
  border: 1px solid #d1d7e0;
  border-radius: 8px;
  background: #ffffff;
  color: #4f5c69;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 auto;
}

.home-project-rename-button:hover {
  border-color: #9eb4ca;
  color: #2d465f;
}

.home-project-rename-button:focus-visible {
  outline: 2px solid rgba(59, 125, 189, 0.3);
  outline-offset: 1px;
}

.home-project-meta-line {
  margin-top: 0.32rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #676767;
  font-size: var(--text-sm);
  white-space: nowrap;
}

.home-project-pill {
  display: inline-flex;
  align-items: center;
  height: 24px;
  border-radius: 999px;
  padding: 0 0.62rem;
  background: #deebf9;
  color: #1f66ad;
  font-weight: 600;
}

.home-project-progress-wrap {
  display: grid;
  justify-items: end;
  gap: 0.35rem;
  min-width: 130px;
}

.home-project-progress-bar {
  width: 116px;
  height: 4px;
  border-radius: 999px;
  background: #e3e3e3;
  overflow: hidden;
}

.home-project-progress-bar > span {
  display: block;
  height: 100%;
  background: #26a07a;
}

.home-project-progress-label {
  color: #666666;
  font-size: 0.95rem;
  font-weight: 600;
}

.home-project-chevron {
  color: #7d7d7d;
  font-size: 1.05rem;
  width: 20px;
  text-align: center;
}

.home-project-expand-button {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.home-project-expand-button:focus-visible {
  outline: 2px solid rgba(59, 125, 189, 0.3);
  outline-offset: 2px;
  border-radius: 6px;
}

.home-project-rename-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.home-project-inline-action {
  border: 1px solid #3b7dbd;
  background: var(--color-accent-primary);
  color: #ffffff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.1;
  padding: 0.3rem 0.55rem;
  border-radius: 8px;
  cursor: pointer;
}

.home-project-inline-action:disabled {
  opacity: 0.7;
  cursor: default;
}

.home-project-inline-action-secondary {
  border-color: #d1d7df;
  background: #ffffff;
  color: #4f5c69;
}

.home-project-details {
  border-top: 1px solid #e5e5e5;
  padding: 0.8rem 1.1rem 0.95rem;
}

.home-project-details p {
  margin: 0;
  color: #535353;
  line-height: 1.35;
}

.home-project-actions {
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.home-modern-footnote {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid #d9d9d9;
  color: #707070;
  font-size: 0.9rem;
}

.home-workspace-panel {
  border: 1px solid #d7d7d7;
  border-radius: 14px;
  background: #fbfbfb;
  padding: 1.1rem 1.1rem 1.2rem;
}

.home-workspace-title {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: #1f2122;
}

.home-workspace-subtitle {
  margin: 0.35rem 0 0;
  color: #666666;
  font-size: var(--text-sm);
}

.home-workspace-error {
  margin: 0.75rem 0 0;
  color: #b42318;
  font-size: 0.92rem;
  font-weight: 600;
}

.home-workspace-form-grid {
  margin-top: 0.95rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.home-workspace-field {
  display: grid;
  gap: 0.32rem;
}

.home-workspace-field > span {
  color: #454545;
  font-size: 0.84rem;
  font-weight: 600;
}

.home-workspace-field > input,
.home-workspace-field > textarea {
  width: 100%;
  border: 1px solid #cfd5dd;
  border-radius: 10px;
  background: #ffffff;
  color: #1f2122;
  font: inherit;
  padding: 0.62rem 0.7rem;
}

.home-workspace-field > textarea {
  min-height: 86px;
  resize: vertical;
}

.home-workspace-field > input:focus,
.home-workspace-field > textarea:focus {
  outline: 2px solid rgba(59, 125, 189, 0.3);
  border-color: var(--color-accent-primary);
}

.home-document-type-radio-list {
  display: grid;
  gap: 0.5rem;
}

.home-document-type-radio-item {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid #d6dce5;
  border-radius: 10px;
  background: #ffffff;
  cursor: pointer;
}

.home-document-type-radio-item:has(input:checked) {
  border-color: var(--color-accent-primary);
  box-shadow: inset 0 0 0 1px rgba(59, 125, 189, 0.2);
}

.home-document-type-radio-item > input {
  margin-top: 0.1rem;
}

.home-document-type-radio-icon {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: #edf3fb;
  color: #2a689f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin-top: 0.02rem;
}

.home-document-type-radio-copy {
  display: grid;
  gap: 0.18rem;
}

.home-document-type-radio-title {
  color: #20272f;
  font-weight: 600;
  font-size: 0.95rem;
}

.home-document-type-radio-description {
  color: #61666f;
  font-size: 0.85rem;
  line-height: 1.3;
}

.home-document-type-empty {
  margin: 0;
  color: #737983;
  font-size: 0.9rem;
}

.home-workspace-field-full {
  grid-column: 1 / -1;
}

.home-workspace-actions {
  margin-top: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: flex-end;
}

@media (max-width: 900px) {
  .home-modern-shell {
    padding: 0 0.8rem 1.25rem;
  }

  .home-modern-topbar {
    height: auto;
    padding: 0.8rem 0;
    align-items: flex-start;
    gap: 0.8rem;
    flex-direction: column;
  }

  .home-modern-brand-name {
    font-size: 1.65rem;
  }

  .home-modern-email {
    font-size: 1rem;
  }

  .home-modern-greeting {
    font-size: 2rem;
  }

  .home-modern-greeting-sub {
    font-size: 1rem;
  }

  .home-modern-hero-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-project-card-top {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "main chevron"
      "progress progress";
  }

  .home-project-card-main {
    grid-area: main;
  }

  .home-project-expand-button {
    grid-area: chevron;
    justify-self: end;
  }

  .home-project-chevron {
    grid-area: chevron;
    justify-self: end;
  }

  .home-project-progress-wrap {
    grid-area: progress;
    justify-items: start;
  }

  .home-project-rename-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .home-workspace-form-grid {
    grid-template-columns: 1fr;
  }

  .home-workspace-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

.section-grid {
  display: grid;
  gap: 0.9rem;
}

.summary-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.output-box {
  min-height: 140px;
  padding: 0.85rem;
  border-radius: 12px;
  background: #f7f9fc;
  border: 1px solid #d6e0f0;
  white-space: pre-wrap;
  line-height: 1.4;
}

.toc-panel {
  padding: 0.85rem;
  border-radius: 12px;
  background: #f7f9fc;
  border: 1px solid #d6e0f0;
}

.toc-heading {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.toc-item {
  display: flex;
  gap: 0.6rem;
  padding: 0.3rem 0;
  align-items: baseline;
}

.toc-index {
  min-width: 2.5rem;
  font-weight: 700;
  color: #1b3a57;
}

.toc-title {
  color: #10263b;
}

.toc-description {
  color: #3a4e63;
  font-size: 0.9rem;
  line-height: 1.35;
}

.toc-selectable-item {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.2rem 0;
  cursor: pointer;
}

.toc-selectable-item input[type="radio"] {
  margin-top: 0.45rem;
  flex: 0 0 auto;
}

.toc-selectable-item .toc-item {
  flex: 1 1 auto;
}

.inventory-panel {
  display: grid;
  gap: 0.85rem;
}

.inventory-block {
  padding: 0.85rem;
  border-radius: 12px;
  background: #f7f9fc;
  border: 1px solid #d6e0f0;
}

.inventory-heading,
.inventory-subheading {
  font-weight: 700;
  color: #1b3a57;
  margin-bottom: 0.45rem;
}

.inventory-subheading {
  margin-top: 0.6rem;
}

.inventory-text,
.inventory-empty,
.inventory-source-meta {
  color: #10263b;
  line-height: 1.4;
}

.inventory-list {
  margin: 0;
  padding-inline-start: 1.2rem;
}

.inventory-list li {
  margin: 0.2rem 0;
}

.inventory-sources {
  display: grid;
  gap: 0.75rem;
}

.inventory-source-card {
  padding: 0.85rem;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #d6e0f0;
}

.inventory-source-title {
  font-weight: 700;
  color: #10263b;
  margin-bottom: 0.25rem;
}

.mission-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.mission-card {
  background: #f7f9fc;
  border-width: 1px;
}

.mission-card-red {
  border-color: #efb0b0;
  box-shadow: inset 0 0 0 1px rgba(196, 57, 57, 0.08);
}

.mission-card-amber {
  border-color: #edd38d;
  box-shadow: inset 0 0 0 1px rgba(177, 116, 0, 0.08);
}

.mission-card-green {
  border-color: #b4dfc4;
  box-shadow: inset 0 0 0 1px rgba(20, 99, 61, 0.08);
}

.mission-card-unknown {
  border-color: #d6e0f0;
}

.mission-card-value,
.mission-card-list,
.mission-card-reason {
  color: #10263b;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.mission-card-list {
  margin: 0;
  padding-inline-start: 1.2rem;
  display: grid;
  gap: 0.25rem;
}

.mission-modern-shell {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.mission-modern-main {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.9fr);
  border: 1px solid var(--color-border-soft);
  border-radius: 0;
  overflow: hidden;
  background: var(--color-surface-panel);
  height: 100%;
  min-height: 0;
}

.mission-modern-center {
  display: grid;
  grid-template-rows: auto 1fr auto;
  border-inline-end: 1px solid var(--color-border-default);
  background: var(--color-surface-app);
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.mission-modern-strip {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  padding: 0.75rem 0.95rem;
  border-bottom: 1px solid var(--color-border-default);
  background: var(--color-surface-subtle);
}

.mission-modern-strip-title {
  font-weight: 700;
  color: var(--color-text-primary);
}

.modern-runtime-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.mission-modern-conversation {
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  overflow-y: auto;
  min-height: 0;
}

.mission-chat-row {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
}

.mission-chat-row-user {
  justify-content: flex-end;
}

.mission-chat-row-assistant {
  justify-content: flex-start;
}

.mission-role-icon {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 700;
  flex: 0 0 auto;
}

.mission-role-icon-user {
  color: #4c54a8;
  background: #e6e8ff;
  border: 1px solid #bcc3ff;
}

.mission-role-icon-assistant {
  color: #2f7ec5;
  background: #e5eff8;
  border: 1px solid #c6daec;
}

.mission-bubble {
  border-radius: 12px;
  border: 1px solid #d0d0d0;
  padding: 0.75rem 0.85rem;
  white-space: pre-wrap;
  line-height: 1.45;
  max-width: min(80%, 720px);
}

.mission-bubble-assistant {
  background: #ecebe4;
  color: #1f1f1f;
}

.mission-bubble-user {
  background: #e5e6fb;
  border-color: #b8bbe8;
  color: #202a5a;
}

.mission-modern-composer {
  border-top: 1px solid var(--color-border-default);
  padding: 0.8rem;
  background: var(--color-surface-subtle);
}

.mission-modern-actions {
  margin-top: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tractus-drawer-body {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  overflow: hidden;
  padding: 0 !important;
}

.tractus-drawer-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.tractus-drawer-shell {
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto auto;
  min-height: 0;
}

.tractus-drawer-conversation {
  background: var(--color-surface-app);
}

.tractus-debug-snippets {
  border-top: 1px solid var(--color-border-default);
  background: #f7f7f4;
  padding: 0.7rem 0.8rem;
  display: grid;
  gap: 0.5rem;
  max-height: 30vh;
  min-height: 0;
}

.tractus-debug-snippets-title {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  font-weight: 700;
}

.tractus-debug-snippets-list {
  overflow-y: auto;
  display: grid;
  gap: 0.48rem;
}

.tractus-debug-snippet-card {
  border: 1px solid #d9d9d2;
  border-radius: 10px;
  background: #ffffff;
  padding: 0.55rem 0.6rem;
  display: grid;
  gap: 0.33rem;
}

.tractus-debug-snippet-head {
  font-size: 0.73rem;
  color: #6b7280;
  font-weight: 700;
}

.tractus-debug-snippet-text {
  font-size: 0.82rem;
  line-height: 1.35;
  color: #1f2937;
}

.tractus-debug-snippet-empty {
  border: 1px dashed #cdd2d9;
  border-radius: 10px;
  background: #f9fafb;
  padding: 0.6rem;
  color: #6b7280;
  font-size: 0.8rem;
}

.tractus-drawer-composer {
  border-top: 1px solid var(--color-border-default);
}

.tractus-composer-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-inline-start: auto;
  gap: 0.5rem;
}

.tractus-drawer-composer .mission-modern-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.5rem;
}

.tractus-feed-meta {
  margin-top: 0.45rem;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #6b7280;
}

.mission-modern-right {
  background: var(--color-surface-app);
  overflow-y: auto;
  min-height: 0;
  min-width: 0;
}

.mission-doc-panel-modern {
  padding: 0.9rem;
  display: grid;
  gap: 0.65rem;
}

.mission-doc-title {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text-muted);
}

.mission-doc-item {
  border-top: 1px solid var(--color-border-default);
  padding-top: 0.55rem;
  display: grid;
  gap: 0.35rem;
}

.mission-doc-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mission-doc-label {
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.3;
}

.mission-doc-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.mission-doc-dot-green {
  background: #11a66a;
}

.mission-doc-dot-amber {
  background: #d09013;
}

.mission-doc-dot-red {
  background: #ce3b3b;
}

.mission-doc-dot-unknown {
  background: #9da8b6;
}

.mission-doc-value {
  color: var(--color-text-primary);
  line-height: 1.45;
  font-size: 0.93rem;
  white-space: pre-wrap;
}

.mission-doc-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.mission-doc-chip {
  background: #e8e8e1;
  border-radius: 999px;
  padding: 0.17rem 0.45rem;
  font-size: var(--text-xs);
}

.mission-doc-empty {
  color: var(--color-text-muted);
}

.data-modern-shell {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.data-modern-main {
  display: grid;
  grid-template-columns: minmax(320px, 1.2fr) minmax(0, 0.8fr);
  border: 1px solid var(--color-border-soft);
  border-radius: 0;
  overflow: hidden;
  background: var(--color-surface-panel);
  height: 100%;
  min-height: 0;
  align-items: stretch;
  min-width: 0;
}

.data-modern-left {
  background: var(--color-surface-app);
  border-inline-end: 1px solid var(--color-border-default);
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 0;
  overflow: hidden;
  height: 100%;
  min-width: 0;
}

.data-modern-strip {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  padding: 0.75rem 0.95rem;
  border-bottom: 1px solid var(--color-border-default);
  background: var(--color-surface-subtle);
}

.data-modern-strip-title {
  font-weight: 700;
  color: var(--color-text-primary);
}

.data-modern-left-content {
  padding: 0.85rem;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0.75rem;
  min-height: 0;
  overflow: hidden;
  height: 100%;
}

.data-modern-panel-title {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-text-muted);
}

.data-uploaded-list {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.45rem;
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  padding-inline-end: 2px;
  width: 100%;
}

.data-left-bottom-stack {
  display: grid;
  gap: 0.75rem;
  align-content: end;
}

.data-file-card {
  border-radius: 12px;
  border: 1.5px solid #cdcdcd;
  background: var(--color-surface-raised);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: visible;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.data-file-card.is-selected {
  border-color: #185fa5;
  background: #e6f1fb;
}

.data-file-card.data-file-card-external.is-selected {
  border-color: #185fa5;
  background: #e6f1fb;
}

.data-file-card.data-file-card-internal.is-selected {
  border-color: #5f4db0;
  background: #ede8ff;
}

.data-file-card.is-removing {
  opacity: 0.72;
  pointer-events: none;
}

.data-file-card-main {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  cursor: pointer;
}

.data-file-card-radio-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.data-file-card-radio {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 3px solid #b9b9b9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: transparent;
}

.data-file-card.is-selected .data-file-card-radio {
  border-color: #1e63aa;
}

.data-file-card.data-file-card-internal.is-selected .data-file-card-radio {
  border-color: #5f4db0;
}

.data-file-card-radio-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #1e63aa;
  display: inline-block;
}

.data-file-card.data-file-card-internal.is-selected .data-file-card-radio-dot {
  background: #5f4db0;
}

.data-file-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--data-file-icon-bg, #a9c7e6);
  color: var(--data-file-icon-fg, #185fa5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.data-file-card-content {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}

.data-file-card-title {
  display: block;
  font-weight: 600;
  color: var(--color-text-primary);
  font-size: var(--text-lg);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.data-file-card-badges {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.data-file-record-badge {
  text-transform: none;
  font-weight: 700;
  font-size: var(--text-xs);
  line-height: 1.2;
  border: none;
  padding: 6px 10px;
  flex: 0 0 auto;
  align-self: flex-start;
}

.data-file-record-badge.is-extracted {
  background: #d5ece6;
  color: #0e5c50;
}

.data-file-record-badge.is-pending {
  background: #ecebe7;
  color: #6f6f6f;
}

.data-file-record-badge-content {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.data-file-card-hover-row {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(8px);
  min-width: 0;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid transparent;
  transition: max-height 180ms ease, opacity 160ms ease, transform 180ms ease,
    border-color 180ms ease, padding-top 180ms ease, padding-bottom 180ms ease;
}

.data-file-card:hover .data-file-card-hover-row,
.data-file-card.is-hovered .data-file-card-hover-row,
.data-file-card:focus-within .data-file-card-hover-row,
.data-file-card.is-confirming .data-file-card-hover-row {
  max-height: 52px;
  opacity: 1;
  padding-top: 8px;
  padding-bottom: 6px;
  transform: translateY(0);
  border-top-color: var(--color-border-default);
}

.data-file-card-hover-meta {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.data-file-card-hover-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-inline-start: auto;
  flex: 0 0 auto;
}

.data-file-card-remove-trigger {
  width: auto;
  min-width: 122px;
  height: 30px;
  appearance: none;
  border: 1px solid #d4d4d4;
  border-radius: 9px;
  background: #f7f7f7;
  color: #3d3d3d;
  font-size: var(--text-sm);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  flex: 0 0 auto;
}

.data-file-card-deassign-trigger {
  width: auto;
  min-width: 122px;
  height: 30px;
  appearance: none;
  border: 1px solid #cfd6e2;
  border-radius: 9px;
  background: #f5f8fc;
  color: #2f4e73;
  font-size: var(--text-sm);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  flex: 0 0 auto;
}

@media (max-width: 1100px) {
  .data-modern-main {
    grid-template-columns: 1fr;
  }

  .data-modern-left {
    border-inline-end: 0;
    border-bottom: 1px solid var(--color-border-default);
  }

  .data-modern-left-content {
    grid-template-rows: auto minmax(180px, 1fr) auto;
    overflow-y: auto;
  }

  .data-uploaded-list {
    height: auto;
    min-height: 180px;
  }
}

.data-file-card-remove-trigger:hover {
  border-color: #d7a4a4;
  background: #fff3f3;
  color: #a22d2d;
}

.data-file-card-deassign-trigger:hover {
  border-color: #afc0db;
  background: #edf3fc;
  color: #22456d;
}

.data-file-card-remove-trigger:disabled,
.data-file-card-deassign-trigger:disabled {
  cursor: not-allowed;
  opacity: 0.66;
}

.data-file-card-confirm {
  border-top: 1px solid var(--color-border-default);
  background: #fcfcfc;
  padding: 9px 12px 10px;
  display: grid;
  gap: 7px;
}

.data-file-card-confirm-title {
  font-size: var(--text-xs);
  font-weight: 700;
  color: #292929;
}

.data-file-card-confirm-copy {
  font-size: var(--text-xs);
  line-height: 1.4;
  color: #5f5f5f;
}

.data-file-card-confirm-warning {
  margin-top: 6px;
  color: #954747;
  font-weight: 600;
}

.data-file-card-confirm-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.data-file-card-confirm-cancel,
.data-file-card-confirm-remove {
  appearance: none;
  border: 1px solid #d2d2d2;
  border-radius: 8px;
  background: #ffffff;
  color: #2f2f2f;
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 4px 8px;
  cursor: pointer;
}

.data-file-card-confirm-remove {
  border-color: #caa;
  color: #8f2a2a;
}

.data-file-card-confirm-cancel:hover {
  background: #f3f3f3;
}

.data-file-card-confirm-remove:hover {
  background: #fff2f2;
}

.data-file-card-confirm-cancel:disabled,
.data-file-card-confirm-remove:disabled {
  cursor: not-allowed;
  opacity: 0.66;
}

.data-uploaded-empty {
  color: var(--color-text-muted);
  font-size: var(--text-md);
}

.screen-error-banner {
  border: 1px solid #efb3b3;
  background: #fff0f0;
  color: #8f1e1e;
  border-radius: 8px;
  padding: 0.42rem 0.55rem;
  font-size: 0.82rem;
  line-height: 1.25;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.45rem;
}

.screen-error-banner-message {
  flex: 1 1 auto;
  min-width: 0;
  max-height: 3.1rem;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.screen-error-banner-close {
  appearance: none;
  border: 1px solid #d79a9a;
  background: #fff;
  color: #8f1e1e;
  border-radius: 999px;
  width: 19px;
  height: 19px;
  line-height: 1;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.screen-error-banner-close:hover {
  background: #ffe5e5;
}

.data-upload-actions {
  display: grid;
  gap: 0.45rem;
  border: 1px dashed #c7c7c7;
  border-radius: 10px;
  padding: 0.65rem;
  background: var(--color-surface-muted);
}

.data-source-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.data-source-switch-title {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-text-muted);
}

.data-source-card {
  appearance: none;
  border: 1px solid #cfd5dd;
  border-radius: 12px;
  background: var(--color-surface-app);
  text-align: left;
  padding: 0.75rem 0.8rem;
  cursor: pointer;
  display: grid;
  gap: 0.32rem;
  color: var(--color-text-primary);
}

.data-source-card:hover {
  border-color: #aebfd3;
}

.data-source-card:focus-visible {
  outline: 2px solid rgba(59, 125, 189, 0.35);
  outline-offset: 1px;
}

.data-source-card.is-active {
  font-weight: 700;
}

.data-source-card-external.is-active {
  border-color: var(--color-accent-primary);
  background: #e7f1fb;
}

.data-source-card-internal.is-active {
  border-color: #6252c7;
  background: #ece9fb;
}

.data-source-title {
  font-weight: 700;
  font-size: var(--text-lg);
  line-height: 1.2;
}

.data-source-description {
  color: #646c75;
  font-weight: 400;
  line-height: 1.35;
}

.data-source-description strong {
  color: var(--color-text-primary);
  font-weight: 700;
}

.data-dropzone {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  border: 2px dashed #c8cdd5;
  border-radius: 12px;
  background: #f5f6f8;
  padding: 0.78rem 0.7rem;
  text-align: center;
}

.data-dropzone.is-drag-active {
  filter: brightness(0.985);
}

.data-dropzone-external {
  border-color: #99bbe0;
  background: #eef5fc;
}

.data-dropzone-external .data-dropzone-icon {
  color: #2a6fb2;
}

.data-dropzone-external.is-drag-active {
  border-color: var(--color-accent-primary);
  background: #e3effc;
}

.data-dropzone-internal {
  border-color: #b3a9ea;
  background: #f2effd;
}

.data-dropzone-internal .data-dropzone-icon {
  color: #5b4ec2;
}

.data-dropzone-internal.is-drag-active {
  border-color: #6252c7;
  background: #ebe6fc;
}

.data-upload-input-hidden {
  display: none;
}

.data-dropzone-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.data-dropzone-title {
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.25;
}

.data-dropzone-subtitle {
  color: #5f6872;
  font-size: var(--text-md);
}

.data-upload-picked {
  color: #505050;
  font-size: var(--text-sm);
}

.data-metrics-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.data-metric-card {
  background: #ebe9e2;
  border-radius: 10px;
  padding: 0.62rem;
  display: grid;
  justify-items: center;
  gap: 0.14rem;
}

.data-metric-card strong {
  font-size: var(--text-xl);
  line-height: 1;
  color: var(--color-text-primary);
}

.data-metric-card span {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.data-modern-right {
  background: var(--color-surface-muted);
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.data-modern-right-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.85rem;
  border-bottom: 1px solid var(--color-border-default);
}

.data-modern-count {
  color: var(--color-text-muted);
  font-size: var(--text-md);
}

.data-modern-record-list {
  padding: 0.85rem;
  display: grid;
  gap: 0.52rem;
  overflow-y: auto;
  overflow-x: hidden;
  align-content: start;
  min-height: 0;
  min-width: 0;
}

.data-modern-record-card {
  background: var(--color-surface-soft);
  border: 1px solid var(--color-border-muted);
  border-radius: 11px;
  padding: 0.56rem 0.7rem;
  display: grid;
  gap: 0.2rem;
}

.data-modern-record-type {
  justify-self: start;
  font-size: var(--text-xs);
  font-weight: 700;
  color: #2f74bf;
  background: #deebfb;
  border-radius: 999px;
  padding: 0.08rem 0.42rem;
}

.data-modern-record-subject {
  font-weight: 700;
  color: #222;
}

.data-modern-record-preview {
  color: #2f2f2f;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.toc-data-status-inline {
  margin-inline-start: 8px;
  display: inline-flex;
  align-items: center;
}

.data-modern-record-meta {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

@media (max-width: 900px) {
  .data-source-switch {
    grid-template-columns: 1fr;
  }
}

.structure-modern-shell {
  width: 100%;
  height: 100%;
  min-height: 0;
  position: relative;
}

.generation-modern-shell {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.generation-modern-workspace {
  display: grid;
  min-height: 0;
  height: 100%;
  border: 1px solid var(--color-border-soft);
  background: var(--color-surface-app);
  overflow: hidden;
}

.generation-modern-main {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-radius: 0;
  overflow: hidden;
  background: var(--color-surface-app);
  height: 100%;
  min-height: 0;
  position: relative;
  min-width: 0;
}

.generation-modern-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  padding: 0.72rem 0.95rem;
  border-bottom: 1px solid var(--color-border-default);
  background: var(--color-surface-subtle);
}

.generation-modern-topbar-left {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.generation-modern-topbar-title {
  font-weight: 700;
  color: var(--color-text-primary);
}

.generation-modern-topbar-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.generation-modern-body {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 1fr);
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.generation-modern-document {
  border-inline-end: 1px solid var(--color-border-default);
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 0;
  min-width: 0;
  background: var(--color-surface-app);
}

.generation-modern-document-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.72rem 0.95rem;
  border-bottom: 1px solid var(--color-border-default);
  background: var(--color-surface-subtle);
}

.generation-modern-panel-title {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text-muted);
}

.generation-modern-doc-state {
  color: #2a5d9b;
  background: #dbe7f8;
  border-radius: 999px;
  padding: 0.14rem 0.55rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.generation-modern-document-list {
  padding: 0.92rem;
  display: grid;
  gap: 0.58rem;
  overflow-y: auto;
}

.generation-modern-doc-item {
  display: grid;
  gap: 0.26rem;
}

.generation-modern-doc-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  border: 1px solid var(--color-border-soft);
  background: var(--color-surface-subtle);
  border-radius: 12px;
  padding: 0.58rem 0.75rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.generation-modern-doc-row-selected {
  background: #e7d7c4;
  border-color: #c9b59d;
}

.generation-modern-doc-row input[type="radio"] {
  margin: 0;
}

.generation-modern-doc-toggle {
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1;
  padding: 0;
  width: 1rem;
  text-align: center;
  cursor: pointer;
}

.generation-modern-doc-toggle:hover {
  color: #2f2f2f;
}

.generation-modern-doc-toggle:focus-visible {
  outline: 2px solid #4f81d8;
  outline-offset: 2px;
  border-radius: 3px;
}

.generation-modern-doc-index {
  width: 1.1rem;
  color: var(--color-text-muted);
  font-size: var(--text-lg);
}

.generation-modern-doc-title {
  color: var(--color-text-primary);
  font-weight: 700;
  line-height: 1.35;
  flex: 1 1 auto;
}

.generation-modern-doc-badges {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  flex-wrap: wrap;
}

.generation-modern-doc-mini-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.22rem;
  height: 1.18rem;
  border-radius: 999px;
  padding: 0 0.36rem;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
}

.generation-modern-doc-mini-badge-external {
  color: #0f4f86;
  background: #d9ebfb;
  border: 1px solid #b3d6f3;
}

.generation-modern-doc-mini-badge-internal {
  color: #4f2f89;
  background: #e7dcfb;
  border: 1px solid #d0b8f0;
}

.generation-modern-doc-icon-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.18rem;
  color: #374151;
  background: #eef1f5;
  border: 1px solid #d7dde6;
  border-radius: 999px;
  padding: 0.08rem 0.34rem;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
}

.generation-modern-doc-status {
  color: var(--color-text-muted);
  background: var(--color-surface-app);
  border: 1px solid var(--color-border-soft);
  border-radius: 999px;
  padding: 0.12rem 0.55rem;
  font-size: var(--text-sm);
  font-weight: 600;
}

.generation-modern-doc-check {
  color: #16a34a;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1;
}

.generation-modern-doc-description {
  border: 1px solid var(--color-border-soft);
  border-radius: 10px;
  background: var(--color-surface-panel);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: 1.4;
  padding: 0.5rem 0.68rem;
}

.generation-modern-empty-row {
  border: 1px dashed var(--color-border-default);
  border-radius: 12px;
  background: var(--color-surface-muted);
  padding: 0.75rem;
  color: var(--color-text-muted);
}

.generation-modern-pipeline {
  background: var(--color-surface-muted);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto minmax(0, 1fr);
  min-height: 0;
  min-width: 0;
}

.generation-modern-pipeline > .generation-modern-panel-title {
  padding: 0.72rem 0.95rem;
  border-bottom: 1px solid var(--color-border-default);
  background: var(--color-surface-subtle);
}

.generation-modern-pipeline-list {
  padding: 0.6rem 0.8rem;
  display: grid;
  gap: 0;
  align-content: start;
  min-height: 0;
  overflow-y: auto;
}

.generation-modern-pipeline-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.52rem 0.2rem;
  border-bottom: 1px solid var(--color-border-soft);
}

.generation-modern-pipeline-row-running {
  background: #dff3eb;
  border: 1px solid #b5ded0;
  border-radius: 10px;
  padding: 0.52rem 0.55rem;
  margin: 0.12rem 0;
}

.generation-modern-pipeline-row-running .generation-modern-pipeline-title {
  color: #0f6f53;
}

.generation-modern-pipeline-row-running .generation-modern-pipeline-status {
  color: #0f6f53;
  font-weight: 700;
}

.generation-modern-pipeline-row-running .generation-modern-pipeline-dot,
.generation-modern-pipeline-row-done .generation-modern-pipeline-dot {
  border-color: #14a171;
  background: #14a171;
}

.generation-modern-pipeline-dot {
  width: 0.68rem;
  height: 0.68rem;
  border-radius: 999px;
  border: 2px solid var(--color-text-muted);
}

.generation-modern-pipeline-copy {
  display: grid;
  gap: 0.06rem;
}

.generation-modern-pipeline-title {
  color: var(--color-text-primary);
  font-weight: 700;
  line-height: 1.25;
}

.generation-modern-pipeline-status {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.generation-modern-overall {
  justify-content: space-between;
  align-items: center;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.6rem;
  border-top: 1px solid var(--color-border-default);
  padding: 0.72rem 0.95rem;
  color: var(--color-text-muted);
  background: var(--color-surface-subtle);
}

.generation-modern-overall-bar {
  height: 5px;
  border-radius: 999px;
  background: var(--color-border-soft);
  overflow: hidden;
}

.generation-modern-overall-fill {
  height: 100%;
  border-radius: 999px;
  background: #2f9f7e;
  width: 0;
}

.generation-modern-analytics {
  border-top: 1px solid var(--color-border-default);
  padding: 0.65rem 0.85rem 0.85rem;
  display: grid;
  gap: 0.48rem;
  background: var(--color-surface-app);
  min-height: 0;
  overflow-y: auto;
}

.generation-modern-analytics-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.45rem;
  color: var(--color-text-primary);
  font-weight: 700;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.generation-modern-analytics-state {
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: var(--text-xs);
  letter-spacing: 0.03em;
}

.generation-modern-analytics-error {
  border: 1px solid #e2b8b8;
  background: #f7eaea;
  color: #9f2e2e;
  border-radius: 10px;
  padding: 0.45rem 0.55rem;
  font-size: 0.82rem;
}

.generation-modern-analytics-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
}

.generation-modern-analytics-metric {
  border: 1px solid var(--color-border-soft);
  border-radius: 10px;
  background: var(--color-surface-panel);
  padding: 0.42rem 0.5rem;
  display: grid;
  gap: 0.08rem;
}

.generation-modern-analytics-metric strong {
  color: var(--color-text-primary);
  font-size: var(--text-lg);
  line-height: 1.1;
}

.generation-modern-analytics-metric span {
  color: var(--color-text-muted);
  font-size: var(--text-xs);
}

.generation-modern-analytics-inline {
  display: grid;
  gap: 0.22rem;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.generation-modern-analytics-subtitle {
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: var(--text-xs);
  font-weight: 700;
  margin-top: 0.15rem;
}

.generation-modern-run-list,
.generation-modern-step-list {
  border: 1px solid var(--color-border-soft);
  border-radius: 10px;
  background: var(--color-surface-panel);
  display: grid;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 180px;
}

.generation-modern-run-row,
.generation-modern-step-row {
  display: grid;
  align-items: center;
  gap: 0.45rem;
  padding: 0.36rem 0.5rem;
  border-bottom: 1px solid var(--color-border-soft);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.generation-modern-run-row {
  grid-template-columns: auto minmax(0, 1.2fr) auto auto;
}

.generation-modern-step-row {
  grid-template-columns: minmax(0, 1.2fr) auto auto;
}

.generation-modern-run-row:last-child,
.generation-modern-step-row:last-child {
  border-bottom: none;
}

.generation-modern-run-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.08rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--color-border-soft);
  color: var(--color-text-muted);
}

.generation-modern-run-status-completed {
  background: #dff3eb;
  color: #0f6f53;
}

.generation-modern-run-status-failed {
  background: #f7e6e6;
  color: #9f2e2e;
}

.generation-modern-run-status-cancelled {
  background: #f5efe2;
  color: #856111;
}

.generation-modern-run-status-running {
  background: #dfeafb;
  color: #2a5d9b;
}

.generation-modern-run-section,
.generation-modern-step-name {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.generation-modern-analytics-empty {
  padding: 0.45rem 0.55rem;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.generation-modern-live-output {
  border-top: 1px solid var(--color-border-default);
  background: var(--color-surface-subtle);
  padding: 0.72rem 0.95rem;
  display: grid;
  gap: 0.38rem;
  grid-template-rows: auto 1fr;
  min-height: 0;
}

.generation-modern-splitter {
  position: relative;
  cursor: row-resize;
  background: transparent;
}

.generation-modern-splitter::before {
  content: "";
  position: absolute;
  top: 50%;
  inset-inline-start: 0.55rem;
  inset-inline-end: 0.55rem;
  height: 1px;
  background: var(--color-border-default);
  transform: translateY(-50%);
}

.generation-modern-splitter:hover::before {
  background: #9ea3ab;
}

.generation-modern-live-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.generation-modern-live-title {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-weight: 700;
}

.generation-modern-live-rendered {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 1px solid var(--color-border-default);
  border-radius: 10px;
  background: var(--color-surface-panel);
  color: var(--color-text-primary);
  line-height: 1.4;
  padding: 0.7rem 0.75rem;
  overflow: auto;
  font: inherit;
}

.generation-modern-live-rendered-rtl {
  direction: rtl;
  unicode-bidi: plaintext;
  text-align: start;
}

.generation-modern-live-rendered h1,
.generation-modern-live-rendered h2,
.generation-modern-live-rendered h3,
.generation-modern-live-rendered h4,
.generation-modern-live-rendered h5,
.generation-modern-live-rendered h6 {
  margin: 0.55rem 0 0.3rem;
  color: var(--color-text-primary);
  line-height: 1.3;
}

.generation-modern-live-rendered h1,
.generation-modern-live-rendered h2 {
  font-size: 1.02rem;
}

.generation-modern-live-rendered h3,
.generation-modern-live-rendered h4,
.generation-modern-live-rendered h5,
.generation-modern-live-rendered h6 {
  font-size: 0.94rem;
}

.generation-modern-live-rendered p,
.generation-modern-live-rendered ul,
.generation-modern-live-rendered ol,
.generation-modern-live-rendered blockquote,
.generation-modern-live-rendered pre,
.generation-modern-live-rendered table {
  margin: 0.42rem 0;
}

.generation-modern-live-rendered table {
  width: auto;
  min-width: 0;
  max-width: none;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--color-border-default);
  border-radius: 10px;
  background: var(--color-surface-panel);
  font-size: 0.95rem;
}

.generation-modern-live-rendered thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--color-surface-subtle);
  color: var(--color-text-primary);
  font-weight: 700;
}

.generation-modern-live-rendered th,
.generation-modern-live-rendered td {
  padding: 0.48rem 0.58rem;
  border-inline-end: 1px solid var(--color-border-soft);
  border-bottom: 1px solid var(--color-border-soft);
  vertical-align: top;
  text-align: start;
}

.generation-modern-live-rendered th:last-child,
.generation-modern-live-rendered td:last-child {
  border-inline-end: none;
}

.generation-modern-live-rendered tbody tr:last-child td {
  border-bottom: none;
}

.generation-modern-live-rendered tbody tr:nth-child(even) {
  background: color-mix(in srgb, var(--color-surface-subtle) 62%, transparent);
}

.generation-modern-live-rendered table + p,
.generation-modern-live-rendered p + table {
  margin-top: 0.56rem;
}

.generation-modern-table-note {
  margin: 0.48rem 0 0.64rem;
  color: var(--color-text-muted);
  font-style: italic;
}

.generation-modern-live-rendered ul,
.generation-modern-live-rendered ol {
  padding-inline-start: 1.25rem;
}

.generation-modern-live-rendered li {
  margin: 0.18rem 0;
}

.generation-modern-live-rendered code {
  background: var(--color-surface-subtle);
  border: 1px solid var(--color-border-soft);
  border-radius: 6px;
  padding: 0.03rem 0.24rem;
  font-size: 0.92em;
}

.generation-modern-live-rendered pre {
  background: var(--color-surface-subtle);
  border: 1px solid var(--color-border-soft);
  border-radius: 8px;
  padding: 0.55rem 0.62rem;
  overflow-x: auto;
}

.generation-modern-live-rendered pre code {
  border: none;
  background: transparent;
  padding: 0;
}

.generation-modern-live-rendered blockquote {
  margin-inline-start: 0;
  padding-inline-start: 0.65rem;
  border-inline-start: 3px solid var(--color-border-default);
  color: var(--color-text-muted);
}

.generation-modern-live-empty {
  color: var(--color-text-muted);
}

.generation-modern-live-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.48rem;
  background: rgba(237, 236, 231, 0.985);
  padding: 0.95rem 1rem 1rem;
}

.generation-modern-live-overlay-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.coverage-modern-shell {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.coverage-modern-main {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(230px, 0.55fr);
  border: 1px solid var(--color-border-soft);
  border-radius: 0;
  overflow: hidden;
  background: var(--color-surface-panel);
  height: 100%;
  min-height: 0;
  min-width: 0;
}

.coverage-modern-center {
  display: grid;
  grid-template-rows: auto auto 1fr;
  border-inline-end: 1px solid var(--color-border-default);
  background: var(--color-surface-app);
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.coverage-modern-strip {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  padding: 0.75rem 0.95rem;
  border-bottom: 1px solid var(--color-border-default);
  background: var(--color-surface-subtle);
}

.coverage-modern-strip-title {
  font-weight: 700;
  color: var(--color-text-primary);
}

.coverage-modern-strip-actions {
  margin-inline-start: auto;
  display: flex;
  gap: 0.45rem;
}

.coverage-modern-board-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  border-bottom: 1px solid var(--color-border-default);
  padding: 0.75rem 0.95rem;
  background: var(--color-surface-app);
}

.coverage-modern-board-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.coverage-modern-board-control {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  color: var(--color-text-muted);
  font-size: var(--text-md);
}

.coverage-modern-board-control input[type="radio"] {
  margin: 0;
}

.coverage-modern-assess-btn {
  margin-inline-start: 0.35rem;
}

.coverage-modern-board-title {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-weight: 700;
}

.coverage-modern-board-meta {
  color: var(--color-text-muted);
  font-size: var(--text-md);
}

.coverage-modern-board-body {
  padding: 0.85rem;
  overflow-y: auto;
  min-height: 0;
}

.coverage-modern-state {
  min-height: 54vh;
  border: 1px solid var(--color-border-muted);
  border-radius: 12px;
  background: var(--color-surface-panel);
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.48rem;
  padding: 1rem;
  text-align: center;
}

.coverage-modern-state-title {
  color: var(--color-text-primary);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.coverage-modern-state-text {
  color: var(--color-text-muted);
  max-width: 560px;
  line-height: 1.4;
}

.coverage-modern-state-loading .coverage-modern-state-title {
  font-size: 1.95rem;
}

.coverage-modern-state-error {
  border-color: #efc7c7;
  background: #fff6f6;
}

.coverage-modern-spinner {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 4px solid #d3ddf5;
  border-top-color: #2d68bf;
  animation: coverage-spin 0.9s linear infinite;
}

@keyframes coverage-spin {
  to {
    transform: rotate(360deg);
  }
}

.coverage-modern-list {
  display: grid;
  gap: 0.62rem;
}

.coverage-modern-card {
  background: var(--color-surface-soft);
  border: 1px solid var(--color-border-muted);
  border-radius: 11px;
  overflow: hidden;
}

.coverage-modern-card-head {
  padding: 0.55rem 0.7rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem;
}

.coverage-modern-card-title-wrap {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.coverage-modern-card-toggle {
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1;
  padding: 0;
  width: 1rem;
  text-align: center;
  cursor: pointer;
}

.coverage-modern-card-toggle:hover {
  color: #2f2f2f;
}

.coverage-modern-card-toggle:focus-visible {
  outline: 2px solid #4f81d8;
  outline-offset: 2px;
  border-radius: 3px;
}

.coverage-modern-card-index {
  color: var(--color-text-primary);
  font-weight: 700;
  font-size: inherit;
}

.coverage-modern-card-title {
  color: var(--color-text-primary);
  font-weight: 700;
}

.coverage-modern-card-count {
  color: #138062;
  background: #d7ece2;
  border-radius: 999px;
  padding: 0.08rem 0.48rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.coverage-modern-card-description {
  border-top: 1px solid var(--color-border-muted);
  padding: 0.55rem 0.72rem;
  color: var(--color-text-primary);
  background: var(--color-surface-panel);
  line-height: 1.4;
  font-size: var(--text-md);
}

.coverage-modern-sublist {
  display: grid;
  border-top: 1px solid var(--color-border-muted);
}

.coverage-modern-subitem {
  padding: 0.46rem 0.72rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.34rem;
  align-items: start;
  border-inline-start: 3px solid transparent;
}

.coverage-modern-subhead {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  min-width: 0;
}

.coverage-modern-subtoggle {
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1;
  padding: 0;
  width: 0.95rem;
  text-align: center;
  cursor: pointer;
}

.coverage-modern-subtoggle:hover {
  color: #2f2f2f;
}

.coverage-modern-subtoggle:focus-visible {
  outline: 2px solid #4f81d8;
  outline-offset: 2px;
  border-radius: 3px;
}

.coverage-modern-subitem.is-covered {
  background: #e4f0eb;
  border-inline-start-color: #2c9b78;
}

.coverage-modern-subitem.is-missing {
  background: #f6eaea;
  border-inline-start-color: #d24b4b;
}

.coverage-modern-subtitle {
  color: var(--color-text-primary);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.coverage-modern-subdesc {
  grid-column: 1 / -1;
  margin-inline-start: 1.38rem;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: 1.35;
}

.coverage-modern-subcount {
  color: var(--color-text-muted);
  font-size: var(--text-md);
}

.coverage-modern-warning {
  color: #b13f0e;
  background: #fff2eb;
  border-top: 1px solid #eed5c7;
  padding: 0.42rem 0.72rem;
  font-size: 0.85rem;
}

.coverage-modern-right {
  background: var(--color-surface-subtle);
  padding: 0.85rem;
  display: grid;
  gap: 0.65rem;
  align-content: start;
  min-width: 0;
  overflow-y: auto;
}

.coverage-modern-summary-zone {
  display: grid;
  gap: 0.65rem;
}

.coverage-modern-summary-title {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-weight: 700;
}

.coverage-modern-summary-card {
  background: var(--color-surface-panel);
  border: 1px solid var(--color-border-soft);
  border-radius: 12px;
  padding: 0.78rem;
  display: grid;
  justify-items: center;
  gap: 0.12rem;
}

.coverage-modern-summary-value {
  color: #14795f;
  font-size: 2.05rem;
  line-height: 1;
  font-weight: 700;
}

.coverage-modern-summary-value-missing {
  color: #9f3d25;
}

.coverage-modern-summary-label {
  color: var(--color-text-muted);
  font-size: var(--text-md);
}

.coverage-modern-summary-divider {
  border-top: 1px solid var(--color-border-soft);
  margin: 0.08rem 0 0.02rem;
}

.coverage-modern-data-zone {
  background: var(--color-surface-panel);
  border: 1px solid var(--color-border-soft);
  border-radius: 12px;
  padding: 0.72rem;
  display: grid;
  gap: 0.42rem;
}

.coverage-modern-data-zone-title {
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: 700;
  margin-bottom: 0.08rem;
}

.coverage-modern-data-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.7rem;
  color: var(--color-text-muted);
  font-size: var(--text-md);
}

.coverage-modern-data-stat-row strong {
  color: var(--color-text-primary);
  font-size: var(--text-lg);
}

.coverage-modern-summary-alert {
  border: 1px solid #e8beb3;
  background: #fff4f1;
  color: #9b3f2a;
  border-radius: 12px;
  padding: 0.62rem 0.68rem;
  line-height: 1.35;
  font-size: 0.88rem;
}

.coverage-modern-summary-alert-success {
  border-color: #b8ddcf;
  background: #f3fbf7;
  color: #23684f;
}

.structure-modern-main {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.1fr);
  border: 1px solid var(--color-border-soft);
  border-radius: 0;
  overflow: hidden;
  background: var(--color-surface-panel);
  height: 100%;
  min-height: 0;
  min-width: 0;
}

.structure-modern-center {
  background: var(--color-surface-app);
  border-inline-end: 1px solid var(--color-border-default);
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.structure-modern-strip {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  padding: 0.75rem 0.95rem;
  border-bottom: 1px solid var(--color-border-default);
  background: var(--color-surface-subtle);
}

.structure-modern-strip-title {
  font-weight: 700;
  color: var(--color-text-primary);
}

.structure-modern-strip-actions {
  margin-inline-start: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.structure-modern-conversation {
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  overflow-y: auto;
  min-height: 0;
}

.structure-modern-composer {
  border-top: 1px solid var(--color-border-default);
  padding: 0.8rem;
  background: var(--color-surface-subtle);
}

.structure-modern-actions {
  margin-top: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.structure-modern-thinking {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.18rem 0.1rem;
  color: var(--color-text-muted);
  font-size: var(--text-md);
  font-family: var(--font-family-sans);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.structure-modern-thinking-text {
  animation: structure-thinking-text-breathe 1.8s ease-in-out infinite;
}

.structure-modern-thinking-dots {
  display: inline-flex;
  align-items: flex-end;
  gap: 0.12rem;
}

.structure-modern-thinking-dots span {
  width: 0.22rem;
  height: 0.22rem;
  border-radius: 999px;
  background: #7a828c;
  opacity: 0.35;
  animation: structure-thinking-dots 1s ease-in-out infinite;
}

.structure-modern-thinking-dots span:nth-child(2) {
  animation-delay: 0.16s;
}

.structure-modern-thinking-dots span:nth-child(3) {
  animation-delay: 0.32s;
}

@keyframes structure-thinking-text-breathe {
  0%,
  100% {
    opacity: 0.76;
  }
  50% {
    opacity: 1;
  }
}

@keyframes structure-thinking-dots {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.3;
  }
  40% {
    transform: translateY(-0.16rem);
    opacity: 0.9;
  }
}

.structure-modern-models {
  flex: 1 1 240px;
}

.structure-modern-right {
  background: var(--color-surface-muted);
  display: block;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.structure-modern-right-workspace {
  display: grid;
  min-height: 0;
  height: 100%;
}

.structure-modern-right-pane {
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr;
}

.structure-modern-right-pane-top {
  border-bottom: 1px solid var(--color-border-default);
}

.structure-modern-right-head-bottom {
  border-top: 1px solid var(--color-border-default);
}

.structure-modern-right-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.85rem;
  border-bottom: 1px solid var(--color-border-default);
}

.structure-modern-panel-title {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text-muted);
}

.structure-modern-count {
  color: var(--color-text-muted);
  font-size: var(--text-md);
}

.structure-modern-deck-list {
  padding: 0.85rem;
  display: grid;
  gap: 0.62rem;
  overflow-y: auto;
  align-content: start;
  min-height: 0;
}

.structure-modern-rejected-list {
  padding: 0.85rem;
  display: grid;
  gap: 0.58rem;
  overflow-y: auto;
  align-content: start;
  min-height: 0;
}

.structure-modern-empty-list {
  border: 1px dashed var(--color-border-default);
  border-radius: 10px;
  background: var(--color-surface-subtle);
  color: var(--color-text-muted);
  font-size: var(--text-md);
  padding: 0.75rem;
  text-align: center;
}

.structure-modern-splitter {
  position: relative;
  cursor: row-resize;
  background: transparent;
}

.structure-modern-splitter::before {
  content: "";
  position: absolute;
  top: 50%;
  inset-inline-start: 0.55rem;
  inset-inline-end: 0.55rem;
  height: 1px;
  background: var(--color-border-default);
  transform: translateY(-50%);
}

.structure-modern-splitter:hover::before {
  background: #9ea3ab;
}

.structure-guidance-overlay {
  position: absolute;
  inset: 0;
  background: rgba(24, 28, 36, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.1rem;
  z-index: 40;
}

.structure-guidance-panel {
  width: min(980px, 96vw);
  height: min(84vh, 820px);
  background: var(--color-surface-panel);
  border: 1px solid var(--color-border-default);
  border-radius: 12px;
  box-shadow: 0 22px 56px rgba(10, 16, 26, 0.28);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.structure-guidance-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.78rem 0.92rem;
  border-bottom: 1px solid var(--color-border-default);
  background: var(--color-surface-subtle);
}

.structure-guidance-title {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text-muted);
}

.structure-guidance-textarea {
  height: 100%;
  padding: 0.85rem;
}

.structure-guidance-native-textarea {
  width: 100%;
  height: 100%;
  min-height: 100%;
  border: 1px solid var(--color-border-default);
  border-radius: 10px;
  background: var(--color-surface-raised);
  color: var(--color-text-primary);
  padding: 0.8rem 0.9rem;
  resize: none;
  overflow: auto;
  line-height: 1.5;
  font-size: 0.84rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  white-space: pre-wrap;
}

.structure-guidance-native-textarea:focus {
  outline: 2px solid rgba(37, 99, 235, 0.28);
  outline-offset: 0;
}

.structure-error-log-overlay {
  position: absolute;
  inset: 0;
  background: rgba(24, 28, 36, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.1rem;
  z-index: 42;
}

.structure-error-log-panel {
  width: min(980px, 96vw);
  height: min(84vh, 820px);
  background: var(--color-surface-panel);
  border: 1px solid var(--color-border-default);
  border-radius: 12px;
  box-shadow: 0 22px 56px rgba(10, 16, 26, 0.28);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.structure-error-log-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.78rem 0.92rem;
  border-bottom: 1px solid var(--color-border-default);
  background: var(--color-surface-subtle);
}

.structure-error-log-title {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text-muted);
}

.structure-error-log-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.structure-error-log-body {
  padding: 0.85rem;
  min-height: 0;
}

.structure-error-log-textarea {
  width: 100%;
  height: 100%;
  min-height: 100%;
  border: 1px solid var(--color-border-default);
  border-radius: 10px;
  background: var(--color-surface-raised);
  color: var(--color-text-primary);
  padding: 0.8rem 0.9rem;
  resize: none;
  overflow: auto;
  line-height: 1.45;
  font-size: 0.83rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  white-space: pre;
}

.structure-error-log-empty {
  height: 100%;
  border: 1px dashed var(--color-border-default);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--color-text-muted);
  background: var(--color-surface-subtle);
  padding: 0.8rem;
}

.structure-error-log-message {
  padding: 0.66rem 0.92rem;
  border-top: 1px solid var(--color-border-default);
  background: var(--color-surface-subtle);
  color: var(--color-text-muted);
  font-size: var(--text-md);
}

.section-description-bullets {
  margin: 0;
  padding-inline-start: 1.1rem;
  display: grid;
  gap: 0.2rem;
  list-style: disc;
}

.section-description-bullets li {
  margin: 0;
}

.structure-deck-card {
  background: var(--color-surface-soft);
  border: 1px solid var(--color-border-muted);
  border-radius: 11px;
  padding: 0.62rem 0.72rem;
  display: grid;
  gap: 0.42rem;
}

.structure-deck-card.is-approved {
  border-color: #9fd5c3;
  background: #ebf7f2;
}

.structure-deck-card.is-rejected {
  border-color: #e9aaaa;
  background: #fff1f1;
}

.structure-deck-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.55rem;
  align-items: start;
}

.structure-deck-index {
  color: var(--color-text-muted);
  font-size: var(--text-md);
  font-weight: 700;
}

.structure-deck-title {
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.3;
}

.structure-deck-toggle {
  border: 0;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 0;
}

.structure-deck-description {
  color: var(--color-text-primary);
  line-height: 1.4;
}

.structure-deck-controls {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.structure-action-btn {
  border: 1px solid var(--color-border-default);
  background: var(--color-surface-panel);
  border-radius: 10px;
  padding: 0.34rem 0.7rem;
  cursor: pointer;
  color: var(--color-text-primary);
  font-weight: 600;
}

.structure-action-btn:hover {
  background: var(--color-surface-app);
}

.structure-action-btn-approve {
  border-color: #b8ddc5;
  background: #ebf7f0;
  color: #2b6a46;
}

.structure-action-btn-approve:hover {
  background: #deefe6;
}

.structure-action-btn-approve.is-selected {
  border-color: #6eb18a;
  background: #cfe9db;
  color: #1f5638;
}

.structure-action-btn-approve.is-selected:hover {
  background: #c6e3d4;
}

.structure-action-btn-reject {
  border-color: #efc1c1;
  background: #fdeeee;
  color: #8d2f2f;
}

.structure-action-btn-reject:hover {
  background: #fbe3e3;
}

.structure-action-btn-reject.is-selected {
  border-color: #d27777;
  background: #f3cfcf;
  color: #7b2323;
}

.structure-action-btn-reject.is-selected:hover {
  background: #efc3c3;
}

.structure-action-btn-remove {
  border-color: #d2d5dc;
  background: #f4f5f7;
  color: #4a5563;
}

.structure-action-btn-remove:hover {
  background: #eceff3;
}

.structure-action-btn-remove:disabled {
  opacity: 0.66;
  cursor: not-allowed;
}

.structure-rejected-card {
  background: #fff5f5;
  border: 1px solid #e7bbbb;
  border-radius: 11px;
  padding: 0.62rem 0.72rem;
  display: grid;
  gap: 0.42rem;
}

.structure-rejected-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
}

.structure-rejected-card-title {
  font-weight: 700;
  color: #6f2626;
  line-height: 1.3;
}

.structure-rejected-card-content {
  color: #4d2c2c;
  line-height: 1.4;
}

.structure-deck-subsections {
  display: grid;
  gap: 0.42rem;
}

.structure-deck-subcard {
  background: var(--color-surface-subtle);
  border: 1px solid var(--color-border-default);
  border-radius: 9px;
  padding: 0.45rem 0.55rem;
  display: grid;
  gap: 0.18rem;
}

.structure-deck-subtitle {
  font-weight: 700;
  color: var(--color-text-primary);
}

.structure-deck-subdesc {
  color: var(--color-text-muted);
}

.extract-results-panel {
  width: 100%;
  min-width: 0;
}

.extract-summary-bar {
  width: 100%;
}

.extract-record-card {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.extract-record-header {
  cursor: pointer;
  min-width: 0;
}

.extract-record-header-main {
  flex: 1 1 auto;
  min-width: 0;
}

.extract-record-topline {
  align-items: flex-start;
  min-width: 0;
}

.extract-record-topline h1,
.extract-record-topline h2,
.extract-record-topline h3,
.extract-record-topline h4,
.extract-record-topline h5,
.extract-record-topline h6 {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.extract-record-source {
  display: -webkit-box;
  width: 100%;
  max-width: 100%;
  text-align: start;
  white-space: normal;
  overflow: hidden;
  line-clamp: 3;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
}

.extract-record-header-right {
  flex: 0 0 auto;
}

.extract-record-caret {
  color: #5f7389;
  transition: transform 160ms ease;
}

.extract-record-caret.is-open {
  transform: rotate(90deg);
}

.extract-details p {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.extract-record-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #d7dfe8;
  border-radius: 10px;
  background: #fbfdff;
}

.extract-record-table {
  width: 100%;
  min-width: 420px;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.extract-record-table th,
.extract-record-table td {
  border: 1px solid #d7dfe8;
  padding: 0.44rem 0.52rem;
  text-align: start;
  vertical-align: top;
  word-break: break-word;
}

.extract-record-table th {
  background: #edf3f9;
  font-weight: 700;
  color: #334a61;
}

.coverage-panel {
  display: grid;
  gap: 0.85rem;
}

.coverage-summary {
  padding: 0.85rem;
  border-radius: 12px;
  background: #f7f9fc;
  border: 1px solid #d6e0f0;
  color: #10263b;
  line-height: 1.4;
}

.coverage-list {
  display: grid;
  gap: 0.75rem;
}

.coverage-card {
  padding: 0.85rem;
  border-radius: 12px;
  background: #f7f9fc;
  border: 1px solid #d6e0f0;
}

.coverage-card-header {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.coverage-id {
  font-weight: 700;
  color: #1b3a57;
}

.coverage-title {
  font-weight: 700;
  color: #10263b;
}

.coverage-status {
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.8rem;
  text-transform: uppercase;
  font-weight: 700;
}

.coverage-status-covered {
  background: #daf5e6;
  color: #14633d;
}

.coverage-status-partial {
  background: #fff1c2;
  color: #8a5a00;
}

.coverage-status-missing {
  background: #fde2e2;
  color: #9f1c1c;
}

.progress-shell {
  padding: 0.5rem !important;
}

.progress-shell > * {
  width: 100%;
}

.progress-spine {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: auto auto 1fr auto auto auto;
  background: var(--color-spine-bg);
  border: 1px solid var(--color-spine-border);
  border-radius: 18px;
  overflow: hidden;
}

.progress-home-row {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--color-spine-border);
}

.progress-home-button {
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.75rem 0.88rem 0.75rem 1.05rem;
  cursor: pointer;
  font: inherit;
  font-size: var(--text-md);
  font-weight: 600;
  line-height: 1.1;
  color: var(--color-spine-active);
  text-align: start;
}

.progress-home-button:hover {
  background: var(--color-spine-hover);
}

.progress-home-icon {
  width: 1.92rem;
  height: 1.92rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.18rem;
  line-height: 1;
}

.progress-home-label {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.18rem;
  min-width: 0;
}

.progress-home-title {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--color-spine-active);
  line-height: 1.05;
}

.progress-home-version {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--color-spine-muted);
  opacity: 0.82;
  line-height: 1.05;
}

.progress-home-auth {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  padding: 0.5rem 0.7rem 0.5rem 0.2rem;
}

.progress-auth-trigger {
  min-height: 30px;
  border-radius: 999px;
  border: 1px solid #4f627d;
  background: rgba(255, 255, 255, 0.05);
  color: #dce7f4;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 8px 0 5px;
  cursor: pointer;
}

.progress-auth-trigger:hover {
  background: rgba(255, 255, 255, 0.09);
}

.progress-auth-avatar {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #dce7f4;
  color: #213a62;
  font-size: 10px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.progress-auth-chevron {
  font-size: 10px;
  color: #9fb3ca;
}

.progress-auth-popover {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 50;
  width: 208px;
  max-width: calc(100vw - 28px);
  border-radius: 12px;
  border: 1px solid #d6d4cc;
  background: #fffdfa;
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.2);
  padding: 8px;
  display: grid;
  gap: 4px;
}

.progress-auth-email {
  font-size: 11px;
  color: #667085;
  padding: 4px 8px 6px;
  border-bottom: 1px solid #ece8dc;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.progress-auth-item {
  min-height: 34px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #1f2937;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  padding: 0 10px;
  cursor: pointer;
}

.progress-auth-item:hover {
  background: #f3f4f6;
  border-color: #e5e7eb;
}

.progress-auth-item-danger {
  color: #b42318;
}

.progress-auth-item-danger:hover {
  background: #fef3f2;
  border-color: #fecdca;
}

.progress-auth-cta {
  min-height: 30px;
  border-radius: 999px;
  border: 1px solid #4f627d;
  background: rgba(255, 255, 255, 0.05);
  color: #dce7f4;
  font-size: 12px;
  font-weight: 600;
  padding: 0 10px;
  cursor: pointer;
}

.progress-auth-cta:hover {
  background: rgba(255, 255, 255, 0.09);
}

.progress-auth-cta-primary {
  border-color: #2f6bff;
  background: #2f6bff;
  color: #ffffff;
}

.progress-auth-cta-primary:hover {
  background: #2459d2;
}

.progress-project-meta {
  padding: 0.85rem 1.2rem 0.9rem;
  border-bottom: 1px solid var(--color-spine-border);
  display: grid;
  gap: 0.35rem;
}

.progress-project-name {
  margin: 0;
  font-size: var(--text-lg);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-spine-active);
}

.progress-project-type {
  margin: 0;
  font-size: var(--text-xs);
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--color-spine-muted);
}

.progress-spine-list {
  margin: 0;
  padding: 0.45rem 0;
  list-style: none;
}

.progress-spine-row {
  position: relative;
}

.progress-spine-row.is-current {
  background: var(--color-spine-current);
}

.progress-spine-button {
  width: 100%;
  border: 0;
  background: none;
  display: flex;
  gap: 0.72rem;
  align-items: center;
  text-align: start;
  padding: 0.75rem 1.2rem;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.progress-spine-button:hover {
  background: var(--color-spine-hover);
}

.progress-spine-rail {
  position: absolute;
  inset-inline-start: 2rem;
  top: -50%;
  height: 200%;
  width: 2px;
  background: var(--color-spine-border);
  z-index: 0;
}

.progress-spine-row:first-child .progress-spine-rail {
  top: 50%;
  height: 100%;
}

.progress-spine-row:last-child .progress-spine-rail {
  top: -50%;
  height: 100%;
}

.spine-node {
  position: relative;
  z-index: 1;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.82rem;
}

.spine-node-complete {
  background: rgba(93, 202, 165, 0.2);
  color: #5DCAA5;
}

.spine-node-current {
  border: 2px solid #60A5FA;
  background: rgba(37, 99, 235, 0.25);
}

.spine-node-selected {
  border: 2px solid var(--color-spine-border);
  background: rgba(255, 255, 255, 0.08);
  color: #cfd8e3;
  font-weight: 800;
}

.spine-node-selected.spine-node-selected-pending {
  border-color: #8f9baa;
  background: rgba(143, 155, 170, 0.2);
  color: #d3dbe5;
}

.spine-node-selected.spine-node-selected-complete {
  border-color: #5DCAA5;
  background: rgba(93, 202, 165, 0.2);
  color: #5DCAA5;
}

.spine-node-selected.spine-node-selected-in_progress,
.spine-node-selected.spine-node-selected-partial_complete {
  border-color: #60A5FA;
  background: rgba(96, 165, 250, 0.2);
  color: #60A5FA;
}

.spine-node-pending {
  border: 1px solid var(--color-spine-border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-spine-muted);
}

.progress-spine-copy {
  display: grid;
  gap: 0.08rem;
}

.progress-spine-phase {
  font-size: var(--text-md);
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--color-spine-text);
}

.progress-spine-row.is-current .progress-spine-phase {
  color: var(--color-spine-active);
  font-weight: 600;
}

.progress-spine-phase-status {
  font-size: var(--text-xs);
  line-height: 1.1;
  color: var(--color-spine-muted);
}

.progress-spine-row.is-current .progress-spine-phase-status {
  color: rgba(200, 212, 224, 0.8);
}

.progress-spine-row .progress-spine-phase-status.progress-spine-phase-status-pending {
  color: var(--color-spine-muted);
  font-weight: 500;
}

.progress-spine-row .progress-spine-phase-status.progress-spine-phase-status-in_progress {
  color: #60A5FA;
  font-weight: 700;
}

.progress-spine-row .progress-spine-phase-status.progress-spine-phase-status-complete {
  color: #5DCAA5;
  font-weight: 700;
}

.progress-spine-row .progress-spine-phase-status.progress-spine-phase-status-partial_complete {
  color: #5DCAA5;
  font-weight: 700;
}

.progress-spine-row .spine-node-complete + .progress-spine-copy .progress-spine-phase-status {
  color: #5DCAA5;
}

.progress-settings-button {
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1.2rem;
  cursor: pointer;
  font: inherit;
  font-size: var(--text-md);
  font-weight: 500;
  line-height: 1.1;
  color: var(--color-spine-text);
  text-align: start;
  border-top: 1px solid var(--color-spine-border);
}

.progress-helper-button {
  border: 0;
  background: rgba(245, 247, 250, 0.88);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1.2rem;
  cursor: pointer;
  font: inherit;
  font-size: var(--text-md);
  font-weight: 600;
  line-height: 1.1;
  color: #1f2937;
  text-align: start;
  border-top: 1px solid rgba(148, 163, 184, 0.34);
  border-bottom: 1px solid rgba(148, 163, 184, 0.34);
  position: relative;
  isolation: isolate;
}

.progress-helper-button:hover {
  background: rgba(245, 247, 250, 0.96);
}

.progress-helper-icon {
  width: 1.6rem;
  height: 1.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  line-height: 1;
}

.progress-helper-label {
  font-size: var(--text-md);
  font-weight: 600;
}

.progress-helper-beacon {
  margin-inline-start: auto;
  width: 0.44rem;
  height: 0.44rem;
  border-radius: 999px;
  background: #9ca3af;
  opacity: 0;
  transform: scale(0.8);
}

.progress-helper-button.is-active {
  border-color: rgba(99, 102, 241, 0.8);
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.42) inset;
}

.progress-helper-button.is-active::after {
  content: "";
  position: absolute;
  inset: 0.24rem;
  border-radius: 11px;
  box-shadow: 0 0 0 0 rgba(129, 140, 248, 0.35);
  pointer-events: none;
  z-index: -1;
  animation: helper-halo-breathe 2.4s ease-in-out infinite;
}

.progress-helper-button.is-active .progress-helper-beacon {
  opacity: 1;
  background: #818cf8;
  animation: helper-beacon-pulse 1.9s ease-in-out infinite;
}

@keyframes helper-halo-breathe {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(129, 140, 248, 0.35);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(129, 140, 248, 0);
  }
}

@keyframes helper-beacon-pulse {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(0.88);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

.progress-stop-button {
  border: 0;
  background: rgba(185, 28, 28, 0.15);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1.2rem;
  cursor: pointer;
  font: inherit;
  font-size: var(--text-md);
  font-weight: 600;
  line-height: 1.1;
  color: #FCA5A5;
  text-align: start;
  border-top: 1px solid rgba(185, 28, 28, 0.3);
  border-bottom: 1px solid rgba(185, 28, 28, 0.3);
}

.progress-stop-button:hover {
  background: rgba(185, 28, 28, 0.25);
}

.progress-stop-icon {
  width: 1.6rem;
  height: 1.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  line-height: 1;
}

.progress-settings-button:hover {
  background: var(--color-spine-hover);
}

.progress-home-button:disabled,
.progress-spine-button:disabled,
.progress-helper-button:disabled,
.progress-stop-button:disabled,
.progress-settings-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.progress-home-button:disabled:hover,
.progress-spine-button:disabled:hover,
.progress-helper-button:disabled:hover,
.progress-stop-button:disabled:hover,
.progress-settings-button:disabled:hover {
  background: transparent;
}

@media (prefers-reduced-motion: reduce) {
  .progress-helper-button.is-active::after,
  .progress-helper-button.is-active .progress-helper-beacon {
    animation: none;
  }
}

.progress-settings-icon {
  width: 1.6rem;
  height: 1.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
}

.progress-settings-label {
  font-size: var(--text-md);
  font-weight: 500;
}

.project-settings-shell {
  width: 100%;
  height: 100%;
  overflow: hidden;
  padding: 1.2rem;
  background: #f4f4f1;
}

.project-settings-card {
  max-width: 1100px;
  max-height: calc(100vh - 2.4rem);
  margin: 0 auto;
  border: 1px solid #d6d6d1;
  border-radius: 14px;
  background: #ffffff;
  padding: 1.25rem;
  display: grid;
  gap: 1.1rem;
  overflow-y: auto;
}

.project-settings-head h2 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.2;
  color: #1f2122;
}

.project-settings-head p {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
  color: #606266;
}

.project-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.project-settings-field {
  display: grid;
  gap: 0.35rem;
}

.project-settings-field span {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #585a5f;
}

.project-settings-help {
  margin-top: 0.2rem;
  font-size: 0.8rem;
  color: #666a70;
}

.project-settings-model-price-row {
  margin-top: 0.38rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.project-settings-model-price-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #d6dde8;
  background: #edf3fc;
  color: #2f4a72;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.2;
  padding: 0.18rem 0.52rem;
}

.project-settings-model-price-muted {
  color: #727782;
  font-size: 0.79rem;
}

.project-settings-field input,
.project-settings-field select,
.project-settings-field textarea {
  width: 100%;
  border: 1px solid #ccd1d9;
  border-radius: 10px;
  background: #ffffff;
  color: #1f2122;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.35;
  padding: 0.58rem 0.7rem;
}

.project-settings-field input:disabled {
  background: #f1f2f4;
  color: #666a70;
}

.project-settings-field textarea {
  min-height: 110px;
  resize: vertical;
}

.project-settings-field-full {
  grid-column: 1 / -1;
}

.project-settings-style-card {
  border: 1px solid #d8dde7;
  border-radius: 12px;
  padding: 0.7rem;
  background: #f9fbfe;
}

.project-settings-style-actions {
  margin-top: 0.45rem;
  display: flex;
  justify-content: flex-start;
}

.project-settings-style-status {
  margin-top: 0.45rem;
  font-size: 0.82rem;
  color: #525a66;
}

.project-settings-style-renderer {
  margin-top: 0.6rem;
  border: 1px solid #d9deea;
  border-radius: 11px;
  background: #ffffff;
  padding: 0.62rem;
}

.project-settings-style-renderer-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #505768;
}

.project-settings-style-renderer-grid {
  margin-top: 0.45rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.project-settings-style-section {
  border: 1px solid #e1e6f0;
  border-radius: 9px;
  background: #f8fbff;
  padding: 0.48rem 0.56rem;
}

.project-settings-style-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #576078;
}

.project-settings-style-list {
  margin: 0.35rem 0 0;
  padding-inline-start: 1.05rem;
  display: grid;
  gap: 0.22rem;
}

.project-settings-style-list li {
  font-size: 0.84rem;
  line-height: 1.35;
  color: #2a3347;
}

.project-settings-style-text {
  margin: 0.35rem 0 0;
  font-size: 0.84rem;
  line-height: 1.4;
  color: #2a3347;
}

.project-settings-style-empty {
  margin-top: 0.42rem;
  font-size: 0.82rem;
  color: #667085;
}

.project-settings-style-textarea {
  min-height: 220px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.84rem;
  line-height: 1.35;
  white-space: pre;
}

.project-settings-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: #2a2c2e;
}

.project-settings-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.55rem;
}

.project-settings-error {
  margin-inline-end: auto;
  color: #aa2f2f;
  font-size: 0.88rem;
}

.project-settings-btn {
  appearance: none;
  border-radius: 9px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.66rem 0.95rem;
  cursor: pointer;
}

.project-settings-btn-cancel {
  background: #f2f2f2;
  border-color: #d0d0d0;
  color: #303234;
}

.project-settings-btn-save {
  background: #2f85d6;
  border-color: #2a78c2;
  color: #ffffff;
}

@media (max-width: 960px) {
  .project-settings-style-renderer-grid {
    grid-template-columns: 1fr;
  }

  .progress-home-button,
  .progress-stop-button,
  .progress-settings-button,
  .progress-home-label,
  .progress-stop-label,
  .progress-settings-label {
    font-size: 0.95rem;
  }

  .progress-spine-phase {
    font-size: 0.92rem;
  }

  .progress-spine-phase-status {
    font-size: 0.54rem;
  }

  .progress-project-name {
    font-size: 0.94rem;
  }

  .progress-project-type {
    font-size: 0.72rem;
  }

  .project-settings-grid {
    grid-template-columns: 1fr;
  }
}

.coverage-reason,
.coverage-sources {
  color: #10263b;
  line-height: 1.4;
}

@media (max-width: 700px) {
  .content-shell {
    padding: 0;
  }

  .mission-modern-main {
    grid-template-columns: 1fr;
  }

  .data-modern-main {
    grid-template-columns: 1fr;
  }

  .structure-modern-main {
    grid-template-columns: 1fr;
  }

  .generation-modern-main {
    grid-template-rows: auto auto 1fr auto;
  }

  .generation-modern-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .generation-modern-body {
    grid-template-columns: 1fr;
  }

  .coverage-modern-main {
    grid-template-columns: 1fr;
  }

  .mission-modern-center {
    border-inline-end: 0;
    border-bottom: 1px solid #d8d8d8;
  }

  .data-modern-left {
    border-inline-end: 0;
    border-bottom: 1px solid #d8d8d8;
  }

  .structure-modern-center {
    border-inline-end: 0;
    border-bottom: 1px solid #d8d8d8;
  }

  .generation-modern-document {
    border-inline-end: 0;
    border-bottom: 1px solid var(--color-border-default);
  }

  .coverage-modern-center {
    border-inline-end: 0;
    border-bottom: 1px solid #d8d8d8;
  }
}


