/* ═══════════════════════════════════════════════════════
   EFA Choir Administration – Custom Styles
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── CSS Variables ─────────────────────────────────── */
:root {
  --sidebar-width: 260px;
  --topbar-height: 72px;

  /* Black (Default Dark) Theme Variables */
  --primary: #ffffff;
  --primary-dark: #cbd5e1;
  --primary-light: #f1f5f9;
  --accent: #f59e0b;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f97316;
  --info: #3b82f6;

  --bg-dark: #000000;
  --bg-card: rgba(20, 20, 20, 0.7);
  --bg-sidebar: #050505;
  --border-color: rgba(255, 255, 255, 0.08);

  --text-primary: #ffffff;
  --text-muted: #94a3b8;
  --text-light: rgba(255, 255, 255, 0.65);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.6);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 24px;

  --transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);

  /* Premium Gradients */
  --primary-gradient: linear-gradient(135deg, #334155 0%, #000000 100%);
  --primary-glow: none;
  --accent-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --auth-bg: #000000;

  --btn-primary-text: #000000;
  --btn-primary-shadow: rgba(255, 255, 255, 0.05);
  --badge-admin-bg: rgba(255, 255, 255, 0.08);
  --badge-admin-text: #e2e8f0;
  --input-focus-shadow: rgba(255, 255, 255, 0.08);
  --avatar-text: #000000;
}

/* ── Purple Theme Overrides ─────────────────────────── */
[data-theme="purple"] {
  --primary: #9d7df0;
  --primary-dark: #7c3aed;
  --primary-light: #c4b5fd;
  --bg-dark: #0a0b14;
  --bg-card: rgba(21, 23, 41, 0.75);
  --bg-sidebar: #0e101f;
  --border-color: rgba(157, 125, 240, 0.12);
  --text-primary: #ffffff;
  --text-muted: #8b8ea8;
  --text-light: rgba(255, 255, 255, 0.7);
  --primary-gradient: linear-gradient(135deg, #9d7df0 0%, #3b82f6 100%);
  --primary-glow: radial-gradient(circle at 50% -20%, rgba(157, 125, 240, 0.15) 0%, transparent 70%);
  --accent-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --auth-bg: linear-gradient(rgba(10, 11, 20, 0.94), rgba(10, 11, 20, 0.94)), 
             radial-gradient(circle at 100% 100%, rgba(157, 125, 240, 0.15) 0%, transparent 40%), 
             radial-gradient(circle at 0% 0%, rgba(59, 130, 246, 0.15) 0%, transparent 40%);
  --btn-primary-text: #ffffff;
  --btn-primary-shadow: rgba(157, 125, 240, 0.3);
  --badge-admin-bg: rgba(157, 125, 240, 0.2);
  --badge-admin-text: #c4b5fd;
  --input-focus-shadow: rgba(157, 125, 240, 0.15);
  --avatar-text: #ffffff;
}

/* ── White Theme Overrides ─────────────────────────── */
[data-theme="white"] {
  --primary: #000000;
  --primary-dark: #333333;
  --primary-light: #666666;
  --accent: #000000;
  --success: #000000;
  --danger: #000000;
  --warning: #000000;
  --info: #000000;
  --bg-dark: #f1f5f9;
  --bg-card: #ffffff;
  --bg-sidebar: #ffffff;
  --border-color: rgba(0, 0, 0, 0.1);
  --text-primary: #000000;
  --text-muted: #000000;
  --text-light: #000000;
  --primary-gradient: linear-gradient(135deg, #000000 0%, #333333 100%);
  --primary-glow: none;
  --auth-bg: #f8fafc;
  --btn-primary-text: #ffffff;
  --btn-primary-shadow: rgba(0, 0, 0, 0.1);
  --badge-admin-bg: rgba(0, 0, 0, 0.1);
  --badge-admin-text: #000000;
  --input-focus-shadow: rgba(0, 0, 0, 0.05);
}

/* ── White Theme Overrides ─────────────────────────── */
[data-theme="white"] {
  --primary: #000000;
  --primary-dark: #333333;
  --primary-light: #666666;
  --accent: #000000;
  --success: #000000;
  --danger: #000000;
  --warning: #000000;
  --info: #000000;
  --bg-dark: #f1f5f9;
  --bg-card: #ffffff;
  --bg-sidebar: #ffffff;
  --border-color: rgba(0, 0, 0, 0.1);
  --text-primary: #000000;
  --text-muted: #000000;
  --text-light: #000000;
  --primary-gradient: linear-gradient(135deg, #000000 0%, #333333 100%);
  --primary-glow: none;
  --auth-bg: #f8fafc;
  --btn-primary-text: #ffffff;
  --btn-primary-shadow: rgba(0, 0, 0, 0.1);
  --badge-admin-bg: rgba(0, 0, 0, 0.1);
  --badge-admin-text: #000000;
  --avatar-text: #ffffff;
}

/* ── Reset / Base ──────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-dark);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

[data-theme="white"] .stat-card {
  --card-accent: #000000 !important;
  --card-accent-bg: rgba(0, 0, 0, 0.05) !important;
}

[data-theme="white"] .quick-action-card {
  --qa-color: #000000 !important;
}

[data-theme="white"] .stat-icon,
[data-theme="white"] .stat-icon i {
  color: #000000 !important;
  background: rgba(0, 0, 0, 0.05) !important;
}

[data-theme="white"] .badge-status {
  background: rgba(0, 0, 0, 0.1) !important;
  color: #000000 !important;
  border: 1px solid rgba(0, 0, 0, 0.2) !important;
  text-shadow: none !important;
}

[data-theme="white"] .badge-status i {
  color: #000000 !important;
}

[data-theme="white"] .event-date-badge {
  background: #000000 !important;
  color: #ffffff !important;
}

[data-theme="white"] .stat-info h3 {
  color: #000000 !important;
  text-shadow: none !important;
}

[data-theme="white"] .efa-card h5 i[data-feather],
[data-theme="white"] .page-header i[data-feather],
[data-theme="white"] .event-meta i[data-feather] {
  color: #000000 !important;
}

[data-theme="white"] .efa-card,
[data-theme="white"] .event-card,
[data-theme="white"] .quick-action-card,
[data-theme="white"] .stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  backdrop-filter: none;
}

[data-theme="white"] .efa-table thead tr {
  background: rgba(0, 0, 0, 0.02);
  border-bottom: 2px solid var(--border-color);
}

[data-theme="white"] .efa-table td {
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

[data-theme="white"] .sidebar {
  background: #ffffff !important;
  border-right: 1px solid var(--border-color);
  box-shadow: 4px 0 10px rgba(0, 0, 0, 0.02);
}

[data-theme="white"] .sidebar-nav li a:hover,
[data-theme="white"] .sidebar-nav li a.active {
  background: rgba(108, 63, 197, 0.08);
}

[data-theme="white"] .topbar {
  border-bottom: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.8);
}

[data-theme="white"] .badge-role {
  background: rgba(0, 0, 0, 0.05);
  color: #000000;
}

[data-theme="white"] .topbar-avatar,
[data-theme="white"] .btn-primary,
[data-theme="white"] .filter-tabs .btn.active,
[data-theme="white"] .btn-check:checked + .btn-outline-primary,
[data-theme="white"] .btn-primary:hover {
  background: #000000 !important;
  border-color: #000000 !important;
  color: #ffffff !important;
}

[data-theme="white"] .sidebar-brand img {
  filter: grayscale(1) contrast(1.2) !important;
  opacity: 0.95;
}

/* ═══ AUTH PAGES ═══════════════════════════════════════ */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--auth-bg);
  position: relative;
  overflow: hidden;
}

.auth-wrapper::before {
  content: '';
  position: absolute;
  top: -150px;
  left: -150px;
  width: 300px;
  height: 300px;
  background: var(--primary);
  filter: blur(150px);
  opacity: 0.15;
  z-index: 0;
  pointer-events: none;
}

[data-theme="black"] .auth-wrapper::before {
  display: none;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 3rem 2.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-card .btn-primary:hover {
  background: #ffffff !important;
  color: #000000 !important;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2) !important;
  opacity: 1 !important;
}

.auth-logo {
  text-align: center;
  margin-bottom: 2.5rem;
}

.auth-logo img {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  margin-bottom: 1rem;
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
  background: var(--bg-card);
  padding: 5px;
}

.auth-logo h1 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.25rem;
}

.auth-logo span {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

@media (max-width: 576px) {
  .auth-wrapper {
    padding: 1.5rem;
  }
  .auth-card {
    padding: 2.5rem 1.75rem;
    border-radius: 20px;
    width: 100%;
    margin: 0;
  }
  .auth-logo h1 {
    font-size: 1.5rem;
  }
}

/* ═══ APP LAYOUT ═══════════════════════════════════════ */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ───────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, var(--bg-sidebar) 0%, #000000 100%);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 1000;
  transition: transform var(--transition);
  overflow-y: auto;
}

.sidebar-brand {
  padding: 1.5rem 1.25rem 1rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: .75rem;
}

.sidebar-brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.sidebar-brand h2 {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.sidebar-brand small {
  font-size: .7rem;
  color: var(--primary-light);
  font-weight: 500;
}

.sidebar-section-label {
  padding: 1.25rem 1.25rem .4rem;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.sidebar-nav {
  list-style: none;
  padding: 0 .75rem;
}

.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem .9rem;
  border-radius: var(--radius-sm);
  color: var(--text-light);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 500;
  transition: all var(--transition);
  margin-bottom: 2px;
}

.sidebar-nav li a:hover,
.sidebar-nav li a.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.sidebar-nav li a.active {
  border-left: 3px solid var(--primary);
}

.sidebar-nav li a i {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.sidebar-footer {
  margin-top: auto;
  padding: 1rem .75rem;
  border-top: 1px solid var(--border-color);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .9rem;
  color: var(--bg-dark); /* Contrast with primary background */
  flex-shrink: 0;
  overflow: hidden;
}

.sidebar-user-info h6 {
  font-size: .8rem;
  font-weight: 600;
  margin: 0;
}

.sidebar-user-info small {
  font-size: .7rem;
  color: var(--text-muted);
  text-transform: capitalize;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-md);
  transition: all var(--transition);
  border: 1px solid transparent;
}

.topbar-user:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.05);
}

.topbar-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--avatar-text);
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.topbar-avatar:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.topbar-avatar .avatar-text {
  letter-spacing: -0.5px;
}

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

.topbar {
  min-height: var(--topbar-height);
  padding: .75rem 1.5rem;
  background: var(--bg-sidebar);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 500;
  gap: 1rem;
}

.topbar-title {
  font-size: 1.1rem;
  font-weight: 700;
  flex: 1;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-shrink: 0;
}

.topbar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: .35rem;
}

.page-content {
  padding: 2rem;
  flex: 1;
}

/* ═══ CARDS ════════════════════════════════════════════ */
.efa-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition), box-shadow var(--transition);
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 40px;
  background: radial-gradient(circle at top right, var(--card-accent, var(--primary)), transparent 70%);
  opacity: 0.1;
  transition: opacity var(--transition);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 255, 255, 0.15);
}

.stat-card:hover::after {
  opacity: 0.2;
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--card-accent-bg, rgba(255, 255, 255, 0.04));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--card-accent, var(--primary));
  flex-shrink: 0;
  transition: transform var(--transition), background var(--transition);
}

.stat-card:hover .stat-icon {
  transform: scale(1.05);
  background: var(--card-accent-bg, rgba(255, 255, 255, 0.08));
}

.stat-icon i {
  width: 24px;
  height: 24px;
  stroke-width: 2.5px;
}

.stat-info h3 {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 0.25rem;
  letter-spacing: -0.01em;
}

.stat-info p {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
}

/* ═══ TABLES ═══════════════════════════════════════════ */
.efa-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: 
    linear-gradient(145deg, rgba(255, 255, 255, 0.02) 0%, rgba(0, 0, 0, 0.1) 100%),
    repeating-linear-gradient(135deg, transparent, transparent 8px, rgba(255, 255, 255, 0.005) 8px, rgba(255, 255, 255, 0.005) 16px),
    var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  position: relative;
  overflow: hidden;
}

.efa-table-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    90deg, 
    transparent, 
    rgba(255, 255, 255, 0.03), 
    transparent
  );
  transform: skewX(-20deg);
  pointer-events: none;
  animation: shine 8s infinite linear;
}

@keyframes shine {
  from { transform: translateX(-100%) skewX(-20deg); }
  to { transform: translateX(100%) skewX(-20deg); }
}

.efa-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}

.efa-table th {
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-muted);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 1rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.efa-table td {
  padding: .95rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
  color: var(--text-primary);
}

.efa-table tr:last-child td {
  border-bottom: none;
}

.efa-table tbody tr {
  transition: background-color 0.2s ease;
}

.efa-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* ═══ BADGES ════════════════════════════════════════════ */
.badge-role {
  display: inline-flex;
  align-items: center;
  padding: .25rem .65rem;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
  text-transform: capitalize;
}

.badge-admin {
  background: var(--badge-admin-bg);
  color: var(--badge-admin-text);
}

.badge-executive {
  background: rgba(245, 158, 11, 0.2);
  color: #FCD34D;
}

.badge-member {
  background: rgba(16, 185, 129, 0.2);
  color: #6EE7B7;
}

.badge-finance {
  background: rgba(16, 185, 129, 0.25);
  color: #10B981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
  border: 1px solid rgba(16, 185, 129, 0.5);
  text-shadow: 0 0 5px rgba(16, 185, 129, 0.5);
}

.badge-secretary {
  background: rgba(59, 130, 246, 0.25);
  color: #60A5FA;
  border: 1px solid rgba(59, 130, 246, 0.4);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.badge-wardrobe {
  background: rgba(245, 158, 11, 0.25);
  color: #FBBF24;
  border: 1px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .25rem .65rem;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 600;
}

.badge-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-active,
.status-upcoming,
.status-paid {
  background: rgba(16, 185, 129, 0.15);
  color: #6EE7B7;
}

.status-inactive,
.status-cancelled,
.status-failed {
  background: rgba(239, 68, 68, 0.15);
  color: #FCA5A5;
}

.status-ongoing,
.status-pending {
  background: rgba(245, 158, 11, 0.15);
  color: #FCD34D;
}

.status-completed {
  background: rgba(59, 130, 246, 0.15);
  color: #93C5FD;
}

/* ═══ FORMS ═════════════════════════════════════════════ */
.form-label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: .35rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.form-control,
.form-select {
  width: 100%;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text-primary) !important;
  padding: .65rem .9rem !important;
  font-size: .9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px var(--input-focus-shadow) !important;
  outline: none;
}

.form-control::placeholder {
  color: var(--text-muted) !important;
}

.form-select option {
  background: #0a0a0a;
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.form-check-input {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: var(--border-color);
}

.form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

/* ═══ BUTTONS ═══════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all var(--transition);
}

.btn i {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: var(--primary);
  color: var(--btn-primary-text);
}

.btn-primary:hover {
  background: var(--primary-dark) !important;
  color: var(--btn-primary-text) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--btn-primary-shadow);
}

.btn-accent {
  background: var(--accent);
  color: #1a1a1a;
}

.btn-accent:hover {
  filter: brightness(1.1);
}

.btn-success {
  background: var(--success);
  color: #fff;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.06);
}

.btn-sm {
  padding: .35rem .75rem;
  font-size: .8rem;
}

/* ═══ FLASH TOAST ══════════════════════════════════════ */
.flash-toast {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  animation: slideInRight 0.3s ease, fadeOutRight 0.4s ease 4.5s forwards;
  max-width: 380px;
  border-left: 4px solid currentColor;
}

.flash-success {
  background: rgba(16, 185, 129, 0.1);
  color: #6EE7B7;
}

.flash-error {
  background: rgba(239, 68, 68, 0.1);
  color: #FCA5A5;
}

.flash-warning {
  background: rgba(245, 158, 11, 0.1);
  color: #FCD34D;
}

.flash-info {
  background: rgba(59, 130, 246, 0.1);
  color: #93C5FD;
}

.flash-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.flash-close {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 1.1rem;
  margin-left: auto;
  line-height: 1;
}

/* ═══ QUICK ACTION CARDS ═══════════════════════════════ */
/* ── Premium Gradient Text Utilities ── */
.text-gradient {
  background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

.text-gradient-primary {
  background: linear-gradient(135deg, #94a3b8 0%, #ffffff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

/* ═══ QUICK ACTION CARDS ═══════════════════════════════ */
.quick-action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 1.25rem 1rem;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.quick-action-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, var(--qa-color, var(--primary)), transparent 80%);
  opacity: 0;
  transition: opacity var(--transition);
}

.quick-action-card i {
  width: 26px;
  height: 26px;
  color: var(--qa-color, var(--text-primary));
  position: relative;
  z-index: 1;
  transition: transform var(--transition);
  stroke-width: 2px;
}

.quick-action-card span {
  position: relative;
  z-index: 1;
  color: var(--text-light);
  transition: color var(--transition);
}

.quick-action-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.quick-action-card:hover::before {
  opacity: 0.05;
}

.quick-action-card:hover i {
  transform: scale(1.1);
}

.quick-action-card:hover span {
  color: var(--text-primary);
}

/* ═══ SONG CARDS ════════════════════════════════════════ */
.song-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.song-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.song-card-thumb {
  width: 100%;
  height: 160px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.song-card-thumb i {
  width: 48px;
  height: 48px;
  color: rgba(255, 255, 255, 0.6);
}

.song-card-body {
  padding: 1rem;
}

.song-card-title {
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: .25rem;
}

.song-card-artist {
  font-size: .8rem;
  color: var(--text-muted);
}

/* ═══ EVENT CARDS ═══════════════════════════════════════ */
.event-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  gap: 1.25rem;
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.event-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.15);
}

.event-date-badge {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: .5rem;
  box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.02);
}

.event-date-badge .month {
  font-size: .65rem;
  font-weight: 700;
  color: var(--primary-light);
  text-transform: uppercase;
}

.event-date-badge .day {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
}

.event-date-badge .year {
  font-size: .65rem;
  color: var(--text-muted);
}

/* ═══ PROFESSIONAL UNIFORM SCHEDULE ══════════════════════ */
.uniform-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    display: flex;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.uniform-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary);
    opacity: 0.6;
    transition: width 0.3s ease;
}

.uniform-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 20px -5px rgba(0, 0, 0, 0.2);
    border-color: rgba(var(--primary-rgb), 0.3);
}

.uniform-card:hover::before {
    width: 6px;
    opacity: 1;
}

/* The Date Blade */
.date-blade {
    flex-shrink: 0;
    width: 75px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(var(--primary-rgb), 0.05);
    border-right: 1px solid var(--border-color);
    padding: 1rem 0.5rem;
    position: relative;
}

.date-blade .month {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--primary);
    letter-spacing: 0.05em;
    margin-bottom: -2px;
}

.date-blade .day {
    font-size: 1.75rem;
    font-weight: 900;
    line-height: 1;
    color: var(--text-main);
}

/* Content Area */
.uniform-content {
    flex-grow: 1;
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.uniform-info h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    line-height: 1.4;
}

.uniform-instruction-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    padding: 4px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.uniform-instruction-tag i {
    width: 14px;
    height: 14px;
}

/* Navigation Segmented Control */
.segmented-nav {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    width: fit-content;
}

.segmented-nav .nav-item {
    padding: 0.5rem 1.25rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
}

.segmented-nav .nav-item:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.segmented-nav .nav-item.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.3);
}

/* Today Pulse Animation */
.badge-pulse {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 10px;
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 50%;
    position: relative;
}

.pulse-dot::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: inherit;
    animation: pulse-ring 1.5s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite;
}

@keyframes pulse-ring {
    0% { transform: scale(0.7); opacity: 0.8; }
    80%, 100% { transform: scale(2.5); opacity: 0; }
}

.event-info h4 {
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: .25rem;
}

.event-meta {
  font-size: .78rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  margin-top: .5rem;
}

.event-meta span {
  display: flex;
  align-items: center;
  gap: .3rem;
}

.event-meta i {
  width: 12px;
  height: 12px;
}

/* ═══ PAGE HEADER ═══════════════════════════════════════ */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-header h1 {
  font-size: 1.5rem;
  font-weight: 800;
}

/* ═══ MEMBER AVATAR ════════════════════════════════════ */
.member-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.member-avatar-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  font-weight: 800;
  color: var(--avatar-text);
  flex-shrink: 0;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  letter-spacing: -0.5px;
}

/* ═══ SEARCH/FILTER BAR ════════════════════════════════ */
.filter-bar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.filter-bar .form-control,
.filter-bar .form-select {
  max-width: 220px;
}

/* Mobile Scrollable Filter Row */
@media (max-width: 767px) {
  .filter-bar, 
  .filter-bar .d-flex {
    flex-wrap: wrap !important;
    flex-direction: row !important;
    gap: 0.5rem;
    padding: 0;
    margin: 0 0 1.25rem 0;
  }

  .filter-bar .btn,
  .filter-bar .form-control,
  .filter-bar .form-select {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 140px;
    max-width: 100% !important;
  }
}

  .filter-bar::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
  }

  .filter-bar .form-control {
    min-width: 200px !important;
  }

  .filter-bar .btn {
    white-space: nowrap;
    flex-shrink: 0;
  }
}

/* ═══ PILL TABS (Mobile Friendly) ═══════════════════════ */
.pill-tabs {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  overflow-x: auto;
  gap: 0.5rem;
  padding: 0.25rem 0.25rem 0.75rem;
  margin: 0 -1rem 1rem;
  padding-left: 1rem;
  padding-right: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.pill-tabs::-webkit-scrollbar {
  display: none;
}

.pill-tabs .nav-link {
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 100px !important;
  padding: 0.5rem 1.25rem !important;
  color: var(--text-muted) !important;
  background: rgba(255, 255, 255, 0.03) !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  transition: all 0.2s ease !important;
}

.pill-tabs .nav-link.active {
  background: var(--primary) !important;
  color: var(--btn-primary-text) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.pill-tabs .badge {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #fff !important;
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  margin-left: 0.4rem;
}

/* ═══ SONG CARD ENHANCEMENTS ════════════════════════════ */
.song-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.song-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}

.song-card-thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.song-card-thumb i {
  width: 40px;
  height: 40px;
  opacity: 0.3;
}

.song-card-body {
  padding: 1.25rem;
}

.song-card-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  margin-bottom: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  line-clamp: 1;
  overflow: hidden;
}

.song-card-artist {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  line-clamp: 1;
  overflow: hidden;
}

.song-card-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.song-card-actions .btn {
  padding: 0.4rem 0.75rem !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.song-card-actions .btn i {
  width: 14px;
  height: 14px;
}

/* ═══ EMPTY STATE ═══════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.empty-state i {
  width: 56px;
  height: 56px;
  margin-bottom: 1rem;
  opacity: .4;
}

.empty-state h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: .5rem;
}

/* ═══ DASHBOARD SPECIFIC ════════════════════════════════ */
.activity-feed-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.activity-feed-item {
  display: flex;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  transition: transform var(--transition);
}

.activity-feed-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.activity-feed-item:hover {
  transform: translateX(4px);
}

.activity-icon-wrapper {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.activity-content {
  flex: 1;
  min-width: 0;
}

.activity-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.activity-details {
  font-size: 0.8rem;
  color: var(--text-light);
  line-height: 1.5;
}

.activity-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.listening-card-item {
  display: flex;
  gap: 0.85rem;
  padding: 1rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: all var(--transition);
}

.listening-card-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.listening-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.engagement-box {
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.engagement-stat-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.engagement-stat-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height:1;
  margin-top: 0.25rem;
}

/* ── Custom Scrollbar for feeds ── */
.custom-scrollbar::-webkit-scrollbar {
  width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ═══ PROFESSIONAL MINUTE ACCORDION ══════════════════════ */
.minute-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.minute-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--primary);
  opacity: 0.7;
  transition: width 0.3s ease;
}

.minute-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  border-color: rgba(var(--primary-rgb), 0.3);
}

.minute-item:hover::before {
  width: 6px;
  opacity: 1;
}

.minute-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.75rem;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.01);
  transition: background 0.2s ease;
}

.minute-header:hover {
  background: rgba(var(--primary-rgb), 0.03);
}

.minute-info {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.minute-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.minute-meta-tags {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.minute-tag {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 10px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.minute-tag i {
  width: 12px;
  height: 12px;
}

.minute-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.minute-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.minute-btn-primary {
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary);
}

.minute-btn-primary:hover {
  background: var(--primary);
  color: #fff;
  transform: scale(1.05);
}

.minute-btn-outline {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border-color: rgba(255, 255, 255, 0.1);
}

.minute-btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  transform: scale(1.05);
}

.minute-btn-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.minute-btn-danger:hover {
  background: #ef4444;
  color: #fff;
  transform: scale(1.05);
}

.minute-body {
  padding: 0 1.75rem;
  max-height: 0;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.05);
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease;
}

.minute-body.open {
  max-height: 1200px;
  padding: 1.5rem 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.minute-body-content {
  font-size: 0.925rem;
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 1.5rem;
  white-space: pre-line;
}

.minute-footer-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* ═══ PAYMENT STRIPE CARD ══════════════════════════════ */
.pay-card {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.pay-card h2 {
  font-size: 2rem;
  font-weight: 800;
  margin: .5rem 0;
}

.pay-card p {
  color: rgba(255, 255, 255, 0.75);
  font-size: .9rem;
}

/* ═══ UTILITIES & ANIMATIONS ════════════════════════════ */
.text-muted {
  color: var(--text-muted) !important;
}

.text-accent {
  color: var(--accent);
}

.text-primary-color {
  color: var(--primary-light);
}

.gap-2 {
  gap: .5rem;
}

.gap-3 {
  gap: .75rem;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeOutRight {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
    transform: translateX(40px);
  }
}

.anim-fade-in {
  animation: fadeInUp 0.4s ease;
}

/* ═══ RESPONSIVE ════════════════════════════════════════ */
@media (max-width: 991px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .topbar-toggle {
    display: flex;
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
  }

  .sidebar-overlay.open {
    display: block;
  }
}

@media (max-width: 576px) {
  .page-content {
    padding: 1rem;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .stat-card {
    padding: 1rem;
  }
}

/* ═══ SCROLLBAR ═════════════════════════════════════════ */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* ═══ MODALS ═══════════════════════════════════════════ */
.modal-backdrop {
  background: rgba(0, 0, 0, .65) !important;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal-content {
  background: var(--bg-card) !important;
  border: 1px solid rgba(255, 255, 255, .1) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: 0 12px 48px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .05), 0 0 60px rgba(255, 255, 255, .02) !important;
  color: var(--text-primary) !important;
  overflow: hidden;
}

.modal-header {
  background: linear-gradient(135deg, rgba(255, 255, 255, .05) 0%, rgba(255, 255, 255, .02) 100%) !important;
  border-bottom: 1px solid var(--border-color) !important;
  padding: 1.25rem 1.5rem !important;
  position: relative;
}

.modal-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .1), transparent);
}

.modal-header .modal-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary) !important;
  display: flex;
  align-items: center;
}

.modal-header .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
  opacity: .5;
  transition: opacity .2s ease, transform .2s ease;
}

.modal-header .btn-close:hover {
  opacity: 1;
  transform: scale(1.1);
}

.modal-body {
  padding: 1.5rem !important;
  background: var(--bg-card) !important;
}

/* Modal form fields — enforce dark theme */
.modal-body .form-label {
  color: var(--text-muted) !important;
  font-size: .75rem !important;
  font-weight: 700 !important;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: .4rem !important;
}

.modal-body .form-control,
.modal-body .form-select {
  background: rgba(255, 255, 255, .04) !important;
  border: 1px solid rgba(255, 255, 255, .1) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text-primary) !important;
  padding: .7rem .9rem !important;
  font-size: .9rem !important;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease !important;
}

.modal-body .form-control:focus,
.modal-body .form-select:focus {
  background: rgba(255, 255, 255, .03) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .1), 0 0 12px rgba(255, 255, 255, .05) !important;
  outline: none !important;
}

.modal-body .form-control::placeholder {
  color: rgba(139, 135, 168, .6) !important;
}

.modal-body .form-select option {
  background: #1A1730 !important;
  color: var(--text-primary) !important;
}

.modal-body textarea.form-control {
  min-height: 80px;
  resize: vertical;
}

/* Modal footer buttons */
.modal-body .d-flex.gap-2.justify-content-end {
  padding-top: .75rem;
  margin-top: .5rem;
  border-top: 1px solid var(--border-color);
}

.modal-body .d-flex.gap-2.justify-content-end .btn-outline {
  background: transparent !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-muted) !important;
}

.modal-body .d-flex.gap-2.justify-content-end .btn-outline:hover {
  background: rgba(255, 255, 255, .06) !important;
  color: var(--text-primary) !important;
}

.modal-body .d-flex.gap-2.justify-content-end .btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
  border: none !important;
  color: var(--btn-primary-text) !important;
  box-shadow: 0 4px 12px rgba(255, 255, 255, .1);
}

.modal-body .d-flex.gap-2.justify-content-end .btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-light), var(--primary)) !important;
  box-shadow: 0 6px 20px rgba(255, 255, 255, .15);
  transform: translateY(-1px);
}

.modal-footer {
  border-top: 1px solid var(--border-color) !important;
  padding: 1rem 1.5rem !important;
  background: rgba(0, 0, 0, .1) !important;
}

/* Modal sizing */
.modal-dialog.modal-lg { max-width: 680px; }

/* Smooth entrance animation */
.modal.fade .modal-dialog {
  transform: scale(.95) translateY(10px);
  transition: transform .25s cubic-bezier(.22, .61, .36, 1), opacity .2s ease;
}

.modal.show .modal-dialog {
  transform: scale(1) translateY(0);
}

/* ── Responsive Mobile & Tablet ────────────────────── */
@media (max-width: 991px) {
  /* Sidebar handling */
  .sidebar {
    transform: translateX(-100%);
    z-index: 1040;
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .sidebar-overlay {
    z-index: 1030;
  }
  
  /* Main content & Topbar */
  .main-content {
    margin-left: 0;
  }
  
  .topbar-toggle {
    display: block; /* Show hamburger menu */
  }
  
  .page-content {
    padding: 1rem;
  }
  
  /* Tables */
  .efa-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
  }
  
  /* Grid sizes adjustments */
  .stat-card {
    padding: 1.25rem;
  }
  
  .stat-info h3 {
    font-size: 1.5rem;
  }
  
  .quick-action-card {
    padding: 1rem;
  }
}

@media (max-width: 767px) {
  /* Stack dashboard header on small screens */
  .page-header.d-flex {
    flex-direction: column;
    align-items: flex-start !important;
  }
  
  .page-header img {
    height: 64px !important;
    width: 64px !important;
  }

  /* Prevent any horizontal overflow */
  .page-content {
    overflow-x: hidden;
    max-width: 100vw;
  }

  /* Filter bar: Allow natural wrapping for better visibility */
  .filter-bar {
    flex-direction: row;
    flex-wrap: wrap;
  }

  /* Topbar optimization for very small screens */
  @media (max-width: 420px) {
    .topbar {
      padding: 0.5rem 1rem;
      gap: 0.5rem;
    }
    .topbar-title {
      font-size: 0.95rem;
    }
    .topbar-user span.badge-role {
      display: none; /* Hide 'Member' badge on tiny screens to save space */
    }
    .topbar-user span:last-child {
      font-size: 0.85rem;
    }
  }

  .filter-bar .form-control,
  .filter-bar .form-select {
    max-width: 100% !important;
    width: 100% !important;
  }

  .filter-bar .btn {
    width: 100%;
    justify-content: center;
  }

  /* ── Table → Card Layout ── */
  .efa-table-wrap {
    overflow-x: visible;
    border: none;
    background: none;
    backdrop-filter: none;
    box-shadow: none;
  }

  .efa-table {
    display: block;
    width: 100%;
  }

  .efa-table thead {
    display: none;
  }

  .efa-table tbody {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .efa-table tbody tr {
    display: flex;
    flex-direction: column;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.2));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 1rem;
    gap: 0.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  }

  .efa-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
  }

  .efa-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.35rem 0;
    border-bottom: none;
    font-size: 0.85rem;
    word-break: break-word;
  }

  .efa-table td::before {
    content: attr(data-label);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    flex-shrink: 0;
    margin-right: 0.75rem;
  }

  /* First cell (member name/avatar) takes full width */
  .efa-table td:first-child {
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .efa-table td:first-child::before {
    display: none;
  }

  /* Actions cell */
  .efa-table td:last-child {
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    justify-content: flex-start;
  }

  .efa-table td:last-child::before {
    display: none;
  }

  /* Member name + avatar responsive */
  .efa-table .d-flex.align-items-center.gap-2 {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  /* Action buttons wrap nicely */
  .efa-table .d-flex.gap-1.flex-wrap {
    gap: 0.4rem;
  }
  /* Event Cards Mobile Optimization */
  .event-card {
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem;
  }

  .event-card .d-flex.align-items-center.gap-2 {
    width: 100%;
    justify-content: space-between;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
  }

  .event-date-badge {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
  }

  .event-info {
    padding-right: 70px; /* Space for date badge */
  }

  .event-info h4 {
    font-size: 1.1rem;
    line-height: 1.3;
  }
}

/* ═══ PROFESSIONAL REMINDERS ════════════════════════════ */
.reminder-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.reminder-item {
  display: flex;
  align-items: center;
  padding: 0.85rem 1.25rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.reminder-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateX(4px);
}

.reminder-date-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  margin-right: 1.25rem;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.reminder-date-marker .month {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--primary-light);
  line-height: 1;
}

.reminder-date-marker .day {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.reminder-content {
  flex-grow: 1;
  min-width: 0;
}

.reminder-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reminder-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.25rem;
}

.reminder-meta-item {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.reminder-meta-item i {
  width: 12px;
  height: 12px;
}

.reminder-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: 1.25rem;
}

/* Mobile optimizations for professional reminders */
@media (max-width: 576px) {
  .reminder-item {
    padding: 1rem;
    align-items: flex-start;
  }
  
  .reminder-date-marker {
    width: 40px;
    height: 40px;
    margin-right: 0.75rem;
  }
  
  .reminder-date-marker .day {
    font-size: 0.95rem;
  }
  
  .reminder-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    margin-left: 0;
  }
  
  .reminder-meta {
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
  }
}

/* ══════════════════════════════════════════
   Locked Custom Video Player
   ══════════════════════════════════════════ */
.video-player-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
}

.video-player-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* Disable native interaction */
}

/* The Lock Shield: Absorbs all clicks to stop YT redirects */
.video-shield {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 20;
  cursor: pointer;
}

/* Custom Controls Bar */
.custom-player-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 30;
  padding: 1.5rem 1rem 0.75rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-player-container:hover .custom-player-controls {
  opacity: 1;
}

.player-main-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.play-toggle-btn {
  background: none;
  border: none;
  color: #fff;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: transform 0.2s ease;
}

.play-toggle-btn:hover {
  transform: scale(1.15);
}

/* Scrubber / Progress Bar */
.scrubber-container {
  flex-grow: 1;
  height: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  position: relative;
  cursor: pointer;
}

.scrubber-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  width: 0%;
}

.scrubber-container:hover {
  height: 6px;
}

.time-display {
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  min-width: 80px;
  text-align: right;
  opacity: 0.8;
}

.player-big-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  background: rgba(var(--primary-rgb), 0.9);
  border-radius: 50%;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
  opacity: 0;
}

.player-actions-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.fullscreen-btn {
  background: none;
  border: none;
  color: #fff;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: transform 0.2s ease;
  opacity: 0.8;
}

.fullscreen-btn:hover {
  transform: scale(1.15);
  opacity: 1;
}