/* ===================================================================
   BoardHQ — Stylesheet v1
   Brand colours: Black · Red · Grey · White  (same as SHEPHERD)
   Fonts: Plus Jakarta Sans (UI) + Playfair Display (brand mark)
   Layout: Fixed sidebar app shell for authenticated views
   =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&family=Playfair+Display:ital,wght@0,700;1,400&display=swap');

:root {
  /* Brand palette — identical to SHEPHERD */
  --red:          #CC0000;
  --red-dark:     #A80000;
  --red-hover:    #B20000;
  --red-tint:     #FFF0F0;
  --red-mid:      rgba(204,0,0,0.12);

  --black:        #1E293B;
  --charcoal:     #263346;
  --charcoal-mid: #334155;

  --grey-dark:    #374151;
  --grey:         #6B7280;
  --grey-light:   #9CA3AF;
  --silver:       #D1D5DB;
  --silver-light: #F0F0F0;

  --text-dark:    #111111;
  --text-mid:     #374151;
  --text-light:   #6B7280;

  --white:        #FFFFFF;
  --off-white:    #F8F9FA;
  --border:       #E5E7EB;
  --border-light: #F0F2F5;

  --radius:       14px;
  --radius-sm:    9px;
  --radius-pill:  999px;
  --shadow-xs:    0 1px 2px rgba(0,0,0,0.06);
  --shadow:       0 1px 4px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.08);
  --shadow-md:    0 2px 8px rgba(0,0,0,0.08), 0 8px 32px rgba(0,0,0,0.12);
  --shadow-lg:    0 8px 40px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.10);

  /* Sidebar dimensions */
  --sidebar-w:    240px;
  --topbar-h:     56px;
}

/* ===================================================================
   BASE
   =================================================================== */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: var(--off-white);
  color: var(--text-dark);
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-weight: 700;
  color: var(--black);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-top: 0;
}

.brand-serif {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
}

a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-dark); text-decoration: underline; }

/* ===================================================================
   APP SHELL  (sidebar layout for authenticated pages)
   =================================================================== */

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--black);
  display: flex;
  flex-direction: column;
  z-index: 200;
  transition: transform 0.25s cubic-bezier(0.22,1,0.36,1);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 1.1rem 1.25rem 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  text-decoration: none;
}
.sidebar-brand:hover { text-decoration: none; }

.sidebar-brand .brand-icon {
  width: 34px;
  height: 34px;
  background: var(--red);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.sidebar-brand .brand-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.02em;
  line-height: 1;
}

.sidebar-brand .brand-tagline {
  font-size: 0.6rem;
  color: rgba(255,255,255,0.4);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 1px;
}

/* Org switcher pill */
.org-pill {
  margin: 0.75rem 1rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
}
.org-pill:hover { background: rgba(255,255,255,0.1); text-decoration: none; }
.org-pill .org-avatar {
  width: 26px; height: 26px;
  background: var(--red);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--white);
  flex-shrink: 0;
}
.org-pill .org-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--white);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.org-pill .org-chevron {
  color: rgba(255,255,255,0.35);
  font-size: 0.7rem;
}

/* Nav groups */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0.75rem;
  scrollbar-width: none;
}
.sidebar-nav::-webkit-scrollbar { display: none; }

.nav-group-label {
  font-size: 0.62rem;
  font-weight: 700;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.85rem 0.5rem 0.35rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0.52rem 0.75rem;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.65);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s;
  text-decoration: none;
  margin-bottom: 1px;
}
.sidebar-link i { font-size: 1rem; flex-shrink: 0; width: 18px; text-align: center; }
.sidebar-link:hover {
  background: rgba(255,255,255,0.08);
  color: var(--white);
  text-decoration: none;
}
.sidebar-link.active {
  background: rgba(204,0,0,0.18);
  color: var(--white);
  border: 1px solid rgba(204,0,0,0.3);
}
.sidebar-link.active i { color: var(--red); }

/* Badge on nav link */
.nav-badge {
  margin-left: auto;
  background: var(--red);
  color: var(--white);
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-pill);
}

/* Sidebar footer */
.sidebar-footer {
  padding: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.07);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
}
.sidebar-user:hover { background: rgba(255,255,255,0.08); text-decoration: none; }
.sidebar-user .user-avatar {
  width: 30px; height: 30px;
  background: var(--charcoal-mid);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255,255,255,0.8);
  flex-shrink: 0;
}
.sidebar-user .user-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.sidebar-user .user-role {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Main content area */
.app-main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top bar (mobile toggle + breadcrumb) */
.app-topbar {
  height: var(--topbar-h);
  background: var(--white);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-mid);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0.2rem;
}

.topbar-breadcrumb {
  font-size: 0.82rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 6px;
}
.topbar-breadcrumb a { color: var(--text-light); }
.topbar-breadcrumb a:hover { color: var(--red); text-decoration: none; }
.topbar-breadcrumb .bc-sep { color: var(--border); }
.topbar-breadcrumb .bc-current { color: var(--text-dark); font-weight: 600; }

.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* Page body */
.app-body {
  flex: 1;
  padding: 1.75rem 1.75rem 3rem;
}

/* Page header (within app-body) */
.page-header {
  margin-bottom: 1.75rem;
}
.page-header h1 {
  font-size: 1.65rem;
  font-weight: 800;
  margin-bottom: 0.15rem;
}
.page-header p { color: var(--text-light); margin: 0; font-size: 0.88rem; }

/* Sidebar overlay (mobile) */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 199;
}

/* Mobile sidebar */
@media (max-width: 991px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .app-main { margin-left: 0; }
  .topbar-toggle { display: flex; }
  .app-body { padding: 1.25rem 1rem 3rem; }
}

/* ===================================================================
   PUBLIC NAVBAR  (for auth pages / landing)
   =================================================================== */
.pub-navbar {
  background: var(--black);
  padding: 0.7rem 0;
  box-shadow: 0 1px 0 rgba(255,255,255,0.05);
}
.pub-navbar .navbar-brand {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white) !important;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
}
.pub-navbar .brand-icon {
  width: 32px; height: 32px;
  background: var(--red);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
}
.pub-navbar .nav-link {
  color: rgba(255,255,255,0.7) !important;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.4rem 0.85rem !important;
  border-radius: 7px;
  transition: all 0.15s;
}
.pub-navbar .nav-link:hover { color: var(--white) !important; background: rgba(255,255,255,0.08); }
.pub-navbar .btn-nav-cta {
  background: var(--red);
  color: var(--white) !important;
  font-weight: 700;
  padding: 0.38rem 1.1rem !important;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  transition: background 0.15s;
}
.pub-navbar .btn-nav-cta:hover { background: var(--red-hover); }

/* ===================================================================
   AUTH PAGES
   =================================================================== */
.auth-wrapper {
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.auth-header {
  background: var(--black);
  padding: 2.25rem 2rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.auth-header::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 60%; height: 200%;
  background: radial-gradient(ellipse, rgba(204,0,0,0.2) 0%, transparent 65%);
  pointer-events: none;
}
.auth-header .auth-icon {
  width: 52px; height: 52px;
  background: var(--red);
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin: 0 auto 1rem;
  box-shadow: 0 4px 20px rgba(204,0,0,0.4);
  position: relative;
}
.auth-header h2 {
  color: var(--white);
  margin: 0 0 0.25rem;
  font-size: 1.65rem;
  letter-spacing: -0.02em;
}
.auth-header p { color: rgba(255,255,255,0.6); margin: 0; font-size: 0.88rem; }
.auth-body { padding: 2rem; }

/* Wide auth card for register */
.auth-card-wide { max-width: 520px; }

/* ===================================================================
   STAT CARDS (dashboard)
   =================================================================== */
.stat-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  box-shadow: var(--shadow-xs);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.stat-icon {
  width: 44px; height: 44px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.stat-icon.red   { background: var(--red-tint);    color: var(--red); }
.stat-icon.black { background: rgba(30,41,59,0.08); color: var(--black); }
.stat-icon.green { background: #F0FDF4;             color: #16A34A; }
.stat-icon.amber { background: #FFFBEB;             color: #D97706; }
.stat-icon.blue  { background: #EFF6FF;             color: #2563EB; }

.stat-body { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.stat-label { font-size: 0.78rem; font-weight: 600; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.2rem; }
.stat-value { font-size: 1.7rem; font-weight: 800; color: var(--black); line-height: 1; letter-spacing: -0.03em; }
.stat-sub   { font-size: 0.78rem; color: var(--text-light); margin-top: 0.2rem; }

/* ===================================================================
   CARDS
   =================================================================== */
.card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}
.card-header {
  background: var(--white);
  border-bottom: 1px solid var(--border-light);
  border-radius: var(--radius) var(--radius) 0 0 !important;
  padding: 1rem 1.35rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-header h5, .card-header h6 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }
.card-header .card-actions { margin-left: auto; }
.card-body { padding: 1.35rem; }

/* Dark card header */
.card-header-dark {
  background: var(--black);
  border-radius: var(--radius) var(--radius) 0 0 !important;
  padding: 1rem 1.35rem;
  position: relative;
  overflow: hidden;
}
.card-header-dark::before {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 60%;
  background: linear-gradient(90deg, transparent, rgba(204,0,0,0.15));
  pointer-events: none;
}
.card-header-dark h5, .card-header-dark h6 { color: var(--white); margin: 0; font-weight: 700; }
.card-header-dark p { color: rgba(255,255,255,0.6); margin: 0; font-size: 0.82rem; }

/* ===================================================================
   MEETING CARDS (list view)
   =================================================================== */
.meeting-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.15s;
  display: block;
  text-decoration: none;
  color: inherit;
}
.meeting-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
  color: inherit;
}
.meeting-card-header {
  background: var(--black);
  padding: 1rem 1.25rem;
  position: relative;
  overflow: hidden;
}
.meeting-card-header::before {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 55%;
  background: linear-gradient(90deg, transparent, rgba(204,0,0,0.18));
  pointer-events: none;
}
.meeting-card-header .meeting-date-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--red);
  color: var(--white);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.18rem 0.6rem;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.meeting-card-header h6 { color: var(--white); margin: 0; font-size: 0.97rem; font-weight: 700; }
.meeting-card-body { padding: 1rem 1.25rem; }

/* ===================================================================
   STATUS BADGES
   =================================================================== */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
}
.badge-draft      { background: var(--border-light); color: var(--grey-dark); }
.badge-scheduled  { background: #EFF6FF; color: #1D4ED8; }
.badge-in-progress{ background: #FFFBEB; color: #B45309; }
.badge-completed  { background: var(--black); color: var(--white); }
.badge-passed     { background: #F0FDF4; color: #15803D; }
.badge-failed     { background: var(--red-tint); color: var(--red-dark); }
.badge-coat       { background: rgba(204,0,0,0.1); color: var(--red-dark); border: 1px solid rgba(204,0,0,0.2); }
.badge-trial      { background: #FFFBEB; color: #92400E; }
.badge-active     { background: #F0FDF4; color: #15803D; }

/* ===================================================================
   TABLES
   =================================================================== */
.table-boardhq th {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--off-white);
  border-bottom: 2px solid var(--border-light);
  padding: 0.65rem 1rem;
}
.table-boardhq td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
  font-size: 0.9rem;
}
.table-boardhq tbody tr:last-child td { border-bottom: none; }
.table-boardhq tbody tr:hover { background: var(--off-white); }

/* ===================================================================
   AGENDA ITEMS
   =================================================================== */
.agenda-item {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  overflow: hidden;
  transition: border-color 0.15s;
}
.agenda-item:hover { border-color: var(--silver); }

.agenda-item-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.8rem 1rem;
  cursor: pointer;
}
.agenda-order {
  width: 24px; height: 24px;
  background: var(--black);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--white);
  flex-shrink: 0;
}
.agenda-item-title { font-weight: 600; font-size: 0.9rem; flex: 1; }
.agenda-item-meta { font-size: 0.75rem; color: var(--text-light); display: flex; align-items: center; gap: 10px; }
.agenda-item-body { padding: 0 1rem 1rem 1rem; border-top: 1px solid var(--border-light); }

/* Item type dot */
.type-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.type-discussion   { background: var(--grey-light); }
.type-resolution   { background: var(--red); }
.type-information  { background: #3B82F6; }
.type-prayer       { background: #8B5CF6; }

/* ===================================================================
   RESOLUTION / VOTING
   =================================================================== */
.resolution-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin-bottom: 0.65rem;
}
.resolution-card.open { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-mid); }
.resolution-card.passed { border-color: #16A34A; }
.resolution-card.failed { border-color: var(--grey-light); }

.vote-bar {
  height: 8px;
  background: var(--border-light);
  border-radius: 99px;
  overflow: hidden;
  display: flex;
  margin: 8px 0;
}
.vote-yes   { background: #16A34A; }
.vote-no    { background: var(--red); }
.vote-abst  { background: var(--grey-light); }

.vote-btn {
  padding: 0.38rem 1.1rem;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 700;
  border: 2px solid;
  cursor: pointer;
  transition: all 0.15s;
}
.vote-btn.yes   { border-color: #16A34A; color: #16A34A; background: transparent; }
.vote-btn.yes:hover, .vote-btn.yes.selected   { background: #16A34A; color: white; }
.vote-btn.no    { border-color: var(--red);    color: var(--red);    background: transparent; }
.vote-btn.no:hover, .vote-btn.no.selected     { background: var(--red); color: white; }
.vote-btn.abst  { border-color: var(--grey);  color: var(--grey);  background: transparent; }
.vote-btn.abst:hover, .vote-btn.abst.selected { background: var(--grey); color: white; }

/* ===================================================================
   MINUTES EDITOR
   =================================================================== */
.minutes-toolbar {
  background: var(--off-white);
  border: 1px solid var(--border-light);
  border-bottom: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  padding: 0.5rem 0.75rem;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.minutes-toolbar button {
  padding: 0.28rem 0.6rem;
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: 5px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-mid);
  cursor: pointer;
  transition: all 0.12s;
}
.minutes-toolbar button:hover { background: var(--black); color: var(--white); border-color: var(--black); }

.minutes-editor {
  border: 1px solid var(--border-light);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  min-height: 400px;
  padding: 1.25rem;
  background: var(--white);
  font-size: 0.95rem;
  line-height: 1.8;
  outline: none;
}
.minutes-editor:focus { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-mid); }

/* ===================================================================
   ACTION ITEMS
   =================================================================== */
.action-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border-light);
}
.action-item:last-child { border-bottom: none; }
.action-check {
  width: 18px; height: 18px;
  border: 2px solid var(--border);
  border-radius: 5px;
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.action-check:hover { border-color: var(--red); }
.action-check.done { background: var(--black); border-color: var(--black); color: white; }
.action-desc { flex: 1; font-size: 0.88rem; }
.action-desc.done { text-decoration: line-through; color: var(--text-light); }
.action-assignee { font-size: 0.75rem; color: var(--text-light); margin-top: 2px; }
.action-due { font-size: 0.72rem; color: var(--grey); }

/* ===================================================================
   BUTTONS
   =================================================================== */
.btn {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--radius-sm);
}
.btn-primary {
  background: var(--black); border-color: var(--black); color: var(--white);
  padding: 0.52rem 1.3rem; transition: all 0.18s;
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--charcoal-mid); border-color: var(--charcoal-mid);
  transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.btn-danger-custom {
  background: var(--red); border-color: var(--red); color: var(--white);
  padding: 0.52rem 1.3rem; transition: all 0.18s;
}
.btn-danger-custom:hover { background: var(--red-dark); border-color: var(--red-dark); color: var(--white); transform: translateY(-1px); }

.btn-outline-brd {
  border: 1.5px solid var(--border); color: var(--text-mid);
  background: var(--white); padding: 0.5rem 1.2rem;
}
.btn-outline-brd:hover { border-color: var(--black); color: var(--black); background: var(--off-white); }

.btn-sm-icon {
  width: 32px; height: 32px;
  padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-mid);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-sm-icon:hover { background: var(--black); color: var(--white); border-color: var(--black); }

/* ===================================================================
   FORMS
   =================================================================== */
.form-control, .form-select {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.58rem 0.9rem;
  font-size: 0.93rem;
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
  color: var(--text-dark);
}
.form-control:focus, .form-select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-mid);
  outline: none;
}
.form-label { font-weight: 600; color: var(--text-mid); font-size: 0.85rem; margin-bottom: 0.3rem; }
.form-text  { font-size: 0.78rem; color: var(--text-light); }

/* ===================================================================
   BILLING / PRICING
   =================================================================== */
.pricing-card {
  background: var(--white);
  border: 2px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.75rem;
  position: relative;
  transition: border-color 0.2s, box-shadow 0.2s;
  height: 100%;
}
.pricing-card:hover { border-color: var(--silver); box-shadow: var(--shadow-md); }
.pricing-card.featured {
  border-color: var(--black);
  box-shadow: var(--shadow-md);
}
.pricing-featured-badge {
  position: absolute;
  top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--black);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.8rem;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.pricing-plan-name { font-weight: 800; font-size: 1.05rem; margin-bottom: 0.25rem; }
.pricing-desc      { font-size: 0.82rem; color: var(--text-light); margin-bottom: 1.25rem; }
.pricing-amount {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--black);
  letter-spacing: -0.04em;
  line-height: 1;
}
.pricing-amount span { font-size: 0.9rem; font-weight: 500; color: var(--text-light); letter-spacing: 0; }
.pricing-annual-note { font-size: 0.75rem; color: var(--text-light); margin-top: 0.2rem; margin-bottom: 1.25rem; }
.pricing-annual-note strong { color: #16A34A; }

.pricing-toggle {
  display: inline-flex;
  background: var(--border-light);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 2px;
}
.pricing-toggle button {
  padding: 0.4rem 1.25rem;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--text-light);
  transition: all 0.2s;
}
.pricing-toggle button.active {
  background: var(--white);
  color: var(--black);
  box-shadow: var(--shadow-xs);
}

/* ===================================================================
   FLASH MESSAGES
   =================================================================== */
.flash-container {
  position: fixed;
  top: 70px; right: 1rem;
  z-index: 9999;
  max-width: 370px;
}
.flash-msg {
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  box-shadow: var(--shadow-md);
  display: flex; align-items: center; gap: 10px;
  font-size: 0.875rem; font-weight: 500;
  animation: slideIn 0.3s cubic-bezier(0.22,1,0.36,1);
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}
.flash-success { background: #F0FDF4; color: #166534; border-left: 3px solid #16A34A; }
.flash-info    { background: #EFF6FF; color: #1E40AF; border-left: 3px solid #3B82F6; }
.flash-warning { background: #FFFBEB; color: #92400E; border-left: 3px solid #F59E0B; }
.flash-danger  { background: var(--red-tint); color: var(--red-dark); border-left: 3px solid var(--red); }

/* ===================================================================
   EMPTY STATES
   =================================================================== */
.empty-state {
  text-align: center;
  padding: 3.5rem 1.5rem;
  color: var(--text-light);
}
.empty-state .empty-icon {
  font-size: 2.5rem;
  opacity: 0.25;
  margin-bottom: 1rem;
  display: block;
}
.empty-state h5 { color: var(--text-mid); font-size: 1rem; margin-bottom: 0.35rem; }
.empty-state p  { font-size: 0.875rem; margin-bottom: 1.25rem; }

/* ===================================================================
   FOOTER  (public pages)
   =================================================================== */
footer {
  background: var(--black);
  color: rgba(255,255,255,0.45);
  padding: 1.75rem 0;
  font-size: 0.82rem;
  text-align: center;
  margin-top: 4rem;
}
footer a { color: rgba(255,255,255,0.65); }

/* ===================================================================
   UTILITIES
   =================================================================== */
.text-red     { color: var(--red) !important; }
.text-muted-sm{ font-size: 0.8rem; color: var(--text-light); }
.divider      { border: none; border-top: 1px solid var(--border-light); margin: 1.5rem 0; }
.avatar-initials {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--charcoal-mid);
  color: white;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 700;
}

/* ===================================================================
   STATS GRID
   =================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

/* ===================================================================
   ROLE BADGES
   =================================================================== */
.badge-role {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
}
.badge-role.badge-admin  { background: rgba(30,41,59,0.1); color: var(--black); }
.badge-role.badge-member { background: var(--border-light); color: var(--grey-dark); }
.badge-role.badge-chair  { background: rgba(204,0,0,0.08); color: var(--red-dark); }

/* Additional status badge variants */
.badge-cancelled { background: #FEF2F2; color: #991B1B; }
.badge-past_due  { background: #FFFBEB; color: #92400E; border: 1px solid #FDE68A; }
.badge-open      { background: #EFF6FF; color: #1D4ED8; }
.badge-starter   { background: var(--border-light); color: var(--grey-dark); }
.badge-standard  { background: rgba(30,41,59,0.08); color: var(--black); }
.badge-unlimited { background: rgba(204,0,0,0.08); color: var(--red-dark); }
.badge-coat_access { background: rgba(204,0,0,0.1); color: var(--red-dark); border: 1px solid rgba(204,0,0,0.2); }

/* ===================================================================
   DANGER GHOST BUTTON
   =================================================================== */
.btn-danger-ghost {
  border-color: var(--border);
  background: var(--white);
  color: var(--text-light);
}
.btn-danger-ghost:hover {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

/* ===================================================================
   FORM HELPERS
   =================================================================== */
.text-optional {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-light);
}
label.required::after,
.form-label.required::after {
  content: ' *';
  color: var(--red);
  font-weight: 700;
}

/* ===================================================================
   INFO ROWS (key / value pairs in cards)
   =================================================================== */
.info-row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.88rem;
}
.info-row:last-child { border-bottom: none; }
.info-label {
  min-width: 90px;
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
}
.info-value { color: var(--text-dark); flex: 1; }

/* ===================================================================
   PAGE HEADER  (flex variant for title + action button)
   =================================================================== */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}
.page-header h1 {
  font-size: 1.65rem;
  font-weight: 800;
  margin-bottom: 0.15rem;
}
.page-header p { color: var(--text-light); margin: 0; font-size: 0.88rem; }

/* ===================================================================
   NAV TABS  (Bootstrap overrides for meeting detail tabs)
   =================================================================== */
.nav-tabs .nav-link {
  color: var(--text-light);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 0.5rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  transition: color 0.15s, border-color 0.15s;
}
.nav-tabs .nav-link:hover { color: var(--black); }
.nav-tabs .nav-link.active {
  color: var(--black);
  border-bottom-color: var(--red);
  background: none;
}

/* ===================================================================
   CARD FOOTER
   =================================================================== */
.card-footer {
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 0.85rem 1.35rem;
  background: var(--white);
  border-top: 1px solid var(--border-light);
}

/* ===================================================================
   PAGINATION  (Bootstrap overrides)
   =================================================================== */
.pagination .page-link {
  color: var(--text-mid);
  border-color: var(--border-light);
  font-size: 0.83rem;
  font-weight: 600;
}
.pagination .page-item.active .page-link {
  background: var(--black);
  border-color: var(--black);
  color: var(--white);
}
.pagination .page-link:hover { background: var(--off-white); color: var(--black); }
