/* ─── FlowState Realty — Brand System ─────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:wght@300;400;600;700&family=Dancing+Script:wght@700&display=swap');

:root {
  /* Colors */
  --navy-900: #111721;
  --navy-800: #161d2b;
  --navy-700: #1a2233;
  --navy-600: #1f2940;
  --navy-500: #242f42;
  --navy-400: #2d3b52;
  --navy-300: #3b4d66;
  --blue-light: #c5defb;
  --blue-mid: #7ab8f5;
  --teal: #8bd2e4;
  --white: #ffffff;
  --off-white: #f4f6f9;
  --grey-100: #e8edf4;
  --grey-200: #d0d7e2;
  --grey-400: #8898aa;
  --grey-600: #5a6478;

  /* Status Colors */
  --status-pending: #f59e0b;
  --status-data: #3b82f6;
  --status-processing: #8bd2e4;
  --status-complete: #10b981;
  --status-error: #ef4444;
  --status-archived: #9ca3af;

  /* Fonts */
  --font-body: 'Josefin Sans', sans-serif;
  --font-script: 'Dancing Script', cursive;

  /* Spacing */
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 2px 12px rgba(0,0,0,0.18);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.28);
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--navy-900);
  color: var(--white);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ─── Header ──────────────────────────────────────────── */
.site-header {
  background: var(--navy-900);
  border-bottom: 1px solid var(--navy-400);
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-logo img { height: 36px; }
.header-logo .brand-text {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--white);
  letter-spacing: 0.05em;
  text-decoration: none;
}
.header-nav { display: flex; align-items: center; gap: 1.5rem; }
.header-nav a {
  color: var(--grey-200);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}
.header-nav a:hover, .header-nav a.active { color: var(--blue-light); }

/* ─── Main Layout ─────────────────────────────────────── */
.main-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

.main-content.wide { max-width: 1400px; }

/* ─── Hero Section ────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 3rem 1rem 2rem;
}
.hero-eyebrow {
  font-family: var(--font-script);
  font-size: 1.3rem;
  color: var(--teal);
  margin-bottom: 0.5rem;
}
.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 0.75rem;
}
.hero p {
  color: var(--grey-200);
  font-size: 1rem;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ─── Cards ───────────────────────────────────────────── */
.card {
  background: var(--navy-700);
  border: 1px solid var(--navy-400);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}
.card-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue-light);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--navy-400);
}

/* ─── Form Elements ───────────────────────────────────── */
.form-grid { display: grid; gap: 1.25rem; }
.form-grid-2 { grid-template-columns: 1fr 1fr; }
.form-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 640px) {
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
}

.field-group { display: flex; flex-direction: column; gap: 0.4rem; }
.field-group label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey-400);
}
.field-group input,
.field-group select,
.field-group textarea {
  background: var(--navy-800);
  border: 1px solid var(--navy-300);
  border-radius: var(--radius);
  padding: 0.625rem 0.875rem;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}
.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
  outline: none;
  border-color: var(--blue-light);
  box-shadow: 0 0 0 3px rgba(197,222,251,0.12);
}
.field-group input.error { border-color: var(--status-error); }
.field-error { font-size: 0.75rem; color: var(--status-error); }
.field-group select option { background: var(--navy-700); }
.field-group textarea { resize: vertical; min-height: 100px; }

/* ─── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-primary {
  background: var(--blue-light);
  color: var(--navy-900);
}
.btn-primary:hover { background: #b0d0f7; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-secondary {
  background: transparent;
  color: var(--blue-light);
  border: 1px solid var(--blue-light);
}
.btn-secondary:hover { background: rgba(197,222,251,0.08); }
.btn-danger {
  background: transparent;
  color: var(--status-error);
  border: 1px solid var(--status-error);
}
.btn-teal {
  background: var(--teal);
  color: var(--navy-900);
}
.btn-teal:hover { background: #7bc8da; transform: translateY(-1px); }
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.8rem; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }

/* ─── Status Badges ───────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.badge-pending    { background: rgba(245,158,11,0.15); color: var(--status-pending); border: 1px solid rgba(245,158,11,0.3); }
.badge-data_uploaded { background: rgba(59,130,246,0.15); color: var(--status-data); border: 1px solid rgba(59,130,246,0.3); }
.badge-processing { background: rgba(139,210,228,0.15); color: var(--status-processing); border: 1px solid rgba(139,210,228,0.3); }
.badge-complete   { background: rgba(16,185,129,0.15); color: var(--status-complete); border: 1px solid rgba(16,185,129,0.3); }
.badge-error      { background: rgba(239,68,68,0.15); color: var(--status-error); border: 1px solid rgba(239,68,68,0.3); }
.badge-archived   { background: rgba(156,163,175,0.1); color: var(--status-archived); border: 1px solid rgba(156,163,175,0.2); }
.badge-buyer      { background: rgba(139,210,228,0.15); color: var(--teal); }
.badge-seller     { background: rgba(197,222,251,0.12); color: var(--blue-light); }
.badge-rush       { background: rgba(239,68,68,0.15); color: var(--status-error); }

/* ─── Tables ──────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
thead tr { background: var(--navy-600); }
thead th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey-400);
  white-space: nowrap;
}
tbody tr {
  border-bottom: 1px solid var(--navy-500);
  transition: background 0.15s;
}
tbody tr:hover { background: var(--navy-600); cursor: pointer; }
tbody td { padding: 0.75rem 1rem; color: var(--grey-100); vertical-align: middle; }
tbody td.muted { color: var(--grey-400); }

/* ─── Stat Cards ──────────────────────────────────────── */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--navy-700);
  border: 1px solid var(--navy-400);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  text-align: center;
}
.stat-card .stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
}
.stat-card .stat-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey-400);
  margin-top: 0.35rem;
}
.stat-card.pending .stat-value   { color: var(--status-pending); }
.stat-card.data .stat-value      { color: var(--status-data); }
.stat-card.processing .stat-value { color: var(--status-processing); }
.stat-card.complete .stat-value  { color: var(--status-complete); }
.stat-card.error .stat-value     { color: var(--status-error); }

/* ─── Price Range Display ─────────────────────────────── */
.price-range {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}
.price-box {
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  border: 1px solid;
}
.price-box .price-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.price-box .price-value {
  font-size: 1.4rem;
  font-weight: 700;
}
.price-box.low    { background: rgba(245,158,11,0.08); border-color: rgba(245,158,11,0.25); color: #fbbf24; }
.price-box.mid    { background: rgba(16,185,129,0.1); border-color: rgba(16,185,129,0.35); color: #34d399; }
.price-box.high   { background: rgba(59,130,246,0.08); border-color: rgba(59,130,246,0.25); color: #60a5fa; }
.price-box.mid .price-label::after { content: ' ★'; }

/* ─── Step Indicator ──────────────────────────────────── */
.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 2.5rem;
}
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}
.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--navy-500);
  border: 2px solid var(--navy-300);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--grey-400);
  transition: all 0.3s;
}
.step.active .step-num { background: var(--blue-light); border-color: var(--blue-light); color: var(--navy-900); }
.step.done .step-num { background: var(--status-complete); border-color: var(--status-complete); color: var(--white); }
.step-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--grey-400); }
.step.active .step-label { color: var(--blue-light); }
.step-connector { flex: 1; height: 2px; background: var(--navy-400); min-width: 2rem; max-width: 80px; }
.step-connector.done { background: var(--status-complete); }

/* ─── Drag & Drop Upload Zone ─────────────────────────── */
.upload-zone {
  border: 2px dashed var(--navy-300);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
  transition: all 0.2s;
  cursor: pointer;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--blue-light);
  background: rgba(197,222,251,0.04);
}
.upload-zone .upload-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.upload-zone p { color: var(--grey-400); font-size: 0.875rem; }
.upload-zone strong { color: var(--blue-light); }

/* ─── Progress Bar ────────────────────────────────────── */
.progress-bar {
  background: var(--navy-500);
  border-radius: 999px;
  height: 6px;
  overflow: hidden;
  margin: 0.75rem 0;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--blue-light));
  border-radius: 999px;
  transition: width 0.4s ease;
}

/* ─── Alert / Notice ──────────────────────────────────── */
.alert {
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.alert-success { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.3); color: #34d399; }
.alert-error   { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: #f87171; }
.alert-info    { background: rgba(197,222,251,0.08); border: 1px solid rgba(197,222,251,0.2); color: var(--blue-light); }
.alert-warn    { background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.25); color: #fbbf24; }

/* ─── Timeline ────────────────────────────────────────── */
.timeline { display: flex; flex-direction: column; gap: 0.5rem; }
.timeline-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.82rem;
}
.timeline-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--navy-300);
  margin-top: 5px;
  flex-shrink: 0;
}
.timeline-item.created .timeline-dot  { background: var(--status-data); }
.timeline-item.complete .timeline-dot { background: var(--status-complete); }
.timeline-item.error .timeline-dot    { background: var(--status-error); }
.timeline-time { color: var(--grey-400); white-space: nowrap; }
.timeline-text { color: var(--grey-200); }

/* ─── Checkbox / Toggle ───────────────────────────────── */
.toggle-wrap { display: flex; align-items: center; gap: 0.75rem; cursor: pointer; }
.toggle-wrap input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--blue-light); cursor: pointer; }
.toggle-label { font-size: 0.875rem; color: var(--grey-200); }

/* ─── Footer ──────────────────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 2rem;
  color: var(--grey-600);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  border-top: 1px solid var(--navy-500);
  margin-top: 3rem;
}
.site-footer .tagline { font-family: var(--font-script); font-size: 1rem; color: var(--navy-300); }

/* ─── Responsive Utilities ────────────────────────────── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-muted { color: var(--grey-400); }
.text-teal { color: var(--teal); }
.text-blue { color: var(--blue-light); }
.text-right { text-align: right; }
.hidden { display: none; }
