/* styles.css — Bird Upload Platform static site.
   Aesthetic matches bird-model/report.html: light, card-based, soft borders,
   trebuchet/verdana stack, coloured callouts + chips. No framework, no build. */

:root {
  --bd: #e3e3e8;
  --fg: #1a1a1f;
  --mut: #6b7280;
  --ac: #ff2d55;
  --green-bg: #dcfce7;
  --yellow-bg: #fef9c3;
  --neutral-bg: #f3f4f6;
  --blue-bg: #eff6ff;
  --card-bg: #fff;
}

* { box-sizing: border-box; }

body {
  font: 15px/1.6 "trebuchet ms", verdana, arial, sans-serif;
  color: var(--fg);
  margin: 0;
  background: #fafafb;
}

a { color: #1e40af; text-decoration: none; }
a:hover { text-decoration: underline; }

header {
  position: sticky;
  top: 0;
  background: #fff;
  border-bottom: 1px solid var(--bd);
  padding: 14px 22px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
header .brand h1 { margin: 0 0 3px; font-size: 19px; }
header .brand p { margin: 0; color: var(--mut); font-size: 13px; }

nav.topnav { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
nav.topnav a {
  padding: 7px 12px;
  border-radius: 8px;
  color: var(--fg);
  font-size: 14px;
}
nav.topnav a:hover { background: var(--neutral-bg); text-decoration: none; }
nav.topnav a.active { background: #111827; color: #fff; }

main { max-width: 1100px; margin: 0 auto; padding: 24px 22px 64px; }

h2 { font-size: 22px; margin: 0 0 4px; }
.lede { color: var(--mut); margin: 0 0 20px; }

.card {
  background: var(--card-bg);
  border: 1px solid var(--bd);
  border-radius: 12px;
  padding: 18px 20px;
  margin: 0 0 18px;
}
.card h3 { margin: 0 0 10px; font-size: 17px; }
.card h4 { margin: 16px 0 6px; font-size: 14px; color: var(--mut); font-weight: 700; }
.card p { margin: 8px 0; }

.callout { border-radius: 8px; padding: 12px 14px; margin: 14px 0; font-size: 14px; }
.callout-green   { background: var(--green-bg);   border-left: 3px solid #22c55e; }
.callout-yellow  { background: var(--yellow-bg);  border-left: 3px solid #eab308; }
.callout-neutral { background: var(--neutral-bg); border-left: 3px solid var(--bd); }
.callout-blue    { background: var(--blue-bg);    border-left: 3px solid #3b82f6; }
.callout-red     { background: #fee2e2;           border-left: 3px solid #ef4444; }

.chip {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}
.chip-green   { background: var(--green-bg);   color: #166534; }
.chip-yellow  { background: var(--yellow-bg);  color: #854d0e; }
.chip-red     { background: #fee2e2;           color: #991b1b; }
.chip-blue    { background: var(--blue-bg);    color: #1e40af; }
.chip-neutral { background: var(--neutral-bg); color: var(--fg); }

/* Filter / form controls */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  margin-bottom: 18px;
}
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 12px; font-weight: 700; color: var(--mut); }
input, select, textarea {
  font: inherit;
  padding: 8px 10px;
  border: 1px solid var(--bd);
  border-radius: 8px;
  background: #fff;
  color: var(--fg);
  min-width: 160px;
}
textarea { min-width: 100%; resize: vertical; }
input[type="file"] { padding: 6px; }

button {
  font: inherit;
  font-weight: 700;
  padding: 9px 16px;
  border: 1px solid #111827;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  cursor: pointer;
}
button:hover { background: #000; }
button.secondary { background: #fff; color: var(--fg); border-color: var(--bd); }
button.secondary:hover { background: var(--neutral-bg); }
button:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-google {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  color: #1a1a1f;
  border: 1px solid var(--bd);
  font-size: 15px;
  padding: 11px 18px;
}
.btn-google:hover { background: var(--neutral-bg); }
.btn-google svg { width: 18px; height: 18px; }

/* Video / crop grids */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.crop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.video-card { padding: 0; overflow: hidden; }
.video-card video, .video-card img { width: 100%; display: block; background: #000; }
.video-card .meta { padding: 12px 14px; }
.video-card .meta h3 { margin: 0 0 6px; font-size: 15px; }
.video-card .meta p { margin: 2px 0; font-size: 13px; color: var(--mut); }

.crop-card { padding: 0; overflow: hidden; }
.crop-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; background: var(--neutral-bg); }
.crop-card .meta { padding: 8px 10px; font-size: 12px; }
.crop-card .meta .sp { font-weight: 700; }

.attribution { color: var(--mut); font-size: 13px; }
.attribution b { color: var(--fg); }

.muted { color: var(--mut); }
.empty { padding: 28px; text-align: center; color: var(--mut); }
.pager { display: flex; gap: 10px; justify-content: center; margin: 22px 0; }

/* Progress bar */
.progress-wrap { background: var(--neutral-bg); border-radius: 8px; overflow: hidden; height: 14px; margin: 8px 0; }
.progress-bar { background: #22c55e; height: 100%; width: 0%; transition: width 0.2s ease; }

/* UP-S8 — processed-video banner */
.notif-banner { position: relative; padding-right: 40px; }
.notif-banner .notif-dismiss {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 0 9px;
  line-height: 1.4;
  font-size: 16px;
  border-radius: 6px;
}

/* UP-S7 — per-clip label review */
.review-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.review-card { display: flex; gap: 14px; padding: 14px; align-items: flex-start; }
.review-card > img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--neutral-bg);
  flex: 0 0 auto;
}
.review-meta { flex: 1 1 auto; min-width: 0; }
.review-meta > div { margin: 0 0 8px; }
.review-topk { font-size: 12px; }
.review-options { display: flex; flex-direction: column; gap: 6px; margin: 10px 0 8px; }
button.review-opt { padding: 7px 12px; font-size: 13px; text-align: left; }
button.review-opt.chosen {
  background: var(--green-bg);
  border-color: #22c55e;
  color: #166534;
}
.review-other { display: flex; gap: 6px; }
.review-other input { min-width: 0; flex: 1 1 auto; }
.review-other.chosen input { border-color: #22c55e; background: var(--green-bg); }
.review-note { display: inline-block; margin-top: 4px; }

.hidden { display: none !important; }
.spinner { color: var(--mut); font-size: 14px; }
footer { border-top: 1px solid var(--bd); padding: 18px 22px; color: var(--mut); font-size: 13px; text-align: center; }
