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

.loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #0B1120;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #0B1120;
    color: #F1F5F9;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: -20%;
    right: -10%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 60%);
    pointer-events: none;
    transition: opacity 0.5s;
}

body::after {
    content: '';
    position: fixed;
    bottom: -10%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.12) 0%, transparent 60%);
    pointer-events: none;
    transition: opacity 0.5s;
}

body.analytics-open::before,
body.analytics-open::after,
body.admin-open::before,
body.admin-open::after {
    opacity: 0;
}

#noise-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    image-rendering: pixelated;
}

.page {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 32px 0 48px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.2rem;
    font-weight: 700;
    color: #F1F5F9;
    letter-spacing: -0.02em;
    text-decoration: none;
    cursor: pointer;
}

.support-link {
    color: #64748B;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

.support-link:hover {
    color: #CBD5E1;
}

/* Hero */
.hero {
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 32px 28px;
}

.hero:not(.subpage-content) h1 {
    font-size: clamp(2.2rem, 7vw, 3.2rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: #F8FAFC;
    margin-bottom: 20px;
}

.grad {
    background: linear-gradient(135deg, #3B82F6, #22C55E);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.05rem;
    color: #94A3B8;
    line-height: 1.7;
    margin-bottom: 32px;
}

/* Flow diagram */
.flow-wrap {
    padding: 24px 20px 16px;
    position: relative;
    padding-bottom: 36px;
    margin-bottom: 30px;
}

.flow {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 0;
}

.flow-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.flow-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flow-icon .material-symbols-rounded {
    font-size: 24px;
    color: #94A3B8;
}

.flow-label {
    font-size: 0.75rem;
    color: #64748B;
    font-weight: 500;
    white-space: nowrap;
}

.flow-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 8px;
}

.flow-arrow-text {
    font-size: 0.65rem;
    color: #475569;
    font-weight: 500;
}

.flow-return {
    position: absolute;
    height: 28px;
    bottom: 0;
    pointer-events: none;
}

.flow-return-arrow {
    display: block;
    width: 100%;
    overflow: visible;
}

.flow-return-text {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    color: #64748B;
    font-weight: 500;
    padding: 2px 8px 0;
    white-space: nowrap;
}

/* Steps */
.steps {
    display: flex;
    flex-direction: column;
    gap: 28px;
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 28px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.3rem;
    font-weight: 700;
    color: #E2E8F0;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.section-title .material-symbols-rounded {
    font-size: 24px;
    color: #64748B;
}

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

.step-num {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #3B82F6, #22C55E);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    margin-top: 2px;
}

.step>div>strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #E2E8F0;
    margin-bottom: 4px;
}

.step p {
    font-size: 0.9rem;
    color: #64748B;
    line-height: 1.55;
}

.step p a {
    background: linear-gradient(135deg, #3B82F6, #22C55E);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    font-weight: 600;
}

.step p a:hover {
    text-decoration: underline;
    text-decoration-color: #22C55E;
}

/* CTA */
.steps-cta {
    text-align: center;
    margin-top: 8px;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #3B82F6, #22C55E);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    transition: opacity 0.2s, transform 0.2s;
}

.cta-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.cta-note {
    margin-top: 14px;
    font-size: 0.8rem;
    color: #475569;
}

/* Footer */
.footer {
    margin-top: auto;
    padding: 32px 28px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: none;
    border-radius: 20px 20px 0 0;
    text-align: center;
}

.footer-title {
    font-size: 0.8rem;
    color: #334155;
}

.footer-expand {
    margin-top: 24px;
    text-align: left;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 48px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #64748B;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.footer-links a .material-symbols-rounded {
    font-size: 16px;
}

.footer-links a:hover {
    color: #CBD5E1;
}

.footer-copy {
    display: block;
    margin-top: 20px;
    font-size: 0.75rem;
    color: #334155;
    text-align: center;
}

/* Subpage */
.subpage {
    display: none;
    position: relative;
    min-height: 100vh;
}

.subpage.open {
    display: block;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #64748B;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 24px;
    transition: color 0.2s;
}

.back-btn .material-symbols-rounded {
    font-size: 18px;
}

.back-btn:hover {
    color: #CBD5E1;
}

.subpage-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.subpage-icon {
    font-size: 48px;
    color: #64748B;
}

.subpage-title {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #F8FAFC;
    margin-bottom: 0;
}

.subpage-text {
    font-size: 1rem;
    color: #94A3B8;
    line-height: 1.7;
}

.subpage-text p {
    margin-bottom: 12px;
}

.subpage-text h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #E2E8F0;
    margin: 24px 0 8px;
}

.subpage-text ul {
    margin: 0 0 12px 20px;
    color: #94A3B8;
}

.subpage-text ul li {
    margin-bottom: 4px;
}

.grad-link {
    background: linear-gradient(135deg, #3B82F6, #22C55E);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    font-weight: 600;
}

.grad-link:hover {
    text-decoration: underline;
    text-decoration-color: #22C55E;
}

.plans {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 16px 0;
}

.plan {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 18px 16px;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 6px;
    position: relative;
}

.plan strong {
    grid-column: 1 / -1;
    font-size: 1.05rem;
    color: #F1F5F9;
}

.plan-features {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.plan-price {
    grid-column: 2;
    grid-row: 2;
    align-self: end;
    font-size: 0.9rem;
    font-weight: 600;
    background: linear-gradient(135deg, #3B82F6, #22C55E);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: right;
}

.plan-premium {
    border-color: rgba(59, 130, 246, 0.2);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.06), rgba(34, 197, 94, 0.04));
}

.plan-premium strong {
    background: linear-gradient(135deg, #60A5FA, #34D399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.plan-premium .plan-feature {
    color: #CBD5E1;
}

.plan-premium .plan-feature .material-symbols-rounded {
    color: #3B82F6;
}

.plan-top strong {
    font-size: 1.15rem;
    font-weight: 800;
    background: linear-gradient(135deg, #A78BFA, #F472B6, #FACC15);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.plan-top {
    border-color: rgba(167, 139, 250, 0.3);
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.08), rgba(244, 114, 182, 0.05));
}

.plan-popular {
    border-color: rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(34, 197, 94, 0.06));
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.1);
}

.plan-badge {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #3B82F6;
    background: rgba(59, 130, 246, 0.15);
    padding: 2px 10px;
    border-radius: 6px;
    white-space: nowrap;
}

.plan-feature {
    font-size: 0.8rem;
    color: #94A3B8;
    display: flex;
    align-items: center;
    gap: 5px;
}

.plan-feature .material-symbols-rounded {
    font-size: 1rem;
    color: #64748B;
}

@media (max-width: 520px) {
    .plans {
        max-width: 100%;
    }
}

.plans-note {
    font-size: 0.85rem;
    color: #64748B;
    margin-top: 4px;
}

.contact-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0;
    font-size: 1rem;
}

.contact-row .material-symbols-rounded {
    font-size: 20px;
    color: #64748B;
}

/* ── Features ──────────────────────────────────────────────────────── */

.features {
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 28px;
}

.features .section-title {
    margin-bottom: 20px;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: border-color 0.25s, transform 0.2s;
}

.feature-card:hover {
    border-color: rgba(59, 130, 246, 0.25);
    transform: translateY(-2px);
}

.feature-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.feature-icon-wrap .material-symbols-rounded {
    font-size: 22px;
    color: #3B82F6;
}

.feature-icon-wrap.accent-green {
    background: rgba(34, 197, 94, 0.12);
}

.feature-icon-wrap.accent-green .material-symbols-rounded {
    color: #22C55E;
}

.feature-icon-wrap.accent-purple {
    background: rgba(168, 85, 247, 0.12);
}

.feature-icon-wrap.accent-purple .material-symbols-rounded {
    color: #A855F7;
}

.feature-icon-wrap.accent-amber {
    background: rgba(245, 158, 11, 0.12);
}

.feature-icon-wrap.accent-amber .material-symbols-rounded {
    color: #F59E0B;
}

.feature-icon-wrap.accent-rose {
    background: rgba(244, 63, 94, 0.12);
}

.feature-icon-wrap.accent-rose .material-symbols-rounded {
    color: #F43F5E;
}

.feature-icon-wrap.accent-cyan {
    background: rgba(6, 182, 212, 0.12);
}

.feature-icon-wrap.accent-cyan .material-symbols-rounded {
    color: #06B6D4;
}

.feature-card strong {
    font-size: 0.95rem;
    font-weight: 700;
    color: #E2E8F0;
    line-height: 1.3;
}

.feature-card p {
    font-size: 0.8rem;
    color: #64748B;
    line-height: 1.5;
    margin: 0;
}

@media (max-width: 420px) {
    .features {
        margin-left: -20px;
        margin-right: -20px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

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

/* Mobile */
@media (max-width: 480px) {
    .page {
        padding: 0 20px;
    }

    .header {
        padding: 24px 0 36px;
    }

    .plan-period-btn {
        padding: 8px 4px;
        font-size: 0.75rem;
    }
}

@media (max-width: 420px) {

    .hero,
    .steps {
        margin-left: -20px;
        margin-right: -20px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .footer {
        margin-left: -20px;
        margin-right: -20px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
}

/* ── Payment page ──────────────────────────────────────────────────── */

.payment-loading {
    text-align: center;
    padding: 48px 0;
    color: #64748B;
    font-size: 0.95rem;
}

.payment-error {
    text-align: center;
    padding: 48px 0;
    color: #F87171;
}

.payment-error .material-symbols-rounded {
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
}

.payment-error p {
    font-size: 1rem;
    color: #94A3B8;
}

.payment-card {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 28px 24px;
    margin-top: 8px;
}

.payment-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.payment-plan-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #F1F5F9;
}

.payment-back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #64748B;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s;
}

.payment-back-link .material-symbols-rounded {
    font-size: 18px;
}

.payment-back-link:hover {
    color: #CBD5E1;
}

.payment-plan-desc {
    font-size: 0.9rem;
    color: #64748B;
    margin-bottom: 4px;
}

.payment-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 20px 0;
}

.payment-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    color: #94A3B8;
    padding: 6px 0;
}

.payment-row-discount span:last-child {
    color: #22C55E;
}

.payment-row-total {
    font-size: 1.15rem;
    font-weight: 700;
    color: #F1F5F9;
    padding: 12px 0;
}

.payment-note {
    font-size: 0.8rem;
    color: #475569;
    margin-top: 4px;
    margin-bottom: 8px;
}



.payment-submit-btn {
    width: 100%;
    justify-content: center;
    margin-top: 20px;
    padding: 16px 28px;
    font-size: 1.05rem;
    border: none;
    cursor: pointer;
}

.payment-submit-btn .material-symbols-rounded {
    font-size: 20px;
}

.payment-secure {
    text-align: center;
    margin-top: 16px;
    font-size: 0.75rem;
    color: #475569;
}

/* ── Terms checkbox ────────────────────────────────────────────────── */

.payment-terms-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 16px 0 4px;
    font-size: 0.8rem;
    color: #94A3B8;
    cursor: pointer;
    line-height: 1.4;
}

.payment-terms-label input[type="checkbox"] {
    margin-top: 2px;
    accent-color: #3B82F6;
    flex-shrink: 0;
}

.payment-terms-label a {
    color: #60A5FA;
    text-decoration: underline;
}

.payment-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── Payment success ───────────────────────────────────────────────── */

.payment-success-block {
    text-align: center;
    padding: 32px 0;
}

.payment-success-icon {
    font-size: 64px;
    color: #22C55E;
    display: block;
    margin-bottom: 20px;
}

.payment-success-text {
    font-size: 1rem;
    color: #94A3B8;
    line-height: 1.7;
    margin: 16px 0 32px;
}



/* ── Payment details block ─────────────────────────────────────────── */

.payment-details-block {
    margin-bottom: 12px;
}

.payment-details-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #CBD5E1;
    margin-bottom: 8px;
}

.payment-details-title .material-symbols-rounded {
    font-size: 18px;
    color: #3B82F6;
}

.payment-discount {
    color: #22C55E;
}

/* ── Upgrade page ──────────────────────────────────────────────────── */

.upgrade-expiry {
    text-align: center;
    font-size: 0.9rem;
    color: #94A3B8;
    margin-bottom: 24px;
    padding: 12px 20px;
    background: rgba(59, 130, 246, 0.08);
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.15);
}

/* ── Period selector ───────────────────────────────────────────────── */

.period-selector {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 24px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.period-btn {
    flex: 1;
    padding: 10px 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #94A3B8;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.period-btn:hover {
    border-color: rgba(59, 130, 246, 0.4);
    color: #CBD5E1;
}

.period-btn.active {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.5);
    color: #F1F5F9;
}

.period-discount {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    color: #22C55E;
    margin-left: 2px;
}

.period-locked {
    text-align: center;
    font-size: 0.85rem;
    color: #64748B;
    margin-bottom: 20px;
    font-weight: 500;
}

.upgrade-plans-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 480px;
    margin: 0 auto;
}

/* Analytics page */
.analytics-page-main {
    max-width: 880px;
    margin: 0 auto;
    padding: 24px 20px 40px;
    position: relative;
    min-height: 100vh;
}

.analytics-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}
.analytics-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #F1F5F9;
    font-weight: 700;
    font-size: 1.1rem;
}
.analytics-logo img { height: 28px; }
.analytics-header-link {
    color: #94A3B8;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}
.analytics-header-link:hover { color: #F1F5F9; }

.analytics-footer {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(148,163,184,0.08);
    color: #475569;
    font-size: 0.75rem;
}

.analytics-title-section {
    margin-bottom: 28px;
}
.analytics-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.analytics-title-row h2 {
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, #60A5FA, #34D399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.analytics-live-dot {
    display: inline-block;
    width: 8px; height: 8px;
    background: #22C55E;
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
    margin-left: 4px;
    vertical-align: middle;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
    50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(34,197,94,0); }
}
.analytics-subtitle {
    color: #64748B;
    font-size: 0.8rem;
    margin-top: 4px;
}

.bot-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 18px;
    background: rgba(30,41,59,0.5);
    border: 1px solid rgba(148,163,184,0.08);
    border-radius: 12px;
    margin-bottom: 24px;
}
.bot-info-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #94A3B8;
}
.bot-info-item .material-symbols-rounded {
    font-size: 1.1rem;
    color: #64748B;
}
.bot-info-item a {
    color: #60A5FA;
    text-decoration: none;
    font-weight: 500;
}
.bot-info-item a:hover {
    text-decoration: underline;
}
.bot-info-sep {
    display: none;
}

.status-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}
.status-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-radius: 12px;
    border: 1px solid rgba(148,163,184,0.08);
    background: rgba(30,41,59,0.4);
    transition: border-color 0.2s;
}
.status-item:hover {
    border-color: rgba(148,163,184,0.16);
}
.status-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.status-dot.new { background: #A78BFA; box-shadow: 0 0 8px rgba(167,139,250,0.3); }
.status-dot.waiting { background: #FACC15; box-shadow: 0 0 8px rgba(250,204,21,0.3); }
.status-dot.in-progress { background: #3B82F6; box-shadow: 0 0 8px rgba(59,130,246,0.3); }
.status-dot.closed { background: #22C55E; box-shadow: 0 0 8px rgba(34,197,94,0.3); }
.status-count {
    font-size: 1.5rem;
    font-weight: 700;
    color: #F1F5F9;
    line-height: 1;
}
.status-label {
    font-size: 0.75rem;
    color: #94A3B8;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.status-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.metrics-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}
.metric {
    padding: 18px 16px;
    border-radius: 12px;
    border: 1px solid rgba(148,163,184,0.08);
    background: rgba(30,41,59,0.4);
    transition: border-color 0.2s;
}
.metric:hover {
    border-color: rgba(148,163,184,0.16);
}
.metric-label {
    font-size: 0.7rem;
    color: #64748B;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.metric-label .material-symbols-rounded {
    font-size: 0.9rem;
}
.metric-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #F1F5F9;
    line-height: 1.1;
}
.metric-unit {
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748B;
    margin-left: 3px;
}
.metric-sub {
    font-size: 0.72rem;
    color: #475569;
    margin-top: 4px;
}
.metric-stars {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-top: 6px;
}
.metric-stars .material-symbols-rounded {
    font-size: 0.9rem;
}
.star-filled { color: #FACC15; }
.star-empty { color: #334155; }

.locked-section {
    position: relative;
    margin-bottom: 24px;
}
.locked-blur {
    filter: blur(6px);
    pointer-events: none;
    user-select: none;
    opacity: 0.5;
}
.locked-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    z-index: 2;
}
.locked-overlay .material-symbols-rounded {
    font-size: 2rem;
    color: #64748B;
}
.locked-overlay p {
    color: #94A3B8;
    font-size: 0.85rem;
    text-align: center;
    max-width: 320px;
}
.unlock-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.unlock-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(59,130,246,0.3);
}

/* Admin dashboard page */
.admin-page-main {
    max-width: 960px;
    margin: 0 auto;
    padding: 1.5rem 20px 40px;
    position: relative;
    z-index: 1;
    min-height: 100vh;
    font-family: Inter, sans-serif;
    color: #E2E8F0;
}
.ad-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.ad-header h1 { font-size: 1.5rem; margin: 0; color: #F1F5F9; display: flex; align-items: center; gap: .5rem; }
.ad-h-icon { font-size: 1.6rem; color: #3B82F6; }
.ad-header-actions { display: flex; align-items: center; gap: .75rem; }
.ad-live-dot { width: 10px; height: 10px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 8px rgba(34,197,94,0.6); animation: ad-pulse 2s ease-in-out infinite; }
@keyframes ad-pulse { 0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(34,197,94,0.6); } 50% { opacity: 0.5; box-shadow: 0 0 3px rgba(34,197,94,0.3); } }
.ad-section-title { font-size: 1rem; color: #94A3B8; margin: 1.8rem 0 .75rem; font-weight: 600; display: flex; align-items: center; gap: .4rem; }
.ad-section-title .material-symbols-rounded { font-size: 1.2rem; color: #3B82F6; }
.ad-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; margin-bottom: 1.5rem; }
.ad-card { background: rgba(30,41,59,0.7); backdrop-filter: blur(8px); border: 1px solid rgba(148,163,184,0.08); border-radius: 14px; padding: 1rem 1rem .85rem; text-align: center; transition: border-color 0.2s, transform 0.15s; }
.ad-card:hover { border-color: rgba(59,130,246,0.3); transform: translateY(-2px); }
.ad-card-icon { font-size: 1.5rem; color: #3B82F6; display: block; margin-bottom: .35rem; }
.ad-card .ad-val { font-size: 1.8rem; font-weight: 800; background: linear-gradient(135deg, #3B82F6, #22C55E); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.ad-card .ad-lbl { font-size: .75rem; color: #64748B; margin-top: .25rem; }
.ad-chart-wrap { background: rgba(30,41,59,0.7); backdrop-filter: blur(8px); border: 1px solid rgba(148,163,184,0.08); border-radius: 14px; padding: 1rem; margin-bottom: 1rem; }
.ad-chart-wrap canvas { width: 100% !important; height: 260px; }
.ad-panel { background: rgba(30,41,59,0.5); border: 1px solid rgba(148,163,184,0.06); border-radius: 14px; padding: .75rem 1rem; }
.ad-panel .ad-section-title { margin-top: .5rem; }
.ad-table { width: 100%; border-collapse: collapse; margin-bottom: .5rem; }
.ad-table th, .ad-table td { text-align: left; padding: .45rem .6rem; border-bottom: 1px solid rgba(148,163,184,0.06); font-size: .85rem; }
.ad-table th { color: #64748B; font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }
.ad-table td { color: #CBD5E1; }
.ad-table tr:last-child td { border-bottom: none; }
.ad-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; color: #94A3B8; }
.ad-label { font-size: .7rem; color: #64748B; margin-left: .35rem; padding: .1rem .4rem; background: rgba(148,163,184,0.08); border-radius: 4px; }
.ad-refresh { background: rgba(59,130,246,0.15); color: #3B82F6; border: 1px solid rgba(59,130,246,0.25); border-radius: 10px; width: 38px; height: 38px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.15s; }
.ad-refresh:hover { background: rgba(59,130,246,0.25); }
.ad-refresh .material-symbols-rounded { font-size: 1.2rem; }
.ad-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: .5rem; }
@media (max-width: 700px) { .ad-row2 { grid-template-columns: 1fr; } }
.admin-loading { text-align: center; padding: 4rem; color: #64748B; font-size: 1.1rem; }

.analytics-loading {
    text-align: center;
    padding: 60px 0;
    color: #64748B;
}
.analytics-error {
    text-align: center;
    padding: 60px 0;
    color: #F87171;
}
.analytics-error .material-symbols-rounded {
    font-size: 2rem;
    display: block;
    margin-bottom: 8px;
}

@media (max-width: 520px) {
    .analytics-title-row h2 { font-size: 1.3rem; }
    .bot-info { gap: 10px; padding: 12px 14px; }
    .bot-info-sep { display: none; }
    .status-bar { grid-template-columns: 1fr; }
    .metrics-row { grid-template-columns: 1fr 1fr; }
    .metric-value { font-size: 1.3rem; }
}

.upgrade-plan-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 16px;
    padding: 20px 24px;
    transition: border-color 0.2s;
}

.upgrade-plan-card.current {
    border-color: rgba(59, 130, 246, 0.4);
    background: rgba(59, 130, 246, 0.06);
}

.upgrade-plan-card.current.available {
    border-color: rgba(59, 130, 246, 0.4);
    background: rgba(59, 130, 246, 0.06);
}

.upgrade-plan-card.current.available:hover {
    border-color: rgba(59, 130, 246, 0.6);
}

.upgrade-plan-card.available {
    border-color: rgba(34, 197, 94, 0.3);
}

.upgrade-plan-card.available:hover {
    border-color: rgba(34, 197, 94, 0.6);
}

.upgrade-plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.upgrade-plan-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #F1F5F9;
}

.upgrade-plan-price {
    font-size: 0.95rem;
    font-weight: 600;
    color: #94A3B8;
}

.upgrade-plan-features {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #64748B;
    margin-bottom: 16px;
}

.upgrade-plan-features .material-symbols-rounded {
    font-size: 18px;
}

.upgrade-plan-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #3B82F6 0%, #22C55E 35%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    text-decoration: none;
}

.upgrade-plan-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.upgrade-plan-btn.renew {
    background: linear-gradient(135deg, #3B82F6 65%, #22C55E 100%);
}

/* ── Inline period selector (per-card) ─────────────────────────── */
.plan-period-selector {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    animation: slideDown 0.2s ease;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.plan-period-btn {
    flex: 1;
    padding: 10px 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #94A3B8;
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    line-height: 1.3;
}

.plan-period-btn:hover {
    border-color: rgba(59, 130, 246, 0.5);
    color: #CBD5E1;
    background: rgba(59, 130, 246, 0.08);
}

.plan-period-btn .period-discount {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    color: #22C55E;
    margin-top: 2px;
}

.upgrade-plan-badge {
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: #3B82F6;
    padding: 10px 0;
}

.upgrade-plan-badge.unavailable {
    color: #475569;
}

.upgrade-plan-card.current .upgrade-plan-badge {
    background: rgba(59, 130, 246, 0.12);
    border-radius: 8px;
    padding: 10px 16px;
}

.upgrade-plan-expiry {
    font-size: 0.8rem;
    color: #64748B;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.upgrade-plan-expiry .material-symbols-rounded {
    font-size: 16px;
}