/* ═══════════════════════════════════════════════════════════════
   VOUCH MVP — Shared Styles
═══════════════════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --navy:    #1A1E3C;
  --navy2:   #13162E;
  --navy3:   #0D0F20;
  --slate:   #3D4875;
  --teal:    #028090;
  --teal-lt: rgba(2,128,144,.15);
  --rose:    #C4607A;
  --rose-lt: rgba(196,96,122,.15);
  --gold:    #D4A574;
  --gold-lt: rgba(212,165,116,.15);
  --cream:   #F8F4F0;
  --cream2:  #EDE8E3;
  --muted:   rgba(248,244,240,.45);
  --border:  rgba(248,244,240,.08);
  --font:    'Inter', system-ui, sans-serif;
  --radius:  16px;
  --radius-lg: 24px;
  --shadow:  0 4px 24px rgba(0,0,0,.25);
  --shadow-lg: 0 16px 60px rgba(0,0,0,.4);
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { font-size:16px; scroll-behavior:smooth; }
body {
  font-family: var(--font);
  background: var(--navy2);
  color: var(--cream);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width:100%; display:block; }
button, input, textarea, select { font-family: var(--font); }
a { color: var(--teal); text-decoration: none; }
::selection { background: var(--teal); color: var(--cream); }
::-webkit-scrollbar { width:5px; }
::-webkit-scrollbar-track { background: var(--navy2); }
::-webkit-scrollbar-thumb { background: var(--slate); border-radius:3px; }

/* ── Layout ─────────────────────────────────────────────────── */
.page { display:flex; flex-direction:column; min-height:100vh; }
.container { max-width:1100px; margin:0 auto; padding:0 24px; width:100%; }
.container-sm { max-width:680px; margin:0 auto; padding:0 24px; width:100%; }
.container-md { max-width:860px; margin:0 auto; padding:0 24px; width:100%; }

/* ── Top Nav ────────────────────────────────────────────────── */
.topnav {
  position:sticky; top:0; z-index:50;
  background: rgba(19,22,46,.9); backdrop-filter:blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px; height: 60px;
  display:flex; align-items:center; justify-content:space-between; gap:16px;
}
.topnav-brand { display:flex; align-items:center; gap:10px; text-decoration:none; }
.topnav-brand svg { width:32px; height:32px; }
.topnav-wordmark { font-size:18px; font-weight:900; letter-spacing:2px; color:var(--cream); }
.topnav-right { display:flex; align-items:center; gap:8px; }
.topnav-user {
  display:flex; align-items:center; gap:8px;
  font-size:13px; color:var(--muted);
}
.role-badge {
  padding:4px 12px; border-radius:100px;
  font-size:11px; font-weight:700; letter-spacing:2px; text-transform:uppercase;
}
.role-badge.voucher { background:var(--gold-lt); color:var(--gold); }
.role-badge.seeker  { background:var(--teal-lt); color:var(--teal); }
.role-badge.catch   { background:var(--rose-lt); color:var(--rose); }
.role-badge.admin   { background:rgba(255,255,255,.08); color:var(--cream); }

/* ── Sidebar Layout ─────────────────────────────────────────── */
.app-layout { display:flex; flex:1; }
.sidebar {
  width:220px; min-height:calc(100vh - 60px);
  background: rgba(13,15,32,.6); border-right:1px solid var(--border);
  padding:24px 0; flex-shrink:0;
  display:flex; flex-direction:column; gap:4px;
}
.sidebar-label {
  font-size:10px; font-weight:700; letter-spacing:4px; text-transform:uppercase;
  color:var(--muted); padding:8px 20px 4px; margin-top:8px;
}
.sidebar-link {
  display:flex; align-items:center; gap:12px;
  padding:10px 20px; border-radius:0;
  font-size:14px; font-weight:500; color:var(--muted);
  text-decoration:none; cursor:pointer; border:none; background:none;
  transition: background .2s, color .2s;
  width:100%; text-align:left;
}
.sidebar-link:hover { background:rgba(248,244,240,.05); color:var(--cream); }
.sidebar-link.active { background:rgba(248,244,240,.07); color:var(--cream); border-right:2px solid var(--teal); }
.sidebar-link svg { width:18px; height:18px; flex-shrink:0; }
.main-content { flex:1; padding:32px 24px; overflow:hidden; }

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: rgba(248,244,240,.04); border:1px solid var(--border);
  border-radius:var(--radius-lg); padding:28px;
  transition: border-color .25s, transform .25s;
}
.card:hover { border-color:rgba(248,244,240,.14); }
.card-sm { padding:20px; border-radius:var(--radius); }

/* ── Profile Cards ──────────────────────────────────────────── */
.profile-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(240px, 1fr)); gap:20px; }
.profile-card {
  background: rgba(248,244,240,.04); border:1px solid var(--border);
  border-radius:var(--radius-lg); overflow:hidden; cursor:pointer;
  transition: transform .25s, border-color .25s, box-shadow .25s;
  text-decoration:none; color:inherit; display:block;
}
.profile-card:hover { transform:translateY(-4px); border-color:rgba(248,244,240,.18); box-shadow:0 16px 40px rgba(0,0,0,.3); }
.profile-card-photo {
  width:100%; aspect-ratio:3/4; object-fit:cover;
  background: linear-gradient(135deg, var(--navy), var(--slate));
  display:flex; align-items:center; justify-content:center;
  font-size:48px; color:var(--muted);
}
.profile-card-photo img { width:100%; height:100%; object-fit:cover; }
.profile-card-body { padding:16px; }
.profile-card-name { font-size:16px; font-weight:700; margin-bottom:4px; }
.profile-card-meta { font-size:13px; color:var(--muted); }
.profile-card-tags { display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
.tag {
  padding:3px 10px; border-radius:100px;
  font-size:11px; font-weight:600; letter-spacing:.5px;
  background:rgba(248,244,240,.07); color:var(--muted);
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:12px 24px; border-radius:100px; border:none; cursor:pointer;
  font-family:var(--font); font-size:14px; font-weight:700;
  transition: transform .2s, box-shadow .2s, background .2s, opacity .2s;
  text-decoration:none; white-space:nowrap;
}
.btn:disabled { opacity:.45; cursor:not-allowed; }
.btn-primary { background:var(--rose); color:var(--cream); }
.btn-primary:hover:not(:disabled) { background:#d4697f; transform:translateY(-1px); box-shadow:0 8px 28px rgba(196,96,122,.4); }
.btn-teal { background:var(--teal); color:var(--cream); }
.btn-teal:hover:not(:disabled) { background:#028fa0; transform:translateY(-1px); box-shadow:0 8px 28px rgba(2,128,144,.4); }
.btn-gold { background:var(--gold); color:var(--navy); }
.btn-gold:hover:not(:disabled) { background:#e0b580; transform:translateY(-1px); box-shadow:0 8px 28px rgba(212,165,116,.4); }
.btn-ghost {
  background:transparent; color:var(--cream);
  border:1.5px solid var(--border);
}
.btn-ghost:hover:not(:disabled) { border-color:rgba(248,244,240,.3); background:rgba(248,244,240,.05); transform:translateY(-1px); }
.btn-danger { background:rgba(196,96,122,.15); color:var(--rose); border:1px solid rgba(196,96,122,.3); }
.btn-danger:hover:not(:disabled) { background:rgba(196,96,122,.25); }
.btn-sm { padding:8px 18px; font-size:13px; }
.btn-lg { padding:16px 36px; font-size:16px; }
.btn-full { width:100%; }
.btn-icon { padding:10px; border-radius:12px; }

/* ── Forms ──────────────────────────────────────────────────── */
.form-group { display:flex; flex-direction:column; gap:8px; margin-bottom:20px; }
.form-label { font-size:13px; font-weight:600; color:var(--muted); letter-spacing:.3px; }
.form-input, .form-textarea, .form-select {
  padding:13px 18px; border-radius:12px;
  background:rgba(248,244,240,.06); border:1.5px solid var(--border);
  color:var(--cream); font-family:var(--font); font-size:15px;
  outline:none; transition: border-color .2s, background .2s;
  width:100%;
}
.form-input::placeholder, .form-textarea::placeholder { color:rgba(248,244,240,.25); }
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color:var(--teal); background:rgba(248,244,240,.09);
}
.form-select option { background:var(--navy); color:var(--cream); }
.form-textarea { resize:vertical; min-height:120px; line-height:1.6; }
.form-hint { font-size:12px; color:var(--muted); }
.form-row { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.form-section { margin-bottom:32px; }
.form-section-title {
  font-size:11px; font-weight:700; letter-spacing:4px; text-transform:uppercase;
  color:var(--gold); margin-bottom:20px; padding-bottom:12px;
  border-bottom:1px solid var(--border);
}

/* ── Photo Upload ───────────────────────────────────────────── */
.photo-upload-zone {
  border:2px dashed var(--border); border-radius:var(--radius);
  padding:32px; text-align:center; cursor:pointer;
  transition: border-color .2s, background .2s;
}
.photo-upload-zone:hover { border-color:var(--teal); background:var(--teal-lt); }
.photo-grid { display:grid; grid-template-columns:repeat(3, 1fr); gap:8px; margin-top:12px; }
.photo-thumb {
  aspect-ratio:1; border-radius:12px; overflow:hidden; position:relative;
  background:rgba(248,244,240,.05);
}
.photo-thumb img { width:100%; height:100%; object-fit:cover; }
.photo-thumb-remove {
  position:absolute; top:4px; right:4px;
  width:22px; height:22px; border-radius:50%;
  background:rgba(0,0,0,.7); color:var(--cream); border:none; cursor:pointer;
  font-size:13px; display:flex; align-items:center; justify-content:center;
}

/* ── Status Badges ──────────────────────────────────────────── */
.status { padding:4px 12px; border-radius:100px; font-size:12px; font-weight:700; letter-spacing:.5px; display:inline-flex; align-items:center; gap:5px; }
.status::before { content:''; width:6px; height:6px; border-radius:50%; background:currentColor; }
.status-pending  { background:rgba(212,165,116,.15); color:var(--gold); }
.status-accepted { background:rgba(2,128,144,.15); color:var(--teal); }
.status-declined { background:rgba(196,96,122,.15); color:var(--rose); }
.status-matched  { background:linear-gradient(135deg, var(--teal-lt), var(--rose-lt)); color:var(--cream); }

/* ── Page Headers ───────────────────────────────────────────── */
.page-header { margin-bottom:32px; }
.page-eyebrow { font-size:11px; font-weight:700; letter-spacing:4px; text-transform:uppercase; color:var(--gold); margin-bottom:8px; }
.page-title { font-size:clamp(24px, 3vw, 36px); font-weight:900; letter-spacing:-1px; line-height:1.1; }
.page-sub { font-size:16px; color:var(--muted); margin-top:8px; line-height:1.6; }

/* ── Empty States ───────────────────────────────────────────── */
.empty-state { text-align:center; padding:64px 24px; }
.empty-state-icon { font-size:48px; margin-bottom:16px; }
.empty-state-title { font-size:20px; font-weight:700; margin-bottom:8px; }
.empty-state-body { font-size:15px; color:var(--muted); max-width:360px; margin:0 auto 24px; line-height:1.6; }

/* ── Pitch Cards ────────────────────────────────────────────── */
.pitch-card {
  background:rgba(248,244,240,.04); border:1px solid var(--border);
  border-radius:var(--radius-lg); padding:24px;
  display:grid; grid-template-columns:80px 1fr auto; gap:20px; align-items:start;
  margin-bottom:16px; transition: border-color .2s;
}
.pitch-card:hover { border-color:rgba(248,244,240,.14); }
.pitch-photo {
  width:80px; height:80px; border-radius:16px; object-fit:cover;
  background:linear-gradient(135deg, var(--navy), var(--slate));
  display:flex; align-items:center; justify-content:center; font-size:24px;
  flex-shrink:0;
}
.pitch-photo img { width:100%; height:100%; object-fit:cover; border-radius:16px; }
.pitch-name { font-size:18px; font-weight:800; margin-bottom:4px; }
.pitch-meta { font-size:13px; color:var(--muted); margin-bottom:8px; }
.pitch-message { font-size:14px; color:rgba(248,244,240,.7); line-height:1.6; font-style:italic; }
.pitch-actions { display:flex; flex-direction:column; gap:8px; flex-shrink:0; }

/* ── Messages ───────────────────────────────────────────────── */
.messages-layout { display:grid; grid-template-columns:280px 1fr; gap:0; height:calc(100vh - 92px); }
.convo-list { border-right:1px solid var(--border); overflow-y:auto; }
.convo-item {
  padding:16px 20px; border-bottom:1px solid var(--border); cursor:pointer;
  transition:background .2s;
}
.convo-item:hover, .convo-item.active { background:rgba(248,244,240,.05); }
.convo-name { font-weight:700; font-size:14px; margin-bottom:2px; }
.convo-preview { font-size:12px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.chat-area { display:flex; flex-direction:column; }
.chat-messages { flex:1; overflow-y:auto; padding:24px; display:flex; flex-direction:column; gap:12px; }
.chat-bubble {
  max-width:70%; padding:12px 18px; border-radius:18px;
  font-size:14px; line-height:1.55;
}
.chat-bubble.mine { background:var(--teal); color:var(--cream); margin-left:auto; border-bottom-right-radius:4px; }
.chat-bubble.theirs { background:rgba(248,244,240,.08); color:var(--cream); border-bottom-left-radius:4px; }
.chat-bubble-time { font-size:11px; opacity:.5; margin-top:4px; }
.chat-input-bar {
  padding:16px 24px; border-top:1px solid var(--border);
  display:flex; gap:12px; align-items:flex-end;
}
.chat-input {
  flex:1; padding:12px 18px; border-radius:24px;
  background:rgba(248,244,240,.07); border:1.5px solid var(--border);
  color:var(--cream); font-family:var(--font); font-size:14px;
  resize:none; max-height:120px; outline:none;
  transition:border-color .2s;
}
.chat-input:focus { border-color:var(--teal); }
.chat-send { padding:12px; border-radius:50%; width:44px; height:44px; flex-shrink:0; }

/* ── Stats ──────────────────────────────────────────────────── */
.stats-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(160px, 1fr)); gap:16px; margin-bottom:32px; }
.stat-card {
  background:rgba(248,244,240,.04); border:1px solid var(--border);
  border-radius:var(--radius); padding:20px;
}
.stat-number { font-size:36px; font-weight:900; letter-spacing:-1px; line-height:1; }
.stat-label { font-size:13px; color:var(--muted); margin-top:4px; }

/* ── Alerts ─────────────────────────────────────────────────── */
.alert { padding:14px 18px; border-radius:12px; font-size:14px; margin-bottom:16px; display:flex; align-items:center; gap:10px; }
.alert-success { background:rgba(2,128,144,.12); border:1px solid rgba(2,128,144,.3); color:var(--teal); }
.alert-error { background:rgba(196,96,122,.12); border:1px solid rgba(196,96,122,.3); color:var(--rose); }
.alert-info { background:rgba(212,165,116,.12); border:1px solid rgba(212,165,116,.3); color:var(--gold); }

/* ── Loading ────────────────────────────────────────────────── */
.loading { display:flex; align-items:center; justify-content:center; padding:48px; }
.spinner { width:32px; height:32px; border:3px solid var(--border); border-top-color:var(--teal); border-radius:50%; animation:spin .8s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }

/* ── Tabs ───────────────────────────────────────────────────── */
.tabs { display:flex; gap:4px; border-bottom:1px solid var(--border); margin-bottom:24px; }
.tab {
  padding:10px 20px; font-size:14px; font-weight:600; cursor:pointer;
  border:none; background:none; color:var(--muted);
  border-bottom:2px solid transparent; margin-bottom:-1px;
  transition:color .2s, border-color .2s;
}
.tab.active { color:var(--cream); border-bottom-color:var(--teal); }
.tab:hover { color:var(--cream); }

/* ── Extra utility classes ───────────────────────────────────── */
.gold  { color: var(--gold); }
.teal  { color: var(--teal); }
.rose  { color: var(--rose); }
.muted { color: var(--muted); }

/* Page header */
.page-header { margin-bottom: 2rem; }
.page-header h1 { font-family: 'DM Serif Display', 'Georgia', serif; font-size: 1.9rem; color: var(--cream); margin-bottom: .3rem; }
.page-subtitle   { color: var(--muted); font-size: .95rem; }

/* Section header */
.section-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:1.1rem; }
.section-header h2 { font-size:1.05rem; font-weight:600; color:var(--cream); }

/* Card grid */
.card-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:1.1rem; }

/* Profile summary card */
.profile-summary-card { display:flex; gap:1.25rem; align-items:flex-start; background:var(--card-bg); border:1px solid var(--border); border-radius:16px; padding:1.25rem; }
.profile-bio { font-size:.88rem; line-height:1.55; margin-top:.3rem; }

/* Pitch list */
.pitch-list { display:flex; flex-direction:column; gap:1rem; }
.pitch-card { background:var(--card-bg); border:1px solid var(--border); border-radius:16px; padding:1.25rem; }
.pitch-card.clickable { cursor:pointer; transition:border-color .15s, transform .12s; }
.pitch-card.clickable:hover { border-color:var(--teal); transform:translateY(-2px); }
.pitch-card-matched { border-left:3px solid var(--teal); background:rgba(2,128,144,.04); }
.pitch-meta { display:flex; align-items:center; gap:.5rem; font-size:.92rem; }
.pitch-arrow { color:var(--muted); }
.pitch-time { font-size:.78rem; color:var(--muted); }
.pitch-statuses { display:flex; flex-wrap:wrap; gap:.5rem; margin-top:.6rem; }
.pitch-message { font-style:italic; font-size:.88rem; color:rgba(248,244,240,.6); line-height:1.5; margin:.6rem 0; padding-left:.75rem; border-left:2px solid rgba(255,255,255,.1); }
.pitch-catch-preview { display:flex; gap:.85rem; align-items:flex-start; margin-bottom:.6rem; }
.pitch-seeker { color:var(--teal); font-weight:600; }
.pitch-catch  { color:var(--rose); font-weight:600; }

/* Status pills */
.status-pill {
  display:inline-block; padding:.2rem .7rem; border-radius:20px;
  font-size:.75rem; font-weight:600; line-height:1.5;
}
.status-pill.pending   { background:rgba(255,255,255,.08); color:rgba(248,244,240,.55); }
.status-pill.accepted  { background:rgba(2,128,144,.18);   color:#6DD5E0; }
.status-pill.declined  { background:rgba(196,96,122,.18);  color:#E08090; }
.status-pill.matched   { background:rgba(212,165,116,.18); color:var(--gold); }

/* Profile cards (browse list) */
.profile-card { display:flex; gap:1rem; align-items:center; background:var(--card-bg); border:1px solid var(--border); border-radius:16px; padding:1rem 1.25rem; }
.profile-name { font-weight:600; color:var(--cream); font-size:.95rem; margin-bottom:.15rem; }
.profile-meta { font-size:.82rem; color:var(--muted); }
.profile-card-info { flex:1; }

/* Admin actions row */
.admin-actions { display:flex; gap:.75rem; margin-bottom:2rem; flex-wrap:wrap; }

/* Alert boxes */
.alert { padding:.85rem 1rem; border-radius:10px; font-size:.9rem; line-height:1.5; }
.alert-error   { background:rgba(196,96,122,.15); border:1px solid rgba(196,96,122,.3); color:var(--cream); }
.alert-success { background:rgba(2,128,144,.15);  border:1px solid rgba(2,128,144,.3);  color:var(--cream); }

/* Form inputs */
.form-label { display:block; font-size:.82rem; color:var(--muted); margin-bottom:.4rem; font-weight:500; }
.form-input {
  width:100%; padding:.75rem 1rem; border-radius:10px;
  border:1.5px solid rgba(255,255,255,.12); background:rgba(255,255,255,.07);
  color:var(--cream); font-size:.92rem; font-family:inherit;
  outline:none; box-sizing:border-box; transition:border-color .2s;
}
.form-input::placeholder { color:rgba(248,244,240,.3); }
.form-input:focus { border-color:var(--teal); }

/* Loading spinner */
.loading-spinner {
  width:28px; height:28px; border:2.5px solid rgba(255,255,255,.08);
  border-top-color:var(--teal); border-radius:50%;
  animation:spin .7s linear infinite; margin:0 auto;
}

/* Empty state */
.empty-state { text-align:center; padding:3rem 1rem; }
.empty-icon  { font-size:2.5rem; margin-bottom:.75rem; }
.empty-state p { color:var(--muted); font-size:.92rem; line-height:1.6; }
.empty-state a { color:var(--teal); }

/* Responsive */
/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width:768px) {
  .sidebar { display:none; }
  .form-row { grid-template-columns:1fr; }
  .pitch-card { grid-template-columns:60px 1fr; }
  .pitch-actions { grid-column:1/-1; flex-direction:row; }
  .messages-layout { grid-template-columns:1fr; }
  .convo-list { display:none; }
  .stats-grid { grid-template-columns:repeat(2, 1fr); }
  .profile-grid { grid-template-columns:repeat(auto-fill, minmax(160px, 1fr)); }
}
