/* MediaHaus Portal — shared design system.
   Mobile-first, system fonts, dark text on white, #1a1a1a accent. */

:root {
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --line: #e5e5e5;
  --bg: #ffffff;
  --bg-soft: #f7f7f7;
  --accent: #1a1a1a;
  --ok: #1f9d55;
  --warn: #c2410c;
  --danger: #b91c1c;
  --radius: 10px;
  --maxw: 760px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); }

/* Top bar with wordmark */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}
.wordmark {
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 18px;
  text-decoration: none;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
}
.wordmark img.logo { height: 90px; width: auto; display: block; }
.topbar .topbar-right { font-size: 14px; color: var(--muted); display: flex; gap: 14px; align-items: center; }

/* Page container */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 24px 20px 64px;
}

h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 16px; margin: 28px 0 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }
p.lead { color: var(--muted); margin-top: 0; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 12px 18px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  width: 100%;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn.secondary { background: #fff; color: var(--ink); }
.btn.small { width: auto; padding: 8px 14px; font-size: 14px; }

/* Inputs */
label.field { display: block; margin: 16px 0 6px; font-weight: 600; font-size: 14px; }
input[type="email"], input[type="text"], textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 16px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}
textarea { min-height: 90px; resize: vertical; }

/* Cards */
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  display: block;
}
.card:hover { border-color: #cfcfcf; }

/* Status badges */
.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--muted);
  border: 1px solid var(--line);
}
.badge.scheduled { background: #eef3ff; color: #1d4ed8; border-color: #dbe4ff; }
.badge.uploaded  { background: #ecfdf3; color: #1f9d55; border-color: #cdeed9; }
.badge.culling   { background: #fff7ed; color: #c2410c; border-color: #fde6cf; }
.badge.editing   { background: #faf5ff; color: #7c3aed; border-color: #ecdcff; }
.badge.delivered { background: #f1f5f9; color: #334155; border-color: #e2e8f0; }

/* Helpers */
.muted { color: var(--muted); }
.notice { padding: 12px 14px; border-radius: var(--radius); background: var(--bg-soft); border: 1px solid var(--line); font-size: 14px; }
.notice.error { background: #fef2f2; border-color: #fecaca; color: var(--danger); }
.notice.ok { background: #ecfdf3; border-color: #cdeed9; color: var(--ok); }
.hidden { display: none !important; }
.center { text-align: center; }
.row { display: flex; gap: 10px; align-items: center; }
.spacer { height: 12px; }

/* Shoot header */
.shoot-head { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 20px; }
.shoot-head h1 { font-size: 20px; }
.shoot-head .meta { color: var(--muted); font-size: 14px; margin-top: 4px; }

/* Drop zones */
.bins { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 620px) { .bins { grid-template-columns: 1fr 1fr; } }

.bin {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 16px;
  transition: border-color .15s, background .15s;
  background: #fff;
}
.bin.dragover { border-color: var(--ink); background: var(--bg-soft); }
.bin.hasfiles { border-style: solid; border-color: #cdeed9; }
.bin-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.bin-title { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.bin-check { color: var(--ok); font-weight: 700; display: none; }
.bin.hasfiles .bin-check { display: inline; }
.bin-count { font-size: 13px; color: var(--muted); }
.bin-hint { font-size: 13px; color: var(--muted); margin: 2px 0 10px; }
.bin label.browse {
  display: inline-block; cursor: pointer; font-size: 14px; font-weight: 600;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; background: #fff;
}
.bin label.browse:hover { border-color: #cfcfcf; }
.bin input[type="file"] { display: none; }

/* Upload summary + (collapsible) file rows */
.files { margin-top: 12px; }
.upsummary { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.upsummary .uptext { color: var(--ink); font-weight: 600; }
.upsummary.hasfail .uptext { color: var(--danger); }
.uptoggle { margin-left: auto; background: none; border: none; color: var(--ink); text-decoration: underline; cursor: pointer; font-size: 13px; padding: 0; }
.upfiles { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.file {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 10px;
  align-items: center; font-size: 13px;
}
.file .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file .state { font-size: 12px; color: var(--muted); justify-self: end; }
.file .state.done { color: var(--ok); }
.file .state.error { color: var(--danger); }
.file .bar { grid-column: 1 / -1; height: 6px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; }
.file .bar > i { display: block; height: 100%; width: 0; background: var(--ink); transition: width .15s; }
.file .bar > i.done { background: var(--ok); }
.file .bar > i.error { background: var(--danger); }
.file .retry { grid-column: 1 / -1; justify-self: start; font-size: 12px; padding: 4px 10px; }

/* Admin status tabs */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 20px; }
.tab {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 7px 14px; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--muted);
}
.tab.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Admin intake block + done chips */
.intake { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 12px 0; }
.intake .notes { font-size: 16px; white-space: pre-wrap; }
.intake .issues { color: var(--warn); font-size: 14px; margin-top: 8px; white-space: pre-wrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.chip { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); background: #fff; }
.chip.on { background: #ecfdf3; color: var(--ok); border-color: #cdeed9; }

.admin-card .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.statusset { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.statusset select { padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; background: #fff; color: var(--ink); }

/* Bin file gallery (view / delete actual Dropbox files) */
.viewfiles { margin-top: 10px; }
.gallery { margin-top: 10px; }
.gallery.fs { position: fixed; inset: 0; z-index: 1000; margin: 0; background: #fff; overflow: auto; padding: 12px 16px; }
.gallery.fs .gallery-bar { position: sticky; top: 0; background: #fff; padding: 10px 0; z-index: 1; margin-bottom: 12px; }
.gallery.fs .tiles, .gallery.fs .bgrid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.gallery.fs .bracket-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.gallery.fs .tile .thumb { height: auto; aspect-ratio: 3 / 2; }
.gallery.fs .tile .fname { font-size: 12px; }
.gallery .note { font-size: 13px; color: var(--muted); padding: 4px 0; }
.gallery .tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.bgrid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.bcard { position: relative; }
.bcard.expanded { grid-column: 1 / -1; border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.bbadge { position: absolute; top: 3px; right: 3px; background: rgba(0,0,0,.65); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.bexpand { position: absolute; bottom: 22px; right: 3px; width: 22px; height: 22px; border: none; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; font-size: 13px; line-height: 22px; padding: 0; }
.bexpand:hover { background: var(--ink); }
.bracket-head { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.bracket-head label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.bracket-head input { width: 16px; height: 16px; }
.bcollapse { margin-left: auto; background: none; border: none; color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 700; }
.bracket-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 8px; }
.tile { position: relative; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--bg-soft); }
.tile .thumb { width: 100%; height: 92px; object-fit: cover; display: block; background: var(--bg-soft); }
.tile .thumb.placeholder { display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--muted); }
.tile .fname { font-size: 10px; padding: 3px 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.tile { cursor: pointer; }
.tile.selected { outline: 3px solid var(--ink); outline-offset: -3px; }
.tile .check {
  position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: 13px; line-height: 20px; text-align: center; display: none;
}
.tile.selected .check { display: block; }
.gallery-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.gallery-bar .count { font-size: 13px; color: var(--muted); margin-left: auto; }
.stacklbl { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.stacklbl select { padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }

/* Intake checkboxes */
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.checks label { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 15px; }
.checks input { width: 18px; height: 18px; }

/* ===== Mission Control hub ===== */
.nav { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.nav a { font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 999px; }
.nav a.active, .nav a:hover { color: var(--ink); background: var(--bg-soft); }
.wordmark .sub { font-weight: 600; letter-spacing: .06em; color: var(--muted); font-size: 11px; margin-left: 8px; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 6px 0 18px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.seg button { border: none; background: #fff; color: var(--muted); font-size: 13px; font-weight: 600; padding: 7px 12px; cursor: pointer; }
.seg button.on { background: var(--ink); color: #fff; }

.idea { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; background: #fff; }
.idea h3 { margin: 0 0 4px; font-size: 16px; }
.idea .detail { color: #444; font-size: 14px; white-space: pre-wrap; margin: 4px 0 10px; }
.idea .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.pill { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-soft); color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.pill.mediahaus { background: #eef3ff; color: #1d4ed8; border-color: #dbe4ff; }
.pill.hc_photo { background: #faf5ff; color: #7c3aed; border-color: #ecdcff; }
.pill.both { background: #ecfdf3; color: #1f9d55; border-color: #cdeed9; }
.idea .actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.vote { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; cursor: pointer; font-size: 13px; font-weight: 700; }
.vote:hover { border-color: #cfcfcf; }
.idea select { padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; background: #fff; }
.comments { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.comment { font-size: 13px; margin: 6px 0; }
.comment .who { color: var(--muted); font-size: 11px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px,1fr)); gap: 12px; margin: 12px 0 8px; }
.stat { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.stat .n { font-size: 26px; font-weight: 800; }
.stat .l { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
