/* ============================================
   AMZKIT PROMOTION STACK CALCULATOR — STYLES
   Light theme, consistent with Amzkit design system
   ============================================ */

/* ── Variables ── */
:root {
  /* Palette */
  --color-primary:     #165DFF;
  --color-primary-hover: #0E42D2;
  --color-primary-light: #EBF0FF;
  --color-success:     #16A34A;
  --color-success-bg:  #F0FDF4;
  --color-warning:     #D97706;
  --color-warning-bg: #FFFBEB;
  --color-danger:      #DC2626;
  --color-danger-bg:   #FEF2F2;

  /* Surfaces */
  --color-bg:        #F4F6FA;
  --color-surface:   #FFFFFF;
  --color-surface-2:  #F8FAFC;
  --color-border:    #E2E8F0;

  /* Text */
  --color-text:        #1A202C;
  --color-text-secondary: #5C6B7A;
  --color-text-muted:  #9AA6AF;

  /* Aliases for existing class selectors */
  --bg:           var(--color-bg);
  --card-bg:      var(--color-surface);
  --card-bg-alt:  var(--color-surface-2);
  --border:       var(--color-border);
  --surface:      var(--color-surface);
  --surface-hover: var(--color-surface-2);
  --primary:      var(--color-primary);
  --primary-hover: var(--color-primary-hover);
  --primary-light: var(--color-primary-light);
  --success:      var(--color-success);
  --warning:      var(--color-warning);
  --danger:       var(--color-danger);
  --danger-bg:    var(--color-danger-bg);
  --danger-border: rgba(220, 38, 38, 0.25);
  --text:         var(--color-text);
  --text-secondary: var(--color-text-secondary);
  --text-muted:   var(--color-text-muted);

  /* Typography & Layout */
  --font:       'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC', sans-serif;
  --font-mono:   'JetBrains Mono', 'Fira Code', monospace;
  --nav-height:  64px;
  --container-px: 24px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --transition: 150ms ease;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.10), 0 4px 12px rgba(0,0,0,0.06);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Selection ── */
::selection { background: var(--primary-light); color: var(--primary); }

/* ── Focus ── */
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 3px; }

/* ── Utility ── */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--container-px); }
.desktop-br { display: none; }

/* ══════════════════════════════════════════════
   NAVIGATION
══════════════════════════════════════════════ */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.nav-container {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--container-px);
}
.nav-logo { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.logo-img {
  height: 64px;
  width: auto;
  flex-shrink: 0;
}

.logo-text {
  display: none;
}
.nav-links {
  display: flex; align-items: center; gap: 8px;
}
.nav-link {
  font-size: 15px; font-weight: 500; color: var(--text-secondary);
  padding: 6px 12px; border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.nav-link:hover { color: var(--text); background: var(--color-surface-2); }
.nav-cta { margin-left: 8px; }

/* Hamburger */
.hamburger {
  display: none; flex-direction: column; justify-content: center;
  gap: 5px; width: 36px; height: 36px; padding: 6px;
  border-radius: var(--radius-sm); transition: background var(--transition);
}
.hamburger:hover { background: var(--color-surface-2); }
.hamburger-line {
  display: block; width: 20px; height: 1.5px;
  background: var(--text); border-radius: 2px;
  transition: transform 250ms ease, opacity 250ms ease; transform-origin: center;
}
.hamburger.is-active .hamburger-line:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.is-active .hamburger-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.is-active .hamburger-line:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ══════════════════════════════════════════════
   PAGE HEADER
══════════════════════════════════════════════ */
.page-header {
  padding-top: calc(var(--nav-height) + 48px);
  padding-bottom: 40px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.page-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
}

.breadcrumb-link {
  font-size: 13px;
  color: var(--text-muted);
  transition: color var(--transition);
}

.breadcrumb-link:hover {
  color: var(--color-primary);
}

.breadcrumb-sep {
  font-size: 13px;
  color: var(--color-border);
}

.breadcrumb-current {
  font-size: 13px;
  color: var(--text-muted);
}

.page-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(24px, 3.5vw, 32px);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.6px;
  margin-bottom: 10px;
  line-height: 1.2;
}

.page-sub {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ══════════════════════════════════════════════
   MAIN LAYOUT
══════════════════════════════════════════════ */
.main-content {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 16px;
  padding-top: 20px;
  padding-bottom: 40px;
  align-items: start;
}

/* ══════════════════════════════════════════════
   INPUT PANEL
══════════════════════════════════════════════ */
.input-panel {
  display: flex; flex-direction: column; gap: 16px;
}

/* ── Input Block (collapsible) ── */
.input-block {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.input-block__toggle {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 12px 20px;
  font-size: 14px; font-weight: 600; color: var(--text);
  background: transparent; transition: background var(--transition);
  text-align: left;
}
.input-block__toggle:hover { background: var(--color-surface-2); }
.input-block__icon { color: var(--primary); flex-shrink: 0; }
.input-block__chevron { margin-left: auto; color: var(--text-muted); transition: transform 200ms ease; flex-shrink: 0; }
.input-block__toggle[aria-expanded="false"] .input-block__chevron { transform: rotate(-90deg); }

.input-block__fields {
  padding: 0 20px 14px;
  display: flex; flex-direction: column; gap: 2px;
}
.input-block__fields[hidden] { display: none; }

/* ── Field Row ── */
.field-row {
  display: grid; grid-template-columns: 1fr auto; gap: 8px;
  align-items: center; padding: 3px 0;
  border-bottom: 1px solid transparent;
}
.field-row:last-child { border-bottom: none; }
.field-row--required .field-label::after {
  content: ' *'; color: var(--danger); font-size: 12px;
}

.field-label {
  font-size: 14px; color: var(--text-secondary); font-weight: 500;
  white-space: nowrap;
}
.field-input-wrap {
  display: flex; align-items: center;
  background: var(--color-surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.field-input-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22, 93, 255, 0.12);
}
.field-row.has-error .field-input-wrap {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.10);
}
.field-prefix {
  padding: 0 8px 0 10px; font-size: 14px; color: var(--text-muted);
  font-family: var(--font-mono); flex-shrink: 0; user-select: none;
}
.field-suffix {
  padding: 0 10px 0 6px; font-size: 14px; color: var(--text-muted);
  flex-shrink: 0; user-select: none;
}
.field-input {
  width: 100%; min-width: 0;
  background: transparent; border: none; outline: none;
  font-size: 14px; color: var(--text);
  font-family: var(--font-mono); font-weight: 500;
  padding: 6px 10px 6px 0;
}
.field-input::placeholder { color: var(--text-muted); }
.field-input--amount { min-width: 100px; }
.field-input--select {
  -webkit-appearance: none; appearance: none;
  cursor: pointer; padding-right: 28px;
}
.field-select-arrow {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); pointer-events: none; flex-shrink: 0;
}

.field-input-wrap { position: relative; }
.field-error {
  grid-column: 1 / -1;
  font-size: 12px; color: var(--danger);
  min-height: 16px; padding-left: 2px;
}

/* ── Exclusive group hint ── */
.exclusive-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin: 2px 0 0;
  padding: 5px 0;
  border-top: 1px dashed var(--border);
}

/* ── Disabled state for exclusive fields ── */
.field-row.is-disabled .field-input-wrap {
  opacity: 0.45;
  pointer-events: none;
}
.field-row.is-disabled .field-label {
  color: var(--text-muted);
}

/* ── Toggle Switch ── */
.field-row--toggle { grid-template-columns: 1fr auto; }
.toggle-switch {
  position: relative; width: 44px; height: 24px;
  background: var(--color-surface-2); border: 1px solid var(--border);
  border-radius: 12px; cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
  flex-shrink: 0;
}
.toggle-switch[aria-checked="true"] {
  background: var(--primary); border-color: var(--primary);
}
.toggle-switch__thumb {
  position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px;
  background: #fff; border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.toggle-switch[aria-checked="true"] .toggle-switch__thumb { transform: translateX(20px); }

/* ── Batch Section ── */
.batch-section {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.batch-section__header {
  padding: 10px 20px; border-bottom: 1px solid var(--border);
  background: var(--color-surface-2);
}
.batch-section__title { font-size: 13px; font-weight: 600; color: var(--text); }
.batch-section__body { padding: 12px 20px; }
.batch-section__desc {
  font-size: 12px; color: var(--text-secondary); line-height: 1.6;
  margin-bottom: 10px;
}
.batch-section__actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* 结果栏 */
.batch-result-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px; padding: 10px 14px;
  background: var(--color-surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13px; gap: 12px;
}
.batch-result-bar__text { color: var(--text-secondary); }

/* 预览表格 */
.batch-table-wrap {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: auto;
  max-height: 360px;
}
.batch-table {
  width: 100%; border-collapse: collapse;
  font-size: 12px;
}
.batch-table th {
  position: sticky; top: 0; z-index: 1;
  background: var(--color-surface-2);
  color: var(--text-secondary);
  font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em;
  padding: 8px 12px; text-align: left; white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
.batch-table td {
  padding: 7px 12px; border-bottom: 1px solid var(--border);
  color: var(--text); white-space: nowrap;
  max-width: 180px; overflow: hidden; text-overflow: ellipsis;
}
.batch-table tbody tr:last-child td { border-bottom: none; }
.batch-table tbody tr:hover td { background: var(--color-surface-2); }
.batch-table__row--warn td { background: #fff8f8; }

/* 预警徽章 */
.batch-badge {
  display: inline-block; padding: 2px 8px; border-radius: 99px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
}
.batch-badge--warn  { background: #FFF2F0; color: #E55454; }
.batch-badge--error { background: #FFF2F0; color: #CC0000; }
.batch-badge--ok    { background: #F0FFF0; color: #27AE60; }

/* 预警/错误行 */
.batch-table__row--warn  td { background: #fff8f8; }
.batch-table__row--error td { background: #fff0f0; }

/* ══════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: var(--font); font-size: 14px; font-weight: 600;
  line-height: 1; padding: 10px 20px;
  border-radius: var(--radius-md); border: none;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition),
              color var(--transition), box-shadow var(--transition),
              transform 80ms ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--primary); color: #fff;
  box-shadow: 0 2px 8px rgba(22, 93, 255, 0.25);
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(22, 93, 255, 0.35);
}
.btn-ghost {
  background: transparent; color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-ghost:hover { background: var(--primary-light); }
.btn-sm { font-size: 13px; padding: 8px 14px; }

/* Disabled button style */
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* ══════════════════════════════════════════════
   RESULT PANEL
══════════════════════════════════════════════ */
.result-panel {
  position: sticky; top: calc(var(--nav-height) + 24px);
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  display: flex; flex-direction: column;
  min-height: 480px;
  box-shadow: var(--shadow-md);
}

/* ── Alert Banner ── */
.alert-banner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: var(--danger-bg); border-bottom: 1px solid var(--danger-border);
}
.alert-banner[hidden] { display: none; }
.alert-banner__content { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.alert-banner__icon { color: var(--danger); flex-shrink: 0; }
.alert-banner__text { font-size: 13px; font-weight: 500; color: var(--danger); }
.alert-banner__close {
  color: var(--danger); opacity: 0.7; flex-shrink: 0;
  padding: 2px; border-radius: 4px;
  transition: opacity var(--transition), background var(--transition);
}
.alert-banner__close:hover { opacity: 1; background: rgba(220, 38, 38, 0.1); }

/* ── Empty State ── */
.result-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px 24px; gap: 14px; text-align: center;
}
.result-empty[hidden] { display: none; }

/* ── Result Content ── */
.result-content { padding: 14px 18px; }
.result-main { text-align: center; margin-bottom: 14px; }
.result-main__label {
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px;
}
.result-main__price {
  font-family: var(--font-mono); font-size: 42px; font-weight: 600;
  color: var(--primary); letter-spacing: -1px; line-height: 1;
  margin-bottom: 12px;
}
.result-main__meta {
  display: flex; align-items: center; justify-content: center; gap: 12px;
}
.result-meta__item { display: flex; align-items: center; gap: 5px; }
.result-meta__label { font-size: 12px; color: var(--text-muted); }
.result-meta__value { font-family: var(--font-mono); font-size: 13px; font-weight: 500; color: var(--text); }
.result-meta__sep { color: var(--border); }

/* ── Calculation Path ── */
.result-path { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 4px; }
.result-path__header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.result-path__title { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.result-path__toggle {
  color: var(--text-muted); padding: 4px; border-radius: 4px;
  transition: color var(--transition), background var(--transition);
}
.result-path__toggle:hover { color: var(--text); background: var(--color-surface-2); }
.result-path__toggle svg { transition: transform 200ms ease; }
.result-path__toggle[aria-expanded="false"] svg { transform: rotate(-90deg); }
.result-path__list {
  display: flex; flex-direction: column; gap: 4px;
  list-style: none; font-size: 12px;
}
.result-path__list[hidden] { display: none; }
.result-path__step {
  display: flex; align-items: flex-start; gap: 6px; color: var(--text-secondary);
  line-height: 1.4;
}
.result-path__step--group {
  flex-direction: column; gap: 2px;
}
.result-path__step-header {
  display: flex; align-items: center; gap: 8px; width: 100%;
}
.result-path__step-body { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.result-path__step-main { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.result-path__step-formula-row {
  display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap;
}
.result-path__step-num {
  flex-shrink: 0; width: 20px; height: 20px;
  background: var(--color-surface-2); border-radius: 50%;
  font-size: 11px; font-weight: 600; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
}
.result-path__step-label {
  font-weight: 500; color: var(--text); font-size: 12px; flex-shrink: 0;
}
.result-path__step-note {
  font-size: 10px; color: var(--text-muted); flex-shrink: 0;
}
.result-path__formula {
  font-family: var(--font-mono); font-size: 11px; color: var(--text);
  background: var(--color-surface-2); padding: 1px 5px;
  border-radius: 4px; line-height: 1.5;
}
.result-path__step-value {
  font-family: var(--font-mono); font-weight: 500; color: var(--text);
  font-size: 11px; flex-shrink: 0;
}
.result-path__step-subnote {
  font-size: 10px; color: var(--text-muted); padding-left: 2px; margin-top: 2px;
}
.result-path__substeps {
  list-style: none; padding-left: 28px;
  display: flex; flex-direction: column; gap: 3px;
}
.result-path__substep {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
}
.result-path__substep--header {
  font-size: 12px; font-weight: 600; color: var(--text);
}
.result-path__substep-header-label {
  font-size: 12px; font-weight: 600; color: var(--text); flex-shrink: 0;
}

/* ── Contributions ── */
.result-contributions {
  border-top: 1px solid var(--border); padding-top: 12px; margin-top: 10px;
}
.result-contributions__header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px;
}
.result-contributions__title { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.result-contributions__list { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.result-contributions__list[hidden] { display: none; }
.contrib-item {
  display: flex; align-items: flex-start; flex-wrap: wrap;
  gap: 6px;
  font-size: 12px; color: var(--text-secondary);
}
.contrib-item__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary); flex-shrink: 0; margin-top: 4px;
}
.contrib-item__name {
  flex: 1 1 0; min-width: 80px;
  max-width: calc(100% - 16px - 60px);
  word-break: break-word;
}
.contrib-item__badge-col {
  display: flex; flex-direction: column;
  flex-shrink: 0; max-width: 200px;
}
.contrib-item__value {
  font-family: var(--font-mono); font-weight: 500; color: var(--text);
  font-size: 12px; flex-shrink: 0; margin-left: auto;
  align-self: flex-start; margin-top: 2px;
}
.contrib-item__badge {
  display: inline-block;
  font-size: 11px; font-weight: 500; padding: 2px 7px;
  border-radius: 10px;
  background: var(--color-primary-light); color: var(--color-primary);
  line-height: 1.3;
  white-space: normal; word-break: break-word;
}
.contrib-item__badge--winner {
  background: var(--color-success-bg); color: var(--color-success);
}
.contrib-item__badge--loser {
  background: var(--color-surface-2); color: var(--color-text-muted);
  text-decoration: line-through;
}
.contrib-item__exclusive-note {
  font-size: 10px; color: var(--color-text-muted);
  margin-top: 2px; line-height: 1.3;
  white-space: normal; word-break: break-word;
}
.contrib-item__detail {
  font-size: 10px; color: var(--text-muted);
  margin-top: 2px; line-height: 1.3;
  white-space: normal; word-break: break-word;
}

/* ── Result Actions ── */
.result-actions {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding: 12px 18px; border-top: 1px solid var(--border);
  background: var(--color-surface-2);
}
.result-action-btn { flex: 1; min-width: 60px; justify-content: center; }
.result-action-btn--reset {
  color: var(--text-secondary);
}
.result-action-btn--reset:hover {
  color: var(--text);
  background: var(--color-border);
}

/* ══════════════════════════════════════════════
   BATCH TABLE
══════════════════════════════════════════════ */
.batch-table-section {
  margin-bottom: 48px;
}
.batch-table-section__header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; flex-wrap: wrap; gap: 12px;
}
.batch-table-section__title { font-size: 18px; font-weight: 700; color: var(--text); }
.batch-table-section__controls { display: flex; gap: 8px; }
.batch-table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
.batch-table {
  width: 100%; border-collapse: collapse; font-size: 14px; min-width: 500px;
}
.batch-table th {
  background: var(--color-surface-2); color: var(--text-secondary); font-weight: 600;
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px;
  padding: 12px 16px; text-align: left; white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
.batch-table td {
  padding: 12px 16px; color: var(--text); border-bottom: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 13px;
  background: var(--color-surface);
}
.batch-table tbody tr:nth-child(odd) td { background: var(--color-surface); }
.batch-table tbody tr:nth-child(even) td { background: var(--color-surface-2); }
.batch-table tbody tr:last-child td { border-bottom: none; }
.batch-table tr.has-warning td:first-child {
  box-shadow: inset 3px 0 0 var(--danger);
}
.batch-table tr.has-warning td { background: var(--danger-bg) !important; }
.warning-icon-cell { color: var(--danger); font-size: 16px; }
.warning-text-cell { color: var(--danger); font-size: 12px; font-family: var(--font); }
.batch-table .row-actions { display: flex; gap: 6px; }
.batch-table .btn-icon {
  padding: 4px 8px; font-size: 12px; border-radius: var(--radius-sm);
  background: var(--color-surface-2); color: var(--text-secondary);
  border: 1px solid var(--border); cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
}
.batch-table .btn-icon:hover { color: var(--text); border-color: var(--text-muted); }

/* ══════════════════════════════════════════════
   TOAST
══════════════════════════════════════════════ */
.toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; background: var(--color-surface);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 14px; color: var(--text); max-width: 320px;
  pointer-events: auto;
  animation: toast-in 200ms ease forwards;
}
.toast.toast--out { animation: toast-out 200ms ease forwards; }
.toast--success { border-color: rgba(22, 163, 74, 0.3); }
.toast--success .toast__icon { color: var(--success); }
.toast--error { border-color: var(--danger-border); }
.toast--error .toast__icon { color: var(--danger); }
.toast--info .toast__icon { color: var(--primary); }
.toast__icon { flex-shrink: 0; }
.toast__text { flex: 1; }
@keyframes toast-in {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes toast-out {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(20px); }
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  background: var(--color-surface);
  padding: 40px 0;
  border-top: 1px solid var(--color-border);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.footer-logo .logo-text { font-size: 18px; }

.footer-tagline { font-size: 13px; color: var(--color-text-muted); }

.footer-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-link {
  font-size: 13px;
  color: var(--color-text-muted);
  transition: color var(--transition);
}

.footer-link:hover { color: var(--color-primary); }

.footer-sep { color: var(--color-border); font-size: 13px; }

.footer-copy { font-size: 13px; color: var(--color-text-muted); }

/* ============================================
   RESPONSIVE — DESKTOP (≥1024px)
   ============================================ */

/* Mobile */
@media (max-width: 767px) {
  :root { --container-px: 16px; }
  .page-header { padding-top: calc(var(--nav-height) + 24px); padding-bottom: 24px; }
  .main-content {
    grid-template-columns: 1fr; padding-top: 20px;
  }
  .result-panel { position: static; order: -1; }
  .result-main__price { font-size: 36px; }
  .nav-links {
    position: fixed; top: var(--nav-height); left: 0; right: 0; bottom: 0;
    background: var(--color-surface); flex-direction: column; align-items: stretch;
    justify-content: flex-start; gap: 4px;
    padding: 16px var(--container-px) 40px;
    border-top: 1px solid var(--border);
    transform: translateX(100%); transition: transform 250ms ease; overflow-y: auto;
  }
  .nav-links.is-open { transform: translateX(0); }
  .nav-link { font-size: 16px; padding: 12px 16px; border-radius: var(--radius-sm); }
  .nav-cta { margin-left: 0; margin-top: 8px; text-align: center; }
  .hamburger { display: flex; }
  .result-actions { gap: 6px; }
  .batch-table-section__header { flex-direction: column; align-items: flex-start; }
}

/* ══════════════════════════════════════════════
   PRINT STYLES
══════════════════════════════════════════════ */
@media print {
  .site-nav, .input-panel, .batch-section,
  .batch-table-section, .result-actions, .toast-container,
  .hamburger, .alert-banner { display: none !important; }

  body { background: white; color: black; }
  .result-panel {
    border: none; box-shadow: none; position: static;
    background: white; max-width: 480px; margin: 0 auto;
  }
  .result-main__price { color: black; }
  .result-path__step { color: #333; }
  .result-meta__label, .result-meta__value { color: black; }
  .result-contributions__title, .result-path__title { color: #555; }
  .print-only { display: block !important; }
}
