:root {
  --bg: #081018;
  --bg-2: #0c1621;
  --sidebar: #07111b;
  --sidebar-border: rgba(255, 255, 255, 0.06);
  --panel: #101a27;
  --panel-2: #111d2b;
  --panel-soft: rgba(255, 255, 255, 0.04);
  --panel-border: rgba(255, 255, 255, 0.09);
  --text: #f3f7fb;
  --text-soft: #98a8bc;
  --text-dim: #728198;
  --accent: #ff8a1d;
  --accent-2: #ff9c3b;
  --green: #35d46d;
  --green-soft: rgba(53, 212, 109, 0.14);
  --yellow: #f3c63b;
  --yellow-soft: rgba(243, 198, 59, 0.14);
  --red: #ff5656;
  --red-soft: rgba(255, 86, 86, 0.14);
  --blue: #62a7ff;
  --blue-soft: rgba(98, 167, 255, 0.14);
  --purple: #b277ff;
  --purple-soft: rgba(178, 119, 255, 0.12);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.28);
  --shadow-sm: 0 12px 28px rgba(0, 0, 0, 0.18);
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --sidebar-width: 272px;
  --sidebar-collapsed-width: 96px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  font-family: "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 138, 29, 0.1), transparent 18%),
    linear-gradient(180deg, #071018 0%, #0b1521 100%);
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
}

a {
  color: inherit;
}

.hidden {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding: 24px;
}

.login-layout {
  width: min(100%, 1040px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 372px);
  gap: 14px;
  align-items: start;
}

.brand-stage,
.login-card,
.card-surface,
.card-dark {
  border-radius: var(--radius-xl);
}

.brand-stage {
  position: relative;
  overflow: hidden;
  padding: 14px;
  display: grid;
  align-content: start;
  gap: 10px;
  border: 1px solid var(--panel-border);
  background:
    linear-gradient(155deg, rgba(255, 138, 29, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent),
    #0a121c;
  box-shadow: var(--shadow-lg);
}

.brand-stage-frame {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
}

.brand-stage-media {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 120px;
  padding: 10px 12px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(2, 6, 12, 0.82), rgba(13, 22, 34, 0.4));
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.brand-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(12px);
}

.brand-orb-large {
  width: 380px;
  height: 380px;
  right: -60px;
  bottom: -120px;
  background: radial-gradient(circle, rgba(255, 138, 29, 0.2), transparent 68%);
}

.brand-orb-small {
  width: 220px;
  height: 220px;
  left: -50px;
  top: -50px;
  background: radial-gradient(circle, rgba(98, 167, 255, 0.14), transparent 68%);
}

.brand-logo-full {
  width: min(100%, 260px);
}

.brand-copy {
  max-width: 470px;
}

.brand-copy h1 {
  margin: 4px 0 6px;
  font-size: clamp(1.2rem, 1.8vw, 1.8rem);
  line-height: 1.06;
}

.brand-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.92rem;
  line-height: 1.45;
}

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

.brand-feature-list article {
  display: grid;
  gap: 4px;
  padding: 10px 11px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.brand-feature-list strong {
  font-size: 0.84rem;
}

.brand-feature-list span {
  color: var(--text-soft);
  font-size: 0.76rem;
  line-height: 1.3;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--accent-2);
}

.eyebrow-bright {
  color: #ffd3a4;
}

.login-panel {
  display: grid;
  align-items: start;
  justify-items: stretch;
}

.login-card {
  padding: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent), #101924;
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow-lg);
  max-width: 372px;
  width: 100%;
}

.soft-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 138, 29, 0.14);
  color: #ffc98f;
  font-size: 0.8rem;
  font-weight: 700;
}

.login-head h2 {
  margin: 8px 0 4px;
  font-size: 1.2rem;
}

.login-head p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.42;
}

.login-head p,
.login-help p,
.status,
.dropzone-copy,
.section-copy,
.page-subtitle,
.table-subline,
.detail-list,
.detail-grid p,
.detail-section p,
.sidebar-label,
.sidebar-user span,
.summary-content small,
.greeting-line {
  color: var(--text-soft);
}

.login-form,
.config-grid {
  display: grid;
  gap: 12px;
}

.login-form {
  margin-top: 12px;
}

.login-form label,
.config-grid label,
.filter-control {
  display: grid;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
}

input,
select {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.98);
  color: #0f1720;
  padding: 11px 14px;
}

input:focus,
select:focus {
  outline: 2px solid rgba(255, 138, 29, 0.34);
  outline-offset: 1px;
}

.primary-button,
.ghost-button,
.sidebar-logout,
.insight-action,
.page-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease, background 140ms ease;
}

.primary-button:hover,
.ghost-button:hover,
.sidebar-logout:hover,
.insight-action:hover,
.page-button:hover {
  transform: translateY(-1px);
}

.primary-button {
  color: white;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  box-shadow: 0 14px 28px rgba(255, 138, 29, 0.24);
}

.ghost-button,
.sidebar-logout,
.button-dark {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.button-danger {
  color: #ffb1b1;
  border-color: rgba(255, 86, 86, 0.22);
  background: rgba(255, 86, 86, 0.08);
}

.button-danger:hover {
  background: rgba(255, 86, 86, 0.12);
}

.button-lg {
  width: 100%;
}

.button-icon {
  min-width: 168px;
}

button:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.login-help {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.login-help p {
  margin: 4px 0;
}

.status {
  min-height: 24px;
  margin: 10px 2px 0;
}

.dashboard-screen {
  min-height: 100vh;
}

.dashboard-app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  background: linear-gradient(180deg, #081018 0%, #0b1521 100%);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 16px 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 30%),
    var(--sidebar);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}

.sidebar-top {
  display: grid;
  gap: 20px;
}

.sidebar-brand {
  position: relative;
  padding: 4px 6px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-brand-mark {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 138, 29, 0.12);
  color: #ffc98f;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-logo {
  width: 140px;
  max-width: 100%;
}

.sidebar-collapse-toggle {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  transition: background 140ms ease, transform 140ms ease;
}

.sidebar-collapse-toggle:hover {
  background: rgba(255, 138, 29, 0.18);
}

.sidebar-group {
  display: grid;
  gap: 10px;
}

.sidebar-group-secondary {
  margin-top: 10px;
}

.sidebar-label {
  padding: 0 10px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sidebar-nav,
.sidebar-link-list {
  display: grid;
  gap: 8px;
}

.nav-item-secondary {
  width: 100%;
}

.nav-item,
.sidebar-link {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 14px;
  color: #e8eef6;
  background: transparent;
  text-align: left;
  transition: background 140ms ease, color 140ms ease, transform 140ms ease, border-color 140ms ease;
  position: relative;
  min-height: 44px;
}

.nav-item:hover,
.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(255, 138, 29, 0.28), rgba(255, 138, 29, 0.08));
  color: #ffb86b;
  box-shadow: inset 0 0 0 1px rgba(255, 138, 29, 0.16);
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}

.nav-icon {
  width: 28px;
  height: 28px;
  min-width: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.9;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.94rem;
}

.nav-icon svg {
  width: 17px;
  height: 17px;
}

.nav-item span:last-child {
  line-height: 1.25;
  word-break: keep-all;
}

.nav-item-label {
  min-width: 0;
}

.muted-link {
  color: var(--text-soft);
}

.sidebar-footer {
  display: grid;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-user {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.sidebar-user strong {
  display: block;
  font-size: 0.92rem;
  line-height: 1.25;
  word-break: break-word;
}

.sidebar-user > div {
  min-width: 0;
}

.sidebar-user-meta {
  display: grid;
  gap: 2px;
}

.sidebar-user-label {
  color: var(--text-dim);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  background: linear-gradient(135deg, #243243, #101824);
  color: white;
}

.mobile-topbar {
  display: none;
}

.dashboard-app.sidebar-collapsed {
  grid-template-columns: var(--sidebar-collapsed-width) minmax(0, 1fr);
}

.dashboard-app.sidebar-collapsed .sidebar {
  padding-inline: 10px;
}

.dashboard-app.sidebar-collapsed .sidebar-brand {
  padding-inline: 0;
  padding-bottom: 14px;
  display: grid;
  place-items: center;
}

.dashboard-app.sidebar-collapsed .sidebar-logo {
  width: 48px;
}

.dashboard-app.sidebar-collapsed .sidebar-brand-mark,
.dashboard-app.sidebar-collapsed .sidebar-label,
.dashboard-app.sidebar-collapsed .nav-item span:last-child,
.dashboard-app.sidebar-collapsed .sidebar-user > div,
.dashboard-app.sidebar-collapsed .sidebar-logout span:last-child {
  display: none;
}

.dashboard-app.sidebar-collapsed .sidebar-nav,
.dashboard-app.sidebar-collapsed .sidebar-link-list {
  justify-items: center;
}

.dashboard-app.sidebar-collapsed .nav-item,
.dashboard-app.sidebar-collapsed .sidebar-logout {
  justify-content: center;
  padding-inline: 0;
}

.dashboard-app.sidebar-collapsed .nav-item {
  width: 60px;
  min-height: 60px;
  border-radius: 16px;
}

.dashboard-app.sidebar-collapsed .nav-item::after,
.dashboard-app.sidebar-collapsed .sidebar-logout::after {
  content: attr(data-nav-label);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%) translateX(-4px);
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(8, 16, 24, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 0.8rem;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  box-shadow: var(--shadow-sm);
  transition: opacity 140ms ease, transform 140ms ease;
  z-index: 20;
}

.dashboard-app.sidebar-collapsed .nav-item:hover::after,
.dashboard-app.sidebar-collapsed .sidebar-logout:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.dashboard-app.sidebar-collapsed .sidebar-user {
  justify-content: center;
  align-items: center;
  padding: 10px;
}

.dashboard-app.sidebar-collapsed .sidebar-collapse-toggle {
  transform: rotate(180deg);
}

.content {
  min-width: 0;
  padding: 18px 20px;
  overflow: auto;
}

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

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.page-header h1 {
  margin: 4px 0 8px;
  font-size: clamp(1.8rem, 2.5vw, 2.45rem);
  line-height: 1.02;
}

.greeting-line {
  margin: 0;
  font-size: 0.95rem;
}

.header-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.card-surface,
.card-dark {
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow-sm);
}

.card-surface {
  background: linear-gradient(180deg, rgba(18, 28, 42, 0.98), rgba(14, 23, 34, 0.98));
}

.card-dark {
  background: linear-gradient(180deg, #0f1724 0%, #101826 100%);
}

.upload-layout {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 0.98fr) minmax(380px, 0.92fr);
  align-items: start;
}

.upload-hero,
.upload-form,
.preview-card,
.filters-card,
.table-section,
.uploads-drawer {
  padding: 16px;
}

.upload-hero {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 12px;
  background:
    radial-gradient(circle at right top, rgba(98, 167, 255, 0.12), transparent 28%),
    radial-gradient(circle at left bottom, rgba(255, 138, 29, 0.1), transparent 22%),
    linear-gradient(180deg, #101927 0%, #0c1520 100%);
}

.upload-hero-copy h2 {
  margin: 8px 0 6px;
  font-size: 1.52rem;
  line-height: 1.08;
}

.upload-hero-copy p {
  margin: 0;
  max-width: 520px;
  color: var(--text-soft);
  line-height: 1.42;
  font-size: 0.88rem;
}

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

.upload-hero-card {
  display: grid;
  gap: 5px;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.upload-hero-card span {
  color: #ffc98f;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.upload-hero-card strong {
  font-size: 0.88rem;
  line-height: 1.22;
}

.upload-hero-card p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.34;
  font-size: 0.79rem;
}

.upload-hero-note {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 11px 13px;
  border-radius: 14px;
  border: 1px solid rgba(255, 138, 29, 0.18);
  background: linear-gradient(135deg, rgba(255, 138, 29, 0.12), rgba(255, 255, 255, 0.03));
}

.upload-hero-note strong {
  font-size: 0.84rem;
}

.upload-hero-note span {
  color: var(--text-soft);
  line-height: 1.34;
  font-size: 0.82rem;
}

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

.pipeline-step {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
}

.pipeline-step span {
  font-size: 0.84rem;
  line-height: 1.28;
}

.pipeline-step strong {
  color: var(--text);
  font-size: 0.92rem;
}

.pipeline-step.is-active {
  border-color: rgba(255, 138, 29, 0.24);
  background: linear-gradient(135deg, rgba(255, 138, 29, 0.12), rgba(255, 255, 255, 0.03));
}

.upload-form {
  display: grid;
  gap: 10px;
  align-content: start;
}

.preview-card {
  grid-column: 1 / -1;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.section-header h2 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.18;
}

.section-copy {
  margin: 4px 0 0;
  font-size: 0.84rem;
  line-height: 1.36;
}

.surface-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-soft);
  font-size: 0.76rem;
}

.dropzone {
  display: grid;
  place-items: center;
  text-align: center;
  gap: 7px;
  min-height: 126px;
  padding: 16px 15px;
  border-radius: 16px;
  border: 1.5px dashed rgba(255, 138, 29, 0.48);
  background: linear-gradient(180deg, rgba(255, 138, 29, 0.08), rgba(255, 255, 255, 0.02));
}

.dropzone.is-dragover {
  border-color: rgba(255, 138, 29, 0.9);
  background: linear-gradient(180deg, rgba(255, 138, 29, 0.14), rgba(255, 255, 255, 0.03));
}

.dropzone-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.dropzone-copy {
  max-width: 430px;
  line-height: 1.34;
  font-size: 0.84rem;
}

.template-downloads,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.template-downloads .ghost-button,
.button-row .ghost-button,
.button-row .primary-button {
  min-height: 42px;
}

.config-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
}

.upload-form .ghost-button,
.upload-form .primary-button {
  padding: 11px 15px;
}

.preview-card .table-wrap table th,
.preview-card .table-wrap table td {
  padding-top: 11px;
  padding-bottom: 11px;
}

.preview-card .table-wrap table td {
  font-size: 0.9rem;
}

.preview-card .table-wrap table th {
  font-size: 0.82rem;
}

.dashboard-overview-grid,
.reports-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.dashboard-overview-grid-premium .overview-card {
  min-height: 148px;
  padding: 20px 22px;
}

.dashboard-overview-grid-premium .overview-card-primary {
  grid-column: span 2;
  min-height: 168px;
  background:
    radial-gradient(circle at top right, rgba(255, 138, 29, 0.18), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent),
    linear-gradient(180deg, rgba(18, 28, 42, 0.98), rgba(14, 23, 34, 0.98));
}

.dashboard-overview-grid-premium .overview-card-compact {
  min-height: 132px;
}

.overview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.dashboard-columns,
.settings-columns {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 16px;
}

.content-panel[data-panel="dashboard"] .dashboard-columns > .card-surface,
.content-panel[data-panel="reports"] .report-card,
.content-panel[data-panel="saved"] > .card-surface,
.content-panel[data-panel="settings"] .settings-columns > .card-surface,
.content-panel[data-panel="settings"] .settings-columns-secondary > .card-surface {
  padding: 20px 22px;
}

.overview-card,
.report-card {
  min-height: 136px;
}

.report-card {
  display: grid;
  align-content: start;
  gap: 12px;
}

.overview-label {
  display: inline-block;
  margin: 0;
  color: var(--text-soft);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.overview-card strong,
.report-card strong {
  display: block;
  margin: 0;
  font-size: 1.8rem;
  line-height: 1.04;
}

.empty-state-block {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  border-radius: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-soft);
}

.stack-list,
.metric-list {
  display: grid;
  gap: 12px;
}

.metric-list {
  align-content: start;
}

.stack-item {
  width: 100%;
  display: grid;
  gap: 4px;
  padding: 14px 15px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  text-align: left;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.stack-item:hover,
.stack-item.active {
  transform: translateY(-1px);
  border-color: rgba(255, 138, 29, 0.36);
  background: rgba(255, 138, 29, 0.08);
}

.stack-item span,
.stack-item small,
.metric-list p {
  color: var(--text-soft);
}

.metric-list p,
.report-card p,
.overview-card p {
  margin: 0;
  line-height: 1.6;
}

.decision-summary-card {
  display: grid;
  gap: 16px;
}

.decision-progress-block {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 138, 29, 0.1), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 138, 29, 0.16);
}

.decision-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.decision-progress-head span,
.decision-progress-block p {
  color: var(--text-soft);
}

.decision-progress-head strong {
  font-size: 1.05rem;
}

.decision-progress-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.decision-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #ffbe68);
}

.decision-summary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.decision-summary-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.decision-summary-head p {
  margin: 6px 0 0;
  color: var(--text-soft);
}

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

.decision-summary-grid article,
.opportunity-card,
.category-performance-row {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.decision-summary-grid article {
  padding: 12px 14px;
  display: grid;
  gap: 6px;
}

.decision-summary-grid article span {
  color: var(--text-soft);
  font-size: 0.85rem;
}

.decision-summary-grid article strong {
  font-size: 1.4rem;
}

.opportunity-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 15px;
}

.opportunity-card-button {
  width: 100%;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.opportunity-card-button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 138, 29, 0.28);
  background: rgba(255, 138, 29, 0.06);
}

.opportunity-rank {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 138, 29, 0.14);
  color: #ffc98f;
  font-weight: 800;
}

.opportunity-card p,
.opportunity-metrics small,
.category-performance-row small {
  margin: 4px 0 0;
  color: var(--text-soft);
}

.opportunity-metrics {
  text-align: right;
}

.opportunity-metrics span {
  display: block;
  font-weight: 700;
}

.category-performance-row {
  padding: 14px 15px;
  display: grid;
  gap: 10px;
}

.category-performance-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.category-performance-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.category-performance-head span {
  color: var(--text-soft);
}

.category-performance-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.category-performance-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #ffc067);
}

.saved-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 16px;
}

.saved-product-card {
  display: grid;
  gap: 16px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.saved-product-head {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.saved-product-image,
.saved-product-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-soft);
  text-align: center;
  font-size: 0.72rem;
}

.saved-product-head p,
.saved-product-card p {
  margin: 0;
  color: var(--text-soft);
}

.saved-product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.infra-status {
  min-height: 22px;
}

.infra-pill {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
}

.infra-ok {
  background: rgba(53, 212, 109, 0.12);
  color: #7eebb0;
}

.infra-error {
  background: rgba(255, 86, 86, 0.12);
  color: #ffadad;
}

.results-header {
  margin-bottom: 2px;
}

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

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

.status-breakdown-grid article,
.settings-impact-grid article {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.status-breakdown-grid span,
.settings-impact-grid span {
  display: block;
  color: var(--text-soft);
  font-size: 0.84rem;
  margin: 0 0 8px;
}

.status-breakdown-grid strong,
.settings-impact-grid strong {
  font-size: 1.5rem;
}

.report-card .metric-list,
.report-card .status-breakdown-grid {
  margin-top: 2px;
}

.report-card .overview-label + strong {
  margin-top: 2px;
}

.content-panel[data-panel="dashboard"] .section-header,
.content-panel[data-panel="reports"] .section-header,
.content-panel[data-panel="saved"] .section-header,
.content-panel[data-panel="settings"] .section-header {
  margin-bottom: 14px;
}

.content-panel[data-panel="dashboard"] .section-header .section-copy,
.content-panel[data-panel="reports"] .section-header .section-copy,
.content-panel[data-panel="saved"] .section-header .section-copy,
.content-panel[data-panel="settings"] .section-header .section-copy {
  max-width: 58ch;
}

.summary-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.summary-card {
  position: relative;
  overflow: hidden;
  padding: 14px 15px 13px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(14, 23, 35, 0.98), rgba(12, 20, 30, 0.98));
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  color: inherit;
  font: inherit;
  appearance: none;
  min-height: 108px;
}

.summary-card.is-interactive {
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.summary-card.is-interactive:hover {
  transform: translateY(-2px);
}

.summary-card.is-active {
  border-color: rgba(255, 255, 255, 0.26);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
}

.summary-card-sell {
  box-shadow: inset 0 0 0 1px rgba(53, 212, 109, 0.2);
}

.summary-card-test {
  box-shadow: inset 0 0 0 1px rgba(243, 198, 59, 0.2);
}

.summary-card-no {
  box-shadow: inset 0 0 0 1px rgba(255, 86, 86, 0.2);
}

.summary-card-total {
  box-shadow: inset 0 0 0 1px rgba(98, 167, 255, 0.2);
}

.summary-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.08rem;
  font-weight: 700;
}

.summary-card-sell .summary-icon {
  background: var(--green-soft);
  color: var(--green);
}

.summary-card-test .summary-icon {
  background: var(--yellow-soft);
  color: var(--yellow);
}

.summary-card-no .summary-icon {
  background: var(--red-soft);
  color: var(--red);
}

.summary-card-total .summary-icon {
  background: var(--blue-soft);
  color: var(--blue);
}

.summary-content strong {
  display: block;
  font-size: 2.2rem;
  line-height: 0.98;
}

.summary-content span {
  display: block;
  margin-top: 1px;
  font-size: 0.98rem;
  font-weight: 700;
}

.summary-content small {
  display: block;
  margin-top: 3px;
  font-size: 0.76rem;
  line-height: 1.36;
  max-width: 18ch;
}

.summary-rate {
  align-self: end;
  padding: 6px 9px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.74rem;
}

.summary-card-sell .summary-rate {
  background: var(--green-soft);
  color: #8ef0b5;
}

.summary-card-test .summary-rate {
  background: var(--yellow-soft);
  color: #ffd86b;
}

.summary-card-no .summary-rate {
  background: var(--red-soft);
  color: #ff9e9e;
}

.summary-card-total .summary-rate {
  background: var(--blue-soft);
  color: #acd0ff;
}

.insight-banner {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
}

.insight-banner-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--purple-soft);
  color: #d4b3ff;
  font-size: 1.12rem;
}

.insight-banner-copy h2 {
  margin: 0 0 6px;
  color: #ca9cff;
  font-size: 1.02rem;
}

.insight-lines {
  display: grid;
  gap: 2px;
}

.insight-lines p {
  margin: 0;
  color: #dbe6f3;
  line-height: 1.38;
  font-size: 0.92rem;
}

.insight-action {
  color: #e2c9ff;
  background: rgba(178, 119, 255, 0.12);
  border: 1px solid rgba(178, 119, 255, 0.18);
  padding: 10px 14px;
}

.settings-impact-card {
  display: grid;
  gap: 18px;
}

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

.settings-impact-copy {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
  line-height: 1.6;
}

.settings-columns-secondary {
  margin-top: 16px;
}

.health-pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.health-pill {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
}

.health-pill-ok {
  background: rgba(53, 212, 109, 0.12);
  color: #7eebb0;
}

.health-pill-warn {
  background: rgba(255, 138, 29, 0.14);
  color: #ffc98f;
}

.filters-card {
  display: grid;
  gap: 12px;
}

.results-command-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.results-command-card {
  padding: 11px 13px;
  min-height: 86px;
}

.results-command-card strong {
  display: block;
  margin-bottom: 3px;
  font-size: 1.16rem;
  line-height: 1.06;
}

.results-command-card .section-copy,
.results-command-card small,
.results-command-card p {
  font-size: 0.78rem;
  line-height: 1.34;
}

.filters-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1.1fr repeat(4, minmax(0, 1fr)) 0.9fr;
}

.filters-card .card {
  padding: 14px 14px 12px;
  border-radius: 18px;
}

.filter-control span,
.filter-toggle span:first-child {
  color: var(--text);
  font-weight: 600;
  font-size: 0.86rem;
}

.filter-control input,
.filter-control select {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  min-height: 38px;
  padding: 9px 12px;
}

.filter-control input::placeholder {
  color: var(--text-dim);
}

.filter-range .range-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.filter-range input[type="range"] {
  padding: 0;
  background: transparent;
  accent-color: var(--accent);
}

.filter-toggle {
  display: grid;
  align-content: center;
  justify-items: end;
  gap: 8px;
}

.filter-toggle input {
  position: absolute;
  opacity: 0;
}

.toggle-slider {
  position: relative;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.toggle-slider::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  transition: transform 140ms ease;
}

#filter-opportunity:checked + .toggle-slider {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

#filter-opportunity:checked + .toggle-slider::after {
  transform: translateX(22px);
}

.filters-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.table-section {
  display: grid;
  gap: 12px;
}

.table-shell {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.preview-table-shell {
  background: rgba(255, 255, 255, 0.03);
}

.table-wrap {
  width: 100%;
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

  .results-table {
    min-width: 1060px;
  }

.results-table th:nth-child(2),
.results-table td:nth-child(2) {
  width: 31%;
}

.results-table th:nth-child(3),
.results-table td:nth-child(3) {
  width: 18%;
}

.results-table th:nth-child(4),
.results-table td:nth-child(4) {
  width: 13%;
}

.results-table th:nth-child(5),
.results-table td:nth-child(5) {
  width: 22%;
}

.results-table th:nth-child(6),
.results-table td:nth-child(6) {
  width: 12%;
}

.results-table th:nth-child(7),
.results-table td:nth-child(7) {
  width: 6%;
}

  thead th {
    text-align: left;
    padding: 10px 12px;
    color: #dbe7f3;
    font-size: 0.8rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  tbody td {
    padding: 10px 12px;
    color: var(--text);
    vertical-align: top;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .checkbox-col {
    width: 38px;
  }

  .checkbox-cell input,
  .checkbox-col input {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
  }

.result-row.row-sell {
  background: linear-gradient(90deg, rgba(53, 212, 109, 0.04), transparent 35%);
}

.result-row.row-risk {
  background: linear-gradient(90deg, rgba(255, 86, 86, 0.04), transparent 35%);
}

  .product-cell {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 10px;
  }

  .product-main {
    display: grid;
    gap: 4px;
  }

  .product-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .product-meta-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-soft);
    font-size: 0.66rem;
    font-weight: 700;
  }

.product-meta-pill-sku {
  color: #c6d4e5;
  letter-spacing: 0.02em;
}

  .table-image-wrap {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(180deg, #f8f8f8, #ffffff);
    border: 1px solid rgba(255, 255, 255, 0.08);
  }

.table-product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-image-surface {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.table-image-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--text-dim);
  font-size: 0.76rem;
  text-align: center;
  padding: 8px;
}

.product-illustration-card {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 10px;
  padding: 12px;
  border-radius: inherit;
  background: linear-gradient(180deg, #f7f0e8 0%, #fbf7f2 100%);
  color: #192127;
  overflow: hidden;
}

.product-illustration-stage {
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(180deg, #fffaf3 0%, #f5ebdf 100%);
  border: 1px solid #ead7bf;
  overflow: hidden;
}

.product-illustration-graphic {
  width: 74%;
  max-width: 170px;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 16px 22px rgba(18, 28, 40, 0.08));
}

.product-illustration-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.product-illustration-code {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 106, 0, 0.14);
  color: #ff6a00;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.product-illustration-footer {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #192127;
  color: #ffffff;
  text-align: left;
}

.product-illustration-footer strong {
  font-size: 0.92rem;
  line-height: 1.1;
}

.product-illustration-footer span {
  color: #d8dee6;
  font-size: 0.74rem;
  line-height: 1.3;
}

.table-image-placeholder.product-illustration-card,
.saved-product-placeholder.product-illustration-card,
.modal-image-placeholder.product-illustration-card {
  place-items: initial;
}

  .product-illustration-table {
    padding: 5px;
    gap: 0;
    grid-template-rows: 1fr;
  }

  .product-illustration-table .product-illustration-stage {
    border-radius: 10px;
  }

  .product-illustration-table .product-illustration-code {
    top: 5px;
    left: 5px;
    padding: 2px 6px;
    font-size: 0.48rem;
  }

  .product-illustration-table .product-illustration-graphic {
    width: 58%;
    max-width: 38px;
  }

.product-illustration-saved {
  padding: 6px;
  gap: 0;
  grid-template-rows: 1fr;
}

.product-illustration-saved .product-illustration-stage {
  border-radius: 12px;
}

.product-illustration-saved .product-illustration-code {
  top: 6px;
  left: 6px;
  padding: 3px 7px;
  font-size: 0.52rem;
}

.product-illustration-saved .product-illustration-graphic {
  width: 58%;
  max-width: 40px;
}

.product-trigger {
  padding: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

  .product-title {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.2;
    max-width: 30ch;
  }

  .table-subline {
    margin-top: 1px;
    line-height: 1.28;
    font-size: 0.76rem;
  }

  .table-link {
    display: inline-flex;
    margin-top: 2px;
    color: var(--accent-2);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.78rem;
  }

  .signal-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
  }

  .signal-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 0.69rem;
    font-weight: 700;
  }

.signal-hot {
  background: rgba(178, 119, 255, 0.12);
  color: #d2b4ff;
}

.signal-risk {
  background: var(--red-soft);
  color: #ffb0b0;
}

.signal-margin {
  background: var(--green-soft);
  color: #95efb7;
}

.signal-source {
  background: rgba(91, 167, 255, 0.14);
  color: #b8d6ff;
}

.market-cell strong,
.financial-cell strong {
  display: block;
  color: #72e79c;
  font-size: 0.94rem;
}

  .market-kpis {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
  }

  .market-source-chip {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: 3px;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 1.2;
  }

.market-source-chip-ok {
  background: rgba(114, 231, 156, 0.12);
  color: #9ce5b6;
}

.market-source-chip-warn {
  background: rgba(255, 184, 107, 0.12);
  color: #ffd08d;
}

  .market-price-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3px 6px;
    margin: 4px 0 5px;
  }

  .market-price-grid span {
    color: var(--text-soft);
    font-size: 0.66rem;
    line-height: 1.15;
  }

  .market-kpis span {
    display: inline-flex;
    align-items: center;
    padding: 3px 6px;
    border-radius: 999px;
    background: rgba(98, 167, 255, 0.1);
    color: #bed8ff;
    font-size: 0.66rem;
    font-weight: 700;
  }

.financial-cell strong.warning-value {
  color: #ffd86b;
}

.financial-cell strong.danger-value {
  color: #ff8e8e;
}

.financial-cell strong.good-value {
  color: #72e79c;
}

  .financial-pair {
    display: grid;
    gap: 2px;
    margin-bottom: 6px;
  }

.financial-pair:last-child {
  margin-bottom: 0;
}

  .financial-pair span {
    color: var(--text-soft);
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }

  .market-cell .market-rating {
    margin-top: 4px;
    color: #ffe082;
    font-weight: 700;
    font-size: 0.74rem;
  }

  .ai-analysis-cell {
    min-width: 230px;
    max-width: 320px;
    display: grid;
    gap: 5px;
    line-height: 1.42;
    color: #eef5fd;
  }

  .ai-analysis-cell p {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.76rem;
  }

.table-subline-warn {
  color: #ffd08d;
}

  .reason-chip {
    display: inline-flex;
    width: fit-content;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #dbe7f3;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.28;
  }

  .score-chip {
    display: inline-flex;
    width: fit-content;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255, 138, 29, 0.12);
    color: #ffb86b;
    font-size: 0.69rem;
    font-weight: 700;
  }

  .status-stack {
    display: grid;
    gap: 6px;
    justify-items: start;
  }

  .decision-caption {
    color: var(--text-soft);
    font-size: 0.7rem;
    line-height: 1.28;
  }

  .status-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.69rem;
    font-weight: 800;
  }

.pill-sell {
  background: var(--green-soft);
  color: #7eedaa;
}

.pill-test {
  background: var(--yellow-soft);
  color: #ffd86b;
}

.pill-no {
  background: var(--red-soft);
  color: #ff9b9b;
}

.pill-warn {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-soft);
}

.surface-tag-ok {
  background: rgba(114, 231, 156, 0.12);
  color: #9ce5b6;
}

.surface-tag-warn {
  background: rgba(255, 184, 107, 0.12);
  color: #ffd08d;
}

  .actions-cell {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .icon-action {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: var(--text);
    font-size: 0.8rem;
  }

.icon-action-active {
  background: rgba(255, 138, 29, 0.16);
  color: #ffb567;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.results-table-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.legend-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
}

.legend-pill-buy {
  background: var(--green-soft);
  color: #95efb7;
}

.legend-pill-test {
  background: var(--yellow-soft);
  color: #ffd86b;
}

.legend-pill-risk {
  background: var(--red-soft);
  color: #ffadad;
}

.page-button {
  min-width: 38px;
  min-height: 38px;
  padding: 0 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.page-button-active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.uploads-drawer-list {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.uploads-drawer {
  opacity: 0.9;
}

.upload-card {
  width: 100%;
  text-align: left;
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
}

.upload-card.active {
  border-color: rgba(255, 138, 29, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 138, 29, 0.16);
}

.ranking-list {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 12, 0.78);
  backdrop-filter: blur(8px);
}

.modal-card {
  position: relative;
  width: min(1180px, calc(100% - 28px));
  max-height: calc(100vh - 24px);
  overflow: auto;
  margin: 12px auto;
  padding: 22px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(255, 138, 29, 0.12), transparent 18%),
    linear-gradient(180deg, #0f1824 0%, #101926 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-lg);
}

.modal-close {
  margin-left: auto;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.modal-grid {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  gap: 20px;
  margin-top: 10px;
  align-items: start;
}

.modal-visual,
.modal-info,
.detail-section,
.detail-grid > div {
  display: grid;
  gap: 12px;
}

.modal-product-image,
.modal-image-placeholder {
  width: 100%;
  border-radius: 20px;
  background: linear-gradient(180deg, #f7f0e8, #fff);
}

.modal-product-image {
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.modal-image-placeholder {
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  color: var(--text-dim);
}

.modal-image-placeholder.product-illustration-card {
  aspect-ratio: 1 / 1;
  grid-template-rows: minmax(0, 1fr) auto;
  padding: 14px;
  gap: 10px;
}

.product-illustration-modal .product-illustration-stage {
  border-radius: 18px;
}

.product-illustration-modal .product-illustration-graphic {
  width: 78%;
  max-width: 190px;
}

.product-illustration-modal .product-illustration-code {
  top: 10px;
  left: 10px;
  padding: 4px 9px;
  font-size: 0.72rem;
}

.product-illustration-modal .product-illustration-footer strong {
  font-size: 1rem;
}

.product-illustration-modal .product-illustration-footer span {
  font-size: 0.78rem;
}

.product-illustration-modal .product-illustration-footer {
  padding: 10px 12px;
  border-radius: 14px;
}

.modal-link {
  text-decoration: none;
}

.modal-image-note {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 138, 29, 0.08);
  border: 1px solid rgba(255, 138, 29, 0.14);
  color: #f6c48e;
  font-size: 0.78rem;
  line-height: 1.45;
}

.modal-info h2,
.detail-section h3,
.detail-grid h3 {
  margin: 0;
}

.modal-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.modal-highlight-card {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.modal-highlight-card span {
  display: block;
  color: var(--text-soft);
  font-size: 0.8rem;
  margin-bottom: 8px;
}

.modal-highlight-card strong {
  display: block;
  font-size: 1.38rem;
  line-height: 1.05;
}

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

.detail-grid-summary {
  gap: 16px;
}

.detail-section > p {
  max-width: 68ch;
}

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

.detail-panel {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.detail-facts {
  display: grid;
  gap: 4px;
}

.detail-fact-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.detail-fact-row:first-child {
  padding-top: 0;
}

.detail-fact-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.detail-fact-row span {
  color: var(--text-soft);
  font-size: 0.84rem;
}

.detail-fact-row strong {
  color: #f2f6fb;
  font-size: 0.92rem;
  font-weight: 700;
  text-align: right;
}

.detail-kpi {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.detail-kpi span {
  color: var(--text-soft);
  font-size: 0.84rem;
}

.detail-kpi strong {
  display: block;
  margin-top: 8px;
  font-size: 1.18rem;
}

.detail-list {
  margin: 0;
  padding-left: 18px;
  line-height: 1.7;
}

@media (max-width: 1240px) {
  .page-header {
    align-items: flex-start;
  }

  .page-header h1 {
    font-size: 2.15rem;
  }

  .header-actions {
    gap: 10px;
  }

  .brand-feature-list,
  .upload-hero-grid,
  .pipeline-status,
  .results-command-bar,
  .dashboard-overview-grid,
  .reports-grid,
  .dashboard-columns,
  .settings-columns,
  .config-grid,
  .filters-grid,
  .detail-grid-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .upload-layout {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.92fr);
  }

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

  .summary-card {
    min-height: 126px;
  }

  .results-command-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .filter-toggle {
    justify-items: start;
  }
}

@media (max-width: 980px) {
  .login-layout,
  .brand-feature-list,
  .upload-hero-grid,
  .pipeline-status,
  .modal-highlight-bar,
  .results-command-bar,
  .summary-cards,
  .dashboard-overview-grid,
  .reports-grid,
  .dashboard-columns,
  .settings-columns,
  .upload-layout,
  .config-grid,
  .filters-grid,
  .detail-grid,
  .detail-grid-kpis,
  .modal-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-app {
    grid-template-columns: 1fr;
  }

  .login-screen {
    padding: 14px;
  }

  .brand-stage {
    padding: 16px;
  }

  .brand-stage-media {
    min-height: 180px;
    justify-content: center;
  }

  .brand-logo-full {
    width: min(100%, 320px);
  }

  .brand-copy h1,
  .upload-hero-copy h2 {
    font-size: 1.9rem;
  }

  .dashboard-app.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 70;
    width: min(82vw, 280px);
    transform: translateX(-100%);
    transition: transform 180ms ease;
  }

  .dashboard-app.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .dashboard-app.sidebar-collapsed .sidebar-label,
  .dashboard-app.sidebar-collapsed .nav-item span:last-child,
  .dashboard-app.sidebar-collapsed .sidebar-user > div,
  .dashboard-app.sidebar-collapsed .sidebar-logout span:last-child {
    display: initial;
  }

  .dashboard-app.sidebar-collapsed .sidebar-logo {
    width: 176px;
  }

  .dashboard-app.sidebar-collapsed .nav-item,
  .dashboard-app.sidebar-collapsed .sidebar-logout,
  .dashboard-app.sidebar-collapsed .sidebar-user {
    justify-content: initial;
    padding-inline: 16px;
  }

  .content {
    padding: 14px;
  }

  .mobile-topbar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
  }

  .mobile-menu-button {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
  }

  .header-actions,
  .button-row,
  .template-downloads,
  .filters-actions,
  .table-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .insight-banner {
    grid-template-columns: 1fr;
  }

  .upload-hero,
  .upload-form,
  .preview-card {
    padding: 16px;
  }

  .dropzone {
    min-height: 132px;
    padding: 18px 16px;
  }

  .content::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.36);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
  }

  .dashboard-app.sidebar-open .content::before {
    opacity: 1;
    pointer-events: auto;
  }
}
