/* ========================================
   UMES Calendar Styles
   ======================================== */

/* ===== CONTROLS BAR ===== */
.calendar-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e2e4e8;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.calendar-nav { display: flex; align-items: center; gap: 0.5rem; }
.calendar-actions { display: flex; align-items: center; gap: 0.5rem; }

.calendar-nav-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2rem; height: 2rem; background: transparent; border: 1px solid #ddd;
    border-radius: 8px; cursor: pointer; font-size: 0.8rem; color: #555 !important;
    transition: all 0.15s ease; padding: 0; line-height: 1;
}
.calendar-nav-btn:hover { background: #BA141A; color: #fff !important; border-color: #BA141A; }

.calendar-month-title {
    font-size: 1.15rem; font-weight: 700; color: #2c3e50;
    min-width: 160px; text-align: center; letter-spacing: -0.01em;
}

.calendar-today-btn {
    display: inline-flex; align-items: center; justify-content: center;
    height: auto; line-height: 1; padding: 0.35rem 0.85rem; background: transparent;
    border: 1px solid #ddd; border-radius: 8px; cursor: pointer;
    font-size: 0.78rem; font-weight: 600; color: #555 !important; transition: all 0.15s ease;
}
.calendar-today-btn:hover { background: #BA141A; color: #fff !important; border-color: #BA141A; }

/* ===== VIEW TOGGLE ===== */
.calendar-view-toggle {
    display: flex; background: #f0f1f3; border-radius: 8px; padding: 3px;
    border: none; overflow: visible;
}
.view-toggle-btn {
    display: inline-flex; align-items: center; justify-content: center;
    height: auto; line-height: 1; padding: 0.35rem 0.9rem; background: transparent;
    border: none; border-right: none; border-radius: 6px; cursor: pointer;
    font-size: 0.78rem; font-weight: 600; color: #777 !important;
    transition: all 0.15s ease;
}
.view-toggle-btn:last-child { border-right: none; }
.view-toggle-btn.active {
    background: #BA141A; color: #fff !important;
    box-shadow: 0 1px 3px rgba(186,20,26,0.25);
}
.view-toggle-btn:hover:not(.active) { background: rgba(0,0,0,0.05); color: #444 !important; }

/* ===== FILTER PILLS ===== */
.calendar-filters {
    display: flex; gap: 0.4rem; margin-bottom: 1rem;
    padding: 0.5rem 0; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}
.calendar-filters::-webkit-scrollbar { display: none; }

.filter-pill {
    display: inline-flex; align-items: center; padding: 0.4rem 0.9rem;
    border-radius: 8px; font-size: 0.78rem; font-weight: 600;
    cursor: pointer; transition: all 0.15s ease;
    border: 1.5px solid transparent; text-transform: capitalize;
    user-select: none; white-space: nowrap; flex-shrink: 0;
}
.filter-pill:hover { transform: translateY(-1px); box-shadow: 0 2px 6px rgba(0,0,0,0.08); }
.filter-pill.active { box-shadow: 0 2px 8px rgba(0,0,0,0.12); transform: translateY(-1px); }

.filter-pill[data-type="all"]        { background:#f0f1f3; color:#555;     border-color:#d5d7db; }
.filter-pill[data-type="all"].active { background:#BA141A; color:#fff;     border-color:#BA141A; }
.filter-pill[data-type="social"]              { background:#fdecea; color:#c0392b; border-color:#f0c4bf; }
.filter-pill[data-type="social"].active       { background:#e74c3c; color:#fff;    border-color:#e74c3c; }
.filter-pill[data-type="professional"]        { background:#eaf2f8; color:#2471a3; border-color:#bdd5ec; }
.filter-pill[data-type="professional"].active { background:#3498db; color:#fff;    border-color:#3498db; }
.filter-pill[data-type="academic"]            { background:#eafaf1; color:#1e8449; border-color:#b5e4c7; }
.filter-pill[data-type="academic"].active     { background:#27ae60; color:#fff;    border-color:#27ae60; }
.filter-pill[data-type="competition"]         { background:#fef5e7; color:#ca6f1e; border-color:#f5d9a8; }
.filter-pill[data-type="competition"].active  { background:#f39c12; color:#fff;    border-color:#f39c12; }
.filter-pill[data-type="conference"]          { background:#f4ecf7; color:#7d3c98; border-color:#d5b8e8; }
.filter-pill[data-type="conference"].active   { background:#9b59b6; color:#fff;    border-color:#9b59b6; }

/* ==============================================
   CALENDAR GRID — fixed-height uniform cells
   ============================================== */
.calendar-grid-wrapper { display: block; }
.calendar-grid-wrapper.hidden { display: none; }

/* Header row */
.cal-header-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #BA141A;
    border-radius: 8px 8px 0 0;
}
.cal-header-cell {
    text-align: center;
    padding: 0.65rem 0;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ── Week row ── */
.cal-week {
    position: relative;  /* positioning context for span layer */
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
}
.cal-week:last-child {
    border-bottom: 1px solid #e0e0e0;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

/* 7-column grid of day cells */
.cal-day-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

/* ── Each day cell — FIXED HEIGHT ──
   Must match CELL_H constant in JS (130px) */
.cal-day {
    height: 130px;
    border-top: 1px solid #ebebeb;
    border-right: 1px solid #ebebeb;
    background: #fff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.cal-day:nth-child(7n) { border-right: none; }
.cal-day:hover { background: #fafbfc; }
.cal-day.outside-month { background: #f9f9fa; }
.cal-day.outside-month .day-number { color: #c8c8c8; }
.cal-day.today { background: #fffbf5; }

/* Day number — FIXED HEIGHT matches DAY_HDR_H in JS (24px) */
.cal-day-header {
    height: 24px;
    line-height: 24px;
    padding: 0 6px;
    flex-shrink: 0;
}
.day-number {
    font-size: 0.78rem;
    font-weight: 600;
    color: #555;
}
.cal-day.today .day-number {
    display: inline-flex; align-items: center; justify-content: center;
    background: #BA141A; color: #fff; font-weight: 700;
    width: 22px; height: 22px; border-radius: 50%; text-align: center;
    line-height: 22px;
}
.cal-day.outside-month .day-number { font-weight: 400; }

/* Spacer — matches span layer height, pushing events below bars */
.cal-day-span-spacer { flex-shrink: 0; }

/* ── Absolute span bar layer ── */
.cal-span-layer {
    position: absolute;
    left: 0; right: 0;
    z-index: 1;
    pointer-events: none;
    /* top and height are set inline by JS */
}
.cal-span-bar {
    position: absolute;
    height: 18px;
    line-height: 18px;
    padding: 0 6px;
    font-size: 0.66rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    box-sizing: border-box;
    pointer-events: auto;
    transition: opacity 0.15s ease;
    /* left, width, top, border-radius set inline by JS */
}
.cal-span-bar:hover { opacity: 0.8; z-index: 5; }

/* Span bar type colours — solid/opaque like the reference image */
.cal-span-bar.type-social       { background: #f5c6c899; color: #7b1a1f; }
.cal-span-bar.type-professional { background: #b4d5f099; color: #1a4971; }
.cal-span-bar.type-academic     { background: #b8e6cc99; color: #145a2e; }
.cal-span-bar.type-competition  { background: #fde0a899; color: #7d4a0a; }
.cal-span-bar.type-conference   { background: #dbbef099; color: #4a2068; }
.cal-span-bar.type-charity      { background: #f7e9a099; color: #6b5c0b; }
.cal-span-bar.type-samosa       { background: #fde0a899; color: #7d4a0a; }
.cal-span-bar.type-other        { background: #d8d8d899; color: #363636; }

/* ── Single-day event pills ── */
.day-events {
    padding: 1px 3px;
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
    overflow: hidden;
}
.day-event {
    display: block;
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 0.66rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.15s ease;
    text-decoration: none;
    line-height: 18px;
    height: 18px;
    flex-shrink: 0;
    border-left: 3px solid transparent;
}
.day-event:hover { opacity: 0.8; }

.day-event.type-social       { background:#fdecea; color:#c0392b; border-left-color:#e74c3c; }
.day-event.type-professional { background:#eaf2f8; color:#2471a3; border-left-color:#3498db; }
.day-event.type-academic     { background:#eafaf1; color:#1e8449; border-left-color:#27ae60; }
.day-event.type-competition  { background:#fef5e7; color:#ca6f1e; border-left-color:#f39c12; }
.day-event.type-conference   { background:#f4ecf7; color:#7d3c98; border-left-color:#9b59b6; }
.day-event.type-charity      { background:#fef9e7; color:#b7950b; border-left-color:#f1c40f; }
.day-event.type-samosa       { background:#fef5e7; color:#ca6f1e; border-left-color:#f39c12; }
.day-event.type-other        { background:#f0f0f0; color:#555;    border-left-color:#aaa; }

.day-more {
    font-size: 0.64rem; color: #888; padding: 0 4px;
    cursor: pointer; font-weight: 600; transition: color 0.15s;
    line-height: 16px; flex-shrink: 0;
}
.day-more:hover { color: #BA141A; }

/* Mobile dots — hidden on desktop */
.day-event-dots { display: none; }

/* Multi-day badge in list view */
.multi-day-badge {
    display: inline-block; padding: 0.1rem 0.5rem; border-radius: 4px;
    font-size: 0.65rem; font-weight: 700; text-transform: uppercase;
    background: #e8edf3; color: #566573; vertical-align: middle; margin-left: 0.35rem;
}
.list-event-card.multi-day-card { border-left: 3px solid #BA141A; }

/* ===== LIST VIEW ===== */
.calendar-list { display: none; }
.calendar-list.active { display: block; }
.list-month-group { margin-bottom: 1.75rem; }
.list-date-header {
    font-size: 0.82rem; font-weight: 700; color: #999; text-transform: uppercase;
    letter-spacing: 0.05em; padding-bottom: 0.5rem;
    border-bottom: 2px solid #e0e0e0; margin-bottom: 0.75rem;
}
.list-event-card {
    display: flex; gap: 1.25rem; padding: 1.1rem 1.25rem; background: #fff;
    border: 1px solid #e8e8e8; border-radius: 8px; margin-bottom: 0.6rem;
    transition: all 0.2s ease; cursor: pointer; position: relative;
}
.list-event-card:hover { border-color: #ccc; box-shadow: 0 3px 12px rgba(0,0,0,0.07); transform: translateY(-1px); }

.list-event-date-block { flex-shrink: 0; width: 56px; text-align: center; padding-top: 0.1rem; }
.list-event-date-block .month-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #BA141A; }
.list-event-date-block .day-label { font-size: 1.7rem; font-weight: 800; color: #2c3e50; line-height: 1.1; }
.list-event-date-block .weekday-label { font-size: 0.68rem; color: #999; text-transform: uppercase; }

.list-event-body { flex: 1; min-width: 0; }
.list-event-body h4 { margin: 0 0 0.3rem; font-size: 1.05rem; color: #2c3e50; line-height: 1.3; }

.list-event-meta {
    display: flex; flex-wrap: wrap; gap: 0.85rem;
    font-size: 0.82rem; color: #777; margin-bottom: 0.4rem;
}
.list-event-meta span { display: inline-flex; align-items: center; gap: 0.3rem; }
.list-event-meta .fa, .list-event-meta .fas { width: 14px; text-align: center; color: #aaa; }
.list-event-desc { font-size: 0.88rem; color: #666; line-height: 1.5; margin: 0; }

.list-event-type-badge {
    display: inline-block; padding: 0.15rem 0.6rem; border-radius: 12px;
    font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.03em; position: absolute; top: 0.9rem; right: 0.9rem; white-space: nowrap;
}
.list-event-type-badge.type-social       { background:#fdecea; color:#c0392b; }
.list-event-type-badge.type-professional { background:#eaf2f8; color:#2471a3; }
.list-event-type-badge.type-academic     { background:#eafaf1; color:#1e8449; }
.list-event-type-badge.type-competition  { background:#fef5e7; color:#ca6f1e; }
.list-event-type-badge.type-conference   { background:#f4ecf7; color:#7d3c98; }
.list-event-type-badge.type-charity      { background:#fef9e7; color:#b7950b; }
.list-event-type-badge.type-samosa       { background:#fef5e7; color:#ca6f1e; }
.list-event-type-badge.type-other        { background:#f0f0f0; color:#555; }

/* ===== PAGINATION ===== */
.list-pagination {
    display: flex; align-items: center; justify-content: center; gap: 0.75rem;
    margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid #e8e8e8;
}
.list-page-btn {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.5rem 1.1rem; background: #fff; border: 1px solid #d0d0d0;
    border-radius: 6px; cursor: pointer; font-size: 0.82rem; font-weight: 600;
    color: #555; transition: all 0.2s ease;
}
.list-page-btn:hover:not(:disabled) { background:#BA141A; color:#fff; border-color:#BA141A; }
.list-page-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.list-page-numbers { display: flex; gap: 0.25rem; }
.list-page-num {
    width: 2rem; height: 2rem; display: inline-flex; align-items: center; justify-content: center;
    background: #fff; border: 1px solid #d8d8d8; border-radius: 6px;
    cursor: pointer; font-size: 0.82rem; font-weight: 600; color: #555;
    transition: all 0.15s ease; padding: 0; line-height: 1;
}
.list-page-num:hover:not(.active) { background:#f0f0f0; border-color:#bbb; }
.list-page-num.active { background:#BA141A; color:#fff; border-color:#BA141A; }

/* ===== LOADING / EMPTY / ERROR ===== */
.calendar-loading { text-align: center; padding: 3rem; color: #999; }
.calendar-loading .spinner {
    display: inline-block; width: 32px; height: 32px;
    border: 3px solid #e0e0e0; border-top-color: #BA141A;
    border-radius: 50%; animation: calSpin 0.7s linear infinite; margin-bottom: 1rem;
}
@keyframes calSpin { to { transform: rotate(360deg); } }
.calendar-empty { text-align: center; padding: 3rem; color: #999; }
.calendar-empty .icon-large { font-size: 3rem; margin-bottom: 1rem; opacity: 0.4; }
.calendar-error {
    background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b;
    padding: 1rem 1.25rem; border-radius: 6px; margin: 1rem 0;
}

/* ===== UPCOMING ===== */
.upcoming-section { margin-top: 3rem; }
.upcoming-section header.major h2 { font-size: 1.5rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 980px) {
    .calendar-controls {
        flex-wrap: wrap; justify-content: center; gap: 0.5rem;
        padding: 0.6rem 0.75rem;
    }
    .calendar-nav { order: 1; flex: 1 1 100%; justify-content: center; }
    .calendar-actions { order: 2; justify-content: center; gap: 0.4rem; }
    .calendar-month-title { min-width: auto; font-size: 1.05rem; }
    .cal-day { height: 100px; }
    .day-event { font-size: 0.6rem; padding: 1px 3px; }
    .cal-span-bar { font-size: 0.6rem; padding: 0 3px; }
}

@media (max-width: 736px) {
    .calendar-controls {
        border-radius: 8px; padding: 0.5rem 0.6rem; gap: 0.4rem;
    }
    .calendar-nav { gap: 0.35rem; }
    .calendar-nav-btn { width: 2.2rem; height: 2.2rem; border-radius: 6px; }
    .calendar-month-title { font-size: 0.95rem; min-width: auto; }
    .calendar-today-btn { padding: 0.3rem 0.65rem; font-size: 0.72rem; }
    .view-toggle-btn { padding: 0.3rem 0.65rem; font-size: 0.72rem; }
    .calendar-view-toggle { padding: 2px; }

    .calendar-filters {
        gap: 0.35rem; margin-bottom: 0.75rem; padding: 0.4rem 0;
        /* Fade hint for scroll — left/right */
        mask-image: linear-gradient(90deg, #000 92%, transparent 100%);
        -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent 100%);
    }
    .filter-pill { padding: 0.4rem 0.75rem; font-size: 0.72rem; border-radius: 6px; }
    .cal-header-cell { font-size: 0.68rem; padding: 0.5rem 0; }
    .cal-day { height: 50px; }
    .cal-day-header { height: 20px; line-height: 20px; padding: 0 3px; }
    .day-number { font-size: 0.72rem; }
    .cal-day.today .day-number { width: 18px; height: 18px; line-height: 18px; font-size: 0.68rem; }

    /* Hide text content on mobile — show dots */
    .day-events { display: none; }
    .cal-span-layer { display: none; }
    .cal-day-span-spacer { display: none; }

    .day-event-dots { display: flex; gap: 3px; padding: 0 3px; flex-wrap: wrap; }
    .day-event-dot { width: 6px; height: 6px; border-radius: 50%; }
    .day-event-dot.type-social       { background:#e74c3c; }
    .day-event-dot.type-professional { background:#3498db; }
    .day-event-dot.type-academic     { background:#27ae60; }
    .day-event-dot.type-competition  { background:#f39c12; }
    .day-event-dot.type-conference   { background:#9b59b6; }
    .day-event-dot.type-charity      { background:#f1c40f; }
    .day-event-dot.type-samosa       { background:#f39c12; }
    .day-event-dot.type-other        { background:#aaa; }

    .list-event-card { flex-direction: column; gap: 0.75rem; }
    .list-event-date-block { display: flex; gap: 0.5rem; align-items: baseline; width: auto; }
    .list-event-type-badge { position: static; align-self: flex-start; margin-bottom: 0.25rem; }
    .list-pagination { flex-wrap: wrap; gap: 0.5rem; }
    .list-page-numbers { flex-wrap: wrap; justify-content: center; }

    /* Day picker */
    .day-picker-overlay {
        position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 10000;
        background: rgba(0,0,0,0.45); display: flex; align-items: center; justify-content: center; padding: 1rem;
    }
    .day-picker-popup {
        background:#fff; border-radius:10px; box-shadow:0 10px 30px rgba(0,0,0,0.22);
        min-width:240px; max-width:320px; width:100%; overflow:hidden;
    }
    .day-picker-header { display:flex; justify-content:space-between; align-items:center; padding:0.75rem 1rem; border-bottom:1px solid #eee; }
    .day-picker-title { font-weight:700; font-size:0.85em; color:#333; }
    .day-picker-close {
        background:none; border:1px solid #ccc; font-size:1.1em; cursor:pointer; color:#999;
        width:1.6rem; height:1.6rem; border-radius:50%; display:flex; align-items:center;
        justify-content:center; padding:0; line-height:1; flex-shrink:0;
    }
    .day-picker-close:hover { color:#333; border-color:#888; }
    .day-picker-item {
        display:flex; justify-content:space-between; align-items:center; width:100%;
        padding:0.55rem 0.85rem; border:none; background:none; text-align:left;
        font-size:0.8em; cursor:pointer; border-left:3px solid transparent; color:#333;
        border-bottom:1px solid #f5f5f5; transition:background 0.12s;
    }
    .day-picker-item:last-child { border-bottom:none; }
    .day-picker-item:hover,.day-picker-item:active { background:#f7f7f7; }
    .day-picker-item-title { font-weight:600; }
    .day-picker-item-time { font-size:0.8em; color:#888; white-space:nowrap; margin-left:0.5rem; }
    .day-picker-item.type-social       { border-left-color:#e74c3c; }
    .day-picker-item.type-professional { border-left-color:#3498db; }
    .day-picker-item.type-academic     { border-left-color:#27ae60; }
    .day-picker-item.type-competition  { border-left-color:#f39c12; }
    .day-picker-item.type-conference   { border-left-color:#9b59b6; }
    .day-picker-item.type-charity      { border-left-color:#f1c40f; }
}

/* ==========================================
   DARK MODE
   ========================================== */
body.dark-mode .calendar-controls { background:#1e1e1e; border-color:rgba(80,85,90,0.35); box-shadow:0 1px 3px rgba(0,0,0,0.2); }
body.dark-mode .calendar-month-title { color:#e0e5e8; }
body.dark-mode .calendar-nav-btn, body.dark-mode .calendar-today-btn {
    background:transparent; border-color:rgba(80,85,90,0.4); color:#b0b8bf !important;
}
body.dark-mode .calendar-nav-btn:hover, body.dark-mode .calendar-today-btn:hover {
    background:#BA141A; color:#fff !important; border-color:#BA141A;
}
body.dark-mode .calendar-view-toggle { background:rgba(255,255,255,0.06); border-color:transparent; }
body.dark-mode .view-toggle-btn { background:transparent; border-color:transparent; color:#b0b8bf !important; }
body.dark-mode .view-toggle-btn.active { background:#BA141A; color:#fff !important; }
body.dark-mode .view-toggle-btn:hover:not(.active) { background:rgba(255,255,255,0.08); }

/* Filter pills dark */
body.dark-mode .filter-pill[data-type="all"]        { background:#2a2a2a; color:#b0b8bf; border-color:rgba(80,85,90,0.4); }
body.dark-mode .filter-pill[data-type="all"].active  { background:#BA141A; color:#fff; border-color:#BA141A; }
body.dark-mode .filter-pill[data-type="social"]              { background:#2d1a1b; color:#e57373; border-color:rgba(229,115,115,0.25); }
body.dark-mode .filter-pill[data-type="social"].active       { background:#e74c3c; color:#fff; border-color:#e74c3c; }
body.dark-mode .filter-pill[data-type="professional"]        { background:#1a2533; color:#64b5f6; border-color:rgba(100,181,246,0.25); }
body.dark-mode .filter-pill[data-type="professional"].active { background:#3498db; color:#fff; border-color:#3498db; }
body.dark-mode .filter-pill[data-type="academic"]            { background:#1a2d1e; color:#66bb6a; border-color:rgba(102,187,106,0.25); }
body.dark-mode .filter-pill[data-type="academic"].active     { background:#27ae60; color:#fff; border-color:#27ae60; }
body.dark-mode .filter-pill[data-type="competition"]         { background:#2d2517; color:#ffb74d; border-color:rgba(255,183,77,0.25); }
body.dark-mode .filter-pill[data-type="competition"].active  { background:#f39c12; color:#fff; border-color:#f39c12; }
body.dark-mode .filter-pill[data-type="conference"]          { background:#251a2d; color:#ba68c8; border-color:rgba(186,104,200,0.25); }
body.dark-mode .filter-pill[data-type="conference"].active   { background:#9b59b6; color:#fff; border-color:#9b59b6; }
body.dark-mode .filter-pill:hover { box-shadow: 0 2px 6px rgba(0,0,0,0.25); }

/* Grid dark */
body.dark-mode .cal-header-row { background:#BA141A; }
body.dark-mode .cal-week { border-left-color:rgba(80,85,90,0.3); border-right-color:rgba(80,85,90,0.3); }
body.dark-mode .cal-week:last-child { border-bottom-color:rgba(80,85,90,0.3); }
body.dark-mode .cal-day { background:#1e1e1e; border-top-color:rgba(80,85,90,0.3); border-right-color:rgba(80,85,90,0.25); }
body.dark-mode .cal-day:hover { background:#252525; }
body.dark-mode .cal-day.outside-month { background:#1a1a1a; }
body.dark-mode .cal-day.outside-month .day-number { color:#555; }
body.dark-mode .cal-day.today { background:#2d1a1b; }
body.dark-mode .day-number { color:#b0b8bf; }

/* Span bars dark */
body.dark-mode .cal-span-bar.type-social       { background:#5c2224; color:#f5b0b3; }
body.dark-mode .cal-span-bar.type-professional { background:#1e3a5f; color:#a8d4f5; }
body.dark-mode .cal-span-bar.type-academic     { background:#1a3d25; color:#a0dbb0; }
body.dark-mode .cal-span-bar.type-competition  { background:#4a3212; color:#f5d78e; }
body.dark-mode .cal-span-bar.type-conference   { background:#3a1e52; color:#cfa8e8; }
body.dark-mode .cal-span-bar.type-charity      { background:#3d3510; color:#f0e08a; }
body.dark-mode .cal-span-bar.type-samosa       { background:#4a3212; color:#f5d78e; }
body.dark-mode .cal-span-bar.type-other        { background:#333; color:#b0b8bf; }

/* Day events dark */
body.dark-mode .day-event.type-social       { background:#2d1a1b; color:#e57373; }
body.dark-mode .day-event.type-professional { background:#1a2533; color:#64b5f6; }
body.dark-mode .day-event.type-academic     { background:#1a2d1e; color:#66bb6a; }
body.dark-mode .day-event.type-competition  { background:#2d2517; color:#ffb74d; }
body.dark-mode .day-event.type-conference   { background:#251a2d; color:#ba68c8; }
body.dark-mode .day-event.type-charity      { background:#2d2a17; color:#ffd54f; }
body.dark-mode .day-event.type-samosa       { background:#2d2517; color:#ffb74d; }
body.dark-mode .day-event.type-other        { background:#2a2a2a; color:#b0b8bf; }
body.dark-mode .day-more { color:#888f95; }

body.dark-mode .multi-day-badge { background:#1e2a3a; color:#8ab4f8; }
body.dark-mode .list-event-card.multi-day-card { border-left-color:#d01a20; }

/* List dark */
body.dark-mode .list-date-header { color:#888f95; border-bottom-color:rgba(80,85,90,0.4); }
body.dark-mode .list-event-card { background:#252525; border-color:rgba(80,85,90,0.4); }
body.dark-mode .list-event-card:hover { border-color:rgba(80,85,90,0.6); box-shadow:0 3px 12px rgba(0,0,0,0.3); }
body.dark-mode .list-event-date-block .day-label { color:#e0e5e8; }
body.dark-mode .list-event-date-block .weekday-label { color:#888f95; }
body.dark-mode .list-event-body h4 { color:#e0e5e8; }
body.dark-mode .list-event-meta { color:#888f95; }
body.dark-mode .list-event-meta .fa, body.dark-mode .list-event-meta .fas { color:#666d73; }
body.dark-mode .list-event-desc { color:#888f95; }

body.dark-mode .list-event-type-badge.type-social       { background:#2d1a1b; color:#e57373; }
body.dark-mode .list-event-type-badge.type-professional { background:#1a2533; color:#64b5f6; }
body.dark-mode .list-event-type-badge.type-academic     { background:#1a2d1e; color:#66bb6a; }
body.dark-mode .list-event-type-badge.type-competition  { background:#2d2517; color:#ffb74d; }
body.dark-mode .list-event-type-badge.type-conference   { background:#251a2d; color:#ba68c8; }
body.dark-mode .list-event-type-badge.type-charity      { background:#2d2a17; color:#ffd54f; }

/* Pagination dark */
body.dark-mode .list-pagination { border-top-color:rgba(80,85,90,0.4); }
body.dark-mode .list-page-btn { background:#1e1e1e; border-color:rgba(80,85,90,0.4); color:#b0b8bf; }
body.dark-mode .list-page-btn:hover:not(:disabled) { background:#BA141A; color:#fff; border-color:#BA141A; }
body.dark-mode .list-page-num { background:#1e1e1e; border-color:rgba(80,85,90,0.4); color:#b0b8bf; }
body.dark-mode .list-page-num:hover:not(.active) { background:#2a2a2a; border-color:rgba(80,85,90,0.6); }
body.dark-mode .list-page-num.active { background:#BA141A; color:#fff; border-color:#BA141A; }

/* Loading / empty / error dark */
body.dark-mode .calendar-loading { color:#888f95; }
body.dark-mode .calendar-loading .spinner { border-color:rgba(80,85,90,0.4); border-top-color:#BA141A; }
body.dark-mode .calendar-empty { color:#888f95; }
body.dark-mode .calendar-error { background:#2d1a1b; border-color:#BA141A; color:#e57373; }

/* Day picker dark */
body.dark-mode .day-picker-overlay { background:rgba(0,0,0,0.6); }
body.dark-mode .day-picker-popup { background:#252525; box-shadow:0 10px 30px rgba(0,0,0,0.5); }
body.dark-mode .day-picker-header { border-bottom-color:#3a3a3a; }
body.dark-mode .day-picker-title { color:#e0e5e8; }
body.dark-mode .day-picker-close { color:#777; border-color:#555; }
body.dark-mode .day-picker-close:hover { color:#ddd; border-color:#888; }
body.dark-mode .day-picker-item { color:#b0b8bf; border-bottom-color:#333; }
body.dark-mode .day-picker-item:hover, body.dark-mode .day-picker-item:active { background:#2d2d2d; }
body.dark-mode .day-picker-item-time { color:#777; }

/* ===== EVENT REQUEST MODAL ===== */
.er-modal-overlay {
    position: fixed; top:0; left:0; right:0; bottom:0;
    background:rgba(0,0,0,0.6); z-index:10000;
    display:flex; align-items:center; justify-content:center; padding:1rem;
}
.er-modal-content {
    background:#fff; border-radius:12px; max-width:700px; width:100%;
    max-height:90vh; overflow-y:auto; padding:2rem; box-shadow:0 20px 60px rgba(0,0,0,0.3);
}
.er-modal-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:1.5rem; }
.er-modal-header h3 { margin:0; font-size:1.4rem; }
.er-modal-close {
    background:none; border:1px solid #ccc; font-size:1.2rem; cursor:pointer; color:#666;
    width:2rem; height:2rem; border-radius:50%; display:flex; align-items:center;
    justify-content:center; padding:0; line-height:1; flex-shrink:0;
}
.er-modal-close:hover { color:#BA141A; }
.er-form-row { display:flex; gap:1rem; margin-bottom:1rem; }
.er-form-group { flex:1; margin-bottom:0.5rem; }
.er-form-group label { display:block; font-weight:600; margin-bottom:0.3rem; font-size:0.9rem; }
.er-form-group input, .er-form-group textarea, .er-form-group select {
    width:100%; padding:0.6rem 0.8rem; border:1px solid #ddd;
    border-radius:6px; font-size:0.95rem; box-sizing:border-box;
}
.er-form-group textarea { resize:vertical; }
.er-form-group input:focus, .er-form-group textarea:focus, .er-form-group select:focus {
    border-color:#BA141A; outline:none; box-shadow:0 0 0 2px rgba(186,20,26,0.15);
}
@media (max-width: 600px) {
    .er-form-row { flex-direction:column; gap:0; }
    .er-modal-content { padding:1.25rem; }
}

/* Event request dark */
body.dark-mode .er-modal-content { background:#1e1e1e; color:#e0e5e8; }
body.dark-mode .er-modal-close { color:#888; border-color:#555; }
body.dark-mode .er-modal-close:hover { color:#e57373; border-color:#888; }
body.dark-mode .er-form-group input, body.dark-mode .er-form-group textarea, body.dark-mode .er-form-group select {
    background:#2a2a2a; border-color:rgba(80,85,90,0.4); color:#e0e5e8;
}
body.dark-mode .er-form-group input:focus, body.dark-mode .er-form-group textarea:focus, body.dark-mode .er-form-group select:focus {
    border-color:#BA141A; box-shadow:0 0 0 2px rgba(186,20,26,0.3);
}
body.dark-mode #event-request-success { background:#1a2d1e !important; color:#66bb6a !important; border-color:#2e7d32 !important; }
body.dark-mode #event-request-error { background:#2d1a1b !important; color:#e57373 !important; border-color:#c62828 !important; }