/* รายงาน TNK Itinerary (ใช้ร่วมกันทั้ง user และ admin; gen-config.mjs คัดลอกไปไว้ข้างหน้าเว็บ) — พิมพ์ A4 แนวนอน 1 แผ่น */
.itin { color: #1e293b; }
.itin .itin-filter { background: #fff; border: 1px solid #cbd5e1; border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); align-items: end; }
.itin .itin-filter label { display: block; font-size: .8rem; font-weight: 700; margin-bottom: 2px; }
.itin .itin-filter select, .itin .itin-filter button { width: 100%; padding: 7px 8px; font: inherit; font-size: .85rem; border-radius: 8px; border: 1px solid #94a3b8; background: #fff; color: #1e293b; }
.itin .itin-filter button { font-weight: 700; cursor: pointer; background: #003399; color: #fff; border-color: #003399; }
.itin .itin-filter button.dark { background: #1e293b; border-color: #1e293b; }
.itin .itin-filter button:disabled { opacity: .6; cursor: default; }
.itin .itin-paper { background: #fff; border: 1px solid #e2e8f0; border-radius: 6px; padding: 10px 15px; box-shadow: 0 3px 10px rgba(0,0,0,.05); }
.itin .itin-head { display: flex; flex-wrap: wrap; gap: 6px 12px; justify-content: space-between; align-items: center; border-bottom: 1.5px solid #003399; padding-bottom: 4px; margin-bottom: 6px; }
.itin .itin-title { font-size: 1.2rem; font-weight: 700; color: #003399; line-height: 1.1; }
.itin .itin-sub { font-size: .72rem; color: #64748b; }
.itin .itin-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.itin .itin-badge { font-size: .78rem; background: #f8fafc; border: 1px solid #cbd5e1; padding: 2px 8px; border-radius: 4px; }
.itin .itin-table-wrap { width: 100%; overflow-x: auto; }
.itin .itin-msg { text-align: center; color: #64748b; font-size: .85rem; padding: 18px 0; }
.itin table { width: 100%; table-layout: fixed; border-collapse: collapse; min-width: 640px; }
.itin th, .itin td { border: 1px solid #cbd5e1; vertical-align: middle; word-break: break-word; white-space: normal; overflow: hidden; line-height: 1.15; }
.itin thead th { background: #003399; color: #fff; text-align: center; font-weight: 600; }
.itin .c-num { width: 34px; text-align: center; font-weight: 700; white-space: nowrap; }
.itin .c-day { width: 56px; text-align: center; white-space: nowrap; }
.itin .c-date { width: 72px; text-align: center; white-space: nowrap; }
.itin .c-route { width: 125px; font-weight: 600; }
.itin .weekend-row { background: #f8fafc; color: #64748b; }
.itin .holiday-row { background: #fef2f2; color: #dc2626; font-weight: 600; }
.itin .muted-cell { text-align: center; color: #94a3b8; }
.itin .store-code { font-weight: 700; color: #003399; display: block; }
.itin .store-name { color: #1e293b; }
.itin .density-spacious { font-size: .82rem; } .itin .density-spacious th { font-size: .82rem; padding: 5px 3px; } .itin .density-spacious td { padding: 4px; } .itin .density-spacious .store-code { font-size: .75rem; margin-bottom: 2px; }
.itin .density-balanced { font-size: .72rem; } .itin .density-balanced th { font-size: .73rem; padding: 4px 2px; } .itin .density-balanced td { padding: 3px; } .itin .density-balanced .store-code { font-size: .67rem; }
.itin .density-compact { font-size: .65rem; } .itin .density-compact th { font-size: .66rem; padding: 3px 1px; } .itin .density-compact td { padding: 2px; } .itin .density-compact .store-code { font-size: .6rem; }

@media print {
  @page { size: A4 landscape; margin: 4mm 4mm 3mm 4mm; }
  html, body { background: #fff !important; padding: 0 !important; margin: 0 !important; }
  .no-print { display: none !important; }
  .itin .itin-paper { border: none !important; box-shadow: none !important; padding: 0 !important; }
  .itin .itin-head { margin-bottom: 2px; padding-bottom: 2px; }
  .itin .itin-title { font-size: .95rem; } .itin .itin-badge { font-size: .65rem; padding: 1px 4px; }
  .itin .itin-table-wrap { overflow: visible; }
  .itin table { min-width: 0; table-layout: fixed; width: 100%; }
  .itin th, .itin td { border: 1px solid #475569 !important; line-height: 1.05; }
  .itin thead th, .itin .weekend-row, .itin .holiday-row { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .itin .weekend-row { background: #f1f5f9 !important; } .itin .holiday-row { background: #fee2e2 !important; color: #b91c1c !important; }
  .itin .c-num { width: 22px; } .itin .c-day { width: 38px; } .itin .c-date { width: 52px; } .itin .c-route { width: 88px; }
  .itin .density-spacious th { font-size: 7.2pt; padding: 2px; } .itin .density-spacious td { font-size: 6.8pt; padding: 1.5px 2px; } .itin .density-spacious .store-code { font-size: 6.5pt; }
  .itin .density-balanced th { font-size: 6.2pt; padding: 1.5px 1px; } .itin .density-balanced td { font-size: 5.8pt; padding: 1px 1.5px; } .itin .density-balanced .store-code { font-size: 5.5pt; }
  .itin .density-compact th { font-size: 5.4pt; padding: 1px; } .itin .density-compact td { font-size: 5pt; padding: .5px 1px; } .itin .density-compact .store-code { font-size: 4.8pt; }
}
