@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ── CSS custom properties – clean white theme ── */
:root {
    --background: #ffffff;
    --foreground: #1e293b;
    --card: #ffffff;
    --card-foreground: #1e293b;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-foreground: #ffffff;
    --secondary: #f1f5f9;
    --secondary-foreground: #1e293b;
    --muted: #f8fafc;
    --muted-foreground: #64748b;
    --accent: #2563eb;
    --accent-foreground: #ffffff;
    --border: #e2e8f0;
    --ring: #2563eb;
    --radius: 0.5rem;
    --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 -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

/* ── Base ── */
html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary);
}

a:hover {
    color: var(--primary-hover);
}

/* ── Navbar ── */
.navbar-dark-custom {
    background-color: var(--card);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.navbar-dark-custom .navbar-brand {
    color: var(--foreground);
    font-weight: 700;
}

.navbar-dark-custom .navbar-brand:hover {
    color: var(--primary);
}

.navbar-dark-custom .nav-link {
    color: var(--muted-foreground);
    font-weight: 500;
    transition: color 0.15s ease;
}

.navbar-dark-custom .nav-link:hover,
.navbar-dark-custom .nav-link:focus {
    color: var(--foreground);
}

.navbar-dark-custom .navbar-toggler {
    border-color: var(--border);
}

.navbar-dark-custom .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(100,116,139,1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ── Buttons ── */
.btn {
    font-weight: 500;
    border-radius: var(--radius);
    transition: all 0.15s ease;
}

.btn-primary {
    color: var(--primary-foreground);
    background-color: var(--primary);
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: var(--shadow);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    color: var(--primary-foreground);
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-link {
    color: var(--muted-foreground);
}

.btn-link:hover {
    color: var(--foreground);
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

/* ── Cards ── */
.card {
    background-color: var(--card);
    border: 1px solid var(--border);
    color: var(--card-foreground);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

/* ── Forms ── */
.form-control,
.form-select {
    background-color: var(--background);
    border: 1px solid var(--border);
    color: var(--foreground);
    border-radius: var(--radius);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus,
.form-select:focus {
    background-color: var(--background);
    border-color: var(--ring);
    color: var(--foreground);
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    color: var(--muted-foreground);
}

/* ── Tables ── */
.table {
    color: var(--foreground);
    border-color: var(--border);
}

/* ── Content panel (used by upload, terms, etc.) ── */
.content-panel {
    max-width: 760px;
    margin: 0 auto;
}

.terms-page-logo {
    display: block;
    margin: 0 auto 1.25rem;
    width: 64px;
    height: 64px;
}

.content-panel .panel-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
    padding: 2.5rem 2rem;
}

.content-panel .panel-header {
    text-align: center;
    margin-bottom: 2rem;
}

.content-panel .panel-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 0.5rem;
}

.content-panel .panel-header .lead {
    color: var(--muted-foreground);
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto;
}

.content-panel .panel-header .terms-updated {
    margin: 0.75rem auto 0;
    color: var(--muted-foreground);
    font-size: 0.9rem;
    font-style: italic;
}

.content-panel .step-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.3rem 0.75rem;
    border-radius: 9999px;
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.2);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 1rem;
}

.content-panel .step-badge::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary);
}

/* ── Upload zone ── */
.upload-zone {
    padding: 2.5rem 1.5rem;
    border-radius: 0.75rem;
    border: 2px dashed var(--border);
    background: var(--muted);
    text-align: center;
    display: grid;
    gap: 0.75rem;
    place-items: center;
    transition: border-color 0.2s ease, background 0.2s ease;
    cursor: pointer;
    position: relative;
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.04);
}

.upload-zone.has-file {
    border-style: solid;
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.04);
}

.upload-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.upload-zone .upload-icon {
    width: 56px;
    height: 56px;
    border-radius: 0.75rem;
    display: grid;
    place-items: center;
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary);
}

.upload-zone.has-file .upload-icon {
    background: rgba(34, 197, 94, 0.08);
    color: #16a34a;
}

.upload-zone h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--foreground);
    margin: 0;
}

.upload-zone p {
    margin: 0;
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

/* ── Info box (formats, selected file, status) ── */
.info-box {
    margin-top: 1.25rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--muted);
}

.info-box h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
    color: var(--foreground);
}

.info-box p {
    margin: 0;
    color: var(--muted-foreground);
    font-size: 0.875rem;
    line-height: 1.6;
}

.selected-file-box {
    display: none;
    margin-top: 1rem;
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius);
    border: 1px solid #bbf7d0;
    background: rgba(34, 197, 94, 0.04);
    color: #15803d;
    font-size: 0.875rem;
    font-weight: 500;
}

.selected-file-box.show {
    display: block;
}

.status-msg {
    display: none;
    margin-top: 1rem;
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    font-size: 0.875rem;
    line-height: 1.55;
    background: var(--muted);
    color: var(--foreground);
}

.status-msg.show {
    display: block;
}

.status-msg.error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.status-msg.warning {
    background: #dc2626;
    border-color: #b91c1c;
    color: #ffffff;
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
}

.flash-msg {
    display: none;
    margin-top: 1rem;
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius);
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    font-size: 0.875rem;
}

.flash-msg.show {
    display: block;
}

/* ── Terms list ── */
.terms-list {
    display: grid;
    gap: 1rem;
}

.term-item {
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--muted);
}

.term-item .term-num {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted-foreground);
    margin-bottom: 0.375rem;
}

.term-item .term-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 0.375rem;
}

.term-item .term-body {
    margin: 0;
    color: var(--muted-foreground);
    font-size: 0.875rem;
    line-height: 1.65;
}

/* ── Accept checkbox box ── */
.accept-box {
    margin-top: 1.25rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    border: 1px solid rgba(37, 99, 235, 0.2);
    background: rgba(37, 99, 235, 0.04);
}

.accept-box label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    margin: 0;
}

.accept-box input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--primary);
    flex-shrink: 0;
}

.accept-box span {
    color: var(--foreground);
    font-size: 0.875rem;
    line-height: 1.6;
}

/* ── Button row ── */
.button-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

@media (max-width: 640px) {
    .content-panel .panel-card {
        padding: 1.5rem 1.25rem;
    }

    .content-panel .panel-header h1 {
        font-size: 1.5rem;
    }

    .button-row {
        justify-content: stretch;
    }

    .button-row .btn {
        width: 100%;
    }
}

/* ── Nav pills (used by Identity pages) ── */
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    color: var(--primary-foreground);
    background-color: var(--primary);
    border-color: var(--primary);
}

/* ── Utilities ── */
.text-muted {
    color: var(--muted-foreground) !important;
}

.border-top {
    border-top: 1px solid var(--border) !important;
}

.border-bottom {
    border-bottom: 1px solid var(--border) !important;
}

.box-shadow {
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.15);
}

button.accept-policy {
    font-size: 1rem;
    line-height: inherit;
}

/* ── Form labels ── */
.form-label,
label {
    font-weight: 500;
    color: var(--foreground);
    margin-bottom: 0.375rem;
}

/* ── Form check / switch ── */
.form-check-input {
    border-color: var(--border);
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* ── Dropdown menus ── */
.dropdown-menu {
    background-color: var(--card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    border-radius: var(--radius);
}

.dropdown-item {
    color: var(--foreground);
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: var(--secondary);
    color: var(--foreground);
}

/* ── Alerts ── */
.alert {
    border-radius: var(--radius);
}

/* ── Profile page ── */
.profile-section {
    max-width: 640px;
}

.profile-section .card {
    padding: 2rem;
}

.profile-section h2 {
    font-weight: 600;
    margin-bottom: 1.5rem;
}

/* ── Manage Account page ── */
.manage-account {
    max-width: 680px;
}

.manage-header {
    padding: 1.5rem 2rem;
}

.manage-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    flex-shrink: 0;
    text-transform: uppercase;
}

.manage-card {
    padding: 1.75rem 2rem;
}

.manage-card-title {
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

/* ── Profile dropdown ── */
.navbar-dark-custom .dropdown-toggle::after {
    display: none;
}

.navbar-dark-custom .dropdown-toggle svg {
    color: var(--muted-foreground);
    transition: color 0.15s ease;
}

.navbar-dark-custom .dropdown-toggle:hover svg,
.navbar-dark-custom .dropdown-toggle[aria-expanded="true"] svg {
    color: var(--foreground);
}

.dropdown-header small {
    font-size: 0.8rem;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* ── Auth pages (Login / Register / 2FA) ── */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 480px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
    padding: 2.5rem 2rem;
}

.auth-card.auth-card--wide {
    max-width: 560px;
}

.auth-logo {
    display: block;
    margin: 0 auto 1rem;
    width: 56px;
    height: 56px;
}

.auth-card h1 {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.25rem;
}

.auth-card .auth-subtitle {
    text-align: center;
    color: var(--muted-foreground);
    margin-bottom: 1.75rem;
    font-size: 0.925rem;
}

.auth-card .form-floating {
    margin-bottom: 1rem;
}

.auth-card .form-floating > .form-control,
.auth-card .form-floating > .form-select {
    border-radius: var(--radius);
}

.auth-card .btn-primary {
    padding: 0.75rem;
    font-size: 1rem;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0;
    color: var(--muted-foreground);
    font-size: 0.825rem;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-links {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.9rem;
    color: var(--muted-foreground);
}

.auth-links a {
    font-weight: 500;
}

.auth-login-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding: 0.875rem 1.25rem;
    border-radius: 0.5rem;
    background: var(--primary-bg, #eff6ff);
    border: 1px solid var(--primary, #2563eb);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--foreground);
}

.auth-row {
    display: flex;
    gap: 0.75rem;
}

.auth-row > * {
    flex: 1;
}

/* ── Onboarding pages (RegisterConfirmation / ConfirmEmail) ── */
.onboarding-icon-circle {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #eff6ff;
    color: var(--primary);
}

.onboarding-icon-circle--success {
    background: #ecfdf5;
    color: #059669;
}

.onboarding-icon-circle--error {
    background: #fef2f2;
    color: #dc2626;
}

.onboarding-email-badge {
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius);
    background: var(--secondary);
    color: var(--foreground);
    margin-bottom: 1.75rem;
    word-break: break-all;
}

.onboarding-steps {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    margin-bottom: 1.5rem;
}

.onboarding-step {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    font-size: 0.95rem;
    color: var(--foreground);
}

.onboarding-step-number {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.onboarding-note {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    background: var(--muted);
    color: var(--muted-foreground);
    font-size: 0.85rem;
    border: 1px solid var(--border);
}

.onboarding-welcome-card {
    max-width: 640px;
}

.onboarding-cards {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.onboarding-card {
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: var(--card);
    text-align: center;
}

.onboarding-card-icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.625rem;
    background: #eff6ff;
    color: var(--primary);
}

.onboarding-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
}

.onboarding-card p {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-bottom: 0.875rem;
    line-height: 1.5;
}

.onboarding-youtube-section {
    margin-top: 0.5rem;
    margin-bottom: 1.25rem;
}

.onboarding-youtube-section h3 {
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 0.75rem;
    color: var(--foreground);
}

.onboarding-youtube-embed {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #000;
}

.onboarding-youtube-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ── Home page – Hero ── */
.hero-section {
    padding: 3rem 0 2rem;
    text-align: center;
}

.hero-logo {
    display: block;
    margin: 0 auto 1.5rem;
    width: 120px;
    height: 120px;
    filter: drop-shadow(0 4px 12px rgba(37, 99, 235, 0.18));
}

.hero-section h1 {
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--foreground);
    letter-spacing: -0.025em;
    margin-bottom: 1rem;
}

.hero-section .lead {
    font-size: 1.15rem;
    color: var(--muted-foreground);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.hero-gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Home page – Action cards ── */
.action-cards {
    display: grid;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto 3rem;
}

.action-cards.two-col {
    grid-template-columns: 1fr 1fr;
}

.action-cards.one-col {
    grid-template-columns: 1fr;
    max-width: 480px;
}

@media (max-width: 768px) {
    .action-cards.two-col {
        grid-template-columns: 1fr;
    }
    .hero-section h1 {
        font-size: 2rem;
    }
    .hero-logo {
        width: 88px;
        height: 88px;
    }
}

.action-card {
    position: relative;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all 0.25s ease;
    overflow: hidden;
}

.action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 1rem 1rem 0 0;
}

.action-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.12);
    transform: translateY(-2px);
}

.action-card.demo-card::before {
    background: linear-gradient(90deg, var(--primary), #38bdf8);
}

.action-card.subscribe-card::before {
    background: linear-gradient(90deg, #7c3aed, #f472b6);
}

.action-card.trial-card::before {
    background: linear-gradient(90deg, var(--primary), #22c55e);
}

.action-card-icon {
    width: 64px;
    height: 64px;
    border-radius: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.demo-card .action-card-icon {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(56, 189, 248, 0.1));
    color: var(--primary);
}

.subscribe-card .action-card-icon {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(244, 114, 182, 0.1));
    color: #7c3aed;
}

.action-card h2 {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--foreground);
}

.action-card p {
    color: var(--muted-foreground);
    margin-bottom: 1.75rem;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* ── Home page – CTA buttons ── */
.btn-demo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), #38bdf8);
    border: none;
    border-radius: 0.625rem;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.btn-demo:hover {
    color: #fff;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}

.btn-subscribe-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: #fff;
    background: linear-gradient(135deg, #7c3aed, #f472b6);
    border: none;
    border-radius: 0.625rem;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.25);
}

.btn-subscribe-action:hover {
    color: #fff;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.35);
    transform: translateY(-1px);
}

/* ── Home page – Features strip ── */
.features-strip {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: wrap;
    padding: 2rem 0 1rem;
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.features-strip .feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.features-strip svg {
    color: var(--primary);
    flex-shrink: 0;
}

.stripe-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 0.5rem;
}

/* ── Trial / cancellation messaging card (beside the Subscribe card) ── */
.trial-card {
    text-align: left;
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.05) 0%, #fff 55%);
    display: flex;
    flex-direction: column;
}

.trial-card h2 {
    margin: 0.75rem 0 0.5rem;
}

.trial-banner-badge {
    align-self: flex-start;
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--primary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 9999px;
}

.trial-card-intro {
    margin: 0 0 1.25rem;
    font-size: 0.95rem;
    line-height: 1.55;
    color: #4b5563;
}

.trial-card-note {
    margin: auto 0 0;
    padding-top: 1.25rem;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #6b7280;
}

.trial-points {
    list-style: none;
    margin: 0 0 1.25rem;
    padding: 0;
    text-align: left;
}

.trial-points li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
    font-size: 0.92rem;
    line-height: 1.45;
    color: #374151;
}

.trial-points li:last-child {
    margin-bottom: 0;
}

.trial-points svg {
    flex-shrink: 0;
    margin-top: 0.15rem;
    color: #16a34a;
}

.demo-link-note {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #6b7280;
    text-align: center;
}

.demo-link-note a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.demo-link-note a:hover {
    text-decoration: underline;
}

.active-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    margin-bottom: 1.5rem;
}

/* ── Loading overlay for auth forms ── */
.auth-loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(2px);
    align-items: center;
    justify-content: center;
}

.auth-loading-overlay.active {
    display: flex;
}

.auth-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: auth-spin 0.8s linear infinite;
}

@keyframes auth-spin {
    to { transform: rotate(360deg); }
}

/* ── Honeypot (anti-bot): visually hidden but still submitted ── */
.hp-field {
    position: absolute !important;
    left: -9999px !important;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ── Public parser-download page ── */
.parser-dl-card h1 {
    margin-bottom: 1.75rem;
}

/* Subtle divider separating the data fields from the consent / opt-in section. */
.parser-dl-fineprint {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.parser-dl-optin {
    margin-bottom: 0;
}

.parser-dl-optin .form-check-input {
    margin-top: 0.2rem;
}

.parser-dl-optin .form-check-label {
    font-size: 0.9rem;
    color: var(--foreground);
}

/* Primary download buttons: icon + label, centred. */
.parser-dl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.parser-dl-btn-icon {
    flex: 0 0 auto;
}

/* Legal consent microcopy beneath the button. */
.parser-dl-consent {
    margin-top: 0.9rem;
    margin-bottom: 0;
    text-align: center;
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--muted-foreground);
}

.parser-dl-ready {
    text-align: center;
    padding: 0.5rem 0 0.25rem;
    animation: parser-dl-fade 0.35s ease both;
}

.parser-dl-check {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #16a34a;
    background: #dcfce7;
}

.parser-dl-ready h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.parser-dl-ready-text {
    color: var(--muted-foreground);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.parser-dl-expiry {
    margin-top: 0.9rem;
    margin-bottom: 0;
    font-size: 0.8rem;
    color: var(--muted-foreground);
}

@keyframes parser-dl-fade {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}