/* shots.felixv.com/portal — model portal. Same ground and type as the site (build.py STYLE). */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: #0b0b0c;
  color: #e8e6e3;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ------- header bar (all portal pages) ------- */
.bar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 18px clamp(14px, 3vw, 34px);
}
.bar-home img { width: 280px; opacity: 0.9; }
.bar-home:hover img { opacity: 1; }
.bar-title { display: flex; align-items: baseline; gap: 6px 12px; min-width: 0; flex-wrap: wrap; }
.bar-title h1 { font-size: 16px; font-weight: 300; letter-spacing: 0.2em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-count { font-size: 12px; color: #8d8983; letter-spacing: 0.06em; }
.nav { margin-left: auto; display: flex; gap: 18px; align-items: center; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: #a5a19a; }
.nav a:hover, .nav a.current { color: #fff; }
.nav button { background: none; border: none; cursor: pointer; letter-spacing: inherit; text-transform: inherit; font-size: inherit; color: inherit; padding: 0; }
.nav button:hover { color: #fff; }

/* ------- generic panels and forms ------- */
main { padding: 0 clamp(14px, 3vw, 34px) 40px; max-width: 1500px; margin: 0 auto; }
.panel { max-width: 520px; margin: 8vh auto 0; }
.panel h2 { font-size: 15px; font-weight: 300; letter-spacing: 0.24em; text-transform: uppercase; margin-bottom: 18px; color: #d9d6d1; }
.panel p { color: #b5b1aa; margin-bottom: 14px; }
.field { display: block; margin-bottom: 16px; }
.field span { display: block; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: #8d8983; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 12px;
  background: #141416; border: 1px solid #2a2a2e; border-radius: 3px;
  color: #e8e6e3; outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: #6d6a65; }
.field input[type="date"] { color-scheme: dark; }
.field textarea { resize: vertical; min-height: 96px; line-height: 1.45; }
.field small { display: block; margin-top: 5px; color: #6d6a65; font-size: 12px; }
.btn {
  display: inline-block; padding: 11px 22px; cursor: pointer;
  background: #e8e6e3; color: #0b0b0c; border: 1px solid #e8e6e3; border-radius: 3px;
  font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase;
}
.btn:hover { background: #fff; }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.quiet { background: none; color: #d9d6d1; border-color: #3a3a3f; }
.btn.quiet:hover { border-color: #8d8983; color: #fff; }
.note { font-size: 13px; color: #9a968f; margin-top: 14px; }
.note.ok { color: #9ccb9a; }
.note.err { color: #e0928a; }
.credit { font-size: 13px; color: #8d8983; margin: -6px 0 18px; }
.credit strong { font-weight: 400; color: #e8e6e3; }
.site-foot {
  text-align: center;
  padding: 40px 24px 36px;
  font-size: 12px;
  color: #6d6a65;
  letter-spacing: 0.08em;
}
.site-foot a { color: #9a968f; text-decoration: underline; text-underline-offset: 3px; }
.site-foot a:hover { color: #fff; }
.empty { color: #8d8983; padding: 40px 0; text-align: center; }
.pill { display: inline-block; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; padding: 2px 8px; border: 1px solid #3a3a3f; border-radius: 10px; color: #b5b1aa; white-space: nowrap; }
.pill.admin { border-color: #9a968f; color: #fff; }

/* ------- my shoots ------- */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(440px, 100%), 1fr));  /* auto-fill: one shoot does not become one giant tile */
  gap: 14px;
}
.tile { position: relative; overflow: hidden; aspect-ratio: 3 / 2; background: #141416; display: block; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease, opacity 0.6s ease; opacity: 0.92; }
.tile:hover img { transform: scale(1.025); opacity: 1; }
.tile .pill.source { position: absolute; top: 12px; left: 12px; z-index: 1; background: rgba(11, 11, 12, 0.55); }
.tile-label {
  position: absolute; inset: auto 0 0 0;
  padding: 42px 22px 18px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.62));
  display: flex; align-items: flex-end; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap;
}
.tile-name { font-size: 21px; font-weight: 300; letter-spacing: 0.14em; text-transform: uppercase; }
.tile-meta { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.tile-count { font-size: 12px; color: #b5b1aa; letter-spacing: 0.08em; white-space: nowrap; }
.tile-counts { font-size: 11px; color: #9a968f; letter-spacing: 0.06em; }

/* ------- shoot grid ------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(250px, 44vw), 1fr));
  gap: 14px 10px;
}
.cell { display: block; min-width: 0; }
.cell-img { display: block; aspect-ratio: 4 / 5; overflow: hidden; background: #141416; position: relative; }
.cell-img img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.35s ease, transform 0.6s ease; opacity: 0.93; }
.cell-img:hover img { opacity: 1; transform: scale(1.02); }
.cell-img .unavailable {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #6d6a65; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; text-align: center; padding: 12px;
}
.cell-meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 7px 2px 0; font-size: 12px; color: #8d8983; }
.cell-shot { letter-spacing: 0.08em; white-space: nowrap; line-height: 28px; }
.cell-ticks { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; min-width: 0; }
.tick { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; color: #b5b1aa; min-height: 28px; user-select: none; -webkit-user-select: none; }
.tick input { width: 18px; height: 18px; accent-color: #e8e6e3; cursor: pointer; margin: 0; flex: none; }
.tick:hover { color: #fff; }
.tick.on { color: #e8e6e3; }
.tick.saving { opacity: 0.6; }
.tick[data-state="error"] { color: #e0928a; }
.others { font-size: 11px; color: #8d8983; padding: 2px 2px 0; }

/* ------- edit shoot details (admin) ------- */
.details { max-width: 920px; margin: 0 0 22px; border: 1px solid #1f1f22; border-radius: 3px; padding: 0 16px; }
.details summary {
  cursor: pointer; padding: 13px 0; list-style: none;
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: #a5a19a;
  user-select: none; -webkit-user-select: none;
}
.details summary::-webkit-details-marker { display: none; }
.details summary::before { content: "\203A"; font-size: 18px; line-height: 1; transition: transform 0.2s ease; }
.details[open] summary::before { transform: rotate(90deg); }
.details summary:hover { color: #fff; }
.details form { padding: 6px 0 16px; }
.details-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 0 20px; }
.field-wide { grid-column: 1 / -1; }
.details-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.details-actions .note { margin: 0; }

/* ------- fullscreen viewer (overlay) ------- */
#viewer { position: fixed; inset: 0; z-index: 10; }
#stage { position: absolute; inset: 0; background: #060607; cursor: pointer; }
#stage img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; opacity: 0; transition: opacity 0.28s ease;
  user-select: none; -webkit-user-select: none;
}
#stage img.visible { opacity: 1; }
.viewer-chrome {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px clamp(12px, 3vw, 30px) 24px;
  padding-top: max(14px, env(safe-area-inset-top));
  background: linear-gradient(rgba(0, 0, 0, 0.6), transparent);
  transition: opacity 0.4s ease;
  z-index: 3;
}
.viewer-chrome.hidden { opacity: 0; pointer-events: none; }
.chrome-back { font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: #d9d6d1; white-space: nowrap; }
.chrome-back:hover { color: #fff; }
.chrome-counter { margin-left: auto; font-size: 13px; color: #a5a19a; letter-spacing: 0.1em; white-space: nowrap; }
.viewer-foot {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 26px clamp(12px, 3vw, 30px) 14px;
  padding-bottom: max(14px, env(safe-area-inset-bottom));
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
  transition: opacity 0.4s ease;
  z-index: 3;
  font-size: 12px; color: #9a968f;
}
.viewer-foot.hidden { opacity: 0; pointer-events: none; }
.viewer-ticks { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; }
.viewer-foot .tick { font-size: 13px; }
.viewer-foot a { text-decoration: underline; text-underline-offset: 3px; }
.viewer-foot a:hover { color: #fff; }
.nav-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 2; background: none; border: none; cursor: pointer;
  color: rgba(255, 255, 255, 0.55); font-size: 54px; font-weight: 200;
  padding: 30px 18px; transition: color 0.25s ease, opacity 0.4s ease;
}
.nav-arrow:hover { color: #fff; }
.nav-prev { left: 4px; }
.nav-next { right: 4px; }
#viewer.idle .nav-arrow { opacity: 0; }
#viewer.idle #stage { cursor: none; }
@media (hover: none) { .nav-arrow { display: none; } }

/* ------- admin ------- */
.admin h2 { font-size: 14px; font-weight: 300; letter-spacing: 0.24em; text-transform: uppercase; margin: 30px 0 12px; color: #d9d6d1; }
.admin p { color: #9a968f; font-size: 13px; margin-bottom: 12px; }
.admin code { background: #141416; padding: 1px 6px; border-radius: 3px; font-size: 12px; color: #d9d6d1; }
.table-wrap { overflow-x: auto; max-width: 100%; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid #1f1f22; vertical-align: top; }
th { font-weight: 400; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: #8d8983; }
td .muted { color: #6d6a65; }
.assign { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.assign .tick { min-height: 24px; font-size: 12px; }
td .credit-line { color: #e8e6e3; }
td .handle { color: #b5b1aa; white-space: nowrap; }
td .bad { color: #e0928a; }
.edit-link { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: #a5a19a; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.edit-link:hover { color: #fff; }

/* ------- edit a model's profile (admin) ------- */
.panel-back { margin-bottom: 16px; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; }
.panel-back a { color: #a5a19a; }
.panel-back a:hover { color: #fff; }
.panel p strong { font-weight: 400; color: #e8e6e3; }

@media (max-width: 640px) {
  .bar-home img { width: 180px; }
  .tile { aspect-ratio: 4 / 3; }
  .bar-title h1 { font-size: 14px; letter-spacing: 0.14em; }
  .nav { gap: 12px; font-size: 11px; }
  .details { padding: 0 12px; }
}

.credit-note { margin: 0 0 18px; padding: 12px 14px; border: 1px solid #2a2a2a; color: #d9d6d1; font-size: 14px; line-height: 1.5; }

/* ------- high-res download (under the credit note, above the grid) ------- */
.download-note { margin: -6px 0 20px; font-size: 14px; color: #b5b1aa; display: flex; align-items: baseline; gap: 6px 12px; flex-wrap: wrap; }
.download-note a.download { color: #e8e6e3; text-decoration: underline; text-underline-offset: 3px; }
.download-note a.download:hover { color: #fff; }
.download-note a.download.busy { opacity: 0.6; cursor: progress; }
.download-note .note { margin: 0; }
