/* ============================================================
   Caribbean Content Engine - Styles
   ============================================================ */
:root {
  --teal: #0aa4a4;
  --teal-dark: #07807f;
  --coral: #ff6b4a;
  --gold: #ffc24b;
  --ink: #142a32;
  --muted: #5b7480;
  --bg: #f6fbfb;
  --white: #ffffff;
  --line: #e2eef0;
  --green: #1faa59;
  --amber: #e8a33d;
  --shadow: 0 10px 30px rgba(10, 60, 70, 0.10);
  --radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { width: min(1140px, 92%); margin: 0 auto; }
section { padding: 80px 0; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; }
h2.section-title { font-size: clamp(1.7rem, 4vw, 2.6rem); text-align: center; margin-bottom: 12px; }
.section-sub { text-align: center; color: var(--muted); max-width: 620px; margin: 0 auto 48px; }

/* Buttons */
.btn {
  display: inline-block; border: none; cursor: pointer; font-weight: 700;
  padding: 14px 26px; border-radius: 999px; font-size: 1rem; transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--coral); color: #fff; box-shadow: 0 8px 20px rgba(255,107,74,.35); }
.btn-secondary { background: var(--white); color: var(--ink); border: 2px solid var(--line); }
.btn-ghost { background: rgba(255,255,255,.15); color: #fff; border: 2px solid rgba(255,255,255,.5); }
.btn-block { width: 100%; text-align: center; }
.btn-sm { padding: 8px 16px; font-size: .85rem; }

/* Navbar */
.nav {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.9);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.nav .container { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.brand { font-weight: 800; font-size: 1.2rem; display: flex; align-items: center; gap: 8px; }
.brand .dot { width: 14px; height: 14px; border-radius: 50%; background: linear-gradient(135deg, var(--teal), var(--gold)); }
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a { color: var(--muted); font-weight: 600; font-size: .95rem; }
.nav-links a:hover { color: var(--ink); }
.nav-toggle { display: none; font-size: 1.6rem; background: none; border: none; cursor: pointer; }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 55%, #064f5a 100%);
  color: #fff; position: relative; overflow: hidden; padding: 90px 0 100px;
}
.hero::after {
  content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(255,194,75,.45), transparent 70%); border-radius: 50%;
}
.hero .container { position: relative; z-index: 2; max-width: 820px; text-align: center; }
.hero .pill { display: inline-block; background: rgba(255,255,255,.18); padding: 7px 16px; border-radius: 999px; font-weight: 600; font-size: .85rem; margin-bottom: 22px; }
.hero h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); margin-bottom: 18px; }
.hero p.sub { font-size: clamp(1.05rem, 2.5vw, 1.3rem); opacity: .92; margin-bottom: 34px; }
.hero .cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .stats { display: flex; gap: 40px; justify-content: center; margin-top: 50px; flex-wrap: wrap; }
.hero .stats div { text-align: center; }
.hero .stats b { display: block; font-size: 1.8rem; }
.hero .stats span { opacity: .85; font-size: .9rem; }

/* How it works */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step { background: var(--white); border-radius: var(--radius); padding: 32px 26px; box-shadow: var(--shadow); text-align: center; }
.step .num { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, var(--teal), var(--gold)); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; font-size: 1.2rem; }
.step h3 { margin-bottom: 8px; }
.step p { color: var(--muted); }

/* Pricing */
.pricing { background: var(--white); }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; }
.plan { border: 2px solid var(--line); border-radius: var(--radius); padding: 34px 28px; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.plan:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.plan.featured { border-color: var(--coral); box-shadow: var(--shadow); position: relative; }
.plan.featured .tag { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: var(--coral); color: #fff; padding: 5px 16px; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.plan h3 { font-size: 1.3rem; margin-bottom: 6px; }
.plan .price { font-size: 2.6rem; font-weight: 800; margin: 10px 0; }
.plan .price span { font-size: 1rem; font-weight: 600; color: var(--muted); }
.plan ul { list-style: none; margin: 18px 0 26px; flex: 1; }
.plan li { padding: 8px 0; border-bottom: 1px dashed var(--line); color: var(--muted); }
.plan li::before { content: "✓"; color: var(--green); font-weight: 800; margin-right: 10px; }

/* Testimonials */
.testimonials { background: linear-gradient(180deg, var(--bg), #eef8f8); }
.tgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.tcard { background: var(--white); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.tcard .stars { color: var(--gold); margin-bottom: 12px; }
.tcard p { font-style: italic; color: var(--ink); margin-bottom: 18px; }
.tcard .who { display: flex; align-items: center; gap: 12px; }
.tcard .avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--teal), var(--coral)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; }
.tcard .who b { display: block; }
.tcard .who span { color: var(--muted); font-size: .85rem; }

/* FAQ */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item { background: var(--white); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 14px; overflow: hidden; }
.faq-q { width: 100%; text-align: left; background: none; border: none; padding: 20px 22px; font-size: 1.05rem; font-weight: 700; cursor: pointer; display: flex; justify-content: space-between; align-items: center; color: var(--ink); }
.faq-q .chev { transition: transform .2s; color: var(--teal); }
.faq-item.open .faq-q .chev { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .25s ease; padding: 0 22px; color: var(--muted); }
.faq-item.open .faq-a { max-height: 240px; padding-bottom: 20px; }

/* Signup / contact */
.signup { background: linear-gradient(135deg, #07807f, #064f5a); color: #fff; }
.signup-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.signup h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin-bottom: 14px; }
.signup p { opacity: .9; margin-bottom: 18px; }
.signup .wise-note { background: rgba(255,255,255,.12); border-left: 4px solid var(--gold); padding: 14px 18px; border-radius: 10px; font-size: .92rem; }
.form-card { background: var(--white); color: var(--ink); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.form-card label { font-weight: 600; font-size: .9rem; display: block; margin: 12px 0 5px; }
.form-card input, .form-card select, .form-card textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; font-size: 1rem; font-family: inherit; background: var(--bg);
}
.form-card input:focus, .form-card select:focus, .form-card textarea:focus { outline: none; border-color: var(--teal); }
.form-msg { margin-top: 14px; padding: 12px; border-radius: 10px; font-weight: 600; display: none; }
.form-msg.show { display: block; }
.form-msg.ok { background: #e3f7ec; color: var(--green); }
.form-msg.err { background: #fde8e3; color: var(--coral); }

/* Footer */
footer { background: var(--ink); color: #bcd2d8; padding: 40px 0; text-align: center; font-size: .9rem; }
footer a { color: var(--gold); }

/* ===================== DASHBOARD ===================== */
.dash-body { background: var(--bg); }
.dash-header { background: var(--ink); color: #fff; padding: 16px 0; }
.dash-header .container { display: flex; justify-content: space-between; align-items: center; }
.dash-header .brand { color: #fff; }
.mode-badge { font-size: .75rem; padding: 4px 10px; border-radius: 999px; font-weight: 700; }
.mode-local { background: var(--amber); color: #3a2a00; }
.mode-cloud { background: var(--green); color: #fff; }

.dash-grid { display: grid; grid-template-columns: 340px 1fr; gap: 24px; padding: 30px 0; align-items: start; }
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.card h3 { margin-bottom: 16px; font-size: 1.15rem; }
.card label { font-weight: 600; font-size: .85rem; display: block; margin: 10px 0 4px; }
.card input, .card select, .card textarea {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 9px; font-size: .95rem; font-family: inherit; background: var(--bg);
}
.card input:focus, .card select:focus, .card textarea:focus { outline: none; border-color: var(--teal); }

.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.search-input { max-width: 260px; }

table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: .92rem; }
th { background: #eef8f8; font-weight: 700; color: var(--ink); }
tr:hover td { background: #fafdfd; }

.badge { padding: 4px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; display: inline-block; }
.b-lead { background: #eef1f4; color: #5b6b78; }
.b-active { background: #e3f0ff; color: #2b6cb0; }
.b-paid { background: #e3f7ec; color: var(--green); }
.b-delivered { background: #efe3ff; color: #7c4dcb; }
.b-pending { background: #fff3e0; color: var(--amber); }
.b-paidpay { background: #e3f7ec; color: var(--green); }

.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.icon-btn { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; cursor: pointer; font-size: .8rem; font-weight: 600; }
.icon-btn:hover { background: #eef8f8; }
.icon-btn.danger { color: var(--coral); }

select.inline-select { padding: 5px 8px; border-radius: 8px; border: 1.5px solid var(--line); font-size: .8rem; background: var(--white); }

.empty { text-align: center; padding: 40px; color: var(--muted); }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(10,30,40,.55); display: none; align-items: flex-start; justify-content: center; z-index: 100; padding: 40px 16px; overflow-y: auto; }
.modal-overlay.show { display: flex; }
.modal { background: var(--white); border-radius: var(--radius); width: min(820px, 100%); padding: 28px; box-shadow: var(--shadow); }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.modal-head h3 { font-size: 1.3rem; }
.close-x { background: none; border: none; font-size: 1.6rem; cursor: pointer; color: var(--muted); }
.tabs { display: flex; gap: 8px; border-bottom: 2px solid var(--line); margin: 18px 0; flex-wrap: wrap; }
.tab { padding: 10px 16px; cursor: pointer; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tab.active { color: var(--teal); border-bottom-color: var(--teal); }
.tab-pane { display: none; max-height: 50vh; overflow-y: auto; }
.tab-pane.active { display: block; }
.tab-pane ol, .tab-pane ul { padding-left: 22px; }
.tab-pane li { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.hash-set { background: var(--bg); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; font-size: .9rem; }
.flyer { background: var(--bg); border-left: 4px solid var(--gold); border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; }
.flyer b { display: block; margin-bottom: 4px; }

.login-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--teal), #064f5a); }
.login-box { background: #fff; padding: 40px; border-radius: var(--radius); box-shadow: var(--shadow); width: min(380px, 92%); text-align: center; }
.login-box h2 { margin-bottom: 6px; }
.login-box p { color: var(--muted); margin-bottom: 20px; font-size: .9rem; }
.login-box input { width: 100%; padding: 12px; border: 1.5px solid var(--line); border-radius: 10px; margin-bottom: 14px; font-size: 1rem; }
.hidden { display: none !important; }

/* Summary stat cards (dashboard) */
.stat-bar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); }
.stat-val { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); line-height: 1; }
.stat-label { font-size: .78rem; color: var(--muted); margin-top: 6px; text-transform: uppercase; letter-spacing: .04em; }
.stat-good .stat-val { color: var(--green); }
.stat-money .stat-val { color: var(--teal-dark); }

/* Source badge (AI vs sample) */
.src-badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; margin-left: 6px; vertical-align: middle; }
.src-ai { background: rgba(10,164,164,.14); color: var(--teal-dark); }
.src-sample { background: rgba(232,163,61,.16); color: var(--amber); }

/* Toast notifications */
.toast-wrap { position: fixed; bottom: 22px; right: 22px; display: flex; flex-direction: column; gap: 10px; z-index: 9999; }
.toast { background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: .9rem; font-weight: 600; box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); transition: opacity .25s ease, transform .25s ease; max-width: 320px; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast-ok { background: var(--teal-dark); }
.toast-err { background: var(--coral); }

/* Responsive */
@media (max-width: 860px) {
  .nav-links { display: none; position: absolute; top: 60px; left: 0; right: 0; background: #fff; flex-direction: column; padding: 18px; gap: 14px; border-bottom: 1px solid var(--line); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .steps, .plans, .tgrid { grid-template-columns: 1fr; }
  .signup-wrap { grid-template-columns: 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
  table { display: block; overflow-x: auto; white-space: nowrap; }
  .stat-bar { grid-template-columns: repeat(2, 1fr); }
}
