@page { size: letter; margin: 0.4in; }

@media print {
  body {
    background: #fff; color: #000;
    background-image: none;
    padding: 0; margin: 0;
  }
  .mode-bar, .controls, .print-btn, .summary-row, .box-body,
  .tag-input-row, .tag-remove, .items-label, .box-footer,
  #authOverlay, #printModal, header { display: none !important; }

  .boxes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.2in;
    width: 100%;
  }

  .box-card {
    width: 100%;
    height: 2.4in;
    border: 2px solid #000;
    border-top: 8px solid #d4581a;
    background: #fff;
    page-break-inside: avoid;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .box-card.print-exclude { display: none !important; }

  .box-header { background: #eee; border-bottom: 2px solid #ccc; padding: 12px 16px; flex-shrink: 0; }
  .box-label-input { color: #000; font-size: 26px; border-bottom: none; }
  .box-num { color: #555; font-size: 12px; }

  .tag-section { padding: 10px 16px 12px; background: #f8f5ee; border-bottom: 1px solid #ddd; flex: 1; display: flex; flex-direction: column; justify-content: center; }
  .tag-section-inner { display: flex; align-items: center; gap: 12px; }
  .tag-content { flex: 1; }
  .tag-label { color: #888; font-size: 10px; margin-bottom: 8px; }
  .tag-list { gap: 6px; flex-wrap: wrap; }
  .tag-pill { background: #fce8d8; border: 1px solid #d4581a; color: #8b3a10; padding: 4px 10px; font-size: 11px; }
  .no-tags { color: #aaa; }

  .qr-label { display: block !important; flex-shrink: 0; }
  .qr-label img { width: 0.85in; height: 0.85in; display: block; }

  .box-footer, .box-body { display: none !important; }
}
