/* ReviewMate — Dashboard Design System v2 */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --green:    #15663E;
  --green-d:  #0D4A2C;
  --green-dd: #08301F;
  --gold:     #B57E10;
  --gold-b:   #E8A317;
  --ivory:    #FBF7EC;
  --ivory-d:  #F3EDD8;
  --white:    #FFFFFF;
  --dark:     #111827;
  --gray:     #6B7280;
  --gray-l:   #E5E7EB;
  --red:      #DC2626;
  --blue:     #2563EB;

  /* Dashboard-specific */
  --bg:       #F3F4F6;
  --surface:  #FFFFFF;
  --border:   #E5E7EB;
  --ink:      #111827;
  --muted:    #6B7280;
  --sidebar-w: 232px;

  --radius:    8px;
  --radius-lg: 12px;
  --shadow:    0 1px 2px rgba(0,0,0,0.05), 0 1px 4px rgba(0,0,0,0.04);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--ink); background: var(--bg);
  line-height: 1.6; -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.2; }
h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.25rem, 2.5vw, 1.7rem); font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 700; }

a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Containers ─── */
.container    { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 640px;  margin: 0 auto; padding: 0 24px; }

/* ─── Top Nav ─── */
.nav {
  background: var(--green);
  padding: 0 24px;
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid rgba(0,0,0,0.12);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06), 0 2px 8px rgba(0,0,0,0.18);
}
.nav-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 58px;
}
.nav-brand {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.45rem; font-weight: 800;
  color: #fff; letter-spacing: -0.04em;
  text-decoration: none;
}
.nav-brand em { color: #F5A623; font-style: normal; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  color: rgba(255,255,255,0.78); font-size: 0.85rem; font-weight: 500;
  padding: 6px 11px; border-radius: 7px;
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: #fff; background: rgba(255,255,255,0.1); text-decoration: none; }
.nav-links a.active { color: #F5A623; }

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px; border-radius: var(--radius);
  font-family: 'Inter', system-ui, sans-serif; font-size: 0.875rem; font-weight: 600;
  border: none; cursor: pointer; transition: all 0.15s ease;
  text-decoration: none; line-height: 1; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-d); color: #fff; }
.btn-gold { background: #F5A623; color: #1a1a1a; }
.btn-gold:hover { background: #e09510; color: #1a1a1a; }
.btn-outline {
  background: transparent; color: var(--ink);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--ink); background: transparent; color: var(--ink); }
.btn-white { background: var(--white); color: var(--green-d); }
.btn-white:hover { background: var(--ivory); color: var(--green-d); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #B91C1C; color: #fff; }
.btn-sm  { padding: 6px 12px; font-size: 0.78rem; }
.btn-lg  { padding: 13px 26px; font-size: 0.95rem; }
.btn-block { width: 100%; }
.btn-outline-light {
  background: transparent; color: rgba(255,255,255,0.85);
  border: 1.5px solid rgba(255,255,255,0.3);
}
.btn-outline-light:hover { background: rgba(255,255,255,0.1); color: #fff; }
.btn-amber { background: #F5A623; color: #1a1a1a; }
.btn-amber:hover { background: #e09510; color: #1a1a1a; }

/* ─── Forms ─── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; color: var(--muted); }
.form-control {
  width: 100%; padding: 10px 13px;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-family: 'Inter', system-ui, sans-serif; font-size: 0.9rem;
  color: var(--ink); background: var(--white);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus {
  outline: none; border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(21,102,62,0.1);
}
.form-hint { font-size: 0.78rem; color: var(--muted); margin-top: 4px; }
.form-check { display: flex; align-items: flex-start; gap: 10px; }
.form-check input[type="checkbox"] { margin-top: 3px; accent-color: var(--green); width: 16px; height: 16px; }

/* ─── Cards ─── */
.card {
  background: var(--surface); border-radius: var(--radius-lg);
  border: 1px solid var(--border); padding: 24px;
  box-shadow: var(--shadow);
}
.card-title { font-size: 1rem; font-weight: 700; margin-bottom: 16px; color: var(--ink); letter-spacing: -0.01em; }

/* ─── Alerts ─── */
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; font-size: 0.875rem; font-weight: 500; }
.alert-success { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.alert-error   { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.alert-info    { background: #EFF6FF; color: #1E40AF; border: 1px solid #BFDBFE; }
.alert-warning { background: #FFFBEB; color: #92400E; border: 1px solid #FDE68A; }

/* ─── Dashboard Layout ─── */
.dash-wrapper {
  display: flex;
  min-height: calc(100vh - 58px);
}

/* ─── Sidebar ─── */
.dash-sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--white);
  border-right: 1px solid var(--border);
  padding: 20px 0;
  position: sticky; top: 58px;
  height: calc(100vh - 58px);
  overflow-y: auto;
}
.dash-sidebar a {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 18px; margin: 1px 10px;
  color: var(--muted); font-size: 0.845rem; font-weight: 500;
  border-radius: 7px; border: none;
  transition: color .15s, background .15s;
}
.dash-sidebar a:hover {
  color: var(--ink); background: var(--bg);
  text-decoration: none;
}
.dash-sidebar a.active {
  color: var(--green); background: #ECFDF5;
  font-weight: 600;
}
.dash-sidebar .sidebar-section {
  font-size: 0.67rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: #9CA3AF; padding: 18px 18px 5px;
  margin: 0 10px;
}

/* ─── Main content ─── */
.dash-main {
  flex: 1; padding: 32px;
  background: var(--bg);
  overflow-y: auto; min-width: 0;
}
.dash-header { margin-bottom: 28px; }
.dash-header h1 { font-size: 1.5rem; }

/* ─── Stats Grid ─── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px; margin-bottom: 24px;
}
.stat-card {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 20px 18px; border: 1px solid var(--border);
  box-shadow: var(--shadow); text-align: center;
  transition: box-shadow .2s;
}
.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-number {
  font-size: 2.2rem; font-weight: 800; color: var(--green);
  line-height: 1; letter-spacing: -0.03em;
  font-family: 'Inter', system-ui, sans-serif;
}
.stat-label {
  font-size: 0.72rem; color: var(--muted); font-weight: 600;
  text-transform: uppercase; letter-spacing: .07em; margin-top: 5px;
}

/* ─── Tables ─── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
th {
  background: var(--green); color: #fff;
  padding: 10px 14px; text-align: left; font-weight: 600; font-size: 0.8rem;
  text-transform: uppercase; letter-spacing: .04em;
}
td { padding: 11px 14px; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #F9FAFB; }

/* ─── Badges ─── */
.badge { display: inline-block; padding: 3px 10px; border-radius: 100px; font-size: 0.72rem; font-weight: 700; }
.badge-green { background: #D1FAE5; color: #065F46; }
.badge-gold  { background: #FEF3C7; color: #92400E; }
.badge-gray  { background: var(--gray-l); color: var(--muted); }
.badge-red   { background: #FEE2E2; color: #991B1B; }

/* ─── Marketing hero (public pages) ─── */
.hero {
  background: var(--green-dd); padding: 80px 24px;
  text-align: center; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at top, rgba(181,126,16,0.15) 0%, transparent 70%);
}
.hero-content { position: relative; max-width: 760px; margin: 0 auto; }
.hero h1 { color: var(--ivory); font-size: clamp(2.2rem, 5vw, 3.8rem); margin-bottom: 20px; font-family: 'DM Serif Display', serif; }
.hero h1 span { color: var(--gold-b); }
.hero p { color: rgba(255,255,255,0.75); font-size: 1.15rem; max-width: 560px; margin: 0 auto 32px; }
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ─── Feature / Pricing ─── */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.feature-card {
  background: var(--white); border-radius: var(--radius-lg); padding: 28px;
  border: 1px solid var(--border); box-shadow: var(--shadow);
}
.feature-icon { font-size: 2rem; margin-bottom: 12px; }
.feature-card h3 { margin-bottom: 8px; }
.feature-card p { color: var(--muted); font-size: 0.9rem; }

.pricing-card {
  background: var(--white); border-radius: 16px; padding: 40px;
  border: 2px solid var(--green); box-shadow: var(--shadow-lg);
  max-width: 400px; margin: 0 auto; text-align: center;
}
.pricing-price { font-family: 'DM Serif Display', serif; font-size: 3.5rem; color: var(--green); line-height: 1; }
.pricing-price span { font-size: 1.25rem; vertical-align: top; margin-top: 12px; display: inline-block; }

/* ─── Microsite ─── */
.microsite-hero { background: var(--green); padding: 48px 24px; text-align: center; color: #fff; }
.microsite-hero h1 { color: #fff; font-size: 2.5rem; }
.microsite-hero p { color: rgba(255,255,255,0.8); margin-top: 8px; }
.microsite-section { padding: 48px 0; }
.microsite-section:nth-child(even) { background: var(--ivory); }

/* ─── Review landing ─── */
.review-card {
  max-width: 640px; margin: 40px auto; background: var(--white);
  border-radius: 16px; padding: 40px; box-shadow: var(--shadow-lg);
}
.review-textarea {
  width: 100%; min-height: 150px; padding: 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-family: 'Inter', system-ui, sans-serif; font-size: 0.95rem; resize: vertical;
}
.review-textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(21,102,62,0.1); }
.destination-btn {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 14px 18px; margin-bottom: 10px;
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--radius); cursor: pointer;
  font-family: 'Inter', system-ui, sans-serif; font-size: 0.95rem; font-weight: 600;
  transition: all 0.15s;
}
.destination-btn:hover { border-color: var(--green); background: #F9FAFB; }
.destination-btn.posted { border-color: var(--green); background: #ECFDF5; color: #065F46; }

/* ─── Milestones ─── */
.milestone-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--green); color: #fff;
  font-weight: 800; font-size: 0.9rem; margin: 5px;
  font-family: 'Inter', system-ui, sans-serif;
}
.milestone-badge.locked { background: var(--border); color: var(--muted); }

/* ─── Footer ─── */
.footer { background: var(--green-dd); color: rgba(255,255,255,0.6); padding: 40px 24px; text-align: center; font-size: 0.85rem; }
.footer a { color: rgba(255,255,255,0.6); }
.footer-brand { color: var(--ivory); font-family: 'DM Serif Display', serif; font-size: 1.25rem; margin-bottom: 8px; }

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .dash-wrapper { flex-direction: column; }
  .dash-sidebar {
    width: 100%; height: auto; position: static;
    border-right: none; border-bottom: 1px solid var(--border);
    padding: 8px 0; overflow-x: auto; white-space: nowrap;
    display: flex; align-items: center;
  }
  .dash-sidebar a { display: inline-flex; padding: 7px 13px; margin: 0 2px; }
  .dash-sidebar .sidebar-section { display: none; }
  .dash-main { padding: 20px 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-links { gap: 4px; }
  .hero { padding: 48px 16px; }
}

/* ─── Utilities ─── */
.text-center { text-align: center; }
.text-muted  { color: var(--muted); }
.text-green  { color: var(--green); }
.text-gold   { color: var(--gold); }
.mt-1 { margin-top: 8px; }  .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.gap-2 { gap: 16px; } .gap-3 { gap: 24px; }
.flex { display: flex; } .flex-wrap { flex-wrap: wrap; } .items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }
.w-full { width: 100%; }
.hidden { display: none; }

/* White text on any green table header row */
tr[style*='background:var(--green)'] th,
tr[style*='background: var(--green)'] th { color: #fff !important; }

/* ─── Mobile overrides (dashboard) ─── */
/* Hide redundant nav links when sidebar is present */
@media (max-width: 900px) {
  .nav-link-dash { display: none !important; }
}

/* Tablet: narrow sidebar */
@media (max-width: 900px) and (min-width: 641px) {
  .dash-sidebar {
    width: 56px;
    padding: 12px 0;
    overflow: visible;
  }
  .dash-sidebar a {
    padding: 10px;
    margin: 1px 4px;
    justify-content: center;
    font-size: 0;       /* hide text */
    border-radius: 8px;
  }
  .dash-sidebar a svg { width: 18px; height: 18px; }
  .dash-sidebar .sidebar-section { display: none; }
  .dash-sidebar a[href*="microsite"][target] { display: none; } /* hide view-microsite link */
}

/* Mobile: sidebar becomes horizontal top strip */
@media (max-width: 640px) {
  .dash-wrapper { flex-direction: column; }

  .dash-sidebar {
    width: 100%;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 6px 4px;
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    gap: 0;
    scrollbar-width: none;
  }
  .dash-sidebar::-webkit-scrollbar { display: none; }

  .dash-sidebar .sidebar-section { display: none; }

  .dash-sidebar a {
    display: inline-flex;
    flex-direction: row;
    padding: 7px 12px;
    margin: 0 2px;
    font-size: 0.8rem;
    white-space: nowrap;
    border-radius: 7px;
  }
  .dash-sidebar a svg { width: 14px; height: 14px; }

  /* Hide the "View Microsite" link from mobile strip */
  .dash-sidebar > div:last-of-type { display: none; }

  .dash-main { padding: 16px 14px; }

  .dash-header.flex { flex-wrap: wrap; gap: 10px; }
  .dash-header h1 { font-size: 1.25rem; }

  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
  .stat-card { padding: 14px 10px; }
  .stat-number { font-size: 1.8rem; }

  .card { padding: 16px; }
  .card-title { font-size: 0.95rem; }

  /* Stack grid-2 on mobile */
  .grid-2 { grid-template-columns: 1fr; gap: 0; }

  /* Ensure tables scroll */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 480px; }

  /* Modal full-width on mobile */
  .modal-box { margin: 16px; width: calc(100% - 32px); max-width: none; padding: 20px; }
  .modal-actions { flex-direction: column; }
  .modal-actions .btn { width: 100%; }

  /* Buttons in flex rows */
  .dash-header .btn { font-size: 0.78rem; padding: 6px 10px; }
}

/* Very small (320px) */
@media (max-width: 380px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-number { font-size: 1.5rem; }
  .nav-brand { font-size: 1.1rem; }
}
