/* ══════════════════════════════════════════════════════════════
   BuilderBook — Stylesheet
   Brand: Dark navy (#0a1628) + electric blue (#3b9eff)
   Clean, light, professional aesthetic
   ══════════════════════════════════════════════════════════════ */

/* ─── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --navy:       #0a1628;
    --navy-light: #1a2d4a;
    --blue:       #3b9eff;
    --blue-dark:  #2b7fd4;
    --blue-light: #e8f2ff;
    --green:      #22c55e;
    --green-light:#ecfdf5;
    --red:        #ef4444;
    --red-light:  #fef2f2;
    --amber:      #f59e0b;
    --amber-light:#fffbeb;
    --gray-50:    #f8fafc;
    --gray-100:   #f1f5f9;
    --gray-200:   #e2e8f0;
    --gray-300:   #cbd5e1;
    --gray-400:   #94a3b8;
    --gray-500:   #64748b;
    --gray-600:   #475569;
    --gray-700:   #334155;
    --gray-800:   #1e293b;
    --gray-900:   #0f172a;
    --white:      #ffffff;
    --shadow-sm:  0 1px 2px rgba(0,0,0,0.05);
    --shadow:     0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md:  0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg:  0 10px 25px rgba(0,0,0,0.08), 0 4px 10px rgba(0,0,0,0.04);
    --shadow-xl:  0 20px 40px rgba(0,0,0,0.1);
    --radius:     8px;
    --radius-lg:  12px;
    --radius-xl:  16px;
    --transition: 0.2s ease;
    --font:       'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono:  'JetBrains Mono', 'Fira Code', monospace;
    --max-width:  1200px;
}

html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: var(--font);
    color: var(--gray-800);
    background: var(--gray-50);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--blue-dark); }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4, h5, h6 { color: var(--navy); line-height: 1.3; font-weight: 600; }

/* ─── Navigation ────────────────────────────────────────────── */
.nav {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(12px);
    background: rgba(255,255,255,0.95);
}
.nav__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.nav__logo {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--navy);
    display: flex;
    align-items: center;
    gap: 0;
    letter-spacing: -0.5px;
}
.nav__logo span { color: var(--blue); }
.nav__logo:hover { color: var(--navy); }

.nav__links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
}
.nav__link {
    color: var(--gray-600);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius);
    transition: all var(--transition);
}
.nav__link:hover { color: var(--navy); background: var(--gray-100); }
.nav__link--active { color: var(--blue); background: var(--blue-light); }

.nav__cta {
    background: var(--blue);
    color: var(--white) !important;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all var(--transition);
    margin-left: 0.5rem;
}
.nav__cta:hover { background: var(--blue-dark); color: var(--white) !important; transform: translateY(-1px); box-shadow: var(--shadow-md); }

.nav__cta--outline {
    background: transparent;
    color: var(--blue) !important;
    border: 1.5px solid var(--blue);
    margin-left: 0;
}
.nav__cta--outline:hover { background: var(--blue); color: var(--white) !important; }

/* Mobile toggle */
.nav__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}
.nav__toggle span {
    width: 22px;
    height: 2px;
    background: var(--navy);
    border-radius: 2px;
    transition: all var(--transition);
}
.nav__toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav__toggle.active span:nth-child(2) { opacity: 0; }
.nav__toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ─── Hero ──────────────────────────────────────────────────── */
.hero {
    background: linear-gradient(135deg, var(--navy) 0%, #1a3a5c 50%, #0d2847 100%);
    color: var(--white);
    padding: 5rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59,158,255,0.15) 0%, transparent 70%);
    border-radius: 50%;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(59,158,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
}
.hero__content { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }
.hero__badge {
    display: inline-block;
    background: rgba(59,158,255,0.15);
    color: var(--blue);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.35rem 1rem;
    border-radius: 50px;
    letter-spacing: 0.5px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(59,158,255,0.25);
}
.hero h1 {
    color: var(--white);
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 1.25rem;
    line-height: 1.15;
}
.hero h1 em { font-style: normal; color: var(--blue); }
.hero p {
    font-size: 1.15rem;
    color: #b0c4de;
    margin-bottom: 2rem;
    line-height: 1.7;
}
.hero__actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ─── Buttons ───────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.7rem 1.5rem;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1.4;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--blue); color: var(--white); }
.btn--primary:hover { background: var(--blue-dark); color: var(--white); }

.btn--secondary { background: var(--white); color: var(--navy); border: 1.5px solid var(--gray-200); }
.btn--secondary:hover { border-color: var(--blue); color: var(--blue); background: var(--white); }

.btn--outline { background: transparent; color: var(--white); border: 1.5px solid rgba(255,255,255,0.3); }
.btn--outline:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.5); color: var(--white); }

.btn--danger { background: var(--red); color: var(--white); }
.btn--danger:hover { background: #dc2626; color: var(--white); }

.btn--success { background: var(--green); color: var(--white); }
.btn--success:hover { background: #16a34a; color: var(--white); }

.btn--sm { font-size: 0.85rem; padding: 0.45rem 1rem; }
.btn--lg { font-size: 1.05rem; padding: 0.85rem 2rem; }
.btn--block { width: 100%; justify-content: center; }

.btn:disabled, .btn--disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ─── Cards ─────────────────────────────────────────────────── */
.card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    transition: all var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }
.card--flat { border: none; box-shadow: var(--shadow); }
.card--flat:hover { box-shadow: var(--shadow-lg); }

.card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-100);
}
.card__title { font-size: 1.1rem; font-weight: 600; }
.card__icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}
.card__icon--blue { background: var(--blue-light); color: var(--blue); }
.card__icon--green { background: var(--green-light); color: var(--green); }
.card__icon--amber { background: var(--amber-light); color: var(--amber); }

/* ─── Sections ──────────────────────────────────────────────── */
.section {
    padding: 4.5rem 1.5rem;
    max-width: var(--max-width);
    margin: 0 auto;
}
.section--gray { background: var(--gray-100); }
.section--full { max-width: 100%; }
.section__header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 3rem;
}
.section__header h2 { font-size: 2rem; margin-bottom: 0.75rem; }
.section__header p { color: var(--gray-500); font-size: 1.05rem; }

/* ─── Features Grid ─────────────────────────────────────────── */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.feature { text-align: left; }
.feature h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.feature p { color: var(--gray-500); font-size: 0.93rem; line-height: 1.65; }

/* ─── Stats Bar ─────────────────────────────────────────────── */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.stat-card__value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1;
}
.stat-card__label {
    font-size: 0.82rem;
    color: var(--gray-500);
    margin-top: 0.15rem;
}

/* ─── Forms ─────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.4rem;
}
.form-input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    font-family: var(--font);
    font-size: 0.95rem;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--gray-800);
    transition: all var(--transition);
    outline: none;
}
.form-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59,158,255,0.15); }
.form-input::placeholder { color: var(--gray-400); }

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8.825a.5.5 0 01-.354-.146l-4-4a.5.5 0 01.708-.708L6 7.617l3.646-3.646a.5.5 0 01.708.708l-4 4A.5.5 0 016 8.825z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.25rem;
}

textarea.form-input { resize: vertical; min-height: 100px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-error { color: var(--red); font-size: 0.82rem; margin-top: 0.25rem; }
.form-hint { color: var(--gray-500); font-size: 0.82rem; margin-top: 0.25rem; }

/* ─── Alerts ────────────────────────────────────────────────── */
.alert {
    padding: 0.85rem 1.15rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideDown 0.3s ease;
}
.alert--success { background: var(--green-light); color: #15803d; border: 1px solid #bbf7d0; }
.alert--error   { background: var(--red-light);   color: #b91c1c; border: 1px solid #fecaca; }
.alert--warning { background: var(--amber-light); color: #92400e; border: 1px solid #fde68a; }
.alert--info    { background: var(--blue-light);   color: #1d4ed8; border: 1px solid #bfdbfe; }
.alert__close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.5;
    color: inherit;
    padding: 0 0.25rem;
    line-height: 1;
}
.alert__close:hover { opacity: 1; }

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─── Badges ────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.65rem;
    border-radius: 50px;
    white-space: nowrap;
}
.badge--active  { background: var(--green-light); color: #15803d; }
.badge--trial   { background: var(--blue-light);  color: var(--blue); }
.badge--expired { background: var(--red-light);   color: #b91c1c; }
.badge--admin   { background: var(--navy);        color: var(--white); }
.badge--pending { background: var(--amber-light); color: #92400e; }
.badge--approved{ background: var(--green-light); color: #15803d; }
.badge--refused { background: var(--red-light);   color: #b91c1c; }
.badge--blue    { background: var(--blue-light);   color: #1d4ed8; }
.badge--teal    { background: #e1f5ee;             color: #0f6e56; }
.badge--purple  { background: #eeedfe;             color: #534ab7; }
.badge--coral   { background: #faece7;             color: #993c1d; }
.badge--gray    { background: var(--gray-100);     color: var(--gray-600); }

/* ─── Tables ────────────────────────────────────────────────── */
.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    background: var(--white);
}
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.table thead { background: var(--gray-50); }
.table th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--gray-200);
    white-space: nowrap;
}
.table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-700);
}
.table tbody tr:hover { background: var(--gray-50); }
.table tbody tr[style*="cursor"] { transition: background var(--transition); }
.table tbody tr[style*="cursor"]:hover { background: var(--blue-light); }
.table tbody tr:last-child td { border-bottom: none; }
.table td.description {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ─── Pagination ────────────────────────────────────────────── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin-top: 1.5rem;
}
.pagination__link {
    padding: 0.45rem 0.85rem;
    font-size: 0.88rem;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    color: var(--gray-600);
    background: var(--white);
    transition: all var(--transition);
}
.pagination__link:hover { border-color: var(--blue); color: var(--blue); }
.pagination__link--active {
    background: var(--blue);
    color: var(--white);
    border-color: var(--blue);
}
.pagination__link--disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* ─── Auth Pages ────────────────────────────────────────────── */
.auth-page {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--blue-light) 100%);
}
.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
}
.auth-card__logo {
    text-align: center;
    margin-bottom: 2rem;
}
.auth-card__logo h2 {
    font-size: 1.6rem;
    font-weight: 700;
}
.auth-card__logo h2 span { color: var(--blue); }
.auth-card__logo p { color: var(--gray-500); font-size: 0.9rem; margin-top: 0.25rem; }

.auth-card__footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-100);
    font-size: 0.88rem;
    color: var(--gray-500);
}

/* ─── Dashboard Layout ──────────────────────────────────────── */
.dashboard {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1.5rem;
}
.dashboard__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}
.dashboard__title { font-size: 1.5rem; }
.dashboard__subtitle { color: var(--gray-500); font-size: 0.9rem; margin-top: 0.2rem; }

/* Search & Filters */
.filters {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.filters__row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr auto;
    gap: 1rem;
    align-items: end;
}
.filters__row--secondary {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-100);
}
.results-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.88rem;
    color: var(--gray-500);
}

/* ─── Admin Sidebar Layout ──────────────────────────────────── */
.admin-layout {
    display: flex;
    min-height: calc(100vh - 64px);
}
.admin-sidebar {
    width: 240px;
    background: var(--navy);
    padding: 1.5rem 0;
    flex-shrink: 0;
}
.admin-sidebar__link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 1.5rem;
    color: #8bb8e8;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition);
}
.admin-sidebar__link:hover { color: var(--white); background: rgba(255,255,255,0.07); }
.admin-sidebar__link--active { color: var(--white); background: rgba(59,158,255,0.2); border-right: 3px solid var(--blue); }
.admin-sidebar__section {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #5a7a9e;
    padding: 1.25rem 1.5rem 0.5rem;
}
.admin-content {
    flex: 1;
    padding: 2rem;
    overflow-x: auto;
}
.admin-content__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

/* ─── Pricing ───────────────────────────────────────────────── */
.pricing-card {
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    text-align: center;
    max-width: 400px;
    margin: 0 auto;
    transition: all var(--transition);
}
.pricing-card:hover { border-color: var(--blue); box-shadow: var(--shadow-lg); }
.pricing-card__price {
    font-size: 3rem;
    font-weight: 800;
    color: var(--navy);
    line-height: 1;
    margin: 1rem 0 0.25rem;
}
.pricing-card__period { color: var(--gray-500); font-size: 0.95rem; }
.pricing-card__features {
    list-style: none;
    margin: 1.5rem 0;
    text-align: left;
}
.pricing-card__features li {
    padding: 0.5rem 0;
    color: var(--gray-600);
    font-size: 0.93rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.pricing-card__features li::before {
    content: '✓';
    color: var(--green);
    font-weight: 700;
    font-size: 0.9rem;
}

/* ─── Audience Cards ─────────────────────────────────────────── */
.audience-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
.audience-card {
    text-align: left;
    padding: 1.75rem;
}
.audience-card__icon {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}
.audience-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}
.audience-card > p {
    color: var(--gray-500);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0.85rem;
}
.audience-card__uses {
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 1px solid var(--gray-100);
    padding-top: 0.75rem;
}
.audience-card__uses li {
    font-size: 0.82rem;
    color: var(--gray-600);
    padding: 0.25rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    line-height: 1.4;
}
.audience-card__uses li::before {
    content: '→';
    color: var(--blue);
    font-weight: 600;
    flex-shrink: 0;
}

/* ─── Pricing Tiers ─────────────────────────────────────────── */
.pricing-grid {
    display: grid;
    grid-template-columns: 1fr 1.12fr 1fr;
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5rem;
    align-items: start;
}
.pricing-tier {
    background: var(--white);
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: 2rem;
    text-align: center;
    position: relative;
    transition: all var(--transition);
    box-shadow: var(--shadow);
}
.pricing-tier:hover {
    border-color: var(--gray-300);
    box-shadow: var(--shadow-md);
}
.pricing-tier--featured {
    border: 2px solid var(--blue);
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(59,158,255,0.1);
    padding: 2.5rem 2rem 2rem;
    background: linear-gradient(180deg, #f0f7ff 0%, var(--white) 40%);
}
.pricing-tier--featured:hover {
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(59,158,255,0.2);
    border-color: var(--blue-dark);
}
.pricing-tier__badge {
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--blue);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3rem 1rem;
    border-radius: 50px;
    white-space: nowrap;
    letter-spacing: 0.3px;
}
.pricing-tier__header {
    margin-bottom: 1.25rem;
}
.pricing-tier__name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.15rem;
}
.pricing-tier__desc {
    color: var(--gray-500);
    font-size: 0.85rem;
}
.pricing-tier__price-wrap {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.15rem;
    margin-bottom: 0.25rem;
}
.pricing-tier__price {
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--navy);
    line-height: 1;
    letter-spacing: -1px;
}
.pricing-tier--featured .pricing-tier__price {
    font-size: 3.25rem;
}
.pricing-tier__period {
    font-size: 1rem;
    color: var(--gray-500);
    font-weight: 500;
}
.pricing-tier__billing {
    font-size: 0.82rem;
    color: var(--gray-500);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}
.pricing-tier__saving {
    display: inline-block;
    background: var(--green-light);
    color: #15803d;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 50px;
    margin-left: 0.35rem;
}
.pricing-tier__features {
    list-style: none;
    text-align: left;
    margin: 0 0 1.5rem;
    padding: 0;
}
.pricing-tier__features li {
    padding: 0.45rem 0;
    color: var(--gray-600);
    font-size: 0.88rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    line-height: 1.4;
}
.pricing-tier__features li::before {
    content: '✓';
    color: var(--green);
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
    margin-top: 1px;
}
.pricing-tier__features li:has(strong)::before {
    content: '';
    display: none;
}
.pricing-tier__trial {
    margin-top: 0.65rem;
    font-size: 0.78rem;
    color: var(--gray-500);
}

/* Plan selector on register page */
.plan-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.65rem;
    margin-bottom: 1.5rem;
}
.plan-option {
    position: relative;
}
.plan-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.plan-option__label {
    display: block;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 0.85rem 0.65rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    background: var(--white);
}
.plan-option__label:hover {
    border-color: var(--blue);
}
.plan-option input[type="radio"]:checked + .plan-option__label {
    border-color: var(--blue);
    background: var(--blue-light);
    box-shadow: 0 0 0 1px var(--blue);
}
.plan-option__name {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--navy);
    margin-bottom: 0.15rem;
}
.plan-option__price {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--navy);
}
.plan-option__period {
    font-size: 0.72rem;
    color: var(--gray-500);
}
.plan-option__tag {
    display: inline-block;
    background: var(--blue);
    color: var(--white);
    font-size: 0.62rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 50px;
    margin-top: 0.25rem;
    letter-spacing: 0.3px;
}
.plan-option__billed {
    font-size: 0.7rem;
    color: var(--gray-400);
    margin-top: 0.2rem;
}

/* ─── Footer ────────────────────────────────────────────────── */
.footer {
    background: var(--navy);
    color: #8bb8e8;
    padding: 3rem 1.5rem 0;
}
.footer__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2.5rem;
}
.footer__logo {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.75rem;
}
.footer__logo span { color: var(--blue); }
.footer__desc { font-size: 0.88rem; line-height: 1.6; color: #7aa3c9; }

.footer__heading {
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}
.footer__links { list-style: none; }
.footer__links li { margin-bottom: 0.5rem; }
.footer__links a { color: #7aa3c9; font-size: 0.88rem; transition: color var(--transition); }
.footer__links a:hover { color: var(--white); }

.footer__bottom {
    max-width: var(--max-width);
    margin: 2.5rem auto 0;
    padding: 1.25rem 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    color: #5a7a9e;
}

/* ─── Empty State ───────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--gray-500);
}
.empty-state__icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; }
.empty-state h3 { color: var(--gray-700); margin-bottom: 0.5rem; }
.empty-state p { font-size: 0.93rem; }

/* ─── Loading Spinner ───────────────────────────────────────── */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-200);
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Modal ─────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 2rem;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform 0.25s;
}
.modal-overlay.active .modal { transform: scale(1); }
.modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}
.modal__header h3 { font-size: 1.15rem; }
.modal__close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-400);
    padding: 0.25rem;
    line-height: 1;
}
.modal__close:hover { color: var(--gray-700); }

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .audience-grid { grid-template-columns: repeat(2, 1fr); }
    .features { grid-template-columns: repeat(2, 1fr); }
    .stats-bar { grid-template-columns: repeat(2, 1fr); }
    .filters__row { grid-template-columns: 1fr 1fr; }
    .filters__row--secondary { grid-template-columns: 1fr 1fr; }
    .footer__inner { grid-template-columns: 1fr 1fr; }
    .pricing-grid { grid-template-columns: 1fr 1fr 1fr; max-width: 900px; gap: 1rem; }
}

@media (max-width: 768px) {
    .nav__toggle { display: flex; }
    .nav__links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 1rem 1.5rem;
        border-bottom: 1px solid var(--gray-200);
        box-shadow: var(--shadow-lg);
        gap: 0.25rem;
    }
    .nav__links.active { display: flex; }
    .nav__link { padding: 0.75rem 1rem; }
    .nav__cta { margin-left: 0; text-align: center; margin-top: 0.5rem; }

    .hero { padding: 3.5rem 1.25rem; }
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 1rem; }

    .section { padding: 3rem 1.25rem; }
    .section__header h2 { font-size: 1.5rem; }
    .audience-grid { grid-template-columns: 1fr; }
    .features { grid-template-columns: 1fr; }
    .stats-bar { grid-template-columns: 1fr; }

    .form-row { grid-template-columns: 1fr; }
    .filters__row { grid-template-columns: 1fr; }
    .filters__row--secondary { grid-template-columns: 1fr; }

    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; display: flex; flex-wrap: wrap; padding: 0.75rem; gap: 0.25rem; }
    .admin-sidebar__section { display: none; }
    .admin-sidebar__link { padding: 0.5rem 0.85rem; border-radius: var(--radius); font-size: 0.82rem; }
    .admin-sidebar__link--active { border-right: none; background: rgba(59,158,255,0.3); }
    .admin-content { padding: 1.25rem; }

    .footer__inner { grid-template-columns: 1fr; gap: 2rem; }
    .footer__bottom { flex-direction: column; gap: 0.5rem; text-align: center; }

    .dashboard__header { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
    .auth-card { padding: 1.75rem; }

    .table { font-size: 0.82rem; }
    .table th, .table td { padding: 0.6rem 0.75rem; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.65rem; }
    .hero__actions { flex-direction: column; }
    .hero__actions .btn { width: 100%; justify-content: center; }
    .pricing-grid { grid-template-columns: 1fr; max-width: 420px; }
    .pricing-tier--featured { padding: 2rem; }
    .plan-selector { grid-template-columns: 1fr; }
}

/* ─── Legal pages (terms / privacy) & support ──────────────── */
.legal { max-width: 820px; margin: 0 auto; font-size: 1rem; line-height: 1.7; color: var(--gray-600); }
.legal h1 { font-size: 2.1rem; margin-bottom: 0.35rem; color: var(--navy); }
.legal h2 { font-size: 1.25rem; margin: 2.2rem 0 0.75rem; color: var(--navy); scroll-margin-top: 90px; }
.legal h3 { font-size: 1.05rem; margin: 1.4rem 0 0.5rem; }
.legal p { margin: 0 0 0.9rem; }
.legal ul, .legal ol { margin: 0 0 1rem 1.3rem; padding: 0; }
.legal li { margin: 0.35rem 0; }
.legal li > ol { margin-top: 0.35rem; }
.legal a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.legal a:hover { color: var(--navy); }
.legal code { background: var(--gray-100); padding: 0.1em 0.4em; border-radius: 4px; font-size: 0.9em; }
.legal__meta { font-size: 0.85rem; color: var(--gray-500); margin-bottom: 1.5rem; }
.legal__lead { font-size: 1.1rem; margin-bottom: 1.75rem; }
.legal__summary { background: var(--gray-100); border-left: 4px solid var(--blue); border-radius: var(--radius-lg); padding: 1rem 1.25rem; margin: 1.25rem 0 1.5rem; font-size: 0.95rem; }
.legal__summary ul { margin-bottom: 0; margin-top: 0.5rem; }
.legal__fill { background: #fff4e0; color: #8a4b00; padding: 0.05em 0.35em; border-radius: 4px; font-weight: 600; }
.legal__form { background: var(--gray-100); border-radius: var(--radius-lg); padding: 1rem 1.25rem; margin: 0.75rem 0 1.5rem; font-family: ui-monospace, Consolas, monospace; font-size: 0.88rem; line-height: 1.9; color: var(--navy); }
.legal__table { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin: 0.75rem 0 1.25rem; }
.legal__table th, .legal__table td { text-align: left; vertical-align: top; padding: 0.6rem 0.65rem; border-bottom: 1px solid var(--gray-200); }
.legal__table th { background: var(--gray-100); color: var(--navy); font-weight: 600; }
.legal--support { max-width: 1000px; }
.support-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: 2rem; align-items: start; }
.support-grid > * { min-width: 0; }
.support-aside .card { padding: 1.1rem 1.25rem; margin-bottom: 1rem; }
.support-aside .card__title { font-size: 1rem; margin-bottom: 0.4rem; }
.support-aside p { font-size: 0.9rem; margin-bottom: 0.5rem; }
.support-form textarea.form-input { resize: vertical; min-height: 160px; font-family: inherit; }
.support-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.checkout-consent { font-size: 0.8rem; color: var(--gray-500); line-height: 1.55; margin: 0.6rem 0 0; text-align: center; }
.checkout-consent a { color: var(--blue); }
.checkout-consent--banner { text-align: left; margin: -0.6rem 0 1.25rem; padding: 0 0.25rem; }
@media (max-width: 860px) {
    .legal { font-size: 0.97rem; }
    .legal h1 { font-size: 1.7rem; }
    .support-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
    /* Stack the data table into cards on phones */
    .legal__table thead { display: none; }
    .legal__table, .legal__table tbody, .legal__table tr, .legal__table td { display: block; width: 100%; }
    .legal__table tr { border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 0.5rem 0.75rem; margin-bottom: 0.75rem; }
    .legal__table td { border: 0; padding: 0.35rem 0; }
    .legal__table td::before { content: attr(data-label); display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--gray-500); font-weight: 600; margin-bottom: 0.1rem; }
}

/* ─── Home: stats row (was an inline 4-column grid that overflowed phones) ─── */
.home-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; text-align: center; }
.home-stats > * { min-width: 0; }
@media (max-width: 900px) { .home-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; } }
@media (max-width: 480px) { .home-stats .card { padding: 1.1rem !important; } .home-stats .card > div:first-child { font-size: 1.6rem !important; } }
