/* CESRA Membership — Public Styles */
:root {
    --cesra-blue:   #0096c7;
    --cesra-red:    #e63946;
    --cesra-dark:   #0a2540;
    --cesra-border: #e4e2dc;
    --cesra-light:  #f5f4f0;
}

/* ── Notices ── */
.cesra-notice {
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid;
}
.cesra-notice p { margin: 0; }
.cesra-notice-success { background: #e8f5e9; border-color: #4caf50; color: #2e7d32; }
.cesra-notice-error   { background: #fce4ec; border-color: #ef5350; color: #b71c1c; }
.cesra-notice-info    { background: #e3f2fd; border-color: #2196f3; color: #1565c0; }
.cesra-notice-warning { background: #fff8e1; border-color: #ffc107; color: #e65100; }

/* ── Registration form ── */
.cesra-registration-wrap { max-width: 680px; margin: 0 auto; }

.cesra-form .cesra-field-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 0;
}
.cesra-form .cesra-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 16px;
}
.cesra-form .cesra-field label {
    font-weight: 600;
    font-size: .9rem;
    color: #333;
}
.cesra-form .cesra-field input,
.cesra-form .cesra-field select,
.cesra-form .cesra-field textarea {
    border: 1px solid #ccd5db;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: .95rem;
    width: 100%;
    box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s;
}
.cesra-form .cesra-field input:focus,
.cesra-form .cesra-field select:focus,
.cesra-form .cesra-field textarea:focus {
    border-color: var(--cesra-blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,150,199,.12);
}
.cesra-form .required { color: var(--cesra-red); }
.cesra-field-submit { margin-top: 6px; }

/* ── Buttons ── */
.cesra-btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s;
}
.cesra-btn-primary {
    background: linear-gradient(90deg, var(--cesra-blue), #0077a8);
    color: #fff;
}
.cesra-btn-primary:hover {
    background: linear-gradient(90deg, #007aa3, #005f8a);
    color: #fff;
}

/* ── Member portal ── */
.cesra-portal-wrap { max-width: 780px; margin: 0 auto; }

.cesra-portal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--cesra-dark);
    color: #fff;
    border-radius: 8px;
    padding: 20px 26px;
    margin-bottom: 24px;
}
.cesra-portal-header h2 { margin: 0 0 4px; font-size: 1.3rem; color: #fff; }
.cesra-portal-header p  { margin: 0; font-size: .85rem; color: #99aabb; }
.cesra-portal-number {
    font-family: monospace;
    font-size: 1.1rem;
    color: #48cae4;
    font-weight: 700;
    white-space: nowrap;
}

.cesra-portal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}
.cesra-portal-card {
    background: #fff;
    border: 1px solid var(--cesra-border);
    border-radius: 8px;
    padding: 20px 22px;
}
.cesra-portal-card h3 {
    margin: 0 0 14px;
    font-size: 1rem;
    color: var(--cesra-dark);
    border-bottom: 2px solid var(--cesra-blue);
    padding-bottom: 8px;
}
.cesra-portal-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.cesra-portal-table th {
    color: #666;
    font-weight: 600;
    padding: 7px 8px 7px 0;
    text-align: left;
    width: 38%;
    font-size: .82rem;
    vertical-align: top;
}
.cesra-portal-table td {
    padding: 7px 0;
    color: #333;
    border-bottom: 1px solid #f0f4f8;
}
.cesra-portal-table tr:last-child td { border-bottom: none; }

/* ── Badges (public) ── */
.cesra-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 600;
}
.cesra-badge-active    { background: #e8f5e9; color: #2e7d32; }
.cesra-badge-pending   { background: #fff3e0; color: #e65100; }
.cesra-badge-suspended { background: #fce4ec; color: #b71c1c; }
.cesra-badge-lapsed    { background: #f3e5f5; color: #6a1b9a; }
.cesra-badge-cancelled { background: #eeeeee; color: #424242; }

@media (max-width: 480px) {
    .cesra-portal-header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .cesra-form .cesra-field-row { grid-template-columns: 1fr; }
}

/* ── Member Directory ── */
.cesra-directory-wrap { max-width: 1100px; margin: 0 auto; }

.cesra-dir-filters { margin-bottom: 20px; }
.cesra-dir-search-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.cesra-dir-search-field { flex: 1 1 240px; }
.cesra-dir-search-field input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccd5db;
    border-radius: 6px;
    font-size: .95rem;
    box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s;
}
.cesra-dir-search-field input:focus {
    border-color: var(--cesra-blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,150,199,.12);
}
.cesra-dir-grade-field select {
    padding: 10px 14px;
    border: 1px solid #ccd5db;
    border-radius: 6px;
    font-size: .95rem;
    background: #fff;
    cursor: pointer;
}
.cesra-dir-btn-search {
    background: var(--cesra-blue);
    color: #fff;
    border: none;
    padding: 10px 22px;
    border-radius: 6px;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
}
.cesra-dir-btn-search:hover { background: #007aa3; }
.cesra-dir-btn-clear {
    color: #64748b;
    font-size: .9rem;
    text-decoration: none;
    padding: 10px 4px;
    white-space: nowrap;
}
.cesra-dir-btn-clear:hover { color: var(--cesra-red); }

.cesra-dir-count {
    font-size: .9rem;
    color: #64748b;
    margin-bottom: 20px;
}

/* Grid */
.cesra-dir-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

/* Cards */
.cesra-dir-card {
    background: #fff;
    border: 1px solid var(--cesra-border);
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow .15s, transform .15s;
}
.cesra-dir-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,.10);
    transform: translateY(-2px);
}
.cesra-dir-card-top {
    height: 5px;
}
.cesra-dir-grade-individual .cesra-dir-card-top { background: var(--cesra-blue); }
.cesra-dir-grade-student    .cesra-dir-card-top { background: #17a2b8; }
.cesra-dir-grade-corporate  .cesra-dir-card-top { background: var(--cesra-dark); }
.cesra-dir-grade-fellow     .cesra-dir-card-top { background: linear-gradient(90deg, #c9a84c, #e8cc70); }
.cesra-dir-grade-honorary   .cesra-dir-card-top { background: linear-gradient(90deg, #7b2d8b, #a855b5); }
.cesra-dir-grade-life       .cesra-dir-card-top { background: linear-gradient(90deg, #1a5276, #2e86c1); }

.cesra-dir-card-body {
    padding: 20px 20px 18px;
    text-align: center;
}
.cesra-dir-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1d2b3a;
    margin-bottom: 8px;
    line-height: 1.3;
}
.cesra-dir-grade-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .03em;
    margin-bottom: 12px;
    text-transform: uppercase;
}
.cesra-dir-badge-individual { background: #e0f4fb; color: #0077a3; }
.cesra-dir-badge-student    { background: #d1ecf1; color: #0c5460; }
.cesra-dir-badge-corporate  { background: #e8eaf6; color: #0a2540; }
.cesra-dir-badge-fellow     { background: #fef9e7; color: #9a6f00; border: 1px solid #e8cc70; }
.cesra-dir-badge-honorary   { background: #f5eeff; color: #6b21a8; border: 1px solid #c084fc; }
.cesra-dir-badge-life       { background: #e8f4fd; color: #1a5276; border: 1px solid #7ab8dc; }

.cesra-dir-company {
    font-size: .88rem;
    color: #475569;
    margin-bottom: 8px;
    line-height: 1.4;
}
.cesra-dir-location {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: .82rem;
    color: #64748b;
    margin-bottom: 6px;
}
.cesra-dir-location svg { flex-shrink: 0; opacity: .7; }
.cesra-dir-since {
    font-size: .78rem;
    color: #94a3b8;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f0f4f8;
}

/* Pagination */
.cesra-dir-pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 8px;
}
.cesra-dir-page-link,
.cesra-dir-page-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
}
.cesra-dir-page-link {
    border: 1px solid var(--cesra-border);
    color: #1d2b3a;
    transition: background .15s, border-color .15s;
}
.cesra-dir-page-link:hover {
    background: #f0f4f8;
    border-color: var(--cesra-blue);
    color: var(--cesra-blue);
}
.cesra-dir-page-current {
    background: var(--cesra-blue);
    color: #fff;
    border: 1px solid var(--cesra-blue);
}

@media (max-width: 600px) {
    .cesra-dir-search-row { flex-direction: column; align-items: stretch; }
    .cesra-dir-grade-field select,
    .cesra-dir-btn-search { width: 100%; }
    .cesra-dir-grid { grid-template-columns: 1fr; }
}

/* ── Events ── */
.cesra-events-wrap { max-width: 900px; margin: 0 auto; }

.cesra-events-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--cesra-border);
}
.cesra-events-tab {
    padding: 10px 20px;
    text-decoration: none;
    font-weight: 600;
    font-size: .9rem;
    color: #475569;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color .15s, border-color .15s;
}
.cesra-events-tab:hover { color: var(--cesra-blue); }
.cesra-tab-active { color: var(--cesra-blue); border-bottom-color: var(--cesra-blue); }

.cesra-events-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}
.cesra-type-pill {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
    border: 1px solid var(--cesra-border);
    font-size: .82rem;
    font-weight: 600;
    text-decoration: none;
    color: #475569;
    transition: background .15s, border-color .15s, color .15s;
}
.cesra-type-pill:hover { border-color: var(--cesra-blue); color: var(--cesra-blue); }
.cesra-pill-active { background: var(--cesra-blue); border-color: var(--cesra-blue); color: #fff; }

.cesra-events-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cesra-event-card {
    display: flex;
    gap: 0;
    background: #fff;
    border: 1px solid var(--cesra-border);
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow .15s;
}
.cesra-event-card:hover { box-shadow: 0 4px 18px rgba(0,0,0,.09); }
.cesra-event-past { opacity: .75; }

.cesra-event-date-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--cesra-dark);
    color: #fff;
    min-width: 80px;
    padding: 16px 12px;
    text-align: center;
    flex-shrink: 0;
}
.cesra-event-day   { font-size: 2rem; font-weight: 800; line-height: 1; }
.cesra-event-month { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.6); margin-top: 4px; }

.cesra-event-body { padding: 16px 20px; flex: 1; }

.cesra-event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
    align-items: center;
}
.cesra-event-type-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: .03em;
}
.cesra-event-cpd-pill  { background: #e0f4fb; color: #0077a3; padding: 2px 10px; border-radius: 20px; font-size: .75rem; font-weight: 700; }
.cesra-event-free-pill { background: #e8f5e9; color: #2e7d32; padding: 2px 10px; border-radius: 20px; font-size: .75rem; font-weight: 700; }
.cesra-event-price-pill { background: #fff3e0; color: #e65100; padding: 2px 10px; border-radius: 20px; font-size: .75rem; font-weight: 700; }

.cesra-event-title { margin: 0 0 8px; font-size: 1.1rem; font-weight: 700; line-height: 1.3; }
.cesra-event-title a { color: var(--cesra-dark); text-decoration: none; }
.cesra-event-title a:hover { color: var(--cesra-blue); }

.cesra-event-location,
.cesra-event-time {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: .85rem;
    color: #64748b;
    margin: 4px 0;
}
.cesra-event-more {
    display: inline-block;
    margin-top: 10px;
    font-size: .88rem;
    font-weight: 600;
    color: var(--cesra-blue);
    text-decoration: none;
}
.cesra-event-more:hover { text-decoration: underline; }

/* Event detail */
.cesra-event-detail-wrap { max-width: 860px; margin: 0 auto; }
.cesra-event-back { margin-bottom: 20px; }
.cesra-event-back a { color: var(--cesra-blue); text-decoration: none; font-weight: 600; font-size: .9rem; }
.cesra-event-back a:hover { text-decoration: underline; }

.cesra-event-detail-header {
    display: flex;
    gap: 20px;
    background: var(--cesra-dark);
    color: #fff;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 28px;
}
.cesra-event-detail-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.25);
    padding: 24px 20px;
    min-width: 90px;
    flex-shrink: 0;
}
.cesra-event-detail-info { padding: 24px 24px 24px 0; }
.cesra-event-detail-title { margin: 0 0 12px; font-size: 1.5rem; font-weight: 800; color: #fff; line-height: 1.2; }
.cesra-event-detail-attrs {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: .88rem;
    color: rgba(255,255,255,.75);
}
.cesra-event-detail-attrs span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.cesra-event-detail-body { display: flex; flex-direction: column; gap: 20px; }

.cesra-event-description {
    font-size: 1rem;
    line-height: 1.7;
    color: #334155;
}

.cesra-event-venue-box,
.cesra-event-cpd-box,
.cesra-event-book-box {
    background: #f8fafc;
    border: 1px solid var(--cesra-border);
    border-radius: 8px;
    padding: 18px 22px;
}
.cesra-event-venue-box h3,
.cesra-event-cpd-box h3 {
    margin: 0 0 10px;
    font-size: .95rem;
    color: var(--cesra-dark);
    text-transform: uppercase;
    letter-spacing: .05em;
    font-size: .8rem;
}
.cesra-event-venue-box p,
.cesra-event-cpd-box p { margin: 0; font-size: .95rem; color: #475569; line-height: 1.6; }

.cesra-event-book-btn { font-size: 1rem; padding: 14px 32px; }
.cesra-event-past-note { color: #64748b; font-style: italic; margin: 0; }

/* ── CPD Portal Styles ── */
.cesra-cpd-summary-card { border-top: 3px solid #0096c7; }

.cesra-cpd-stats {
    display: flex;
    gap: 0;
    text-align: center;
}
.cesra-cpd-stat {
    flex: 1;
    padding: 12px 8px;
    border-right: 1px solid var(--cesra-border);
}
.cesra-cpd-stat:last-child { border-right: none; }
.cesra-cpd-stat-num   { display: block; font-size: 1.8rem; font-weight: 800; color: var(--cesra-blue); line-height: 1; }
.cesra-cpd-stat-label { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: #64748b; margin-top: 5px; }

.cesra-cpd-section { border-top: 3px solid var(--cesra-blue); }

.cesra-cpd-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.cesra-cpd-header h3 { margin: 0; }

.cesra-btn-cpd-toggle {
    background: var(--cesra-blue);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: .85rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
}
.cesra-btn-cpd-toggle:hover { background: #007aa3; }

.cesra-cpd-form-wrap {
    background: #f8fafc;
    border: 1px solid var(--cesra-border);
    border-radius: 8px;
    padding: 18px 20px;
    margin-bottom: 20px;
}
.cesra-cpd-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.cesra-cpd-field { display: flex; flex-direction: column; gap: 4px; }
.cesra-cpd-field-wide { grid-column: 1 / -1; }
.cesra-cpd-field label { font-size: .82rem; font-weight: 600; color: #333; }
.cesra-cpd-field input,
.cesra-cpd-field select,
.cesra-cpd-field textarea {
    border: 1px solid #ccd5db;
    border-radius: 5px;
    padding: 8px 10px;
    font-size: .9rem;
    width: 100%;
    box-sizing: border-box;
}
.cesra-cpd-field input:focus,
.cesra-cpd-field select:focus,
.cesra-cpd-field textarea:focus {
    border-color: var(--cesra-blue);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,150,199,.12);
}
.cesra-btn-cpd-cancel {
    background: none;
    border: none;
    color: #64748b;
    font-size: .9rem;
    cursor: pointer;
    margin-left: 8px;
    text-decoration: underline;
}

.cesra-cpd-table-wrap { overflow-x: auto; }
.cesra-cpd-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.cesra-cpd-table th {
    text-align: left;
    padding: 8px 10px;
    background: #f0f4f8;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #555;
    border-bottom: 2px solid var(--cesra-border);
}
.cesra-cpd-table td {
    padding: 9px 10px;
    border-bottom: 1px solid var(--cesra-border);
    vertical-align: top;
}
.cesra-cpd-table tr:last-child td { border-bottom: none; }

@media (max-width: 600px) {
    .cesra-event-card { flex-direction: column; }
    .cesra-event-date-block { flex-direction: row; gap: 8px; padding: 12px 16px; min-width: auto; }
    .cesra-event-detail-header { flex-direction: column; gap: 0; }
    .cesra-event-detail-date { flex-direction: row; gap: 8px; padding: 16px 20px; min-width: auto; }
    .cesra-event-detail-info { padding: 16px 20px; }
    .cesra-cpd-form-grid { grid-template-columns: 1fr; }
    .cesra-cpd-field-wide { grid-column: auto; }
}

/* ═══════════════════════════════════════════════════════════
   EVENTS CALENDAR
   ═══════════════════════════════════════════════════════════ */

.cesra-cal-loading {
    text-align: center;
    color: #94a3b8;
    padding: 40px 0;
    font-size: .95rem;
}

/* Controls bar */
.cesra-cal-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}
.cesra-cal-type-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.cesra-cal-pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 600;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    color: #475569;
    cursor: pointer;
    transition: all .15s;
    line-height: 1;
}
.cesra-cal-pill:hover  { border-color: #0096c7; color: #0096c7; }
.cesra-cal-pill.active { background: #0096c7; border-color: #0096c7; color: #fff; }
/* Type-coloured active state via CSS custom property */
.cesra-cal-pill[data-filter]:not([data-filter=""]).active {
    background: var(--tc, #0096c7);
    border-color: var(--tc, #0096c7);
}

.cesra-cal-view-row {
    display: flex;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}
.cesra-cal-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 16px;
    background: #fff;
    color: #64748b;
    border: none;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, color .15s;
    border-right: 1px solid #e2e8f0;
}
.cesra-cal-view-btn:last-child { border-right: none; }
.cesra-cal-view-btn:hover  { background: #f1f5f9; color: #0096c7; }
.cesra-cal-view-btn.active { background: #0096c7; color: #fff; }

/* Month header */
.cesra-cal-month-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 8px;
}
.cesra-cal-month-title {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex: 1;
    justify-content: center;
}
.cesra-cal-mname {
    font-size: 1.3rem;
    font-weight: 800;
    color: #0a2540;
}
.cesra-cal-myear {
    font-size: 1rem;
    font-weight: 400;
    color: #64748b;
}
.cesra-cal-nav-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #334155;
    cursor: pointer;
    transition: all .15s;
    flex-shrink: 0;
}
.cesra-cal-nav-btn:hover { border-color: #0096c7; color: #0096c7; }
.cesra-cal-today-btn {
    padding: 6px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #475569;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    flex-shrink: 0;
}
.cesra-cal-today-btn:hover { border-color: #0096c7; color: #0096c7; }

/* Day-name row */
.cesra-cal-day-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 4px;
}
.cesra-cal-day-name {
    text-align: center;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #94a3b8;
    padding: 4px 0 8px;
}

/* Grid cells */
.cesra-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}
.cesra-cal-cell {
    min-height: 72px;
    border: 1.5px solid #f1f5f9;
    border-radius: 8px;
    padding: 6px 7px 5px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    background: #fff;
    position: relative;
    display: flex;
    flex-direction: column;
}
.cesra-cal-empty {
    background: #fafbfc;
    cursor: default;
    border-color: transparent;
}
.cesra-cal-cell:not(.cesra-cal-empty):hover { border-color: #0096c7; background: #f0faff; }
.cesra-cal-cell.cesra-cal-today {
    border-color: #0096c7;
    background: #f0faff;
}
.cesra-cal-cell.cesra-cal-today .cesra-cal-day-num {
    background: #0096c7;
    color: #fff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.cesra-cal-cell.cesra-cal-selected {
    border-color: #0096c7;
    background: #e0f4fb;
    box-shadow: 0 0 0 2px #0096c730;
}
.cesra-cal-cell.cesra-cal-past { opacity: .6; }
.cesra-cal-day-num {
    font-size: .82rem;
    font-weight: 600;
    color: #334155;
    line-height: 1;
}
.cesra-cal-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: auto;
    padding-top: 4px;
}
.cesra-cal-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.cesra-cal-dot-more {
    font-size: .65rem;
    font-weight: 700;
    color: #94a3b8;
    line-height: 7px;
}

/* Event panel */
.cesra-cal-panel {
    margin-top: 16px;
    border: 1.5px solid #0096c7;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,150,199,.12);
}
.cesra-cal-panel-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: linear-gradient(90deg, #0096c7, #48cae4);
    color: #fff;
}
.cesra-cal-panel-date {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
}
.cesra-cal-panel-close {
    background: rgba(255,255,255,.2);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: .9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
    flex-shrink: 0;
}
.cesra-cal-panel-close:hover { background: rgba(255,255,255,.4); }
.cesra-cal-panel-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.cesra-cal-panel-empty { color: #94a3b8; margin: 0; font-size: .9rem; }
.cesra-cal-panel-ev {
    border-left: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 12px 14px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}
.cesra-cal-ev-type {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding-left: 8px;
    margin-bottom: 2px;
}
.cesra-cal-ev-title {
    margin: 0;
    font-size: .95rem;
    font-weight: 700;
    color: #0a2540;
    line-height: 1.3;
}
.cesra-cal-ev-meta {
    margin: 0;
    font-size: .82rem;
    color: #64748b;
}
.cesra-cal-ev-link {
    display: inline-block;
    margin-top: 6px;
    font-size: .82rem;
    font-weight: 700;
    color: #0096c7;
    text-decoration: none;
}
.cesra-cal-ev-link:hover { text-decoration: underline; }

/* List view */
.cesra-cal-list-view { display: flex; flex-direction: column; gap: 20px; }
.cesra-cal-list-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e2e8f0;
}
.cesra-cal-list-tab {
    padding: 10px 22px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    font-size: .9rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: color .15s, border-color .15s;
}
.cesra-cal-list-tab:hover  { color: #0096c7; }
.cesra-cal-list-tab.active { color: #0096c7; border-bottom-color: #0096c7; }
.cesra-cal-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
    font-size: .95rem;
}

/* Responsive */
@media (max-width: 640px) {
    .cesra-cal-controls { flex-direction: column; align-items: flex-start; }
    .cesra-cal-cell { min-height: 52px; padding: 4px 5px; }
    .cesra-cal-dot { width: 6px; height: 6px; }
    .cesra-cal-mname { font-size: 1.1rem; }
    .cesra-cal-day-name { font-size: .65rem; }
    .cesra-cal-panel-hdr { padding: 12px 14px; }
    .cesra-cal-panel-body { padding: 12px 14px; }
    .cesra-cal-pill { font-size: .75rem; padding: 4px 11px; }
}

/* ── Featured Events ───────────────────────────────────────────────────────── */
.cesra-featured-events {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 24px 0;
}
.cesra-feat-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
    overflow: hidden;
    transition: box-shadow .2s, transform .2s;
    position: relative;
}
.cesra-feat-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,.12); transform: translateY(-2px); }
.cesra-feat-accent-bar {
    height: 5px;
    background: var(--accent, #0096c7);
}
.cesra-feat-inner {
    display: flex;
    align-items: stretch;
    gap: 0;
}
.cesra-feat-date-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    padding: 20px 16px;
    background: var(--accent, #0096c7);
    color: #fff;
    text-align: center;
    flex-shrink: 0;
}
.cesra-feat-day   { font-size: 2rem; font-weight: 800; line-height: 1; }
.cesra-feat-month { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.cesra-feat-year  { font-size: .75rem; opacity: .8; margin-top: 2px; }
.cesra-feat-body  { flex: 1; padding: 18px 20px; }
.cesra-feat-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.cesra-feat-title { margin: 0 0 8px; font-size: 1.1rem; font-weight: 700; }
.cesra-feat-title a { color: #0a2540; text-decoration: none; }
.cesra-feat-title a:hover { color: var(--accent, #0096c7); }
.cesra-feat-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: .83rem; color: #64748b; margin-bottom: 6px; }
.cesra-feat-meta span { display: flex; align-items: center; gap: 4px; }
.cesra-feat-desc { font-size: .88rem; color: #475569; margin: 0; }
.cesra-feat-cta {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    flex-shrink: 0;
}
.cesra-feat-btn {
    display: inline-block;
    padding: 10px 22px;
    background: var(--accent, #0096c7);
    color: #fff;
    border-radius: 6px;
    font-weight: 700;
    font-size: .9rem;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity .15s;
}
.cesra-feat-btn:hover { opacity: .88; color: #fff; }

@media (max-width: 680px) {
    .cesra-feat-inner { flex-direction: column; }
    .cesra-feat-date-col { flex-direction: row; gap: 8px; padding: 12px 16px; min-width: 0; justify-content: flex-start; }
    .cesra-feat-day { font-size: 1.5rem; }
    .cesra-feat-cta { padding: 0 16px 16px; }
}

/* ── Booking Form ──────────────────────────────────────────────────────────── */
.cesra-booking-form-wrap {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 28px 28px 24px;
    margin-top: 28px;
}
.cesra-booking-form-title {
    margin: 0 0 18px;
    font-size: 1.2rem;
    color: #0a2540;
}
.cesra-booking-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 16px;
}
.cesra-booking-fields .cesra-field-full { grid-column: 1 / -1; }
.cesra-booking-fields .cesra-field label { font-weight: 600; font-size: .88rem; display: block; margin-bottom: 4px; }
.cesra-booking-fields .cesra-field input,
.cesra-booking-fields .cesra-field select,
.cesra-booking-fields .cesra-field textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: .92rem;
    box-sizing: border-box;
}
.cesra-booking-fields .cesra-field textarea { resize: vertical; }
.cesra-booking-capacity {
    background: #e0f7fa;
    border-left: 4px solid #0096c7;
    border-radius: 4px;
    padding: 10px 14px;
    font-size: .9rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.cesra-cap-full { color: #b71c1c; font-weight: 700; }
.cesra-cap-ok   { color: #2e7d32; font-weight: 700; }
.cesra-cap-low  { background: #fff3e0; color: #e65100; font-size: .8rem; padding: 2px 8px; border-radius: 10px; font-weight: 600; }
.cesra-booking-price-note {
    background: #fff8e1;
    border-left: 4px solid #f59e0b;
    border-radius: 4px;
    padding: 10px 14px;
    font-size: .88rem;
    color: #78350f;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 16px;
}
.cesra-booking-form-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.cesra-booking-free-note { font-size: .85rem; color: #2e7d32; }
.cesra-booking-success {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}
.cesra-booking-success.confirmed { background: #e8f5e9; border: 1px solid #a5d6a7; }
.cesra-booking-success.waitlisted { background: #fff8e1; border: 1px solid #ffe082; }
.cesra-booking-success-icon { font-size: 1.8rem; line-height: 1; }
.cesra-booking-success strong { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.cesra-booking-success p { margin: 0; font-size: .9rem; color: #475569; }
.cesra-booking-existing {
    background: #e3f2fd;
    border: 1px solid #90caf9;
    border-radius: 8px;
    padding: 16px 20px;
    margin-top: 24px;
}
.cesra-booking-existing p { margin: 0 0 6px; font-size: .92rem; }
.cesra-booking-existing p:last-child { margin-bottom: 0; }
.cesra-event-past-note { color: #64748b; font-style: italic; }

@media (max-width: 580px) {
    .cesra-booking-fields { grid-template-columns: 1fr; }
    .cesra-booking-form-wrap { padding: 18px 16px; }
}

/* ── Contact Form ──────────────────────────────────────────────────────────── */
.cesra-contact-wrap { max-width: 960px; margin: 0 auto; }

.cesra-contact-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 36px;
    align-items: start;
}

.cesra-contact-form .cesra-field-row { margin-bottom: 0; }
.cesra-contact-form .cesra-field { margin-bottom: 18px; }
.cesra-contact-form .cesra-field label { font-size: .9rem; font-weight: 600; color: #333; margin-bottom: 5px; display: block; }
.cesra-contact-form .cesra-field input,
.cesra-contact-form .cesra-field select,
.cesra-contact-form .cesra-field textarea {
    border: 1px solid var(--cesra-border);
    border-radius: 6px;
    padding: 10px 12px;
    font-size: .95rem;
    width: 100%;
    box-sizing: border-box;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    font-family: inherit;
}
.cesra-contact-form .cesra-field input:focus,
.cesra-contact-form .cesra-field select:focus,
.cesra-contact-form .cesra-field textarea:focus {
    border-color: var(--cesra-blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,150,199,.12);
}
.cesra-contact-form .cesra-field textarea { resize: vertical; min-height: 140px; }
.cesra-contact-form .required { color: var(--cesra-red); }

.cesra-contact-privacy {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    font-size: .82rem;
    color: #777;
    margin-bottom: 20px;
    line-height: 1.5;
}
.cesra-contact-privacy svg { flex-shrink: 0; margin-top: 1px; color: var(--cesra-blue); }
.cesra-contact-privacy a { color: var(--cesra-blue); }

.cesra-contact-info-card {
    background: var(--cesra-dark);
    color: rgba(255,255,255,.85);
    border-radius: 10px;
    padding: 28px 24px;
    position: sticky;
    top: 90px;
}
.cesra-contact-info-card h3 {
    color: #fff;
    margin: 0 0 12px;
    font-size: 1.1rem;
}
.cesra-contact-info-card > p {
    font-size: .9rem;
    color: rgba(255,255,255,.65);
    margin-bottom: 24px;
    line-height: 1.6;
}
.cesra-contact-info-list {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.cesra-contact-info-list li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-size: .875rem;
}
.cesra-contact-info-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: rgba(0,150,199,.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cesra-blue);
    margin-top: 2px;
}
.cesra-contact-info-list strong { display: block; color: #fff; margin-bottom: 2px; }
.cesra-contact-info-list span { color: rgba(255,255,255,.6); }
.cesra-contact-member-cta {
    border-top: 1px solid rgba(255,255,255,.1);
    padding-top: 20px;
    font-size: .875rem;
    color: rgba(255,255,255,.6);
}
.cesra-contact-member-cta strong { color: #fff; display: block; margin-bottom: 4px; }
.cesra-btn-outline {
    display: inline-block;
    padding: 9px 20px;
    border: 2px solid rgba(255,255,255,.4);
    border-radius: 6px;
    color: #fff;
    font-size: .875rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s, border-color .15s;
}
.cesra-btn-outline:hover { background: rgba(255,255,255,.12); border-color: #fff; color: #fff; text-decoration: none; }

@media (max-width: 760px) {
    .cesra-contact-grid { grid-template-columns: 1fr; }
    .cesra-contact-info-card { position: static; }
}
