/* =============================================================================
   FINGERPRINTS CHILDREN CENTER — SUMMER CAMP
   Global Stylesheet — app.css
   Version: 1.0.0
   ============================================================================= */

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


/* =============================================================================
   2. CSS CUSTOM PROPERTIES (BRAND VARIABLES)
   ============================================================================= */
:root {
  /* ── FPC Official Brand Colors ── */
  --color-blue:        #223f81;   /* FPC Navy Blue  — headings, authority */
  --color-yellow:      #ffea00;   /* FPC Yellow     — joy, highlights, CTA */
  --color-green:       #aac837;   /* FPC Green      — growth, success */
  --color-green-dark:  #7fa520;   /* FPC Green dark — accessible on white */
  --color-red:         #c93e3c;   /* FPC Red        — energy, danger */
  --color-beige:       #fefae8;   /* FPC Beige      — warm background */
  --color-body:        #5b5b5b;   /* FPC Body text */

  /* Semantic aliases — all mapped to brand palette, no off-brand values */
  --color-gold:        #d4a800;                 /* muted amber — readable on dark, not neon */
  --color-teal:        var(--color-blue);       /* alias → brand navy */
  --color-olive:       var(--color-green);
  --color-orange:      #c87820;   /* warm amber — derived from yellow/red space */
  --color-sky:         var(--color-blue);       /* alias → brand navy */
  --color-dark:        var(--color-blue);
  --color-gray:        #e5e7eb;
  --color-white:       #ffffff;

  /* Semantic roles */
  --color-primary:     var(--color-blue);
  --color-accent:      var(--color-yellow);
  --color-danger:      var(--color-red);
  --color-success:     var(--color-green);
  --color-info:        var(--color-blue);       /* info → brand navy */
  --color-warning:     var(--color-orange);

  /* Tints (generated from brand colors) */
  --color-teal-light:  #eff1f8;   /* light navy tint — replaces off-brand sky blue */
  --color-teal-dark:   #1a3068;   /* dark navy */
  --color-gold-light:  #fff8ed;   /* very light warm amber — warning tint */
  --color-gold-dark:   #8a6010;  /* dark amber — readable on white (6.5:1) */
  --color-red-light:   #fdeaea;
  --color-olive-light: #f0f7dc;
  --color-sky-light:   #eff1f8;   /* light navy tint — replaces off-brand sky blue */

  /* Neutral */
  --color-body-bg:     #fefae8;   /* FPC warm beige */
  --color-border:      #e0ddd0;
  --color-text-muted:  #5b5b5b;
  --color-text-light:  #9ca3af;

  /* Typography — Poppins only (matches FPC website) */
  --font-heading: 'Poppins', 'Helvetica Neue', sans-serif;
  --font-body:    'Poppins', 'Helvetica Neue', sans-serif;

  /* Spacing */
  --space-xs:   4px;
  --space-sm:   8px;
  --space-md:   16px;
  --space-lg:   24px;
  --space-xl:   32px;
  --space-2xl:  48px;
  --space-3xl:  64px;

  /* Border Radius */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  20px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.10);
  --shadow-lg:  0 8px 24px rgba(0,0,0,0.12);
  --shadow-xl:  0 16px 48px rgba(0,0,0,0.14);

  /* Transitions */
  --transition: 0.2s ease;

  /* Layout */
  --sidebar-width: 240px;
  --navbar-height: 64px;
}


/* =============================================================================
   3. CSS RESET & BASE STYLES
   ============================================================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--color-body);
  background-color: var(--color-body-bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video {
  display: block;
  max-width: 100%;
}

a {
  color: var(--color-teal);
  text-decoration: none;
  transition: color var(--transition);
}

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

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-blue);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.9rem; }

p { margin-bottom: var(--space-md); }
p:last-child { margin-bottom: 0; }

strong { font-weight: 600; }
small  { font-size: 0.8rem; }

hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-lg) 0;
}

input, select, textarea, button {
  font-family: var(--font-body);
  font-size: 0.95rem;
}


/* =============================================================================
   4. LAYOUT HELPERS
   ============================================================================= */
.container {
  width: 100%;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
}

.container-wide {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
}

.container-narrow {
  width: 100%;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
}

/* Flex utilities */
.d-flex         { display: flex; }
.d-grid         { display: grid; }
.align-center   { align-items: center; }
.justify-center { justify-content: center; }
.justify-between{ justify-content: space-between; }
.flex-wrap      { flex-wrap: wrap; }
.gap-sm         { gap: var(--space-sm); }
.gap-md         { gap: var(--space-md); }
.gap-lg         { gap: var(--space-lg); }

/* Spacing utilities */
.mt-sm  { margin-top: var(--space-sm); }
.mt-md  { margin-top: var(--space-md); }
.mt-lg  { margin-top: var(--space-lg); }
.mb-sm  { margin-bottom: var(--space-sm); }
.mb-md  { margin-bottom: var(--space-md); }
.mb-lg  { margin-bottom: var(--space-lg); }

/* Text utilities */
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.text-muted   { color: var(--color-text-muted); }
.text-danger  { color: var(--color-red); }
.text-success { color: var(--color-olive); }
.text-primary { color: var(--color-teal); }
.text-gold    { color: var(--color-gold); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}


/* =============================================================================
   5. NAVBAR / HEADER
   ============================================================================= */
.navbar {
  position: sticky;
  top: 0;
  z-index: 900;
  height: var(--navbar-height);
  background: linear-gradient(135deg, #223f81 0%, #1a3068 100%);
  border-bottom: 4px solid var(--color-yellow);
  box-shadow: 0 4px 16px rgba(34,63,129,0.18);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Logo area */
.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  text-decoration: none;
}

.navbar-brand img {
  height: 44px;
  width: auto;
}

/* Fingerprints logo text — colorful spans */
.fp-logo-text {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1;
}

.fp-logo-text .letter-f1  { color: #ffea00; }
.fp-logo-text .letter-i   { color: #aac837; }
.fp-logo-text .letter-n   { color: #c93e3c; }
.fp-logo-text .letter-g   { color: #ffea00; }
.fp-logo-text .letter-e   { color: #aac837; }
.fp-logo-text .letter-r   { color: #c93e3c; }
.fp-logo-text .letter-p   { color: #ffea00; }
.fp-logo-text .letter-r2  { color: #aac837; }
.fp-logo-text .letter-i2  { color: #c93e3c; }
.fp-logo-text .letter-n2  { color: #ffea00; }
.fp-logo-text .letter-t   { color: #aac837; }
.fp-logo-text .letter-s   { color: #c93e3c; }

.fp-logo-sub {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--color-text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-top: 2px;
  display: block;
}

/* Navbar right actions */
.navbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

/* Language toggle button */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 6px 14px;
  border: 2px solid var(--color-teal);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-teal);
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
}

.lang-toggle:hover {
  background: var(--color-teal);
  color: var(--color-white);
  text-decoration: none;
}

.lang-toggle .lang-icon {
  font-size: 1rem;
  line-height: 1;
}

/* Navbar user info (admin) */
.navbar-user {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.navbar-user strong {
  color: var(--color-dark);
}

.navbar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-teal-light);
  color: var(--color-teal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  border: 2px solid var(--color-teal);
}


/* =============================================================================
   6. MULTI-STEP FORM PROGRESS BAR
   ============================================================================= */
.progress-bar-wrapper {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-md) 0;
}

/* Thin colored bar at the top */
.progress-track {
  height: 6px;
  background: var(--color-gray);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: var(--space-md);
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, #ffea00 0%, #aac837 50%, #223f81 100%);
  transition: width 0.4s ease;
}

/* Step label row */
.progress-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.progress-label .step-current {
  color: var(--color-teal);
  font-weight: 600;
}

.progress-label .step-total {
  color: var(--color-text-muted);
}

/* Progress percentage text */
.progress-pct {
  font-weight: 700;
  color: var(--color-blue);
}


/* =============================================================================
   7. STEP INDICATOR (Numbered Circles)
   ============================================================================= */
.step-indicator {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  margin: var(--space-xl) auto;
  max-width: 860px;
  position: relative;
  overflow-x: auto;
  padding-bottom: var(--space-sm);
}

.step-indicator::before {
  content: '';
  position: absolute;
  top: 18px;
  left: calc(5% + 18px);
  right: calc(5% + 18px);
  height: 2px;
  background: var(--color-gray);
  z-index: 0;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 64px;
  position: relative;
  z-index: 1;
}

.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--color-gray);
  background: var(--color-white);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  transition: all var(--transition);
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

/* Active step */
.step-item.active .step-circle {
  background: var(--color-blue);
  border-color: var(--color-blue);
  color: var(--color-white);
  box-shadow: 0 0 0 4px rgba(34, 63, 129, 0.20);
}

/* Completed step — FPC green with checkmark */
.step-item.completed .step-circle {
  background: var(--color-green);
  border-color: var(--color-green);
  color: var(--color-white);
}

.step-item.completed .step-circle::after {
  content: '✓';
  font-size: 1rem;
  font-weight: 800;
}

.step-item.completed .step-circle span {
  display: none;
}

/* Connector line between circles — colored for completed */
.step-item.completed + .step-item::before,
.step-item.active + .step-item::before {
  background: var(--color-teal);
}

.step-label {
  margin-top: var(--space-xs);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-align: center;
  white-space: nowrap;
  font-family: var(--font-heading);
  letter-spacing: 0.2px;
}

.step-item.active .step-label {
  color: var(--color-blue);
}

.step-item.completed .step-label {
  color: var(--color-green-dark);
}


/* =============================================================================
   8. FORM SECTION HEADERS
   ============================================================================= */
.section-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  margin-top: var(--space-xl);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--color-gray);
}

/* Green left bar — FPC brand accent */
.section-header::before {
  content: '';
  display: block;
  width: 5px;
  height: 28px;
  background: var(--color-green);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.section-header h2,
.section-header h3,
.section-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-teal);
  margin: 0;
}

.section-header .section-icon {
  font-size: 1.2rem;
  margin-left: auto;
  opacity: 0.6;
}

/* Standalone section-title (used without .section-header wrapper) */
.section-divider {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: var(--space-xl) 0 var(--space-lg);
}

.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-gray);
}


/* =============================================================================
   9. FORM FIELD STYLES
   ============================================================================= */
.form-page {
  padding: var(--space-xl) 0 var(--space-3xl);
}

.form-wrapper {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-xl) var(--space-2xl);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-md);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: var(--space-md);
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-label {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-dark);
  letter-spacing: 0.2px;
}

/* Required asterisk */
.form-label .required,
.required-mark {
  color: var(--color-red);
  margin-left: 3px;
  font-weight: 700;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-white);
  color: var(--color-dark);
  font-family: var(--font-body);
  font-size: 0.93rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  -webkit-appearance: none;
  outline: none;
}

.form-control::placeholder {
  color: var(--color-text-light);
  font-size: 0.88rem;
}

.form-control:hover {
  border-color: #b5bec9;
}

.form-control:focus {
  border-color: var(--color-teal);
  box-shadow: 0 0 0 3px rgba(34, 63, 129, 0.18);
  background: #fafffe;
}

.form-control:disabled,
.form-control[readonly] {
  background: var(--color-body-bg);
  color: var(--color-text-muted);
  cursor: not-allowed;
  border-color: var(--color-gray);
}

/* Select arrow */
select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23888' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

/* Textarea */
textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

/* Checkbox & Radio */
.form-check {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  cursor: pointer;
  margin-bottom: var(--space-sm);
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  width: 18px;
  height: 18px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  accent-color: var(--color-teal);
  flex-shrink: 0;
  margin-top: 2px;
}

.form-check input[type="radio"] {
  border-radius: 50%;
}

.form-check-label {
  font-size: 0.9rem;
  color: var(--color-dark);
  cursor: pointer;
  line-height: 1.5;
}

/* Hint text below fields */
.form-hint {
  font-size: 0.76rem;
  color: var(--color-text-muted);
  margin-top: 3px;
  line-height: 1.4;
}

/* Field with error state */
.form-control.is-invalid {
  border-color: var(--color-red);
  background: var(--color-red-light);
}

.form-control.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(217, 64, 68, 0.15);
}

.form-control.is-valid {
  border-color: var(--color-olive);
}

.form-control.is-valid:focus {
  box-shadow: 0 0 0 3px rgba(123, 160, 64, 0.15);
}


/* =============================================================================
   10. RTL TEXT INPUT
   ============================================================================= */
.rtl-input,
input.rtl-input,
textarea.rtl-input {
  direction: rtl;
  text-align: right;
  font-family: 'Segoe UI', Tahoma, 'Arial', var(--font-body), sans-serif;
}

.rtl-wrapper {
  direction: rtl;
}

.rtl-wrapper .form-label {
  display: block;
  text-align: right;
}


/* =============================================================================
   11. ERROR MESSAGES
   ============================================================================= */
.error-msg {
  font-size: 0.8rem;
  color: var(--color-red);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  font-weight: 500;
}

.error-msg::before {
  content: '!';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  background: var(--color-red);
  color: var(--color-white);
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 800;
  flex-shrink: 0;
}

.field-error {
  display: block;
  font-size: 0.78rem;
  color: var(--color-red);
  margin-top: 4px;
  padding: 4px 8px;
  background: var(--color-red-light);
  border-left: 3px solid var(--color-red);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-weight: 500;
}

/* Global form error banner */
.form-error-banner {
  background: var(--color-red-light);
  border: 1px solid var(--color-red);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-lg);
  color: var(--color-red);
  font-size: 0.9rem;
  font-weight: 500;
}

.form-error-banner ul {
  list-style: disc;
  padding-left: var(--space-lg);
  margin-top: var(--space-sm);
}


/* =============================================================================
   12. CARD STYLES
   ============================================================================= */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-body-bg);
}

.card-header h2,
.card-header h3,
.card-header h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-dark);
}

.card-header.teal {
  background: var(--color-teal);
  border-color: var(--color-teal-dark);
}

.card-header.teal h2,
.card-header.teal h3,
.card-header.teal h4 {
  color: var(--color-white);
}

.card-header.gold {
  background: #d4a800;      /* muted gold — not neon */
  border-color: #b89000;
}

.card-header.gold h2,
.card-header.gold h3,
.card-header.gold h4 {
  color: #223f81;           /* navy on gold = 5.8:1 ✓ */
}

.card-body {
  padding: var(--space-lg);
}

.card-footer {
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--color-border);
  background: var(--color-body-bg);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-sm);
}

/* Info card variant */
.card-info {
  border-left: 4px solid var(--color-teal);
  background: var(--color-teal-light);
}

.card-warning {
  border-left: 4px solid var(--color-gold);
  background: var(--color-gold-light);
}

.card-danger {
  border-left: 4px solid var(--color-red);
  background: var(--color-red-light);
}

.card-success {
  border-left: 4px solid var(--color-olive);
  background: var(--color-olive-light);
}


/* =============================================================================
   13. BUTTON STYLES
   ============================================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 10px 22px;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
  line-height: 1.3;
  letter-spacing: 0.2px;
  vertical-align: middle;
}

.btn:focus-visible {
  outline: 3px solid var(--color-teal);
  outline-offset: 2px;
}

.btn:disabled,
.btn.disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

/* Primary — Teal */
.btn-primary {
  background: var(--color-teal);
  border-color: var(--color-teal);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-teal-dark);
  border-color: var(--color-teal-dark);
  color: var(--color-white);
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(34, 63, 129, 0.35);
  transform: translateY(-1px);
}

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

/* Outline Primary */
.btn-outline-primary {
  background: transparent;
  border-color: var(--color-teal);
  color: var(--color-teal);
}

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

/* Secondary — Gray */
.btn-secondary {
  background: var(--color-gray);
  border-color: var(--color-border);
  color: var(--color-dark);
}

.btn-secondary:hover {
  background: #d8d8d8;
  border-color: #c8c8c8;
  color: var(--color-dark);
  text-decoration: none;
  transform: translateY(-1px);
}

/* Danger — Red */
.btn-danger {
  background: var(--color-red);
  border-color: var(--color-red);
  color: var(--color-white);
}

.btn-danger:hover {
  background: #be3336;
  border-color: #be3336;
  color: var(--color-white);
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(217, 64, 68, 0.35);
  transform: translateY(-1px);
}

.btn-outline-danger {
  background: transparent;
  border-color: var(--color-red);
  color: var(--color-red);
}

.btn-outline-danger:hover {
  background: var(--color-red);
  color: var(--color-white);
  text-decoration: none;
}

/* Success — Olive Green */
.btn-success {
  background: var(--color-olive);
  border-color: var(--color-olive);
  color: var(--color-white);
}

.btn-success:hover {
  background: #6a8c35;
  border-color: #6a8c35;
  color: var(--color-white);
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(123, 160, 64, 0.35);
  transform: translateY(-1px);
}

/* Gold — navy text on yellow for contrast (yellow+white = ~1:1, fails WCAG) */
.btn-gold {
  background: #d4a800;      /* muted gold — not neon */
  border-color: #d4a800;
  color: #223f81;           /* navy on gold = 5.8:1 ✓ */
}

.btn-gold:hover {
  background: #b89000;
  border-color: #b89000;
  color: #223f81;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(180,140,0,0.35);
  transform: translateY(-1px);
}

.btn-outline-gold {
  background: transparent;
  border-color: #d4a800;    /* muted gold border */
  color: #7a4800;           /* dark amber text — readable on white */
}

.btn-outline-gold:hover {
  background: #fff8ed;
  border-color: #d4a800;
  color: #7a4800;
  text-decoration: none;
}

/* Size variants */
.btn-sm {
  padding: 6px 14px;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 13px 30px;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}

.btn-block {
  width: 100%;
}

/* Icon-only button */
.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-md);
}

.btn-icon.btn-sm {
  width: 28px;
  height: 28px;
}

/* Form navigation buttons row */
.form-nav-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-gray);
  gap: var(--space-md);
}

.form-nav-buttons .btn-group {
  display: flex;
  gap: var(--space-sm);
}


/* =============================================================================
   14. TABLE STYLES (.fp-table)
   ============================================================================= */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.fp-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-white);
  font-size: 0.88rem;
  min-width: 500px;
}

/* Table header — FPC navy */
.fp-table thead th {
  background: var(--color-blue);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  white-space: nowrap;
  border: none;
  position: sticky;
  top: 0;
  z-index: 1;
}

.fp-table thead th:first-child {
  border-radius: var(--radius-md) 0 0 0;
}

.fp-table thead th:last-child {
  border-radius: 0 var(--radius-md) 0 0;
}

/* Table body rows */
.fp-table tbody tr {
  border-bottom: 1px solid var(--color-gray);
  transition: background var(--transition);
}

.fp-table tbody tr:last-child {
  border-bottom: none;
}

/* Alternating rows */
.fp-table tbody tr:nth-child(even) {
  background: #f9fafb;
}

.fp-table tbody tr:hover {
  background: var(--color-teal-light);
}

.fp-table tbody td {
  padding: 11px 16px;
  color: var(--color-dark);
  vertical-align: middle;
}

/* Table footer */
.fp-table tfoot tr {
  background: var(--color-body-bg);
  border-top: 2px solid var(--color-border);
}

.fp-table tfoot td {
  padding: 10px 16px;
  font-weight: 600;
  font-family: var(--font-heading);
  font-size: 0.85rem;
}

/* Actions column — right aligned */
.fp-table td.col-actions,
.fp-table th.col-actions {
  text-align: right;
  width: 120px;
}

/* Compact table variant */
.fp-table.table-sm thead th,
.fp-table.table-sm tbody td {
  padding: 8px 12px;
  font-size: 0.82rem;
}

/* Admin table (slightly different header) */
.fp-table.admin-table thead th {
  background: var(--color-teal-dark);
  font-size: 0.75rem;
}

/* Empty state row */
.fp-table .table-empty {
  text-align: center;
  color: var(--color-text-muted);
  padding: var(--space-2xl) var(--space-lg);
  font-style: italic;
}


/* =============================================================================
   15. DYNAMIC ROW STYLES (Siblings / Pickup Table)
   ============================================================================= */
.dynamic-table-wrapper {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-lg);
}

.dynamic-table-wrapper .fp-table {
  min-width: unset;
  box-shadow: none;
}

.dynamic-table-wrapper .fp-table thead th {
  font-size: 0.72rem;
  padding: 9px 12px;
}

.dynamic-table-wrapper .fp-table tbody td {
  padding: 8px 10px;
  vertical-align: top;
}

/* Inline form controls inside dynamic rows */
.dynamic-table-wrapper .fp-table .form-control {
  padding: 7px 10px;
  font-size: 0.85rem;
  margin-bottom: 0;
}

/* Row remove button */
.btn-remove-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: var(--color-red-light);
  color: var(--color-red);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  font-weight: 700;
  transition: all var(--transition);
  padding: 0;
  flex-shrink: 0;
}

.btn-remove-row:hover {
  background: var(--color-red);
  color: var(--color-white);
}

/* Add row button area */
.dynamic-table-footer {
  padding: var(--space-sm) var(--space-md);
  border-top: 1px dashed var(--color-border);
  background: var(--color-body-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.btn-add-row {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 6px 14px;
  border: 1.5px dashed var(--color-teal);
  border-radius: var(--radius-md);
  background: var(--color-teal-light);
  color: var(--color-teal);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-add-row:hover {
  background: var(--color-teal);
  color: var(--color-white);
  border-style: solid;
}

.btn-add-row .plus-icon {
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1;
}

/* Row counter badge */
.row-count-badge {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-family: var(--font-heading);
}


/* =============================================================================
   16. SIGNATURE PAD
   ============================================================================= */
.signature-area {
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  background: var(--color-white);
}

.signature-canvas-wrapper {
  position: relative;
  border: 2px dashed var(--color-teal);
  border-radius: var(--radius-md);
  background: #fafffe;
  overflow: hidden;
}

.signature-canvas-wrapper canvas,
#signature-canvas {
  display: block;
  width: 100%;
  height: 180px;
  cursor: crosshair;
  touch-action: none;
}

.signature-placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--color-text-light);
  font-size: 0.85rem;
  pointer-events: none;
  font-style: italic;
  white-space: nowrap;
}

.signature-baseline {
  height: 1px;
  background: var(--color-border);
  margin: 0 var(--space-lg);
  margin-bottom: var(--space-sm);
}

.signature-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-sm);
  gap: var(--space-sm);
}

.signature-label {
  font-size: 0.76rem;
  color: var(--color-text-muted);
  font-style: italic;
}

/* Existing signature image display */
.signature-preview {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
  background: var(--color-white);
  max-height: 120px;
  object-fit: contain;
}


/* =============================================================================
   17. BADGE / STATUS STYLES
   ============================================================================= */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
  line-height: 1.4;
}

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

/* New (default/blue) */
.badge-new {
  background: var(--color-sky-light);
  color: var(--color-sky);
  border: 1px solid #b8d9f5;
}

.badge-new::before { background: var(--color-sky); }

/* Pending (gold/warning) */
.badge-pending {
  background: var(--color-gold-light);
  color: var(--color-gold-dark);
  border: 1px solid rgba(200,120,32,0.25);
}

.badge-pending::before { background: var(--color-gold); }

/* Confirmed (teal/success) */
.badge-confirmed {
  background: var(--color-teal-light);
  color: var(--color-teal-dark);
  border: 1px solid #b0e2e6;
}

.badge-confirmed::before { background: var(--color-teal); }

/* Activity (orange) */
.badge-activity {
  background: #fef3e8;
  color: #c2701f;
  border: 1px solid #f5d0a8;
}

.badge-activity::before { background: var(--color-orange); }

/* Enrolled (olive/green) */
.badge-enrolled {
  background: var(--color-olive-light);
  color: #5a7830;
  border: 1px solid #c4dba0;
}

.badge-enrolled::before { background: var(--color-olive); }

/* Withdrawn (red/danger) */
.badge-withdrawn {
  background: var(--color-red-light);
  color: #b43033;
  border: 1px solid #f0b5b6;
}

.badge-withdrawn::before { background: var(--color-red); }

/* Count badge (numeric, pill) */
.badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: var(--color-teal);
  color: var(--color-white);
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--font-heading);
}

.badge-count::before { display: none; }


/* =============================================================================
   18. FLASH MESSAGE / ALERT STYLES
   ============================================================================= */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  margin-bottom: var(--space-lg);
  font-size: 0.9rem;
  line-height: 1.5;
  position: relative;
}

.alert-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.alert-content {
  flex: 1;
}

.alert-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 2px;
}

/* Close button */
.alert-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  opacity: 0.5;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 1px;
  transition: opacity var(--transition);
}

.alert-close:hover { opacity: 1; }

/* Success */
.alert-success {
  background: var(--color-olive-light);
  border-color: #c4dba0;
  color: #4a6228;
}

/* Error / Danger */
.alert-error {
  background: var(--color-red-light);
  border-color: #f0b5b6;
  color: #9a2d2f;
}

/* Info */
.alert-info {
  background: var(--color-sky-light);
  border-color: #b8d9f5;
  color: #2d6f9a;
}

/* Warning */
.alert-warning {
  background: var(--color-gold-light);
  border-color: rgba(200,120,32,0.3);
  color: #8a6010;
}

/* Stack of alerts */
.alert-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}


/* =============================================================================
   19. FILE UPLOAD DROP-ZONE
   ============================================================================= */
.upload-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-2xl) var(--space-lg);
  border: 2.5px dashed var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-body-bg);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  min-height: 140px;
}

.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--color-teal);
  background: var(--color-teal-light);
  box-shadow: 0 0 0 4px rgba(34, 63, 129, 0.12);
}

.upload-zone-icon {
  font-size: 2.5rem;
  color: var(--color-teal);
  opacity: 0.7;
  line-height: 1;
}

.upload-zone-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-dark);
}

.upload-zone-sub {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.upload-zone-link {
  color: var(--color-teal);
  font-weight: 600;
  text-decoration: underline;
}

.upload-zone.has-file {
  border-color: var(--color-olive);
  background: var(--color-olive-light);
}

/* File preview list */
.upload-preview {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.upload-preview-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 6px 12px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  color: var(--color-dark);
}

.upload-preview-item .remove-file {
  cursor: pointer;
  color: var(--color-red);
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1;
  background: none;
  border: none;
  padding: 0;
}


/* =============================================================================
   20. CONFIRMATION / SUCCESS PAGE
   ============================================================================= */
.success-page {
  min-height: calc(100vh - var(--navbar-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl) var(--space-lg);
  background: linear-gradient(135deg, var(--color-teal-light) 0%, #e8f0e4 100%);
}

.success-card {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: var(--space-3xl) var(--space-2xl);
  text-align: center;
  max-width: 540px;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.success-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--color-teal), var(--color-gold), var(--color-orange));
}

/* Large success icon */
.success-icon-wrap {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-olive) 0%, var(--color-teal) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-lg);
  box-shadow: 0 8px 24px rgba(34, 63, 129, 0.3);
}

.success-icon-wrap .check-icon {
  color: var(--color-white);
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1;
}

.success-title {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--color-dark);
  margin-bottom: var(--space-sm);
}

.success-subtitle {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: var(--space-lg);
}

/* Reference number box */
.ref-box {
  background: var(--color-body-bg);
  border: 2px solid var(--color-blue);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  margin: var(--space-lg) 0;
  text-align: center;
}

.ref-box .ref-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--color-text-muted);
  font-family: var(--font-heading);
  font-weight: 600;
  margin-bottom: 4px;
}

.ref-box .ref-number {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--color-gold-dark);
  letter-spacing: 2px;
}

.ref-box .ref-sub {
  font-size: 0.76rem;
  color: var(--color-text-muted);
  margin-top: 4px;
}

.success-details {
  background: var(--color-teal-light);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
  font-size: 0.88rem;
  color: var(--color-dark);
  text-align: left;
}

.success-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.success-actions .btn {
  width: 100%;
}


/* =============================================================================
   21. ACTIVITY SELECTION CARDS
   ============================================================================= */
.activity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.activity-card {
  position: relative;
  background: var(--color-white);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
  overflow: hidden;
}

.activity-card:hover {
  border-color: var(--color-teal);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Hidden checkbox powers selection */
.activity-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* Selected state — teal border + checkmark */
.activity-card.selected,
.activity-card input[type="checkbox"]:checked ~ .activity-card-inner {
  border-color: var(--color-teal);
  background: var(--color-teal-light);
}

.activity-card.selected {
  border-color: var(--color-teal);
  background: var(--color-teal-light);
  box-shadow: 0 0 0 3px rgba(34, 63, 129, 0.2);
}

/* Checkmark overlay (top-right) */
.activity-card .activity-check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  background: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  font-size: 0.75rem;
  color: transparent;
}

.activity-card.selected .activity-check {
  background: var(--color-teal);
  border-color: var(--color-teal);
  color: var(--color-white);
}

.activity-card.selected .activity-check::after {
  content: '✓';
  font-weight: 800;
}

/* Activity icon */
.activity-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--color-teal-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--space-sm);
  transition: background var(--transition);
}

.activity-card.selected .activity-icon {
  background: rgba(34, 63, 129, 0.25);
}

.activity-name {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 3px;
}

.activity-meta {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.activity-spots {
  display: inline-block;
  margin-top: var(--space-xs);
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--font-heading);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--color-gold-light);
  color: var(--color-gold-dark);
}

.activity-spots.full {
  background: var(--color-red-light);
  color: var(--color-red);
}

/* Disabled/full activity card */
.activity-card.disabled,
.activity-card.full {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}


/* =============================================================================
   22. ADMIN LAYOUT (Sidebar + Main)
   ============================================================================= */
.admin-layout {
  display: flex;
  min-height: calc(100vh - var(--navbar-height));
}

/* Sidebar */
.admin-sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: linear-gradient(180deg, #223f81 0%, #1a3068 100%);
  color: var(--color-white);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: var(--navbar-height);
  height: calc(100vh - var(--navbar-height));
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.admin-sidebar::-webkit-scrollbar {
  width: 4px;
}

.admin-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-pill);
}

/* Sidebar nav */
.sidebar-nav {
  flex: 1;
  padding: var(--space-md) 0;
}

.sidebar-section-label {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,0.35);
  padding: var(--space-md) var(--space-lg) var(--space-xs);
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px var(--space-lg);
  color: rgba(255,255,255,0.7);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition);
  border-left: 3px solid transparent;
  cursor: pointer;
  background: none;
  border-top: none;
  border-right: none;
  border-bottom: none;
  width: 100%;
  text-align: left;
}

.sidebar-nav-item:hover {
  background: rgba(255,255,255,0.07);
  color: var(--color-white);
  text-decoration: none;
  border-left-color: rgba(255,255,255,0.2);
}

.sidebar-nav-item.active {
  background: rgba(34, 63, 129, 0.18);
  color: #223f81;
  border-left-color: #223f81;
}

.sidebar-nav-item .nav-icon {
  font-size: 1rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  opacity: 0.8;
}

.sidebar-nav-item .nav-badge {
  margin-left: auto;
}

/* Sidebar footer (version/logout) */
.sidebar-footer {
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.76rem;
  color: rgba(255,255,255,0.3);
}

/* Main content area */
.admin-main {
  flex: 1;
  min-width: 0;
  padding: var(--space-xl);
  overflow-y: auto;
  background-color: #f9f8f4;
}

/* Page header */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
  gap: var(--space-md);
  flex-wrap: wrap;
}

.page-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-blue);
  margin: 0;
}

.page-breadcrumb {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 2px;
  font-family: var(--font-heading);
}

.page-breadcrumb a {
  color: var(--color-text-muted);
}

.page-breadcrumb a:hover {
  color: var(--color-teal);
}

.page-breadcrumb .separator {
  margin: 0 var(--space-xs);
}


/* =============================================================================
   23. ADMIN STAT CARDS
   ============================================================================= */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.stat-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: stretch;
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
  border: 1px solid var(--color-border);
}

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

/* Colored icon area (left strip) */
.stat-icon-area {
  width: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.6rem;
}

.stat-card.stat-teal    .stat-icon-area { background: var(--color-teal);  color: var(--color-white); }
.stat-card.stat-gold    .stat-icon-area { background: var(--color-gold);  color: var(--color-white); }
.stat-card.stat-red     .stat-icon-area { background: var(--color-red);   color: var(--color-white); }
.stat-card.stat-olive   .stat-icon-area { background: var(--color-olive); color: var(--color-white); }
.stat-card.stat-sky     .stat-icon-area { background: var(--color-sky);   color: var(--color-white); }
.stat-card.stat-orange  .stat-icon-area { background: var(--color-orange);color: var(--color-white); }

.stat-body {
  flex: 1;
  padding: var(--space-md);
  min-width: 0;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--color-dark);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.76rem;
  color: var(--color-text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-family: var(--font-heading);
}

.stat-trend {
  font-size: 0.75rem;
  font-family: var(--font-heading);
  font-weight: 600;
  margin-top: 4px;
}

.stat-trend.up   { color: var(--color-olive); }
.stat-trend.down { color: var(--color-red); }


/* =============================================================================
   24. ADMIN TABLE STYLES (extensions of .fp-table)
   ============================================================================= */
.admin-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-white);
  overflow: hidden;
  max-width: 280px;
  flex: 1;
}

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  padding: 8px 12px;
  font-size: 0.88rem;
  font-family: var(--font-body);
  background: transparent;
}

.search-box .search-icon {
  padding: 0 12px;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* Sortable column header */
.fp-table th.sortable {
  cursor: pointer;
}

.fp-table th.sortable:hover {
  background: var(--color-teal-dark);
}

.fp-table th.sorted-asc::after  { content: ' ↑'; }
.fp-table th.sorted-desc::after { content: ' ↓'; }

/* Row selection checkbox */
.fp-table th.col-select,
.fp-table td.col-select {
  width: 40px;
  text-align: center;
}

/* Pagination */
.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  border-top: 1px solid var(--color-border);
  font-size: 0.82rem;
  color: var(--color-text-muted);
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.pagination-controls {
  display: flex;
  gap: var(--space-xs);
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  color: var(--color-dark);
  font-size: 0.82rem;
  font-family: var(--font-heading);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.page-btn:hover {
  background: var(--color-teal-light);
  border-color: var(--color-teal);
  color: var(--color-teal);
  text-decoration: none;
}

.page-btn.active {
  background: var(--color-teal);
  border-color: var(--color-teal);
  color: var(--color-white);
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}


/* =============================================================================
   25. RESPONSIVE — MOBILE (≤768px)
   ============================================================================= */
@media (max-width: 768px) {

  /* Typography scale */
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.3rem; }
  h3 { font-size: 1.1rem; }

  /* Containers */
  .container,
  .container-wide,
  .container-narrow {
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }

  /* Navbar */
  .navbar-inner {
    padding: 0 var(--space-md);
  }

  .fp-logo-sub {
    display: none;
  }

  .fp-logo-text {
    font-size: 1.1rem;
  }

  /* Step indicator scrolls horizontally */
  .step-indicator {
    justify-content: flex-start;
    gap: 0;
    padding-bottom: var(--space-md);
  }

  .step-item {
    min-width: 52px;
  }

  .step-label {
    font-size: 0.55rem;
  }

  /* Form layouts stack */
  .form-row,
  .form-row-2,
  .form-row-3 {
    grid-template-columns: 1fr;
  }

  .form-wrapper {
    padding: var(--space-lg) var(--space-md);
    border-radius: var(--radius-md);
  }

  /* Form navigation */
  .form-nav-buttons {
    flex-direction: column-reverse;
  }

  .form-nav-buttons .btn-group {
    width: 100%;
    flex-direction: column;
  }

  .form-nav-buttons .btn {
    width: 100%;
  }

  /* Admin layout — sidebar collapses */
  .admin-layout {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100%;
    height: auto;
    position: relative;
    top: 0;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }

  .admin-sidebar::-webkit-scrollbar {
    display: none;
  }

  .sidebar-nav {
    display: flex;
    flex-direction: row;
    padding: 0;
    flex-wrap: nowrap;
  }

  .sidebar-section-label {
    display: none;
  }

  .sidebar-nav-item {
    flex-direction: column;
    gap: 3px;
    padding: var(--space-sm) var(--space-md);
    font-size: 0.65rem;
    white-space: nowrap;
    border-left: none;
    border-bottom: 3px solid transparent;
    text-align: center;
  }

  .sidebar-nav-item.active {
    border-left-color: transparent;
    border-bottom-color: var(--color-teal);
  }

  .sidebar-nav-item .nav-icon {
    width: auto;
    font-size: 1.1rem;
  }

  .sidebar-footer {
    display: none;
  }

  .admin-main {
    padding: var(--space-md);
  }

  /* Stats grid — 2 columns on mobile */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-value {
    font-size: 1.5rem;
  }

  /* Tables scroll horizontally */
  .fp-table {
    font-size: 0.82rem;
  }

  .fp-table thead th,
  .fp-table tbody td {
    padding: 8px 10px;
  }

  /* Activity grid — 2 col */
  .activity-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Success page */
  .success-card {
    padding: var(--space-2xl) var(--space-lg);
  }

  .success-icon-wrap {
    width: 70px;
    height: 70px;
  }

  .success-icon-wrap .check-icon {
    font-size: 2.2rem;
  }

  /* Upload zone */
  .upload-zone {
    padding: var(--space-xl) var(--space-md);
    min-height: 120px;
  }

  /* Admin toolbar */
  .admin-table-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box {
    max-width: 100%;
  }

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

  /* Signature canvas */
  .signature-canvas-wrapper canvas,
  #signature-canvas {
    height: 140px;
  }

  /* Dynamic table */
  .dynamic-table-wrapper .fp-table {
    min-width: 460px;
  }
}

@media (max-width: 480px) {

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .activity-grid {
    grid-template-columns: 1fr;
  }

  .stat-icon-area {
    width: 50px;
    font-size: 1.2rem;
  }

  .stat-value {
    font-size: 1.3rem;
  }

  .ref-box .ref-number {
    font-size: 1.4rem;
    letter-spacing: 1px;
  }

  .form-nav-buttons .btn {
    padding: 10px 16px;
    font-size: 0.85rem;
  }
}


/* =============================================================================
   26. FOOTER
   ============================================================================= */
.site-footer {
  background: var(--color-dark);
  color: rgba(255,255,255,0.6);
  padding: var(--space-xl) 0;
  margin-top: auto;
  font-size: 0.82rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-brand .fp-logo-text {
  font-size: 1rem;
}

.footer-tagline {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
  font-style: italic;
}

.footer-links {
  display: flex;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.footer-links a {
  color: rgba(255,255,255,0.5);
  font-size: 0.8rem;
  text-decoration: none;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--color-teal);
  text-decoration: none;
}

.footer-copy {
  width: 100%;
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255,255,255,0.08);
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.3);
}

@media (max-width: 768px) {
  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: var(--space-md);
  }

  .footer-links {
    justify-content: center;
  }
}


/* =============================================================================
   27. FINGERPRINTS LOGO TEXT — CSS COLOR RECONSTRUCTION
   Usage: <span class="fp-logo-text">
            <span class="letter-f1">F</span>
            <span class="letter-i">i</span>
            <span class="letter-n">n</span>
            <span class="letter-g">g</span>
            <span class="letter-e">e</span>
            <span class="letter-r">r</span>
            <span class="letter-p">p</span>
            <span class="letter-r2">r</span>
            <span class="letter-i2">i</span>
            <span class="letter-n2">n</span>
            <span class="letter-t">t</span>
            <span class="letter-s">s</span>
          </span>
   Defined in section 5 (Navbar). Listed here for documentation.
   ============================================================================= */


/* =============================================================================
   28. UTILITY / MISC
   ============================================================================= */

/* Print utilities */
@media print {
  .navbar,
  .admin-sidebar,
  .form-nav-buttons,
  .btn,
  .alert-close {
    display: none !important;
  }

  body {
    background: white;
    color: black;
    font-size: 12pt;
  }

  .card {
    box-shadow: none;
    border: 1px solid #ccc;
  }

  .fp-table thead th {
    background: #444 !important;
    color: white !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, var(--color-gray) 25%, #f0f0f0 50%, var(--color-gray) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Spinner */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(34, 63, 129, 0.25);
  border-top-color: var(--color-teal);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

.spinner-sm {
  width: 14px;
  height: 14px;
  border-width: 2px;
}

.spinner-lg {
  width: 32px;
  height: 32px;
  border-width: 3px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Modal overlay (for confirmation dialogs) */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  animation: fadeIn 0.15s ease;
}

.modal-box {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  max-width: 480px;
  width: 100%;
  overflow: hidden;
  animation: slideUp 0.2s ease;
}

.modal-header {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  margin: 0;
  font-size: 1rem;
}

.modal-body {
  padding: var(--space-lg);
}

.modal-footer {
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-sm);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* Tooltip */
[data-tooltip] {
  position: relative;
  cursor: help;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-dark);
  color: var(--color-white);
  font-size: 0.72rem;
  font-family: var(--font-body);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
  z-index: 100;
}

[data-tooltip]:hover::after {
  opacity: 1;
}

/* Highlight pulse (draw attention to a field) */
.highlight-pulse {
  animation: highlightPulse 1.5s ease;
}

@keyframes highlightPulse {
  0%   { box-shadow: 0 0 0 0 rgba(34, 63, 129, 0.6); }
  50%  { box-shadow: 0 0 0 8px rgba(34, 63, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 63, 129, 0); }
}

/* Divider with text */
.divider-text {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  color: var(--color-text-muted);
  font-size: 0.8rem;
  font-family: var(--font-heading);
  margin: var(--space-lg) 0;
}

.divider-text::before,
.divider-text::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

/* Colored top border accent on cards */
.card.accent-teal  { border-top: 3px solid var(--color-teal); }
.card.accent-gold  { border-top: 3px solid var(--color-gold); }
.card.accent-red   { border-top: 3px solid var(--color-red); }
.card.accent-olive { border-top: 3px solid var(--color-olive); }
