@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --forest: #16281f;
  --forest-light: #1e3a2c;
  --navy: #121e29;
  --burgundy: #4a1d2b;
  --burgundy-light: #6b2a3d;
  --brown: #3e2a1e;
  --brass: #c9a24b;
  --brass-light: #ddc07f;
  --parchment: #f2ece1;
  --parchment-dim: #cfc7b8;
  --success: #6fae7f;
  --radius: 10px;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--forest);
  color: var(--parchment);
  line-height: 1.5;
}

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

p { color: var(--parchment-dim); max-width: 62ch; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- nav ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 32px;
  border-bottom: 1px solid rgba(242,236,225,0.08);
}

.nav__brand {
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav__brand .dot { color: var(--brass); }

.nav__links {
  display: flex;
  gap: 28px;
  align-items: center;
  font-size: 0.95rem;
}

.nav__links a { text-decoration: none; color: var(--parchment-dim); transition: color .15s; }
.nav__links a:hover { color: var(--parchment); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:active { transform: scale(0.98); }

.btn--brass {
  background: var(--brass);
  color: #201406;
}
.btn--brass:hover { background: var(--brass-light); }

.btn--outline {
  background: transparent;
  border-color: rgba(242,236,225,0.3);
  color: var(--parchment);
}
.btn--outline:hover { border-color: var(--brass); color: var(--brass-light); }

.btn--burgundy {
  background: var(--burgundy);
  color: var(--parchment);
}
.btn--burgundy:hover { background: var(--burgundy-light); }

.btn--full { width: 100%; justify-content: center; }
.btn--small { padding: 8px 16px; font-size: 0.85rem; }

/* ---------- hero (vault door) ---------- */
.hero {
  position: relative;
  padding: 90px 32px 60px;
  overflow: hidden;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}

.hero__eyebrow-word { color: var(--brass-light); font-weight: 600; }

.hero h1 { font-size: clamp(2.4rem, 4.2vw, 3.6rem); max-width: 14ch; }

.hero p.lede { font-size: 1.1rem; max-width: 46ch; }

.hero__actions { display: flex; gap: 14px; margin-top: 28px; }

/* vault door illustration */
.vault {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 420px;
  margin: 0 auto;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--forest-light), var(--forest) 70%);
  box-shadow: 0 0 0 10px rgba(201,162,75,0.12), inset 0 0 60px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.vault__ring {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  border: 2px solid rgba(201,162,75,0.35);
}

.vault__handle {
  width: 42%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--brass), var(--brass-light), var(--brass));
  position: relative;
  box-shadow: 0 8px 30px rgba(0,0,0,0.45);
  animation: turn 16s linear infinite;
}
.vault__handle::before,
.vault__handle::after {
  content: '';
  position: absolute;
  background: var(--forest);
  left: 50%; top: 50%;
  transform: translate(-50%,-50%);
}
.vault__handle::before { width: 78%; height: 10%; border-radius: 6px; }
.vault__handle::after { width: 10%; height: 78%; border-radius: 6px; }

@keyframes turn {
  0%, 85% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .vault__handle { animation: none; }
}

/* ---------- sections ---------- */
.section { padding: 70px 32px; border-top: 1px solid rgba(242,236,225,0.06); }
.section--navy { background: var(--navy); }
.section__head { max-width: 60ch; margin-bottom: 40px; }

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.card {
  background: rgba(242,236,225,0.04);
  border: 1px solid rgba(242,236,225,0.08);
  border-radius: var(--radius);
  padding: 26px;
}
.card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.card p { margin: 0; font-size: 0.95rem; }

.card__num {
  font-family: var(--serif);
  color: var(--brass);
  font-size: 1.6rem;
  margin-bottom: 10px;
  display: block;
}

/* ---------- forms ---------- */
.form-panel {
  background: rgba(242,236,225,0.04);
  border: 1px solid rgba(242,236,225,0.08);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 440px;
}

label {
  display: block;
  font-size: 0.85rem;
  color: var(--parchment-dim);
  margin: 16px 0 6px;
}
label:first-of-type { margin-top: 0; }

input, select, textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: 8px;
  border: 1px solid rgba(242,236,225,0.18);
  background: rgba(0,0,0,0.2);
  color: var(--parchment);
  font-family: var(--sans);
  font-size: 0.95rem;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--brass);
  outline-offset: 1px;
}

textarea { min-height: 100px; resize: vertical; }

.error-text { color: #e08a8a; font-size: 0.85rem; margin-top: 10px; }
.success-text { color: var(--success); font-size: 0.85rem; margin-top: 10px; }

/* ---------- footer ---------- */
.footer {
  padding: 40px 32px;
  border-top: 1px solid rgba(242,236,225,0.08);
  display: flex;
  justify-content: space-between;
  color: var(--parchment-dim);
  font-size: 0.85rem;
}

/* ---------- app shell (dashboard/admin) ---------- */
.app-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }

.sidebar {
  background: var(--navy);
  border-right: 1px solid rgba(242,236,225,0.08);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--parchment-dim);
  font-size: 0.92rem;
}
.sidebar a:hover, .sidebar a.active { background: rgba(201,162,75,0.12); color: var(--brass-light); }

.main { padding: 36px 40px; }

.top-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 36px; }
.stat {
  background: rgba(242,236,225,0.04);
  border: 1px solid rgba(242,236,225,0.08);
  border-radius: var(--radius);
  padding: 20px;
}
.stat__val { font-family: var(--serif); font-size: 1.9rem; color: var(--brass); }
.stat__label { color: var(--parchment-dim); font-size: 0.85rem; }

.item-card {
  background: rgba(242,236,225,0.04);
  border: 1px solid rgba(242,236,225,0.08);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 16px;
}
.item-card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.item-card__meta { color: var(--parchment-dim); font-size: 0.85rem; margin-top: 4px; }
.item-card__meta a { color: var(--brass-light); text-decoration: none; }
.item-card__meta a:hover { text-decoration: underline; }
.item-card__thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(242,236,225,0.12);
  flex-shrink: 0;
  background: rgba(0,0,0,0.2);
}

.deal-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid rgba(242,236,225,0.08);
  font-size: 0.9rem;
}
.deal-row .price { color: var(--success); font-weight: 600; font-family: var(--serif); font-size: 1.05rem; }
.deal-row .price.over { color: var(--parchment-dim); }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.badge--new,
.badge--pending { background: rgba(201,162,75,0.18); color: var(--brass-light); }
.badge--contacted,
.badge--active { background: rgba(111,174,127,0.18); color: var(--success); }
.badge--closed,
.badge--paused { background: rgba(242,236,225,0.1); color: var(--parchment-dim); }
.badge--declined { background: rgba(224,138,138,0.16); color: #e08a8a; }

/* ---------- advertisers (list + detail) ---------- */
.advertiser-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 22px;
  align-items: start;
}

.advertiser-list {
  background: rgba(242,236,225,0.04);
  border: 1px solid rgba(242,236,225,0.08);
  border-radius: var(--radius);
  overflow: hidden;
}

.advertiser-row {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(242,236,225,0.08);
  cursor: pointer;
  transition: background .12s ease;
}
.advertiser-row:last-child { border-bottom: none; }
.advertiser-row:hover { background: rgba(242,236,225,0.05); }
.advertiser-row--active { background: rgba(201,162,75,0.1); }

.advertiser-row__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.advertiser-row__company { font-family: var(--serif); font-size: 1rem; }
.advertiser-row__meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 0.8rem; color: var(--parchment-dim); }
.advertiser-row__meta span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.unread-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brass);
  flex-shrink: 0;
}

.advertiser-detail {
  background: rgba(242,236,225,0.04);
  border: 1px solid rgba(242,236,225,0.08);
  border-radius: var(--radius);
  padding: 22px;
  min-height: 420px;
}

.advertiser-detail__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(242,236,225,0.08);
}

.status-select { max-width: 160px; }

/* ---------- chat ---------- */
.chat { display: flex; flex-direction: column; height: 460px; }

.chat__messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 4px 12px;
}

.chat__bubble {
  max-width: 72%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.92rem;
}
.chat__bubble--me {
  align-self: flex-end;
  background: rgba(201,162,75,0.18);
  border: 1px solid rgba(201,162,75,0.28);
  border-bottom-right-radius: 3px;
}
.chat__bubble--them {
  align-self: flex-start;
  background: rgba(242,236,225,0.06);
  border: 1px solid rgba(242,236,225,0.1);
  border-bottom-left-radius: 3px;
}
.chat__bubble-meta { font-size: 0.72rem; color: var(--parchment-dim); margin-bottom: 4px; }
.chat__bubble-text { white-space: pre-wrap; word-break: break-word; }

.chat__composer {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  padding-top: 14px;
  border-top: 1px solid rgba(242,236,225,0.08);
}
.chat__composer textarea {
  flex: 1;
  min-height: 46px;
  max-height: 120px;
  resize: vertical;
}
.chat__composer textarea:disabled,
.chat__composer button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.range-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.range-row input[type=range] { flex: 1; }
.range-row .range-val { font-family: var(--serif); color: var(--brass); min-width: 60px; text-align: right; }

.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: var(--parchment-dim);
  border: 1px dashed rgba(242,236,225,0.2);
  border-radius: var(--radius);
}

.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th, .table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid rgba(242,236,225,0.08); }
.table th { color: var(--parchment-dim); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }

.hidden { display: none !important; }

@media (max-width: 880px) {
  .hero__grid { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; overflow-x: auto; }
  .top-stats { grid-template-columns: 1fr; }
  .advertiser-layout { grid-template-columns: 1fr; }
}
