/* ══════════════════════════════════════════════════
   PRODUCTION SCHEDULE — Shared Styles
   (Consolidated from diary, producer, calendar variants)
   ══════════════════════════════════════════════════ */

.prod-loading { display: flex; align-items: center; justify-content: center; height: 60vh; color: #9a8a8c; font-size: 15px; }

/* ── Page Layout ──────────────────────────────────── */
.prod-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 32px 60px;
  font-family: "Outfit", system-ui, sans-serif;
  color: #3d2c2e;
}

/* ── Header ───────────────────────────────────────── */
.prod-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.prod-header-left { flex: 1; min-width: 200px; }
.prod-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 6px;
  color: #2d1f21;
}
.prod-stats { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #9a8a8c; }
.prod-stat-sep { color: #d4c4c6; }
.prod-header-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ── View Tabs ────────────────────────────────────── */
.prod-view-tabs {
  display: flex;
  background: #f5f0f0;
  border-radius: 8px;
  padding: 3px;
}
.prod-view-tab {
  padding: 7px 16px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #7a6a6c;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.prod-view-tab:hover { color: #3d2c2e; }
.prod-view-tab.active { background: #fff; color: #E07850; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }

/* ── Buttons ──────────────────────────────────────── */
.prod-btn {
  padding: 8px 16px;
  border: 1px solid #d4c4c6;
  background: #fff;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #3d2c2e;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.prod-btn:hover { border-color: #9a8a8c; }
.prod-btn-primary { background: #E07850; color: #fff; border-color: #E07850; }
.prod-btn-primary:hover { background: #c96840; border-color: #c96840; }
.prod-btn-outline { background: transparent; }

/* ── Empty State ──────────────────────────────────── */
.prod-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #9a8a8c;
}
.prod-empty-icon { font-size: 48px; margin-bottom: 12px; }
.prod-empty-state h3 { font-size: 18px; font-weight: 600; color: #3d2c2e; margin: 0 0 8px; }
.prod-empty-state p { font-size: 14px; margin: 0 0 20px; }

/* ══════════════════════════════════════════════════
   STRIPBOARD
   ══════════════════════════════════════════════════ */

.prod-stripboard { border: 1px solid #e8dfe0; border-radius: 10px; overflow: hidden; background: #fff; }

/* Column Header */
.strip-header {
  display: grid;
  grid-template-columns: 50px 100px 1fr 1.2fr 1fr 60px 50px 36px;
  gap: 0;
  padding: 8px 12px;
  background: #f5f0f0;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: #7a6a6c;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #e8dfe0;
}
.strip-col { padding: 4px 6px; }

/* Day Banner */
.strip-day { border-bottom: 2px solid #e8dfe0; }
.strip-day-dragover { background: #fef7f0 !important; }
.strip-day-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #2d1f21;
  color: #fff;
}
.strip-day-info { display: flex; align-items: center; gap: 12px; }
.strip-day-num { font-weight: 700; font-size: 14px; }
.strip-day-date { font-size: 13px; opacity: 0.8; }
.strip-day-loc { font-size: 12px; opacity: 0.65; }
.strip-day-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; opacity: 0.75; }
.strip-day-meta-sep { opacity: 0.4; }
.strip-add-scene {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.1);
  color: #fff;
  border-radius: 6px;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.15s;
}
.strip-add-scene:hover { background: rgba(255,255,255,0.2); }
.strip-day-note {
  padding: 6px 12px;
  background: #fef7f0;
  font-size: 12px;
  color: #b07040;
  border-bottom: 1px solid #f0e0d0;
}

/* Scene Strip Rows */
.strip-row {
  display: grid;
  grid-template-columns: 50px 100px 1fr 1.2fr 1fr 60px 50px 36px;
  gap: 0;
  padding: 6px 12px;
  font-size: 13px;
  border-bottom: 1px solid #f0e8e8;
  cursor: pointer;
  transition: background 0.1s;
  align-items: center;
}
.strip-row:hover { filter: brightness(0.97); }
.strip-row[draggable] { cursor: grab; }

.strip-type-badge {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(0,0,0,0.08);
  margin-right: 4px;
}
.strip-tod-badge {
  font-size: 10px;
  color: #7a6a6c;
  display: block;
  margin-top: 2px;
}
.strip-col-loc { font-weight: 600; font-size: 12px; }
.strip-col-desc { color: #5a4a4c; font-size: 12px; }
.strip-cast-chip {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 11px;
  background: rgba(224,120,80,0.12);
  color: #c06030;
  margin: 1px 2px;
}
.strip-col-pages, .strip-col-time { text-align: center; font-size: 12px; color: #7a6a6c; }
.strip-del-btn {
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  border: none; background: transparent;
  color: #ccc; font-size: 16px;
  cursor: pointer; border-radius: 4px;
}
.strip-del-btn:hover { background: #fee2e2; color: #dc2626; }
.strip-empty {
  padding: 20px;
  text-align: center;
  color: #bba8aa;
  font-size: 13px;
  font-style: italic;
}

/* ══════════════════════════════════════════════════
   TIMELINE
   ══════════════════════════════════════════════════ */

.prod-timeline { background: #fff; border: 1px solid #e8dfe0; border-radius: 10px; padding: 24px; }
.tl-legend { display: flex; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.tl-legend-item { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #5a4a4c; }
.tl-legend-dot { width: 10px; height: 10px; border-radius: 3px; }

.tl-chart { position: relative; }
.tl-months {
  display: flex;
  border-bottom: 1px solid #e8dfe0;
  margin-bottom: 8px;
}
.tl-month {
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 600;
  color: #7a6a6c;
  border-right: 1px solid #f0e8e8;
  text-align: center;
}
.tl-bars { margin-bottom: 32px; }
.tl-bar-row { display: flex; align-items: center; height: 44px; margin-bottom: 4px; }
.tl-bar-label { width: 120px; font-size: 12px; font-weight: 600; color: #5a4a4c; flex-shrink: 0; }
.tl-bar-track { flex: 1; position: relative; height: 30px; }
.tl-bar {
  position: absolute; top: 2px; height: 26px;
  border-radius: 5px;
  display: flex; align-items: center;
  padding: 0 10px;
  color: #fff;
  font-size: 11px; font-weight: 600;
  overflow: hidden;
  min-width: 2px;
}
.tl-bar-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.tl-milestone {
  position: absolute; top: -4px;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center;
  z-index: 2;
}
.tl-milestone-diamond {
  width: 10px; height: 10px;
  border: 2px solid;
  background: #fff;
  transform: rotate(45deg);
  margin-bottom: 2px;
}
.tl-milestone-label {
  font-size: 9px;
  white-space: nowrap;
  color: #5a4a4c;
  font-weight: 500;
  max-width: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tl-today {
  position: absolute; top: -6px; bottom: -6px;
  width: 2px; background: #E07850;
  z-index: 3;
}
.tl-today::before {
  content: "Today";
  position: absolute; top: -16px; left: -14px;
  font-size: 9px; font-weight: 600;
  color: #E07850;
}

/* DOOD */
.tl-dood { margin-top: 8px; border-top: 1px solid #e8dfe0; padding-top: 20px; }
.tl-dood-title { font-size: 14px; font-weight: 700; color: #2d1f21; margin: 0 0 12px; }
.tl-dood-grid { font-size: 12px; }
.tl-dood-header {
  display: flex;
  gap: 0;
  padding: 6px 0;
  border-bottom: 2px solid #e8dfe0;
  font-weight: 600;
  color: #7a6a6c;
}
.tl-dood-row {
  display: flex;
  gap: 0;
  padding: 5px 0;
  border-bottom: 1px solid #f5f0f0;
}
.tl-dood-cell { width: 44px; text-align: center; flex-shrink: 0; }
.tl-dood-name { width: 120px; text-align: left; font-weight: 500; color: #3d2c2e; }
.tl-dood-total { font-weight: 700; color: #E07850; }
.tl-dood-work { background: #fef2f2; color: #dc2626; font-weight: 700; border-radius: 3px; }

/* ══════════════════════════════════════════════════
   CALENDAR
   ══════════════════════════════════════════════════ */

.prod-calendar { background: #fff; border: 1px solid #e8dfe0; border-radius: 10px; padding: 20px; }
.cal-nav { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.cal-nav-btn {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid #e8dfe0; background: #fff;
  border-radius: 6px; font-size: 18px;
  cursor: pointer; color: #5a4a4c;
}
.cal-nav-btn:hover { background: #f5f0f0; }
.cal-month-label { font-size: 18px; font-weight: 700; color: #2d1f21; margin: 0; }
.cal-today-btn {
  padding: 5px 12px;
  border: 1px solid #e8dfe0; background: #fff;
  border-radius: 6px; font-size: 12px; font-weight: 500;
  cursor: pointer; color: #5a4a4c;
}
.cal-today-btn:hover { background: #f5f0f0; }
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border: 1px solid #e8dfe0;
  border-radius: 8px;
  overflow: hidden;
}
.cal-day-header {
  padding: 8px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: #9a8a8c;
  background: #f9f6f6;
  border-bottom: 1px solid #e8dfe0;
}
.cal-cell {
  min-height: 90px;
  padding: 6px;
  border-right: 1px solid #f0e8e8;
  border-bottom: 1px solid #f0e8e8;
  cursor: pointer;
  transition: background 0.1s;
}
.cal-cell:hover { background: #fef7f0; }
.cal-cell:nth-child(7n) { border-right: none; }
.cal-cell-outside { background: #faf8f8; }
.cal-cell-outside .cal-cell-num { color: #ccc; }
.cal-cell-today { background: #fff5f0; }
.cal-cell-today .cal-cell-num { background: #E07850; color: #fff; border-radius: 50%; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; }
.cal-cell-num { font-size: 12px; font-weight: 600; color: #5a4a4c; display: block; margin-bottom: 4px; }
.cal-event-chip {
  padding: 2px 5px;
  border-radius: 3px;
  font-size: 10px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.cal-event-chip:hover { filter: brightness(0.95); }
.cal-more { font-size: 10px; color: #9a8a8c; padding: 2px 5px; }

/* ══════════════════════════════════════════════════
   CALL SHEETS
   ══════════════════════════════════════════════════ */

.prod-callsheets { display: flex; flex-direction: column; gap: 24px; }
.cs-sheet {
  background: #fff;
  border: 1px solid #e8dfe0;
  border-radius: 10px;
  overflow: hidden;
}
.cs-header { padding: 20px 24px; border-bottom: 2px solid #2d1f21; }
.cs-header-top { display: flex; justify-content: space-between; align-items: flex-start; }
.cs-title { font-size: 16px; font-weight: 700; color: #2d1f21; margin: 0 0 4px; letter-spacing: 1px; }
.cs-subtitle { font-size: 13px; color: #7a6a6c; margin: 0; }
.cs-header-right { display: flex; gap: 24px; }
.cs-header-item { text-align: center; }
.cs-label { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; color: #9a8a8c; letter-spacing: 0.5px; }
.cs-value { font-size: 18px; font-weight: 700; color: #2d1f21; }
.cs-location { margin-top: 12px; padding-top: 12px; border-top: 1px solid #e8dfe0; }
.cs-location .cs-value { font-size: 14px; margin-left: 8px; }
.cs-notes { margin-top: 8px; font-size: 12px; color: #b07040; background: #fef7f0; padding: 8px 12px; border-radius: 6px; }

.cs-section { padding: 16px 24px; border-bottom: 1px solid #f0e8e8; }
.cs-section-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #9a8a8c; margin: 0 0 10px; }

.cs-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cs-table th {
  text-align: left;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: #9a8a8c;
  border-bottom: 1px solid #e8dfe0;
}
.cs-table td { padding: 6px 8px; border-bottom: 1px solid #f5f0f0; color: #3d2c2e; }
.cs-table tfoot td { border-top: 2px solid #e8dfe0; border-bottom: none; }
.cs-scene-num { font-weight: 700; color: #E07850; }
.cs-status-w { font-weight: 700; color: #dc2626; }
.cs-footer { padding: 16px 24px; display: flex; justify-content: flex-end; }

/* ══════════════════════════════════════════════════
   MODALS
   ══════════════════════════════════════════════════ */

.prod-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.prod-modal {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  overflow: hidden;
}
.prod-modal-title {
  padding: 16px 20px;
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  border-bottom: 1px solid #e8dfe0;
  color: #2d1f21;
}
.prod-modal-body { padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.prod-field { display: flex; flex-direction: column; gap: 4px; }
.prod-field span { font-size: 12px; font-weight: 600; color: #7a6a6c; }
.prod-field input, .prod-field select, .prod-field textarea {
  padding: 8px 10px;
  border: 1px solid #e8dfe0;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  color: #3d2c2e;
  background: #faf8f8;
}
.prod-field input:focus, .prod-field select:focus, .prod-field textarea:focus {
  outline: none;
  border-color: #E07850;
  background: #fff;
}
.prod-field-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #5a4a4c; }
.prod-field-row { display: flex; gap: 12px; }
.prod-field-row .prod-field { flex: 1; }
.prod-modal-actions {
  padding: 12px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid #f0e8e8;
}

/* ══════════════════════════════════════════════════
   PRINT
   ══════════════════════════════════════════════════ */
@media print {
  .prod-header, .prod-view-tabs, .prod-btn, .strip-add-scene, .strip-del-btn, .cs-footer { display: none !important; }
  .prod-page { padding: 0; max-width: 100%; }
  .cs-sheet { border: none; break-inside: avoid; }
}

/* ══════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .prod-page { padding: 16px; }
  .prod-header { flex-direction: column; }
  .strip-header, .strip-row { grid-template-columns: 40px 70px 1fr 1fr 80px 50px 40px 30px; font-size: 11px; }
  .tl-bar-label { width: 80px; }
  .cs-header-top { flex-direction: column; gap: 12px; }
}

@media (max-width: 640px) {
  .strip-col-desc, .strip-col-cast { display: none; }
  .strip-header, .strip-row { grid-template-columns: 40px 70px 1fr 50px 40px 30px; }
  .prod-view-tabs { overflow-x: auto; }
}

/* ── Ghost / Empty State Preview ─────────────────── */
.prod-empty-overlay-wrap {
  position: relative;
  min-height: 320px;
}

.prod-ghost-stripboard {
  pointer-events: none;
  user-select: none;
  opacity: 0.18;
  filter: blur(1px);
}

.strip-ghost-row {
  display: grid;
  grid-template-columns: 44px 90px 1fr 1.6fr 120px 52px 52px 60px;
  align-items: center;
  border-left: 4px solid #cbd5e1;
  border-bottom: 1px solid #e2e8f0;
  padding: 0 8px;
  min-height: 40px;
  background: #fff;
  gap: 0;
  font-size: 12px;
  color: #475569;
}

.strip-ghost-row:nth-child(2) { border-left-color: #fde68a; }
.strip-ghost-row:nth-child(3) { border-left-color: #bfdbfe; }
.strip-ghost-row:nth-child(4) { border-left-color: #bbf7d0; }
.strip-ghost-row:nth-child(5) { border-left-color: #cbd5e1; }

.strip-ghost-row .strip-col {
  padding: 8px 6px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.prod-empty-cta {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 40px 48px;
  text-align: center;
  box-shadow: 0 8px 40px rgba(0,0,0,0.12);
  min-width: 320px;
  z-index: 10;
}

.prod-empty-cta .prod-empty-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.prod-empty-cta h3 {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 8px;
}

.prod-empty-cta p {
  font-size: 14px;
  color: #64748b;
  margin: 0 0 24px;
  line-height: 1.5;
  max-width: 300px;
}
