:root {
  --bg: #f5f5f5;
  --bg-accent: #eaeaea;
  --card: rgba(255, 255, 255, 0.9);
  --card-strong: rgba(255, 255, 255, 0.98);
  --text: #414140;
  --muted: #777c7c;
  --line: rgba(65, 64, 64, 0.12);
  --line-strong: rgba(65, 64, 64, 0.25);
  --primary: #585c5c;
  --primary-dark: #414140;
  --secondary: #8a8f8f;
  --ok: #1f8f4e;
  --bad: #b13434;
  --warn: #8a6d12;
  --info-bg: #ececec;
  --info-line: rgba(65, 64, 64, 0.16);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 10px 18px -12px rgba(0, 0, 0, 0.18);
  --shadow-lg: 0 20px 35px -18px rgba(0, 0, 0, 0.18);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-full: 9999px;
}

/* ==================== MEDIFE CRM POLISH ==================== */
:root {
  --panel: rgba(255, 255, 255, 0.98);
  --text-secondary: #585c5c;
  --primary-light: #7a7e7e;
  --primary-gradient: linear-gradient(135deg, #585c5c 0%, #7a7e7e 50%, #414140 100%);
  --medife-orange: #e35205;
  --medife-orange-2: #f5a623;
  --orange-soft: rgba(227, 82, 5, 0.08);
  --success: #22c55e;
  --success-light: #dcfce7;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --shadow-md: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
  --shadow-xl: 0 25px 50px -12px rgba(0,0,0,.12);
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

.app-shell {
  width: min(1600px, calc(100% - 48px));
}

.topbar {
  margin: 0 -8px 24px;
  padding: 18px 28px;
  border: 1px solid rgba(65, 64, 64, 0.1);
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,.74);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 16px 36px -26px rgba(0,0,0,.24),
    0 0 0 1px rgba(255,255,255,.55) inset;
}

.brand-logo {
  width: auto;
  height: 38px;
  object-fit: contain;
}

.topbar h1 {
  font-weight: 750;
  color: var(--text);
}

.topbar-subtitle {
  color: var(--text-secondary);
  font-weight: 500;
}

.panel-card,
.card {
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(255,255,255,.62);
  box-shadow:
    var(--shadow-lg),
    0 0 0 1px rgba(255,255,255,.52) inset;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  animation: slideUpFade .45s ease-out;
}

.panel-card:hover,
.card:hover {
  border-color: rgba(65,64,64,.2);
  box-shadow:
    0 25px 50px -22px rgba(0,0,0,.18),
    0 0 48px rgba(227,82,5,.035),
    0 0 0 1px rgba(255,255,255,.64) inset;
}

.panel-card::before,
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(65,64,64,.03), transparent 52%, rgba(227,82,5,.025));
  pointer-events: none;
}

.panel-card::after,
.card::after {
  background: linear-gradient(90deg, #414140 0%, #585c5c 42%, var(--medife-orange) 100%);
  box-shadow: 0 0 16px rgba(227,82,5,.18);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .7rem;
  font-weight: 800;
  color: var(--text-secondary);
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--medife-orange);
  box-shadow: 0 0 10px rgba(227,82,5,.55);
}

button,
.link-btn {
  background: var(--primary-gradient);
  border-radius: 14px;
  box-shadow: 0 16px 28px -18px rgba(65,64,64,.62);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast);
}

button:hover,
.link-btn:hover {
  filter: brightness(.96);
  box-shadow: 0 20px 32px -18px rgba(65,64,64,.72);
}

.ghost-btn {
  background: rgba(255,255,255,.86);
  border-color: rgba(65,64,64,.14);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.ghost-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

input[type="text"],
input[type="file"],
input[type="number"],
select,
textarea.bulk-input {
  border-color: rgba(65,64,64,.14);
  background: rgba(255,255,255,.94);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

input[type="text"]:focus,
input[type="file"]:focus,
input[type="number"]:focus,
select:focus,
textarea.bulk-input:focus {
  outline: none;
  border-color: rgba(227,82,5,.42);
  box-shadow: 0 0 0 4px rgba(227,82,5,.08);
}

.status-chip {
  box-shadow: 0 0 0 1px rgba(255,255,255,.45) inset;
}

.status-ok { background: var(--success-light); color: #15803d; }
.status-warn { background: var(--warning-light); color: #92400e; }
.status-critical { background: var(--danger-light); color: #b91c1c; }

.compact-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.compact-kpi {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255,255,255,.72);
}

.compact-kpi small {
  display: block;
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 6px;
}

.flash {
  animation: slideIn .3s ease-out;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
}

.flash-ok {
  background: var(--success-light);
  border-color: rgba(34,197,94,.25);
}

.flash-error {
  background: var(--danger-light);
  border-color: rgba(239,68,68,.25);
}

@keyframes slideUpFade {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes subtlePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(227,82,5,.18); }
  50% { box-shadow: 0 0 0 8px rgba(227,82,5,0); }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", Tahoma, sans-serif;
  background: var(--bg);
  background-image:
    radial-gradient(circle at 0% 0%, rgba(88, 92, 92, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 100% 0%, rgba(88, 92, 92, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(88, 92, 92, 0.05) 0%, transparent 40%);
  background-attachment: fixed;
  color: var(--text);
}

.container {
  max-width: 860px;
  margin: 32px auto;
  padding: 0 16px 40px;
}

.app-shell {
  width: min(1440px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.app-shell--narrow {
  width: min(1080px, calc(100% - 48px));
}

.container.wide {
  max-width: 1160px;
}

h1, h2, h3 {
  margin: 0 0 10px;
}

.muted {
  color: var(--muted);
}

.muted.compact {
  margin: 8px 0 0;
  font-size: 13px;
}

.card {
  background: var(--card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-top: 16px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.45) inset;
  position: relative;
  overflow: hidden;
}

.soft-card {
  background: rgba(255, 255, 255, 0.72);
}

.panel-card {
  background: var(--card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.45) inset;
  position: relative;
  overflow: hidden;
}

.panel-card::after,
.card::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #414140 0%, #585c5c 50%, #414140 100%);
}

.inner-panel {
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

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

.section-head.compact-top {
  margin-bottom: 16px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.stat-card {
  min-height: 180px;
}

.big-copy {
  font-size: 28px;
  font-weight: 800;
  margin: 10px 0 8px;
}

.tool-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tool-card-primary {
  border-color: rgba(65, 64, 64, 0.18);
  box-shadow: 0 24px 36px -22px rgba(65, 64, 64, 0.35);
}

label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--text);
}

input[type="text"],
input[type="file"],
input[type="number"],
select {
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  border: 1px solid rgba(65, 64, 64, 0.14);
  border-radius: 14px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
}

input[type="radio"] {
  margin: 0;
}

textarea.bulk-input {
  width: 100%;
  min-height: 170px;
  margin-top: 6px;
  padding: 14px;
  border: 1px solid rgba(65, 64, 64, 0.14);
  border-radius: 16px;
  font-size: 13px;
  font-family: "Consolas", "Liberation Mono", monospace;
  resize: vertical;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
}

textarea.bulk-input.compact-area {
  min-height: 110px;
}

button,
.link-btn {
  background: var(--primary);
  color: #fff;
  border: 0;
  border-radius: 14px;
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 16px 28px -18px rgba(65, 64, 64, 0.55);
  transition: transform 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

button:hover,
.link-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

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

button.secondary,
.secondary-link {
  background: var(--secondary);
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(65, 64, 64, 0.14);
  background: rgba(255, 255, 255, 0.84);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.96);
}

.ghost-btn--light {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.26);
  color: #fff;
}

.ghost-btn--light:hover {
  background: rgba(255, 255, 255, 0.18);
}

.alert {
  border-radius: 14px;
  padding: 12px 14px;
  margin: 10px 0;
}

.alert-error {
  background: #ffe9e9;
  border: 1px solid #f3c3c3;
  color: #8b1f1f;
}

.alert-info {
  background: var(--info-bg);
  border: 1px solid var(--info-line);
  color: #1f4f70;
}

.alert-warn {
  background: #fff6df;
  border: 1px solid #f1df9a;
  color: #785600;
}

.ok {
  color: var(--ok);
}

.bad {
  color: var(--bad);
}

.warn {
  color: var(--warn);
  font-weight: 700;
}

.hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #5e6363;
  font-weight: 600;
}

.hint.inline {
  display: inline;
  margin-left: 8px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 20px 28px;
  margin-bottom: 24px;
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  position: sticky;
  top: 18px;
  z-index: 50;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.brand-logo {
  width: 180px;
  height: 44px;
  flex-shrink: 0;
}

.topbar h1 {
  margin: 0;
  font-size: clamp(1.5rem, 2vw, 2.2rem);
  letter-spacing: -0.02em;
}

.topbar-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  max-width: 760px;
}

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

.flash {
  margin: -8px 0 20px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid transparent;
}

.flash-ok {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.18);
  color: #166534;
}

.flash-error {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.18);
  color: #991b1b;
}

.command-center {
  display: grid;
  gap: 24px;
  margin-bottom: 28px;
}

.command-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: 34px;
  background: linear-gradient(135deg, #414140 0%, #585c5c 55%, #2d2f2f 100%);
  color: #fff;
  box-shadow: 0 25px 40px -24px rgba(65, 64, 64, 0.55);
}

.command-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 15% 35%, rgba(255, 255, 255, 0.12) 0%, transparent 40%), radial-gradient(circle at 90% 85%, rgba(255, 255, 255, 0.08) 0%, transparent 36%);
  pointer-events: none;
}

.command-hero h2,
.command-hero p,
.command-hero .eyebrow {
  position: relative;
  color: #fff;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary-dark);
}

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

.form-card,
.decision-grid,
.assistant-input-grid {
  margin-top: 20px;
}

.grid-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
}

.grid-form .check-row {
  grid-column: span 2;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.grid-form .span-2 {
  grid-column: span 2;
}

.grid-form.two-third-grid {
  grid-template-columns: repeat(2, minmax(220px, 320px));
}

.grid-form .check-row input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.actions-row {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.actions-row.small-gap {
  gap: 8px;
}

.inline-form-block {
  margin-top: 12px;
}

.top-gap {
  margin-top: 12px;
}

.simple-list {
  margin: 8px 0 0;
  padding-left: 18px;
}

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

.inline-alert {
  border-radius: 8px;
  padding: 10px 12px;
  border: 1px solid transparent;
}

.inline-alert-error {
  background: #ffe9e9;
  border-color: #f3c3c3;
  color: #8b1f1f;
}

.inline-alert-warn {
  background: #fff6df;
  border-color: #f1df9a;
  color: #785600;
}

.radio-stack {
  display: grid;
  gap: 6px;
}

.radio-stack label {
  margin: 0;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.alpha-compare-table input[type="text"] {
  min-width: 220px;
}

.cmp-row.cmp-diff {
  background: #fff8ea;
}

.cmp-row.cmp-blank {
  background: #f7f9fc;
}

.cmp-row-emphasis {
  outline: 2px solid rgba(88, 92, 92, 0.16);
  outline-offset: -2px;
}

.critical-spotlight {
  margin-top: 0;
}

.spotlight-stack {
  display: grid;
  gap: 20px;
}

.spotlight-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.spotlight-title-row h3 {
  margin: 0;
}

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

.spotlight-block {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(65, 64, 64, 0.1);
  border-radius: 16px;
  padding: 16px;
}

.spotlight-block-warn {
  background: #fff6df;
  border-color: #f1df9a;
}

.spotlight-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.spotlight-value {
  display: block;
  font-size: 24px;
  line-height: 1.15;
  color: var(--text);
}

.spotlight-value-small {
  font-size: 18px;
}

.pdf-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pdf-mode-group {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(65, 64, 64, 0.12);
  border-radius: 14px;
  padding: 8px 10px;
  min-width: 300px;
}

.pdf-mode-title {
  display: block;
  font-weight: 700;
  color: #2d3b55;
  margin-bottom: 4px;
}

.pdf-mode-option {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 600;
  margin: 4px 0 0;
}

.pdf-mode-option input {
  margin: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 14px;
  overflow: hidden;
}

th,
td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 10px 8px;
}

th {
  background: rgba(88, 92, 92, 0.08);
  color: var(--text);
  font-weight: 700;
}

.table-wrap {
  overflow-x: auto;
}

.compare-table {
  min-width: 860px;
}

.cmp-row td {
  vertical-align: top;
}

.cmp-row.cmp-mismatch,
.cmp-row.cmp-critical-mismatch {
  background: #fff8ea;
}

.cmp-row.cmp-critical-mismatch {
  background: #ffeaea;
}

.cmp-row.cmp-missing-manual {
  background: #fff1f1;
}

.cell-diff {
  font-weight: 700;
  color: #8a4f00;
}

.status-chip {
  display: inline-block;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

.status-ok {
  background: #e8f7ed;
  color: #196a3b;
}

.status-warn {
  background: #fff4d9;
  color: #805900;
}

.status-critical {
  background: #ffe7e7;
  color: #9f1f1f;
}

.status-neutral {
  background: #eef2fa;
  color: #3e4f72;
}

/* Wizard Styles */
.wizard-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--line);
  padding-bottom: 0;
}

.wizard-tab {
  padding: 10px 16px;
  border: none;
  background: none;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.wizard-tab:hover {
  color: var(--primary);
  background: none;
}

.wizard-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: none;
}

.wizard-tab.completed {
  color: var(--ok);
}

.wizard-tab .tab-check {
  font-size: 14px;
}

.wizard-step {
  display: none;
}

.wizard-step.active {
  display: block;
}

/* Plan tabs (like Excel sheets) */
.plan-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 12px;
  background: #e8ecf3;
  padding: 6px;
  border-radius: 8px;
}

.plan-tab {
  padding: 8px 16px;
  border: none;
  background: none;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.plan-tab:hover {
  background: rgba(255,255,255,0.5);
  color: var(--text);
}

.plan-tab.active {
  background: var(--card);
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.plan-tab .badge {
  background: var(--line);
  color: var(--muted);
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 11px;
}

.plan-tab.active .badge {
  background: var(--primary);
  color: #fff;
}

/* Excel-like table */
.excel-table {
  font-family: "Segoe UI", Tahoma, sans-serif;
  font-size: 13px;
  border: 1px solid #c7cfde;
  border-radius: 4px;
  overflow: hidden;
}

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

.excel-table th {
  background: #f2f4f7;
  border: 1px solid #c7cfde;
  padding: 6px 8px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.excel-table td {
  border: 1px solid #e0e4ec;
  padding: 4px 8px;
  white-space: nowrap;
}

.excel-table tr:nth-child(even) {
  background: #fafbfc;
}

.excel-table tr:hover {
  background: #f0f5ff;
}

.excel-table input[type="text"] {
  width: 100%;
  border: none;
  padding: 2px 4px;
  margin: 0;
  font-size: 13px;
  background: transparent;
}

.excel-table input[type="text"]:focus {
  outline: 2px solid var(--primary);
  background: #fff;
}

.excel-table .total-row {
  background: #fff8ea !important;
  font-weight: 700;
}

/* Discount/Bonus cards */
.decision-card {
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
}

.decision-card.recommended {
  border-color: var(--ok);
  background: #f8fdf9;
}

.decision-card.warning {
  border-color: var(--warn);
  background: #fffdf5;
}

.decision-card .plan-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.decision-card .metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.decision-card .metric {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(65, 64, 64, 0.08);
  padding: 10px 12px;
  border-radius: 12px;
}

.decision-card .metric-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 2px;
}

.decision-card .metric-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.decision-card .input-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.decision-card .input-group input[type="number"] {
  width: 80px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.decision-card .input-group .unit {
  font-weight: 600;
  color: var(--muted);
}

/* Copy-paste row */
.copy-row-box {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(65, 64, 64, 0.14);
  border-radius: 16px;
  padding: 14px;
  font-family: "Consolas", "Liberation Mono", monospace;
  font-size: 13px;
  overflow-x: auto;
  white-space: pre-wrap;
  margin: 12px 0;
}

/* Summary preview */
.preview-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.preview-card {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(65, 64, 64, 0.12);
  border-radius: 16px;
  padding: 14px;
}

.preview-card .preview-plan {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
}

.preview-card .preview-line {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
}

.preview-card .preview-line:last-child {
  border-bottom: none;
}

.preview-card .preview-label {
  color: var(--muted);
}

.preview-card .preview-value {
  font-weight: 600;
}

/* Discrepancy list */
.discrepancy-item {
  background: #fff8ea;
  border: 1px solid #f1df9a;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
}

.discrepancy-item .discrepancy-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.discrepancy-item .discrepancy-detail {
  font-size: 13px;
  color: var(--muted);
}

/* Recommendation badge */
.rec-badge {
  display: inline-block;
  background: var(--ok);
  color: #fff;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  margin-left: 6px;
}

/* Warning badge */
.warn-badge {
  display: inline-block;
  background: var(--warn);
  color: #fff;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  margin-left: 6px;
}

@media (max-width: 760px) {
  .grid-form {
    grid-template-columns: 1fr;
  }

  .grid-form .check-row {
    grid-column: span 1;
    align-items: flex-start;
  }

   .grid-form .span-2 {
    grid-column: span 1;
  }

  .actions-row {
    flex-direction: column;
  }

  .section-head {
    flex-direction: column;
  }

  .wizard-tabs {
    flex-wrap: wrap;
  }

  .plan-tabs {
    flex-wrap: wrap;
  }

  .decision-card .metrics {
    grid-template-columns: 1fr 1fr;
  }

  .spotlight-grid {
    grid-template-columns: 1fr;
  }
}

/* Step indicator */
.step-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 24px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(65, 64, 64, 0.12);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.step-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--muted);
  font-size: 14px;
}

.step-item.step-active {
  color: var(--primary-dark);
}

.step-item.step-completed {
  color: var(--ok);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-accent);
  font-size: 13px;
  font-weight: 800;
}

.step-active .step-number {
  background: var(--primary-dark);
  color: #fff;
}

.step-completed .step-number {
  background: var(--ok);
  color: #fff;
}

.step-connector {
  flex: 1;
  height: 2px;
  background: var(--line);
  border-radius: 1px;
  max-width: 60px;
}

/* Guide steps */
.guide-steps {
  display: grid;
  gap: 14px;
}

.guide-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(65, 64, 64, 0.1);
  border-radius: 14px;
}

.guide-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-dark);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  flex-shrink: 0;
}

/* Radio pills */
.radio-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(65, 64, 64, 0.16);
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: all 150ms ease;
}

.radio-pill:hover {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(65, 64, 64, 0.3);
}

.radio-pill input {
  margin: 0;
}

.radio-pill--active {
  background: var(--primary-dark);
  color: #fff;
  border-color: var(--primary-dark);
  box-shadow: 0 4px 12px -4px rgba(65, 64, 64, 0.35);
}

.radio-pill--active:hover {
  background: var(--primary-dark);
}

/* Critical row in comparison table */
.cmp-row-critical {
  background: #ffeaea !important;
  outline: 2px solid var(--bad);
  outline-offset: -2px;
}

.cmp-row-critical td:first-child {
  border-left: 4px solid var(--bad);
}

.manual-input {
  min-width: 200px;
}

.compact-grid {
  grid-template-columns: 1fr;
}

.decision-card--assistant {
  margin-top: 0;
}

@media (max-width: 980px) {
  .topbar {
    position: static;
    flex-direction: column;
    align-items: flex-start;
  }

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

  .step-indicator {
    flex-wrap: wrap;
    gap: 8px;
  }

  .step-connector {
    display: none;
  }
}

.version-banner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: -8px 0 18px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.version-banner-v1 {
  background: #f3f4f5;
  color: #585c5c;
  border: 1px solid rgba(65, 64, 64, 0.12);
}
.version-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  vertical-align: middle;
  margin-left: 4px;
}
.version-pill-v1 {
  background: #eaeaea;
  color: #585c5c;
  border: 1px solid rgba(65, 64, 64, 0.12);
}
