/* ============================================================
   WEDINOVA — Design System CSS
   ============================================================ */

:root {
  --gold:        #C9A96E;
  --gold-dark:   #8B6914;
  --gold-light:  #F0E0C0;
  --ivory:       #FDFAF5;
  --cream:       #F4EFE4;
  --deep:        #1A1208;
  --text:        #2D2416;
  --text-muted:  #7A6A52;
  --border:      #E4D9C5;
  --white:       #FFFFFF;
  --success:     #2D7A4F;
  --danger:      #C0392B;
  --warning:     #D4820A;
  --info:        #1A5C8A;
  --radius:      12px;
  --radius-sm:   8px;
  --radius-lg:   20px;
  --shadow:      0 2px 16px rgba(26,18,8,0.08);
  --shadow-md:   0 4px 32px rgba(26,18,8,0.12);
  --shadow-lg:   0 8px 48px rgba(26,18,8,0.16);
  --font-serif:  'Cormorant Garamond', Georgia, serif;
  --font-sans:   'Inter', system-ui, sans-serif;
  --transition:  all 0.2s ease;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-sans); color: var(--text); background: var(--ivory); line-height: 1.6; }
img  { max-width: 100%; display: block; }
a    { color: var(--gold-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }

/* ── Typography ─────────────────────────────────────────────── */
h1,h2,h3,h4,h5 { line-height: 1.2; font-weight: 600; color: var(--deep); }
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.875rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }
.serif { font-family: var(--font-serif); }
.text-muted  { color: var(--text-muted); }
.text-gold   { color: var(--gold-dark); }
.text-sm     { font-size: 0.875rem; }
.text-xs     { font-size: 0.75rem; }
.text-center { text-align: center; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }

/* ── Layout ──────────────────────────────────────────────────── */
.container     { max-width: 1160px; margin: 0 auto; padding: 0 1.25rem; }
.container-sm  { max-width: 720px;  margin: 0 auto; padding: 0 1.25rem; }
.container-xs  { max-width: 480px;  margin: 0 auto; padding: 0 1.25rem; }
.page          { min-height: 100vh; display: flex; flex-direction: column; }
.main          { flex: 1; padding: 2rem 0; }

/* Grid */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.flex   { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-1  { gap: 0.5rem; }
.gap-2  { gap: 1rem; }
.gap-3  { gap: 1.5rem; }
.wrap   { flex-wrap: wrap; }

/* Spacing */
.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; }
.mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2rem; }

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

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.65rem 1.4rem; border-radius: var(--radius-sm); border: 1.5px solid transparent;
  font-weight: 500; font-size: 0.9rem; cursor: pointer; transition: var(--transition);
  text-decoration: none; white-space: nowrap; line-height: 1.4;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--deep); color: var(--gold-light); border-color: var(--deep);
}
.btn-primary:hover { background: #2d1f0e; }
.btn-gold {
  background: var(--gold); color: var(--deep); border-color: var(--gold);
  font-weight: 600;
}
.btn-gold:hover { background: #b8952a; }
.btn-outline {
  background: transparent; color: var(--text); border-color: var(--border);
}
.btn-outline:hover { background: var(--cream); }
.btn-ghost {
  background: transparent; color: var(--text-muted); border-color: transparent;
}
.btn-ghost:hover { background: var(--cream); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-sm  { padding: 0.4rem 0.9rem; font-size: 0.8rem; }
.btn-lg  { padding: 0.85rem 2rem; font-size: 1rem; }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-icon { padding: 0.5rem; border-radius: var(--radius-sm); }

/* ── Forms ───────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block; font-size: 0.85rem; font-weight: 500;
  color: var(--text); margin-bottom: 0.4rem;
}
.form-group label .req { color: var(--danger); margin-left: 2px; }
.form-control {
  width: 100%; padding: 0.7rem 1rem; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); background: var(--white);
  color: var(--text); transition: var(--transition); font-size: 0.95rem;
}
.form-control:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,169,110,0.15);
}
.form-control::placeholder { color: #b0a090; }
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { cursor: pointer; }
.form-control.error { border-color: var(--danger); }
.form-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.3rem; }
.form-error { font-size: 0.8rem; color: var(--danger); margin-top: 0.3rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ── Badge ───────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.2rem 0.65rem; border-radius: 99px; font-size: 0.75rem; font-weight: 500;
}
.badge-attending { background: #D1FAE5; color: #065F46; }
.badge-declined  { background: #FEE2E2; color: #991B1B; }
.badge-maybe     { background: #FEF3C7; color: #92400E; }
.badge-pending   { background: #F3F4F6; color: #6B7280; }
.badge-gold      { background: var(--gold-light); color: var(--gold-dark); }
.badge-published { background: #D1FAE5; color: #065F46; }
.badge-draft     { background: #F3F4F6; color: #6B7280; }

/* ── Alert ───────────────────────────────────────────────────── */
.alert {
  padding: 1rem 1.25rem; border-radius: var(--radius-sm);
  margin-bottom: 1.25rem; border-left: 4px solid; font-size: 0.9rem;
}
.alert-success { background: #F0FDF4; border-color: #22C55E; color: #166534; }
.alert-error   { background: #FEF2F2; border-color: #EF4444; color: #991B1B; }
.alert-warning { background: #FFFBEB; border-color: #F59E0B; color: #92400E; }
.alert-info    { background: #EFF6FF; border-color: #3B82F6; color: #1E40AF; }

/* ── Table ───────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th {
  background: var(--cream); padding: 0.85rem 1rem; text-align: left;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.table td {
  padding: 0.85rem 1rem; border-bottom: 1px solid var(--border);
  color: var(--text); vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--cream); }

/* ── Navbar ──────────────────────────────────────────────────── */
.navbar {
  background: var(--white); border-bottom: 1px solid var(--border);
  padding: 0; position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 8px rgba(26,18,8,0.06);
}
.navbar-inner {
  max-width: 1160px; margin: 0 auto; padding: 0 1.25rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.navbar-brand {
  font-family: var(--font-serif); font-size: 1.5rem;
  color: var(--deep); font-weight: 400; letter-spacing: 0.02em;
}
.navbar-brand em { color: var(--gold); font-style: normal; }
.navbar-nav { display: flex; align-items: center; gap: 0.5rem; }

/* ── Sidebar (Dashboard) ─────────────────────────────────────── */
.dashboard-layout {
  display: grid; grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 64px);
}
.sidebar {
  background: var(--deep); padding: 2rem 0;
  position: sticky; top: 64px; height: calc(100vh - 64px); overflow-y: auto;
}
.sidebar-logo {
  padding: 0 1.5rem 1.5rem;
  border-bottom: 1px solid rgba(201,169,110,0.2);
  margin-bottom: 1rem;
}
.sidebar-logo span {
  font-family: var(--font-serif); font-size: 1.3rem;
  color: var(--gold-light); display: block;
}
.sidebar-section {
  padding: 0.5rem 1rem;
  font-size: 0.65rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(201,169,110,0.4);
  margin-top: 0.5rem;
}
.sidebar-nav a {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.7rem 1.5rem; color: rgba(255,255,255,0.65);
  font-size: 0.9rem; transition: var(--transition);
  border-left: 3px solid transparent;
}
.sidebar-nav a:hover {
  background: rgba(201,169,110,0.08); color: var(--gold-light);
  text-decoration: none;
}
.sidebar-nav a.active {
  background: rgba(201,169,110,0.12); color: var(--gold-light);
  border-left-color: var(--gold);
}
.sidebar-nav a svg { flex-shrink: 0; opacity: 0.7; }
.sidebar-nav a.active svg { opacity: 1; }
.dashboard-content { padding: 2.5rem; background: var(--ivory); overflow-y: auto; }

/* ── Stat Cards ──────────────────────────────────────────────── */
.stat-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  display: flex; align-items: flex-start; gap: 1rem;
}
.stat-icon {
  width: 48px; height: 48px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.stat-icon-gold    { background: var(--gold-light); color: var(--gold-dark); }
.stat-icon-green   { background: #D1FAE5; color: #065F46; }
.stat-icon-red     { background: #FEE2E2; color: #991B1B; }
.stat-icon-yellow  { background: #FEF3C7; color: #92400E; }
.stat-icon-blue    { background: #DBEAFE; color: #1E40AF; }
.stat-label { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }
.stat-value { font-size: 2rem; font-weight: 700; color: var(--deep); line-height: 1.1; margin-top: 0.2rem; }
.stat-sub   { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.25rem; }

/* ── Event Card ──────────────────────────────────────────────── */
.event-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: var(--transition); box-shadow: var(--shadow);
}
.event-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.event-card-cover {
  height: 140px; background: linear-gradient(135deg, var(--deep), #3d2b1f);
  display: flex; align-items: center; justify-content: center; position: relative;
}
.event-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.event-card-cover .cover-placeholder {
  font-family: var(--font-serif); font-size: 2rem;
  color: var(--gold); opacity: 0.6;
}
.event-card-body { padding: 1.25rem; }
.event-card-title { font-weight: 600; font-size: 1rem; margin-bottom: 0.4rem; }
.event-card-meta { font-size: 0.82rem; color: var(--text-muted); display: flex; align-items: center; gap: 0.5rem; }
.event-card-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0; border-top: 1px solid var(--border); margin-top: 1rem;
}
.event-card-stat {
  padding: 0.75rem; text-align: center;
  border-right: 1px solid var(--border);
}
.event-card-stat:last-child { border-right: none; }
.event-card-stat .n { font-size: 1.2rem; font-weight: 700; color: var(--deep); }
.event-card-stat .l { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.event-card-footer {
  padding: 0.75rem 1.25rem; background: var(--cream);
  display: flex; align-items: center; justify-content: space-between;
}

/* ── Modal ───────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(26,18,8,0.5);
  z-index: 1000; display: flex; align-items: center; justify-content: center;
  padding: 1rem; opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 2rem; max-width: 560px; width: 100%;
  box-shadow: var(--shadow-lg); max-height: 90vh; overflow-y: auto;
  transform: scale(0.95); transition: transform 0.2s;
}
.modal-overlay.active .modal { transform: scale(1); }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.modal-close { background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 0.25rem; }

/* ── Pagination ──────────────────────────────────────────────── */
.pagination { display: flex; align-items: center; gap: 0.4rem; justify-content: center; }
.pagination a, .pagination span {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  font-size: 0.875rem; border: 1px solid var(--border); color: var(--text);
  transition: var(--transition);
}
.pagination a:hover { background: var(--cream); text-decoration: none; }
.pagination .active { background: var(--deep); color: var(--gold-light); border-color: var(--deep); }

/* ── Progress ────────────────────────────────────────────────── */
.progress { background: var(--cream); border-radius: 99px; height: 8px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 99px; background: var(--gold); transition: width 0.4s ease; }
.progress-bar.green  { background: #22C55E; }
.progress-bar.red    { background: #EF4444; }

/* ── Tabs ────────────────────────────────────────────────────── */
.tabs { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 1.5rem; }
.tab-btn {
  padding: 0.75rem 1.25rem; font-size: 0.875rem; font-weight: 500;
  color: var(--text-muted); border: none; background: none; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -2px; transition: var(--transition);
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--gold-dark); border-bottom-color: var(--gold); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── RSVP Status Badges ──────────────────────────────────────── */
.rsvp-dot {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block; margin-right: 0.4rem;
}
.rsvp-dot.attending { background: #22C55E; }
.rsvp-dot.declined  { background: #EF4444; }
.rsvp-dot.maybe     { background: #F59E0B; }
.rsvp-dot.pending   { background: #D1D5DB; }

/* ── Empty State ─────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 4rem 2rem; color: var(--text-muted);
}
.empty-state svg { margin: 0 auto 1rem; opacity: 0.3; }
.empty-state h3  { font-size: 1.1rem; color: var(--text); margin-bottom: 0.5rem; }

/* ── Breadcrumb ──────────────────────────────────────────────── */
.breadcrumb { display: flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--gold-dark); }
.breadcrumb span { color: var(--text); font-weight: 500; }

/* ── Landing Page ────────────────────────────────────────────── */
.hero-section {
  background: var(--deep);
  padding: 6rem 1.25rem 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(201,169,110,0.15), transparent);
  pointer-events: none;
}
.hero-eyebrow {
  font-size: 0.7rem; letter-spacing: 0.35em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 1.5rem; display: block;
}
.hero-title {
  font-family: var(--font-serif); font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 300; color: var(--ivory); line-height: 1.05; margin-bottom: 1.5rem;
}
.hero-title em { color: var(--gold); font-style: normal; }
.hero-sub {
  font-size: 1.1rem; color: rgba(253,250,245,0.65);
  max-width: 540px; margin: 0 auto 2.5rem; line-height: 1.7;
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.features-section { padding: 5rem 0; background: var(--white); }
.feature-card {
  text-align: center; padding: 2rem 1.5rem;
}
.feature-icon {
  width: 56px; height: 56px; margin: 0 auto 1rem;
  background: var(--cream); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; color: var(--gold-dark);
}
.feature-card h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.feature-card p  { font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; }

/* ── Auth Pages ──────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh; background: var(--cream);
  display: flex; align-items: center; justify-content: center; padding: 2rem;
}
.auth-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 2.5rem; width: 100%; max-width: 440px;
  box-shadow: var(--shadow-lg); border: 1px solid var(--border);
}
.auth-logo {
  text-align: center; margin-bottom: 2rem;
  font-family: var(--font-serif); font-size: 2rem; color: var(--deep);
}
.auth-logo em { color: var(--gold); font-style: normal; }
.auth-divider {
  text-align: center; position: relative; margin: 1.5rem 0;
  color: var(--text-muted); font-size: 0.8rem;
}
.auth-divider::before {
  content: ''; position: absolute; top: 50%; left: 0; right: 0;
  height: 1px; background: var(--border);
}
.auth-divider span { background: var(--white); padding: 0 0.75rem; position: relative; }

/* ── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ── Utilities ───────────────────────────────────────────────── */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden  { display: none !important; }
.visible { display: block !important; }
.rounded { border-radius: var(--radius); }
.rounded-full { border-radius: 99px; }
.w-full  { width: 100%; }
.relative { position: relative; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .dashboard-layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: -240px; top: 64px; width: 240px;
    height: calc(100vh - 64px); z-index: 200; transition: left 0.25s ease;
  }
  .sidebar.open { left: 0; }
  .dashboard-content { padding: 1.5rem; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .event-card-stats { grid-template-columns: repeat(3, 1fr); }
  .table th, .table td { padding: 0.65rem 0.75rem; font-size: 0.82rem; }
  .btn-lg { padding: 0.75rem 1.5rem; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2.5rem; }
  .auth-card { padding: 1.75rem 1.25rem; }
}
