/* The Loading Dock — utilitarian NWB-adjacent. One screen, no modes. */
:root {
  --magenta: #d3258b; --lime: #b8d33c; --amber: #e8a33d; --red: #d64545;
  --paper: #fff; --soft: #f7f6f2; --ink: #1c1916; --mute: #807a72; --line: #e6e1d4;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 Inter, system-ui, sans-serif; background: var(--soft); color: var(--ink); }
h1, h2 { font-family: Outfit, sans-serif; margin: 0 0 8px; }
button { font: inherit; cursor: pointer; }

/* gate */
.gate { position: fixed; inset: 0; background: var(--soft); z-index: 100; display: flex; align-items: center; justify-content: center; }
.gate[hidden] { display: none; }   /* display:flex would otherwise defeat the hidden attribute */
.gate-card { background: var(--paper); border: 1px solid var(--line); padding: 36px; width: min(400px, 92vw); }
.gate-card input { width: 100%; padding: 12px; margin: 12px 0; border: 1px solid var(--line); font: inherit; }
.gate-card button { width: 100%; padding: 12px; background: var(--magenta); color: #fff; border: 0; font-weight: 600; }
.gate-err { color: var(--red); }

/* top bar */
.top { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center;
  gap: 12px; padding: 12px 20px; background: var(--paper); border-bottom: 2px solid var(--ink); flex-wrap: wrap; }
.top-brand { font-size: 17px; }
.top-controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.top-controls input[type=date] { padding: 8px 10px; border: 1px solid var(--line); font: inherit; }
#syncBtn { padding: 8px 14px; background: var(--ink); color: #fff; border: 0; }
.sync-note { font-size: 12px; color: var(--mute); }

/* day list */
.day { max-width: 1080px; margin: 0 auto; padding: 20px; display: grid; gap: 20px; }
.empty { text-align: center; padding: 60px 0; color: var(--mute); }
.muted { color: var(--mute); font-size: 13px; }

/* shoot card */
.shoot { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--magenta); }
.shoot.is-delivered { border-left-color: var(--lime); }
.shoot-head { display: flex; justify-content: space-between; gap: 12px; padding: 16px 20px; flex-wrap: wrap; }
.shoot-title { font-family: Outfit, sans-serif; font-weight: 700; font-size: 18px; }
.shoot-meta { font-size: 13px; color: var(--mute); }
.shoot-meta .chip { display: inline-block; background: var(--soft); border: 1px solid var(--line);
  padding: 2px 8px; margin: 2px 4px 0 0; border-radius: 3px; font-size: 12px; }
.chip.src-acuity { border-color: var(--amber); color: #8a6320; }
.shoot-actions { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.btn-primary { background: var(--magenta); color: #fff; border: 0; padding: 10px 18px; font-weight: 600; }
.btn-primary:disabled { background: #d8b8ca; cursor: not-allowed; }
.btn-ghost { background: transparent; border: 1px solid var(--line); padding: 10px 14px; }
.btn-danger { background: var(--red); color: #fff; border: 0; padding: 10px 18px; font-weight: 600; }
.deliver-note { font-size: 12px; color: var(--amber); font-weight: 600; }
.live-link { font-size: 12px; }
.live-link a { color: var(--magenta); word-break: break-all; }

/* bulk drop strip */
.bulk { margin: 0 20px; padding: 10px 14px; border: 2px dashed var(--line); text-align: center;
  color: var(--mute); font-size: 13px; transition: border-color .15s, background .15s; }
.bulk.drag { border-color: var(--magenta); background: #fdf0f7; color: var(--ink); }

/* containers */
.containers { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; padding: 16px 20px 20px; }
.cont { border: 1px solid var(--line); background: var(--paper); }
.cont-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.cont-name { font-weight: 600; font-size: 14px; }
.cont-badge { font-size: 12px; padding: 2px 8px; border-radius: 999px; font-weight: 600; }
.cont-badge.empty   { background: var(--soft); color: var(--mute); }
.cont-badge.partial { background: #fdf2df; color: #9a6c15; border: 1px solid var(--amber); }
.cont-badge.filled  { background: #f0f7d6; color: #5d7016; }
.cont-drop { min-height: 74px; padding: 10px 12px; transition: background .15s, outline .15s; outline: 2px dashed transparent; outline-offset: -6px; }
.cont-drop.drag { outline-color: var(--magenta); background: #fdf0f7; }
.cont-hint { color: var(--mute); font-size: 12px; text-align: center; padding: 14px 0; }
.cont-link-row { display: flex; gap: 6px; padding: 0 12px 12px; }
.cont-link-row input { flex: 1; padding: 8px; border: 1px solid var(--line); font: inherit; font-size: 13px; }
.cont-link-row button { padding: 8px 12px; background: var(--ink); color: #fff; border: 0; }

/* per-file rows: the visible state chain (R3) */
.file { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.file:last-child { border-bottom: 0; }
.file-thumb { width: 56px; height: 38px; object-fit: cover; background: #ddd; flex-shrink: 0; }
.file-main { flex: 1; min-width: 0; }
.file-name { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-state { font-size: 11px; color: var(--mute); }
.file-state .st { padding: 1px 6px; border-radius: 3px; margin-right: 4px; }
.st.on { background: #f0f7d6; color: #5d7016; }
.st.now { background: #fdf2df; color: #9a6c15; animation: pulse 1.2s infinite; }
.st.err { background: #fbdddd; color: var(--red); font-weight: 700; }
@keyframes pulse { 50% { opacity: .5; } }
.file-bar { height: 4px; background: var(--soft); margin-top: 4px; }
.file-bar i { display: block; height: 100%; background: var(--magenta); width: 0; transition: width .2s; }

/* modals */
.modal { position: fixed; inset: 0; background: rgba(28,25,22,.5); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-card { background: var(--paper); padding: 24px; width: min(560px, 96vw); max-height: 92vh; overflow: auto; }
.modal-wide { width: min(1100px, 96vw); }
.modal-row { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.map-row, .sort-row { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line); flex-wrap: wrap; }
.map-row select, .sort-row select { padding: 6px; font: inherit; }
#pfFrame { width: 100%; height: min(64vh, 640px); border: 1px solid var(--line); background: #111; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff;
  padding: 12px 20px; z-index: 90; font-size: 14px; max-width: 92vw; }

@media (max-width: 640px) {
  .containers { grid-template-columns: 1fr; }
  .shoot-head { flex-direction: column; }
}
