/* ==========================================================
   Global / shared
   ========================================================== */
body { background: #f5f3ff; }
nav .brand-logo { font-weight: 600; letter-spacing: 1px; }
.badge { font-size: 0.75rem; padding: 0.3em 0.7em; border-radius: 4px; }
thead th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; padding: 12px 8px; }
.card { border-radius: 8px; }
table.highlight tbody tr:hover { background-color: #f5f5f5; }
[x-cloak] { display: none !important; }

/* ==========================================================
   Public index page (index.html)
   ========================================================== */
.site-header {
    background: linear-gradient(135deg, #4c1d95 0%, #6d28d9 60%, #7c3aed 100%);
    color: #fff;
    padding: 2rem 0 1.5rem;
    margin-bottom: 1.75rem;
}
.site-header h4 { margin: 0 0 0.25rem; font-weight: 700; letter-spacing: -0.5px; }
.site-header p  { margin: 0; opacity: 0.8; font-size: 0.95rem; }

.event-card {
    display: flex;
    align-items: stretch;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 0.85rem;
    box-shadow: 0 2px 8px rgba(76,29,149,0.08);
    background: #fff;
    transition: box-shadow 0.18s, transform 0.18s;
    cursor: default;
}
.event-card:hover {
    box-shadow: 0 6px 20px rgba(76,29,149,0.16);
    transform: translateY(-1px);
}
.event-date-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 76px;
    padding: 1rem 0.75rem;
    color: #fff;
    flex-shrink: 0;
}
.event-date-block .day     { font-size: 1.9rem; font-weight: 800; line-height: 1; }
.event-date-block .month   { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1.5px; margin-top: 3px; opacity: 0.9; }
.event-date-block .weekday { font-size: 0.68rem; opacity: 0.75; margin-top: 4px; }

.event-body {
    flex: 1;
    padding: 0.9rem 1.25rem;
    min-width: 0;
}
.event-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e1b4b;
    margin: 0 0 0.3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.1rem;
    font-size: 0.82rem;
    color: #6b7280;
    margin-bottom: 0.4rem;
}
.event-meta span { display: flex; align-items: center; gap: 3px; }
.event-meta .material-icons { font-size: 0.9rem; color: #9ca3af; }

.event-type-chip {
    display: inline-block;
    font-size: 0.68rem;
    padding: 2px 9px;
    border-radius: 99px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}
.event-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    padding: 0.9rem 1rem;
    flex-shrink: 0;
    gap: 0.5rem;
}
.status-badge {
    font-size: 0.67rem;
    padding: 3px 10px;
    border-radius: 99px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    white-space: nowrap;
}
.btn-detail {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #6d28d9, #7c3aed);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.15s;
}
.btn-detail:hover { opacity: 0.88; color: #fff; }
.btn-detail .material-icons { font-size: 1rem; }

.filter-bar {
    background: #fff;
    border-radius: 12px;
    padding: 1rem 1.25rem 0.25rem;
    box-shadow: 0 2px 8px rgba(76,29,149,0.07);
    margin-bottom: 1.4rem;
    border: 1px solid #ede9fe;
}
.filter-bar .input-field { margin-top: 0; margin-bottom: 0.75rem; }

.btn-search { background: linear-gradient(135deg, #6d28d9, #7c3aed) !important; }
.pagination li.active   { background: #6d28d9; border-radius: 4px; }
.pagination li.active a { background: #6d28d9 !important; }
.pagination li.waves-effect a:hover { color: #6d28d9 !important; }
.events-pagination { margin: 0; }

.site-header .container { max-width: 860px; }
.site-header-icon { vertical-align: middle; margin-right: 0.4rem; font-size: 2rem !important; }

.events-container { max-width: 860px; padding-bottom: 3rem; }

.filter-row    { display: flex; gap: 1rem; flex-wrap: wrap; align-items: flex-end; }
.filter-city   { flex: 1; min-width: 180px; margin: 0 !important; }
.filter-prefix { color: #7c3aed; }
.filter-actions { padding-bottom: 0.75rem; display: flex; gap: 0.5rem; }
.filter-clear-icon { color: #9ca3af; }

.events-loader { padding: 3rem 0; }
.events-loader .spinner-layer { border-color: #7c3aed; }
.events-loader p { color: #9ca3af; margin-top: 0.5rem; }

.event-error-card { border-radius: 12px; }
.event-error-card .card-content { padding: 0.75rem 1rem; }

.events-empty { padding: 4rem 0; }
.events-empty .material-icons { color: #c4b5fd; }
.events-empty p { color: #9ca3af; }

.pagination-bar { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; padding: 0 0.25rem; }
.pagination-bar .page-info { font-size: 0.85rem; color: #9ca3af; }

/* ==========================================================
   Public event detail page (event.html)
   ========================================================== */
.event-hero {
    background: linear-gradient(135deg, #4c1d95 0%, #6d28d9 60%, #7c3aed 100%);
    color: #fff;
    padding: 1.5rem 0 2rem;
    margin-bottom: 0;
}
.event-hero .container { max-width: 800px; }
.event-hero .back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    transition: color 0.15s;
}
.event-hero .back-link:hover { color: #fff; }
.event-hero .back-link .material-icons { font-size: 1rem; }
.event-hero h4 {
    margin: 0 0 0.75rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.hero-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 99px;
    font-size: 0.78rem;
    font-weight: 600;
    background: rgba(255,255,255,0.18);
    color: #fff;
    backdrop-filter: blur(4px);
}
.hero-chip .material-icons { font-size: 0.9rem; }

.status-hero {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.event-content {
    max-width: 800px;
    padding-top: 1.5rem;
    padding-bottom: 3rem;
}
.event-columns { margin: 0; gap: 0; }
.event-col-left  { padding: 0 0.5rem 0 0; }
.event-col-right { padding: 0 0 0 0.5rem; }

.info-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(76,29,149,0.08);
    border: 1px solid #ede9fe;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
}
.info-card-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #7c3aed;
    margin-bottom: 1rem;
}
.info-card-title .material-icons { font-size: 1rem; }

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.45rem 0;
    border-bottom: 1px solid #f5f3ff;
    font-size: 0.9rem;
}
.info-row:last-child { border-bottom: none; }
.info-label { color: #9ca3af; font-size: 0.82rem; }
.info-value { color: #1e1b4b; font-weight: 500; text-align: right; max-width: 60%; }

.description-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(76,29,149,0.08);
    border: 1px solid #ede9fe;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    color: #374151;
    line-height: 1.7;
}
.description-card p { margin: 0; }

.event-loader { padding: 5rem 0; text-align: center; }
.event-loader .spinner-layer { border-color: #7c3aed; }
.event-loader p { color: #9ca3af; margin-top: 0.5rem; }

.event-btns { display: flex; flex-direction: column; gap: 0.35rem; align-items: flex-end; }
.btn-register {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #065f46, #059669);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.15s;
}
.btn-register:hover { opacity: 0.88; color: #fff; }
.btn-register .material-icons { font-size: 1rem; }

/* Registration modal */
.reg-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.reg-modal {
    background: #fff;
    border-radius: 16px;
    padding: 1.75rem;
    max-width: 460px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(76,29,149,0.2);
    max-height: 90vh;
    overflow-y: auto;
}
.reg-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e1b4b;
    margin-bottom: 0.2rem;
}
.reg-close { padding: 0 !important; min-width: 0 !important; color: #9ca3af; }
.reg-event-name {
    font-size: 0.85rem;
    color: #7c3aed;
    font-weight: 600;
    margin-bottom: 1.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.reg-error {
    background: #fee2e2;
    color: #991b1b;
    border-radius: 8px;
    padding: 0.6rem 0.9rem;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}
.reg-actions { display: flex; justify-content: flex-end; align-items: center; gap: 0.5rem; margin-top: 0.5rem; }
.reg-submit-btn { background: linear-gradient(135deg, #6d28d9, #7c3aed) !important; }
.reg-success { text-align: center; padding: 0.5rem 0 1rem; }
.reg-success-icon .material-icons { font-size: 3.5rem; }
.reg-success-icon.ok .material-icons { color: #059669; }
.reg-success-icon.wait .material-icons { color: #f59e0b; }
.reg-success-title { font-size: 1.05rem; font-weight: 700; color: #1e1b4b; margin: 0.75rem 0 0; }
.reg-key-box {
    background: #f5f3ff;
    border: 1px solid #ede9fe;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin: 1rem 0;
    text-align: left;
}
.reg-key-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: #7c3aed; margin-bottom: 0.35rem; }
.reg-key-value { font-family: 'Courier New', monospace; font-size: 0.95rem; font-weight: 700; color: #1e1b4b; word-break: break-all; margin-bottom: 0.4rem; }
.reg-key-info { font-size: 0.78rem; color: #9ca3af; }
.reg-done-btn { background: linear-gradient(135deg, #6d28d9, #7c3aed) !important; margin-top: 0.75rem; }

/* Registration card on event detail page */
.reg-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(76,29,149,0.08);
    border: 1px solid #ede9fe;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
}


