/* ========================================
   SnapMeet — editorial, warm, conference floor
   ======================================== */

:root {
  --cream: #f7f1e8;
  --cream-2: #efe7d8;
  --paper: #fdfaf3;
  --ink: #1a2332;
  --ink-2: #2c3a52;
  --ink-soft: #5d6b82;
  --coral: #ff6b5b;
  --coral-dark: #e0533f;
  --moss: #5a7a52;
  --gold: #c79a4a;
  --line: rgba(26, 35, 50, 0.12);
  --line-strong: rgba(26, 35, 50, 0.25);
  --shadow-sm: 0 1px 2px rgba(26, 35, 50, 0.06), 0 1px 3px rgba(26, 35, 50, 0.04);
  --shadow-md: 0 4px 12px rgba(26, 35, 50, 0.08), 0 2px 4px rgba(26, 35, 50, 0.04);
  --shadow-lg: 0 12px 32px rgba(26, 35, 50, 0.12), 0 4px 8px rgba(26, 35, 50, 0.06);
  --radius: 14px;
  --radius-sm: 8px;
  --max: 1180px;
  --font-display: 'Fraunces', 'Times New Roman', serif;
  --font-body: 'Geist', -apple-system, system-ui, sans-serif;
  --font-mono: 'Geist Mono', 'SF Mono', monospace;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.5;
  min-height: 100vh;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
}

/* Subtle paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
  opacity: 0.06;
  mix-blend-mode: multiply;
  z-index: 1;
}
body > * { position: relative; z-index: 2; }

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; }
a { color: var(--coral-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ========================================
   SCREENS
   ======================================== */
.screen { display: none; min-height: 100vh; animation: fadeIn 0.3s ease; }
.screen.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ========================================
   BRAND
   ======================================== */
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.015em;
  cursor: pointer;
  white-space: nowrap;
}
.brand.small { font-size: 1.05rem; }
.brand-mark { width: 32px; height: 32px; flex-shrink: 0; }
.brand.small .brand-mark { width: 26px; height: 26px; }

/* ========================================
   LANDING
   ======================================== */
.landing-header {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.landing-main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 64px 0 80px;
}

.eyebrow {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin-bottom: 20px;
  letter-spacing: 0.01em;
}
.eyebrow em { color: var(--coral-dark); font-style: italic; }

.hero-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin-bottom: 24px;
  font-variation-settings: "opsz" 110;
}
.accent {
  color: var(--coral);
  font-style: italic;
  font-variation-settings: "opsz" 144;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--ink-2);
  max-width: 480px;
  margin-bottom: 32px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.hero-fineprint {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.hero-svg {
  width: 100%;
  max-width: 460px;
  height: auto;
  display: block;
  margin-left: auto;
}

.how-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding: 56px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.how-item h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.35rem;
  margin: 8px 0 6px;
  letter-spacing: -0.01em;
}
.how-item p { color: var(--ink-soft); font-size: 0.97rem; }
.how-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--coral);
  letter-spacing: 0.15em;
}

.landing-foot {
  margin-top: 56px;
  padding: 32px 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.landing-foot .dot { margin: 0 8px; }

/* ========================================
   BUTTONS
   ======================================== */
.primary-btn {
  background: var(--ink);
  color: var(--paper);
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.97rem;
  letter-spacing: -0.005em;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-sm);
}
.primary-btn:hover { background: var(--ink-2); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.primary-btn:active { transform: translateY(0); }
.primary-btn.full { width: 100%; justify-content: center; }

.ghost-btn {
  background: transparent;
  color: var(--ink);
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-weight: 500;
  font-size: 0.97rem;
  transition: all 0.15s ease;
}
.ghost-btn:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.icon-btn {
  width: 40px; height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.link-btn {
  background: none;
  color: var(--coral-dark);
  font-weight: 500;
  padding: 0;
  font-size: inherit;
}
.link-btn:hover { text-decoration: underline; }

.danger-btn {
  background: #fbe9e6;
  color: var(--coral-dark);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid #f3c9c1;
  font-weight: 500;
  transition: all 0.15s ease;
}
.danger-btn:hover { background: var(--coral); color: white; border-color: var(--coral); }

.back-btn {
  background: none;
  color: var(--ink-soft);
  font-size: 0.9rem;
  padding: 8px 0;
  margin-bottom: 16px;
  font-weight: 500;
}
.back-btn:hover { color: var(--ink); }

/* ========================================
   AUTH FORMS
   ======================================== */
.auth-wrap {
  max-width: 460px;
  margin: 0 auto;
  padding: 32px 24px 64px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-wrap.wide { max-width: 640px; }

.auth-card {
  background: var(--paper);
  padding: 40px 36px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--line);
}
.admin-card { border-top: 4px solid var(--ink); }
.lock-icon { font-size: 2rem; margin-bottom: 8px; }

.auth-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 2rem;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  line-height: 1.1;
}
.auth-sub {
  color: var(--ink-soft);
  margin-bottom: 28px;
  font-size: 0.95rem;
}
.auth-alt { margin-top: 18px; text-align: center; font-size: 0.9rem; color: var(--ink-soft); }
.auth-alt.subtle { font-size: 0.8rem; opacity: 0.75; }
.auth-alt code { background: var(--cream-2); padding: 2px 6px; border-radius: 4px; font-family: var(--font-mono); font-size: 0.85em; }

/* ========================================
   FORMS
   ======================================== */
.form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--ink-2);
  font-weight: 500;
}
.form label .hint, .form .hint {
  font-weight: 400;
  color: var(--ink-soft);
  font-size: 0.78rem;
}
.form label .hint code, .form .hint code {
  background: var(--cream-2);
  padding: 1px 5px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.85em;
}

.form input[type="text"],
.form input[type="email"],
.form input[type="password"],
.form input[type="url"],
.form input[type="time"],
.form input[type="date"],
.form select,
.form textarea {
  background: white;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 0.97rem;
  color: var(--ink);
  transition: border 0.15s ease, box-shadow 0.15s ease;
  font-family: var(--font-body);
}
.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(26, 35, 50, 0.08);
}
.form textarea { resize: vertical; min-height: 100px; font-family: var(--font-body); }

.form input[type="color"] {
  width: 60px;
  height: 38px;
  padding: 2px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
}

.count { font-weight: 400; font-size: 0.78rem; color: var(--ink-soft); float: right; }
.count.over { color: var(--coral-dark); font-weight: 600; }

.form-error {
  color: var(--coral-dark);
  font-size: 0.85rem;
  min-height: 1.2em;
  font-weight: 500;
}

.check {
  flex-direction: row !important;
  align-items: flex-start;
  gap: 10px !important;
  font-weight: 400 !important;
  font-size: 0.88rem !important;
  color: var(--ink-2) !important;
  line-height: 1.45;
}
.check input { margin-top: 2px; flex-shrink: 0; }

.consent {
  background: var(--cream-2);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

.block-label {
  font-size: 0.88rem;
  color: var(--ink-2);
  font-weight: 500;
  margin-bottom: 10px;
}
.availability-block { display: flex; flex-direction: column; }

.days-availability {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--cream-2);
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}
.day-row {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: 10px;
  align-items: center;
}
.day-row label.check { font-size: 0.85rem !important; min-width: 110px; }
.day-row input[type="time"] { padding: 8px 10px; font-size: 0.88rem; }
.day-row.disabled input[type="time"] { opacity: 0.4; pointer-events: none; }

/* ========================================
   APP HEADER
   ======================================== */
.app-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.admin-header { border-bottom-color: var(--ink); border-bottom-width: 2px; }

.header-event {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
  color: var(--ink-2);
  flex: 1;
  text-align: center;
  letter-spacing: -0.005em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 8px;
}

/* ========================================
   TAB BAR
   ======================================== */
.tab-bar {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 0;
  padding: 0 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  position: sticky;
  top: 65px;
  z-index: 9;
}
.tab-bar::-webkit-scrollbar { display: none; }

.tab {
  padding: 14px 18px;
  font-size: 0.93rem;
  color: var(--ink-soft);
  font-weight: 500;
  position: relative;
  white-space: nowrap;
  transition: color 0.15s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); }
.tab.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--coral);
}
.tab .badge {
  background: var(--coral);
  color: white;
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 600;
  min-width: 18px;
  text-align: center;
}
.tab .badge:empty { display: none; }

.tab-pane { display: none; }
.tab-pane.active { display: block; animation: fadeIn 0.25s ease; }

.subtabs {
  display: flex;
  gap: 8px;
  margin: 16px 0;
  border-bottom: 1px solid var(--line);
}
.subtab {
  padding: 10px 14px;
  font-size: 0.9rem;
  color: var(--ink-soft);
  font-weight: 500;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.subtab.active { color: var(--ink); border-bottom-color: var(--ink); }

.subtab-pane { display: none; }
.subtab-pane.active { display: block; }

/* ========================================
   APP MAIN
   ======================================== */
.app-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.85rem;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  line-height: 1.1;
}
.section-sub {
  color: var(--ink-soft);
  font-size: 0.97rem;
  margin-bottom: 24px;
}

/* ========================================
   AD SLOTS
   ======================================== */
.ad-slot {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}
.ad-slot:empty { display: none; }
.ad-card {
  background: var(--ink);
  color: var(--paper);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  transition: transform 0.15s ease;
  text-decoration: none;
  border-left: 3px solid var(--coral);
}
.ad-card:hover { transform: translateY(-1px); text-decoration: none; }
.ad-card .ad-text { flex: 1; min-width: 0; }
.ad-card .ad-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  opacity: 0.5;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.ad-card .ad-headline { font-weight: 600; font-size: 0.97rem; margin-bottom: 2px; }
.ad-card .ad-tagline { font-size: 0.85rem; opacity: 0.85; }
.ad-card .ad-sponsor { font-size: 0.75rem; opacity: 0.7; }

/* ========================================
   ATTENDEE LIST (Discover)
   ======================================== */
.search-box {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.search-box input {
  flex: 1;
  min-width: 200px;
  background: white;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 0.95rem;
}
.search-box input:focus { outline: none; border-color: var(--ink); }

.attendee-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.attendee-card {
  background: var(--paper);
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}
.attendee-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.attendee-card .score {
  position: absolute;
  top: 18px;
  right: 18px;
  background: var(--cream-2);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 3px 9px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.attendee-card .score.high { background: var(--coral); color: white; }
.attendee-card .score.med { background: var(--gold); color: white; }

.attendee-card .name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
  padding-right: 60px;
}
.attendee-card .company {
  color: var(--ink-soft);
  font-size: 0.88rem;
  margin-bottom: 12px;
}
.attendee-card .pitch {
  font-size: 0.9rem;
  color: var(--ink-2);
  margin-bottom: 14px;
  line-height: 1.5;
  flex: 1;
}
.attendee-card .pitch.truncated {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.attendee-card .tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.tag {
  background: var(--cream-2);
  color: var(--ink-2);
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
}
.tag.matched { background: var(--coral); color: white; }

.attendee-card .actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}
.attendee-card .actions button {
  flex: 1;
  padding: 10px 14px;
  font-size: 0.88rem;
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.empty-state .icon { font-size: 2.4rem; margin-bottom: 12px; opacity: 0.5; }

/* ========================================
   REQUESTS LIST
   ======================================== */
.request-list, .meetings-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.request-card, .meeting-card {
  background: var(--paper);
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
}
.request-card .req-info { min-width: 0; }
.request-card .req-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.request-card .req-company { color: var(--ink-soft); font-size: 0.85rem; }
.request-card .req-msg { font-size: 0.9rem; margin-top: 8px; color: var(--ink-2); font-style: italic; }
.request-card .req-status {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  display: inline-block;
  margin-top: 6px;
}
.status-pending { background: #fcefce; color: #8a6b0e; }
.status-accepted { background: #d4ead0; color: #2f5d28; }
.status-rejected { background: #f4d8d4; color: #99362a; }
.status-booked { background: var(--ink); color: var(--paper); }

.req-actions { display: flex; flex-direction: column; gap: 6px; }
.req-actions button { padding: 8px 14px; font-size: 0.85rem; white-space: nowrap; }

.meeting-card .meet-time {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}
.meeting-card .meet-with {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
}
.meeting-card .meet-loc { font-size: 0.85rem; color: var(--ink-soft); margin-top: 4px; }
.meeting-card .meet-duration {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background: var(--cream-2);
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.05em;
}

/* ========================================
   ORGANISER
   ======================================== */
.org-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.event-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.event-card {
  background: var(--paper);
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.event-card .ev-code {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--coral-dark);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.event-card .ev-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  line-height: 1.15;
}
.event-card .ev-dates {
  color: var(--ink-soft);
  font-size: 0.88rem;
  margin-bottom: 14px;
}
.event-card .ev-stats {
  display: flex;
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.event-card .stat-num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  display: block;
  line-height: 1;
}
.event-card .stat-label {
  font-size: 0.72rem;
  color: var(--ink-soft);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.billing-card {
  background: var(--paper);
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  max-width: 640px;
}
.billing-status { margin-bottom: 16px; font-size: 1rem; }
.billing-card p { margin-bottom: 12px; color: var(--ink-2); }
.rate-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.92rem;
}
.rate-table th, .rate-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.rate-table th {
  background: var(--cream-2);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}
.muted { color: var(--ink-soft); font-size: 0.85rem; font-style: italic; }

/* ========================================
   ADMIN
   ======================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--paper);
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.stat-card .num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 500;
  line-height: 1;
}
.stat-card .lbl {
  font-size: 0.78rem;
  color: var(--ink-soft);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 4px;
}

.danger-zone {
  background: #fdf3f1;
  border: 1px solid #f3c9c1;
  padding: 20px;
  border-radius: var(--radius);
  margin-top: 32px;
}
.danger-zone h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: var(--coral-dark);
}

.db-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 2px;
}
.db-tab {
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-soft);
  background: var(--cream-2);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.db-tab.active { background: var(--ink); color: var(--paper); }

.db-table-wrap {
  background: var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  max-height: 60vh;
  overflow-y: auto;
}
.db-output {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #d4dae3;
  padding: 16px;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.5;
}

.sponsor-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 24px;
}
.sponsor-item {
  background: var(--paper);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.sponsor-item .info { min-width: 0; }
.sponsor-item .info strong { display: block; }
.sponsor-item .info small { color: var(--ink-soft); font-size: 0.78rem; }
.sponsor-item .del-btn {
  background: none;
  color: var(--coral-dark);
  font-size: 1.2rem;
  padding: 4px 8px;
}

/* ----- Email admin ----- */
.email-status-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}
.email-status-card.paused {
  border-color: var(--coral);
  background: #fdf3f1;
  border-left: 4px solid var(--coral);
}
.email-status-card .status-pill {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 6px;
  background: var(--moss);
  color: white;
}
.email-status-card .status-pill.paused { background: var(--coral); }
.email-status-card .status-pill.disabled { background: var(--ink-soft); }
.email-status-card .meter-label {
  font-size: 0.78rem;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.email-status-card .meter-value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1;
}
.email-status-card .meter-bar {
  height: 4px;
  background: var(--cream-2);
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}
.email-status-card .meter-fill {
  height: 100%;
  background: var(--moss);
  transition: width 0.3s ease;
}
.email-status-card .meter-fill.warn { background: var(--gold); }
.email-status-card .meter-fill.full { background: var(--coral); }
.email-status-card .resume-btn {
  background: var(--coral);
  color: white;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.9rem;
  align-self: center;
  justify-self: end;
}
.email-status-card .resume-btn:hover { background: var(--coral-dark); }

.email-settings-form {
  background: var(--paper);
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  max-width: 720px;
  margin-bottom: 32px;
}
.master-switch {
  background: var(--cream-2);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

.subsection-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.email-log-wrap {
  background: var(--paper);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: auto;
  max-height: 480px;
}
.email-log {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.email-log th {
  background: var(--cream-2);
  padding: 10px 14px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
  color: var(--ink-2);
  position: sticky;
  top: 0;
}
.email-log td {
  padding: 9px 14px;
  border-top: 1px solid var(--line);
  vertical-align: top;
}
.email-log td.col-status .pill {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.05em;
  display: inline-block;
}
.pill.sent { background: #d4ead0; color: #2f5d28; }
.pill.blocked { background: #fcefce; color: #8a6b0e; }
.pill.failed { background: #f4d8d4; color: #99362a; }
.email-log td.col-detail { color: var(--ink-soft); font-family: var(--font-mono); font-size: 0.78rem; }
.email-log td.col-when { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-soft); white-space: nowrap; }

/* ========================================
   MODAL
   ======================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(26, 35, 50, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
  backdrop-filter: blur(4px);
}
.modal-backdrop.active { display: flex; }
.modal {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.25s ease;
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }

.modal h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.5rem;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}
.modal p { color: var(--ink-2); margin-bottom: 16px; font-size: 0.95rem; }
.modal .modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
  flex-wrap: wrap;
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  margin: 16px 0;
}
.slot-btn {
  background: var(--cream-2);
  border: 1px solid var(--line);
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  text-align: center;
  cursor: pointer;
  font-family: var(--font-mono);
  transition: all 0.15s ease;
}
.slot-btn:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.slot-btn.selected { background: var(--coral); color: white; border-color: var(--coral); }

/* ========================================
   TOAST
   ======================================== */
#toast-container {
  background: transparent;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 40px;
  pointer-events: none;
}
#toast-container.active { display: flex; }
#toast {
  background: var(--ink);
  color: var(--paper);
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease;
}
@keyframes toastIn { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ========================================
   PROFILE FORM
   ======================================== */
.profile-form {
  background: var(--paper);
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  max-width: 720px;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 880px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 32px 0 48px;
    text-align: left;
  }
  .hero-visual { order: -1; }
  .hero-svg { max-width: 320px; margin: 0 auto; }
  .how-strip { grid-template-columns: 1fr; gap: 20px; padding: 32px 0; }
  .landing-header { padding: 20px 24px; }
  .landing-main { padding: 24px; }
}

@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
  .auth-card { padding: 28px 22px; }
  .auth-title { font-size: 1.65rem; }
  .section-title { font-size: 1.5rem; }
  .app-header { padding: 12px 16px; }
  .header-event { font-size: 0.88rem; }
  .app-main { padding: 20px 16px 80px; }
  .day-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 10px;
    background: var(--paper);
    border-radius: var(--radius-sm);
  }
  .day-row label.check { min-width: 0; }
  .request-card, .meeting-card { grid-template-columns: 1fr; }
  .req-actions { flex-direction: row; }
  .req-actions button { flex: 1; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .primary-btn, .hero-cta .ghost-btn { width: 100%; justify-content: center; }
  .org-head { flex-direction: column; align-items: stretch; }
  .org-head button { width: 100%; }
}

@media (max-width: 480px) {
  .landing-header { padding: 16px 20px; }
  .landing-main { padding: 20px; }
  .brand { font-size: 1.2rem; }
  .hero-title { font-size: 2.3rem; }
}

/* ========================================
   EMAIL ADMIN
   ======================================== */
.email-status-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 24px;
}
.email-status-card.paused {
  background: #fdf3f1;
  border-color: #f3c9c1;
  border-left: 4px solid var(--coral-dark);
}
.email-status-card.healthy {
  border-left: 4px solid var(--moss);
}
.email-status-card .status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.email-status-card .status-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.email-status-card .status-value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
  letter-spacing: -0.015em;
}
.email-status-card .status-value.danger { color: var(--coral-dark); }
.email-status-card .status-value.warn { color: var(--gold); }
.email-status-card .status-value.ok { color: var(--moss); }
.email-status-card .pause-reason {
  font-size: 0.92rem;
  color: var(--coral-dark);
  margin-bottom: 12px;
  font-weight: 500;
}

.usage-bars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.usage-bar { display: flex; flex-direction: column; gap: 4px; }
.usage-bar .ub-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--ink-soft);
}
.usage-bar .ub-label strong { color: var(--ink); font-family: var(--font-mono); }
.usage-bar .ub-track {
  height: 6px;
  background: var(--cream-2);
  border-radius: 3px;
  overflow: hidden;
}
.usage-bar .ub-fill {
  height: 100%;
  background: var(--moss);
  transition: width 0.3s ease, background 0.2s ease;
}
.usage-bar .ub-fill.warn { background: var(--gold); }
.usage-bar .ub-fill.danger { background: var(--coral); }

.cap-emphasis {
  font-size: 0.68rem;
  background: var(--coral);
  color: white;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-left: 8px;
  font-weight: 600;
  vertical-align: middle;
}

.master-switch {
  background: var(--cream-2);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
}

.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.email-settings-form {
  background: var(--paper);
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  margin-bottom: 32px;
}

.subsection-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.25rem;
  letter-spacing: -0.015em;
  margin-bottom: 14px;
}

.email-log-wrap {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  max-height: 480px;
  overflow-y: auto;
}
.email-log {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.email-log thead {
  position: sticky;
  top: 0;
  background: var(--cream-2);
}
.email-log th, .email-log td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.email-log th {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
}
.email-log td .pill {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
  display: inline-block;
}
.email-log td .pill.sent { background: #d4ead0; color: #2f5d28; }
.email-log td .pill.blocked { background: #fcefce; color: #8a6b0e; }
.email-log td .pill.failed { background: #f4d8d4; color: #99362a; }
.email-log .when { font-family: var(--font-mono); color: var(--ink-soft); white-space: nowrap; font-size: 0.78rem; }
.email-log .empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--ink-soft);
}

@media (max-width: 640px) {
  .email-log th:nth-child(3), .email-log td:nth-child(3) { display: none; }
  .email-log th, .email-log td { padding: 8px 10px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
