/* ── REPORTS STYLES ──
   Phase 12E: extracted verbatim from components.css lines 1187-1429 (no rule changes).
   Cascade order preserved exactly: stylesheet links in index.html load these files
   in the original source order. Contents: PO# lookup report + full-screen panel + clickable rows + attachment modal, reports panel, photo upload progress card, date-picker export, holiday tab indicator, monthly report controls */

/* ── PO# Lookup Report ────────────────────────────────────────────────────── */
.po-lookup-section { border: 1px solid var(--border, #334155); border-radius: 10px; padding: 20px; margin-bottom: 20px; }
.po-lookup-search-row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; align-items: center; }
.po-lookup-input { flex: 1; min-width: 200px; background: var(--surface, #0f172a); color: var(--text-primary, #f1f5f9); border: 1px solid var(--border, #334155); border-radius: 6px; padding: 8px 12px; font-size: 0.9rem; font-family: 'Share Tech Mono', monospace; }
.po-lookup-input:focus { outline: none; border-color: var(--accent, #f59e0b); }
/* ── Reports panel ───────────────────────────────────────────────────────── */
.reports-panel-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 28px; background: var(--surface2, #1e293b); border-bottom: 2px solid var(--accent, #f59e0b); flex-shrink: 0; }
.reports-panel-title  { font-size: 1rem; font-weight: 700; color: var(--accent, #f59e0b); letter-spacing: 0.05em; }
.reports-panel-body   { flex: 1; overflow-y: auto; padding: 24px 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-content: start; }
.reports-panel-section { background: var(--surface2, #1e293b); border: 1px solid var(--border, #334155); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.reports-panel-section:nth-child(1) { grid-column: 1 / -1; }
.reports-panel-section:nth-child(2) { grid-column: 1 / -1; }
.reports-panel-section:nth-child(3),
.reports-panel-section:nth-child(4),
.reports-panel-section:nth-child(5) { grid-column: auto; }
.reports-section-title { font-size: 0.82rem; font-weight: 700; color: var(--text-primary, #f1f5f9); }
.reports-section-hint  { font-size: 0.78rem; color: var(--muted, #64748b); margin: 0; line-height: 1.4; }

@media (max-width: 768px) {
  .reports-panel-body { grid-template-columns: 1fr; padding: 16px; }
  .reports-panel-section:nth-child(1),
  .reports-panel-section:nth-child(2) { grid-column: 1; }
  .reports-panel-header { padding: 12px 16px; }
}
.reports-panel-body { display: none !important; }
.reports-tab-bar { display: flex; gap: 2px; padding: 0 28px; background: var(--surface2, #1e293b); border-bottom: 1px solid var(--border, #334155); overflow-x: auto; scrollbar-width: none; flex-shrink: 0; }
.reports-tab-bar::-webkit-scrollbar { display: none; }
.reports-tab { background: none; border: none; border-bottom: 2px solid transparent; color: var(--muted, #64748b); padding: 12px 16px; font-size: 0.82rem; cursor: pointer; white-space: nowrap; transition: all 0.15s; font-family: inherit; }
.reports-tab:hover { color: var(--text-primary, #f1f5f9); }
.reports-tab.active { color: var(--accent, #f59e0b); border-bottom-color: var(--accent, #f59e0b); font-weight: 600; }
.reports-tab-content { flex: 1; overflow-y: auto; padding: 24px 28px; }
.reports-tab-panel { max-width: 900px; }
@media (max-width: 768px) {
  .reports-tab-bar { padding: 0 12px; }
  .reports-tab { padding: 10px 10px; font-size: 0.72rem; }
  .reports-tab-content { padding: 16px; }
}

/* ── PO lookup full-screen panel ─────────────────────────────────────────── */
.po-panel-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 28px; background: var(--surface2, #1e293b); border-bottom: 1px solid var(--border, #334155); flex-shrink: 0; gap: 16px; flex-wrap: wrap; }
.po-panel-title { font-size: 1rem; font-weight: 700; color: var(--accent, #f59e0b); letter-spacing: 0.05em; }
.po-panel-subtitle { font-size: 0.8rem; color: var(--muted, #64748b); margin-top: 3px; }
.po-panel-actions { display: flex; gap: 8px; flex-shrink: 0; }
.po-panel-search-row { display: flex; gap: 8px; padding: 12px 28px; background: var(--surface2, #1e293b); border-bottom: 1px solid var(--border, #334155); flex-shrink: 0; }
.po-panel-search-row .po-lookup-input { flex: 1; max-width: 400px; }
.po-panel-body { flex: 1; overflow-y: auto; padding: 24px 28px; display: flex; flex-direction: column; gap: 20px; }

.po-summary-cards { display: flex; gap: 12px; flex-wrap: wrap; }
.po-summary-card { background: var(--surface2, #1e293b); border: 1px solid var(--border, #334155); border-radius: 10px; padding: 12px 20px; min-width: 140px; flex: 1; }
.po-summary-value { font-size: 1.4rem; font-weight: 700; color: var(--accent, #f59e0b); line-height: 1; margin-bottom: 4px; }
.po-summary-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted, #64748b); }

.po-results-table-wrap { width: 100%; overflow-x: auto; border-radius: 10px; border: 1px solid var(--border, #334155); }
.po-results-table { width: 100%; border-collapse: collapse; font-size: 0.83rem; table-layout: auto; min-width: 900px; }
.po-results-table th { background: var(--surface, #0f172a); color: var(--accent, #f59e0b); padding: 10px 12px; text-align: left; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; white-space: nowrap; border-bottom: 1px solid var(--border, #334155); }
.po-results-table td { padding: 11px 12px; border-bottom: 1px solid rgba(51,65,85,0.4); vertical-align: middle; white-space: nowrap; }
.po-results-table tr:last-child td { border-bottom: none; }
.po-date { color: var(--text-secondary, #94a3b8); font-size: 0.8rem; }
.po-door { font-weight: 700; color: var(--accent, #f59e0b); }
.po-number { font-family: 'Share Tech Mono', monospace; color: #a78bfa; font-weight: 600; }

@media (max-width: 768px) {
  .po-panel-header { padding: 12px 16px; }
  .po-panel-search-row { padding: 10px 16px; }
  .po-panel-body { padding: 14px 16px; }
  .po-summary-card { min-width: 120px; padding: 10px 14px; }
}

@media (max-width: 768px) {
  .po-lookup-search-row { flex-direction: column; }
  .po-lookup-input { width: 100%; }
}

/* ── Photo upload progress card ───────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100% { opacity: 0.85; } 50% { opacity: 0.55; } }

.attach-uploading-card { animation: pulse 1.5s infinite; }

.attach-thumb-progress {
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: var(--surface, #0f172a);
}

.upload-progress-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px;
  text-align: center;
}

.upload-progress-label {
  font-size: 0.72rem;
  color: var(--muted, #94a3b8);
  max-width: 120px;
  line-height: 1.3;
}

.upload-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--border, #334155);
  border-top-color: var(--accent, #f59e0b);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.batch-progress-bar-wrap { width: 100%; height: 6px; background: var(--surface, #0f172a); border-radius: 3px; overflow: hidden; }
.batch-progress-bar { height: 100%; background: var(--accent, #f59e0b); border-radius: 3px; transition: width 0.3s ease; }

/* ── Date-picker export ───────────────────────────────────────────────────── */
.export-date-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.export-date-input { background: var(--surface, #0f172a); color: var(--text-primary, #f1f5f9); border: 1px solid var(--border, #334155); border-radius: 6px; padding: 8px 12px; font-size: 0.9rem; cursor: pointer; }
.export-date-input:focus { outline: none; border-color: var(--accent, #f59e0b); }
.export-preview-card { background: var(--surface2, #1e293b); border: 1px solid var(--border, #334155); border-radius: 10px; padding: 16px 20px; }
.export-preview-date { font-size: 0.9rem; font-weight: 600; color: var(--accent, #f59e0b); margin-bottom: 12px; }
.export-preview-stats { display: flex; gap: 20px; flex-wrap: wrap; }
.export-preview-stat { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 50px; }
.export-stat-value { font-size: 1.4rem; font-weight: 700; color: var(--text-primary, #f1f5f9); line-height: 1; }
.export-stat-label { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted, #64748b); }

@media (max-width: 768px) {
  .export-preview-stats { gap: 12px; }
  .export-stat-value { font-size: 1.1rem; }
}

/* ── PO lookup clickable rows ─────────────────────────────────────────────── */
.po-result-row { cursor: pointer; transition: background 0.12s; }
.po-result-row:hover td { background: rgba(245,158,11,0.07) !important; }

/* ── PO attachment modal ──────────────────────────────────────────────────── */
.po-attach-modal { background: var(--bg, #0f172a); border-radius: 16px; width: 100%; max-width: 860px; max-height: 88vh; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--border, #334155); }
.po-attach-header { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; border-bottom: 1px solid var(--border, #334155); background: var(--surface2, #1e293b); flex-shrink: 0; gap: 12px; }
.po-attach-title-group { min-width: 0; flex: 1; }
.po-attach-title { font-size: 1rem; font-weight: 700; color: var(--accent, #f59e0b); font-family: 'Share Tech Mono', monospace; }
.po-attach-subtitle { font-size: 0.75rem; color: var(--muted, #64748b); margin-top: 3px; }
.po-attach-body { flex: 1; overflow-y: auto; padding: 20px 24px; display: flex; flex-direction: column; gap: 24px; }
.po-attach-section { display: flex; flex-direction: column; gap: 12px; }
.po-attach-section-title { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted, #64748b); display: flex; align-items: center; gap: 8px; }

@media (max-width: 768px) {
  .po-attach-modal { max-width: 100%; max-height: 100dvh; border-radius: 0; }
  .po-attach-header { padding: 12px 16px; }
  .po-attach-body { padding: 14px 16px; }
}


/* ── Holiday tab indicator ───────────────────────────────────────────────────
   Phase 20D: the small "HOLIDAY" chip on the top marker line is the real signal
   (never color-only). This rule gives a holiday-only tile just a faint warm tint
   and a soft 1px border so it reads as "holiday" without rivalling the selected
   day (which is filled amber). When a day is BOTH selected and a holiday the
   selected style wins outright — the .active fill is left untouched here and only
   the small chip persists — so the marker scoping excludes .active on purpose. */
.week-tab-holiday:not(.active) {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.07);
}

/* ── Monthly report controls ─────────────────────────────────────────────── */
.monthly-report-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}
.monthly-picker-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.monthly-noshow-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--text-secondary, #94a3b8);
  user-select: none;
}
.monthly-noshow-toggle input {
  accent-color: var(--accent, #f59e0b);
  width: 15px;
  height: 15px;
  cursor: pointer;
}
.monthly-noshow-hint { font-size: 0.72rem; color: var(--muted, #64748b); }
.monthly-wh-breakdown {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid var(--border, #334155);
  padding-top: 10px;
}
.monthly-wh-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
}
.monthly-carrier-breakdown {
  margin-top: 10px;
  border-top: 1px solid var(--border, #334155);
  padding-top: 10px;
}
.monthly-carrier-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
  font-size: 0.78rem;
}


/* ── Phase 17K: Scheduled Reports tab ──────────────────────────────────────── */
.sched-card-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sched-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--surface2, #1e293b);
  border: 1px solid var(--border, #334155);
  border-radius: 8px;
  padding: 12px 14px;
}
.sched-card-main { flex: 1; min-width: 220px; }
.sched-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.sched-card-name {
  font-weight: 700;
  color: var(--text, #f1f5f9);
  font-size: 0.95rem;
}
.sched-card-meta {
  font-size: 0.75rem;
  color: var(--muted, #94a3b8);
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.sched-badge {
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 3px;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.sched-badge-enabled  { background: rgba(34,197,94,0.18);  color: var(--green, #22c55e); }
.sched-badge-disabled { background: var(--surface, #0f172a); color: var(--muted, #94a3b8); }
.sched-badge-paused   { background: rgba(245,158,11,0.18); color: var(--accent, #f59e0b); }
.sched-note {
  margin-top: 8px;
  font-size: 0.72rem;
  color: var(--muted, #94a3b8);
}
.sched-note-paused { color: var(--accent, #f59e0b); }
.sched-card-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: flex-start;
}
.sched-btn { font-size: 0.72rem; padding: 5px 12px; }

/* Mobile: stack actions full-width under the card body for easy tapping. */
@media (max-width: 640px) {
  .sched-card { flex-direction: column; }
  .sched-card-actions { width: 100%; }
  .sched-btn { flex: 1; min-width: 130px; }
}

/* ── BOL Send Queue (Phase 17R) ──────────────────────────────────────────── */
.bq-toolbar, .bq-actionbar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 10px 16px; border-bottom: 1px solid var(--border, #252a35); background: var(--surface2, #181c23);
}
.bq-toolbar label, .bq-actionbar label { font-size: 0.78rem; color: var(--muted, #6b7280); display: flex; align-items: center; gap: 6px; }
.bq-toolbar input[type="date"], .bq-toolbar select { background: var(--surface, #14181f); color: var(--text, #e5e7eb); border: 1px solid var(--border, #252a35); border-radius: 6px; padding: 4px 8px; font-size: 0.8rem; }
.bq-check { cursor: pointer; }
.bq-summary { font-size: 0.8rem; margin-left: auto; }
.bq-body { flex: 1; overflow: auto; padding: 8px 12px; }
.bq-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.bq-table th { text-align: left; padding: 6px 8px; color: var(--muted, #6b7280); border-bottom: 1px solid var(--border, #252a35); position: sticky; top: 0; background: var(--bg, #0f172a); font-size: 0.72rem; text-transform: uppercase; }
.bq-table td { padding: 6px 8px; border-bottom: 1px solid var(--border, #252a35); color: var(--text, #e5e7eb); vertical-align: middle; }
.bq-row-actions { display: flex; gap: 6px; white-space: nowrap; }
.bq-pill { display: inline-block; font-size: 0.68rem; padding: 2px 8px; border-radius: 10px; font-weight: 600; }
.bq-pill.bq-ready { background: rgba(34,197,94,0.18); color: #22c55e; }
.bq-pill.bq-warn  { background: rgba(245,158,11,0.18); color: #f59e0b; }
.bq-pill.bq-sent  { background: rgba(0,212,255,0.15); color: #00d4ff; margin-left: 4px; }
/* Phase 20A.1 — Order/PO cell: show the full value, wrap long tokens safely,
   no ellipsis (mirrors the Live Board Order/PO behavior). */
.bq-order { max-width: 150px; white-space: normal; overflow-wrap: anywhere; word-break: break-word; vertical-align: top; }
/* Phase 20A.1 — search input in the queue toolbar */
.bq-search-label { flex: 1 1 240px; min-width: 180px; }
.bq-search { width: 100%; min-width: 160px; background: var(--surface, #14181f); color: var(--text, #e5e7eb); border: 1px solid var(--border, #252a35); border-radius: 6px; padding: 4px 8px; font-size: 0.8rem; }
@media (max-width: 800px) {
  /* Carrier is now col 7, Last sent col 11 after adding Order/PO at col 6. */
  .bq-table th:nth-child(7), .bq-table td:nth-child(7),
  .bq-table th:nth-child(11), .bq-table td:nth-child(11) { display: none; }
}
