/* ==========================================================================
   MODEL SEARCH — Johannesburg
   Design language: the casting sheet / comp card. Warm studio paper, ink
   type, one jacaranda-violet accent (the city's own colour, every October).
   Display: Instrument Serif · Body/utility: Instrument Sans
   ========================================================================== */

:root {
  --paper: #f7f5f1;
  --card: #ffffff;
  --ink: #141317;
  --muted: #77747c;
  --line: #e3e0d9;
  --accent: #6c57d8; /* jacaranda */
  --accent-soft: #efecfb;
  --danger: #c0392b;
  --ok: #2e7d54;
  --radius: 4px;
  --font-display: "Instrument Serif", Georgia, serif;
  --font-body: "Instrument Sans", -apple-system, system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
}

button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- Utility type ---- */
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 28px;
  border-bottom: 1px solid var(--ink);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 40;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.wordmark em { color: var(--accent); font-style: italic; }
.wordmark .city {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-left: 10px;
}

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

.credits-pill {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 12px;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 999px;
  background: var(--accent-soft);
}

.btn {
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  padding: 8px 18px;
  font-size: 13px;
  letter-spacing: 0.04em;
  border-radius: var(--radius);
  transition: background 0.15s, color 0.15s;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.accent:hover { background: #5a46c4; }
.btn.small { padding: 5px 12px; font-size: 12px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ==========================================================================
   Layout: casting-sheet filter rail + grid
   ========================================================================== */
.layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: calc(100vh - 70px);
}

.filter-rail {
  border-right: 1px solid var(--line);
  padding: 26px 22px;
  position: sticky;
  top: 70px;
  height: calc(100vh - 70px);
  overflow-y: auto;
}

.filter-rail h2 {
  font-family: var(--font-display);
  font-size: 19px;
  margin-bottom: 4px;
}
.filter-rail .rail-sub { font-size: 12px; color: var(--muted); margin-bottom: 22px; }

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 5px;
}
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--card);
  padding: 8px 10px;
  border-radius: var(--radius);
  color: var(--ink);
}
.field .check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink); text-transform: none; letter-spacing: 0; }
.field .check input { width: auto; }

/* ==========================================================================
   Model grid — comp cards
   ========================================================================== */
.grid-area { padding: 26px 28px 60px; }

.grid-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; }
.grid-head h1 { font-family: var(--font-display); font-size: 34px; font-weight: 400; }
.grid-head .count { font-size: 12px; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; }

.model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
}

.comp-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  text-align: left;
  padding: 0;
  display: block;
  width: 100%;
}
.comp-card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(20, 19, 23, 0.1); }

.comp-photo {
  aspect-ratio: 3 / 4;
  width: 100%;
  object-fit: cover;
  display: block;
  background: var(--line);
}

.comp-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 2px;
}
.comp-name { font-family: var(--font-display); font-size: 18px; }
.badge {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
}
.badge.verified { background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent); }
.badge.featured { background: var(--ink); color: var(--paper); }

/* The comp-card stats strip — the signature element */
.comp-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border-top: 1px solid var(--line);
  margin-top: 8px;
}
.comp-stats div {
  padding: 7px 6px;
  text-align: center;
  border-right: 1px solid var(--line);
}
.comp-stats div:last-child { border-right: none; }
.comp-stats .k { display: block; font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.comp-stats .v { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ==========================================================================
   Profile view (overlay panel)
   ========================================================================== */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 19, 23, 0.5);
  display: flex;
  justify-content: flex-end;
  z-index: 60;
}
.overlay[hidden] { display: none; }

.panel {
  width: min(680px, 100%);
  height: 100%;
  overflow-y: auto;
  background: var(--paper);
  border-left: 1px solid var(--ink);
  padding: 30px 32px 60px;
}

.panel-close { float: right; border: none; background: none; font-size: 26px; line-height: 1; color: var(--muted); }
.panel-close:hover { color: var(--ink); }

.profile-head { margin-bottom: 6px; }
.profile-head h2 { font-family: var(--font-display); font-size: 36px; font-weight: 400; display: inline; margin-right: 10px; }
.profile-meta { color: var(--muted); font-size: 13px; margin-bottom: 16px; }

.stat-table {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  border-collapse: collapse;
  margin: 14px 0 20px;
  font-size: 13px;
}
.stat-table td { padding: 8px 12px; border-bottom: 1px solid var(--line); }
.stat-table tr:last-child td { border-bottom: none; }
.stat-table td:first-child {
  width: 40%;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-box {
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 16px;
  margin: 18px 0;
}
.contact-box h3 { font-family: var(--font-display); font-size: 18px; margin-bottom: 8px; }
.contact-box p.small { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.contact-line { font-size: 14px; margin: 4px 0; }
.contact-line strong { font-variant-numeric: tabular-nums; }

.album { margin-bottom: 26px; }
.album h3 { font-family: var(--font-display); font-size: 20px; margin-bottom: 2px; }
.album .album-desc { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.album-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.album-photos img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); }

.add-photos { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.add-photos label { display: block; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.add-photos input[type="file"] { font-size: 13px; color: var(--ink); }
.new-album-form { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 18px 0; background: var(--card); }

/* Portfolio management: cover photo, delete, album edit */
.profile-photo-wrap { margin-bottom: 14px; }
.profile-photo { width: 160px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); display: block; }
.album-head-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.album-edit-btn { font-size: 11px; padding: 3px 10px; border: 1px solid var(--ink); background: var(--paper); color: var(--ink); border-radius: var(--radius); cursor: pointer; }
.album-edit-btn:hover { background: var(--ink); color: var(--paper); }
.edit-album-form { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 10px 0; background: var(--card); }
.photo-tile { position: relative; }
.photo-tile.is-main img { border-color: var(--accent); border-width: 2px; }
.photo-badge { position: absolute; top: 6px; left: 6px; background: var(--accent); color: #fff; font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; }
.photo-actions { position: absolute; left: 4px; right: 4px; bottom: 4px; display: flex; gap: 4px; justify-content: flex-end; }
.photo-action { font-size: 11px; padding: 3px 8px; border: 1px solid var(--ink); background: var(--paper); color: var(--ink); border-radius: var(--radius); cursor: pointer; }
.photo-action:hover { background: var(--ink); color: var(--paper); }
.photo-action-delete { padding: 3px 9px; }


.report-link { background: none; border: none; color: var(--muted); font-size: 12px; text-decoration: underline; margin-top: 20px; }
.report-link:hover { color: var(--danger); }
.brand-link { background: none; border: none; padding: 0; color: inherit; font: inherit; cursor: pointer; text-decoration: underline; text-decoration-color: transparent; }
.brand-link:hover { text-decoration-color: var(--accent); color: var(--accent); }

/* ==========================================================================
   Modals (auth, unlock, report)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 19, 23, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 80;
  padding: 18px;
}
.modal-backdrop[hidden] { display: none; }

.modal {
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  width: min(460px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 26px;
}
.modal h2 { font-family: var(--font-display); font-size: 24px; font-weight: 400; margin-bottom: 4px; }
.modal .modal-sub { font-size: 13px; color: var(--muted); margin-bottom: 18px; }

.tab-row { display: flex; gap: 6px; margin-bottom: 18px; }
.tab {
  flex: 1;
  border: 1px solid var(--line);
  background: var(--card);
  padding: 8px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--radius);
}
.tab.active { border-color: var(--ink); background: var(--ink); color: var(--paper); }

.form-error { color: var(--danger); font-size: 13px; margin: 8px 0; min-height: 18px; }
.form-ok { color: var(--ok); font-size: 13px; margin: 8px 0; }

.modal .btn { width: 100%; margin-top: 6px; }

/* ==========================================================================
   Inbox / dashboard strip
   ========================================================================== */
.inbox-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
}
.inbox-item .from { font-weight: 600; }
.inbox-item .when { font-size: 11px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; float: right; }
.inbox-item .msg { font-size: 13.5px; margin-top: 6px; color: #3c3a40; }

.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.empty h3 { font-family: var(--font-display); font-size: 22px; color: var(--ink); margin-bottom: 6px; font-weight: 400; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .filter-rail {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .site-header { padding: 14px 16px; }
  .wordmark { font-size: 21px; }
  .wordmark .city { display: block; margin-left: 0; }
  .grid-area { padding: 18px 16px 50px; }
  .panel { width: 100%; padding: 22px 18px 50px; }
}

/* -------------------------------------------------------------------------
   Inquiry status - model accept/decline actions & badges
   ------------------------------------------------------------------------- */
.inbox-actions { display: flex; gap: 8px; margin-top: 10px; }
.inbox-actions .btn { width: auto; margin-top: 0; }
.btn.danger { background: var(--paper); color: var(--danger); border-color: var(--danger); }
.btn.danger:hover { background: var(--danger); color: #fff; }
.badge.pending { background: var(--accent-soft); color: var(--muted); border: 1px solid var(--line); }
.badge.accepted { background: rgba(46, 125, 84, 0.12); color: var(--ok); border: 1px solid var(--ok); }
.badge.declined { background: rgba(192, 57, 43, 0.12); color: var(--danger); border: 1px solid var(--danger); }
.inbox-item .badge { margin-top: 8px; display: inline-block; }

/* ---------------------------------------------------------------------------
   Message thread modal
--------------------------------------------------------------------------- */
.thread-list {
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  margin-bottom: 14px;
  background: var(--card);
}
.thread-msg { margin-bottom: 12px; }
.thread-msg:last-child { margin-bottom: 0; }
.thread-meta { font-size: 11px; color: var(--muted); letter-spacing: 0.06em; margin-bottom: 3px; }
.thread-meta .when { text-transform: uppercase; margin-left: 6px; }
.thread-msg p { font-size: 13.5px; color: var(--ink); }
.thread-msg.mine { text-align: right; }
.thread-actions { display: flex; gap: 8px; }
.thread-actions .btn { width: auto; margin-top: 0; }
.thread-actions #threadClose { margin-left: auto; }

.site-footer { max-width: 1200px; margin: 0 auto; padding: 32px 40px 48px; text-align: center; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }
.site-footer a { color: var(--muted); text-decoration: underline; margin: 0 6px; }
