:root {
  --bg: #08111c;
  --bg-soft: #0d1726;
  --panel: rgba(10, 20, 35, 0.72);
  --panel-strong: rgba(8, 17, 29, 0.88);
  --panel-soft: rgba(16, 29, 48, 0.64);
  --line: rgba(120, 152, 189, 0.16);
  --line-strong: rgba(120, 152, 189, 0.28);
  --line-bright: rgba(120, 152, 189, 0.42);
  --text: #e8eef7;
  --muted: #90a1b8;
  --muted-2: #71869e;
  --accent: #37b6dd;
  --accent-strong: #1d8fd4;
  --accent-soft: rgba(55, 182, 221, 0.14);
  --ok: #31c27d;
  --warn: #f1a93b;
  --danger: #ff6f70;
  --shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
  --radius: 16px;
  --header-offset: 152px;
  --toast-offset: 132px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  background: #091321;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  color-scheme: dark;
}

body {
  color: var(--text);
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  background:
    radial-gradient(1200px 520px at 0% -10%, rgba(55, 182, 221, 0.14) 0%, transparent 70%),
    radial-gradient(900px 520px at 100% 0%, rgba(29, 143, 212, 0.12) 0%, transparent 65%),
    linear-gradient(180deg, #07101b 0%, #091321 100%);
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

body.auth-page {
  display: block;
}

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

button {
  cursor: pointer;
}

a {
  color: #88d5ff;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(55, 182, 221, 0.36);
  background: rgba(8, 17, 29, 0.98);
  color: var(--text);
  text-decoration: none;
  transform: translateY(-150%);
  transition: transform 160ms ease;
}

.skip-link:focus-visible {
  transform: translateY(0);
}

.shell {
  min-height: 100vh;
  padding: 0 24px 40px;
  overflow-x: clip;
}

.eyebrow,
.page-kicker,
.workspace-k,
.context-k,
.stat-k,
.section-kicker,
.badge,
.count-badge {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  font-weight: 700;
}

.eyebrow,
.page-kicker,
.context-k,
.workspace-k,
.section-kicker,
.stat-k {
  color: var(--muted);
}

.brand-title {
  margin: 6px 0 0;
  font-size: 23px;
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.brand-copy {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
  max-width: 460px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: start;
}

.nav-btn,
.lang-btn,
.segment-chip,
.ghost-btn,
.primary-btn,
.reject-btn,
.inline-btn,
.tab-btn {
  border: 1px solid transparent;
  border-radius: 16px;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(55, 182, 221, 0.18);
}

.primary-btn:disabled,
.ghost-btn:disabled,
.reject-btn:disabled,
.inline-btn:disabled,
.tab-btn:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
  box-shadow: none;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px 14px;
  color: var(--muted);
  background: rgba(9, 18, 31, 0.5);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  flex: 0 0 auto;
}

.nav-btn.active {
  color: var(--text);
  border-color: rgba(55, 182, 221, 0.32);
  background: linear-gradient(135deg, rgba(55, 182, 221, 0.18), rgba(29, 143, 212, 0.18));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 22px rgba(9, 18, 31, 0.24);
}

.workspace-meta {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(9, 18, 31, 0.42);
}

.workspace-meta strong {
  display: block;
  margin-top: 4px;
  font-size: 14px;
}

.main {
  min-width: 0;
  padding: 0;
}

.header-shell {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  width: min(1180px, calc(100% - 48px));
  margin-bottom: 0;
  padding: 12px 18px 10px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 18px 18px;
  background:
    linear-gradient(180deg, rgba(8, 17, 29, 0.92), rgba(8, 17, 29, 0.84));
  backdrop-filter: blur(10px);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.content-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding-top: var(--header-offset);
}

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

.page-title {
  margin: 4px 0 0;
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.08;
}

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

.context-card,
.lang-switch,
.panel,
.stat-card,
.surface,
.detail-card,
.info-card,
.queue-summary-card,
.batch-card,
.notice-card {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.context-card {
  min-width: 132px;
  padding: 10px 12px;
  border-radius: 12px;
}

.context-card strong {
  display: block;
  margin-top: 4px;
}

.lang-switch {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(9, 18, 31, 0.42);
}

.lang-btn {
  min-width: 32px;
  padding: 4px 7px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  border-radius: 12px;
}

.lang-btn.active,
.tab-btn.active,
.segment-chip.active {
  background: linear-gradient(135deg, rgba(55, 182, 221, 0.22), rgba(29, 143, 212, 0.26));
  border-color: rgba(55, 182, 221, 0.26);
  color: var(--text);
}

.toast-root {
  position: fixed;
  top: var(--toast-offset);
  right: 24px;
  z-index: 50;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(8, 17, 29, 0.96);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.24);
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
  transform: translateY(-6px);
  opacity: 0;
  transition: transform 180ms ease, opacity 180ms ease;
}

.toast.visible {
  transform: translateY(0);
  opacity: 1;
}

.toast.ok {
  border-color: rgba(49, 194, 125, 0.36);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.24), inset 0 0 0 1px rgba(49, 194, 125, 0.08);
}

.toast.error {
  border-color: rgba(255, 111, 112, 0.36);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.24), inset 0 0 0 1px rgba(255, 111, 112, 0.08);
}

.toast.info {
  border-color: rgba(55, 182, 221, 0.28);
}

.page-root {
  display: grid;
  gap: 14px;
}

.auth-page-shell {
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding: 24px;
}

.auth-shell {
  display: flex;
  justify-content: center;
  padding-top: clamp(24px, 6vw, 56px);
}

.auth-shell-page {
  padding-top: 0;
  min-height: 100%;
}

.auth-card {
  width: min(460px, 100%);
  display: grid;
  gap: 14px;
}

.auth-card-page {
  width: min(1020px, calc(100vw - 48px));
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 420px);
  gap: 36px;
  align-items: start;
}

.auth-copy-column {
  display: grid;
  gap: 28px;
  padding-right: 8px;
}

.auth-brand-block {
  display: grid;
  gap: 6px;
}

.auth-brand-title {
  margin: 0;
  font-size: clamp(28px, 3vw, 34px);
  line-height: 1.05;
}

.auth-brand-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.auth-copy-block {
  display: grid;
  gap: 18px;
  align-content: start;
  max-width: 520px;
}

.auth-benefits-title {
  margin: 0;
  max-width: none;
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.12;
  white-space: pre-line;
}

.auth-benefits-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.auth-benefits-list li {
  position: relative;
  padding-left: 18px;
  color: var(--text);
  line-height: 1.5;
}

.auth-benefits-list li::before {
  content: "";
  position: absolute;
  top: 0.62em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(55, 182, 221, 0.92), rgba(29, 143, 212, 0.92));
  box-shadow: 0 0 0 4px rgba(55, 182, 221, 0.08);
}

.auth-form-column {
  display: grid;
  gap: 16px;
  align-self: center;
  padding: 20px;
  border: 1px solid rgba(120, 152, 189, 0.12);
  border-radius: 18px;
  background: rgba(7, 16, 27, 0.46);
}

.auth-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.auth-lang-switch {
  flex-shrink: 0;
}

.auth-form-intro {
  display: grid;
  gap: 8px;
}

.auth-panel-title {
  margin: 0;
  font-size: clamp(26px, 2.6vw, 32px);
  line-height: 1.06;
}

.auth-panel-copy,
.auth-description {
  margin: 0;
  font-size: 18px;
}

.auth-panel-copy {
  max-width: 26ch;
}

.auth-description {
  max-width: 38ch;
}

.auth-form {
  margin-top: 0;
}

.page-grid,
.two-col,
.three-col,
.four-col,
.stats-grid,
.card-grid,
.settings-grid,
.delivery-grid,
.drafts-grid,
.review-layout {
  display: grid;
  gap: 16px;
}

.panel,
.surface,
.detail-card,
.info-card,
.queue-summary-card,
.batch-card,
.notice-card,
.stat-card {
  border-radius: 18px;
  padding: 16px 18px;
}

.three-col,
.card-grid,
.delivery-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.four-col {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.two-col,
.settings-grid,
.review-layout {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
}

.settings-grid {
  align-items: start;
}

.settings-sidebar {
  position: sticky;
  top: calc(var(--header-offset) + 6px);
}

.stat-card {
  min-height: 0;
  background:
    linear-gradient(180deg, rgba(12, 23, 38, 0.82), rgba(9, 18, 31, 0.72));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.stat-v {
  margin-top: 10px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.stat-meta {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.45;
  font-size: 13px;
}

.notice-card {
  display: grid;
  gap: 6px;
}

.notice-card.ok {
  border-color: rgba(49, 194, 125, 0.28);
  background: rgba(15, 35, 28, 0.62);
}

.notice-card.warn {
  border-color: rgba(241, 169, 59, 0.28);
  background: rgba(41, 28, 12, 0.62);
}

.notice-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.notice-copy {
  color: var(--muted);
  line-height: 1.45;
  font-size: 14px;
}

.notice-card-inline {
  gap: 0;
  padding-top: 14px;
  padding-bottom: 14px;
}

.notice-inline-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.notice-card-inline .notice-title {
  font-size: 15px;
  line-height: 1.35;
  white-space: nowrap;
}

.notice-card-inline .notice-copy {
  font-size: 15px;
  line-height: 1.35;
}

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

.section-tools {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px;
  width: 100%;
}

.section-head h3,
.section-head h4,
.surface h3,
.surface h4,
.detail-card h3 {
  margin: 6px 0 0;
}

.detail-card h3 {
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.section-copy,
.muted,
.helper,
.detail-copy,
.empty-state p,
.card-copy {
  color: var(--muted);
  line-height: 1.55;
}

.inline-actions,
.top-actions,
.chip-row,
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.primary-btn,
.ghost-btn,
.reject-btn,
.inline-btn,
.tab-btn {
  padding: 10px 14px;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
}

.history-btn {
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 12px;
}

.primary-btn {
  background: linear-gradient(135deg, rgba(55, 182, 221, 0.92), rgba(29, 143, 212, 0.92));
  color: white;
  box-shadow: 0 12px 28px rgba(10, 110, 155, 0.26);
}

.ghost-btn,
.inline-btn,
.tab-btn {
  background: rgba(9, 18, 31, 0.42);
  border-color: var(--line);
  color: var(--text);
}

.export-btn {
  background: rgba(49, 194, 125, 0.12);
  border-color: rgba(49, 194, 125, 0.34);
  color: #9df2c4;
  box-shadow: inset 0 0 0 1px rgba(49, 194, 125, 0.05);
}

.tab-btn {
  position: relative;
  flex: 0 0 auto;
}

.header-logout {
  min-width: 110px;
}

.reject-btn {
  background: rgba(255, 111, 112, 0.08);
  border-color: rgba(255, 111, 112, 0.36);
  color: #ffc4c5;
}

.danger-btn {
  background: rgba(255, 111, 112, 0.06);
  border-color: rgba(255, 111, 112, 0.28);
  color: #ffb6b8;
}

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

.is-loading {
  position: relative;
}

.inline-status {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.field-grid {
  display: grid;
  gap: 12px;
}

.field-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.section-head-tight {
  margin-bottom: 0;
}

.settings-overview,
.settings-surface {
  display: grid;
  gap: 14px;
}

.settings-surface {
  padding: 18px 20px;
}

.settings-action-card h4 {
  margin: 0;
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.08;
}

.settings-sidebar-actions {
  align-items: center;
}

.settings-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.settings-overview-sidebar {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

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

.settings-openai-card {
  display: grid;
  gap: 12px;
  width: 100%;
  padding: 18px 20px;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.settings-openai-card:hover {
  border-color: rgba(120, 152, 189, 0.34);
}

.settings-openai-card:disabled {
  cursor: default;
  opacity: 0.8;
}

.settings-openai-card.is-unavailable {
  opacity: 0.72;
}

.settings-openai-card.is-unavailable:hover {
  border-color: rgba(93, 111, 135, 0.24);
}

.settings-openai-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.settings-openai-card-head h3 {
  margin: 2px 0 0;
  font-size: 22px;
  line-height: 1.06;
  letter-spacing: -0.02em;
}

.settings-openai-switch {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  width: 48px;
  height: 28px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid rgba(93, 111, 135, 0.34);
  background: rgba(10, 18, 31, 0.95);
}

.settings-openai-switch.is-on {
  border-color: rgba(95, 213, 167, 0.36);
  background: rgba(14, 44, 36, 0.95);
}

.settings-openai-card.is-unavailable .settings-openai-switch {
  border-color: rgba(93, 111, 135, 0.22);
  background: rgba(10, 18, 31, 0.72);
}

.settings-openai-switch-thumb {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(214, 224, 239, 0.88);
  box-shadow: 0 4px 14px rgba(3, 6, 12, 0.22);
  transition: transform 160ms ease, background-color 160ms ease;
}

.settings-openai-switch.is-on .settings-openai-switch-thumb {
  transform: translateX(18px);
  background: #9ff1c1;
}

.settings-openai-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.settings-openai-status {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.settings-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(120, 152, 189, 0.16);
  background: rgba(10, 20, 33, 0.6);
}

.settings-toggle-copy {
  display: grid;
  gap: 6px;
}

.settings-toggle-copy strong {
  font-size: 15px;
  line-height: 1.3;
}

.settings-toggle-copy span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.settings-toggle-control {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
}

.settings-toggle-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.settings-toggle-switch {
  position: relative;
  display: inline-flex;
  width: 54px;
  height: 32px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(93, 111, 135, 0.34);
  background: rgba(10, 18, 31, 0.95);
  transition: border-color 160ms ease, background-color 160ms ease;
}

.settings-toggle-switch::after {
  content: "";
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(214, 224, 239, 0.88);
  box-shadow: 0 4px 14px rgba(3, 6, 12, 0.22);
  transition: transform 160ms ease, background-color 160ms ease;
}

.settings-toggle-input:checked + .settings-toggle-switch {
  border-color: rgba(95, 213, 167, 0.36);
  background: rgba(14, 44, 36, 0.95);
}

.settings-toggle-input:checked + .settings-toggle-switch::after {
  transform: translateX(22px);
  background: #9ff1c1;
}

.settings-modal-actions {
  justify-content: space-between;
}

.settings-stat-card {
  min-height: 0;
  border-color: rgba(120, 152, 189, 0.2);
}

.settings-icp-grid {
  align-items: start;
  column-gap: 16px;
}

.settings-icp-grid > .field {
  align-content: start;
  height: 100%;
}

.settings-icp-grid .textarea-compact {
  min-height: 156px;
  height: 156px;
  resize: none;
}

.settings-icp-grid .helper {
  display: block;
  min-height: 48px;
}

.textarea-compact {
  min-height: 84px;
}

.textarea-medium {
  min-height: 104px;
}

label.field {
  display: grid;
  gap: 8px;
}

label.field span {
  font-size: 13px;
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  padding: 11px 13px;
  color: var(--text);
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(7, 16, 27, 0.92);
}

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

input::placeholder,
textarea::placeholder {
  color: rgba(144, 161, 184, 0.72);
}

.table-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(120, 152, 189, 0.34) transparent;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.parsed-table-wrap {
  display: flex;
  justify-content: center;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}

.parsed-table {
  table-layout: fixed;
  min-width: 1240px;
  flex: 0 0 auto;
  margin-inline: auto;
}

.parsed-col-name {
  width: 14%;
}

.parsed-col-role {
  width: 18%;
}

.parsed-col-company {
  width: 14%;
}

.parsed-col-file {
  width: 14%;
}

.parsed-col-industry {
  width: 10%;
}

.parsed-col-country {
  width: 9%;
}

.parsed-col-status {
  width: 12%;
}

.parsed-col-reason {
  width: 16%;
}

.parsed-col-score {
  width: 7%;
}

th,
 td {
  text-align: left;
  padding: 11px 13px;
  border-bottom: 1px solid rgba(120, 152, 189, 0.14);
  vertical-align: top;
}

.parsed-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.018);
}

.table-reason {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  white-space: normal;
}

th {
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.table-score-head,
.table-score-cell {
  text-align: center;
}

.badge,
.count-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.badge.approve,
.count-badge.approve {
  color: #8ff0bc;
  background: rgba(49, 194, 125, 0.12);
}

.badge.review,
.count-badge.review {
  color: #ffd08a;
  background: rgba(241, 169, 59, 0.12);
}

.badge.reject,
.count-badge.reject {
  color: #ffb6b8;
  background: rgba(255, 111, 112, 0.12);
}

.badge.archive,
.count-badge.archive {
  color: #c7d3ff;
  background: rgba(120, 136, 255, 0.12);
}

.segment-chip {
  padding: 9px 12px;
  background: rgba(11, 24, 40, 0.78);
  color: var(--text);
}

.empty-state {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(9, 18, 31, 0.5), rgba(9, 18, 31, 0.34));
  display: grid;
  gap: 12px;
}

.empty-state h4 {
  margin: 0;
  font-size: 18px;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.history-block {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(120, 152, 189, 0.12);
}

.history-head {
  margin-bottom: 10px;
}

.history-stack {
  display: grid;
  gap: 10px;
}

.history-group,
.history-month {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(8, 17, 29, 0.48);
}

.history-group-btn,
.history-month-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-weight: 700;
  text-align: left;
}

.history-group-btn::after,
.history-month-btn::after {
  content: "▾";
  color: var(--muted);
  font-size: 12px;
  flex: 0 0 auto;
}

.history-group-body {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
}

.history-month {
  background: rgba(7, 16, 27, 0.72);
}

.history-batch-list {
  display: grid;
  gap: 8px;
  padding: 0 12px 12px;
}

.history-batch-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(120, 152, 189, 0.1);
  border-radius: 12px;
  background: rgba(9, 18, 31, 0.5);
}

.history-batch-main {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.history-batch-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.history-batch-top strong {
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.history-batch-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.history-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.parsed-desk-card,
.parsed-intake-card,
.parsed-batch-card {
  display: grid;
  gap: 14px;
}

.parsed-import-toolbar {
  display: grid;
  gap: 14px;
}

.parsed-launch-panel,
.parsed-empty-shell {
  display: grid;
  gap: 14px;
}

.parsed-launch-panel {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px 24px;
}

.parsed-launch-main {
  min-width: 0;
}

.parsed-launch-actions {
  justify-content: flex-start;
}

.parsed-launch-hint {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(120, 152, 189, 0.18);
  background: rgba(9, 18, 31, 0.46);
  cursor: default;
  outline: none;
}

.parsed-launch-hint-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(241, 169, 59, 0.16);
  color: #f3c677;
  font-size: 12px;
  font-weight: 800;
  flex: 0 0 auto;
}

.parsed-launch-tooltip {
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%) translateX(-4px);
  width: min(420px, calc(100vw - 120px));
  padding: 10px 12px;
  border: 1px solid rgba(120, 152, 189, 0.2);
  border-radius: 14px;
  background: rgba(8, 17, 29, 0.96);
  box-shadow: 0 18px 36px rgba(2, 8, 15, 0.36);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition:
    opacity 160ms ease,
    transform 160ms ease,
    visibility 160ms ease;
  z-index: 6;
}

.parsed-launch-hint:hover .parsed-launch-tooltip,
.parsed-launch-hint:focus-visible .parsed-launch-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

.parsed-launch-hint:focus-visible {
  border-color: rgba(55, 182, 221, 0.34);
  box-shadow: 0 0 0 3px rgba(55, 182, 221, 0.16);
}

.parsed-launch-status {
  min-width: max-content;
}

.parsed-import-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.parsed-import-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.parsed-import-status {
  display: grid;
  gap: 6px;
  justify-items: end;
  text-align: right;
}

.parsed-import-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.parsed-import-summary strong {
  font-size: 16px;
  line-height: 1.35;
}

.parsed-import-meta {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

.parsed-intake-card h4 {
  margin: 0;
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.08;
}

.parsed-desk-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 400px);
  gap: 16px;
  align-items: start;
}

.parsed-batch-card {
  position: sticky;
  top: calc(var(--header-offset) + 6px);
}

.parsed-batch-card h4 {
  margin: 0;
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.08;
}

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

.parsed-meta-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid rgba(120, 152, 189, 0.14);
  border-radius: 16px;
  background: rgba(7, 16, 27, 0.54);
}

.parsed-meta-value {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.parsed-table-tools {
  align-items: flex-end;
}

.parsed-table-search {
  max-width: 320px;
  width: 100%;
}

.empty-state-compact {
  padding: 22px 24px;
  min-height: 0;
}

.empty-state-compact p {
  max-width: 620px;
  margin: 0;
}

.table-cell-stack {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.table-cell-primary {
  gap: 8px;
}

.table-primary-text {
  font-size: 15px;
  line-height: 1.18;
  letter-spacing: -0.01em;
}

.table-text-cell {
  font-size: 14px;
  line-height: 1.4;
}

.table-clamp {
  display: block;
  overflow: visible;
}

.table-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.table-inline-link {
  color: #9edbff;
  font-size: 12px;
  line-height: 1.3;
  text-decoration: none;
  border-bottom: 1px solid rgba(158, 219, 255, 0.32);
}

.table-inline-link:hover {
  border-bottom-color: rgba(158, 219, 255, 0.72);
}

.table-cell-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.table-file-name {
  font-size: 14px;
  line-height: 1.35;
}

.table-status-cell {
  white-space: normal;
}

.table-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(4, 10, 17, 0.72);
  backdrop-filter: blur(8px);
}

.modal-card {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
}

.modal-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 118px;
  white-space: nowrap;
  align-self: flex-start;
}

.modal-actions {
  justify-content: flex-end;
}

.key-value {
  display: grid;
  gap: 12px;
}

.key-value-row {
  display: grid;
  gap: 4px;
}

.key-value-row strong {
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.list {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
}

.list li + li {
  margin-top: 6px;
}

.review-layout {
  align-items: start;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 520px);
}

.ai-launch-panel {
  display: grid;
  gap: 14px;
}

.ai-launch-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.ai-launch-copy {
  display: grid;
  gap: 6px;
  max-width: 720px;
}

.ai-launch-copy h3 {
  margin: 0;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.ai-launch-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.review-desk-card,
.queue-column,
.inspector-card {
  display: grid;
  gap: 14px;
}

.review-desk-head,
.review-toolbar,
.queue-column-head,
.detail-topline,
.detail-decision-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.review-desk-copy,
.queue-column-copy {
  display: grid;
  gap: 6px;
}

.review-desk-copy h4,
.queue-column-copy h4,
.detail-decision-head h4 {
  margin: 0;
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.08;
}

.review-desk-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-width: min(100%, 430px);
}

.review-stat {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid rgba(120, 152, 189, 0.14);
  border-radius: 16px;
  background: rgba(7, 16, 27, 0.54);
}

.review-stat-value {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.review-toolbar {
  align-items: flex-end;
}

.review-toolbar-fields {
  flex: 1 1 auto;
}

.review-toolbar-search {
  max-width: 520px;
  width: 100%;
}

.ai-bucket-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: nowrap;
}

.ai-bucket-tabs {
  flex: 1 1 0;
  min-width: 0;
  gap: 5px;
}

.ai-bucket-tabs .tab-btn {
  min-height: 40px;
  padding: 7px 11px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(9, 18, 31, 0.3);
  border-color: rgba(120, 152, 189, 0.12);
  box-shadow: none;
}

.ai-bucket-tabs .tab-btn.active {
  background: linear-gradient(135deg, rgba(55, 182, 221, 0.16), rgba(29, 143, 212, 0.18));
  border-color: rgba(55, 182, 221, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 6px 16px rgba(9, 18, 31, 0.14);
}

.ai-bucket-tabs .tab-btn:hover {
  transform: none;
}

.ai-bucket-tabs .count-badge {
  gap: 4px;
  min-width: 24px;
  justify-content: center;
  padding: 3px 7px;
  font-size: 10px;
}

.ai-bucket-toolbar-side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
  margin-left: auto;
  flex: 0 0 auto;
}

.ai-bucket-search {
  width: 236px;
  min-width: 236px;
}

.ai-bucket-search > span {
  display: none;
}

.ai-bucket-search input {
  min-height: 40px;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 13px;
}

.review-toolbar-actions,
.queue-head-chips {
  justify-content: flex-end;
}

.queue-column {
  align-content: start;
}

.queue-column-head {
  padding: 10px 14px;
  background:
    linear-gradient(135deg, rgba(55, 182, 221, 0.08), rgba(29, 143, 212, 0.06)),
    rgba(8, 17, 29, 0.72);
}

.queue-column-copy {
  gap: 2px;
}

.queue-column-copy h4 {
  font-size: clamp(16px, 1.65vw, 20px);
  line-height: 1.04;
}

.queue-column-head .section-copy {
  margin: 0;
  font-size: 14px;
  line-height: 1.28;
}

.queue-head-chips,
.queue-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.queue-column-head .count-badge {
  padding: 7px 12px;
}

.queue-list {
  display: grid;
  gap: 10px;
}

.queue-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(120, 152, 189, 0.12);
  background: rgba(10, 20, 35, 0.42);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.15;
}

.queue-item {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(10, 20, 35, 0.8), rgba(8, 17, 29, 0.72));
  cursor: pointer;
  color: var(--text);
  font: inherit;
  text-align: left;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.queue-item strong {
  font-size: 15px;
  line-height: 1.16;
}

.queue-item.active {
  border-color: rgba(55, 182, 221, 0.42);
  background:
    linear-gradient(135deg, rgba(55, 182, 221, 0.18), rgba(29, 143, 212, 0.12)),
    linear-gradient(180deg, rgba(10, 20, 35, 0.84), rgba(8, 17, 29, 0.78));
  box-shadow:
    inset 3px 0 0 rgba(55, 182, 221, 0.82),
    0 18px 30px rgba(3, 10, 18, 0.24);
}

.queue-item:hover {
  border-color: var(--line-bright);
  transform: translateY(-1px);
}

.queue-subtitle {
  margin-top: 2px;
  font-size: 14px;
  line-height: 1.28;
}

.queue-reason {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.32;
}

.queue-item-head,
.detail-actions,
.detail-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.queue-item-meta,
.detail-grid,
.detail-sections {
  display: grid;
  gap: 12px;
}

.queue-item-meta {
  gap: 8px;
}

.queue-item-head .badge {
  padding: 5px 8px;
  font-size: 10px;
}

.queue-item .detail-stats {
  gap: 8px;
  font-size: 12px;
}

.queue-chip-row {
  gap: 6px;
}

.queue-chip {
  padding: 4px 8px;
  font-size: 11px;
}

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

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

.inspector-card {
  position: sticky;
  top: calc(var(--header-offset) + 6px);
  align-self: start;
}

.detail-topline {
  flex-wrap: wrap;
  margin-bottom: -2px;
}

.detail-position {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.detail-decision-card {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(120, 152, 189, 0.18);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(55, 182, 221, 0.08), rgba(29, 143, 212, 0.06)),
    rgba(8, 17, 29, 0.72);
}

.detail-decision-card .field {
  gap: 10px;
}

.detail-card .stat-v {
  font-size: 20px;
  line-height: 1.02;
  letter-spacing: -0.02em;
  word-break: break-word;
}

.detail-grid .info-card {
  padding: 12px 12px;
  min-width: 0;
  background:
    linear-gradient(180deg, rgba(12, 23, 38, 0.78), rgba(9, 18, 31, 0.7));
}

.detail-stat-card {
  position: relative;
}

.detail-stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.detail-grid .stat-k {
  font-size: 10px;
  letter-spacing: 0.1em;
}

.detail-grid .info-card:last-child .stat-v {
  font-size: 18px;
}

.detail-stat-hint {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid rgba(120, 152, 189, 0.18);
  background: rgba(9, 18, 31, 0.46);
  cursor: default;
  outline: none;
  flex: 0 0 auto;
}

.detail-stat-hint-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: rgba(241, 169, 59, 0.16);
  color: #f3c677;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.detail-stat-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(4px);
  width: min(250px, calc(100vw - 120px));
  padding: 10px 12px;
  border: 1px solid rgba(120, 152, 189, 0.2);
  border-radius: 14px;
  background: rgba(8, 17, 29, 0.96);
  box-shadow: 0 18px 36px rgba(2, 8, 15, 0.36);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition:
    opacity 160ms ease,
    transform 160ms ease,
    visibility 160ms ease;
  z-index: 6;
}

.detail-stat-hint:hover .detail-stat-tooltip,
.detail-stat-hint:focus-visible .detail-stat-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.detail-stat-hint:focus-visible {
  border-color: rgba(55, 182, 221, 0.34);
  box-shadow: 0 0 0 3px rgba(55, 182, 221, 0.16);
}

.detail-sections {
  gap: 10px;
}

.detail-stack {
  display: grid;
  gap: 10px;
}

.detail-fact-card,
.detail-section-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid rgba(120, 152, 189, 0.14);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(12, 23, 38, 0.76), rgba(9, 18, 31, 0.72));
}

.detail-fact-card .stat-k,
.detail-section-card .section-kicker {
  margin: 0;
}

.detail-fact-value {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.detail-section-card .pre-wrap {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 13px;
  line-height: 1.5;
}

.code-block,
.pre-wrap {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(7, 16, 27, 0.92);
  white-space: pre-wrap;
  line-height: 1.45;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.ghost-btn {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.detail-head-actions {
  align-items: flex-start;
  justify-content: flex-end;
}

.detail-link-btn {
  flex: 0 0 auto;
  min-width: 120px;
  justify-content: center;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
  text-align: center;
}

.details-block {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(7, 16, 27, 0.72);
  overflow: hidden;
}

.details-summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  color: var(--text);
  font-weight: 700;
}

.settings-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 16px 18px;
}

.settings-summary-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  justify-self: center;
  min-width: 42px;
  text-align: center;
}

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

.details-summary::after {
  content: "+";
  float: right;
  color: var(--muted);
}

.settings-summary::after {
  float: none;
  justify-self: end;
  font-size: 24px;
  line-height: 1;
}

.details-block[open] .details-summary::after {
  content: "−";
}

.details-block .pre-wrap {
  margin: 0 12px 12px;
}

.settings-details-body {
  display: grid;
  gap: 12px;
  padding: 0 12px 12px;
}

.settings-form-actions {
  padding-top: 6px;
}

.settings-form-actions .primary-btn {
  min-width: 260px;
}

.brand-inline {
  display: flex;
  align-items: center;
  min-width: 0;
}

.brand-title-compact {
  font-size: 22px;
}

.brand-title-inline {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;
  white-space: nowrap;
}

.brand-inline-meta {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}

.brand-copy-compact {
  font-size: 13px;
}

.topbar-compact {
  margin-bottom: 8px;
}

.nav-tabs {
  flex-wrap: nowrap;
  overflow-x: auto;
  margin-bottom: 2px;
  padding-top: 2px;
  border-top: 1px solid rgba(120, 152, 189, 0.1);
  scrollbar-width: none;
}

.tabs-scroll {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.tabs-scroll::-webkit-scrollbar {
  display: none;
}

.nav-tabs::-webkit-scrollbar {
  display: none;
}

#page-root {
  scroll-margin-top: calc(var(--header-offset) + 12px);
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 16px;
  margin-bottom: 2px;
}

.page-head-content {
  align-items: flex-start;
  padding: 6px 2px 10px;
  margin-bottom: 6px;
}

.page-kicker {
  margin: 0;
  opacity: 0.9;
}

.page-title {
  margin-bottom: 0;
}

.section-kicker {
  opacity: 0.78;
}

.nav-btn:hover,
.lang-btn:hover,
.ghost-btn:hover,
.inline-btn:hover,
.tab-btn:hover {
  border-color: var(--line-bright);
  transform: translateY(-1px);
}

.export-btn:hover {
  border-color: rgba(49, 194, 125, 0.5);
  background: rgba(49, 194, 125, 0.18);
  color: #baf8d7;
}

.nav-btn:focus-visible,
.lang-btn:focus-visible,
.ghost-btn:focus-visible,
.primary-btn:focus-visible,
.reject-btn:focus-visible,
.inline-btn:focus-visible,
.tab-btn:focus-visible,
.history-group-btn:focus-visible,
.history-month-btn:focus-visible,
.queue-item:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(55, 182, 221, 0.92);
  outline-offset: 2px;
  border-color: rgba(55, 182, 221, 0.42);
  box-shadow: 0 0 0 4px rgba(55, 182, 221, 0.12);
}

.danger-btn:hover {
  border-color: rgba(255, 111, 112, 0.42);
  background: rgba(255, 111, 112, 0.1);
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(10, 110, 155, 0.3);
}

.lang-btn.active,
.tab-btn.active,
.segment-chip.active {
  background: linear-gradient(135deg, rgba(55, 182, 221, 0.24), rgba(29, 143, 212, 0.24));
  border-color: rgba(55, 182, 221, 0.34);
  color: var(--text);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 22px rgba(9, 18, 31, 0.18);
}

@media (max-width: 1180px) {
  .two-col,
  .settings-grid,
  .review-layout,
  .three-col,
  .four-col,
  .delivery-grid {
    grid-template-columns: 1fr;
  }

  .settings-sidebar {
    position: static;
    top: auto;
  }

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

  .page-head {
    flex-direction: column;
    align-items: stretch;
  }

  .parsed-desk-grid {
    grid-template-columns: 1fr;
  }

  .review-desk-head,
  .review-toolbar,
  .queue-column-head,
  .detail-decision-head,
  .ai-launch-main {
    flex-direction: column;
    align-items: stretch;
  }

  .review-desk-meta {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .detail-facts-grid,
  .detail-inline-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .review-toolbar-actions,
  .queue-head-chips,
  .ai-launch-actions {
    justify-content: flex-start;
  }

  .ai-bucket-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .ai-bucket-toolbar-side {
    margin-left: 0;
    justify-content: flex-start;
  }

  .ai-bucket-search {
    width: 100%;
    min-width: 0;
  }

  .inspector-card {
    position: static;
    top: auto;
  }

  .parsed-batch-card {
    position: static;
    top: auto;
  }

  .auth-layout {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
    gap: 28px;
  }
}

@media (max-width: 760px) {
  .shell {
    padding: 0 14px 28px;
  }

  .auth-page-shell {
    padding: 16px;
  }

  .header-shell {
    width: calc(100% - 28px);
    padding: 14px 14px 12px;
    border-radius: 0 0 16px 16px;
  }

  .content-shell {
    padding-top: var(--header-offset);
  }

  .topbar,
  .section-head,
  .section-tools,
  .queue-item-head,
  .detail-actions,
  .detail-stats,
  .history-batch-top {
    flex-direction: column;
    align-items: stretch;
  }

  .history-batch-row {
    grid-template-columns: 1fr;
  }

  .topbar-actions {
    justify-content: flex-start;
  }

  .auth-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .auth-copy-column {
    padding-right: 0;
  }

  .auth-form-column {
    align-self: stretch;
    padding: 16px;
  }

  .auth-card-head {
    flex-direction: column;
    justify-content: flex-start;
  }

  .auth-benefits-title {
    max-width: 100%;
  }

  .field-grid.two,
  .field-grid.three,
  .detail-grid,
  .parsed-meta-grid {
    grid-template-columns: 1fr;
  }

  .review-toolbar-fields {
    grid-template-columns: 1fr;
  }

  .parsed-import-bar,
  .parsed-import-actions,
  .parsed-import-summary {
    flex-direction: column;
    align-items: stretch;
  }

  .parsed-launch-panel {
    grid-template-columns: 1fr;
  }

  .parsed-launch-hint {
    width: 30px;
    height: 30px;
  }

  .parsed-launch-tooltip {
    left: 0;
    top: calc(100% + 10px);
    transform: translateY(-4px);
    width: min(320px, calc(100vw - 56px));
  }

  .parsed-launch-hint:hover .parsed-launch-tooltip,
  .parsed-launch-hint:focus-visible .parsed-launch-tooltip {
    transform: translateY(0);
  }

  .parsed-import-status {
    justify-items: start;
    text-align: left;
  }

  .modal-overlay {
    padding: 14px;
    align-items: end;
  }

  .modal-card {
    width: 100%;
    max-height: min(92vh, 760px);
  }

  .modal-close-btn {
    min-width: 0;
    align-self: stretch;
  }

  .tabs-scroll {
    margin-right: -4px;
  }

  .table-wrap table {
    min-width: 680px;
  }

  .parsed-table {
    min-width: 1080px;
  }

  .toast-root {
    top: var(--toast-offset);
    right: 14px;
    width: calc(100vw - 28px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
