/* =====================================================
   BGC EVENT MANAGEMENT SYSTEM - Main Stylesheet
   Author: NTAGANIRA Heritier | Date: 2026-02-27
   ===================================================== */

:root {
    --sidebar-bg: #0f172a;
    --sidebar-w: 240px;
    --primary: #032b88;
    --primary-dark: #1d4ed8;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --purple: #8b5cf6;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --card-bg: #ffffff;
    --bg: #f4f4f4;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Plus Jakarta Sans', sans-serif; background: var(--bg); color: var(--text-main); }
a { text-decoration: none; color: inherit; }

/* Scrollbar styles for main content */
.main-content {flex: 1;overflow-y: auto;height: calc(100vh - 140px); /* Adjust based on your header height */scroll-behavior: smooth;}
/* Custom scrollbar for modern browsers */
.main-content::-webkit-scrollbar {width: 8px;}
.main-content::-webkit-scrollbar-track {background: #f1f1f1;border-radius: 10px;}
.main-content::-webkit-scrollbar-thumb {background: #cbd5e0;border-radius: 10px;transition: background 0.2s;}
.main-content::-webkit-scrollbar-thumb:hover {background: #94a3b8;}
/* For Firefox */
.main-content {scrollbar-width: thin;scrollbar-color: #cbd5e0 #f1f1f1;}
/* Ensure main container takes full height */
.main {display: flex;flex-direction: column;height: 100vh;overflow: hidden;}
/* Fix topbar to stay fixed */
.topbar {flex-shrink: 0;}
/* Flash messages styling */
.flash {margin: 0 20px 20px 20px;}
        
/* ---- AUTH PAGES ---- */
.auth-body { background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%); min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.auth-container { width: 100%; padding: 20px; }
.auth-card { background: #fff; border-radius: 20px; padding: 40px; max-width: 460px; margin: 0 auto; box-shadow: 0 20px 60px rgba(0,0,0,0.2); }
.auth-logo { text-align: center; margin-bottom: 20px; display: flex; justify-content: center; }
.logo-icon {background: linear-gradient(135deg, #ffffff, #ffffff);color: #0f172a;font-weight: 800;font-size: 15px;display: flex;align-items: center;justify-content: center;width: 55px;height: 55px;border-radius: 50%;padding: 20px;}
.logo-img{
  height: 50px;
    width: 50px;
    border-radius: 50%;
}.auth-title { text-align: center; font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.auth-subtitle { text-align: center; color: var(--text-muted); font-size: 14px; margin-bottom: 28px; }
.auth-footer { text-align: center; margin-top: 16px; font-size: 13px; color: var(--text-muted); }
.auth-footer a { color: var(--primary); font-weight: 600; }
.auth-hint { text-align: center; margin-top: 10px; color: var(--text-muted); }

/* ---- LAYOUT ---- */
.app-wrapper { display: flex; height: 100vh; overflow: hidden; }

/* SIDEBAR */
.sidebar { width: var(--sidebar-w); background: var(--sidebar-bg); display: flex; flex-direction: column; flex-shrink: 0; transition: width 0.3s; overflow: hidden; }
.sidebar.collapsed { width: 64px; }
.sidebar-logo { display: flex; align-items: center; gap: 10px; padding: 20px 18px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.logo-text { font-size: 15px; font-weight: 700; color: #fff; white-space: nowrap; }
.nav { flex: 1; padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; overflow-x: hidden; }
.nav::-webkit-scrollbar { display: none; }
.nav-section-label { font-size: 9px; font-weight: 700; color: #475569; text-transform: uppercase; letter-spacing: .08em; padding: 12px 8px 4px; white-space: nowrap; }
.nav-item { display: flex; align-items: center; gap: 25px; padding: 9px 12px; border-radius: 8px; cursor: pointer; color: #64748b; font-size: 13px; font-weight: 500; transition: all .2s; white-space: nowrap; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #cbd5e1; }
.nav-item.active { background: rgba(59,130,246,.15); color: #60a5fa; }
.nav-icon { font-size: 16px; flex-shrink: 0; }
.nav-label { font-size: 13px; }
.nav-item.active {background: rgba(59, 130, 246, .15);color: #60a5fa;border-left: #033AE3 2px solid;border-radius: 0 8px 8px 0;}
.nav-icon { font-size: 24px; flex-shrink: 0; }
.nav-label { font-size: 13px; } 
.sidebar-bottom { padding: 12px 10px; border-top: 1px solid rgba(255,255,255,0.06); }
.topbar-lang-switcher{background: var(--text-main);padding: 10px 20px;border-radius: 5px;}
/* MAIN */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.topbar { height: 60px; background: #fff; border-bottom: 1px solid var(--border); display: flex; align-items: center; padding: 0 24px; gap: 14px; flex-shrink: 0; }
.sidebar-toggle { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--text-muted); padding: 4px 8px; border-radius: 6px; }
.sidebar-toggle:hover { background: var(--bg); }
.topbar-title { font-size: 18px; font-weight: 700; }
.topbar-spacer { flex: 1; }
.topbar-user { display: flex; align-items: center; gap: 8px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #0f172a, #012f9c); color: #fff; font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.user-name { font-size: 13px; font-weight: 600; }

.content { flex: 1; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.content::-webkit-scrollbar { width: 4px; }
.content::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

/* ---- STATS ---- */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media(max-width: 900px) { .stats-row { grid-template-columns: repeat(2, 1fr); } }
@media(max-width: 480px) { .stats-row { grid-template-columns: 1fr; } }

.stat-card { background: var(--card-bg); border-radius: var(--radius); border: 1px solid var(--border); padding: 18px; display: flex; align-items: center; gap: 14px; transition: box-shadow .2s, transform .2s; }
.stat-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.07); transform: translateY(-2px); }
.stat-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.stat-icon.blue { background: rgba(59,130,246,.1); }
.stat-icon.green { background: rgba(34,197,94,.1); }
.stat-icon.orange { background: rgba(245,158,11,.1); }
.stat-icon.purple { background: rgba(139,92,246,.1); }
.stat-label { font-size: 11px; color: var(--text-muted); font-weight: 500; margin-bottom: 2px; }
.stat-value { font-size: 26px; font-weight: 800; }

/* ---- CARDS ---- */
.card { background: var(--card-bg); border-radius: var(--radius); border: 1px solid var(--border); padding: 20px; }
.card-title { font-size: 14px; font-weight: 700; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-link { font-size: 12px; font-weight: 600; color: var(--primary); }
.dashboard-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 5px; }
.dashboard-grid-1 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dashboard-grid-2 { display: grid; grid-template-columns: 1fr 3fr; gap: 10px; }
.dashboard-grid-1 .card{border: 0; border-radius: 0;}
.dashboard-grid-2 .card{border: 0; border-radius: 0;}
.dashboard-grid .card{border: 0; border-radius: 0;}
@media(max-width: 768px) { .dashboard-grid { grid-template-columns: 1fr; } }

/* ---- EVENTS ---- */
.event-list { display: flex; flex-direction: column; gap: 8px; }
.event-item { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 8px; background: var(--bg); transition: background .15s; }
.event-item:hover { background: #eff6ff; }
.event-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.event-info { flex: 1; }
.event-name { font-size: 13px; font-weight: 600; }
.event-meta { font-size: 11px; color: var(--text-muted); }

/* ---- ATTENDANCE ---- */
.attendance-list { display: flex; flex-direction: column; gap: 8px; }
.att-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.att-item:last-child { border-bottom: none; }
.att-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #3b82f6, #8b5cf6); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.att-name { font-size: 13px; font-weight: 600; }
.att-event { font-size: 11px; color: var(--text-muted); }
.att-method { margin-left: auto; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 20px; }
.method-qr { background: rgba(139,92,246,.1); color: #7c3aed; }
.method-code { background: rgba(59,130,246,.1); color: #2563eb; }

/* ---- FORMS ---- */
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: 13px; font-weight: 600; color: var(--text-main); }
.form-control { border: 1.5px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: 14px; font-family: inherit; transition: border-color .2s; outline: none; width: 100%; background: #fff; }
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59,130,246,.1); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media(max-width: 480px) { .form-row { grid-template-columns: 1fr; } }
.form-actions { display: flex; gap: 10px; margin-top: 4px; }
.form-inline { display: flex; gap: 8px; align-items: center; }
.field-error { font-size: 12px; color: var(--danger); }

/* ---- BUTTONS ---- */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: 2px; font-size: 13px; font-weight: 600; cursor: pointer; border: none; transition: all .2s; font-family: inherit; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--text-main); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-full { width: 100%; justify-content: center; }
.btn-sm { padding: 5px 12px; font-size: 12px; }

.search-bar {display: flex;gap: 8px;align-items: center;}
.search-bar input {padding: 7px 12px;border: 1.5px solid #e2e8f0;border-radius: 6px;font-size: 13px;width: 220px;outline: none;transition: border-color 0.15s;}
.search-bar input:focus { border-color: #2563eb; }
.search-bar .btn { padding: 7px 16px; font-size: 13px; }

/* ---- TABLE ---- */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { background: var(--bg); padding: 10px 12px; text-align: left; font-weight: 600; color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--border); }
.table td { padding: 12px; border-bottom: 1px solid var(--border); }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--bg); }
.action-btns { display: flex; gap: 6px; }

/* ---- BADGES ---- */
.badge { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 20px; }
.badge-blue { background: rgba(59,130,246,.1); color: #2563eb; }
.badge-green { background: rgba(34,197,94,.1); color: #16a34a; }
.badge-orange { background: rgba(245,158,11,.1); color: #d97706; }
.badge-red { background: rgba(239,68,68,.1); color: #dc2626; }

/* ---- ALERTS ---- */
.alert { padding: 12px 16px; border-radius: 8px; font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.alert-success { background: rgba(34,197,94,.1); color: #16a34a; border: 1px solid rgba(34,197,94,.2); }
.alert-danger { background: rgba(239,68,68,.1); color: #dc2626; border: 1px solid rgba(239,68,68,.2); }
.alert-info { background: rgba(59,130,246,.1); color: #2563eb; border: 1px solid rgba(59,130,246,.2); }

/* ---- PAGE HEADER ---- */
.page-header { display: flex; align-items: center; justify-content: space-between; }
.page-header h2 { font-size: 18px; font-weight: 700; }
.page-actions { display: flex; gap: 10px; }

/* ---- DETAIL ROWS ---- */
.detail-row { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.detail-row:last-child { border-bottom: none; }
.detail-label { color: var(--text-muted); font-weight: 600; min-width: 120px; flex-shrink: 0; }

/* ---- PAGINATION ---- */
.pagination { display: flex; gap: 6px; margin-top: 16px; }
.page-btn { padding: 6px 12px; border-radius: 6px; border: 1px solid var(--border); font-size: 12px; font-weight: 600; color: var(--text-muted); cursor: pointer; }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---- TOAST ---- */
.toast { padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 500; }
.toast-success { background: rgba(34,197,94,.1); color: #16a34a; }
.toast-error { background: rgba(239,68,68,.1); color: #dc2626; }

/* ---- MISC ---- */
.empty-state { color: var(--text-muted); font-size: 13px; padding: 20px; text-align: center; }
code { font-family: monospace; background: var(--bg); padding: 2px 6px; border-radius: 4px; font-size: 12px; color: var(--purple); }

/* ---- FullCalendar Overrides ---- */
.fc { font-family: 'Plus Jakarta Sans', sans-serif !important; }
.fc .fc-toolbar-title { font-size: 16px !important; font-weight: 700; }
.fc .fc-button { background: var(--primary) !important; border-color: var(--primary) !important; font-weight: 600; font-size: 12px; }
.fc .fc-button:hover { background: var(--primary-dark) !important; }

/* ═══════════════════════════════════════════════════
   LANG SWITCHER
════════════════════════════════════════════════════ */
.lang-switcher { display: flex; align-items: center; gap: 6px; padding: 8px 10px; }
.lang-btn { font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.45); text-decoration: none;
  padding: 3px 8px; border-radius: 4px; transition: all .15s; letter-spacing: .5px; }
.lang-btn:hover, .lang-btn.active { color: #fff; background: rgba(255,255,255,0.12); }
.lang-sep { color: rgba(255,255,255,0.2); font-size: 11px; }
/* On auth pages (light bg) */
.auth-body .lang-btn { color: #64748b; }
.auth-body .lang-btn:hover, .auth-body .lang-btn.active { color: #1e3a5f; background: #e8f0fe; }
.auth-body .lang-sep { color: #cbd5e1; }

/* ═══════════════════════════════════════════════════
   PERMISSION GRID (role form checkboxes)
════════════════════════════════════════════════════ */
.permission-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 8px; margin-top: 6px; }
.perm-check-label { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: 8px; cursor: pointer;
  font-size: 13px; font-weight: 500; transition: background .15s, border-color .15s; }
.perm-check-label:hover { background: #f0f7ff; border-color: #93c5fd; }
.perm-check-label input[type="checkbox"] { margin-top: 2px; accent-color: #2563eb; flex-shrink: 0; }
.perm-check-label input:checked ~ span { color: #1d4ed8; }
.perm-check-label .perm-code { display: block; font-size: 10px; color: #94a3b8;
  font-family: monospace; margin-top: 2px; }

/* ═══════════════════════════════════════════════════
   PERMISSION BADGE (role list / role view)
════════════════════════════════════════════════════ */
.perm-badge { font-size: 10px; padding: 2px 8px; display: inline-flex; align-items: center; gap: 4px; }

/* ═══════════════════════════════════════════════════
   EMPTY STATE
════════════════════════════════════════════════════ */
.empty-state { color: #94a3b8; font-size: 13px; text-align: center; padding: 32px 0; }

/* ═══════════════════════════════════════════════════
   PASSWORD RESET UI
════════════════════════════════════════════════════ */

/* Password visibility toggle */
.password-input-wrap { position: relative; display: flex; align-items: center; }
.password-input-wrap .form-control { padding-right: 40px; }
.toggle-pw {
  position: absolute; right: 10px;
  background: none; border: none; cursor: pointer;
  font-size: 16px; color: #94a3b8; padding: 0; line-height: 1;
}
.toggle-pw:hover { color: #475569; }

/* Strength bar */
.pw-strength-bar {
  height: 4px; background: #e2e8f0; border-radius: 2px;
  margin-top: 6px; overflow: hidden;
}
.pw-strength-fill {
  height: 100%; width: 0; background: #e2e8f0;
  border-radius: 2px; transition: width .3s, background .3s;
}

/* Auth alert */
.alert {
  padding: 12px 16px; border-radius: 8px;
  font-size: 14px; margin-bottom: 16px;
  display: flex; align-items: flex-start; gap: 8px;
}
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert-danger  { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info    { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }

/* ═══════════════════════════════════════════════════
   DASHBOARD ECHARTS
════════════════════════════════════════════════════ */
.echart-box { width:100%; height:260px; }
.chart-card { padding-bottom: 16px; }
.chart-card .card-header { margin-bottom: 8px; }

/* 3-column grid for bottom row */
.dashboard-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}
@media (max-width: 1100px) {
  .dashboard-grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .dashboard-grid-3 { grid-template-columns: 1fr; }
  .echart-box { height: 220px; }
}

/* ═══════════════════════════════════════════════════
   SKELETON / SHIMMER LOADING
   Strategy: page-level overlay shown on navigation,
   dismissed on DOMContentLoaded. Per-element skeletons
   used inside cards for richer effect.
════════════════════════════════════════════════════ */

/* ── Shimmer keyframe ─────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}

/* ── Base skeleton block ──────────────────────────── */
.skeleton {
  background: linear-gradient(
    90deg,
    #e2e8f0 25%,
    #f1f5f9 50%,
    #e2e8f0 75%
  );
  background-size: 600px 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: 6px;
  display: block;
}

/* ── Skeleton shapes ──────────────────────────────── */
.skeleton-text   { height: 14px; margin-bottom: 8px; }
.skeleton-title  { height: 20px; width: 55%; margin-bottom: 12px; }
.skeleton-avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }
.skeleton-badge  { height: 22px; width: 64px; border-radius: 12px; }
.skeleton-btn    { height: 32px; width: 80px; border-radius: 6px; }
.skeleton-input  { height: 38px; border-radius: 6px; margin-bottom: 12px; }
.skeleton-chart  { height: 260px; border-radius: 8px; }
.skeleton-w25    { width: 25%; }
.skeleton-w40    { width: 40%; }
.skeleton-w60    { width: 60%; }
.skeleton-w75    { width: 75%; }
.skeleton-w100   { width: 100%; }

/* ── Skeleton stat card ───────────────────────────── */
.skeleton-stat-card {background: #fff;border-radius: 12px;padding: 20px;display: flex;align-items: center;gap: 16px;box-shadow: 0 1px 4px rgba(0,0,0,0.06);}
.skeleton-stat-card .sk-icon {width: 48px; height: 48px;border-radius: 10px;flex-shrink: 0;}
.skeleton-stat-card .sk-info { flex: 1; }

/* ── Skeleton table row ───────────────────────────── */
.skeleton-row {display: flex;align-items: center;gap: 16px;padding: 12px 0;border-bottom: 1px solid #f1f5f9;}
.skeleton-row:last-child { border-bottom: none; }

/* ── Page overlay ─────────────────────────────────── */
#page-skeleton {position: fixed;inset: 0;z-index: 9999;background: #f8fafc;display: flex;flex-direction: column;padding: 0;/* slides up when dismissed */transition: opacity 0.22s ease, transform 0.22s ease;}
#page-skeleton.skeleton-done {opacity: 0;pointer-events: none;transform: translateY(-6px);}

/* skeleton topbar */
#page-skeleton .sk-topbar {height: 60px;background: #fff;border-bottom: 1px solid #e2e8f0;display: flex;align-items: center;padding: 0 24px;gap: 16px;}

/* skeleton body = sidebar + content */
#page-skeleton .sk-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}
#page-skeleton .sk-sidebar {width: 240px;background: #1e3a5f;padding: 24px 16px;display: flex;flex-direction: column;gap: 12px;flex-shrink: 0;}
#page-skeleton .sk-sidebar .skeleton {
  background: linear-gradient(90deg,
    rgba(255,255,255,0.08) 25%,
    rgba(255,255,255,0.16) 50%,
    rgba(255,255,255,0.08) 75%);
  background-size: 600px 100%;
}
#page-skeleton .sk-content {flex: 1;padding: 28px 32px;display: flex;flex-direction: column;gap: 20px;overflow: hidden;}

/* ═══════════════════════════════════════════════════════════════
   AGENDA MODULE
═══════════════════════════════════════════════════════════════ */

/* ── Toolbar ─────────────────────────────────────────────────── */
.agenda-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

/* View tabs (Day / Week / Month) */
.agenda-view-tabs {
  display: flex;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}
.av-tab {
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.av-tab:hover { color: #2563eb; background: #e0eaff; }
.av-tab.active { background: #2563eb; color: #fff; font-weight: 600; }

/* Navigator */
.agenda-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: center;
}
.agenda-nav-btn {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 18px;
  color: #1e3a5f;
  text-decoration: none;
  transition: all 0.15s;
  font-weight: 600;
}
.agenda-nav-btn:hover { background: #eff6ff; border-color: #2563eb; color: #2563eb; }
.agenda-period-label {
  font-size: 14.5px;
  font-weight: 700;
  color: #1e3a5f;
  min-width: 200px;
  text-align: center;
}
.agenda-nav-today {
  padding: 5px 14px;
  border: 1.5px solid #2563eb;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s;
}
.agenda-nav-today:hover { background: #2563eb; color: #fff; }

/* List/Calendar toggle */
.agenda-display-toggle {
  display: flex;
  gap: 4px;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 3px;
}
.adt-btn {
  width: 34px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  font-size: 15px;
  color: #64748b;
  text-decoration: none;
  transition: all 0.15s;
}
.adt-btn:hover { color: #2563eb; }
.adt-btn.active { background: #2563eb; color: #fff; }

/* Count row */
.agenda-count-row { margin-bottom: 14px; }
.agenda-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #eff6ff;
  color: #2563eb;
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 12.5px;
  font-weight: 600;
}

/* ── Empty state ──────────────────────────────────────────────── */
.agenda-empty {
  text-align: center;
  padding: 60px 24px;
  color: #94a3b8;
}
.agenda-empty-icon { font-size: 48px; margin-bottom: 12px; }
.agenda-empty p    { font-size: 14px; margin: 0 0 16px; }

/* ── LIST VIEW ────────────────────────────────────────────────── */
.agenda-day-group { margin-bottom: 24px; }

/* Day header */
.adg-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px 10px 0 0;
  border-bottom: none;
}
.adg-header.adg-today {
  background: #eff6ff;
  border-color: #bfdbfe;
}
.adg-day-num {
  font-size: 28px;
  font-weight: 800;
  color: #1e3a5f;
  line-height: 1;
  min-width: 36px;
}
.adg-today .adg-day-num { color: #2563eb; }
.adg-day-info { display: flex; flex-direction: column; flex: 1; }
.adg-weekday  { font-size: 14px; font-weight: 700; color: #1e3a5f; }
.adg-month    { font-size: 12px; color: #64748b; }
.adg-today-pill {
  background: #2563eb; color: #fff;
  font-size: 11px; font-weight: 700;
  padding: 2px 10px; border-radius: 20px;
}
.adg-event-count {
  font-size: 12px; color: #64748b;
  background: #f1f5f9;
  padding: 2px 10px; border-radius: 20px;
}

/* Event cards in list */
.adg-events {
  border: 1.5px solid #e2e8f0;
  border-top: none;
  border-radius: 0 0 10px 10px;
  overflow: hidden;
}
.agenda-event-card {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 14px 16px;
  border-top: 1px solid #f1f5f9;
  background: #fff;
  transition: background 0.12s;
}
.agenda-event-card:first-child { border-top: none; }
.agenda-event-card:hover { background: #f8fafc; }

.aec-time-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 58px;
  padding-right: 14px;
  color: #64748b;
  font-size: 12.5px;
  font-weight: 600;
  gap: 2px;
  padding-top: 2px;
}
.aec-time-start { color: #1e3a5f; font-size: 14px; font-weight: 700; }
.aec-time-sep   { color: #cbd5e1; font-size: 10px; }
.aec-time-end   { color: #94a3b8; font-size: 12px; }

.aec-accent {
  width: 3px;
  background: linear-gradient(180deg, #2563eb 0%, #0891b2 100%);
  border-radius: 3px;
  margin-right: 14px;
  flex-shrink: 0;
}
.aec-body   { flex: 1; min-width: 0; }
.aec-title  { font-size: 15px; font-weight: 700; color: #1e3a5f; margin-bottom: 4px; }
.aec-title a { color: #1e3a5f; text-decoration: none; }
.aec-title a:hover { color: #2563eb; text-decoration: underline; }
.aec-meta   { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: #64748b; margin-bottom: 4px; }
.aec-meta-icon { font-size: 12px; }
.aec-desc   { font-size: 12.5px; color: #94a3b8; margin-bottom: 6px; line-height: 1.5; }
.aec-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.aec-link   { font-size: 12.5px; color: #2563eb; text-decoration: none; font-weight: 600; }
.aec-link:hover { text-decoration: underline; }
.badge-amber { background: #fef3c7; color: #d97706; }

/* ── DAILY TIMELINE ──────────────────────────────────────────── */
.agenda-day-timeline {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}
.adt-header {
  padding: 12px 20px;
  background: #f8fafc;
  border-bottom: 1.5px solid #e2e8f0;
  font-size: 14px;
  font-weight: 700;
  color: #1e3a5f;
}
.adt-events { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.adt-event  {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #eff6ff;
  border: 1.5px solid #bfdbfe;
  border-radius: 10px;
}
.adt-time  { font-size: 16px; font-weight: 800; color: #2563eb; min-width: 52px; }
.adt-bar   { width: 3px; height: 40px; background: #2563eb; border-radius: 3px; }
.adt-info  { flex: 1; }
.adt-title { font-size: 14px; font-weight: 700; color: #1e3a5f; }
.adt-loc   { font-size: 12px; color: #64748b; margin-top: 2px; }
.adt-time-range { font-size: 11.5px; color: #94a3b8; margin-top: 2px; }

/* ── WEEKLY GRID ─────────────────────────────────────────────── */
.agenda-week-grid {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}
.awg-header-row {
  display: grid;
  grid-template-columns: 52px repeat(7,1fr);
  border-bottom: 1.5px solid #e2e8f0;
}
.awg-time-col { background: #f8fafc; }
.awg-day-header {
  padding: 10px 4px;
  text-align: center;
  border-left: 1px solid #f1f5f9;
  background: #f8fafc;
}
.awg-day-header.awg-today { background: #eff6ff; }
.awg-wday { font-size: 11px; color: #64748b; font-weight: 600; text-transform: uppercase; }
.awg-dnum { font-size: 20px; font-weight: 800; color: #1e3a5f; line-height: 1.1; }
.awg-day-header.awg-today .awg-dnum { color: #2563eb; }

.awg-body {
  display: grid;
  grid-template-columns: 52px 1fr;
  max-height: 600px;
  overflow-y: auto;
}
.awg-time-col {
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  border-right: 1px solid #e2e8f0;
}
.awg-hour-label {
  height: 60px;
  padding: 2px 6px;
  font-size: 10px;
  color: #94a3b8;
  text-align: right;
  border-bottom: 1px solid #f1f5f9;
  flex-shrink: 0;
}
.awg-days-area {
  position: relative;
  flex: 1;
}
.awg-hour-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.awg-hour-line {
  height: 60px;
  border-bottom: 1px solid #f1f5f9;
}
.awg-day-cols {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7,1fr);
  height: 1440px; /* 24h × 60px */
}
.awg-day-col {
  position: relative;
  border-left: 1px solid #f1f5f9;
}
.awg-today-col { background: #fafcff; }
.awg-event-block {
  position: absolute;
  left: 2px; right: 2px;
  background: linear-gradient(135deg,#2563eb,#0891b2);
  border-radius: 6px;
  padding: 3px 6px;
  overflow: hidden;
  cursor: pointer;
  z-index: 2;
  min-height: 24px;
}
.awg-event-title { font-size: 11px; font-weight: 700; color: #fff; line-height: 1.2; }
.awg-event-time  { font-size: 10px; color: rgba(255,255,255,0.8); }

/* ── MONTHLY GRID ────────────────────────────────────────────── */
.agenda-month-grid {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}
.amg-weekdays {
  display: grid;
  grid-template-columns: repeat(7,1fr);
  background: #1e3a5f;
}
.amg-weekdays div {
  padding: 10px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.amg-grid { display: flex; flex-direction: column; }
.amg-week-row {
  display: grid;
  grid-template-columns: repeat(7,1fr);
  border-bottom: 1px solid #f1f5f9;
}
.amg-week-row:last-child { border-bottom: none; }
.amg-day-cell {
  min-height: 100px;
  padding: 8px;
  border-right: 1px solid #f1f5f9;
  vertical-align: top;
  position: relative;
  transition: background 0.12s;
}
.amg-day-cell:last-child { border-right: none; }
.amg-day-cell:hover { background: #f8fafc; }
.amg-other-month { background: #fafafa; }
.amg-other-month .amg-day-num { color: #cbd5e1; }
.amg-today { background: #eff6ff !important; }
.amg-today .amg-day-num {
  background: #2563eb; color: #fff;
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.amg-day-num {
  font-size: 13px;
  font-weight: 700;
  color: #1e3a5f;
  margin-bottom: 4px;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
}
.amg-day-events { display: flex; flex-direction: column; gap: 3px; }
.amg-event-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(90deg,#2563eb,#0891b2);
  border-radius: 4px;
  padding: 2px 6px;
  overflow: hidden;
  cursor: pointer;
}
.amg-pill-time  { font-size: 9.5px; color: rgba(255,255,255,0.85); font-weight: 600; flex-shrink: 0; }
.amg-pill-title { font-size: 10.5px; color: #fff; font-weight: 600; overflow: hidden;
                   text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 768px) {
  .agenda-toolbar    { flex-direction: column; align-items: flex-start; }
  .agenda-nav        { justify-content: flex-start; }
  .agenda-period-label { min-width: auto; text-align: left; }
  .amg-day-cell      { min-height: 64px; padding: 4px; }
  .awg-body          { max-height: 400px; }
}
/* Preacher / MC highlight in event detail */
.detail-value-highlight {
  font-weight: 600;
  color: #2563eb;
}

/* ═══════════════════════════════════════════════════════════════
   EVENT VIEW — PARTICIPANTS
═══════════════════════════════════════════════════════════════ */
.event-view-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 20px;
  align-items: start;
}
.ev-left, .ev-right { display: flex; flex-direction: column; gap: 0; }

/* Participants */
.participants-header { display: flex; align-items: center; justify-content: space-between; }
.participant-empty { text-align: center; padding: 24px; color: #94a3b8; font-size: 13px; }
.participant-empty span { font-size: 28px; display: block; margin-bottom: 6px; }

.participant-role-header {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.08em; color: #64748b;
  padding: 10px 0 6px;
  border-bottom: 1.5px solid #f1f5f9;
  margin-bottom: 8px;
}
.participant-list { margin-bottom: 16px; }
.participant-card {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f8fafc;
}
.participant-card:last-child { border-bottom: none; }
.pc-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #1e3a5f, #2563eb);
  color: #fff; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.pc-info   { flex: 1; min-width: 0; }
.pc-name   { font-size: 13.5px; font-weight: 700; color: #1e3a5f; text-decoration: none; display: block; }
.pc-name:hover { color: #2563eb; text-decoration: underline; }
.pc-title  { font-size: 11.5px; color: #64748b; display: block; }
.pc-note   { font-size: 11px; color: #94a3b8; font-style: italic; display: block; }
.pc-remove-btn {
  width: 24px; height: 24px; border-radius: 50%;
  background: none; border: 1.5px solid #e2e8f0;
  color: #94a3b8; cursor: pointer; font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; flex-shrink: 0;
}
.pc-remove-btn:hover { background: #fee2e2; border-color: #fca5a5; color: #dc2626; }

/* Add participant form */
.add-participant-form {
  border-top: 1.5px solid #e2e8f0;
  padding-top: 14px;
  margin-top: 4px;
}
.apf-title { font-size: 12px; font-weight: 700; color: #64748b; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.05em; }
.apf-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.apf-row .filter-select, .apf-row .filter-input { min-width: 130px; }

@media (max-width: 900px) {
  .event-view-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════
   USER PROFILE VIEW
═══════════════════════════════════════════════════════════════ */
.user-view-grid {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 20px;
  align-items: start;
}
.uv-profile-card {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 24px 20px;
  text-align: center;
  position: sticky;
  top: 20px;
}
.uv-avatar-wrap { margin-bottom: 14px; }
.uv-avatar-img {
  width: 88px; height: 88px; border-radius: 50%;
  object-fit: cover;
  border: 3px solid #e2e8f0;
}
.uv-avatar-initials {
  width: 88px; height: 88px; border-radius: 50%;
  background: linear-gradient(135deg, #1e3a5f, #2563eb);
  color: #fff; font-size: 28px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto;
}
.uv-name   { font-size: 17px; font-weight: 800; color: #1e3a5f; }
.uv-title  { font-size: 13px; color: #2563eb; font-weight: 600; margin-top: 3px; }
.uv-office { font-size: 12px; color: #64748b; margin-top: 4px; }
.uv-links  { display: flex; gap: 8px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.uv-link-btn {
  padding: 5px 12px; border: 1.5px solid #e2e8f0;
  border-radius: 20px; font-size: 12px; color: #1e3a5f;
  text-decoration: none; transition: all 0.15s;
}
.uv-link-btn:hover { border-color: #2563eb; color: #2563eb; background: #eff6ff; }
.uv-bio  { font-size: 13.5px; color: #475569; line-height: 1.7; margin: 0; }
.uv-right { display: flex; flex-direction: column; gap: 16px; }

@media (max-width: 768px) {
  .user-view-grid { grid-template-columns: 1fr; }
  .uv-profile-card { position: static; }
}


/* ── User profile — QR section below profile card ── */
.uv-qr-wrap {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1.5px dashed #e2e8f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.uv-qr-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}
.uv-qr-img {
  width: 148px;
  height: 148px;
  border-radius: 10px;
  border: 2px solid #e2e8f0;
  padding: 6px;
  background: #fff;
}
.uv-qr-code {
  font-size: 11.5px;
  font-weight: 700;
  color: #1e3a5f;
  letter-spacing: 0.06em;
  font-family: monospace;
  background: #f1f5f9;
  padding: 4px 12px;
  border-radius: 20px;
}
.uv-qr-hint { font-size: 11px; color: #94a3b8; text-align: center; }

/* ── Attendance check-in grid ── */
.attendance-checkin-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
  align-items: start;
}