/* Phase 5 foundation: duplicated schedule-specific selectors extracted from app-core-shell for safer future isolation. */

/* ── SHOOTING SCHEDULE ───────────────────────────────────────── */
    /* ── SHOOTING SCHEDULE ───────────────────────────────────── */
    /* Summary bar */
    .sched-summary-bar {
      display: flex; gap: 8px; flex-wrap: wrap;
      margin-bottom: 18px;
    }

.sched-summary-pill {
      background: rgba(var(--brand-rgb),.08);
      border: 1px solid rgba(var(--brand-rgb),.18);
      color: var(--brand);
      border-radius: 999px;
      padding: 4px 12px;
      font-size: .75rem;
      font-weight: 700;
    }

/* Empty state */
    .sched-empty-state {
      text-align: center;
      padding: 48px 24px;
      color: var(--muted);
    }

/* Day card */
    .sched-day-card {
      border: 1px solid var(--line);
      border-radius: 16px;
      margin-bottom: 20px;
      overflow: hidden;
      background: var(--paper);
    }

/* Header */
    .sched-day-header {
      padding: 14px 16px 12px;
      background: linear-gradient(135deg, var(--brand) 0%, #7c3aed 100%);
      color: white;
    }

.sched-day-header-top {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
      margin-bottom: 8px;
    }

.sched-day-num {
      font-size: 1.05rem;
      font-weight: 900;
      letter-spacing: .02em;
      white-space: nowrap;
    }

.sched-day-date-badge {
      background: rgba(255,255,255,.22);
      border: 1px solid rgba(255,255,255,.30);
      border-radius: 8px;
      padding: 5px 11px;
      font-size: .78rem;
      font-weight: 800;
      cursor: pointer;
      transition: background .12s;
      white-space: nowrap;
      color: white;
      min-height: 32px;
    }

.sched-day-date-badge:hover,
    .sched-day-date-badge:focus { background: rgba(255,255,255,.38); outline: none; }

.sched-day-date-badge.weekend { background: rgba(255,80,80,.38); border-color: rgba(255,120,120,.4); }

/* ── SCHEDULE CALENDAR VIEW ────────────────────────────────────────── */
    .sched-view-toggle { display: flex; gap: 0; margin-bottom: 14px; border-radius: 8px; overflow: hidden; border: 1.5px solid #e5e7eb; width: fit-content; }

.sched-view-btn { padding: 6px 16px; font-size: .78rem; font-weight: 700; border: none; background: var(--paper); color: var(--muted); cursor: pointer; transition: all .12s; }

.sched-view-btn.active { background: var(--brand); color: #fff; }

.sched-month-title { font-weight: 800; font-size: .95rem; margin-bottom: 10px; color: var(--ink); }

.sched-month-header { display: grid; grid-template-columns: repeat(7,1fr); gap: 2px; margin-bottom: 3px; }

.sched-month-header div { font-size: .62rem; font-weight: 800; text-transform: uppercase; color: var(--muted); text-align: center; padding: 3px; }

.sched-month-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 2px; margin-bottom: 20px; }

.sched-cal-cell { min-height: 58px; border: 1px solid #e5e7eb; border-radius: 6px; padding: 4px 5px; font-size: .68rem; background: var(--paper); transition: background .1s; }

.sched-cal-cell.has-shoot { background: #eff6ff; border-color: #93c5fd; cursor: pointer; }

.sched-cal-cell.has-shoot:hover { background: #dbeafe; }

.sched-cal-cell.today { border: 2px solid var(--brand); }

.sched-cal-cell.cal-weekend { background: #fafafa; }

.sched-cal-cell.other-month { opacity: .28; }

.sched-cal-daynum { font-weight: 800; font-size: .7rem; color: var(--muted); margin-bottom: 3px; }

.sched-cal-shoot-badge { background: var(--brand); color: #fff; border-radius: 4px; padding: 1px 5px; font-size: .6rem; font-weight: 800; display: block; margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sched-cal-scenes { font-size: .58rem; color: var(--muted); }

body.dark .sched-cal-cell { border-color: #2a2a3a; }

body.dark .sched-cal-cell.has-shoot { background: #1e3a5f; border-color: #2563eb; }

body.dark .sched-cal-cell.cal-weekend { background: #0f1320; }

.sched-day-header-meta {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      align-items: center;
    }

.sched-day-stat {
      font-size: .72rem;
      font-weight: 700;
      opacity: .88;
      white-space: nowrap;
    }

.sched-day-stat + .sched-day-stat::before {
      content: '·';
      margin-right: 10px;
      opacity: .6;
    }

/* Fields grid — 2 columns on desktop, stacked on mobile */
    .sched-fields-grid {
      display: grid;
      grid-template-columns: 1fr 2fr;
      gap: 0;
      border-bottom: 1px solid var(--line);
      background: rgba(var(--brand-rgb),.025);
    }

.sched-field-group {
      padding: 10px 14px;
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

.sched-field-group + .sched-field-group {
      border-left: 1px solid var(--line);
    }

.sched-field-label {
      font-size: .68rem;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: .07em;
      color: var(--muted);
      white-space: nowrap;
    }

.sched-field-input {
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 7px 10px;
      font: inherit;
      font-size: .84rem;
      background: var(--paper);
      color: var(--ink);
      min-height: var(--touch-target);
      width: 100%;
      box-sizing: border-box;
      transition: border-color .12s;
    }

.sched-field-input:focus {
      outline: none;
      border-color: var(--brand);
      box-shadow: 0 0 0 3px rgba(var(--brand-rgb),.12);
    }

/* Scene list */
    .sched-scenes-list {
      padding: 0;
    }

.sched-scene-row {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      padding: 11px 14px;
      border-bottom: 1px solid var(--line);
    }

.sched-scene-row:last-child { border-bottom: none; }

.sched-scene-num {
      font-weight: 900;
      font-size: .78rem;
      color: var(--brand);
      min-width: 22px;
      padding-top: 2px;
      flex-shrink: 0;
      text-align: center;
      background: rgba(var(--brand-rgb),.08);
      border-radius: 5px;
      padding: 2px 5px;
      line-height: 1.5;
    }

.sched-scene-body {
      flex: 1;
      min-width: 0;
    }

.sched-scene-top {
      display: flex;
      align-items: flex-start;
      gap: 8px;
      justify-content: space-between;
    }

.sched-scene-slug {
      font-weight: 700;
      font-size: .84rem;
      flex: 1;
      min-width: 0;
      word-break: break-word;
    }

.sched-scene-badges {
      display: flex;
      gap: 5px;
      align-items: center;
      flex-shrink: 0;
    }

.sched-scene-pages {
      font-size: .7rem;
      font-weight: 800;
      color: var(--muted);
      background: rgba(0,0,0,.05);
      border-radius: 5px;
      padding: 1px 5px;
    }

.sched-scene-summary {
      font-size: .75rem;
      color: var(--muted);
      margin-top: 3px;
      line-height: 1.4;
    }

/* Scene meta chips */
    .sched-scene-meta-row {
      display: flex;
      flex-wrap: wrap;
      gap: 5px;
      margin-top: 5px;
    }

.sched-meta-chip {
      font-size: .68rem;
      font-weight: 600;
      padding: 2px 7px;
      border-radius: 999px;
      border: 1px solid transparent;
      white-space: nowrap;
      max-width: 180px;
      overflow: hidden;
      text-overflow: ellipsis;
    }

.sched-chip-cast  { background: rgba(22,163,74,.08);   border-color: rgba(22,163,74,.25);   color: #15803d; }

.sched-chip-loc   { background: rgba(37,99,235,.08);   border-color: rgba(37,99,235,.25);   color: #1d4ed8; }

.sched-chip-prop  { background: rgba(217,119,6,.08);   border-color: rgba(217,119,6,.25);   color: #b45309; }

.sched-no-scenes {
      padding: 14px 16px;
      font-size: .8rem;
      color: var(--muted);
      font-style: italic;
    }

/* Notes section */
    .sched-notes-section {
      padding: 10px 14px 14px;
      background: rgba(0,0,0,.018);
      border-top: 1px solid var(--line);
    }

.sched-notes-input {
      width: 100%;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--paper);
      font: inherit;
      font-size: .82rem;
      color: var(--muted);
      resize: vertical;
      outline: none;
      padding: 8px 10px;
      min-height: 60px;
      box-sizing: border-box;
      transition: border-color .12s, color .12s;
    }

.sched-notes-input:focus { color: var(--ink); border-color: var(--brand); }

/* Dark mode overrides */
    body.dark .sched-day-card { border-color: #2d3447; background: var(--paper); }

body.dark .sched-field-group { background: transparent; }

body.dark .sched-fields-grid { background: rgba(255,255,255,.02); border-bottom-color: #2d3447; }

body.dark .sched-field-group + .sched-field-group { border-left-color: #2d3447; }

body.dark .sched-field-input { background: #252d42; border-color: #2d3447; color: var(--ink); }

body.dark .sched-scene-row { border-bottom-color: #2d3447; }

body.dark .sched-notes-section { background: rgba(255,255,255,.015); border-top-color: #2d3447; }

body.dark .sched-notes-input { background: #252d42; border-color: #2d3447; }

body.dark .sched-chip-cast  { background: rgba(52,211,153,.07); border-color: rgba(52,211,153,.2); color: #34d399; }

body.dark .sched-chip-loc   { background: rgba(77,142,248,.07); border-color: rgba(77,142,248,.2); color: #4d8ef8; }

body.dark .sched-chip-prop  { background: rgba(251,191,36,.07); border-color: rgba(251,191,36,.2); color: #fbbf24; }

body.dark .sched-summary-pill { background: rgba(77,142,248,.1); border-color: rgba(77,142,248,.2); }

body.dark .sched-scene-pages { background: rgba(255,255,255,.07); }

#schedule-config-bar {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 10px;
      margin-bottom: 20px;
      padding: 14px;
      background: rgba(var(--brand-rgb),.04);
      border: 1px solid rgba(var(--brand-rgb),.12);
      border-radius: 14px;
    }

.sched-config-field {
      display: flex;
      flex-direction: column;
      gap: 5px;
    }

.sched-config-field input,
    .sched-config-field select {
      min-height: var(--touch-target);
      padding: 6px 10px;
      font-size: .85rem;
      border-radius: 8px;
      border: 1px solid var(--line);
      background: var(--paper);
      color: var(--ink);
      font: inherit;
    }

.sched-config-field input:focus,
    .sched-config-field select:focus {
      outline: none;
      border-color: var(--brand);
    }

body.dark #schedule-config-bar { background: rgba(255,255,255,.03); border-color: #2d3447; }

body.dark .sched-config-field input,
    body.dark .sched-config-field select { background: #252d42; border-color: #2d3447; color: var(--ink); }

/* Mobile overrides for schedule */
    @media (max-width: 760px) {
      #schedule-config-bar { grid-template-columns: 1fr 1fr; }
      .sched-config-field:last-child { grid-column: 1 / -1; }
      .sched-fields-grid { grid-template-columns: 1fr; }
      .sched-field-group + .sched-field-group { border-left: none; border-top: 1px solid var(--line); }
      body.dark .sched-field-group + .sched-field-group { border-top-color: #2d3447; }
      .sched-scene-meta-row .sched-meta-chip { max-width: 140px; }
    }

/* ── 10. Card header action rows: consistent right-side layout */
    /* Target the pattern used in Locations, Schedule, Auditions, etc. */
    .card > div:first-child {
      align-items: flex-start;
    }

/* ── 10. SCHEDULE CONFIG BAR — compact row on small screens ── */
    @media (max-width: 480px) {
      #schedule-config-bar {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        padding: 10px;
      }
      .sched-config-field:first-child {
        grid-column: 1 / -1;  /* date takes full width so picker opens cleanly */
      }
      .sched-config-field:last-child {
        grid-column: auto;
      }
      .sched-config-field input,
      .sched-config-field select {
        min-height: 36px;
        font-size: .78rem;
        padding: 4px 8px;
      }
    }

/* ── 16. SCHED DAY HEADER — prevent stat labels from wrapping oddly ── */
    @media (max-width: 480px) {
      .sched-day-header-meta {
        gap: 6px 14px;
      }
      .sched-day-stat {
        font-size: .7rem;
      }
    }
