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

:root {
  /* Design Tokens from Event Vendor Marketplace */
  --ink: #1B1F3B;
  --ink-soft: #4B4F72;
  --ink-muted: #62658A;
  --paper: #FBF8F2;
  --paper-dim: #F1ECE0;
  --gold: #D9A441;
  --gold-deep: #B9852B;
  --gold-soft: #FDF4E3;
  --berry: #B23A5D;
  --berry-soft: #F3DCE2;
  --sage: #5C7A5E;
  --sage-soft: #E1E9DE;
  --line: #E4DDD0;
  --white: #FFFFFF;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-pill: 9999px;
  --shadow-sm: 0 1px 3px rgba(27,31,59,0.05);
  --shadow: 0 4px 16px rgba(27,31,59,0.08);
  --shadow-lg: 0 12px 32px rgba(27,31,59,0.12);
  
  /* Aliases for semantic usage */
  --primary: var(--ink);
  --primary-accent: var(--gold);
  --secondary: var(--berry);
  --success: var(--sage);
  --bg-page: var(--paper);
  --bg-card: var(--white);
  --border: var(--line);
}

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

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
}

h1, h2, h3, h4, .display, .brand {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease, opacity 0.15s ease;
}

button {
  font-family: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--berry);
  outline-offset: 2px;
}

/* ---------- Layout Containers ---------- */
.wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 32px 20px 80px;
  width: 100%;
}

.wrap-narrow {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 20px 80px;
  width: 100%;
}

.wrap-sm {
  max-width: 520px;
  margin: 0 auto;
  padding: 40px 20px 80px;
  width: 100%;
}

/* ---------- Topbar & Navigation ---------- */
.topbar {
  background: var(--ink);
  color: var(--paper);
  padding: 14px 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  font-size: 1.35rem;
  letter-spacing: -0.2px;
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  color: var(--paper);
}

.brand span {
  color: var(--gold);
}

.brand-sub {
  font-size: 0.72rem;
  color: #B7BAD6;
  margin-top: 1px;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-link {
  color: #D3D6E8;
  font-size: 0.88rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--gold);
  background: rgba(255, 255, 255, 0.06);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Mobile Nav: keep links reachable via horizontal scroll instead of hiding them */
@media (max-width: 768px) {
  .topbar {
    padding: 12px 16px;
  }
  .topbar-inner {
    flex-wrap: wrap;
  }
  .nav-menu {
    order: 3;
    flex-basis: 100%;
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .nav-link {
    white-space: nowrap;
    font-size: 0.82rem;
  }
  .brand-sub {
    display: none;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 10px;
  padding: 11px 20px;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.3;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-sm {
  padding: 7px 14px;
  font-size: 0.82rem;
  border-radius: 8px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
  border-radius: 12px;
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
  border: 1px solid rgba(255,255,255,0.1);
}

.btn-primary:hover {
  background: #272C50;
  color: #ffffff;
}

.btn-primary:disabled {
  background: #C9C6D8;
  cursor: not-allowed;
  opacity: 0.7;
}

.btn-berry {
  background: var(--berry);
  color: #FFFFFF;
}

.btn-berry:hover {
  background: #9A2C4B;
  color: #FFFFFF;
}

.btn-gold {
  background: var(--gold);
  color: var(--ink);
  font-weight: 700;
}

.btn-gold:hover {
  background: var(--gold-deep);
  color: var(--ink);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--line);
  color: var(--ink);
}

.btn-outline:hover {
  border-color: var(--ink);
  background: var(--paper-dim);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
}

.btn-ghost:hover {
  background: var(--paper-dim);
  color: var(--ink);
}

.btn-ghost-light {
  background: transparent;
  color: #C7C9E4;
  border: 1px solid #4B4F72;
}

.btn-ghost-light:hover {
  background: rgba(255,255,255,0.08);
  color: #FFFFFF;
}

/* ---------- Panels & Cards ---------- */
.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.panel-header {
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.step-eyebrow {
  font-size: 0.84rem;
  color: var(--berry);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.step-title {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.step-help {
  color: var(--ink-soft);
  font-size: 0.94rem;
  margin-bottom: 24px;
  max-width: 65ch;
  line-height: 1.5;
}

/* ---------- Progress Rail (Wizard) ---------- */
.rail-wrap {
  margin-bottom: 28px;
}

.rail {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.rail-step {
  flex: 1;
  height: 5px;
  border-radius: 3px;
  background: var(--line);
  position: relative;
  overflow: hidden;
  transition: background 0.3s ease;
}

.rail-step.done, .rail-step.active {
  background: var(--gold);
}

.rail-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-top: 8px;
}

.rail-labels span {
  flex: 1;
  text-align: center;
}

.rail-labels span:first-child {
  text-align: left;
}

.rail-labels span:last-child {
  text-align: right;
}

/* ---------- Choice Grid ---------- */
.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 600px) {
  .choice-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.choice-card {
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 18px 14px;
  text-align: left;
  background: var(--paper);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  color: var(--ink);
}

.choice-card svg {
  width: 26px;
  height: 26px;
  stroke: var(--ink-soft);
}

.choice-card .label {
  font-weight: 600;
  font-size: 0.94rem;
}

.choice-card:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
}

.choice-card.selected {
  border-color: var(--berry);
  background: var(--berry-soft);
}

.choice-card.selected svg {
  stroke: var(--berry);
}

/* ---------- Chips & Filter Bar ---------- */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  border: 1.5px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius-pill);
  padding: 9px 18px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip:hover {
  border-color: var(--gold);
}

.chip.selected {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.filter-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 14px;
  margin-bottom: 12px;
}

.filter-bar::-webkit-scrollbar {
  display: none;
}

.filter-pill {
  flex: 0 0 auto;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  font-size: 0.84rem;
  font-weight: 600;
  background: var(--white);
  white-space: nowrap;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-pill:hover {
  border-color: var(--ink-soft);
}

.filter-pill.selected {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
  font-weight: 700;
}

/* ---------- Budget Grid ---------- */
.budget-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (min-width: 600px) {
  .budget-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

.budget-opt {
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 14px 10px;
  text-align: center;
  background: var(--paper);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.15s ease;
  color: var(--ink);
}

.budget-opt:hover {
  border-color: var(--gold);
}

.budget-opt small {
  display: block;
  font-weight: 400;
  color: var(--ink-soft);
  margin-top: 2px;
  font-size: 0.76rem;
}

.budget-opt.selected {
  border-color: var(--gold-deep);
  background: #FBF0DA;
  color: #7A5A1E;
}

/* ---------- Forms & Inputs ---------- */
.field {
  margin-bottom: 20px;
}

.field label, .form-label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 8px;
  color: var(--ink);
}

select, input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], textarea, .form-control, .form-select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.94rem;
  background: var(--paper);
  color: var(--ink);
  transition: border-color 0.15s ease;
}

select:focus, input:focus, textarea:focus, .form-control:focus, .form-select:focus {
  border-color: var(--berry);
  outline: none;
  background: var(--white);
}

.step-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  gap: 12px;
}

/* ---------- Summary & Review Lists ---------- */
.summary-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--line);
  margin-bottom: 20px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

.summary-row .k {
  color: var(--ink-soft);
}

.summary-row .v {
  font-weight: 600;
  text-align: right;
  color: var(--ink);
}

/* ---------- Results Layout & Vendor Cards ---------- */
.results-head {
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  padding: 24px 26px;
  margin-bottom: 20px;
}

.results-head h2 {
  color: var(--paper);
  font-size: 1.45rem;
}

.results-head .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 12px;
  font-size: 0.85rem;
  color: #C7C9E4;
}

.results-head .meta b {
  color: var(--gold);
  font-weight: 600;
}

.results-head .edit-btn {
  margin-top: 16px;
  background: transparent;
  border: 1px solid #4B4F72;
  color: var(--paper);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.results-head .edit-btn:hover {
  background: rgba(255,255,255,0.08);
  border-color: var(--gold);
}

.sort-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 8px 0 20px;
  font-size: 0.86rem;
  color: var(--ink-soft);
}

.sort-row select {
  width: auto;
  padding: 8px 12px;
  font-size: 0.84rem;
}

.category-block {
  margin-bottom: 32px;
}

.category-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.cat-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.category-title h3 {
  font-size: 1.15rem;
}

.category-count {
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.vendor-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 680px) {
  .vendor-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1020px) {
  .vendor-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.vendor-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.vendor-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.vendor-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}

.vendor-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
}

.vendor-loc {
  color: var(--ink-soft);
  font-size: 0.82rem;
  margin-top: 2px;
}

.match-badge {
  background: var(--sage-soft);
  color: var(--sage);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.vendor-price {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
}

.vendor-price span {
  color: var(--ink-soft);
  font-weight: 400;
  font-size: 0.78rem;
}

.vendor-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 0.74rem;
  background: var(--paper-dim);
  color: var(--ink-soft);
  padding: 4px 9px;
  border-radius: 6px;
  font-weight: 500;
}

.vendor-desc {
  font-size: 0.84rem;
  color: var(--ink-soft);
  line-height: 1.5;
  flex: 1;
}

.vendor-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.rating {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 4px;
}

.rating svg {
  width: 15px;
  height: 15px;
  fill: var(--gold);
}

/* ---------- Stat Cards & Dashboard Widgets ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

@media (min-width: 600px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .stat-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.stat-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.stat-val {
  font-size: 1.7rem;
  font-weight: 700;
  font-family: 'Fraunces', serif;
  color: var(--ink);
}

.stat-sub {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-top: 4px;
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.status-badge.pending {
  background: #FEF3C7;
  color: #92400E;
}

.status-badge.confirmed {
  background: var(--sage-soft);
  color: var(--sage);
}

.status-badge.completed {
  background: #E0E7FF;
  color: #3730A3;
}

.status-badge.cancelled {
  background: #FEE2E2;
  color: #991B1B;
}

/* Commission Calculation Box */
.commission-box {
  background: var(--paper-dim);
  border: 1.5px dashed var(--gold-deep);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 16px 0;
}

.commission-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.88rem;
}

.commission-row.total {
  font-weight: 700;
  font-size: 1rem;
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding-top: 10px;
  color: var(--ink);
}

/* ---------- Tables ---------- */
.table-responsive {
  overflow-x: auto;
  width: 100%;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  text-align: left;
}

.table th {
  background: var(--paper-dim);
  color: var(--ink);
  font-weight: 600;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.table tr:hover td {
  background: rgba(251, 248, 242, 0.6);
}

/* ---------- Flash Messages ---------- */
.flash-message {
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid var(--line);
  background: var(--white);
}

.flash-message.success {
  border-left: 5px solid var(--sage);
  background: #F4F8F4;
  color: #2D4A2F;
}

.flash-message.error {
  border-left: 5px solid var(--berry);
  background: #FDF2F4;
  color: #721C24;
}

.flash-message.info {
  border-left: 5px solid var(--gold);
  background: #FFFDF8;
  color: #78520A;
}

/* ---------- Footer ---------- */
footer {
  background: var(--ink);
  color: #C7C9E4;
  padding: 48px 24px 24px;
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 768px) {
  .footer-inner {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-brand {
  font-family: 'Fraunces', serif;
  font-size: 1.3rem;
  color: var(--paper);
  margin-bottom: 8px;
}

.footer-brand span {
  color: var(--gold);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.86rem;
}

.footer-links a:hover {
  color: var(--gold);
}

.footer-bottom {
  max-width: 1200px;
  margin: 36px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: #8E92B2;
}

[hidden] {
  display: none !important;
}
