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

:root {
  --brand: #ffc400;
  --brand-deep: #d9a300;
  --brand-ink: #2a2100;
  --ink: #16181d;
  --ink-soft: #5b6270;
  --ink-faint: #8b929f;
  --link: #0b5fd0;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --line: #e2e5ea;
  --line-soft: #eef0f4;
  --ok: #12875a;
  --warn: #b25b00;
  --danger: #c4342b;
  --star: #f0a202;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow-card: 0 1px 2px rgba(22, 24, 29, .06), 0 1px 10px rgba(22, 24, 29, .04);
  --font-display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 0;
}

h1 { font-size: 1.9rem; font-weight: 700; }
h2 { font-size: 1.3rem; font-weight: 600; }
h3 { font-size: 1.05rem; font-weight: 600; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

:focus-visible {
  outline: 3px solid #1b6ff0;
  outline-offset: 2px;
  border-radius: 3px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.stack > * + * { margin-top: 16px; }
.muted { color: var(--ink-soft); }
.small { font-size: .82rem; }
.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- header ---------- */

.masthead { background: var(--brand); border-bottom: 1px solid var(--brand-deep); }

.masthead-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 0;
  flex-wrap: wrap;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.45rem;
  color: var(--brand-ink);
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.wordmark:hover { text-decoration: none; }
.wordmark span { border-bottom: 4px solid var(--brand-ink); padding-bottom: 1px; }

.masthead-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.masthead .searchbar { flex: 1 1 420px; min-width: 260px; }

/* ---------- search bar ---------- */

.searchbar {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--brand-deep);
  border-radius: var(--radius);
  overflow: hidden;
}

.searchbar input {
  border: 0;
  padding: 11px 14px;
  font: inherit;
  min-width: 0;
  background: transparent;
  color: var(--ink);
}
.searchbar input:focus { outline: none; box-shadow: inset 0 0 0 2px #1b6ff0; }
.searchbar .field-where { flex: 0 0 180px; border-right: 1px solid var(--line); }
.searchbar .field-what { flex: 1 1 auto; }

.searchbar button {
  border: 0;
  background: var(--brand-ink);
  color: #fff;
  font: 600 .95rem var(--font-body);
  padding: 0 22px;
  cursor: pointer;
}
.searchbar button:hover { background: #000; }

.searchbar-lg input { padding: 15px 16px; font-size: 1rem; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 9px 15px;
  font: 600 .9rem var(--font-body);
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: #f7f8fa; text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn-dark { background: var(--brand-ink); border-color: var(--brand-ink); color: #fff; }
.btn-dark:hover { background: #000; }

.btn-call { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-call:hover { background: #0e6e49; }

.btn-brand { background: var(--brand); border-color: var(--brand-deep); color: var(--brand-ink); }
.btn-brand:hover { background: #ffcf2e; }

.btn-danger { color: var(--danger); border-color: #f0cdca; background: #fff6f5; }
.btn-danger:hover { background: #fdeceb; }

.btn-sm { padding: 6px 11px; font-size: .82rem; }
.btn-block { width: 100%; }

/* ---------- cards & panels ---------- */

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.panel-pad { padding: 20px; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

/* ---------- home ---------- */

.hero {
  background: var(--brand);
  padding: 44px 0 52px;
  border-bottom: 1px solid var(--brand-deep);
}
.hero h1 {
  font-size: clamp(1.9rem, 4.2vw, 2.7rem);
  color: var(--brand-ink);
  max-width: 17ch;
}
.hero p { color: #4a3d00; max-width: 52ch; margin: 10px 0 22px; font-size: 1.02rem; }
.hero .searchbar { max-width: 780px; }
.hero-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.hero-links a {
  background: rgba(255, 255, 255, .55);
  border: 1px solid var(--brand-deep);
  color: var(--brand-ink);
  border-radius: 100px;
  padding: 5px 13px;
  font-size: .85rem;
  font-weight: 500;
}
.hero-links a:hover { background: #fff; text-decoration: none; }

.home-section { padding: 36px 0; }

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 12px;
}

.category-tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 14px;
  color: var(--ink);
  display: block;
}
.category-tile:hover { border-color: var(--brand-deep); text-decoration: none; }
.category-tile .icon { font-size: 1.6rem; line-height: 1; }
.category-tile .name { font-weight: 600; margin-top: 10px; }
.category-tile .count { color: var(--ink-faint); font-size: .8rem; }

.top-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

/* ---------- listing cards ---------- */

.listing-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 14px;
  align-items: start;
}

.avatar {
  width: 62px;
  height: 62px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: #fff;
  letter-spacing: -0.02em;
}

.listing-card h3 a { color: var(--ink); }
.listing-card h3 a:hover { color: var(--link); }

.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: .88rem;
}

.rating-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--ok);
  color: #fff;
  font-weight: 600;
  font-size: .8rem;
  border-radius: var(--radius-sm);
  padding: 2px 7px;
}
.rating-pill.is-empty { background: #9aa1ad; }

.verified-flag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ok);
  font-weight: 600;
  font-size: .8rem;
}

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip {
  background: var(--line-soft);
  color: var(--ink-soft);
  border-radius: 100px;
  padding: 3px 10px;
  font-size: .78rem;
}

.card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.open-tag { color: var(--ok); font-weight: 600; font-size: .85rem; }
.shut-tag { color: var(--danger); font-weight: 600; font-size: .85rem; }

/* ---------- search page ---------- */

.results-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 20px;
  align-items: start;
  padding: 22px 0 48px;
}

.filters { position: sticky; top: 16px; }
.filter-group { padding: 16px; border-bottom: 1px solid var(--line-soft); }
.filter-group:last-child { border-bottom: 0; }
.filter-group h4 { font-size: .82rem; color: var(--ink-soft); margin-bottom: 9px; font-weight: 600; }
.filter-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  font-size: .9rem;
  cursor: pointer;
}
.filter-group select, .filter-group input[type="text"] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font: inherit;
  background: #fff;
}

.results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.results-list { display: grid; gap: 12px; }

.pager { display: flex; gap: 8px; justify-content: center; margin-top: 24px; }

.empty-state {
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 44px 24px;
  text-align: center;
}
.empty-state h3 { margin-bottom: 6px; }

/* ---------- listing detail ---------- */

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 20px;
  align-items: start;
  padding: 22px 0 48px;
}

.detail-head { display: grid; grid-template-columns: 84px 1fr; gap: 18px; }
.detail-head .avatar { width: 84px; height: 84px; font-size: 1.8rem; }
.detail-head h1 { font-size: 1.6rem; }

.fact-list { display: grid; gap: 10px; margin-top: 4px; }
.fact-list div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; font-size: .92rem; }
.fact-list dt, .fact-list .label { color: var(--ink-soft); }

.review {
  padding: 15px 0;
  border-bottom: 1px solid var(--line-soft);
}
.review:last-child { border-bottom: 0; }
.review-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.review-author { font-weight: 600; }

.stars { color: var(--star); letter-spacing: 1px; }
.star-picker { display: flex; gap: 4px; }
.star-picker button {
  background: none;
  border: 0;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--line);
  cursor: pointer;
  padding: 0 1px;
}
.star-picker button.on { color: var(--star); }

/* ---------- forms ---------- */

.form-grid { display: grid; gap: 14px; }
.form-grid.cols-2 { grid-template-columns: 1fr 1fr; }

.field { display: grid; gap: 5px; }
.field > label { font-size: .85rem; font-weight: 600; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font: inherit;
  background: #fff;
  color: var(--ink);
}
.field textarea { min-height: 96px; resize: vertical; }
.field .hint { font-size: .78rem; color: var(--ink-faint); }

.form-note {
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  font-size: .88rem;
}
.form-note.is-error { background: #fdf0ef; color: #8f2820; border: 1px solid #f3d3d0; }
.form-note.is-ok { background: #eef8f3; color: #0d6b47; border: 1px solid #c8e6d9; }

/* ---------- auth pages ---------- */

.auth-layout { max-width: 440px; margin: 48px auto 72px; }
.auth-tabs { display: flex; border-bottom: 1px solid var(--line); }
.auth-tabs button {
  flex: 1;
  background: none;
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 14px;
  font: 600 .95rem var(--font-body);
  color: var(--ink-soft);
  cursor: pointer;
}
.auth-tabs button.on { color: var(--ink); border-bottom-color: var(--brand); }

/* ---------- dashboard / admin ---------- */

.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 20px 0 16px; }
.tabs button {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 7px 16px;
  font: 600 .88rem var(--font-body);
  color: var(--ink-soft);
  cursor: pointer;
}
.tabs button.on { background: var(--brand-ink); border-color: var(--brand-ink); color: #fff; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px 16px;
}
.stat .value { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; }
.stat .label { color: var(--ink-soft); font-size: .85rem; }

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th, table.data td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
table.data th { color: var(--ink-soft); font-weight: 600; font-size: .82rem; }
table.data tr:last-child td { border-bottom: 0; }

.status-tag {
  display: inline-block;
  border-radius: 100px;
  padding: 2px 10px;
  font-size: .78rem;
  font-weight: 600;
}
.status-pending  { background: #fff3e0; color: var(--warn); }
.status-approved { background: #eaf6f0; color: var(--ok); }
.status-rejected { background: #fdeceb; color: var(--danger); }
.status-new      { background: #e9f1fe; color: var(--link); }
.status-contacted{ background: #fff3e0; color: var(--warn); }
.status-closed   { background: var(--line-soft); color: var(--ink-soft); }

/* ---------- toast ---------- */

.toast-host {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 60;
  display: grid;
  gap: 8px;
  width: min(420px, calc(100% - 32px));
}
.toast {
  background: var(--brand-ink);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: .9rem;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .22);
  animation: toast-in .18s ease-out;
}
.toast.is-error { background: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- footer ---------- */

.footer {
  background: #1b1d23;
  color: #b8bec9;
  margin-top: 40px;
  padding: 34px 0 26px;
  font-size: .9rem;
}
.footer a { color: #e6e9ee; }
.footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 26px;
}
.footer h4 { color: #fff; font-size: .95rem; margin-bottom: 10px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer-base {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid #2e313a;
  color: #868d99;
  font-size: .84rem;
}

/* ---------- responsive ---------- */

@media (max-width: 920px) {
  .results-layout, .detail-layout { grid-template-columns: 1fr; }
  .filters { position: static; }
}

@media (max-width: 640px) {
  .masthead-inner { gap: 12px; }
  .masthead .searchbar { order: 3; flex-basis: 100%; }
  .searchbar .field-where { flex-basis: 110px; }
  .form-grid.cols-2 { grid-template-columns: 1fr; }
  .listing-card { grid-template-columns: 48px 1fr; gap: 12px; }
  .avatar { width: 48px; height: 48px; font-size: 1.1rem; }
  .detail-head { grid-template-columns: 1fr; }
  .fact-list div { grid-template-columns: 1fr; gap: 2px; }
}
