/* HeldSpace — Global Styles */
:root {
  --gold: #B4943C;
  --gold-light: #D4B86A;
  --forest: #132D1E;
  --forest-light: #1E4530;
  --cream: #FAF8F4;
  --cream-dark: #F0EDE6;
  --text: #1A1A1A;
  --text-muted: #6B6B6B;
  --border: #E0D9CE;
  --white: #FFFFFF;
  --danger: #C0392B;
  --success: #27AE60;
  --warning: #E67E22;
  --radius: 8px;
  --radius-lg: 16px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Jost', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

#app { min-height: 100vh; }

/* ── Typography ── */
h1, h2, h3 { font-family: var(--font-serif); font-weight: 400; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }
p { color: var(--text-muted); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-primary { background: var(--gold); color: var(--white); }
.btn-primary:hover { background: var(--gold-light); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-secondary { background: var(--forest); color: var(--white); }
.btn-secondary:hover { background: var(--forest-light); }
.btn-outline { background: transparent; color: var(--forest); border: 1.5px solid var(--forest); }
.btn-outline:hover { background: var(--forest); color: var(--white); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--cream-dark); color: var(--text); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.8rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ── Forms ── */
.form-group { margin-bottom: 1.25rem; }
label { display: block; font-size: 0.85rem; font-weight: 500; color: var(--text); margin-bottom: 0.4rem; }
input, select, textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.2s;
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); }
textarea { resize: vertical; min-height: 80px; }
.form-hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.3rem; }

/* ── Cards ── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

/* ── Navigation ── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--forest);
  text-decoration: none;
  font-weight: 500;
}
.nav-brand img { width: 36px; height: 36px; }
.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-link { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; transition: color 0.2s; }
.nav-link:hover, .nav-link.active { color: var(--forest); }

/* ── Hero ── */
.hero {
  padding: 5rem 2rem 4rem;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}
.hero-eyebrow {
  display: inline-block;
  background: var(--cream-dark);
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.4rem 1rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
}
.hero h1 { color: var(--forest); margin-bottom: 1.25rem; }
.hero p { font-size: 1.1rem; max-width: 600px; margin: 0 auto 2.5rem; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── Pricing ── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  padding: 3rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}
.pricing-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.pricing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.pricing-card.featured { border-color: var(--gold); background: var(--forest); color: var(--white); }
.pricing-card.featured h3, .pricing-card.featured .price { color: var(--white); }
.pricing-card.featured p { color: rgba(255,255,255,0.7); }
.price { font-family: var(--font-serif); font-size: 3rem; color: var(--forest); line-height: 1; }
.price span { font-size: 1rem; font-family: var(--font-sans); color: var(--text-muted); }
.feature-list { list-style: none; text-align: left; margin: 1.5rem 0; }
.feature-list li { padding: 0.4rem 0; font-size: 0.88rem; display: flex; align-items: center; gap: 0.5rem; }
.feature-list li::before { content: '✓'; color: var(--gold); font-weight: bold; }

/* ── Dashboard Layout ── */
.dashboard {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 64px);
}
.sidebar {
  background: var(--forest);
  color: var(--white);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
  border: none;
  background: none;
  text-align: left;
  width: 100%;
}
.sidebar-item:hover, .sidebar-item.active { background: rgba(255,255,255,0.1); color: var(--white); }
.sidebar-item.active { background: rgba(180,148,60,0.3); color: var(--gold-light); }
.main-content { padding: 2rem; overflow-y: auto; }

/* ── Job cards ── */
.jobs-grid { display: grid; gap: 1rem; }
.job-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s;
}
.job-card:hover { border-color: var(--gold); box-shadow: var(--shadow); }
.job-card-info h3 { color: var(--forest); font-family: var(--font-sans); font-weight: 500; }
.job-card-meta { display: flex; gap: 1rem; margin-top: 0.25rem; font-size: 0.82rem; color: var(--text-muted); }
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: capitalize;
}
.status-setup { background: #EFF6FF; color: #1D4ED8; }
.status-capturing { background: #FFF7ED; color: #C2410C; }
.status-awaiting_family { background: #FDF4FF; color: #7E22CE; }
.status-ready_for_report { background: #F0FDF4; color: #15803D; }
.status-complete { background: #F8FAFC; color: #475569; }

/* ── Rooms & Items ── */
.rooms-list { display: flex; flex-direction: column; gap: 1rem; }
.room-block {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.room-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--cream-dark);
  cursor: pointer;
}
.room-items { padding: 1rem 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; }
.item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--cream);
  border-radius: var(--radius);
  gap: 1rem;
}
.item-row-info { flex: 1; }
.item-row-info .item-name { font-weight: 500; font-size: 0.9rem; color: var(--forest); }
.item-row-info .item-meta { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.1rem; }
.item-actions { display: flex; gap: 0.5rem; }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  padding: 1rem;
}
.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.modal-title { font-size: 1.25rem; color: var(--forest); font-family: var(--font-serif); }
.modal-close { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 1.25rem; }

/* ── Link copy box ── */
.link-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--cream-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-top: 0.5rem;
}
.link-box code { flex: 1; font-size: 0.78rem; color: var(--forest); word-break: break-all; }

/* ── Alert ── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.88rem;
  margin-bottom: 1rem;
}
.alert-success { background: #F0FDF4; border: 1px solid #BBF7D0; color: #15803D; }
.alert-error { background: #FFF5F5; border: 1px solid #FED7D7; color: var(--danger); }
.alert-info { background: #EFF6FF; border: 1px solid #BFDBFE; color: #1D4ED8; }

/* ── Loading ── */
.spinner {
  width: 24px; height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 2rem auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-center { display: flex; justify-content: center; padding: 3rem; }

/* ── Section headers ── */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.section-title { font-family: var(--font-serif); color: var(--forest); }

/* ── Public pages (family/crew/report) ── */
.public-page { max-width: 700px; margin: 0 auto; padding: 2rem 1rem; }
.public-header { text-align: center; padding: 2rem 0 1.5rem; border-bottom: 1px solid var(--border); margin-bottom: 2rem; }

/* ── Decision buttons ── */
.decision-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 0.5rem; margin-top: 0.75rem; }
.decision-btn {
  padding: 0.6rem 0.5rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
  font-size: 0.8rem;
  font-family: var(--font-sans);
  transition: all 0.2s;
  text-align: center;
}
.decision-btn:hover { border-color: var(--gold); background: var(--cream); }
.decision-btn.selected { border-color: var(--gold); background: var(--gold); color: var(--white); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .dashboard { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .nav { padding: 1rem; }
  .hero { padding: 3rem 1rem; }
  .pricing-grid { grid-template-columns: 1fr; }
}

/* ── Utilities ── */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-gold { color: var(--gold); }
.text-forest { color: var(--forest); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.w-full { width: 100%; }
.divider { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }
