:root {
    --red: #EB5C5A;
    --red-soft: #fdeceb;
    --ink: #1c1c1e;
    --charcoal: #333334;
    --muted: #6d6d75;
    --line: #ececee;
    --band: #f6f7f9;
    --radius: 18px;
    --serif: "Playfair Display", Georgia, serif;
    --sans: "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, sans-serif;
}

.ev-page {
    font-family: var(--sans);
    color: var(--charcoal);
}

.ev-page h1,
.ev-page h2,
.ev-page h3 {
    font-family: var(--serif);
    color: var(--ink);
    font-weight: 600;
    margin: 0;
    letter-spacing: -.01em;
}

.ev-page .eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--red);
    margin: 0 0 14px;
}

.ev-page .serif-em {
    font-style: italic;
    color: var(--red);
    font-weight: 500;
}

/* ---------- Hero ---------- */
.ev-hero {
    padding: 64px 0 22px;
}

.ev-hero h1 {
    font-size: 58px;
    line-height: 1.03;
    letter-spacing: -.02em;
}

.ev-lead {
    font-size: 17px;
    color: var(--muted);
    max-width: 560px;
    margin: 22px 0 0;
}

/* ---------- Toolbar: search + filters ---------- */
.ev-toolbar {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 34px;
}

.ev-search {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 320px;
    min-width: 260px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 40px;
    padding: 12px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .03);
    transition: border-color .2s, box-shadow .2s;

}

.ev-search:focus-within {
    border-color: #d6d6da;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .06);
}

.ev-search svg {
    color: #9a9aa2;
    flex: none;
}

.ev-search input {
    border: 0;
    outline: 0;
    background: transparent;
    font-family: var(--sans);
    font-size: 15px;
    color: var(--ink);
    width: 100%;
}

.ev-search input::placeholder {
    color: #9a9aa2;
}

.ev-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.chip {
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 500;
    color: #4a4a50;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 40px;
    padding: 9px 18px;
    cursor: pointer;
    transition: background .18s, color .18s, border-color .18s;
    white-space: nowrap;
}

.chip:hover {
    border-color: #d6d6da;
}

.chip.active {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

/* ---------- Events grid ---------- */
.ev-section {
    padding: 40px 0 90px;
}

.ev-subhead {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #9a9aa2;
    font-family: var(--sans);
    margin: 46px 0 22px;
}

.events {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}

.event-card {
    display: block;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
    color: inherit;
    transition: box-shadow .2s ease, transform .2s ease;
}

.event-card:hover {
    box-shadow: 0 18px 44px rgba(20, 20, 30, .1);
    transform: translateY(-3px);
}

.event-media {
    position: relative;
    aspect-ratio: 16 / 11;
    overflow: hidden;
}

.event-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-media .ph {
    width: 100%;
    height: 100%;
}

.ph-0 {
    background: linear-gradient(150deg, #f7b267, #c1568a 60%, #4b2e57);
}

.ph-1 {
    background: linear-gradient(150deg, #7b2ff7, #d5289e 60%, #241023);
}

.ph-2 {
    background: linear-gradient(150deg, #2b5876, #d97b4f 65%, #1a2733);
}

.tag {
    position: absolute;
    top: 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 5px 11px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(6px);
    color: var(--ink);
}

.tag-left {
    left: 12px;
}

.tag-right {
    right: 12px;
}

.tag-dark {
    background: rgba(23, 23, 27, .78);
    color: #fff;
    letter-spacing: .02em;
}

.event-body {
    padding: 18px 18px 18px;
}

.event-date {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--red);
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 8px;
}

.event-body h3 {
    font-family: var(--sans);
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-loc {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-loc svg {
    flex: none;
}

.event-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding-top: 15px;
    border-top: 1px solid var(--line);
}

.ev-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--muted);
}

.ev-tickets {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    font-weight: 600;
    color: var(--red);
}

.event-card:hover .ev-tickets svg {
    transform: translateX(3px);
}

.ev-tickets svg {
    transition: transform .18s ease;
}

/* ---------- Management (signed-in) actions ---------- */
.card-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.card-actions a {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--sans);
    transition: background .18s, box-shadow .2s, transform .15s;
}

.btn-edit {
    background: var(--red);
    color: #fff;
    box-shadow: 0 8px 20px rgba(235, 92, 90, .26);
}

.btn-edit:hover {
    transform: translateY(-1px);
}

.btn-del {
    background: #fff;
    color: var(--red);
    border: 1px solid var(--red);
}

.btn-del:hover {
    background: var(--red-soft);
}

.add-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 240px;
    border: 1.5px dashed #d6d6da;
    border-radius: var(--radius);
    background: #fff;
    color: var(--muted);
    text-align: center;
    transition: border-color .2s, color .2s, background .2s;
}

.add-card:hover {
    border-color: var(--red);
    color: var(--red);
    background: var(--red-soft);
}

.add-card .plus {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--red-soft);
    color: var(--red);
    display: grid;
    place-items: center;
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
}

.add-card span {
    font-weight: 600;
    font-size: 15px;
}

/* ---------- Empty state ---------- */
.ev-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 70px 20px;
    color: var(--muted);
}

.ev-empty h3 {
    font-family: var(--sans);
    font-size: 18px;
    color: var(--ink);
    margin-bottom: 6px;
}

.ev-noresults {
    display: none;
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
    font-size: 15px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .events {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ev-hero h1 {
        font-size: 44px;
    }

    .ev-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    /* min-width:0 lets both strips shrink below their content width instead of
       forcing the toolbar wider than the viewport */
    .ev-search {
        flex: none;
        width: 100%;
        min-width: 0;
    }

    .ev-search input {
        min-width: 0;
    }

    .ev-filters {
        justify-content: flex-start;
        overflow-x: auto;
        width: 100%;
        min-width: 0;
    }

    .ev-filters .chip {
        flex: none;
    }
}

@media (max-width: 560px) {
    .events {
        grid-template-columns: minmax(0, 1fr);
    }

    .ev-hero {
        padding: 44px 0 18px;
    }

    .ev-hero h1 {
        font-size: 38px;
    }
}