/* ==========================================================================
   Ventingchat — Design System
   Theme: Cream and Ink (Soft, minimalist, trustworthy)
   Fonts: Outfit (Heading), DM Sans (Body)
   ========================================================================== */

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

:root {
  --cream: #F5F0E8;
  --ink: #1A1714;
  --warm: #C8A882;
  --rose: #D4826A;
  --muted: #8A7F74;
  --card: #FFFFFF;

  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Outfit', var(--font-body);

  --transition-base: 0.2s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

  /* PRICING CARD */
  .pricing-card {
    background: #1C1A17;
    border-radius: 20px;
    padding: 56px 64px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 48px;
    max-width: 900px;
    width: 100%;
    position: relative;
    overflow: hidden;
    margin: 40px auto 100px;
  }

  /* Subtle radial glow top-right */
  .pricing-card::after {
    content: '';
    position: absolute;
    top: -80px;
    right: -40px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(196, 168, 130, 0.15) 0%, transparent 65%);
    pointer-events: none;
  }

  /* LEFT SIDE */
  .pricing-left {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .pricing-label {
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #C4A882;
  }

  .pricing-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 52px;
    font-weight: 300;
    line-height: 1.1;
    color: #FDFAF6;
    letter-spacing: -0.01em;
  }

  .pricing-desc {
    font-size: 14px;
    font-weight: 300;
    color: rgba(253, 250, 246, 0.45);
    line-height: 1.75;
    max-width: 380px;
  }

  /* RIGHT SIDE */
  .pricing-right {
    text-align: right;
    flex-shrink: 0;
  }

  .price-card {
    font-family: 'Cormorant Garamond', serif;
    font-size: 72px;
    font-weight: 300;
    line-height: 1;
    color: #FDFAF6;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 2px;
  }

  .price-currency {
    font-size: 32px;
    font-weight: 300;
    color: #C4A882;
    margin-top: 10px;
    line-height: 1;
  }

  .price-per {
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(253, 250, 246, 0.4);
    margin-top: 8px;
    text-align: right;
  }

  /* RESPONSIVE */
  @media (max-width: 640px) {
    .pricing-card {
      flex-direction: column;
      align-items: flex-start;
      padding: 40px 32px;
      gap: 36px;
      margin: 20px auto 50px;
    }
    .pricing-right { text-align: left; }
    .price-amount { justify-content: flex-start; }
    .price-per { text-align: left; }
    .pricing-title { font-size: 40px; }
  }

/* Grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

/* --- Navigation --- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 1.5rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(245, 240, 232, 0.85);
  border-bottom: 1px solid rgba(200, 168, 130, 0.2);
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--ink);
  letter-spacing: -0.02em;
  text-decoration: none;
}

.logo span {
  color: var(--rose);
}

nav p {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 300;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 2rem 4rem;
  position: relative;
  z-index: 1;
}

.hero-inner {
  max-width: 700px;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rose);
  border: 1px solid var(--rose);
  padding: 0.35rem 0.9rem;
  border-radius: 100px;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeUp 0.6s 0.1s forwards;
}

h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.8rem, 7vw, 5rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.7s 0.2s forwards;
}

h1 em {
  font-style: italic;
  color: var(--rose);
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--muted);
  font-weight: 300;
  line-height: 1.7;
  max-width: 480px;
  margin: 0 auto 3rem;
  opacity: 0;
  animation: fadeUp 0.7s 0.35s forwards;
}

/* --- Product Card --- */
.product-wrap {
  opacity: 0;
  animation: fadeUp 0.7s 0.5s forwards;
}

.product-card {
  background: var(--card);
  border-radius: var(--radius-xl);
  padding: 3rem;
  box-shadow: 0 2px 40px rgba(26, 23, 20, 0.08), 0 0 0 1px rgba(200, 168, 130, 0.15);
  max-width: 420px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--warm), var(--rose));
}

.product-badge {
  display: inline-block;
  background: rgba(212, 130, 106, 0.1);
  color: var(--rose);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  border-radius: 100px;
  margin-bottom: 1.2rem;
}

.product-name {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}

.product-desc {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 300;
  margin-bottom: 1.8rem;
  line-height: 1.6;
}

.product-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.3rem;
  margin-bottom: 1.8rem;
}

.price-amount {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  line-height: 1;
  letter-spacing: -0.03em;
}

.price-currency {
  font-size: 1.4rem;
  color: var(--muted);
  font-weight: 300;
  align-self: flex-start;
  margin-top: 0.5rem;
}

.price-period {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 300;
}

.features {
  list-style: none;
  margin-bottom: 2rem;
  text-align: left;
}

.features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.88rem;
  color: var(--muted);
  padding: 0.4rem 0;
}

.features li::before {
  content: '✓';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: rgba(212, 130, 106, 0.12);
  color: var(--rose);
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* --- Buttons --- */
.btn-primary {
  width: 100%;
  padding: 1rem 2rem;
  background: var(--ink);
  color: var(--cream);
  border: none;
  border-radius: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  background: var(--rose);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(212, 130, 106, 0.35);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary.loading {
  pointer-events: none;
  opacity: 0.7;
}

/* --- Trust Strip --- */
.trust {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-top: 3rem;
  opacity: 0;
  animation: fadeUp 0.7s 0.65s forwards;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 300;
}

.trust-item .icon {
  font-size: 1rem;
}

/* --- How It Works --- */
.how {
  padding: 5rem 2rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--warm);
  margin-bottom: 1rem;
}

.how h2 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  letter-spacing: -0.02em;
  margin-bottom: 3rem;
}

.steps {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  max-width: 700px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.step {
  flex: 1;
  min-width: 150px;
  max-width: 180px;
}

.step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-heading);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.step h3 {
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.step p {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 300;
  line-height: 1.5;
}

/* --- Footer --- */
footer {
  text-align: center;
  padding: 2.5rem;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 300;
  border-top: 1px solid rgba(200, 168, 130, 0.2);
  position: relative;
  z-index: 1;
}

/* --- Modal --- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26, 23, 20, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 500;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--card);
  border-radius: 20px;
  padding: 2.5rem;
  width: 90%;
  max-width: 380px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2);
  animation: modalIn 0.25s ease;
  text-align: center;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-bottom: 0.4rem;
}

.modal p {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  font-weight: 300;
}

.modal input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1.5px solid rgba(200, 168, 130, 0.35);
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  background: var(--cream);
  color: var(--ink);
  outline: none;
  margin-bottom: 0.8rem;
  transition: border-color var(--transition-base);
}

.modal input:focus {
  border-color: var(--rose);
}

.modal input::placeholder {
  color: var(--muted);
}

.modal-error {
  font-size: 0.78rem;
  color: var(--rose);
  margin-bottom: 0.8rem;
  display: none;
  text-align: left;
}

.modal-error.show {
  display: block;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
}

.btn-ghost {
  flex: 1;
  padding: 0.85rem;
  border: 1.5px solid rgba(200, 168, 130, 0.35);
  background: transparent;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-ghost:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.btn-confirm {
  flex: 2;
  padding: 0.85rem;
  background: var(--ink);
  color: var(--cream);
  border: none;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-confirm:hover {
  background: var(--rose);
}

.btn-confirm.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* --- Success Page --- */
.success-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  position: relative;
  z-index: 1;
}

.success-page .product-card {
  opacity: 1;
  transform: none;
}

.success-emoji {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.success-page h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  animation: none;
  opacity: 1;
}

.success-subtitle {
  color: var(--muted);
  margin-bottom: 2rem;
}

.confirm-box {
  padding: 1.5rem;
  background: var(--cream);
  border-radius: 12px;
  margin-bottom: 2rem;
  border: 1px solid rgba(200, 168, 130, 0.2);
}

.confirm-label {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.confirm-email {
  font-weight: 700;
  color: var(--ink);
  word-break: break-all;
}

.next-steps {
  text-align: left;
  margin-bottom: 2rem;
}

.next-steps h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.next-step-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: center;
}

.next-step-row:last-child {
  margin-bottom: 0;
}

.step-circle {
  width: 28px;
  height: 28px;
  background: var(--ink);
  color: var(--cream);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.next-step-row p {
  font-size: 0.9rem;
  color: var(--muted);
}

.btn-home {
  text-decoration: none;
  display: inline-block;
}

/* --- Admin Page --- */
.admin-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  position: relative;
  z-index: 1;
}

/* Login gate: centred, max width */
#admin-login-wrap {
  width: 100%;
  max-width: 420px;
}

/* Dashboard: hidden by default, shown via JS */
#admin-dashboard {
  display: none;
}

/* --- Admin Login Card --- */
#admin-login {
  opacity: 1;
  transform: none;
}

#admin-login h1 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  animation: none;
  opacity: 1;
}

.admin-login-emoji {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.admin-login-subtitle {
  color: var(--muted);
  margin-bottom: 2rem;
  font-size: 0.92rem;
}

.admin-login-form {
  text-align: left;
}

.admin-input-group {
  margin-bottom: 1.5rem;
}

.admin-input-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.admin-input {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1.5px solid rgba(200, 168, 130, 0.35);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--cream);
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.admin-input:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(212, 130, 106, 0.12);
}

.admin-input::placeholder {
  color: var(--muted);
  font-weight: 300;
}

.login-error {
  font-size: 0.78rem;
  color: var(--rose);
  margin-top: 0.5rem;
  min-height: 1rem;
}

/* --- Admin Dashboard Header --- */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.dashboard-header h1 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  animation: none;
  opacity: 1;
}

.dashboard-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* --- Logout Button --- */
.btn-logout {
  background: none;
  border: 1.5px solid rgba(200, 168, 130, 0.4);
  border-radius: 10px;
  padding: 0.55rem 1.2rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  letter-spacing: 0.01em;
}

.btn-logout:hover {
  border-color: var(--rose);
  color: var(--rose);
  background: rgba(212, 130, 106, 0.06);
  transform: translateY(-1px);
}

.btn-logout:active {
  transform: translateY(0);
}

/* --- Dashboard Error --- */
.dashboard-error {
  color: var(--rose);
  font-size: 0.85rem;
  margin-bottom: 1rem;
  min-height: 1.2rem;
}

/* --- Table Loading --- */
.table-loading {
  padding: 3rem;
  text-align: center;
  color: var(--muted);
}

/* Hide last th right-align via class */
th.th-right {
  text-align: right;
}

/* --- Admin & Table Polished UI --- */
.admin-dashboard-wrap {
  width: 100%;
  max-width: 1100px;
  margin-top: 6rem;
  animation: fadeUp 0.8s ease forwards;
}

.table-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: 0 4px 30px rgba(26, 23, 20, 0.04), 0 0 0 1px rgba(200, 168, 130, 0.1);
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

th {
  padding: 1rem;
  text-align: left;
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  border-bottom: 2px solid var(--cream);
}

td {
  padding: 1.25rem 1rem;
  font-size: 0.88rem;
  border-bottom: 1px solid rgba(200, 168, 130, 0.05);
  vertical-align: middle;
  color: var(--ink);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: rgba(200, 168, 130, 0.03);
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.8rem;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-pending {
  background: #FFF9F0;
  color: #B47E00;
  border: 1px solid #FFEDCC;
}

.status-pending::before {
  background: #FFB000;
}

.status-email_sent {
  background: #F0F7FF;
  color: #0056B3;
  border: 1px solid #D1E9FF;
}

.status-email_sent::before {
  background: #007BFF;
}

.status-link_sent {
  background: #F5EEFF;
  color: #6F42C1;
  border: 1px solid #E9D8FF;
}

.status-link_sent::before {
  background: #8A5CF5;
}

.status-completed {
  background: #F0FFF4;
  color: #1E7E34;
  border: 1px solid #DCFFE4;
}

.status-completed::before {
  background: #28A745;
}

/* Admin Action Buttons */
.action-btn {
  background: var(--ink);
  color: var(--cream);
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  white-space: nowrap;
}

.action-btn:hover {
  background: var(--rose);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 130, 106, 0.2);
}

.action-btn:active {
  transform: translateY(0);
}

.table-empty {
  padding: 4rem 2rem;
  text-align: center;
  color: var(--muted);
  font-style: italic;
  font-weight: 300;
}

.stat-card {
  background: var(--card);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px rgba(26, 23, 20, 0.03), 0 0 0 1px rgba(200, 168, 130, 0.1);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 140px;
}

.stat-value {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--rose);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.65rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

/* --- Animations --- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 480px) {
  nav {
    padding: 1.2rem 1.5rem;
  }

  .product-card {
    padding: 2rem 1.5rem;
  }

  h1 {
    font-size: 2.5rem;
  }
}