:root,
[data-theme="light"] {
    --bg: #eef4fb;
    --bg-card: #ffffff;
    --text: #1a2744;
    --text-muted: #5a6b85;
    --primary: #4f6ef7;
    --primary-hover: #3d58d8;
    --border: #d8e2f0;
    --accent: #7c5cff;
    --success-bg: #d9f5e3;
    --success-text: #1f7a43;
    --danger-bg: #fde2e2;
    --danger-text: #b42318;
    --warning-bg: #fff4cc;
    --warning-text: #8a6d00;
    --future-dot: #34c759;
    --shadow: 0 8px 30px rgba(26, 39, 68, 0.08);
}

[data-theme="dark"] {
    --bg: #0f1729;
    --bg-card: #182238;
    --text: #e8eef8;
    --text-muted: #9aa8c0;
    --primary: #6b8cff;
    --primary-hover: #5476f0;
    --border: #2a3855;
    --accent: #9b7bff;
    --success-bg: #1a3d2a;
    --success-text: #6ee7a0;
    --danger-bg: #4a2020;
    --danger-text: #ff8a8a;
    --warning-bg: #3d3618;
    --warning-text: #ffd866;
    --future-dot: #34c759;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }

.app-header {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand { display: flex; gap: 12px; align-items: center; min-width: 0; }

.brand-logo,
.login-logo-img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: contain;
    object-position: center;
    border: 2px solid var(--border);
    background: #fff;
    flex-shrink: 0;
    padding: 3px;
}

.login-logo-img {
    width: 80px;
    height: 80px;
    margin: 0 auto 12px;
    display: block;
    padding: 4px;
}

.brand-title { font-weight: 700; font-size: 1.1rem; }
.brand-sub { color: var(--text-muted); font-size: 0.85rem; }

.header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.header-icon-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.icon { width: 18px; height: 18px; flex-shrink: 0; }

.app-main { max-width: 1200px; margin: 0 auto; padding: 16px; }

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 0.92rem;
    background: var(--primary);
    color: #fff;
}

.btn:hover { background: var(--primary-hover); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-primary { background: var(--primary); }
.btn-danger { background: #e5484d; }
.btn-small { padding: 6px 10px; font-size: 0.82rem; }
.btn-block { width: 100%; }
.inline-form { display: inline; }

.btn-icon {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
}

.btn-icon svg { width: 20px; height: 20px; }
.btn-icon-danger { color: #e5484d; }

.flash-container { max-width: 1200px; margin: 12px auto 0; padding: 0 16px; }
.flash { padding: 10px 14px; border-radius: 10px; margin-bottom: 8px; }
.flash-success { background: var(--success-bg); color: var(--success-text); }
.flash-error { background: var(--danger-bg); color: var(--danger-text); }

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background-color: #b8dcff;
    background-image: url('../img/login-bg.png');
    background-position: center;
    background-size: 420px;
    background-repeat: repeat;
}

.login-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(1px);
    pointer-events: none;
}

.login-card {
    position: relative;
    z-index: 1;
    width: min(420px, 92vw);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 32px 28px;
    box-shadow: 0 20px 60px rgba(26, 39, 68, 0.18);
    text-align: center;
}

.login-sub { color: #5a6b85; margin-bottom: 20px; }
.login-form { text-align: left; }
.login-form label { display: block; margin-bottom: 6px; font-weight: 600; }
.login-form input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #d8e2f0;
    margin-bottom: 14px;
    font-size: 1rem;
}

.login-public-link {
    margin-top: 14px;
    font-size: 0.92rem;
}

.login-public-link a {
    color: #4f6ef7;
    font-weight: 600;
    text-decoration: none;
}

.timeline-section h2,
.calendar-section h2 { margin-top: 0; }

.timeline-wrap {
    overflow-x: auto;
    padding: 12px 0 0;
    -webkit-overflow-scrolling: touch;
}

.timeline-axis {
    position: relative;
    min-width: 100%;
    height: 110px;
}

.timeline-line {
    position: absolute;
    top: 56px;
    left: 100px;
    right: 24px;
    height: 4px;
    background: linear-gradient(90deg, var(--border), var(--future-dot));
    border-radius: 4px;
}

.timeline-today-marker {
    position: absolute;
    left: 16px;
    top: 18px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 72px;
}

.today-emoji { font-size: 1.4rem; line-height: 1; }
.today-date {
    font-size: 0.72rem;
    color: var(--accent);
    font-weight: 700;
    white-space: nowrap;
}

.timeline-events { position: absolute; inset: 0; pointer-events: none; }

.timeline-event {
    position: absolute;
    top: 49px;
    transform: translateX(-50%);
    cursor: pointer;
    pointer-events: auto;
    z-index: 2;
}

.timeline-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--future-dot);
    border: 2px solid var(--bg-card);
}

.timeline-event.pulse .timeline-dot {
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.55);
}

.timeline-active-label {
    width: 100%;
    max-width: 100%;
    margin-top: 6px;
    padding: 0 4px;
    min-height: 1.4em;
    font-size: 0.82rem;
    line-height: 1.35;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.55); transform: scale(1); }
    50% { transform: scale(1.15); }
    70% { box-shadow: 0 0 0 12px rgba(52, 199, 89, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0); transform: scale(1); }
}

.period-buttons { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 8px; }
.period-btn {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    cursor: pointer;
}
.period-btn.active,
.period-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.event-popup {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: grid;
    place-items: center;
    z-index: 200;
}
.event-popup.hidden { display: none; }
.event-popup-content {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 24px;
    width: min(480px, 92vw);
    position: relative;
}
.popup-close {
    position: absolute;
    top: 8px;
    right: 12px;
    border: none;
    background: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: var(--text);
}
.event-popup dl { display: grid; grid-template-columns: 120px 1fr; gap: 8px; }
.event-popup dt { color: var(--text-muted); }

.calendar-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-top: 16px;
}
.cal-weekday {
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 600;
}
.cal-day {
    min-height: 88px;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cal-day:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.cal-day.other-month { opacity: 0.28; pointer-events: none; }
.cal-day.today {
    border-color: var(--accent);
    animation: shimmer 3s ease-in-out infinite;
}
.cal-day.has-events.report-complete { background: var(--success-bg); }
.cal-day.has-events.report-partial { background: var(--warning-bg); }
.cal-day.has-events.report-none { background: var(--danger-bg); }
.cal-day.has-events.report-complete .cal-day-count { color: var(--success-text); }
.cal-day.has-events.report-partial .cal-day-count { color: var(--warning-text); }
.cal-day.has-events.report-none .cal-day-count { color: var(--danger-text); }
@keyframes shimmer {
    0%, 100% { box-shadow: inset 0 0 0 0 rgba(124, 92, 255, 0.08); }
    50% { box-shadow: inset 0 0 0 999px rgba(124, 92, 255, 0.12); }
}
.cal-day-num { font-weight: 700; font-size: 0.9rem; margin-bottom: 6px; }
.cal-day-count {
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}

.day-title { margin: 8px 0 0; }
.back-link { margin-bottom: 8px; display: inline-block; }

.day-events-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.day-event-item {
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}
.day-event-item.report-complete { background: var(--success-bg); border-color: rgba(31, 122, 67, 0.25); }
.day-event-item.report-partial { background: var(--warning-bg); border-color: rgba(138, 109, 0, 0.25); }
.day-event-item.report-none { background: var(--danger-bg); border-color: rgba(180, 35, 24, 0.25); }

.day-event-link {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 8px 14px;
    padding: 14px 16px;
    color: inherit;
}
.day-event-time { font-weight: 700; font-size: 0.95rem; }
.day-event-name { grid-column: 2; font-size: 1rem; font-weight: 600; }
.day-event-dept { grid-column: 2; font-size: 0.82rem; color: var(--text-muted); }

.day-event-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    padding: 0 16px 12px;
    border-top: 1px dashed var(--border);
    margin-top: 0;
}
.day-event-flags .flag-check { font-size: 0.85rem; }
.day-event-tickets {
    padding: 0 16px 14px;
    font-size: 0.86rem;
    color: var(--text-muted);
}

.page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.empty { text-align: center; color: var(--text-muted); padding: 24px; }

.events-cards { display: grid; gap: 14px; }

.event-card {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    background: var(--bg);
}
.event-card.report-complete { background: var(--success-bg); }
.event-card.report-partial { background: var(--warning-bg); }
.event-card.report-none { background: var(--danger-bg); }
.event-card:not(.report-complete):not(.report-partial):not(.report-none) { background: var(--bg-card); }

.event-card-form { display: flex; flex-direction: column; gap: 12px; }

.event-card-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.event-card-fields label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
}
.event-card-fields label.wide { grid-column: 1 / -1; }
.event-card-fields input {
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    font-size: 0.92rem;
}
.event-meta {
    grid-column: 1 / -1;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.event-card-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding-top: 8px;
    border-top: 1px dashed var(--border);
}

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border);
    display: inline-grid;
    place-items: center;
    cursor: pointer;
    background: var(--bg-card);
    color: var(--text);
}
.action-btn svg { width: 18px; height: 18px; }
.action-save { color: var(--primary); border-color: rgba(79, 110, 247, 0.35); }
.action-open { color: #0ea5e9; border-color: rgba(14, 165, 233, 0.35); }
.action-delete { color: #e5484d; border-color: rgba(229, 72, 77, 0.35); }

.detail-grid {
    display: grid;
    grid-template-columns: minmax(90px, 120px) 1fr;
    gap: 10px 16px;
}
.detail-grid dt { color: var(--text-muted); font-weight: 600; }
.detail-grid dd { margin: 0; word-break: break-word; }

.reports-section { margin-top: 24px; }
.report-block { margin-bottom: 18px; padding-top: 8px; border-top: 1px solid var(--border); }
.file-list { list-style: none; padding: 0; margin: 10px 0 0; }
.file-list li {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border);
}
.file-size { color: var(--text-muted); font-size: 0.85rem; }

.file-thumb-link { flex-shrink: 0; }
.file-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
    vertical-align: middle;
}

.concourses-upload { margin-bottom: 16px; }
.concourses-table-wrap { overflow-x: auto; }
.concourses-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 980px;
    font-size: 0.88rem;
}
.concourses-table th,
.concourses-table td {
    border-bottom: 1px solid var(--border);
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
}
.concourses-table th {
    color: var(--text-muted);
    font-weight: 600;
}

.concourse-photos-cell {
    min-width: 120px;
    vertical-align: top;
}
.concourse-photo-form { display: inline-block; margin-bottom: 6px; }
.photo-add-btn { padding: 6px 10px; font-size: 1rem; line-height: 1; }
.concourse-photo-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.concourse-photo-item {
    position: relative;
    display: inline-block;
}
.concourse-photo-item .file-thumb {
    width: 44px;
    height: 44px;
}
.photo-delete-form {
    position: absolute;
    top: -6px;
    right: -6px;
    margin: 0;
}
.photo-delete-btn {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: none;
    background: #e5484d;
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    display: grid;
    place-items: center;
}

.event-flags {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.event-flags h4 { margin: 0 0 12px; font-size: 1rem; }
.flags-form,
.flags-readonly {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
}
.flags-form {
    flex-direction: column;
    align-items: flex-start;
}
.flags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
}
.tickets-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: min(100%, 520px);
    font-weight: 600;
}
.tickets-field textarea {
    width: 100%;
    min-height: 84px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    font: inherit;
    resize: vertical;
}
.tickets-readonly {
    margin: 8px 0 0;
    color: var(--text-muted);
    white-space: pre-wrap;
}
.flag-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    user-select: none;
}
.flags-readonly .flag-check { cursor: default; opacity: 0.95; }
.flag-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}
.flags-readonly .flag-check input[type="checkbox"] { cursor: not-allowed; }

.upload-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 41, 0.45);
    display: grid;
    place-items: center;
    z-index: 300;
}
.upload-overlay.hidden { display: none; }
.upload-panel {
    width: min(420px, 90vw);
    background: var(--bg-card);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow);
}
.upload-title { font-weight: 700; margin-bottom: 14px; }
.upload-bar {
    height: 10px;
    background: var(--border);
    border-radius: 999px;
    overflow: hidden;
}
.upload-bar-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 0.2s ease;
}
.upload-status { margin-top: 10px; color: var(--text-muted); font-size: 0.9rem; }

@media (max-width: 768px) {
    .app-header {
        position: relative;
        padding: 10px 12px 12px;
        padding-right: 92px;
        display: block;
    }

    .brand { padding-right: 0; margin-bottom: 8px; }

    .header-actions {
        width: 100%;
        display: grid;
        gap: 8px;
    }

    .header-icon-actions {
        position: absolute;
        top: 10px;
        right: 12px;
        gap: 6px;
    }

    .btn-icon {
        width: 36px;
        height: 36px;
        border-radius: 8px;
    }

    .admin-btn { width: 100%; justify-content: center; }
    .admin-btn .btn-text { font-size: 0.85rem; }

    .day-event-link { grid-template-columns: 1fr; }
    .day-event-name, .day-event-dept { grid-column: 1; }

    .detail-grid {
        grid-template-columns: minmax(108px, 124px) 1fr;
        gap: 8px 12px;
    }

    .detail-grid dt {
        font-size: 0.88rem;
        line-height: 1.3;
    }

    .event-card-fields { grid-template-columns: 1fr; }

    .calendar-section { overflow: hidden; }
    .calendar-grid { gap: 4px; }
    .cal-day {
        min-height: 58px;
        min-width: 0;
        padding: 4px;
    }
    .cal-day-count { font-size: 0.62rem; }
    .cal-weekday { font-size: 0.72rem; }
}

@media (min-width: 769px) {
    .header-icon-actions .btn-icon { width: 40px; height: 40px; }

    .event-card-fields {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .event-card-fields label.wide { grid-column: span 2; }
}

.dashboard-page.login-page {
    display: block;
}

.dashboard-page .login-overlay {
    background: rgba(255, 255, 255, 0.28);
}

.dashboard-mobile-theme {
    display: none;
}

.dashboard-shell {
    position: relative;
    z-index: 1;
    width: min(1400px, 96vw);
    margin: 0 auto;
    padding: 24px 0 40px;
}

.dashboard-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 18px 20px;
    box-shadow: 0 20px 60px rgba(26, 39, 68, 0.12);
}

.dashboard-header-top {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex-shrink: 0;
}

.dashboard-header-text {
    flex: 1 1 auto;
    min-width: 0;
}

.dashboard-header h1 {
    margin: 0;
    font-size: 1.45rem;
}

.dashboard-header .login-sub {
    margin: 4px 0 0;
}

.dashboard-header-visuals {
    display: none;
    align-items: stretch;
    gap: 16px;
    min-width: 0;
    --dashboard-promo-width: 280px;
}

.dashboard-header-art {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(247, 250, 255, 0.65);
}

.dashboard-theme-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 14px;
}

.dashboard-promo-link {
    flex: 0 0 auto;
    width: var(--dashboard-promo-width);
    max-width: var(--dashboard-promo-width);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(26, 39, 68, 0.14);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    background: #fff;
}

.dashboard-promo-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(26, 39, 68, 0.18);
}

.dashboard-promo-thumb {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: top center;
}

.promo-page .login-overlay {
    background: rgba(255, 255, 255, 0.28);
}

.promo-fullscreen {
    position: relative;
    z-index: 1;
    width: min(1100px, 96vw);
    margin: 24px auto 40px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(26, 39, 68, 0.12);
}

.promo-fullscreen-img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 14px;
}

.dashboard-map .leaflet-control-attribution {
    display: none;
}

.dashboard-view-toggle {
    display: flex;
    gap: 8px;
    margin: 0 0 14px;
}

.dashboard-main-col .dashboard-view-toggle {
    flex-shrink: 0;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.dashboard-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(26, 39, 68, 0.12);
    padding: 18px;
}

.dashboard-calendar-grid .dashboard-cal-day {
    min-height: 72px;
    background: rgba(255, 255, 255, 0.65);
    animation: none;
    box-shadow: none;
}

.dashboard-calendar-grid .dashboard-cal-day.has-events {
    border-color: #c8d7ef;
}

.dashboard-calendar-grid .dashboard-cal-day.today {
    border-color: #4f6ef7;
    background: rgba(79, 110, 247, 0.12);
    box-shadow: inset 0 0 0 1px rgba(79, 110, 247, 0.25);
}

.dashboard-calendar-grid .dashboard-cal-day.selected {
    border-color: #7c5cff;
    background: rgba(124, 92, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(124, 92, 255, 0.28);
}

.dashboard-calendar-grid .dashboard-cal-day.today.selected {
    background: linear-gradient(135deg, rgba(79, 110, 247, 0.16), rgba(124, 92, 255, 0.18));
}

.dashboard-day-caption {
    margin: 12px 0 0;
    color: #5a6b85;
    font-weight: 600;
}

.dashboard-main-col {
    min-height: 420px;
}

.dashboard-panel {
    height: 100%;
}

.dashboard-map-wrap {
    position: relative;
    width: 100%;
    height: 100%;
}

.dashboard-map {
    width: 100%;
    min-height: 420px;
    height: min(70vh, 620px);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #d8e2f0;
}

.map-provider-switch {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 500;
    display: flex;
    gap: 6px;
    padding: 4px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 4px 16px rgba(26, 39, 68, 0.14);
}

.map-provider-btn {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    border-radius: 9px;
    background: #fff;
    color: #4f6ef7;
    cursor: pointer;
    padding: 0;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.map-provider-btn:hover:not(:disabled) {
    background: #f3f6ff;
}

.map-provider-btn.active {
    border-color: #4f6ef7;
    background: #eef2ff;
}

.map-provider-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.map-provider-icon {
    width: 22px;
    height: 22px;
    display: block;
}

.map-provider-icon-yandex {
    width: 24px;
    height: 24px;
}

.dashboard-list-head h2 {
    margin: 0 0 12px;
    font-size: 1.15rem;
}

.dashboard-events-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.dashboard-event-item {
    position: relative;
    border: 1px solid #d8e2f0;
    border-radius: 14px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.82);
}

.dashboard-event-item:has(.dashboard-poster-btn) {
    padding-bottom: 44px;
}

.dashboard-poster-btn {
    position: absolute;
    right: 12px;
    bottom: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    padding: 6px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, #6b8cff 0%, #4f6ef7 100%);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(79, 110, 247, 0.28);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dashboard-poster-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(79, 110, 247, 0.34);
    color: #fff;
}

.dashboard-event-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 6px;
}

.dashboard-event-paid {
    font-size: 0.78rem;
    font-weight: 700;
    color: #4f6ef7;
}

.dashboard-event-place,
.dashboard-event-tickets {
    font-size: 0.86rem;
    color: #5a6b85;
    margin-top: 4px;
}

.hidden {
    display: none !important;
}

.dashboard-promo {
    margin-top: 16px;
    padding: 12px;
    overflow: hidden;
}

.dashboard-promo-img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 14px;
}

.map-flag-marker-wrap {
    background: transparent;
    border: none;
}

.map-flag-marker {
    position: relative;
    display: block;
    width: 26px;
    height: 30px;
    filter: drop-shadow(0 2px 4px rgba(36, 52, 88, 0.22));
}

.map-flag-pole {
    position: absolute;
    left: 3px;
    bottom: 0;
    width: 2px;
    height: 28px;
    border-radius: 2px;
    background: linear-gradient(180deg, #8ea0bf 0%, #5f718f 100%);
}

.map-flag-cloth {
    position: absolute;
    left: 5px;
    top: 2px;
    width: 18px;
    height: 12px;
    border-radius: 2px 6px 2px 2px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--flag-color) 88%, white) 0%, var(--flag-color) 100%);
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.35);
}

.map-flag-cloth::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 0;
    border-left: 9px solid var(--flag-color);
    border-top: 4px solid transparent;
    border-bottom: 0 solid transparent;
    opacity: 0.85;
}

.map-flag-count {
    position: absolute;
    top: -4px;
    right: -6px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #243458;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(36, 52, 88, 0.28);
}

.map-popup-events {
    max-width: 280px;
}

.map-popup-events-title {
    margin-bottom: 8px;
    font-weight: 700;
    color: #243458;
}

.map-popup-event-separated {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #dbe4f2;
}

.dashboard-map .leaflet-popup-content {
    margin: 12px 14px;
    line-height: 1.45;
}

@media (min-width: 960px) {
    .dashboard-header-visuals {
        display: flex;
        /* высота строки = полный рост баннера MAX при ширине 280px (723×1024) */
        height: calc(var(--dashboard-promo-width) * 1024 / 723);
    }

    .dashboard-header-art,
    .dashboard-promo-link {
        height: 100%;
    }

    .dashboard-layout {
        grid-template-columns: minmax(280px, 1fr) minmax(0, 2fr);
        align-items: start;
    }
}

@media (max-width: 959px) {
    .dashboard-shell {
        padding-bottom: 16px;
    }

    .dashboard-header-visuals {
        display: flex;
        flex-direction: column;
        height: auto;
    }

    .dashboard-header-art {
        flex: none;
        display: block;
        width: 100%;
        overflow: hidden;
        /* 1536×1024: ширина 100%, видимы верхние 2/3 (нижняя треть обрезана) */
        aspect-ratio: 9 / 4;
    }

    .dashboard-theme-img {
        display: block;
        width: 100%;
        height: auto;
        object-fit: unset;
        object-position: top center;
    }

    .dashboard-promo-link {
        display: none;
    }

    .dashboard-mobile-theme {
        display: none;
    }
}
