/* ═══════════════════════════════════════════════
   COACHLAB HUB — Professional Community Platform
   Anzan Academy / Mastermind Maroc CoachLab
═══════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800;900&display=swap');

:root {
  --gold:    #E6B730;
  --gold2:   #F4C430;
  --gold-p:  #FDF8E4;
  --navy:    #1a2744;
  --navy2:   #243460;
  --navy3:   #2d3f6b;
  --green:   #10b981;
  --red:     #ef4444;
  --orange:  #f59e0b;
  --blue:    #3b82f6;
  --purple:  #8b5cf6;
  --pink:    #ec4899;
  --teal:    #14b8a6;
  --bg:      #f0f4f8;
  --white:   #ffffff;
  --card:    #ffffff;
  --border:  #e2e8f0;
  --text:    #1e293b;
  --muted:   #64748b;
  --sb-w:    240px;
}

/* ── Reset ── */
#cl-hub *, #cl-hub *::before, #cl-hub *::after { box-sizing: border-box; }
#cl-hub button { cursor: pointer; font-family: 'Cairo', sans-serif; }
#cl-hub a { text-decoration: none; }
#cl-hub input, #cl-hub select, #cl-hub textarea { font-family: 'Cairo', sans-serif; }

/* ── Layout ── */
#cl-hub {
  display: flex;
  min-height: 80vh;
  background: var(--bg);
  font-family: 'Cairo', sans-serif;
  direction: rtl;
  color: var(--text);
  border-radius: 16px;
  overflow: visible;
  box-shadow: 0 8px 48px rgba(0,0,0,.12);
  position: relative;
}
/* Clip the layout without blocking fixed modals */
#cl-hub > nav, #cl-hub > main {
  border-radius: 16px;
}

/* ════════════════════════════════
   SIDEBAR
════════════════════════════════ */
.cl-sidebar {
  width: var(--sb-w);
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy2) 100%);
  display: flex;
  flex-direction: column;
  padding: 0;
  flex-shrink: 0;
  z-index: 100;
  transition: transform .3s ease;
}

.cl-sb-logo {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  gap: 12px;
}
.cl-sb-avatar {
  width: 42px; height: 42px;
  background: var(--gold);
  color: var(--navy);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 900;
  flex-shrink: 0;
}
.cl-sb-name { color: white; font-size: 15px; font-weight: 700; }

.cl-sb-nav { flex: 1; padding: 12px 0; overflow-y: auto; }
.cl-nav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 20px;
  background: none;
  border: none;
  color: rgba(255,255,255,.7);
  font-size: 14px;
  font-weight: 600;
  text-align: right;
  transition: all .2s;
  border-right: 3px solid transparent;
}
.cl-nav-btn:hover { background: rgba(255,255,255,.08); color: white; }
.cl-nav-btn.cl-active {
  background: rgba(230,183,48,.15);
  color: var(--gold);
  border-right-color: var(--gold);
}
.cl-nav-ic { font-size: 18px; flex-shrink: 0; }
.cl-nav-lb { font-size: 14px; }

.cl-sb-social {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex; gap: 10px;
}
.cl-social-btn {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; background: rgba(255,255,255,.1); color: white;
  transition: background .2s;
}
.cl-social-btn:hover { background: var(--gold); }

/* ════════════════════════════════
   MAIN CONTENT
════════════════════════════════ */
.cl-main {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Mobile top bar */
.cl-topbar {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--navy);
  color: white;
  position: sticky; top: 0; z-index: 50;
}
.cl-menu-btn {
  background: none; border: none; color: white;
  font-size: 20px; padding: 0; line-height: 1;
}
.cl-topbar-title { flex: 1; font-size: 15px; font-weight: 700; }
.cl-topbar-av {
  width: 34px; height: 34px;
  background: var(--gold); color: var(--navy);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px;
}

/* Views */
.cl-view { display: none; padding: 28px; animation: clFadeIn .3s ease; }
.cl-view.cl-show { display: block; }
@keyframes clFadeIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }

/* Page Header */
.cl-page-header { margin-bottom: 24px; }
.cl-ph-title { font-size: 24px; font-weight: 900; color: var(--navy); margin: 0 0 6px; }
.cl-ph-sub { color: var(--muted); font-size: 14px; margin: 0; }

/* Section title */
.cl-section-title { font-size: 16px; font-weight: 800; color: var(--navy); margin: 24px 0 14px; border-right: 4px solid var(--gold); padding-right: 10px; }

/* ════════════════════════════════
   STATS ROW
════════════════════════════════ */
.cl-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}
.cl-stat {
  background: var(--white);
  border-radius: 14px;
  padding: 18px 16px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
.cl-stat-ic { font-size: 24px; margin-bottom: 6px; }
.cl-stat-vl { font-size: 26px; font-weight: 900; margin-bottom: 2px; }
.cl-stat-lb { font-size: 12px; color: var(--muted); }

/* ════════════════════════════════
   QUICK GRID
════════════════════════════════ */
.cl-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}
.cl-qcard {
  border-radius: 16px;
  padding: 20px 16px;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.cl-qcard:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,.15); }
.cl-qcard-ic { font-size: 28px; margin-bottom: 10px; }
.cl-qcard-title { font-size: 14px; font-weight: 800; margin-bottom: 4px; }
.cl-qcard-sub { font-size: 12px; line-height: 1.4; }

/* ════════════════════════════════
   NEXT MEETING
════════════════════════════════ */
.cl-next-meeting {
  background: linear-gradient(135deg, var(--navy), var(--navy2));
  color: white;
  border-radius: 16px;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.cl-nm-title { font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.cl-nm-meta { font-size: 13px; opacity: .8; margin-bottom: 8px; }
.cl-nm-desc { font-size: 13px; opacity: .7; }
.cl-nm-action { display: flex; flex-direction: column; align-items: center; gap: 10px; flex-shrink: 0; }
.cl-nm-count { font-size: 13px; opacity: .8; }

/* ════════════════════════════════
   CARDS GRID
════════════════════════════════ */
.cl-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.cl-card {
  background: var(--white);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  border: 1px solid var(--border);
  transition: box-shadow .2s, transform .2s;
  position: relative;
}
.cl-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.1); transform: translateY(-2px); }
.cl-card-featured { border: 2px solid var(--gold); }
.cl-featured-badge {
  position: absolute; top: -10px; right: 16px;
  background: var(--gold); color: var(--navy);
  padding: 3px 12px; border-radius: 20px; font-size: 12px; font-weight: 800;
}
.cl-card-header { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.cl-card-title { font-size: 15px; font-weight: 800; color: var(--navy); margin: 0 0 6px; line-height: 1.4; }
.cl-card-author { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.cl-card-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.cl-card-meta span { background: var(--bg); padding: 3px 10px; border-radius: 20px; font-size: 12px; color: var(--muted); }
.cl-card-desc { font-size: 13px; color: var(--muted); line-height: 1.6; margin: 0 0 14px; }
.cl-card-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.cl-regs-count { font-size: 13px; color: var(--muted); font-weight: 600; }

/* ════════════════════════════════
   BADGES
════════════════════════════════ */
.cl-badge {
  padding: 4px 12px; border-radius: 20px;
  font-size: 11px; font-weight: 700; white-space: nowrap;
}
.cl-badge-green  { background: #d1fae5; color: #065f46; }
.cl-badge-yellow { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.cl-badge-red    { background: #fee2e2; color: #991b1b; }
.cl-badge-gold   { background: var(--gold); color: var(--navy); }
.cl-badge-outline{ background: var(--bg); color: var(--muted); border: 1px solid var(--border); }

/* ════════════════════════════════
   BUTTONS
════════════════════════════════ */
.cl-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: 10px; border: none;
  font-family: 'Cairo', sans-serif; font-size: 14px; font-weight: 700;
  transition: all .2s; cursor: pointer; white-space: nowrap;
  text-decoration: none;
}
.cl-btn:hover { opacity: .88; transform: translateY(-1px); }
.cl-btn-gold    { background: linear-gradient(135deg,var(--gold),var(--gold2)); color: var(--navy); }
.cl-btn-navy    { background: var(--navy); color: white; }
.cl-btn-outline { background: transparent; border: 2px solid var(--border); color: var(--navy); }
.cl-btn-outline:hover { border-color: var(--gold); }
.cl-btn-joined  { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.cl-btn-joined:hover { background: var(--red); color: white; border-color: var(--red); }
.cl-btn-disabled{ background: #f1f5f9; color: var(--muted); cursor: not-allowed; }
.cl-btn-disabled:hover { transform: none; opacity: 1; }
.cl-btn-danger  { background: #fff5f5; color: var(--red); border: 1px solid #fecaca; }
.cl-btn-danger:hover { background: var(--red); color: white; }
.cl-btn-wa      { background: #25d366; color: white; }
.cl-btn-sm      { padding: 6px 14px; font-size: 12px; border-radius: 8px; }
.cl-btn-block   { width: 100%; margin-top: 16px; padding: 14px; font-size: 15px; border-radius: 12px; }

/* ════════════════════════════════
   RECORDINGS GRID
════════════════════════════════ */
.cl-recordings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.cl-rec-card {
  background: var(--white);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,.07);
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  border: 1px solid var(--border);
}
.cl-rec-card:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(0,0,0,.12); }
.cl-rec-thumb {
  height: 150px;
  background: var(--navy2) center/cover no-repeat;
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.cl-play-btn {
  width: 52px; height: 52px;
  background: rgba(230,183,48,.9);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: var(--navy);
  transition: transform .2s;
}
.cl-rec-card:hover .cl-play-btn { transform: scale(1.1); }
.cl-rec-dur { position: absolute; bottom: 8px; left: 8px; background: rgba(0,0,0,.7); color: white; padding: 2px 8px; border-radius: 6px; font-size: 12px; }
.cl-rec-info { padding: 14px; }
.cl-rec-title { font-size: 14px; font-weight: 700; color: var(--navy); margin-bottom: 6px; line-height: 1.4; }
.cl-rec-meta { font-size: 12px; color: var(--muted); }

/* Video Modal */
.cl-modal {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.85); z-index: 9999;
  align-items: center; justify-content: center;
}
.cl-modal.cl-open { display: flex; }
.cl-modal-inner { background: #000; border-radius: 12px; overflow: hidden; width: min(860px,95vw); }
.cl-modal-header { background: var(--navy); padding: 14px 20px; display: flex; justify-content: space-between; align-items: center; }
.cl-modal-close { background: rgba(255,255,255,.2); color: white; border: none; border-radius: 6px; padding: 6px 12px; font-size: 14px; }
.cl-video-wrap { position: relative; padding-bottom: 56.25%; height: 0; }
.cl-video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ════════════════════════════════
   CONTENT FEED
════════════════════════════════ */
.cl-feed { display: flex; flex-direction: column; gap: 16px; }
.cl-feed-item {
  background: var(--white);
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  border: 1px solid var(--border);
}
.cl-feed-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.cl-feed-author { display: flex; align-items: center; gap: 10px; }
.cl-mini-av { width: 36px; height: 36px; background: var(--gold); color: var(--navy); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; flex-shrink: 0; }
.cl-feed-name { font-size: 14px; font-weight: 700; color: var(--navy); }
.cl-feed-date { font-size: 12px; color: var(--muted); }
.cl-feed-title { font-size: 16px; font-weight: 800; color: var(--navy); margin: 0 0 8px; }
.cl-feed-body { font-size: 14px; color: var(--muted); line-height: 1.7; margin: 0 0 10px; }
.cl-feed-link { color: var(--blue); font-size: 13px; font-weight: 600; }
.cl-feed-actions { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.cl-like-btn { background: none; border: 1.5px solid var(--border); border-radius: 20px; padding: 6px 14px; font-size: 14px; font-weight: 600; color: var(--muted); transition: all .2s; display: inline-flex; align-items: center; gap: 6px; }
.cl-like-btn:hover, .cl-like-btn.cl-liked { background: #fff0f5; border-color: #fecdd3; color: var(--red); }

/* ════════════════════════════════
   LIBRARY
════════════════════════════════ */
.cl-filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.cl-filter-btn { background: var(--white); border: 1.5px solid var(--border); color: var(--muted); padding: 7px 16px; border-radius: 20px; font-family: 'Cairo',sans-serif; font-size: 13px; font-weight: 600; transition: all .2s; }
.cl-filter-btn:hover, .cl-filter-btn.cl-filter-active { background: var(--navy); border-color: var(--navy); color: white; }

.cl-library-grid { display: flex; flex-direction: column; gap: 12px; }
.cl-lib-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: box-shadow .2s;
  box-shadow: 0 1px 6px rgba(0,0,0,.05);
}
.cl-lib-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); }
.cl-lib-icon { font-size: 28px; flex-shrink: 0; }
.cl-lib-info { flex: 1; min-width: 0; }
.cl-lib-title { font-size: 15px; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.cl-lib-meta { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.cl-lib-desc { font-size: 13px; color: var(--muted); }
.cl-lib-btn { background: var(--gold); color: var(--navy); padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 700; flex-shrink: 0; }

/* ════════════════════════════════
   PROGRESS BAR
════════════════════════════════ */
.cl-progress-bar { height: 6px; background: var(--bg); border-radius: 10px; margin: 10px 0 4px; overflow: hidden; }
.cl-progress-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--green)); border-radius: 10px; transition: width .5s ease; }
.cl-progress-label { font-size: 12px; color: var(--muted); margin-bottom: 10px; }

/* ════════════════════════════════
   FORMS
════════════════════════════════ */
.cl-form-section { margin-bottom: 28px; }
.cl-toggle-form-btn {
  background: var(--gold-p); border: 2px solid var(--gold); color: var(--navy);
  padding: 11px 24px; border-radius: 12px; font-family: 'Cairo',sans-serif;
  font-size: 14px; font-weight: 700; transition: all .2s; cursor: pointer;
  margin-bottom: 16px;
}
.cl-toggle-form-btn:hover { background: var(--gold); }

.cl-form-wrap { background: var(--white); border-radius: 16px; padding: 24px; border: 1px solid var(--border); box-shadow: 0 2px 12px rgba(0,0,0,.07); }
.cl-form { /* no extra styles needed */ }
.cl-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cl-fg { display: flex; flex-direction: column; gap: 6px; }
.cl-fg label { font-size: 13px; font-weight: 700; color: var(--navy); }
.cl-full { grid-column: 1 / -1; }
.cl-fg input, .cl-fg select, .cl-fg textarea {
  border: 2px solid var(--border); border-radius: 10px;
  padding: 10px 14px; font-family: 'Cairo',sans-serif; font-size: 14px;
  direction: rtl; background: var(--bg); transition: border-color .2s; outline: none;
}
.cl-fg input:focus, .cl-fg select:focus, .cl-fg textarea:focus {
  border-color: var(--gold); background: white; box-shadow: 0 0 0 3px rgba(230,183,48,.15);
}
.cl-checkbox-lbl { display: flex; align-items: center; gap: 10px; font-size: 13px; cursor: pointer; }
.cl-checkbox-lbl input { width: 18px; height: 18px; accent-color: var(--gold); }

/* ════════════════════════════════
   MY SPACE
════════════════════════════════ */
.cl-sub-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; border-bottom: 2px solid var(--border); padding-bottom: 14px; }
.cl-sub-tab {
  background: var(--white); border: 1.5px solid var(--border);
  color: var(--muted); padding: 8px 16px; border-radius: 10px;
  font-family: 'Cairo',sans-serif; font-size: 13px; font-weight: 700; transition: all .2s;
}
.cl-sub-tab:hover { border-color: var(--gold); color: var(--navy); }
.cl-sub-tab.cl-sub-active { background: var(--navy); border-color: var(--navy); color: white; }
.cl-sub-panel { display: none; }
.cl-sub-panel.cl-sub-show { display: block; }

.cl-my-item {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px 20px; margin-bottom: 12px;
  box-shadow: 0 1px 6px rgba(0,0,0,.05);
}
.cl-my-item-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.cl-my-title { font-size: 15px; font-weight: 800; color: var(--navy); margin-bottom: 4px; }
.cl-my-meta { font-size: 12px; color: var(--muted); }
.cl-my-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cl-admin-note { background: #fff7ed; border: 1px solid #fed7aa; border-radius: 8px; padding: 8px 12px; font-size: 13px; color: #9a3412; margin-bottom: 10px; }

/* Sessions in my-courses */
.cl-my-sessions { margin: 10px 0; display: flex; flex-direction: column; gap: 6px; }
.cl-sess-pill { display: flex; align-items: center; gap: 10px; background: var(--bg); border-radius: 8px; padding: 8px 12px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.cl-sess-n { width: 22px; height: 22px; background: var(--gold); color: var(--navy); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; flex-shrink: 0; }

/* Session builder */
.cl-sess-builder-hd { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 15px; font-weight: 800; color: var(--navy); }
.cl-sess-build-item { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 14px; margin-bottom: 10px; position: relative; }
.cl-sess-build-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.cl-sess-build-grid label { font-size: 12px; font-weight: 700; display: block; margin-bottom: 3px; color: var(--navy); }
.cl-sess-build-grid input, .cl-sess-build-grid select { width: 100%; padding: 7px 10px; border: 1.5px solid var(--border); border-radius: 7px; font-size: 13px; font-family: 'Cairo',sans-serif; background: white; }
.cl-sess-del-btn { position: absolute; top: 10px; left: 10px; background: var(--red); color: white; border: none; border-radius: 6px; padding: 3px 8px; font-size: 12px; }

/* Messages */
.cl-msg { border-radius: 10px; padding: 12px 16px; margin-bottom: 14px; font-weight: 700; font-size: 14px; }
.cl-msg-ok  { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.cl-msg-err { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* Empty states */
.cl-empty { text-align: center; padding: 52px 20px; color: var(--muted); }
.cl-empty-ic { font-size: 52px; margin-bottom: 12px; }
.cl-empty p { font-size: 15px; margin: 0; }

/* ════════════════════════════════
   RESPONSIVE — MOBILE
════════════════════════════════ */
@media (max-width: 768px) {
  #cl-hub { flex-direction: column; border-radius: 8px; }
  
  .cl-sidebar {
    position: fixed; right: 0; top: 0; bottom: 0;
    width: 260px; z-index: 200;
    transform: translateX(100%);
  }
  .cl-sidebar.cl-open { transform: translateX(0); box-shadow: -4px 0 24px rgba(0,0,0,.3); }
  
  .cl-topbar { display: flex; }
  .cl-view { padding: 16px; }
  
  .cl-stats-row { grid-template-columns: 1fr 1fr; }
  .cl-quick-grid { grid-template-columns: 1fr 1fr; }
  .cl-form-grid { grid-template-columns: 1fr; }
  .cl-sess-build-grid { grid-template-columns: 1fr 1fr; }
  .cl-cards-grid { grid-template-columns: 1fr; }
  .cl-recordings-grid { grid-template-columns: 1fr 1fr; }
  .cl-ph-title { font-size: 20px; }
  .cl-quick-grid .cl-qcard { padding: 16px 12px; }
}

@media (max-width: 480px) {
  .cl-stats-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .cl-quick-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .cl-recordings-grid { grid-template-columns: 1fr; }
}

/* ════════════════════════════════
   LIBRARY — DRIVE LINKS
════════════════════════════════ */
.cl-lib-links { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.cl-lib-link-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: 8px;
  font-size: 12px; font-weight: 700; text-decoration: none;
  transition: all .2s;
}
.cl-lib-link-primary { background: var(--navy); color: white; }
.cl-lib-link-primary:hover { background: var(--navy2); }
.cl-lib-link-drive   { background: #4285f4; color: white; }
.cl-lib-link-drive:hover { background: #1a73e8; }

/* ════════════════════════════════
   FILTER BARS — MULTIPLE ROWS
════════════════════════════════ */
.cl-filter-bar + .cl-filter-bar { margin-top: -6px; }

/* ════════════════════════════════
   MEETING CITY BADGE
════════════════════════════════ */
.cl-badge-city { background: var(--gold-p); color: var(--navy); border: 1px solid var(--gold); }

/* ════════════════════════════════
   RECORDING ADMIN PREVIEW
════════════════════════════════ */
.qr-preview-wrap { border-radius: 10px; overflow: hidden; margin-top: 8px; }
.qr-preview-wrap img { width: 100%; height: 110px; object-fit: cover; display: block; }

/* ════════════════════════════════
   STAR RATING
════════════════════════════════ */
.cl-stars-wrap {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  direction: ltr;
}
.cl-star {
  font-size: 18px;
  cursor: pointer;
  transition: transform .15s;
  line-height: 1;
}
.cl-star:hover { transform: scale(1.25); }
.cl-star-on   { color: var(--gold); }
.cl-star-off  { color: #d1d5db; }
.cl-star-mine { color: #f59e0b; text-shadow: 0 0 4px rgba(245,158,11,.4); }
.cl-star-hover { color: var(--gold2); }
.cl-stars-count {
  font-size: 12px;
  color: var(--muted);
  margin-right: 6px;
  font-weight: 600;
  white-space: nowrap;
}
.cl-rec-rating { padding: 4px 0; }

/* ════════════════════════════════
   LEADERBOARD
════════════════════════════════ */
.cl-leaderboard { margin-bottom: 28px; }
.cl-lb-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.cl-lb-card {
  background: var(--white);
  border-radius: 16px;
  padding: 22px 16px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  border: 2px solid var(--border);
  transition: transform .2s;
}
.cl-lb-card:hover { transform: translateY(-4px); }
.cl-lb-first {
  background: linear-gradient(135deg,#fff8e1,#fffde7);
  border-color: var(--gold);
  box-shadow: 0 4px 20px rgba(230,183,48,.2);
}
.cl-lb-medal { font-size: 32px; margin-bottom: 10px; }
.cl-lb-av {
  width: 52px; height: 52px;
  background: var(--navy); color: var(--gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 900;
  margin: 0 auto 10px;
}
.cl-lb-first .cl-lb-av { background: var(--gold); color: var(--navy); }
.cl-lb-name { font-size: 14px; font-weight: 800; color: var(--navy); margin-bottom: 4px; }
.cl-lb-pts  { font-size: 13px; font-weight: 700; color: var(--gold); margin-bottom: 8px; }
.cl-lb-badges { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.cl-lb-badges span {
  background: var(--bg); color: var(--muted);
  padding: 3px 8px; border-radius: 20px; font-size: 11px; font-weight: 600;
}

/* ════════════════════════════════
   RECORDING DOMAIN BADGE
════════════════════════════════ */
.cl-rec-domain-badge {
  position: absolute;
  top: 8px; right: 8px;
  background: rgba(26,39,68,.85);
  color: var(--gold);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  backdrop-filter: blur(4px);
}

@media (max-width: 768px) {
  .cl-lb-grid { grid-template-columns: 1fr; }
  .cl-lb-card { display: flex; align-items: center; gap: 14px; text-align: right; padding: 14px 16px; }
  .cl-lb-medal { font-size: 24px; margin-bottom: 0; }
  .cl-lb-av { width: 40px; height: 40px; font-size: 17px; margin: 0; flex-shrink: 0; }
  .cl-lb-badges { justify-content: flex-start; }
}

/* ════════════════════════════════
   TIER SYSTEM
════════════════════════════════ */
.cl-sb-pts {
  font-size: 11px;
  color: var(--gold);
  font-weight: 700;
  margin-top: 2px;
}
.cl-sb-role { margin-top: 3px; }
.cl-tier-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 20px;
  font-size: 11px; font-weight: 700; color: white;
}

.cl-tier-card {
  background: white;
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 20px 22px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  flex-wrap: wrap;
}
.cl-tier-left {
  display: flex; align-items: center; gap: 14px;
}
.cl-tier-badge-big { font-size: 40px; }
.cl-tier-name { font-size: 20px; font-weight: 900; }
.cl-tier-pts  { font-size: 13px; color: var(--muted); font-weight: 600; }
.cl-tier-right { flex: 1; min-width: 200px; }
.cl-tier-progress-label { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.cl-tier-perks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cl-perk-badge {
  display: inline-block;
  padding: 4px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700;
  border: 1px solid;
}

/* ════════════════════════════════
   LEADERBOARD TIER
════════════════════════════════ */
.cl-lb-tier {
  font-size: 12px; font-weight: 700;
  color: var(--muted); margin-bottom: 4px;
}

@media (max-width: 600px) {
  .cl-tier-card { flex-direction: column; }
}

/* ════════════════════════════════
   PAY WALL & INFO BANNER
════════════════════════════════ */
.cl-pay-wall {
  background: linear-gradient(135deg, var(--navy), var(--navy2));
  color: white; border-radius: 16px; padding: 36px 28px;
  text-align: center; margin-bottom: 20px;
}
.cl-pw-icon  { font-size: 52px; margin-bottom: 12px; }
.cl-pw-title { font-size: 20px; font-weight: 900; margin-bottom: 10px; }
.cl-pw-text  { font-size: 14px; opacity: .8; line-height: 1.8; margin-bottom: 0; }
.cl-info-banner {
  background: #fff8e1; color: #856404;
  border: 1px solid #fcd34d; border-radius: 10px;
  padding: 12px 16px; margin-bottom: 16px; font-size: 13px; font-weight: 600;
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
}
.cl-rec-locked { opacity: .8; }
.cl-rec-locked .cl-rec-thumb { filter: brightness(.7); }

/* ════════════════════════════════
   REFERRAL BOX
════════════════════════════════ */
.cl-ref-box {
  background: white; border-radius: 16px; padding: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,.07); margin-bottom: 20px;
}
.cl-ref-title { font-size: 17px; font-weight: 800; color: var(--navy); margin-bottom: 8px; }
.cl-ref-desc  { font-size: 13px; color: var(--muted); margin-bottom: 16px; line-height: 1.7; }
.cl-ref-link-wrap { display: flex; gap: 8px; margin-bottom: 16px; }
.cl-ref-input {
  flex: 1; padding: 10px 14px; border: 2px solid var(--border);
  border-radius: 10px; font-size: 13px; color: var(--muted);
  direction: ltr; font-family: monospace;
}
.cl-ref-stats { display: flex; gap: 20px; }
.cl-ref-stat { background: var(--bg); border-radius: 10px; padding: 12px 20px; text-align: center; }
.cl-ref-stat-n { font-size: 22px; font-weight: 900; color: var(--navy); }
.cl-ref-stat-l { font-size: 12px; color: var(--muted); }

/* Upgrade banner (top of home) */
.cl-upgrade-banner {
  background: linear-gradient(135deg,#1a2744,#243460);
  color: white; border-radius: 14px; padding: 18px 22px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; margin-bottom: 20px; flex-wrap: wrap;
}
.cl-ub-left { display: flex; align-items: center; gap: 14px; }
.cl-ub-icon { font-size: 28px; }
.cl-ub-title { font-size: 15px; font-weight: 800; }
.cl-ub-sub   { font-size: 12px; opacity: .75; margin-top: 2px; }

/* Upgrade button in sidebar */
.cl-upgrade-btn {
  display: block; margin: 0 12px 8px;
  background: linear-gradient(135deg,#E6B730,#F4C430);
  color: #1a2744; text-decoration: none; text-align: center;
  padding: 10px 14px; border-radius: 10px;
  font-size: 13px; font-weight: 800; transition: opacity .2s;
}
.cl-upgrade-btn:hover { opacity: .9; }

/* Free badge */
.cl-free-badge {
  background: #f1f5f9; color: #64748b;
  padding: 2px 8px; border-radius: 12px; font-size: 11px; font-weight: 700;
}

/* Lock banner */
.cl-lock-banner {
  background: #fff8e1; color: #856404;
  border: 1px solid #fcd34d; border-radius: 10px;
  padding: 12px 16px; margin-bottom: 16px;
  font-size: 13px;
}

/* ════════════════════════════════
   REGISTERED NAMES AVATARS
════════════════════════════════ */
.cl-reg-names {
  display: flex;
  align-items: center;
  gap: -6px;
  margin: 10px 0;
  flex-wrap: nowrap;
}
.cl-reg-av {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
  border: 2px solid white;
  margin-left: -6px;
  flex-shrink: 0;
  cursor: default;
  transition: transform .2s;
}
.cl-reg-av:hover { transform: scale(1.15); z-index: 2; }
.cl-reg-more {
  background: var(--gold);
  color: var(--navy);
  font-size: 10px;
}

/* Share button */
.cl-share-btn {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 16px;
  cursor: pointer;
  transition: background .2s;
}
.cl-share-btn:hover { background: var(--gold-p); border-color: var(--gold); }

/* ════════════════════════════════
   NAMES CHIPS IN MEETINGS
════════════════════════════════ */
.cl-reg-names-list {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 10px 0; padding: 8px;
  background: var(--bg); border-radius: 10px;
}
.cl-reg-name-chip {
  background: var(--navy); color: var(--gold);
  padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700;
}

/* ════════════════════════════════
   ARCHIVE VIEW
════════════════════════════════ */
.cl-arch-year { margin-bottom: 14px; }
.cl-arch-year-hd {
  background: var(--navy); color: white;
  border-radius: 12px; padding: 14px 18px;
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer; font-weight: 800; font-size: 16px;
  transition: background .2s;
}
.cl-arch-year-hd:hover { background: var(--navy2); }
.cl-arch-arrow { font-size: 18px; transition: transform .3s; }
.cl-arch-year-hd.open .cl-arch-arrow { transform: rotate(180deg); }
.cl-arch-body {
  display: none; padding: 16px 0 0;
}
.cl-arch-body.open { display: block; }
.cl-arch-section-title {
  font-size: 14px; font-weight: 800; color: var(--navy);
  margin-bottom: 12px; padding-right: 8px;
  border-right: 3px solid var(--gold);
}

/* ════════════════════════════════
   CHECKBOX GROUPS IN FORMS
════════════════════════════════ */
.cl-check-group {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px;
}
.cl-check-label {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: 20px; padding: 5px 12px; font-size: 12px;
  cursor: pointer; transition: all .2s; white-space: nowrap;
}
.cl-check-label:hover { border-color: var(--gold); background: var(--gold-p); }
.cl-check-label input[type=checkbox] { accent-color: var(--gold); }

/* ════════════════════════════════
   MEETING PROPOSALS
════════════════════════════════ */
.cl-proposals-list {
  background: #f8f9fa; border-radius: 10px;
  padding: 10px 12px; margin: 8px 0;
}
.cl-proposals-title {
  font-size: 12px; font-weight: 800; color: var(--navy);
  margin-bottom: 8px;
}
.cl-proposal-item {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 6px 0; border-bottom: 1px solid #eee; font-size: 12px;
}
.cl-proposal-item:last-child { border-bottom: none; }
.cl-proposal-icon { font-size: 16px; flex-shrink: 0; }
.cl-proposal-title { font-weight: 700; color: var(--navy); }
.cl-proposal-by { color: var(--muted); font-size: 11px; }
.cl-meeting-proposal {
  background: #eff6ff; border: 1.5px solid #bfdbfe;
  border-radius: 12px; padding: 14px; margin-top: 10px;
}
.cl-mp-title {
  font-size: 13px; font-weight: 800; color: #1e40af; margin-bottom: 10px;
}
.cl-mp-select,.cl-mp-input,.cl-mp-textarea {
  width: 100%; border: 1.5px solid #bfdbfe; border-radius: 8px;
  padding: 8px 12px; font-size: 13px; font-family: inherit;
  margin-bottom: 8px; outline: none; background: white;
}
.cl-mp-textarea { height: 60px; resize: none; }
.cl-mp-msg { font-size: 12px; margin-top: 6px; font-weight: 700; }

/* ════════════════════════════════
   PROFILE PANEL
════════════════════════════════ */
.cl-profile-preview {
  background: linear-gradient(135deg, var(--navy), var(--navy2));
  color: white; border-radius: 16px; padding: 20px;
  display: flex; gap: 16px; align-items: flex-start; margin-bottom: 20px;
}
.cl-profile-photos { display: flex; gap: 10px; flex-shrink: 0; }
.cl-profile-photo, .cl-profile-logo {
  width: 64px; height: 64px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--gold);
}
.cl-profile-photo-empty, .cl-profile-logo-empty {
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(255,255,255,.1); border: 2px dashed rgba(255,255,255,.3);
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; font-size: 18px; color: rgba(255,255,255,.5);
  font-size: 11px; text-align: center; gap: 2px;
}
.cl-profile-info { flex: 1; }
.cl-profile-name { font-size: 18px; font-weight: 900; }
.cl-profile-title { font-size: 13px; color: var(--gold); margin-top: 4px; }
.cl-profile-meta { font-size: 12px; opacity: .75; margin-top: 3px; }

/* ════════════════════════════════
   PRESENTATION LINKS
════════════════════════════════ */
.cl-pres-links {
  display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px;
}
.cl-pres-link {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 12px; border-radius: 20px;
  font-size: 12px; font-weight: 700; text-decoration: none;
  border: none; cursor: pointer; font-family: inherit;
  transition: opacity .2s;
}
.cl-pres-link:hover { opacity: .85; }
.cl-pres-link-slides  { background: #f0f9ff; color: #0369a1; border: 1.5px solid #bae6fd; }
.cl-pres-link-zoom    { background: #eff6ff; color: #2563eb; border: 1.5px solid #bfdbfe; }
.cl-pres-link-live    { background: #fef3c7; color: #b45309; border: 1.5px solid #fcd34d; }
.cl-pres-link-locked  { background: #f1f5f9; color: #868e96; border: 1.5px solid #e2e8f0; }
.cl-pres-link-share   { background: var(--navy); color: white; border: none; margin-right: auto; }

/* Override modal-inner for share modals (not video) */
#pres-share-modal .cl-modal-inner,
#share-modal .cl-modal-inner {
    background: white !important;
    border-radius: 20px !important;
    overflow: visible !important;
    width: min(420px, 95vw) !important;
}
