:root {
    --app-bg: #f6f7fb;
    --app-card: #ffffff;
    --app-border: rgba(15, 23, 42, 0.08);
    --app-primary: #2563eb;
    --app-primary-dark: #1d4ed8;
    --app-soft: #eef3ff;
    --app-text: #0f172a;
    --app-muted: #64748b;
    --app-success: #10b981;
    --app-radius: 22px;
}

body {
    background:
        radial-gradient(circle at top left, rgba(49, 94, 234, 0.10), transparent 28rem),
        linear-gradient(180deg, #f8fbff 0%, var(--app-bg) 42%, #eef3f8 100%);
    color: var(--app-text);
    min-height: 100vh;
}

.app-navbar {
    background: rgba(255, 255, 255, .86);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(15, 23, 42, .07);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.brand-mark {
    color: var(--app-primary);
    margin-right: .3rem;
}

.btn-nav {
    color: #334155;
    border: 1px solid #e2e8f0;
    background: #fff;
}

.btn-nav:hover {
    color: var(--app-primary);
    background: var(--app-soft);
    border-color: #bfdbfe;
}

.user-pill {
    color: #334155;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: .35rem .65rem;
    font-size: .84rem;
}

.card,
.hero-card,
.page-head {
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
}

.card {
    border: 1px solid var(--app-border);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06) !important;
}

.card-body {
    padding: 1.35rem;
}

.hero-card,
.page-head {
    background: rgba(255,255,255,.78);
    backdrop-filter: blur(10px);
    padding: 1.4rem;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.eyebrow {
    display: inline-flex;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .72rem;
    font-weight: 700;
    color: var(--app-primary);
    background: var(--app-soft);
    border-radius: 999px;
    padding: .25rem .55rem;
    margin-bottom: .65rem;
}

.event-card {
    transition: transform .16s ease, box-shadow .16s ease;
}

.event-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.11) !important;
}

.stat-card {
    background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
    min-height: 112px;
}

.section-kicker {
    color: var(--app-primary);
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: .35rem;
}

.format-grid {
    display: grid;
    gap: .75rem;
}

.format-option {
    cursor: pointer;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 1rem;
    background: #fff;
    transition: .16s ease;
}

.format-option:hover {
    border-color: #bfdbfe;
    background: #f8fbff;
}

.format-option.active {
    border-color: var(--app-primary);
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
    box-shadow: 0 12px 28px rgba(37, 99, 235, .10);
}

.format-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.format-title {
    display: block;
    font-weight: 800;
    color: var(--app-text);
    margin-bottom: .25rem;
}

.format-description {
    display: block;
    color: var(--app-muted);
    font-size: .88rem;
    line-height: 1.35;
}

.builder-sticky {
    top: 96px;
}

.scenario-builder {
    transition: .16s ease;
}

.scenario-question {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    gap: .6rem;
    align-items: stretch;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: .65rem;
}

.scenario-question-number {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #e0ecff;
    color: var(--app-primary);
    font-weight: 800;
}

.scenario-question textarea {
    min-height: 62px;
    resize: vertical;
}

.scenario-question-actions {
    display: flex;
    gap: .35rem;
    align-items: flex-start;
}

.form-actions-bar {
    position: sticky;
    bottom: 14px;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(14px);
    border: 1px solid var(--app-border);
    border-radius: 18px;
    padding: .85rem 1rem;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .10);
}

.workflow-question-preview {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1rem;
}

.info-box {
    background: #f8fafc;
    border: 1px solid var(--app-border);
    border-radius: 16px;
    padding: .9rem;
    height: 100%;
}

.btn {
    border-radius: 12px;
    font-weight: 600;
}

.btn-primary {
    background: var(--app-primary);
    border-color: var(--app-primary);
}

.btn-primary:hover {
    background: var(--app-primary-dark);
    border-color: var(--app-primary-dark);
}

.form-control,
.form-select {
    border-radius: 12px;
    border-color: #dbe3ef;
}

.badge {
    border-radius: 999px;
    padding: .45em .7em;
}

.table thead th {
    color: var(--app-muted);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 700;
    border-bottom-color: #e5eaf2;
}

.table td {
    border-color: #edf1f7;
}

.progress {
    background: #e8eef7;
    border-radius: 999px;
}

.qr-mini-wrap {
    max-width: 260px;
}

.qr-screen-card {
    background: rgba(255,255,255,.86);
    border: 1px solid var(--app-border);
    border-radius: 28px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .10);
    padding: 3rem 1.5rem;
}

.qr-frame {
    width: min(520px, 90vw);
    background: #fff;
    border-radius: 28px;
    padding: 1.25rem;
    border: 1px solid var(--app-border);
    box-shadow: 0 20px 50px rgba(15, 23, 42, .10);
}

.copy-link-box {
    max-width: 760px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    padding: .8rem 1rem;
    overflow-wrap: anywhere;
}

.copy-toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    background: #0f172a;
    color: #fff;
    padding: .75rem 1rem;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .25);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: .18s ease;
    z-index: 1000;
}

.copy-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.app-footer {
    border-top: 1px solid rgba(15,23,42,.06);
}

@media print {
    .app-navbar,
    .app-footer,
    .btn,
    #copyToast {
        display: none !important;
    }

    body {
        background: #fff;
    }

    .qr-screen-card {
        box-shadow: none;
        border: 0;
    }
}

/* Product auth / landing polish */
.landing-hero {
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, .14), transparent 18rem),
        linear-gradient(135deg, #ffffff 0%, #eef4ff 45%, #f8fafc 100%);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 28px;
    padding: 42px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

@media (max-width: 767px) {
    .landing-hero {
        padding: 28px;
    }

    .scenario-question {
        grid-template-columns: 34px 1fr;
    }

    .scenario-question-actions {
        grid-column: 2;
        justify-content: flex-start;
    }
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 700;
}

.hero-demo-panel,
.feature-card,
.telegram-cta-box,
.auth-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 22px;
}

.hero-demo-panel {
    padding: 22px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.demo-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid #eef2f7;
}

.demo-row:last-child {
    border-bottom: 0;
}

.demo-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.feature-card {
    height: 100%;
    padding: 22px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.feature-icon,
.auth-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #0d6efd;
    color: #ffffff;
    font-weight: 800;
    margin-bottom: 14px;
}

.auth-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    font-size: 24px;
}

.telegram-cta-box {
    padding: 22px;
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
}

.app-navbar .navbar-brand,
.app-navbar .navbar-brand:hover,
.app-navbar .navbar-brand:focus {
    color: #111827 !important;
}

/* Theme switcher */
.theme-switcher {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .25rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, .04);
    border: 1px solid rgba(15, 23, 42, .08);
}

.theme-switcher-label {
    color: var(--app-muted);
    font-size: .78rem;
    font-weight: 700;
    padding: 0 .35rem;
}

.theme-link {
    color: var(--app-muted);
    text-decoration: none;
    font-size: .78rem;
    font-weight: 800;
    border-radius: 999px;
    padding: .32rem .55rem;
    transition: .16s ease;
}

.theme-link:hover {
    color: var(--app-primary);
    background: rgba(37, 99, 235, .08);
}

.theme-link.active {
    color: #fff;
    background: var(--app-primary);
    box-shadow: 0 6px 16px rgba(37, 99, 235, .22);
}

@media (max-width: 575px) {
    .theme-switcher {
        order: 10;
        width: 100%;
        justify-content: center;
    }
}

.event-card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-top-left-radius: var(--bs-card-border-radius, 0.375rem);
    border-top-right-radius: var(--bs-card-border-radius, 0.375rem);
}

.event-hero-image {
    width: 100%;
    max-height: 380px;
    object-fit: cover;
    border-top-left-radius: var(--bs-card-border-radius, 0.375rem);
    border-top-right-radius: var(--bs-card-border-radius, 0.375rem);
}

.event-form-preview {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.12);
}

.event-detail-image-admin {
    width: 100%;
    max-height: 260px;
    object-fit: cover;
    border-top-left-radius: var(--bs-card-border-radius, 0.375rem);
    border-top-right-radius: var(--bs-card-border-radius, 0.375rem);
}

.price-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 16px;
    background: rgba(13, 110, 253, 0.08);
    border: 1px solid rgba(13, 110, 253, 0.16);
}

.price-banner.free {
    background: rgba(25, 135, 84, 0.08);
    border-color: rgba(25, 135, 84, 0.16);
}
