/* ═══════════════════════════════════════════════════════════
   TicketBot Mini App — Telegram-native styles
   Uses Telegram theme variables for dark/light mode support
   ═══════════════════════════════════════════════════════════ */

:root {
    --tg-bg: var(--tg-theme-bg-color, #ffffff);
    --tg-text: var(--tg-theme-text-color, #1a1a1a);
    --tg-hint: var(--tg-theme-hint-color, #999999);
    --tg-link: var(--tg-theme-link-color, #2481cc);
    --tg-button: var(--tg-theme-button-color, #2481cc);
    --tg-button-text: var(--tg-theme-button-text-color, #ffffff);
    --tg-secondary-bg: var(--tg-theme-secondary-bg-color, #f4f4f5);
    --tg-section-bg: var(--tg-theme-section-bg-color, #ffffff);
    --radius: 12px;
    --radius-sm: 8px;

    /* Сдержанный минимализм: акцент + нейтральные поверхности */
    --accent: #5b7cfa;
    --surface: var(--tg-section-bg, #ffffff);
    --border: var(--tg-secondary-bg, #e8e8ea);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.05);
    --badge-green-bg: rgba(46, 204, 113, 0.12);
    --badge-green-text: #1e8e4e;
    --badge-orange-bg: rgba(243, 156, 18, 0.14);
    --badge-orange-text: #b3741a;
    --badge-red-bg: rgba(231, 76, 60, 0.12);
    --badge-red-text: #c0392b;
    --badge-purple-bg: rgba(155, 89, 182, 0.12);
    --badge-purple-text: #7d3c98;
    --badge-gray-bg: rgba(127, 140, 141, 0.12);
    --badge-gray-text: #5f6a6a;
}

/* ═══════════════════════════════════════════════════════════
   VK Mini App — тема. В VK отсутствуют --tg-theme-* переменные
   (их отдаёт только Telegram WebView). Получаем тему через
   VKWebAppGetConfig (appearance/scheme) и переопределяем переменные.
   ═══════════════════════════════════════════════════════════ */

/* VK: светлая тема (по умолчанию для VK — white/light) */
html.vk-theme-light {
    --tg-theme-bg-color: #ffffff;
    --tg-theme-text-color: #1a1a1a;
    --tg-theme-hint-color: #818c99;
    --tg-theme-link-color: #2d81e0;
    --tg-theme-button-color: #2d81e0;
    --tg-theme-button-text-color: #ffffff;
    --tg-theme-secondary-bg-color: #f4f4f5;
    --tg-theme-section-bg-color: #ffffff;
}

/* VK: тёмная тема (space_gray / vkcom_dark) */
html.vk-theme-dark {
    --tg-theme-bg-color: #19191a;
    --tg-theme-text-color: #e1e3e6;
    --tg-theme-hint-color: #76787a;
    --tg-theme-link-color: #71aaeb;
    --tg-theme-button-color: #5b7cfa;
    --tg-theme-button-text-color: #ffffff;
    --tg-theme-secondary-bg-color: #2a2a2b;
    --tg-theme-section-bg-color: #232324;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--tg-bg);
    color: var(--tg-text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ─── App container ─── */

#app {
    max-width: 500px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 70px;
}

/* На десктопе Telegram WebView может быть шире — центрируем */
@media (min-width: 600px) {
    #app {
        border-left: 0.5px solid var(--tg-secondary-bg);
        border-right: 0.5px solid var(--tg-secondary-bg);
    }
}

/* ─── Header ─── */

.header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 16px;
    background: var(--tg-bg);
    border-bottom: 0.5px solid var(--tg-secondary-bg);
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--tg-text);
}

/* ─── Toolbar (deprecated, kept for compat) ─── */

.toolbar {
    display: none;
    z-index: 100;
    min-height: 48px;
}

.toolbar-title {
    font-size: 17px;
    font-weight: 600;
    flex: 1;
    text-align: center;
}

.toolbar-btn {
    background: none;
    border: none;
    color: var(--tg-link);
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: opacity 0.2s;
}

.toolbar-btn:active {
    opacity: 0.6;
}

#backBtn {
    display: none;
}

/* ─── Pages ─── */

.page {
    display: none;
    flex: 1;
    padding-bottom: 24px;
}

.page.active {
    display: block;
}

.page-content {
    padding: 16px;
}

/* ─── Loading ─── */

.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 200;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
}

.loading-overlay.active {
    display: flex;
}

.loading-overlay p {
    color: white;
    font-size: 14px;
}

/* ─── Онбординг: принятие условий (п.1.1.4 Правил VK) ─── */
.onboarding-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 300;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.onboarding-overlay.active {
    display: flex;
}

.onboarding-card {
    background: var(--tg-theme-bg-color, #fff);
    color: var(--tg-theme-text-color, #000);
    border-radius: 16px;
    padding: 24px;
    max-width: 380px;
    width: 100%;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    text-align: center;
}

.onboarding-icon {
    font-size: 42px;
    margin-bottom: 8px;
}

.onboarding-card h2 {
    margin: 8px 0 12px;
    font-size: 20px;
}

.onboarding-text {
    font-size: 14px;
    line-height: 1.5;
    color: var(--tg-theme-hint-color, #888);
    margin-bottom: 12px;
}

/* Возрастные ограничения (п.2.1.5 Правил VK) */
.onboarding-age {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    font-size: 13px;
    color: var(--tg-theme-hint-color, #888);
    background: var(--tg-theme-secondary-bg-color, #f2f3f5);
    border-radius: 10px;
    padding: 8px 12px;
    margin-bottom: 14px;
}

.age-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 6px;
    border: 1.5px solid currentColor;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    color: var(--tg-theme-text-color, #000);
}

.onboarding-terms {
    text-align: left;
    margin-bottom: 16px;
    font-size: 13px;
}

.onboarding-terms p {
    margin: 0 0 6px;
    color: var(--tg-theme-hint-color, #888);
}

.terms-link {
    display: block;
    padding: 8px 0;
    color: var(--tg-theme-link-color, #2481cc);
    text-decoration: underline;
    font-size: 13px;
}

.onboarding-btn {
    width: 100%;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ─── App-owned dialogs ─── */
.app-dialog-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 400;
    align-items: center;
    justify-content: center;
    padding: max(20px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
    background: rgba(0, 0, 0, 0.5);
}

.app-dialog-overlay.active {
    display: flex;
}

.app-dialog-card {
    position: relative;
    width: min(420px, 100%);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 24px;
    border-radius: 16px;
    background: var(--tg-theme-bg-color, #fff);
    color: var(--tg-theme-text-color, #000);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.app-dialog-title {
    margin: 0 28px 12px 0;
    font-size: 19px;
}

.app-dialog-message {
    margin-bottom: 18px;
    color: var(--tg-theme-hint-color, #666);
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.app-dialog-input-wrap {
    display: none;
    margin-bottom: 16px;
}

.app-dialog-input-wrap.active {
    display: block;
}

.app-dialog-input {
    width: 100%;
    box-sizing: border-box;
}

.app-dialog-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.app-dialog-actions .btn {
    flex: 1;
}

.app-dialog-secondary,
.app-dialog-close {
    display: none;
}

.app-dialog-secondary.active,
.app-dialog-close.active {
    display: inline-flex;
}

.app-dialog-close {
    position: absolute;
    top: 8px;
    right: 10px;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--tg-theme-hint-color, #666);
    font-size: 24px;
    cursor: pointer;
}

.app-dialog-close:focus-visible,
.app-dialog-actions .btn:focus-visible,
.app-dialog-input:focus-visible {
    outline: 2px solid var(--tg-theme-link-color, #2481cc);
    outline-offset: 2px;
}

.app-dialog-destructive {
    background: #d64545;
}

/* ─── Toast ─── */

.toast {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: var(--tg-section-bg);
    color: var(--tg-text);
    padding: 10px 20px;
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 300;
    opacity: 0;
    transition: all 0.3s ease;
    font-size: 14px;
    pointer-events: none;
    white-space: nowrap;
}

.toast.active {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-error {
    background: #e74c3c;
    color: white;
}

/* ─── Empty state ─── */

.empty-state {
    text-align: center;
    padding: 48px 16px;
    color: var(--tg-hint);
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--tg-text);
}

/* ─── Buttons ─── */

.btn {
    display: block;
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    transition: opacity 0.2s;
    margin-bottom: 10px;
}

.btn:active {
    opacity: 0.7;
}

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

.btn-primary {
    background: var(--tg-button);
    color: var(--tg-button-text);
}

.btn-secondary {
    background: var(--tg-secondary-bg);
    color: var(--tg-text);
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-disabled {
    background: var(--tg-secondary-bg);
    color: var(--tg-hint);
    cursor: not-allowed;
    opacity: 0.7;
}

.btn-sm {
    padding: 10px 16px;
    font-size: 14px;
    width: auto;
    display: inline-block;
}

.btn-lg {
    padding: 16px 20px;
    font-size: 17px;
    font-weight: 600;
}

/* ─── Event card ─── */

.events-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.event-card {
    background: var(--tg-section-bg);
    border: 1px solid var(--tg-secondary-bg);
    border-radius: var(--radius);
    padding: 16px;
    cursor: pointer;
    transition: transform 0.1s;
}

.event-card:active {
    transform: scale(0.98);
}

.event-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 8px;
}

.event-card-header h3 {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}

.event-card-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.event-info {
    font-size: 13px;
    color: var(--tg-hint);
    white-space: nowrap;
}

.badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
    font-weight: 500;
}

.badge-soldout {
    background: #e74c3c;
    color: white;
}

/* ─── Event detail ─── */

.event-detail h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
}

.event-description {
    color: var(--tg-hint);
    font-size: 15px;
    margin-bottom: 20px;
    line-height: 1.6;
}

.event-meta {
    background: var(--tg-section-bg);
    border: 1px solid var(--tg-secondary-bg);
    border-radius: var(--radius);
    padding: 4px 0;
    margin-bottom: 24px;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--tg-secondary-bg);
}

.meta-row:last-child {
    border-bottom: none;
}

.meta-label {
    color: var(--tg-hint);
}

.buy-section {
    margin-top: 8px;
}

/* ─── Confirm ─── */

.confirm-card {
    text-align: center;
}

.confirm-card h3 {
    font-size: 18px;
    margin-bottom: 20px;
}

.confirm-details {
    background: var(--tg-section-bg);
    border: 1px solid var(--tg-secondary-bg);
    border-radius: var(--radius);
    padding: 4px 0;
    margin-bottom: 24px;
    text-align: left;
}

.confirm-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    font-size: 15px;
    border-bottom: 1px solid var(--tg-secondary-bg);
}

.confirm-row:last-child {
    border-bottom: none;
}

/* ─── Success ─── */

.success-content {
    text-align: center;
    padding-top: 40px;
}

.success-icon {
    font-size: 64px;
    margin-bottom: 16px;
    animation: popIn 0.3s ease;
}

@keyframes popIn {
    0% { transform: scale(0); }
    70% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.success-content h2 {
    font-size: 22px;
    margin-bottom: 20px;
}

.ticket-id-label {
    font-size: 14px;
    color: var(--tg-hint);
    margin-bottom: 8px;
}

.ticket-id {
    display: inline-block;
    background: var(--tg-secondary-bg);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    word-break: break-all;
    cursor: pointer;
    margin-bottom: 8px;
    user-select: all;
}

.hint {
    font-size: 12px;
    color: var(--tg-hint);
    margin-bottom: 24px;
}

.success-content .btn {
    margin-top: 8px;
}

/* ─── Tickets ─── */

.tickets-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ticket-card {
    background: var(--tg-section-bg);
    border: 1px solid var(--tg-secondary-bg);
    border-radius: var(--radius);
    padding: 16px;
}

.ticket-cancelled {
    opacity: 0.6;
}

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

.ticket-event {
    font-weight: 600;
    font-size: 15px;
}

.ticket-status {
    font-size: 13px;
    white-space: nowrap;
}

.ticket-meta {
    font-size: 13px;
    color: var(--tg-hint);
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}

.ticket-meta code {
    font-size: 12px;
    background: var(--tg-secondary-bg);
    padding: 1px 4px;
    border-radius: 3px;
}

/* ─── Error page ─── */

.error-content {
    text-align: center;
    padding-top: 40px;
}

.error-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.error-content h2 {
    font-size: 20px;
    margin-bottom: 8px;
}

.error-content p {
    color: var(--tg-hint);
    margin-bottom: 24px;
}

/* ═══════════════════════════════════════════════════════════
   Личный кабинет + админка
   ═══════════════════════════════════════════════════════════ */

/* ─── Bottom tab bar (horizontal) ─── */

.tab-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--tg-bg);
    border-top: 0.5px solid var(--tg-secondary-bg);
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    z-index: 150;
    padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
}

.tab {
    flex: 1;
    background: none;
    border: none;
    color: var(--tg-hint);
    font-size: 11px;
    padding: 6px 4px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    line-height: 1.2;
}

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

.tab.active {
    color: var(--tg-button);
    font-weight: 600;
}

.tab-label {
    font-size: 10px;
}

/* ─── Dashboard Cards ─── */

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 16px;
}

.dashboard-card {
    background: var(--tg-section-bg);
    border: 0.5px solid var(--tg-secondary-bg);
    border-radius: var(--radius);
    padding: 18px 14px;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.dashboard-card:active {
    background: var(--tg-secondary-bg);
}

.dashboard-card-icon {
    font-size: 32px;
}

.dashboard-card-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--tg-button);
}

.dashboard-card-label {
    font-size: 12px;
    color: var(--tg-hint);
}

/* ─── Section header ─── */

.section-header {
    font-size: 14px;
    font-weight: 600;
    padding: 16px 16px 8px;
    color: var(--tg-text);
}

/* ─── Profile ─── */

.profile-card {
    text-align: center;
    padding: 24px 16px;
    background: var(--tg-section-bg);
    border: 1px solid var(--tg-secondary-bg);
    border-radius: var(--radius);
}

/* Контакты поддержки (п.2.4.1 Правил VK) */
.support-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
    padding: 0;
}
.support-block a.btn {
    text-align: center;
    text-decoration: none;
    margin: 0;
}

.profile-avatar {
    font-size: 56px;
    margin-bottom: 12px;
}

.badge-role {
    background: var(--tg-button);
    color: var(--tg-button-text);
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 12px;
}

/* ─── Admin list ─── */

.admin-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--tg-section-bg);
    border: 1px solid var(--tg-secondary-bg);
    border-radius: var(--radius);
    padding: 12px;
}

.admin-list-item .btn-sm {
    margin-bottom: 0;
    white-space: nowrap;
}

/* ─── Admin menu grid ─── */

.admin-menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.admin-menu-card {
    background: var(--tg-section-bg);
    border: 1px solid var(--tg-secondary-bg);
    border-radius: var(--radius);
    padding: 20px 12px;
    text-align: center;
    cursor: pointer;
    color: var(--tg-text);
    font-size: 14px;
    transition: transform 0.1s;
}

.admin-menu-card:active {
    transform: scale(0.97);
}

.admin-menu-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

/* ─── Badges ─── */

/* Приглушённые бейджи (сдержанный минимализм): мягкий фон + цветной текст */
.badge-published { background: var(--badge-green-bg); color: var(--badge-green-text); }
.badge-draft { background: var(--badge-orange-bg); color: var(--badge-orange-text); }
.badge-off { background: var(--badge-red-bg); color: var(--badge-red-text); }
.badge-tier-pro { background: var(--badge-purple-bg); color: var(--badge-purple-text); }
.badge-tier-basic { background: var(--badge-gray-bg); color: var(--badge-gray-text); }

/* ─── Forms ─── */

.form-field {
    margin-bottom: 14px;
}

.form-label {
    display: block;
    font-size: 13px;
    color: var(--tg-hint);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--tg-secondary-bg);
    border-radius: var(--radius-sm);
    background: var(--tg-section-bg);
    color: var(--tg-text);
    font-size: 15px;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--tg-button);
}

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

/* ─── Stat cards ─── */

.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 12px 0;
}

.stat-card {
    background: var(--tg-section-bg);
    border: 1px solid var(--tg-secondary-bg);
    border-radius: var(--radius);
    padding: 14px;
    text-align: center;
}

.stat-revenue {
    grid-column: 1 / -1;
    background: var(--badge-orange-bg);
    color: var(--badge-orange-text);
    border: 1px solid var(--border);
}

.stat-value {
    font-size: 22px;
    font-weight: 700;
}

.stat-label {
    font-size: 12px;
    color: var(--tg-hint);
    margin-top: 4px;
}

.stat-revenue .stat-label {
    color: rgba(255,255,255,0.9);
}

/* ─── Check-in ─── */

.checkin-box {
    background: var(--tg-section-bg);
    border: 1px solid var(--tg-secondary-bg);
    border-radius: var(--radius);
    padding: 20px;
}

.checkin-result {
    margin-top: 16px;
    padding: 16px;
    border-radius: var(--radius);
    text-align: center;
    font-size: 18px;
    font-weight: 600;
}

.checkin-ok {
    background: #2ecc71;
    color: white;
}

.checkin-warn {
    background: #f39c12;
    color: white;
}

.checkin-fail {
    background: #e74c3c;
    color: white;
}

/* ─── QR modal ─── */

.qr-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.qr-modal-card {
    background: var(--tg-section-bg);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    max-width: 300px;
    width: 100%;
}

.qr-modal-card img {
    display: block;
    margin: 0 auto;
}

/* ─── QR-сканер (камера) ─── */

.qr-scanner-card {
    max-width: 340px;
}

.qr-scanner-video {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius);
    background: #000;
    object-fit: cover;
}

.qr-scanner-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 12px;
}

/* ═══════════════════════════════════════════════════════════
   Редизайн: сдержанный минимализм + постеры
   ═══════════════════════════════════════════════════════════ */

/* Лёгкие тени на карточках вместо плоских бордеров */
.event-card, .ticket-card, .admin-list-item, .profile-card, .confirm-card, .checkin-box, .stat-card {
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border);
}

/* Fade-переход между страницами */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}
.page-enter { animation: fadeIn 0.18s ease; }

/* Аватар из фото Telegram (круглый) */
.profile-avatar-img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    display: inline-block;
    margin-bottom: 8px;
}

/* Постеры мероприятий */
.event-poster {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    border-radius: var(--radius) var(--radius) 0 0;
    margin: -16px -16px 12px;
    width: calc(100% + 32px);
    display: block;
}
.event-poster-detail {
    max-height: 240px;
    border-radius: var(--radius);
    margin: 0 0 12px;
    width: 100%;
}

/* Индикатор активного таба */
.tab.active::after {
    content: "";
    display: block;
    width: 20px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
    margin: 3px auto 0;
}

/* Утилитарные классы (вместо inline-стилей) */
.flex-row { display: flex; gap: 8px; flex-wrap: wrap; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mb-12 { margin-bottom: 12px; }
.pad-16 { padding: 16px; }
.text-hint { color: var(--tg-hint); }
