/* ═══════════════════════════════════════════════════════════
   MblynkAlgo — Premium Dark Theme Stylesheet
   ═══════════════════════════════════════════════════════════ */

/* ─── CSS Custom Properties ──────────────────────────────── */
:root {
    /* Core palette */
    --bg-primary: #f5f7fb;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #ffffff;
    --bg-input: #f8fafc;

    /* Accent colors */
    --accent-primary: #6366f1;       /* Indigo */
    --accent-primary-light: #818cf8;
    --accent-primary-dark: #4f46e5;
    --accent-glow: rgba(99, 102, 241, 0.15);
    --accent-secondary: #06b6d4;     /* Cyan */
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);

    /* Text */
    --text-primary: #172033;
    --text-secondary: #52617a;
    --text-muted: #738198;
    --text-accent: #4f46e5;

    /* Borders */
    --border-color: rgba(15, 23, 42, 0.09);
    --border-hover: rgba(79, 70, 229, 0.24);
    --border-accent: rgba(99, 102, 241, 0.24);

    /* Status */
    --color-success: #22c55e;
    --color-success-bg: rgba(34, 197, 94, 0.1);
    --color-error: #ef4444;
    --color-error-bg: rgba(239, 68, 68, 0.1);
    --color-warning: #f59e0b;
    --color-warning-bg: rgba(245, 158, 11, 0.1);
    --color-info: #3b82f6;
    --color-info-bg: rgba(59, 130, 246, 0.1);

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.92);
    --glass-border: rgba(15, 23, 42, 0.08);
    --glass-blur: 16px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 18px 48px rgba(15, 23, 42, 0.12);
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.10);

    /* Spacing */
    --container-max: 1200px;
    --container-padding: 24px;

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--text-accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-primary-light);
}

code, pre {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ─── Public site header ────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 1px 12px rgba(15, 23, 42, 0.04);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
}

.header-container {
    width: min(100%, var(--container-max));
    min-height: 72px;
    margin: 0 auto;
    padding: 12px var(--container-padding);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.brand:hover {
    color: var(--text-primary);
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    border-radius: 11px;
    background: var(--accent-gradient);
    color: #fff;
    font-size: 17px;
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.24);
}

.site-header .nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.site-header .nav-links > a:not(.btn) {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.site-header .nav-links > a:not(.btn):hover {
    color: var(--text-primary);
    background: rgba(79, 70, 229, 0.07);
}

.site-header .btn-sm {
    padding: 8px 14px;
}

/* ─── Navbar ─────────────────────────────────────────────── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--glass-border);
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 18px;
}

.nav-logo:hover {
    color: var(--text-primary);
}

.logo-icon {
    font-size: 22px;
}

.logo-accent {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link--subtle {
    color: var(--text-muted);
}

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    white-space: nowrap;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
    border-radius: var(--radius-md);
}

.btn-full {
    width: 100%;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    color: #fff;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.btn-google {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    width: 100%;
    padding: 12px 20px;
    font-weight: 500;
}

.btn-google:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.google-icon {
    flex-shrink: 0;
}

.btn-icon {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.btn-arrow {
    transition: transform var(--transition-fast);
}

.btn:hover .btn-arrow {
    transform: translateX(3px);
}

/* ─── Flash Messages ─────────────────────────────────────── */
.flash-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 420px;
}

.flash {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    font-size: 14px;
    cursor: pointer;
    animation: slideIn 0.3s ease-out;
}

.flash--success {
    background: var(--color-success-bg);
    border-color: rgba(34, 197, 94, 0.2);
    color: var(--color-success);
}

.flash--error {
    background: var(--color-error-bg);
    border-color: rgba(239, 68, 68, 0.2);
    color: var(--color-error);
}

.flash--warning {
    background: var(--color-warning-bg);
    border-color: rgba(245, 158, 11, 0.2);
    color: var(--color-warning);
}

.flash--info {
    background: var(--color-info-bg);
    border-color: rgba(59, 130, 246, 0.2);
    color: var(--color-info);
}

.flash-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.flash-close {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    opacity: 0.5;
    cursor: pointer;
    font-size: 18px;
    padding: 0 4px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ─── Main Content ───────────────────────────────────────── */
.main-content {
    flex: 1;
}

/* ─── Hero Section ───────────────────────────────────────── */
.hero {
    position: relative;
    padding: 100px var(--container-padding) 80px;
    text-align: center;
    overflow: hidden;
}

.hero-bg-glow {
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 600px;
    background: radial-gradient(ellipse, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    max-width: 720px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 100px;
    background: var(--accent-glow);
    border: 1px solid var(--border-accent);
    color: var(--accent-primary-light);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 24px;
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 8px rgba(99, 102, 241, 0.15); }
    50% { box-shadow: 0 0 20px rgba(99, 102, 241, 0.25); }
}

.hero-title {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
}

.hero-title-accent {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 36px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 56px;
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border-color);
}

/* ─── Features Section ───────────────────────────────────── */
.section-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.features {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.section-title {
    text-align: center;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 48px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: all var(--transition-base);
    backdrop-filter: blur(10px);
}

.feature-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 32px;
    margin-bottom: 16px;
}

.feature-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature-desc {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.65;
}

/* ─── How It Works ───────────────────────────────────────── */
.how-it-works {
    padding: 80px 0;
}

.steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
    max-width: 900px;
    margin: 0 auto;
}

.step {
    text-align: center;
    flex: 1;
    min-width: 200px;
    max-width: 260px;
    padding: 0 16px;
}

.step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.step-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}

.step-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.step-connector {
    width: 60px;
    height: 2px;
    background: var(--border-color);
    margin-top: 24px;
    flex-shrink: 0;
}

/* ─── CTA Section ────────────────────────────────────────── */
.cta-section {
    padding: 60px 0 100px;
}

.cta-card {
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 60px 40px;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.cta-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-gradient);
}

.cta-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 12px;
}

.cta-subtitle {
    color: var(--text-secondary);
    margin-bottom: 28px;
    font-size: 16px;
}

/* ─── Auth Pages ─────────────────────────────────────────── */
.auth-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 64px - 60px);
    padding: 40px var(--container-padding);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 40px 36px;
    backdrop-filter: blur(var(--glass-blur));
    box-shadow: var(--shadow-lg);
}

.auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.auth-title {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 6px;
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    color: var(--text-secondary);
    font-size: 14px;
}

.auth-link {
    font-weight: 600;
}

/* ─── Forms ──────────────────────────────────────────────── */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: all var(--transition-fast);
    outline: none;
}

.form-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input--mono {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    letter-spacing: 0.02em;
}

/* ─── Dashboard ──────────────────────────────────────────── */
.dashboard {
    padding: 40px 0 80px;
}

.dashboard-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.dashboard-header {
    margin-bottom: 32px;
}

.dashboard-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.dashboard-greeting {
    color: var(--text-secondary);
    font-size: 15px;
    margin-top: 4px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 20px;
}

/* ─── Cards ──────────────────────────────────────────────── */
.card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
    backdrop-filter: blur(10px);
}

.card:hover {
    border-color: var(--border-hover);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 0;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
}

.card-body {
    padding: 16px 24px 24px;
}

.card-empty-text {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.6;
}

/* ─── Badges ─────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.badge--active {
    background: var(--color-success-bg);
    color: var(--color-success);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.badge--expired {
    background: var(--color-warning-bg);
    color: var(--color-warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge--cancelled {
    background: var(--color-error-bg);
    color: var(--color-error);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge--inactive {
    background: rgba(100, 116, 139, 0.1);
    color: var(--text-muted);
    border: 1px solid rgba(100, 116, 139, 0.15);
}

/* ─── Subscription Status ────────────────────────────────── */
.status-detail {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.status-detail:last-of-type {
    margin-bottom: 16px;
}

.status-label {
    color: var(--text-muted);
    font-size: 14px;
}

.status-value {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
}

/* ─── License Key Display ────────────────────────────────── */
.key-display {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 10px;
}

.key-value {
    flex: 1;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--accent-primary-light);
    word-break: break-all;
    background: none;
    padding: 0;
}

.key-hint {
    color: var(--text-muted);
    font-size: 13px;
}

.card--webhook {
    border: 1px solid rgba(16, 185, 129, 0.45);
    box-shadow: 0 8px 26px rgba(16, 185, 129, 0.1);
}

.webhook-active-panel {
    padding: 12px 14px;
    margin-bottom: 12px;
    border: 1px solid rgba(16, 185, 129, 0.28);
    border-radius: var(--radius-sm);
    background: #ecfdf5;
}

.webhook-active-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #047857;
    font-size: 14px;
    margin-bottom: 5px;
}

.webhook-active-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.14);
}

.webhook-url-box {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px;
    margin-bottom: 8px;
    border: 2px solid #10b981;
    border-radius: var(--radius-sm);
    background: #f0fdf4;
}

.webhook-url-label {
    align-self: flex-start;
    min-width: 112px;
    color: #047857;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.webhook-url-value {
    display: block;
    width: 100%;
    min-width: 0;
    color: #065f46;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    line-height: 1.5;
    word-break: break-all;
    overflow-wrap: anywhere;
    white-space: normal;
    background: none;
}

.webhook-url-box .btn-copy {
    align-self: flex-end;
}

.webhook-security-note {
    color: #64748b;
    font-size: 12px;
}

.webhook-legacy-warning {
    padding: 12px 14px;
    margin-bottom: 12px;
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: var(--radius-sm);
    background: #fffbeb;
    color: #92400e;
    font-size: 13px;
    line-height: 1.5;
}

.webhook-legacy-warning p {
    margin-top: 4px;
}

.info-page {
    padding: 56px 0 88px;
    background:
        radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.08), transparent 30rem);
}

.info-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.info-container--narrow {
    max-width: 900px;
}

.info-hero {
    margin-bottom: 28px;
}

.info-hero h1 {
    max-width: 780px;
    margin: 8px 0 10px;
    font-size: clamp(30px, 4.5vw, 44px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.info-hero p {
    max-width: 680px;
    color: var(--text-secondary);
    font-size: 15px;
}

.eyebrow {
    color: var(--accent-primary-dark);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.info-layout {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    max-width: 1080px;
    margin: 0 auto;
}

.info-sidebar {
    position: sticky;
    top: 88px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    background: var(--glass-bg);
    box-shadow: var(--shadow-sm);
}

.info-sidebar a {
    padding: 8px 10px;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 13px;
}

.info-sidebar a:hover {
    color: var(--accent-primary-dark);
    background: var(--accent-glow);
}

.info-card {
    padding: 28px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    background: var(--glass-bg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.info-content {
    font-size: 15px;
}

.info-content section + section {
    margin-top: 30px;
}

.info-content h2 {
    margin: 30px 0 10px;
    color: var(--text-primary);
    font-size: 20px;
    letter-spacing: -0.02em;
}

.info-content h2:first-child {
    margin-top: 0;
}

.info-content p,
.info-content li {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.75;
}

.info-content > p {
    margin-bottom: 14px;
}

.info-content ul,
.info-content ol {
    padding-left: 22px;
    margin: 10px 0;
}

.info-content li + li {
    margin-top: 6px;
}

.info-content a {
    font-weight: 600;
}

.docs-code {
    overflow-x: auto;
    margin: 12px 0;
    padding: 16px;
    border: 1px solid rgba(99, 102, 241, 0.16);
    border-radius: var(--radius-sm);
    background: #f8faff;
    color: #4338ca;
    font-size: 13px;
    line-height: 1.6;
}

.faq-list {
    display: grid;
    gap: 10px;
}

.faq-list details {
    padding: 20px 22px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    background: var(--glass-bg);
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.faq-list details[open] {
    border-color: rgba(99, 102, 241, 0.25);
    box-shadow: var(--shadow-md);
}

.faq-list summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 700;
    list-style: none;
}

.faq-list summary::-webkit-details-marker {
    display: none;
}

.faq-list summary::after {
    content: "+";
    flex-shrink: 0;
    margin-left: 16px;
    color: var(--accent-primary-dark);
    font-size: 20px;
    font-weight: 400;
}

.faq-list details[open] summary::after {
    content: "−";
}

.faq-list p {
    margin-top: 12px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.contact-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-height: 130px;
    padding: 20px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    background: var(--glass-bg);
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.contact-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.contact-card-label {
    color: var(--accent-primary-dark);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.contact-card strong {
    color: var(--text-primary);
    font-size: 15px;
    word-break: break-word;
}

.contact-card > span:last-child {
    color: var(--text-muted);
    font-size: 13px;
}

.contact-note {
    text-align: center;
}

.contact-note .btn {
    margin-top: 16px;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 13px;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.copy-icon {
    font-size: 16px;
}

/* ─── Download Section ───────────────────────────────────── */
.download-info {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.download-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--accent-glow);
    border: 1px solid var(--border-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.download-icon {
    font-size: 22px;
}

.download-filename {
    font-weight: 700;
    font-size: 15px;
}

.download-meta {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ─── Card Locked State ──────────────────────────────────── */
.card-locked {
    text-align: center;
    padding: 20px 0;
}

.lock-icon {
    font-size: 28px;
    margin-bottom: 10px;
    display: block;
    opacity: 0.5;
}

.card-locked p {
    color: var(--text-muted);
    font-size: 14px;
}

/* ─── Setup Guide ────────────────────────────────────────── */
.setup-steps {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.setup-step {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.setup-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.setup-step strong {
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
}

.setup-step p {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
}

.code-block {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-top: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--accent-primary-light);
    overflow-x: auto;
    white-space: pre;
    line-height: 1.5;
}

/* ─── Activate Form (inside card) ────────────────────────── */
.activate-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ─── Error Page ─────────────────────────────────────────── */
.error-page {
    text-align: center;
    padding: 100px var(--container-padding);
}

.error-code {
    font-size: 80px;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.error-message {
    color: var(--text-secondary);
    font-size: 18px;
    margin-bottom: 28px;
}

/* ─── Footer ─────────────────────────────────────────────── */
.footer {
    border-top: 1px solid var(--glass-border);
    padding: 20px 0;
}

.footer-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    text-align: center;
}

.footer-text {
    color: var(--text-muted);
    font-size: 13px;
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
    .header-container {
        min-height: 64px;
        padding: 10px var(--container-padding);
        gap: 12px;
    }

    .nav-container {
        height: 56px;
    }

    .nav-links {
        gap: 2px;
    }

    .nav-link--public {
        display: none;
    }

    .logo-text {
        font-size: 16px;
    }

    .hero {
        padding: 60px var(--container-padding) 50px;
    }

    .hero-stats {
        gap: 20px;
    }

    .stat-divider {
        display: none;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .steps {
        flex-direction: column;
        align-items: center;
    }

    .step-connector {
        width: 2px;
        height: 24px;
        margin: 0;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .info-layout {
        grid-template-columns: 1fr;
    }

    .info-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .info-page {
        padding: 36px 0 64px;
    }

    .info-card {
        padding: 22px 20px;
    }

    .auth-card {
        padding: 28px 24px;
    }

    .flash-container {
        left: 16px;
        right: 16px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 10px 16px;
    }

    .brand {
        font-size: 16px;
    }

    .brand-mark {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
        font-size: 15px;
    }

    .site-header .nav-links {
        gap: 3px;
    }

    .site-header .nav-links > a:not(.btn) {
        padding: 6px 8px;
        font-size: 13px;
    }

    .site-header .btn-sm {
        padding: 7px 9px;
        font-size: 12px;
    }

    .nav-logo {
        gap: 6px;
        font-size: 15px;
    }

    .logo-icon {
        font-size: 18px;
    }

    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-links .nav-link {
        padding: 6px 10px;
        font-size: 13px;
    }
}

/* ─── OTP Verification Page ──────────────────────────────── */
.otp-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-glow);
    border: 1px solid var(--border-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.otp-icon {
    font-size: 26px;
}

.otp-email {
    color: var(--accent-primary-light);
    font-weight: 600;
}

.form-input--otp {
    font-family: 'JetBrains Mono', monospace;
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    letter-spacing: 10px;
    padding: 16px;
    color: var(--accent-primary-light);
}

.form-input--otp::placeholder {
    letter-spacing: 10px;
    color: var(--text-muted);
    opacity: 0.4;
}

.otp-actions {
    text-align: center;
    margin-top: 20px;
}

.otp-hint {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 4px;
}

.resend-form {
    display: inline;
}

.btn-link {
    background: none;
    border: none;
    color: var(--text-accent);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    transition: color var(--transition-fast);
}

.btn-link:hover {
    color: var(--accent-primary-light);
    text-decoration: underline;
}

.recaptcha-group {
    display: flex;
    justify-content: center;
    margin: 16px 0;
}

/* Modern light dashboard polish */
body {
    background:
        radial-gradient(circle at 8% 0%, rgba(99, 102, 241, 0.08), transparent 30rem),
        linear-gradient(180deg, #ffffff 0%, var(--bg-primary) 42%, #eef2f8 100%);
}

.navbar {
    background: rgba(255, 255, 255, 0.88);
    border-bottom-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 1px 12px rgba(15, 23, 42, 0.04);
}

.nav-logo,
.nav-logo:hover {
    color: var(--text-primary);
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(79, 70, 229, 0.07);
}

.btn-ghost,
.btn-google,
.btn-icon {
    background: #ffffff;
    border-color: var(--border-color);
    color: var(--text-secondary);
}

.btn-ghost:hover,
.btn-google:hover,
.btn-icon:hover {
    background: #f5f7ff;
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.dashboard {
    padding-top: 52px;
}

.dashboard-header {
    padding: 28px 30px;
    margin-bottom: 26px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}

.dashboard-title {
    font-size: clamp(28px, 4vw, 38px);
    letter-spacing: -0.04em;
}

.dashboard-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
    gap: 22px;
}

.card {
    background: var(--glass-bg);
    border-color: var(--glass-border);
    box-shadow: var(--shadow-sm);
}

.card:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.card-title {
    letter-spacing: -0.01em;
}

.key-display {
    background: #f8faff;
    border-color: rgba(99, 102, 241, 0.16);
}

.key-value,
.code-block {
    color: #4338ca;
}

.btn-copy {
    min-width: 82px;
    padding: 8px 11px;
    font-size: 12px;
    font-weight: 700;
}

.btn-copy .copy-icon {
    font-size: 0;
}

.btn-copy .copy-icon::after {
    content: "Copy URL";
    font-size: 12px;
}

.btn-copy.is-copied {
    color: #15803d;
    border-color: rgba(34, 197, 94, 0.28);
    background: #f0fdf4;
}

.btn-copy.is-copied .copy-icon::after {
    content: "Copied";
}

.code-block {
    background: #f8faff;
    border-color: rgba(99, 102, 241, 0.14);
}

.footer {
    border-top-color: rgba(15, 23, 42, 0.08);
}

/* ─── Alert Message Builder ─────────────────────────────── */
.card--alert-builder {
    overflow: hidden;
    border: 2px solid rgba(99, 102, 241, 0.28);
    box-shadow: 0 14px 40px rgba(79, 70, 229, 0.13);
    margin-bottom: 22px;
}

.alert-builder-header {
    align-items: flex-start;
    gap: 20px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.07), rgba(6, 182, 212, 0.04));
}

.eyebrow {
    color: var(--text-accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .11em;
    line-height: 1.3;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.card-subtitle {
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 4px;
}

.builder-step-badge,
.preview-status {
    border: 1px solid rgba(99, 102, 241, 0.18);
    border-radius: 999px;
    color: var(--text-accent);
    background: rgba(99, 102, 241, 0.08);
    font-size: 11px;
    font-weight: 700;
    padding: 6px 10px;
    white-space: nowrap;
}

.alert-builder-body {
    padding: 26px;
}

.alert-builder-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, .9fr);
    gap: 30px;
    align-items: start;
}

.builder-section-heading {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-bottom: 17px;
}

.builder-section-number {
    display: grid;
    place-items: center;
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
    border-radius: 50%;
    color: #fff;
    background: var(--accent-gradient);
    font-size: 12px;
    font-weight: 800;
}

.builder-section-heading h3,
.preview-heading h3 {
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.3;
}

.builder-section-heading p,
.preview-help {
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 3px;
}

.account-fields {
    display: grid;
    gap: 12px;
}

.account-field-row .form-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.required-mark {
    color: var(--text-accent);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.account-input-with-remove {
    display: flex;
    gap: 8px;
}

.account-input-with-remove .form-input {
    min-width: 0;
    flex: 1;
}

.remove-account-btn {
    width: 42px;
    flex: 0 0 42px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    background: transparent;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    transition: all var(--transition-fast);
}

.remove-account-btn:hover {
    border-color: rgba(239, 68, 68, .28);
    color: var(--color-error);
    background: var(--color-error-bg);
}

.add-account-btn {
    margin-top: 14px;
    padding: 8px 12px;
    font-size: 12px;
}

.add-account-btn:disabled {
    cursor: not-allowed;
    opacity: .5;
}

.account-limit {
    color: var(--text-muted);
    font-weight: 400;
}

.builder-divider {
    height: 1px;
    background: var(--border-color);
    margin: 24px 0;
}

.symbol-field {
    margin-bottom: 18px;
}

.builder-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.form-help {
    display: block;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.4;
    margin-top: 5px;
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 18px;
    cursor: pointer;
}

.checkbox-row input {
    accent-color: var(--accent-primary);
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    margin-top: 2px;
}

.checkbox-copy {
    display: grid;
    gap: 2px;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.4;
}

.checkbox-copy strong {
    color: var(--text-primary);
    font-size: 13px;
}

.checkbox-copy small {
    color: var(--text-muted);
    font-size: 11px;
}

.builder-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.generate-alert-btn {
    min-width: 210px;
}

.generate-alert-btn:disabled {
    cursor: not-allowed;
    opacity: .48;
}

.generation-help {
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.4;
}

.alert-preview-panel {
    min-width: 0;
    padding: 20px;
    border: 1px solid rgba(99, 102, 241, .15);
    border-radius: var(--radius-lg);
    background: #f8f9ff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .65);
    transition: box-shadow var(--transition-base), border-color var(--transition-base);
}

.alert-preview-panel.is-generated {
    border-color: rgba(34, 197, 94, .34);
    box-shadow: 0 10px 28px rgba(34, 197, 94, .10), inset 0 0 0 1px rgba(255, 255, 255, .65);
}

.preview-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.preview-status.is-ready {
    color: #16803c;
    border-color: rgba(34, 197, 94, .22);
    background: var(--color-success-bg);
}

.alert-code-wrap {
    position: relative;
    margin-top: 16px;
}

.alert-code {
    min-height: 225px;
    overflow: auto;
    padding: 17px 16px 64px;
    border: 1px solid rgba(15, 23, 42, .11);
    border-radius: var(--radius-md);
    color: #26324a;
    background: #fff;
    font-size: 12px;
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-word;
}

.alert-preview-placeholder {
    min-height: 225px;
    display: grid;
    place-items: center;
    padding: 30px;
    border: 1px dashed rgba(99, 102, 241, .28);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    background: rgba(255, 255, 255, .7);
    font-size: 13px;
    text-align: center;
}

.alert-preview-placeholder[hidden],
.alert-code[hidden] {
    display: none;
}

.preview-copy-btn {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 8px 12px;
    font-size: 12px;
}

.preview-copy-btn:disabled {
    cursor: not-allowed;
    opacity: .48;
}

.preview-copy-btn.is-copied {
    background: #16a34a;
}

.preview-tip {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 13px;
    color: var(--text-muted);
    font-size: 11px;
}

.preview-tip-icon {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    color: #15803d;
    background: rgba(34, 197, 94, .14);
    font-size: 11px;
    font-weight: 800;
}

@media (max-width: 850px) {
    .alert-builder-layout {
        grid-template-columns: 1fr;
    }

    .alert-preview-panel {
        order: -1;
    }
}

@media (max-width: 560px) {
    .alert-builder-header,
    .preview-heading {
        display: block;
    }

    .builder-step-badge,
    .preview-status {
        display: inline-flex;
        margin-top: 12px;
    }

    .alert-builder-body {
        padding: 20px 16px;
    }

    .builder-options {
        grid-template-columns: 1fr;
    }

    .alert-preview-panel {
        padding: 16px;
    }

    .builder-actions {
        display: block;
    }

    .generate-alert-btn {
        width: 100%;
    }

    .generation-help {
        display: block;
        margin-top: 9px;
    }
}
