/* =============================================================================
   AFNNA PORTAL — MAIN STYLESHEET
   Brand colours extracted from logo:
     Primary:   #8B1A1A  (deep maroon-red — "AFNNA" text)
     Secondary: #6B4C11  (warm brown-gold — logo mark)
     Accent:    #C8960C  (gold — Africa shape highlight)
     Dark:      #2C1810  (near-black brown)
     Light:     #FDF8F3  (warm off-white background)
============================================================================= */

:root {
  --primary:        #8B1A1A;
  --primary-dark:   #6B1313;
  --primary-light:  #B22222;
  --secondary:      #6B4C11;
  --accent:         #C8960C;
  --accent-light:   #E8B84B;
  --dark:           #2C1810;
  --light:          #FDF8F3;
  --light-alt:      #F5EDE3;
  --gray-100:       #F8F4EF;
  --gray-200:       #EDE4D8;
  --gray-400:       #A89880;
  --gray-600:       #6B5B4A;
  --gray-800:       #3D2E20;
  --white:          #FFFFFF;
  --success:        #1A6B3A;
  --success-light:  #D4EDDA;
  --danger:         #8B1A1A;
  --danger-light:   #F8D7DA;
  --warning:        #C8960C;
  --warning-light:  #FFF3CD;
  --info:           #1A4A6B;
  --info-light:     #D1ECF1;

  --font-heading: 'Outfit', sans-serif;
  --font-body:    'Inter', sans-serif;

  --radius-sm:  6px;
  --radius:     10px;
  --radius-lg:  16px;
  --radius-xl:  24px;

  --shadow-sm:  0 1px 3px rgba(44,24,16,.08);
  --shadow:     0 4px 16px rgba(44,24,16,.12);
  --shadow-lg:  0 8px 32px rgba(44,24,16,.16);
  --shadow-xl:  0 16px 48px rgba(44,24,16,.20);

  --transition: all .2s ease;
}

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

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--gray-800);
  background: var(--light);
  -webkit-font-smoothing: antialiased;
}

h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-heading);
  color: var(--dark);
  font-weight: 700;
  line-height: 1.25;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

/* ── Auth Layout ─────────────────────────────────────────────────────────── */
.auth-wrapper {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* Left panel — brand panel */
.auth-panel {
  background: var(--primary);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 3rem;
}

.auth-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(200,150,12,.25) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(107,76,17,.35) 0%, transparent 50%);
}

.auth-panel::after {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.08);
  top: -150px;
  right: -200px;
}

.auth-panel-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--white);
  max-width: 380px;
}

.auth-panel-logo {
  width: 180px;
  margin-bottom: 2.5rem;
  filter: brightness(0) invert(1);
}

.auth-panel-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: .75rem;
  line-height: 1.2;
}

.auth-panel-sub {
  color: rgba(255,255,255,.75);
  font-size: .95rem;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.auth-panel-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  width: 100%;
}

.auth-stat {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius);
  padding: .75rem .5rem;
  text-align: center;
}

.auth-stat-num {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-light);
  display: block;
}

.auth-stat-label {
  font-size: .7rem;
  color: rgba(255,255,255,.7);
  text-transform: uppercase;
  letter-spacing: .05em;
}

@media (max-width: 991px) {
  .auth-wrapper { grid-template-columns: 1fr; }
  .auth-panel   { display: none; }
}

/* Right panel — form */
.auth-form-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2.5rem 3rem;
  overflow-y: auto;
  background: var(--white);
}

@media (max-width: 576px) {
  .auth-form-wrap { padding: 2rem 1.25rem; }
}

.auth-form-header {
  margin-bottom: 2rem;
}

.auth-form-header .logo-mobile {
  display: none;
  width: 130px;
  margin-bottom: 1.25rem;
}

@media (max-width: 991px) {
  .auth-form-header .logo-mobile { display: block; margin-left: auto; margin-right: auto; }
  .auth-form-header { text-align: center; }
  .auth-form-wrap {
    padding: 2rem;
    min-height: 100vh;
    justify-content: center;
  }
}

.auth-form-header h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: .25rem;
}

.auth-form-header p {
  color: var(--gray-600);
  font-size: .9rem;
}

/* ── Form Controls ───────────────────────────────────────────────────────── */
.form-label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: .35rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.form-control, .form-select {
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: .65rem 1rem;
  font-size: .92rem;
  font-family: var(--font-body);
  color: var(--gray-800);
  background: var(--white);
  transition: var(--transition);
  height: auto;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139,26,26,.12);
  outline: none;
  background: var(--white);
}

.form-control.is-invalid, .form-select.is-invalid {
  border-color: var(--primary-light);
  box-shadow: none;
}

.invalid-feedback {
  font-size: .8rem;
  color: var(--primary-light);
  margin-top: .25rem;
}

.input-group-text {
  background: var(--gray-100);
  border: 1.5px solid var(--gray-200);
  color: var(--gray-600);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.input-group .form-control {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.input-group .form-control:focus { z-index: 2; }

/* Password toggle */
.password-wrap { position: relative; }
.password-wrap .form-control { padding-right: 3rem; }
.password-toggle {
  position: absolute;
  right: .75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--gray-400);
  cursor: pointer;
  padding: 0;
  font-size: 1.1rem;
  transition: var(--transition);
  z-index: 5;
}
.password-toggle:hover { color: var(--primary); }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn-primary-afnna {
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  padding: .75rem 1.5rem;
  font-family: var(--font-heading);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.btn-primary-afnna:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-primary-afnna:active:not(:disabled) { transform: translateY(0); }

.btn-primary-afnna:disabled {
  opacity: .7;
  cursor: not-allowed;
}

.btn-outline-afnna {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: .7rem 1.5rem;
  font-family: var(--font-heading);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  text-decoration: none;
}

.btn-outline-afnna:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-1px);
}

/* ── Step Indicator (Registration) ──────────────────────────────────────── */
.reg-steps {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
  gap: 0;
}

.reg-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
}

.reg-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 16px;
  left: calc(50% + 16px);
  right: calc(-50% + 16px);
  height: 2px;
  background: var(--gray-200);
  transition: background .3s;
  z-index: 0;
}

.reg-step.completed:not(:last-child)::after {
  background: var(--primary);
}

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--gray-200);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: .8rem;
  font-weight: 700;
  color: var(--gray-400);
  position: relative;
  z-index: 1;
  transition: var(--transition);
}

.reg-step.active .step-circle {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--white);
}

.reg-step.completed .step-circle {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--white);
}

.step-label {
  font-size: .7rem;
  color: var(--gray-400);
  font-weight: 500;
  margin-top: .35rem;
  text-align: center;
  white-space: nowrap;
}

.reg-step.active .step-label,
.reg-step.completed .step-label { color: var(--primary); }

/* Step panels */
.step-panel { display: none; }
.step-panel.active { display: block; }

/* ── Membership Type Cards ───────────────────────────────────────────────── */
.membership-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .75rem;
  margin-bottom: 1rem;
}

@media (max-width: 576px) {
  .membership-cards { grid-template-columns: 1fr; }
}

.membership-card {
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1rem .75rem;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  text-align: center;
}

.membership-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.membership-card:hover {
  border-color: var(--primary);
  background: var(--gray-100);
}

.membership-card.selected {
  border-color: var(--primary);
  background: rgba(139,26,26,.04);
}

.membership-card.selected::after {
  content: '\2713';
  position: absolute;
  top: .4rem;
  right: .5rem;
  width: 18px;
  height: 18px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  font-size: .7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 18px;
}

.mem-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto .5rem;
  font-size: 1rem;
}

.mem-card-icon.full     { background: rgba(139,26,26,.1); color: var(--primary); }
.mem-card-icon.assoc    { background: rgba(200,150,12,.1); color: var(--accent); }
.mem-card-icon.trainee  { background: rgba(26,106,58,.1);  color: var(--success); }

.mem-card-name {
  font-family: var(--font-heading);
  font-size: .82rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: .2rem;
}

.mem-card-fee {
  font-size: .75rem;
  color: var(--gray-600);
}

.mem-card-fee strong {
  color: var(--primary);
  font-weight: 600;
}

/* ── Alerts ──────────────────────────────────────────────────────────────── */
.alert-afnna {
  border-radius: var(--radius-sm);
  padding: .85rem 1.1rem;
  font-size: .88rem;
  border: none;
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  margin-bottom: 1.25rem;
}

.alert-afnna i { font-size: 1.1rem; flex-shrink: 0; margin-top: .05rem; }

.alert-error   { background: var(--danger-light);  color: #6B1313; }
.alert-success { background: var(--success-light); color: #0A4021; }
.alert-info    { background: var(--info-light);    color: #0C3A52; }
.alert-warning { background: var(--warning-light); color: #7A5A00; }

/* ── Divider with text ───────────────────────────────────────────────────── */
.divider-text {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 1.25rem 0;
  color: var(--gray-400);
  font-size: .82rem;
}
.divider-text::before, .divider-text::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

/* ── Password strength meter ─────────────────────────────────────────────── */
.strength-meter {
  height: 4px;
  border-radius: 2px;
  background: var(--gray-200);
  margin-top: .4rem;
  overflow: hidden;
}

.strength-meter-bar {
  height: 100%;
  border-radius: 2px;
  transition: width .3s, background .3s;
  width: 0;
}

.strength-label {
  font-size: .75rem;
  margin-top: .25rem;
  font-weight: 500;
}

/* ── Checkbox / Terms ───────────────────────────────────────────────────── */
.form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

.form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(139,26,26,.15);
  border-color: var(--primary);
}

/* ── Spinner ─────────────────────────────────────────────────────────────── */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  display: none;
}
.spinner.show { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Section divider ─────────────────────────────────────────────────────── */
.section-tag {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent);
  margin-bottom: .25rem;
}

/* ── Footer link ─────────────────────────────────────────────────────────── */
.auth-footer-link {
  text-align: center;
  font-size: .88rem;
  color: var(--gray-600);
  margin-top: 1.5rem;
}

.auth-footer-link a {
  color: var(--primary);
  font-weight: 600;
}

.auth-footer-link a:hover { color: var(--primary-dark); text-decoration: underline; }

/* ── Utility ─────────────────────────────────────────────────────────────── */
.text-primary-afnna { color: var(--primary) !important; }
.text-accent-afnna  { color: var(--accent)  !important; }
.text-muted-afnna   { color: var(--gray-600); }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

/* File upload styled */
.file-upload-area {
  border: 2px dashed var(--gray-200);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--gray-100);
}
.file-upload-area:hover, .file-upload-area.dragover {
  border-color: var(--primary);
  background: rgba(139,26,26,.03);
}
.file-upload-area input { display: none; }
.file-upload-area i {
  font-size: 2rem;
  color: var(--gray-400);
  margin-bottom: .5rem;
}
.file-upload-area p { font-size: .85rem; color: var(--gray-600); margin: 0; }
.file-name-display {
  font-size: .82rem;
  color: var(--primary);
  font-weight: 500;
  margin-top: .4rem;
}

/* Small helper text */
.form-text {
  font-size: .78rem;
  color: var(--gray-400);
  margin-top: .2rem;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-200); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* =============================================================================
   APP SHELL — Sidebar, Topbar, Dashboard widgets (member/admin portal pages)
============================================================================= */
.app-body { display: flex; min-height: 100vh; background: var(--light); }

.app-sidebar {
  width: 264px;
  flex-shrink: 0;
  background: var(--white);
  border-right: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 1030;
  transition: transform .25s ease;
}

.app-sidebar-brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid var(--gray-200);
}
.app-sidebar-brand img { width: 36px; }
.app-sidebar-brand strong {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.02rem;
  color: var(--primary);
  letter-spacing: .02em;
  display: block;
  line-height: 1.1;
}
.app-sidebar-brand small { font-size: .65rem; color: var(--gray-400); font-weight: 600; letter-spacing: .04em; }

.app-sidebar-nav { flex: 1; overflow-y: auto; padding: .9rem .75rem; }
.app-nav-section-label {
  font-size: .66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--gray-400);
  padding: .85rem .65rem .35rem;
}
.app-nav-link {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .58rem .65rem;
  border-radius: var(--radius-sm);
  color: var(--gray-800);
  font-size: .855rem;
  font-weight: 500;
  margin-bottom: .15rem;
  transition: var(--transition);
}
.app-nav-link i { font-size: 1.02rem; width: 20px; text-align: center; color: var(--gray-400); flex-shrink: 0; }
.app-nav-link:hover { background: var(--gray-100); color: var(--primary); }
.app-nav-link:hover i { color: var(--primary); }
.app-nav-link.active { background: rgba(139,26,26,.08); color: var(--primary); font-weight: 600; }
.app-nav-link.active i { color: var(--primary); }
.app-nav-link.disabled { color: var(--gray-400); cursor: default; pointer-events: none; }
.app-nav-link.disabled i { color: var(--gray-200); }
.app-nav-link span.lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-nav-soon {
  margin-left: auto;
  font-size: .58rem;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--gray-100);
  color: var(--gray-400);
  padding: .15rem .4rem;
  border-radius: 20px;
  letter-spacing: .04em;
  flex-shrink: 0;
}
.app-nav-badge {
  margin-left: auto;
  font-size: .62rem;
  font-weight: 700;
  background: var(--primary);
  color: var(--white);
  padding: .1rem .42rem;
  border-radius: 20px;
  flex-shrink: 0;
  line-height: 1.5;
}

.app-sidebar-footer { padding: .9rem 1.1rem; border-top: 1px solid var(--gray-200); font-size: .72rem; color: var(--gray-400); }

.app-main { flex: 1; margin-left: 264px; min-width: 0; }

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 1020;
  background: rgba(253,248,243,.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .85rem 1.5rem;
  gap: 1rem;
}

.app-topbar-toggle {
  display: none;
  background: none; border: none; font-size: 1.3rem; color: var(--gray-800); cursor: pointer;
}

.app-topbar-greeting { font-family: var(--font-heading); font-weight: 700; color: var(--dark); font-size: 1.05rem; line-height: 1.2; }
.app-topbar-greeting small { color: var(--gray-400); font-weight: 400; font-size: .78rem; display: block; }

.app-topbar-actions { display: flex; align-items: center; gap: .75rem; }

.app-icon-btn {
  position: relative;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--gray-100);
  color: var(--gray-800);
  border: none;
  font-size: 1.05rem;
  cursor: pointer;
  transition: var(--transition);
}
.app-icon-btn:hover { background: var(--gray-200); }
.app-icon-badge {
  position: absolute; top: -2px; right: -2px;
  background: var(--primary); color: white;
  font-size: .6rem; font-weight: 700;
  min-width: 16px; height: 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--light);
  padding: 0 2px;
}

.app-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-weight: 700; font-size: .82rem;
  flex-shrink: 0;
  overflow: hidden;
}
.app-avatar img { width: 100%; height: 100%; object-fit: cover; }
.app-avatar.lg { width: 60px; height: 60px; font-size: 1.3rem; }

.app-content { padding: 1.65rem; max-width: 1500px; }

@media (max-width: 991px) {
  .app-sidebar { transform: translateX(-100%); }
  .app-sidebar.open { transform: translateX(0); box-shadow: var(--shadow-xl); }
  .app-main { margin-left: 0; }
  .app-topbar-toggle { display: flex; }
  .app-sidebar-backdrop {
    display: none;
    position: fixed; inset: 0; background: rgba(44,24,16,.4); z-index: 1025;
  }
  .app-sidebar-backdrop.show { display: block; }
}

/* ── Dashboard cards ─────────────────────────────────────────────────────── */
.dash-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  padding: 1.4rem 1.5rem;
  height: 100%;
}

.dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.1rem;
  gap: .5rem;
}
.dash-card-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: .98rem;
  color: var(--dark);
  display: flex; align-items: center; gap: .5rem;
  margin: 0;
}
.dash-card-title i { color: var(--primary); }
.dash-card-link { font-size: .78rem; font-weight: 600; white-space: nowrap; }

.kpi-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  padding: 1.2rem 1.35rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 100%;
}
.kpi-icon {
  width: 46px; height: 46px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; flex-shrink: 0;
}
.kpi-value { font-family: var(--font-heading); font-size: 1.45rem; font-weight: 800; color: var(--dark); line-height: 1.1; }
.kpi-label { font-size: .76rem; color: var(--gray-600); margin-top: .15rem; }

.badge-afnna {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .28rem .65rem;
  border-radius: 20px;
  font-size: .7rem;
  font-weight: 700;
  text-transform: capitalize;
  white-space: nowrap;
}
.badge-active, .badge-paid, .badge-completed, .badge-approved, .badge-attended, .badge-published { background: var(--success-light); color: #0A4021; }
.badge-pending, .badge-draft { background: var(--warning-light); color: #7A5A00; }
.badge-suspended, .badge-rejected, .badge-failed, .badge-cancelled { background: var(--danger-light); color: #6B1313; }
.badge-lapsed, .badge-no_show, .badge-refunded, .badge-waived, .badge-archived { background: var(--gray-200); color: var(--gray-600); }
.badge-registered, .badge-waitlisted { background: var(--info-light); color: #0C3A52; }
.badge-neutral { background: var(--gray-100); color: var(--gray-800); }
.badge-accent { background: rgba(200,150,12,.14); color: #7A5A00; }
.badge-primary-soft { background: rgba(139,26,26,.08); color: var(--primary); }

.progress-afnna { height: 8px; border-radius: 20px; background: var(--gray-200); overflow: hidden; }
.progress-afnna-bar { height: 100%; background: var(--primary); border-radius: 20px; transition: width .4s ease; }
.progress-afnna-bar.warn { background: var(--warning); }
.progress-afnna-bar.danger { background: var(--danger); }

.mini-list-item {
  display: flex; align-items: flex-start; gap: .75rem;
  padding: .7rem 0;
  border-bottom: 1px solid var(--gray-100);
}
.mini-list-item:first-child { padding-top: 0; }
.mini-list-item:last-child { border-bottom: none; padding-bottom: 0; }

.mini-icon {
  width: 34px; height: 34px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  background: var(--gray-100); color: var(--primary);
  flex-shrink: 0; font-size: .9rem;
}

.event-mini-card {
  display: flex; gap: .9rem; padding: .85rem;
  border: 1px solid var(--gray-200); border-radius: var(--radius);
  margin-bottom: .6rem; transition: var(--transition);
}
.event-mini-card:last-child { margin-bottom: 0; }
.event-mini-card:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }

.event-date-block {
  width: 50px; flex-shrink: 0; text-align: center;
  background: var(--gray-100); border-radius: var(--radius-sm); padding: .4rem 0;
}
.event-date-block .day { font-family: var(--font-heading); font-weight: 800; font-size: 1.1rem; color: var(--primary); line-height: 1; }
.event-date-block .mon { font-size: .62rem; text-transform: uppercase; color: var(--gray-600); font-weight: 600; }

.quick-action-btn {
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  padding: 1.05rem .6rem;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-800);
  text-align: center;
  font-size: .76rem;
  font-weight: 600;
  transition: var(--transition);
  width: 100%;
}
.quick-action-btn i { font-size: 1.3rem; color: var(--primary); }
.quick-action-btn:hover:not(.disabled) { border-color: var(--primary); background: rgba(139,26,26,.04); color: var(--primary); transform: translateY(-2px); }
.quick-action-btn.disabled { opacity: .5; cursor: default; pointer-events: none; }

.empty-state { text-align: center; padding: 1.75rem 1rem; color: var(--gray-400); }
.empty-state i { font-size: 1.9rem; margin-bottom: .5rem; display: block; }
.empty-state p { font-size: .83rem; margin: 0; }

.alert-banner {
  display: flex; align-items: center; gap: .85rem;
  padding: .95rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}
.alert-banner i { font-size: 1.35rem; flex-shrink: 0; }
.alert-banner-warning { background: var(--warning-light); color: #7A5A00; }
.alert-banner-danger { background: var(--danger-light); color: #6B1313; }
.alert-banner-content { flex: 1; }
.alert-banner-content strong { display: block; font-size: .88rem; }
.alert-banner-content span { font-size: .8rem; opacity: .9; }

.table-afnna { font-size: .85rem; }
.table-afnna thead th {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--gray-400); font-weight: 700; border-bottom: 1.5px solid var(--gray-200);
  padding: .5rem .6rem;
}
.table-afnna tbody td { padding: .65rem .6rem; vertical-align: middle; border-bottom: 1px solid var(--gray-100); }
.table-afnna tbody tr:last-child td { border-bottom: none; }

.cat-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: .35rem; }

/* ── Profile page ────────────────────────────────────────────────────────── */
.profile-tabs {
  display: flex; gap: .25rem; border-bottom: 2px solid var(--gray-200); margin-bottom: 1.5rem; flex-wrap: wrap;
}
.profile-tab {
  padding: .65rem 1.1rem; font-size: .85rem; font-weight: 600; color: var(--gray-600);
  border: none; border-bottom: 2px solid transparent; margin-bottom: -2px; cursor: pointer;
  display: flex; align-items: center; gap: .45rem; background: none; transition: var(--transition);
}
.profile-tab i { font-size: 1rem; }
.profile-tab:hover { color: var(--primary); }
.profile-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.profile-pane { display: none; }
.profile-pane.active { display: block; }

.photo-upload-wrap { position: relative; width: 92px; height: 92px; flex-shrink: 0; }
.photo-upload-wrap .app-avatar { width: 92px; height: 92px; font-size: 1.9rem; }
.photo-upload-overlay {
  position: absolute; inset: 0; border-radius: 50%; background: rgba(44,24,16,.55);
  display: flex; align-items: center; justify-content: center; opacity: 0;
  transition: var(--transition); cursor: pointer; color: #fff; font-size: 1.1rem;
}
.photo-upload-wrap:hover .photo-upload-overlay { opacity: 1; }
.photo-upload-wrap input[type="file"] { display: none; }

.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: .75rem 0; border-bottom: 1px solid var(--gray-100); gap: 1rem; }
.toggle-row:last-child { border-bottom: none; }
.toggle-row-label { font-size: .85rem; font-weight: 600; color: var(--dark); }
.toggle-row-desc { font-size: .76rem; color: var(--gray-600); margin-top: .1rem; }

/* ── Modals (global polish) ──────────────────────────────────────────────── */
.modal-content { border: none; border-radius: var(--radius-lg); box-shadow: var(--shadow-xl); }
.modal-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--gray-200); }
.modal-header .btn-close { box-shadow: none; opacity: .5; }
.modal-header .btn-close:hover { opacity: .85; }
.modal-body { padding: 1.5rem; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--gray-200); }

/* ── Member Profile modal ────────────────────────────────────────────────── */
.profile-header {
  display: flex; align-items: center; gap: 1.1rem;
  padding: 1.35rem 1.5rem;
  margin: -1.5rem -1.5rem 1.35rem;
  background: linear-gradient(135deg, rgba(139,26,26,.07), rgba(200,150,12,.06));
  border-bottom: 1px solid var(--gray-200);
}
.profile-header .app-avatar.lg {
  width: 64px; height: 64px; font-size: 1.4rem;
  box-shadow: 0 0 0 4px var(--white), var(--shadow-sm);
}
.profile-header-id { flex: 1; min-width: 0; }
.profile-header-name { font-family: var(--font-heading); font-weight: 700; font-size: 1.15rem; color: var(--dark); overflow-wrap: anywhere; }
.profile-header-no { font-size: .8rem; color: var(--gray-600); margin-top: .15rem; }
.profile-header-badges { display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; flex-shrink: 0; }

.profile-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.5rem;
  background: var(--gray-100);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  margin-bottom: 1.35rem;
}
@media (max-width: 575px) { .profile-detail-grid { grid-template-columns: 1fr; } }

.profile-detail-item { display: flex; gap: .65rem; align-items: flex-start; min-width: 0; }
.profile-detail-item .profile-detail-icon {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--white); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; flex-shrink: 0; box-shadow: var(--shadow-sm);
}
.profile-detail-body { min-width: 0; }
.profile-detail-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--gray-400); font-weight: 700; }
.profile-detail-value { font-size: .87rem; color: var(--dark); font-weight: 600; margin-top: .1rem; overflow-wrap: anywhere; }

.profile-section { padding-top: 1.25rem; margin-top: .25rem; border-top: 1px solid var(--gray-100); }
.profile-section:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.profile-section-title {
  font-family: var(--font-heading); font-weight: 700; font-size: .88rem;
  color: var(--dark); display: flex; align-items: center; gap: .45rem;
  margin: 0 0 .8rem;
}
.profile-section-title i { color: var(--primary); }

.form-switch .form-check-input { width: 2.4em; height: 1.3em; }

/* ── Search-select combobox (e.g. "pick a member" in admin forms) ──────────── */
.search-select { position: relative; }
.search-select-results {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); max-height: 220px; overflow-y: auto; z-index: 1060; display: none;
}
.search-select-results.show { display: block; }
.search-select-item { padding: .55rem .8rem; cursor: pointer; font-size: .85rem; }
.search-select-item:hover, .search-select-item.active { background: var(--gray-100); }
.search-select-item small { display: block; color: var(--gray-400); font-size: .72rem; }
.search-select-empty { padding: .65rem .8rem; font-size: .8rem; color: var(--gray-400); }

/* ── DataTables brand alignment ─────────────────────────────────────────── */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
  border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm); padding: .35rem .6rem; font-size: .85rem;
}
.dataTables_wrapper .dataTables_info, .dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_paginate {
  font-size: .82rem; color: var(--gray-600);
}
.dataTables_wrapper .page-link { color: var(--primary); border-color: var(--gray-200); }
.dataTables_wrapper .page-item.active .page-link { background: var(--primary); border-color: var(--primary); color: #fff; }
.dataTables_wrapper .page-link:hover { color: var(--primary-dark); background: var(--gray-100); }
table.dataTable thead th { position: relative; }

/* ── Public: Terms & Conditions ─────────────────────────────────────────── */
.btn-outline-afnna.btn-sm { padding: .45rem 1.1rem; font-size: .82rem; width: auto; }

.terms-page { min-height: 100vh; background: var(--light); }

.terms-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 1.75rem; background: var(--white); border-bottom: 1px solid var(--gray-200);
  position: sticky; top: 0; z-index: 10;
}
.terms-header-brand { display: flex; align-items: center; gap: .6rem; color: var(--dark); font-family: var(--font-heading); font-weight: 700; }
.terms-header-brand img { height: 34px; width: auto; }
.terms-header-brand:hover { color: var(--primary); }

.terms-wrap { max-width: 760px; margin: 0 auto; padding: 3rem 1.5rem 4rem; }

.terms-intro h1 { font-size: 1.9rem; margin: .35rem 0 .5rem; }
.terms-updated { font-size: .8rem; color: var(--gray-400); font-weight: 600; letter-spacing: .02em; margin-bottom: 1rem; }
.terms-lede { color: var(--gray-600); font-size: .95rem; }

.terms-card {
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); padding: 2rem 2.25rem; margin-top: 1.5rem;
}

.terms-section { padding: 1.35rem 0; border-bottom: 1px solid var(--gray-100); }
.terms-section:first-child { padding-top: 0; }
.terms-section:last-child { border-bottom: none; padding-bottom: 0; }
.terms-section h2 {
  display: flex; align-items: center; gap: .65rem; font-size: 1.05rem; margin-bottom: .6rem;
}
.terms-section p { color: var(--gray-800); font-size: .92rem; margin-bottom: .5rem; }
.terms-section p:last-child { margin-bottom: 0; }

.terms-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%;
  background: rgba(139,26,26,.09); color: var(--primary);
  font-size: .82rem; font-weight: 800;
}

.terms-footnote { font-size: .82rem; color: var(--gray-400); margin-top: 1.5rem; text-align: center; }

@media (max-width: 576px) {
  .terms-card { padding: 1.5rem 1.25rem; }
  .terms-header { padding: 1rem; }
}
