:root {
  --bg-app: #0b0d13;
  --bg-panel: #12151f;
  --bg-card: #161a26;
  --bg-input: #0e1119;
  --bg-hover: #1d2232;
  --border: #23283a;
  --border-focus: #f5c542;
  --text-main: #f1f5f9;
  --text-muted: #8b95ab;
  --text-dim: #5e677d;
  --gold: #f5c542;
  --gold-dim: rgba(245, 197, 66, 0.14);
  --blue: #38bdf8;
  --blue-dim: rgba(56, 189, 248, 0.15);
  --green: #34d399;
  --green-dim: rgba(52, 211, 153, 0.15);
  --rose: #fb7185;
  --rose-dim: rgba(251, 113, 133, 0.14);
  --cyan: #22d3ee;
  --radius-lg: 12px;
  --radius-md: 8px;
  --radius-sm: 6px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100%;
  background: var(--bg-app);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

.app-shell {
  width: 100%;
  max-width: none;
  padding: 12px 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Topbar */
.topbar {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-badge {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, #f5c542, #eab308);
  color: #0b0d13;
  font-weight: 800;
  font-size: 14px;
  display: grid;
  place-items: center;
  letter-spacing: -0.02em;
}

.topbar-brand h1 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.brand-subtitle {
  font-size: 11px;
  color: var(--text-muted);
}

.topbar-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.control-label {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.unit-toggle {
  display: inline-flex;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.unit-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.unit-btn.active {
  background: var(--bg-hover);
  color: var(--text-main);
}

.input-compact {
  width: 72px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 5px 8px;
  outline: none;
  transition: border-color 0.15s;
}

.input-compact:focus {
  border-color: var(--border-focus);
}

.topbar-actions {
  display: flex;
  gap: 8px;
  margin-left: 4px;
}

.btn-ghost {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-ghost:hover {
  color: var(--text-main);
  border-color: #363e57;
  background: var(--bg-hover);
}

/* Main Workspace Layout */
.workspace {
  display: grid;
  grid-template-columns: clamp(420px, 31vw, 520px) 1fr;
  gap: 14px;
  align-items: start;
}

/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.panel-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-title h2 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-main);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.dot-blue { background: var(--blue); box-shadow: 0 0 8px var(--blue); }
.dot-green { background: var(--green); box-shadow: 0 0 8px var(--green); }

.count-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
}

.count-blue { background: var(--blue-dim); color: var(--blue); }
.count-green { background: var(--green-dim); color: var(--green); }

.btn-add {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-add:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.table-header {
  display: grid;
  gap: 6px;
  padding: 0 2px 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.boards-grid {
  grid-template-columns: 1fr 1fr 64px 24px;
  align-items: center;
}

.pieces-grid {
  grid-template-columns: 12px minmax(78px, 1.2fr) 58px 58px 46px 24px 78px 22px;
  align-items: center;
}

.items-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 2px;
}

.items-list::-webkit-scrollbar {
  width: 5px;
}
.items-list::-webkit-scrollbar-thumb {
  background: #272d40;
  border-radius: 4px;
}

.item-row {
  display: grid;
  gap: 6px;
  align-items: center;
}

.cell-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 7px;
  outline: none;
  transition: border-color 0.15s;
}

.cell-input.text-input {
  font-family: var(--font-sans);
}

.cell-input:focus {
  border-color: var(--border-focus);
}

.color-swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}

/* Custom Rotate Checkbox */
.rotate-check {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.15s;
  margin: 0 auto;
}

.rotate-check:checked {
  background: var(--gold);
  border-color: var(--gold);
}

.rotate-check:checked::after {
  content: '✓';
  color: #0b0d13;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

/* Cut Type Selector */
.cut-select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 4px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.cut-select.is-recto {
  color: var(--blue);
  border-color: rgba(56, 189, 248, 0.35);
}

.cut-select.is-exacto {
  color: var(--gold);
  border-color: rgba(245, 197, 66, 0.45);
}

.cut-select:focus {
  border-color: var(--border-focus);
}

.btn-remove {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}

.btn-remove:hover {
  color: var(--rose);
  background: var(--rose-dim);
}

/* Cut Type Info Box */
.cut-type-info {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
}

.cut-info-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cut-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.cut-recto {
  background: var(--blue-dim);
  color: var(--blue);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.cut-exacto {
  background: var(--gold-dim);
  color: var(--gold);
  border: 1px solid rgba(245, 197, 66, 0.35);
}

/* Optimize Button */
.btn-optimize {
  width: 100%;
  background: var(--bg-panel);
  border: 1.5px solid var(--gold);
  color: var(--gold);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.18s ease;
  box-shadow: 0 0 20px rgba(245, 197, 66, 0.08);
}

.btn-optimize:hover,
.btn-optimize:active {
  background: var(--gold);
  color: #0b0d13;
  box-shadow: 0 0 24px rgba(245, 197, 66, 0.28);
}

.btn-optimize:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.play-icon {
  font-size: 12px;
}

/* Results Area */
.results-area {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

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

.kpi-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 4px;
  min-height: 90px;
}

.kpi-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.kpi-value {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
}

.kpi-gold {
  color: var(--gold);
}

.kpi-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.kpi-progress-track {
  width: 100%;
  max-width: 130px;
  height: 4px;
  background: #1f2536;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 4px;
}

.kpi-progress-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 999px;
  transition: width 0.35s ease;
}

/* Warning Banner */
.warning-banner {
  background: rgba(251, 113, 133, 0.1);
  border: 1px solid rgba(251, 113, 133, 0.4);
  color: #fda4af;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hidden {
  display: none !important;
}

/* View Toolbar */
.view-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px;
}

.view-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.toggle-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.toggle-chip input {
  accent-color: var(--gold);
  cursor: pointer;
}

.algo-info {
  font-size: 11px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

/* Board Cards */
.boards-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.board-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.board-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.board-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.board-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.board-units {
  font-size: 12px;
  color: var(--text-muted);
}

.board-usage-pill {
  background: var(--gold-dim);
  color: var(--gold);
  border: 1px solid rgba(245, 197, 66, 0.3);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.board-svg-wrap {
  background: #0c0f16;
  border: 1px solid #1d2232;
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.board-svg {
  width: 100%;
  height: auto;
  max-height: 62vh;
  display: block;
}

.piece-group {
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.piece-group:hover {
  opacity: 0.92;
}

.board-remnants-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 4px;
}

.remnants-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--green);
}

.remnants-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.remnant-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #6ee7b7;
  background: rgba(52, 211, 153, 0.08);
  border: 1px dashed rgba(52, 211, 153, 0.35);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
}

/* Legend */
.legend-card {
  padding: 14px 16px;
}

.legend-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-main);
}

.legend-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.legend-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  font-size: 12px;
}

.legend-name {
  font-weight: 600;
  color: var(--text-main);
}

.legend-dims {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

/* Tooltip */
.piece-tooltip {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  background: rgba(15, 18, 28, 0.96);
  border: 1px solid #333b52;
  border-radius: var(--radius-md);
  padding: 8px 11px;
  font-size: 12px;
  color: var(--text-main);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
  min-width: 180px;
}

.tooltip-title {
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tooltip-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.tooltip-row strong {
  color: var(--text-main);
  font-family: var(--font-mono);
}

.btn-accent {
  border-color: rgba(245, 197, 66, 0.45);
  color: var(--gold);
}

.btn-accent:hover {
  border-color: var(--gold);
  background: var(--gold-dim);
  color: var(--gold);
}

.mini-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--bg-hover);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}

/* Projects Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(5, 7, 11, 0.78);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal-card {
  width: 100%;
  max-width: 560px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
}

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

.modal-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.modal-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.modal-save-form {
  display: flex;
  gap: 8px;
}

.modal-save-form .cell-input {
  flex: 1;
  padding: 8px 10px;
}

.btn-save-primary {
  background: var(--gold);
  color: #0b0d13;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s;
}

.btn-save-primary:hover {
  opacity: 0.9;
}

.saved-projects-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 340px;
  overflow-y: auto;
}

.saved-project-item {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.saved-project-item.is-active {
  border-color: rgba(245, 197, 66, 0.5);
}

.saved-project-info {
  min-width: 0;
}

.saved-project-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saved-project-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.saved-project-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* Empty State */
.empty-state {
  background: var(--bg-panel);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 1080px) {
  .workspace {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .pieces-grid {
    grid-template-columns: 10px 1fr 50px 50px 42px 22px 70px 20px;
  }
}

/* Toast Notification */
.toast-notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  background: #181c28;
  color: var(--text-main);
  border: 1px solid var(--gold);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
}

/* Modern Print / PDF Report */
.print-only {
  display: none;
}

@page {
  size: A4 landscape;
  margin: 10mm;
}

@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  html, body {
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 11px;
  }

  .app-shell,
  .modal-backdrop,
  .piece-tooltip,
  .toast-notification {
    display: none !important;
  }

  .print-only {
    display: block !important;
  }

  .print-page {
    width: 100%;
    page-break-after: always;
    break-after: page;
  }

  .print-page:last-child {
    page-break-after: auto;
    break-after: auto;
  }

  .print-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0f172a;
    margin-bottom: 12px;
  }

  .print-brand {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .print-logo {
    width: 34px;
    height: 34px;
    border-radius: 7px;
    background: #0f172a;
    color: #f5c542;
    font-weight: 800;
    font-size: 14px;
    display: grid;
    place-items: center;
  }

  .print-header h1 {
    font-size: 17px;
    font-weight: 800;
    color: #0f172a;
  }

  .print-meta-line {
    font-size: 10.5px;
    color: #475569;
    margin-top: 2px;
  }

  .print-config-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .print-config-pills span {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    padding: 4px 8px;
    font-size: 10.5px;
    color: #334155;
  }

  .print-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
  }

  .print-kpi-card {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
  }

  .print-kpi-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #64748b;
  }

  .print-kpi-value {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
  }

  .print-kpi-value.accent {
    color: #b45309;
  }

  .print-kpi-value small {
    font-size: 10.5px;
    font-weight: 500;
    color: #475569;
  }

  .print-section {
    margin-bottom: 12px;
  }

  .print-section-title {
    font-size: 11.5px;
    font-weight: 700;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
  }

  .print-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10.5px;
  }

  .print-table th,
  .print-table td {
    border: 1px solid #cbd5e1;
    padding: 5px 8px;
    text-align: left;
    vertical-align: middle;
  }

  .print-table th {
    background: #f1f5f9;
    color: #334155;
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .print-table .mono {
    font-family: var(--font-mono);
  }

  .print-table .center {
    text-align: center;
  }

  .print-table .right {
    text-align: right;
  }

  .print-table-compact th,
  .print-table-compact td {
    padding: 3.5px 6px;
    font-size: 9.5px;
  }

  .print-swatch {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    margin-right: 6px;
    vertical-align: middle;
  }

  .print-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    text-transform: uppercase;
  }

  .print-badge-recto {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #7dd3fc;
  }

  .print-badge-exacto {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fcd34d;
  }

  /* Board Pages */
  .print-board-page {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .print-board-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 8px;
    border-bottom: 2px solid #0f172a;
  }

  .print-board-header h2 {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
  }

  .print-usage-badge {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 6px;
  }

  .print-board-body {
    display: grid;
    grid-template-columns: 1.55fr 1fr;
    gap: 12px;
    align-items: start;
  }

  .print-board-svg-box {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px;
    background: #ffffff;
  }

  .print-board-svg {
    width: 100%;
    height: auto;
    max-height: 155mm;
    display: block;
  }

  .print-board-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .print-remnants-box {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    padding: 7px 9px;
  }

  .print-remnants-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
  }

  .print-remnant-pill {
    font-family: var(--font-mono);
    font-size: 9.5px;
    font-weight: 600;
    color: #065f46;
    background: #ffffff;
    border: 1px dashed #34d399;
    border-radius: 4px;
    padding: 2px 6px;
  }

  .print-muted {
    font-size: 10px;
    color: #64748b;
  }
}
