:root {
    --events-ink: #102a4f;
    --events-blue: #31567f;
    --events-sky: #e8f4f7;
    --events-line: #dce6ee;
    --events-surface: #f7fafc;
    --events-paid: #8a5a20;
}

.events-shell { background: var(--events-surface); min-height: 70vh; }
.events-container { width: min(1440px, 100%); margin: 0 auto; padding: 2rem clamp(1rem, 3vw, 3rem) 3rem; }
.events-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(1.15rem, 2.2vw, 1.85rem);
    border: 1px solid #dce6f4;
    border-radius: 22px;
    background: linear-gradient(135deg, #fbfcff 0%, #f1f6ff 64%, #eaf8f4 100%);
    box-shadow: 0 14px 38px rgba(7, 50, 124, .065);
}
.events-hero::after {
    content: "";
    position: absolute;
    width: 150px;
    height: 150px;
    right: -52px;
    top: -68px;
    border-radius: 50%;
    background: rgba(25, 176, 126, .11);
}
.events-hero > * { position: relative; z-index: 1; }
.events-eyebrow { display: inline-flex; align-items: center; gap: .5rem; padding: .36rem .65rem; border-radius: 999px; background: #e0f5ed; color: #08744f; font-size: .76rem; font-weight: 700; letter-spacing: .02em; }
.events-title { color: #071d3f; font-size: clamp(1.65rem, 2.25vw, 2rem); line-height: 1.08; font-weight: 750; max-width: 760px; margin: .72rem 0 .42rem; letter-spacing: -.035em; }
.events-lead { color: #526477; max-width: 760px; margin: 0; font-size: clamp(.86rem, 1.1vw, .95rem); line-height: 1.5; }
.events-filter-card, .events-panel, .event-card, .event-detail-card {
    background: #fff; border: 1px solid var(--events-line); border-radius: 22px;
}
.events-filter-card { padding: 1rem; margin-top: 1.25rem; }
.events-filter-card .form-control, .events-filter-card .form-select { min-height: 46px; border-color: var(--events-line); border-radius: 13px; }
.events-filter-card .btn { min-height: 46px; border-radius: 13px; }
.events-results-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin: 2rem 0 1rem; }
.event-filter-grid { display: grid; grid-template-columns: minmax(230px, 1.7fr) repeat(4, minmax(145px, 1fr)) minmax(120px, .7fr); gap: .65rem; align-items: end; }
.event-filter-label { display: block; margin: 0 0 .3rem .15rem; color: #40546b; font-size: .72rem; font-weight: 750; }
.event-filter-footer { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: .8rem; }
.event-type-chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.event-filter-chip { min-height: 34px !important; padding: .38rem .85rem; color: #40546b; background: #fff; border: 1px solid #cfdae4; border-radius: 999px !important; font-size: .78rem; font-weight: 700; }
.event-filter-chip:hover, .event-filter-chip.is-active { color: #fff; background: var(--events-ink); border-color: var(--events-ink); }
.event-filter-clear { color: #526477; font-size: .8rem; font-weight: 700; text-decoration: none; }
.event-filter-clear:hover { color: var(--events-ink); }
.event-catalog-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.event-catalog-grid + .vk-pagination { border-top: 0; }
.event-card-shell { position: relative; min-width: 0; height: 100%; }
.event-card-link { display: block; min-width: 0; height: 100%; color: inherit; text-decoration: none; }
.event-card { overflow: hidden; height: 100%; display: flex; flex-direction: column; border-color: #e3e9f0; border-radius: 20px; box-shadow: 0 8px 24px rgba(15, 35, 65, .055); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.event-card:hover { transform: translateY(-3px); border-color: #d6e1e9; box-shadow: 0 16px 36px rgba(16, 42, 79, .1); }
.event-card-visual { position: relative; aspect-ratio: 4 / 3; min-height: 0; padding: .75rem; display: flex; align-items: flex-start; justify-content: space-between; overflow: hidden; background: linear-gradient(145deg, #d9edf0, #edf4f8 55%, #dce7f0); }
.event-card-visual > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.event-card:hover .event-card-visual > img { transform: scale(1.035); }
.event-card-visual > *:not(img) { position: relative; z-index: 1; }
.event-date-tile { width: 52px; background: rgba(255,255,255,.95); border: 1px solid rgba(49,86,127,.12); border-radius: 13px; padding: .45rem; text-align: center; color: var(--events-ink); box-shadow: 0 3px 10px rgba(16,42,79,.08); }
.event-date-tile strong { display: block; font-size: 1.2rem; line-height: 1; }
.event-date-tile span { font-size: .68rem; font-weight: 800; text-transform: uppercase; }
.event-type-badge { border-radius: 999px; padding: .38rem .68rem; font-size: .7rem; font-weight: 800; letter-spacing: .04em; background: #fff; color: #247067; }
.event-type-badge.is-paid { color: var(--events-paid); background: #fff7e9; }
.event-card-body { flex: 1; display: flex; flex-direction: column; padding: 1rem; }
.event-card-heading { min-width: 0; }
.event-card-title { min-height: 2.5em; color: #0b1f3a; font-size: 1.02rem; line-height: 1.25; font-weight: 780; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.event-card-category { display: block; margin-top: .25rem; color: #64748b; font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.event-card-facts { display: grid; gap: .32rem; margin-top: .65rem; color: #526477; font-size: .76rem; }
.event-card-facts span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.event-card-facts i { width: 17px; color: var(--events-blue); }
.event-card-trust { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .72rem; }
.event-card-trust span { display: inline-flex; align-items: center; gap: .28rem; max-width: 100%; padding: .27rem .55rem; color: #1f665d; background: #e7f6ef; border-radius: 999px; font-size: .66rem; font-weight: 750; line-height: 1.2; }
.event-card-trust span.is-payment { color: #fff; background: #17385f; }
.event-card-footer { display: flex; align-items: end; justify-content: space-between; gap: .7rem; margin-top: auto; padding-top: .82rem; }
.event-publisher-badge { min-width: 0; color: #526477; font-size: .7rem; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.event-publisher-badge i { margin-right: .25rem; }
.event-card-price { flex: 0 0 auto; color: var(--events-ink); font-size: .9rem; line-height: 1.15; text-align: right; }
.event-card-price span { display: block; margin-bottom: .13rem; color: #7a8897; font-size: .62rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.event-card-price.is-free { color: #247067; }
.event-card-visual .event-type-badge { position: absolute; right: .75rem; bottom: .75rem; }
.event-favorite-button { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-width: 44px; min-height: 44px; color: #40546b; background: rgba(255,255,255,.96); border: 1px solid rgba(16,42,79,.14); border-radius: 999px; box-shadow: 0 6px 18px rgba(16,42,79,.14); transition: color .16s ease, transform .16s ease, background .16s ease; }
.event-favorite-button:hover { color: #c3264a; transform: translateY(-1px); background: #fff; }
.event-favorite-button:focus-visible { outline: 3px solid rgba(49,86,127,.28); outline-offset: 2px; }
.event-favorite-button.is-saved { color: #d22750; }
.event-favorite-button[aria-busy="true"] { opacity: .65; pointer-events: none; }
.event-favorite-button--card { position: absolute; top: .75rem; right: .75rem; z-index: 4; }
.event-favorite-button--detail { padding: .55rem 1rem; box-shadow: none; font-weight: 700; }
.event-card-meta { color: #64748b; font-size: .84rem; }
.event-card-copy { color: #526477; font-size: .9rem; margin: .8rem 0 1rem; }
.events-empty { text-align: center; padding: clamp(2.5rem, 6vw, 5rem) 1rem; }
.events-empty-icon { width: 64px; height: 64px; border-radius: 20px; display: inline-flex; align-items: center; justify-content: center; background: var(--events-sky); color: var(--events-blue); font-size: 1.5rem; }
.event-detail-cover { min-height: clamp(170px, 20vw, 240px); border-radius: 28px; background: linear-gradient(145deg, #cfe8eb, #edf4f8 58%, #d8e5ef); background-size: cover; background-position: center; display: flex; align-items: end; padding: clamp(1.2rem, 3vw, 2.5rem); }
.event-detail-cover.has-cover { min-height: clamp(240px, 36vw, 470px); }
.event-detail-cover h1 { color: #071d3f; max-width: 850px; }
.event-detail-cover[style] h1, .event-detail-cover[style] p { color: #fff !important; }
.event-detail-card { padding: clamp(1.2rem, 3vw, 2rem); }
.event-media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .85rem; }
.event-media-item { overflow: hidden; border: 1px solid var(--events-line); border-radius: 16px; background: #fff; }
.event-media-preview { position: relative; min-height: 140px; background: #f3f7fa; }
.event-media-preview img { width: 100%; height: 165px; object-fit: cover; }
.event-media-cover-badge { position: absolute; top: .65rem; left: .65rem; border-radius: 999px; padding: .32rem .62rem; color: #183c63; background: rgba(255,255,255,.94); font-size: .72rem; font-weight: 750; }
.event-media-editor { padding: .8rem; }
.event-media-actions { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.event-media-actions form { margin: 0; }
.event-media-actions .btn { display: inline-flex; align-items: center; gap: .35rem; }
.event-media-video { min-height: 140px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; padding: 1rem; text-align: center; color: var(--events-navy); }
.event-detail-video { display: block; width: 100%; max-height: 520px; border-radius: 16px; background: #071d3f; }
.event-public-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.event-public-gallery figure { margin: 0; overflow: hidden; border: 1px solid var(--events-line); border-radius: 16px; background: #f7fafc; }
.event-public-gallery img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.event-public-gallery figcaption { padding: .55rem .7rem; color: #526477; font-size: .78rem; }
.event-fact { display: flex; gap: .8rem; padding: .85rem 0; border-bottom: 1px solid #edf1f5; }
.event-fact:last-child { border-bottom: 0; }
.event-fact i { color: var(--events-blue); width: 22px; margin-top: .2rem; }
.events-status { display: inline-flex; align-items: center; border-radius: 999px; padding: .28rem .6rem; font-size: .72rem; font-weight: 750; background: #eef2f6; color: #40546b; }
.event-editor-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.event-editor-step { display: flex; align-items: center; gap: .7rem; min-width: 0; padding: .85rem 1rem; border: 1px solid var(--events-line); border-radius: 16px; color: #64748b; background: #fff; }
.event-editor-step > span { width: 32px; height: 32px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #526477; background: #eef2f6; font-weight: 800; }
.event-editor-step strong, .event-editor-step small { display: block; }
.event-editor-step small { margin-top: .08rem; font-size: .72rem; }
.event-editor-step.is-complete, .event-editor-step.is-current { color: var(--events-ink); border-color: #bad9dd; background: #f3faf9; }
.event-editor-step.is-complete > span, .event-editor-step.is-current > span { color: #fff; background: #397b7d; }
.event-guidance, .event-review-callout { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.15rem; border: 1px solid #cfe3e6; border-radius: 18px; background: #f2f9f9; }
.event-guidance > i { width: 42px; height: 42px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; border-radius: 13px; color: #315f72; background: #dceff1; font-size: 1.15rem; }
.event-guidance p, .event-review-callout p { color: #526477; font-size: .84rem; }
.event-media-section { scroll-margin-top: 110px; border-color: #cfe3e6; box-shadow: 0 12px 34px rgba(16, 42, 79, .05); }
.event-media-upload { padding: 1rem; border: 1px dashed #aacbd1; border-radius: 16px; background: #f8fbfc; }
.event-review-callout { justify-content: space-between; }
.event-dashboard-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.event-dashboard-stat { display: flex; align-items: center; gap: .8rem; min-width: 0; padding: 1rem; color: #526477; text-decoration: none; border: 1px solid var(--events-line); border-radius: 18px; background: #fff; }
.event-dashboard-stat > i { width: 38px; height: 38px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; color: var(--events-blue); background: var(--events-sky); }
.event-dashboard-stat strong, .event-dashboard-stat small { display: block; }
.event-dashboard-stat strong { color: var(--events-ink); font-size: 1.25rem; line-height: 1; }
.event-dashboard-stat small { margin-top: .18rem; }
.event-dashboard-stat:hover, .event-dashboard-stat.is-active { border-color: #91bdc2; background: #f4faf9; }
.event-dashboard-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.event-state-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.event-state-chips .event-filter-chip { text-decoration: none; }
.event-state-chips .event-filter-chip span { margin-left: .25rem; opacity: .8; }
.event-dashboard-title { display: flex; align-items: center; gap: .7rem; min-width: 210px; }
.event-dashboard-thumb { width: 54px; height: 44px; flex: 0 0 auto; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; color: #7890a4; background: #edf3f6; }
.event-dashboard-thumb img { width: 100%; height: 100%; object-fit: cover; }
.events-status.status-published, .events-status.status-reactivated { color: #176343; background: #e5f6ee; }
.events-status.status-pending_review, .events-status.status-under_review, .events-status.status-pending_update { color: #725018; background: #fff3d7; }
.events-status.status-changes_requested { color: #8a3d2c; background: #fdebe6; }
.event-free-confirmation { display: flex; align-items: center; gap: .7rem; padding: .8rem .9rem; border: 1px solid #b7dfcf; border-radius: 14px; color: #176343; background: #f1fbf6; }
.event-free-confirmation i { font-size: 1.1rem; }
.event-free-confirmation strong, .event-free-confirmation small { display: block; }
.event-free-confirmation small { color: #526477; }
.event-detail-actions { display: grid; gap: .55rem; }
.event-detail-actions .btn { display: flex; align-items: center; justify-content: flex-start; gap: .55rem; text-align: left; }
.event-social-links { display: flex; justify-content: center; gap: .55rem; }
.event-social-links .btn { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.event-analytics-periods { display: flex; flex-wrap: wrap; gap: .45rem; }
.event-analytics-periods .event-filter-chip { text-decoration: none; }
.event-analytics-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .75rem; }
.event-analytics-grid article { display: flex; align-items: center; gap: .75rem; min-width: 0; padding: 1rem; border: 1px solid var(--events-line); border-radius: 18px; background: #fff; }
.event-analytics-grid i { width: 38px; height: 38px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; color: var(--events-blue); background: var(--events-sky); }
.event-analytics-grid strong, .event-analytics-grid span { display: block; }
.event-analytics-grid strong { color: var(--events-ink); font-size: 1.3rem; line-height: 1; }
.event-analytics-grid span { margin-top: .18rem; color: #64748b; font-size: .76rem; }
.event-analytics-list > div { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1rem; border-top: 1px solid #edf1f5; }
.event-analytics-list > div:first-child { border-top: 0; }
.event-analytics-list span { color: #526477; }
.event-analytics-list strong { color: var(--events-ink); white-space: nowrap; }
.events-panel { overflow: hidden; }
.events-panel-head { padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--events-line); }
.events-table th { color: #64748b; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.events-table td { vertical-align: middle; }
.check-in-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--events-line); background: #fff; }
.check-in-stats > div { min-width: 0; padding: 1rem 1.25rem; border-right: 1px solid var(--events-line); }
.check-in-stats > div:last-child { border-right: 0; }
.check-in-stats strong { display: block; color: var(--events-ink); font-size: 1.5rem; line-height: 1.1; }
.check-in-stats span { color: #64748b; font-size: .8rem; }
.check-in-camera { position: relative; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; background: #071d3f; }
.check-in-camera video { width: 100%; height: 100%; object-fit: cover; }
.check-in-frame { position: absolute; inset: 18%; border: 3px solid rgba(255, 255, 255, .9); box-shadow: 0 0 0 999px rgba(7, 29, 63, .36); pointer-events: none; }
.check-in-result { display: flex; align-items: center; gap: .85rem; margin-bottom: 1rem; padding: 1rem; border: 1px solid; }
.check-in-result i { font-size: 1.6rem; }
.check-in-result strong, .check-in-result span { display: block; }
.check-in-result.is-valid { color: #155e3b; border-color: #9bd2b5; background: #eefaf3; }
.check-in-result.is-invalid { color: #9f2d2d; border-color: #efb0b0; background: #fff3f3; }
.event-sales-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--events-line); background: #fff; }
.event-sales-stats > div { min-width: 0; padding: 1.15rem; border-right: 1px solid var(--events-line); }
.event-sales-stats > div:last-child { border-right: 0; }
.event-sales-stats span, .event-sales-stats small { display: block; color: #64748b; }
.event-sales-stats span { font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.event-sales-stats strong { display: block; margin: .25rem 0; color: var(--events-ink); font-size: 1.45rem; }
.event-reconciliation-alert { padding: 1rem 1.25rem; color: #7a5200; border: 1px solid #eed28b; background: #fff9e8; }
.event-reconciliation-alert ul { padding-left: 1.15rem; font-size: .85rem; }
.events-access-shell { width: min(980px, 100%); margin: 0 auto; }
.events-access-status { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.15rem; border: 1px solid; border-radius: 18px; }
.events-access-status p { color: #526477; font-size: .88rem; }
.events-access-status-icon { width: 42px; height: 42px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; border-radius: 13px; }
.events-access-status.is-pending { border-color: #ead9a4; background: #fffbef; }
.events-access-status.is-pending .events-access-status-icon { color: #8a5a20; background: #fff0c7; }
.events-access-status.is-approved { border-color: #b7dfcf; background: #f1fbf6; }
.events-access-status.is-approved .events-access-status-icon { color: #247067; background: #dff4e9; }
.events-access-status.is-rejected { border-color: #d7e1ea; background: #f7fafc; }
.events-access-status.is-rejected .events-access-status-icon { color: var(--events-blue); background: #e5eff7; }
.event-application-list { display: grid; }
.event-application-row { display: grid; grid-template-columns: minmax(180px, 1.1fr) minmax(150px, .8fr) minmax(210px, 1.4fr) minmax(280px, 1.6fr); gap: 1rem; align-items: center; padding: 1rem 1.25rem; border-top: 1px solid #edf1f5; }
.event-application-row:first-child { border-top: 0; }
.event-application-main span, .event-application-main small, .event-application-place small { display: block; color: #64748b; font-size: .76rem; }
.event-application-place { display: flex; gap: .55rem; align-items: center; color: #40546b; font-size: .82rem; }
.event-application-place i { color: var(--events-blue); }
.event-application-copy { margin: 0; color: #526477; font-size: .8rem; }
.event-application-actions { display: grid; grid-template-columns: minmax(150px, 1fr) auto auto; gap: .4rem; align-items: center; }

@media (max-width: 1199px) {
    .event-filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .event-filter-search { grid-column: span 2; }
    .event-catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .event-application-row { grid-template-columns: 1fr 1fr; }
    .event-application-actions { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
    .events-container { padding-top: 1rem; }
    .events-hero { padding: 1.1rem; border-radius: 18px; }
    .events-results-head { align-items: stretch; flex-direction: column; }
    .event-filter-grid { grid-template-columns: 1fr; }
    .event-filter-search, .event-filter-submit { grid-column: auto; }
    .event-filter-footer { align-items: flex-start; flex-direction: column; }
    .event-catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
    .event-media-grid, .event-public-gallery { grid-template-columns: 1fr; }
    .event-detail-cover { border-radius: 20px; }
    .check-in-stats > div { padding: .85rem; }
    .check-in-stats strong { font-size: 1.25rem; }
    .event-sales-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .event-sales-stats > div:nth-child(2) { border-right: 0; }
    .event-sales-stats > div:nth-child(-n+2) { border-bottom: 1px solid var(--events-line); }
    .event-application-row { grid-template-columns: 1fr; }
    .event-application-actions { grid-column: auto; grid-template-columns: 1fr 1fr; }
    .event-application-actions .form-control { grid-column: 1 / -1; }
    .event-editor-steps { grid-template-columns: 1fr; gap: .45rem; }
    .event-editor-step { padding: .7rem .8rem; }
    .event-dashboard-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .event-dashboard-head { align-items: flex-start; flex-direction: column; }
    .event-review-callout { align-items: flex-start; flex-direction: column; }
    .event-analytics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
    .event-catalog-grid { grid-template-columns: 1fr; }
    .event-card-visual { aspect-ratio: 16 / 10; }
    .event-card-title { min-height: 0; }
}
