/* ============================================================
   AgendaSync — Design System
   Palette Digital Wallonia, glassmorphism, Inter typography
   ============================================================ */

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

/* ── Tokens ── */
:root {
  --color-bg:          #0C1426;
  --color-bg-2:        #111C35;
  --color-surface:     rgba(255,255,255,0.05);
  --color-surface-2:   rgba(255,255,255,0.09);
  --color-border:      rgba(255,255,255,0.10);
  --color-border-2:    rgba(255,255,255,0.18);

  --color-primary:     #2563EB;
  --color-primary-l:   #3B82F6;
  --color-primary-d:   #1D4ED8;
  --color-accent:      #6366F1;
  --color-accent-l:    #818CF8;
  --color-teal:        #06B6D4;

  --color-yes:         #10B981;
  --color-yes-bg:      rgba(16,185,129,0.15);
  --color-yes-border:  rgba(16,185,129,0.35);
  --color-ifneeded:    #F59E0B;
  --color-ifneeded-bg: rgba(245,158,11,0.15);
  --color-ifneeded-border: rgba(245,158,11,0.35);
  --color-no:          #EF4444;
  --color-no-bg:       rgba(239,68,68,0.15);
  --color-no-border:   rgba(239,68,68,0.35);

  --color-text:        #F1F5F9;
  --color-text-2:      #94A3B8;
  --color-text-3:      #64748B;

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  18px;
  --radius-xl:  24px;
  --radius-2xl: 32px;

  --shadow-sm:  0 1px 3px rgba(0,0,0,0.3);
  --shadow-md:  0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg:  0 10px 40px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 40px rgba(37,99,235,0.25);

  --transition: 0.2s cubic-bezier(0.4,0,0.2,1);
  --transition-slow: 0.4s cubic-bezier(0.4,0,0.2,1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Background decoration ── */
body::before {
  content: '';
  position: fixed;
  top: -40%;
  left: -20%;
  width: 80vw;
  height: 80vw;
  background: radial-gradient(circle, rgba(37,99,235,0.12) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: '';
  position: fixed;
  bottom: -40%;
  right: -20%;
  width: 70vw;
  height: 70vw;
  background: radial-gradient(circle, rgba(99,102,241,0.10) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* ── Layout ── */
.app-container { position: relative; z-index: 1; }

/* ── Navbar ── */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--color-border);
  background: rgba(12,20,38,0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 100;
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}
.navbar-logo {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.navbar-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
}
.navbar-subtitle {
  font-size: 0.7rem;
  color: var(--color-text-2);
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.navbar-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-link {
  color: var(--color-text-2);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.nav-link:hover {
  color: var(--color-text);
  background: var(--color-surface);
}

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 5rem 2rem 3rem;
  max-width: 760px;
  margin: 0 auto;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(37,99,235,0.15);
  border: 1px solid rgba(37,99,235,0.35);
  color: var(--color-primary-l);
  padding: 0.35rem 1rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  background: linear-gradient(135deg, #fff 30%, var(--color-accent-l));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}
.hero p {
  font-size: 1.1rem;
  color: var(--color-text-2);
  max-width: 520px;
  margin: 0 auto 2rem;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: white;
  box-shadow: 0 4px 20px rgba(37,99,235,0.35);
}
.btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 28px rgba(37,99,235,0.5);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--color-surface-2);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--color-border-2);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-2);
  padding: 0.5rem 0.875rem;
}
.btn-ghost:hover {
  color: var(--color-text);
  background: var(--color-surface);
}

.btn-danger {
  background: rgba(239,68,68,0.15);
  color: var(--color-no);
  border: 1px solid var(--color-no-border);
}
.btn-danger:hover {
  background: rgba(239,68,68,0.25);
}

.btn-success {
  background: rgba(16,185,129,0.15);
  color: var(--color-yes);
  border: 1px solid var(--color-yes-border);
}
.btn-success:hover {
  background: rgba(16,185,129,0.25);
}

.btn-sm {
  padding: 0.4rem 0.875rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}
.btn-lg {
  padding: 0.9rem 2rem;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}
.btn-block { width: 100%; justify-content: center; }
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ── Cards ── */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: var(--transition);
}
.card:hover { border-color: var(--color-border-2); }
.card-elevated {
  background: var(--color-surface-2);
  box-shadow: var(--shadow-md);
}
.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.25rem;
  letter-spacing: -0.01em;
}
.card-subtitle {
  font-size: 0.8rem;
  color: var(--color-text-2);
}

/* ── Forms ── */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-2);
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-family: inherit;
  font-size: 0.9rem;
  transition: var(--transition);
  outline: none;
}
.form-control::placeholder { color: var(--color-text-3); }
.form-control:focus {
  border-color: var(--color-primary);
  background: rgba(255,255,255,0.09);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}
textarea.form-control { resize: vertical; min-height: 90px; }
select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2394A3B8' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}
.form-hint {
  font-size: 0.775rem;
  color: var(--color-text-3);
  margin-top: 0.35rem;
}
.form-row {
  display: grid;
  gap: 1rem;
}
.form-row-2 { grid-template-columns: 1fr 1fr; }
.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }

/* ── Step indicator ── */
.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 2.5rem;
  padding: 0 1rem;
}
.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  flex: 1;
  max-width: 120px;
  position: relative;
}
.step-item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 16px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--color-border);
}
.step-item.active:not(:last-child)::after,
.step-item.done:not(:last-child)::after {
  background: linear-gradient(90deg, var(--color-primary), var(--color-border));
}
.step-bubble {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-surface-2);
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-text-3);
  position: relative;
  z-index: 1;
  transition: var(--transition);
}
.step-item.active .step-bubble {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  border-color: transparent;
  color: white;
  box-shadow: 0 0 16px rgba(37,99,235,0.5);
}
.step-item.done .step-bubble {
  background: var(--color-yes);
  border-color: transparent;
  color: white;
}
.step-label {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--color-text-3);
  text-align: center;
  line-height: 1.2;
}
.step-item.active .step-label { color: var(--color-primary-l); }
.step-item.done .step-label { color: var(--color-yes); }

/* ── Section ── */
.section { padding: 2rem; max-width: 860px; margin: 0 auto; }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.section-title .icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(37,99,235,0.20);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

/* ── Slot picker ── */
.slot-list { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1rem; }
.slot-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.875rem 1rem;
  transition: var(--transition);
}
.slot-item:hover { border-color: var(--color-border-2); }
.slot-date-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 56px;
  background: rgba(37,99,235,0.18);
  border: 1px solid rgba(37,99,235,0.3);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.5rem;
}
.slot-day { font-size: 1.2rem; font-weight: 800; color: var(--color-primary-l); line-height: 1; }
.slot-month { font-size: 0.65rem; font-weight: 600; color: var(--color-text-2); text-transform: uppercase; letter-spacing: 0.05em; }
.slot-info { flex: 1; }
.slot-weekday { font-size: 0.8rem; color: var(--color-text-2); }
.slot-time { font-size: 0.95rem; font-weight: 600; color: var(--color-text); }
.slot-remove {
  background: transparent;
  border: none;
  color: var(--color-text-3);
  cursor: pointer;
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  font-size: 1rem;
  line-height: 1;
}
.slot-remove:hover { color: var(--color-no); background: var(--color-no-bg); }

/* ── Availability choices ── */
.choice-group {
  display: flex;
  gap: 0.5rem;
}
.choice-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.875rem 0.5rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 2px solid transparent;
  background: var(--color-surface);
  transition: var(--transition);
  font-family: inherit;
}
.choice-btn .choice-icon { font-size: 1.4rem; }
.choice-btn .choice-label { font-size: 0.7rem; font-weight: 600; color: var(--color-text-3); }

.choice-btn[data-value="yes"] { border-color: rgba(16,185,129,0.2); }
.choice-btn[data-value="yes"]:hover,
.choice-btn[data-value="yes"].selected {
  background: var(--color-yes-bg);
  border-color: var(--color-yes-border);
}
.choice-btn[data-value="yes"].selected .choice-label { color: var(--color-yes); }

.choice-btn[data-value="ifneeded"] { border-color: rgba(245,158,11,0.2); }
.choice-btn[data-value="ifneeded"]:hover,
.choice-btn[data-value="ifneeded"].selected {
  background: var(--color-ifneeded-bg);
  border-color: var(--color-ifneeded-border);
}
.choice-btn[data-value="ifneeded"].selected .choice-label { color: var(--color-ifneeded); }

.choice-btn[data-value="no"] { border-color: rgba(239,68,68,0.2); }
.choice-btn[data-value="no"]:hover,
.choice-btn[data-value="no"].selected {
  background: var(--color-no-bg);
  border-color: var(--color-no-border);
}
.choice-btn[data-value="no"].selected .choice-label { color: var(--color-no); }

/* ── Slot card for respond page ── */
.respond-slot {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 0.875rem;
  transition: var(--transition);
}
.respond-slot:hover { border-color: var(--color-border-2); }
.respond-slot-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

/* ── Availability matrix ── */
.matrix-wrapper { overflow-x: auto; padding-bottom: 0.5rem; }
.matrix-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 500px;
}
.matrix-table th {
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-2);
  text-align: center;
  white-space: nowrap;
  border-bottom: 1px solid var(--color-border);
}
.matrix-table th.slot-col {
  background: var(--color-surface-2);
  border-radius: var(--radius-sm);
  max-width: 110px;
}
.matrix-table td {
  padding: 0.6rem 0.75rem;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.matrix-table tr:hover td { background: rgba(255,255,255,0.02); }
.matrix-table td.participant-name {
  text-align: left;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
}
.matrix-table td.participant-org {
  text-align: left;
  font-size: 0.75rem;
  color: var(--color-text-2);
}
.cell-yes { color: var(--color-yes); font-size: 1.1rem; }
.cell-ifneeded { color: var(--color-ifneeded); font-size: 1.1rem; }
.cell-no { color: var(--color-no); font-size: 1.1rem; }
.cell-pending { color: var(--color-text-3); font-size: 0.85rem; }

.score-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--color-border);
  margin: 0 auto;
  overflow: hidden;
  max-width: 80px;
}
.score-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-yes));
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
}
.score-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-text-2);
  margin-bottom: 0.2rem;
}

/* ── Best slot highlight ── */
.best-slot {
  background: rgba(16,185,129,0.10);
  border: 1px solid rgba(16,185,129,0.25);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
  transition: var(--transition);
}
.best-slot:hover { background: rgba(16,185,129,0.15); }
.best-slot.rank-1 {
  background: rgba(16,185,129,0.15);
  border-color: rgba(16,185,129,0.4);
}
.best-slot-rank {
  font-size: 1.3rem;
  min-width: 32px;
}
.best-slot-info { flex: 1; }
.best-slot-date { font-size: 0.95rem; font-weight: 600; color: var(--color-text); }
.best-slot-time { font-size: 0.8rem; color: var(--color-text-2); }
.best-slot-stats {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.stat-pill {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
}
.stat-yes { background: var(--color-yes-bg); color: var(--color-yes); }
.stat-ifneeded { background: var(--color-ifneeded-bg); color: var(--color-ifneeded); }
.stat-no { background: var(--color-no-bg); color: var(--color-no); }

/* ── Share link box ── */
.share-box {
  background: rgba(37,99,235,0.08);
  border: 1px solid rgba(37,99,235,0.25);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
}
.share-box-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-primary-l);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.share-input-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}
.share-input {
  flex: 1;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-2);
  font-size: 0.8rem;
  padding: 0.65rem 0.875rem;
  font-family: 'Courier New', monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  outline: none;
  cursor: pointer;
}
.share-input:focus { border-color: var(--color-primary); }

/* ── Token box ── */
.token-box {
  background: rgba(99,102,241,0.08);
  border: 1px dashed rgba(99,102,241,0.4);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
}
.token-text {
  font-family: 'Courier New', monospace;
  font-size: 0.75rem;
  color: var(--color-accent-l);
  word-break: break-all;
  margin: 1rem 0;
  line-height: 1.6;
  background: rgba(0,0,0,0.25);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
}

/* ── Meeting card (index page) ── */
.meeting-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  transition: var(--transition);
}
.meeting-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px rgba(37,99,235,0.2), var(--shadow-md);
  transform: translateX(3px);
}
.meeting-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(37,99,235,0.3), rgba(99,102,241,0.3));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.meeting-card-body { flex: 1 }
.meeting-card-title { font-size: 0.95rem; font-weight: 700; color: var(--color-text); }
.meeting-card-meta { font-size: 0.775rem; color: var(--color-text-2); margin-top: 0.15rem; }
.meeting-card-status {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
}
.status-open { background: rgba(16,185,129,0.15); color: var(--color-yes); }
.status-closed { background: rgba(100,116,139,0.2); color: var(--color-text-3); }
.status-pending { background: rgba(245,158,11,0.15); color: var(--color-ifneeded); }

/* ── Badge ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 100px;
}
.badge-blue { background: rgba(37,99,235,0.15); color: var(--color-primary-l); }
.badge-green { background: var(--color-yes-bg); color: var(--color-yes); }
.badge-amber { background: var(--color-ifneeded-bg); color: var(--color-ifneeded); }
.badge-red { background: var(--color-no-bg); color: var(--color-no); }
.badge-gray { background: rgba(100,116,139,0.2); color: var(--color-text-2); }

/* ── Toast ── */
.toast-container {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.toast {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border-2);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  animation: toast-in 0.3s cubic-bezier(0.4,0,0.2,1), toast-out 0.3s cubic-bezier(0.4,0,0.2,1) 2.5s forwards;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  white-space: nowrap;
}
.toast-success { border-left: 3px solid var(--color-yes); }
.toast-error { border-left: 3px solid var(--color-no); }
.toast-info { border-left: 3px solid var(--color-primary); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toast-out {
  from { opacity: 1; }
  to { opacity: 0; transform: translateY(-8px); }
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fade-in 0.2s ease;
}
.modal-overlay.hidden { display: none; }
.modal {
  background: var(--color-bg-2);
  border: 1px solid var(--color-border-2);
  border-radius: var(--radius-2xl);
  padding: 2rem;
  max-width: 520px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  animation: modal-in 0.25s cubic-bezier(0.4,0,0.2,1);
}
@keyframes modal-in {
  from { opacity: 0; transform: scale(0.95) translateY(16px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.modal-title { font-size: 1.1rem; font-weight: 700; }
.modal-close {
  background: transparent;
  border: none;
  color: var(--color-text-2);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  padding: 0.2rem;
  transition: var(--transition);
}
.modal-close:hover { color: var(--color-text); }

/* ── Contact chip ── */
.contact-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.contact-chip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text);
  transition: var(--transition);
}
.contact-chip .chip-remove {
  background: transparent;
  border: none;
  color: var(--color-text-3);
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  padding: 0;
  transition: var(--transition);
}
.contact-chip .chip-remove:hover { color: var(--color-no); }

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--color-text-3);
}
.empty-state-icon { font-size: 2.5rem; margin-bottom: 1rem; opacity: 0.6; }
.empty-state-title { font-size: 1rem; font-weight: 600; color: var(--color-text-2); margin-bottom: 0.5rem; }
.empty-state-desc { font-size: 0.875rem; }

/* ── Divider ── */
.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 1.5rem 0;
}

/* ── Progress summary ── */
.progress-summary {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.progress-stat {
  flex: 1;
  min-width: 120px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  text-align: center;
}
.progress-stat-number {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.04em;
}
.progress-stat-label {
  font-size: 0.75rem;
  color: var(--color-text-2);
  margin-top: 0.15rem;
}

/* ── Confirmation block ── */
.confirm-block {
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.30);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  text-align: center;
}
.confirm-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-yes);
  margin-bottom: 0.5rem;
}
.confirm-slot-display {
  background: rgba(255,255,255,0.07);
  border-radius: var(--radius-md);
  padding: 0.875rem;
  margin: 1rem 0;
  font-size: 1rem;
  font-weight: 600;
}

/* ── Utilities ── */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--color-text-2); }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.fw-700 { font-weight: 700; }
.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; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.hidden { display: none !important; }
.w-full { width: 100%; }

/* ── Responsive ── */
@media (max-width: 640px) {
  .navbar { padding: 0.875rem 1rem; }
  .hero { padding: 3rem 1rem 2rem; }
  .section { padding: 1.25rem 1rem; }
  .form-row-2, .form-row-3 { grid-template-columns: 1fr; }
  .steps { gap: 0; }
  .step-label { display: none; }
  .choice-btn { padding: 0.65rem 0.25rem; }
  .best-slot { flex-wrap: wrap; }
  .progress-summary { gap: 0.5rem; }
  .share-input-row { flex-direction: column; }
}
