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

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

:root {
    --brand:      #e1306c;
    --brand-dark: #c01d56;
    --bg:         #fff;
    --bg-alt:     #fafafa;
    --border:     #e5e7eb;
    --text:       #111827;
    --muted:      #6b7280;
    --radius:     10px;
    --shadow:     0 2px 12px rgba(0,0,0,0.08);
}

body { font-family: 'Inter', sans-serif; color: var(--text); background: var(--bg); line-height: 1.6; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; padding: 0; }

/* ── Header ──────────────────────────────────────────────────────────────── */
header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    max-width: 1100px; margin: 0 auto;
    padding: 0.9rem 1.5rem;
    display: flex; align-items: center; justify-content: space-between;
}
.logo { font-size: 1.15rem; font-weight: 700; color: var(--text); text-decoration: none; }
.logo-sub { font-weight: 400; color: var(--muted); margin-left: 0.25rem; }
nav { display: flex; gap: 1rem; align-items: center; }
nav a { color: var(--muted); font-size: 0.9rem; }
nav a:hover { color: var(--text); text-decoration: none; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.5rem 1.1rem; border-radius: 8px;
    font-size: 0.9rem; font-weight: 600; cursor: pointer;
    border: 2px solid transparent; transition: all 0.15s; text-decoration: none;
}
.btn-primary  { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); text-decoration: none; }
.btn-outline  { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-outline:hover { background: #fff0f5; text-decoration: none; }
.btn-lg { padding: 0.75rem 1.75rem; font-size: 1rem; }
.btn-sm { padding: 0.3rem 0.75rem; font-size: 0.82rem; }
.btn-warn    { background: #f59e0b; color: #fff; border-color: #f59e0b; }
.btn-warn:hover { background: #d97706; }
.btn-success { background: #10b981; color: #fff; border-color: #10b981; }
.btn-success:hover { background: #059669; }
.btn-danger  { background: #ef4444; color: #fff; border-color: #ef4444; }
.btn-danger:hover { background: #dc2626; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
    background: linear-gradient(135deg, #ff6b9d 0%, #e1306c 40%, #833ab4 100%);
    color: #fff; padding: 5rem 1.5rem;
}
.hero-inner { max-width: 700px; margin: 0 auto; text-align: center; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 700; line-height: 1.2; margin-bottom: 1.25rem; }
.hero h1 em { font-style: normal; color: #ffe0ec; }
.hero-sub { font-size: 1.1rem; opacity: 0.9; margin-bottom: 2rem; }

/* ── Sections ────────────────────────────────────────────────────────────── */
.section { padding: 5rem 1.5rem; }
.section-alt { background: var(--bg-alt); }
.section-inner { max-width: 1100px; margin: 0 auto; }
.section h2 { font-size: 2rem; font-weight: 700; margin-bottom: 0.5rem; text-align: center; }
.section-sub { text-align: center; color: var(--muted); margin-bottom: 3rem; }
.center { text-align: center; }

/* ── Steps ───────────────────────────────────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; margin-top: 3rem; }
.step { text-align: center; }
.step-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.step h3 { font-weight: 600; margin-bottom: 0.5rem; }
.step p { color: var(--muted); font-size: 0.93rem; }

/* ── Pricing ─────────────────────────────────────────────────────────────── */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.5rem; margin-top: 3rem; }
.plan-card {
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 2rem 1.5rem; position: relative; background: var(--bg);
    display: flex; flex-direction: column; gap: 0.5rem;
}
.plan-card.plan-featured { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand); }
.plan-badge {
    position: absolute; top: -0.6rem; left: 1rem;
    background: var(--brand); color: #fff;
    font-size: 0.75rem; font-weight: 600; padding: 0.15rem 0.6rem; border-radius: 99px;
}
.plan-name { font-weight: 700; font-size: 1.1rem; }
.plan-price { font-size: 2rem; font-weight: 700; color: var(--brand); }
.plan-price span { font-size: 1rem; color: var(--muted); font-weight: 400; }
.plan-radius { color: var(--muted); font-size: 0.9rem; margin-bottom: 0.5rem; }
.plan-card ul { margin: 0.5rem 0 1.5rem; }
.plan-card ul li { font-size: 0.9rem; margin-bottom: 0.3rem; color: var(--muted); }
.plan-card .btn { margin-top: auto; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
footer { border-top: 1px solid var(--border); padding: 1.5rem; }
.footer-inner { max-width: 1100px; margin: 0 auto; display: flex; gap: 2rem; align-items: center; color: var(--muted); font-size: 0.87rem; }

/* ── Form page ───────────────────────────────────────────────────────────── */
.form-page { min-height: calc(100vh - 60px); padding: 3rem 1.5rem; background: var(--bg-alt); }
.form-container { max-width: 680px; margin: 0 auto; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 2.5rem; }
.form-container h1 { font-size: 1.75rem; font-weight: 700; margin-bottom: 0.5rem; }
.form-sub { color: var(--muted); margin-bottom: 2rem; }
.form-section { margin-bottom: 2.5rem; padding-bottom: 2.5rem; border-bottom: 1px solid var(--border); }
.form-section:last-of-type { border-bottom: none; margin-bottom: 0; }
.form-section h3 { font-size: 1rem; font-weight: 600; margin-bottom: 1.25rem; color: var(--text); }
.form-group { margin-bottom: 1.25rem; display: flex; flex-direction: column; gap: 0.35rem; }
.form-group label { font-size: 0.87rem; font-weight: 500; }
.label-hint { font-weight: 400; color: var(--muted); margin-left: 0.4rem; }
.form-group input, .form-group select, .form-group textarea {
    padding: 0.55rem 0.8rem; border: 1px solid var(--border); border-radius: 8px;
    font-size: 0.9rem; font-family: inherit; background: var(--bg);
    transition: border-color 0.15s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: var(--brand);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-hint { font-size: 0.82rem; color: var(--muted); margin-bottom: 0.75rem; }
.form-fine-print { font-size: 0.8rem; color: var(--muted); margin-top: 0.5rem; }
.optional-tag { font-size: 0.75rem; font-weight: 400; color: var(--muted); margin-left: 0.4rem; }
.form-actions { padding-top: 1.5rem; }
.form-error { background: #fef2f2; border: 1px solid #fca5a5; color: #b91c1c; border-radius: 8px; padding: 0.65rem 1rem; font-size: 0.87rem; margin-bottom: 1rem; }

/* ── Map ─────────────────────────────────────────────────────────────────── */
#pin-map { height: 300px; border-radius: var(--radius); border: 1px solid var(--border); margin-bottom: 0.5rem; }
.map-coords { font-size: 0.82rem; color: var(--muted); }

/* ── Plan selector ───────────────────────────────────────────────────────── */
.plan-selector { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.plan-option { cursor: pointer; }
.plan-option input[type="radio"] { display: none; }
.plan-option-inner {
    display: flex; flex-direction: column; gap: 0.2rem;
    border: 2px solid var(--border); border-radius: 8px;
    padding: 0.75rem 1rem; transition: border-color 0.15s;
}
.plan-option input:checked + .plan-option-inner { border-color: var(--brand); background: #fff0f5; }
.plan-option-inner strong { font-size: 0.95rem; }
.plan-radius-tag { font-size: 0.8rem; color: var(--muted); }
.plan-price-tag { font-size: 0.85rem; font-weight: 600; color: var(--brand); }

/* ── Ad preview ──────────────────────────────────────────────────────────── */
.ad-preview {
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1rem 1.25rem; background: var(--bg-alt); max-width: 280px;
}
.ad-preview-sponsored { font-size: 0.7rem; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.35rem; }
.ad-preview-name { font-weight: 700; font-size: 0.95rem; margin-bottom: 0.2rem; }
.ad-preview-tagline { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.4rem; }
.ad-preview-distance { font-size: 0.78rem; color: var(--muted); }

/* ── Char counter ────────────────────────────────────────────────────────── */
.char-counter { font-size: 0.78rem; color: var(--muted); }
.char-counter.near-limit { color: #f59e0b; }
.char-counter.at-limit   { color: #ef4444; font-weight: 600; }

/* ── Dashboard ───────────────────────────────────────────────────────────── */
.dashboard-page { min-height: calc(100vh - 60px); padding: 2.5rem 1.5rem; background: var(--bg-alt); }
.dashboard-inner { max-width: 900px; margin: 0 auto; }
.dashboard-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.75rem; }
.dashboard-header h1 { font-size: 1.75rem; font-weight: 700; }
.loading-state, .empty-state { text-align: center; color: var(--muted); padding: 4rem 0; }
.empty-state p { margin-bottom: 1.5rem; }
.success-banner { background: #ecfdf5; border: 1px solid #6ee7b7; color: #065f46; border-radius: 8px; padding: 0.75rem 1.25rem; margin-bottom: 1.5rem; font-size: 0.9rem; }

.campaigns-list { display: flex; flex-direction: column; gap: 1.25rem; }
.campaign-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.campaign-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.75rem; }
.campaign-business { font-weight: 700; font-size: 1.05rem; }
.campaign-plan { font-size: 0.82rem; color: var(--muted); margin-top: 0.2rem; }
.campaign-ad-copy { color: var(--muted); font-style: italic; margin-bottom: 0.5rem; }
.campaign-link a { font-size: 0.82rem; }
.status-badge { font-size: 0.75rem; font-weight: 600; padding: 0.2rem 0.65rem; border-radius: 99px; white-space: nowrap; }
.status-active { background: #dcfce7; color: #15803d; }
.status-paused { background: #fef9c3; color: #854d0e; }
.campaign-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 1rem 0; padding: 1rem 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stat-n { font-size: 1.2rem; font-weight: 700; }
.stat-l { font-size: 0.75rem; color: var(--muted); margin-top: 0.1rem; }
.campaign-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ── Modal ───────────────────────────────────────────────────────────────── */
.modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal.hidden { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.4); }
.modal-box { position: relative; background: var(--bg); border-radius: var(--radius); padding: 2rem; width: 100%; max-width: 480px; box-shadow: 0 8px 40px rgba(0,0,0,0.18); }
.modal-box h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 1.5rem; }
.modal-actions { display: flex; gap: 0.75rem; margin-top: 1.5rem; justify-content: flex-end; }

/* ── Success page ────────────────────────────────────────────────────────── */
.success-icon { font-size: 4rem; margin-bottom: 1rem; }

/* ── Auth page ───────────────────────────────────────────────────────────── */
.auth-body { background: var(--bg-alt); display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 1.5rem; }
.auth-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 2.5rem 2rem; width: 100%; max-width: 400px; box-shadow: var(--shadow); text-align: center; }
.auth-logo { font-size: 1.2rem; font-weight: 700; color: var(--text); text-decoration: none; display: block; margin-bottom: 0.35rem; }
.auth-logo span { color: var(--brand); }
.auth-sub { color: var(--muted); font-size: 0.87rem; margin-bottom: 1.75rem; }
.auth-tabs { display: flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin-bottom: 1.75rem; }
.auth-tab { flex: 1; padding: 0.55rem; border: none; background: transparent; cursor: pointer; font-size: 0.9rem; font-weight: 500; color: var(--muted); transition: all 0.15s; font-family: inherit; }
.auth-tab.active { background: var(--brand); color: #fff; }
.auth-form { text-align: left; }
.auth-form .form-group { margin-bottom: 1rem; }
.btn-full { width: 100%; margin-top: 0.5rem; padding: 0.7rem; font-size: 0.95rem; }

/* ── Nav email label ─────────────────────────────────────────────────────── */
.nav-email { font-size: 0.82rem; color: var(--muted); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Hidden utility ──────────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .plan-selector { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .campaign-stats { grid-template-columns: 1fr 1fr; }
    .pricing-grid { grid-template-columns: 1fr; }
    .hero { padding: 3rem 1.25rem; }
}
