/* ==========================================================================
   Engineering Club Registration System
   Mobile-First, Responsive & Modern Design with Adaptive Dark Mode System
   Direction: RTL | Font: Cairo & Tajawal | Touch-Friendly (Min 44px Tap Target)
   ========================================================================== */

/* 1. CSS Custom Properties / Theming */
:root {
  /* Light Theme (Default) */
  --bg-page: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-input: #ffffff;
  --bg-subtle-box: #f1f5f9;
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-subtle: #64748b;
  
  --border-subtle: #cbd5e1;
  --border-focus: #22c55e;
  
  --color-primary: #1e3a8a;
  --color-primary-hover: #172554;
  --color-accent: #2563eb;
  --color-accent-hover: #1d4ed8;
  
  --color-error: #dc2626;
  --color-error-bg: #fef2f2;
  --color-error-border: #fca5a5;
  
  --color-success: #059669;
  --color-success-bg: #ecfdf5;
  --color-success-border: #a7f3d0;
  
  --table-head-bg: #f8fafc;
  --table-hover-bg: #f1f5f9;
  
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.06);
  --shadow-modal: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 24px;
  
  --font-family: 'Cairo', 'Tajawal', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --min-tap-target: 44px;
}

/* Dark Theme System */
[data-theme="dark"] {
  --bg-page: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.85);
  --bg-input: #1e293b;
  --bg-subtle-box: #1e293b;
  
  --text-main: #f8fafc;
  --text-muted: #cbd5e1;
  --text-subtle: #94a3b8;
  
  --border-subtle: #334155;
  --border-focus: #22c55e;
  
  --color-primary: #3b82f6;
  --color-primary-hover: #2563eb;
  --color-accent: #3b82f6;
  --color-accent-hover: #60a5fa;
  
  --color-error: #f87171;
  --color-error-bg: #2d1616;
  --color-error-border: #7f1d1d;
  
  --color-success: #34d399;
  --color-success-bg: #064e3b;
  --color-success-border: #047857;
  
  --table-head-bg: #1e293b;
  --table-hover-bg: #334155;
  
  --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.4);
  --shadow-modal: 0 20px 25px -5px rgba(0, 0, 0, 0.7);
}

/* 2. Global Resets & Normalization */
*, *::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-family);
  background-color: var(--bg-page);
  background-image: 
    radial-gradient(circle at 15% 30%, rgba(34, 197, 94, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 85% 70%, rgba(59, 130, 246, 0.06) 0%, transparent 50%);
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.65;
  direction: rtl;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

[data-theme="dark"] body {
  background-image: 
    radial-gradient(circle at 15% 30%, rgba(34, 197, 94, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 85% 70%, rgba(59, 130, 246, 0.12) 0%, transparent 50%);
}

/* 3. Header & Navigation (Clean Flexbox Alignment) */
.top-nav {
  width: 100%;
  padding: 15px 5%;
  position: relative;
  z-index: 10;
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.theme-toggle-wrap,
.admin-access-wrap {
  display: flex;
  align-items: center;
}

/* Theme Toggle Button */
.btn-theme-toggle {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: 30px;
  padding: 0.45rem 0.95rem;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  min-height: var(--min-tap-target);
  transition: all 0.2s ease;
}

.btn-theme-toggle:hover {
  background-color: var(--table-hover-bg);
  color: var(--text-main);
  border-color: var(--border-focus);
}

.theme-icon {
  flex-shrink: 0;
}

/* Dynamic Display of Sun vs Moon */
.sun-icon {
  display: none;
}
.moon-icon {
  display: block;
}

[data-theme="dark"] .sun-icon {
  display: block;
}
[data-theme="dark"] .moon-icon {
  display: none;
}

/* Admin Trigger Link (with Gear Icon ⚙️) */
.btn-admin-link {
  background: transparent;
  border: none;
  color: var(--text-subtle);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  min-height: var(--min-tap-target);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  transition: color 0.2s ease, background-color 0.2s ease;
}

.btn-admin-link:hover {
  color: var(--color-primary);
  background-color: var(--table-hover-bg);
}

.admin-gear-icon {
  flex-shrink: 0;
  transition: transform 0.35s ease;
}

.btn-admin-link:hover .admin-gear-icon {
  transform: rotate(60deg);
}

/* 4. Main Page Container */
.page-container {
  flex: 1;
  max-width: 720px;
  width: 100%;
  margin: 1rem auto 3rem;
  padding: 0 1rem;
}

/* 5. Modular Glassmorphism Cards & Watermark */
.content-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 2.75rem 2.25rem;
  position: relative;
  overflow: hidden;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Giant Logo Watermark behind main form fields */
#form-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('assets/logo-light.png');
  background-position: center 42%;
  background-repeat: no-repeat;
  background-size: 80%;
  opacity: 0.035;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.3s ease, background-image 0.3s ease;
}

[data-theme="dark"] #form-card::before {
  background-image: url('assets/logo-dark.png');
  opacity: 0.045;
}

#form-card > * {
  position: relative;
  z-index: 1;
}

/* 3b. Sleek Top Announcement Bar (Infinite Scrolling Marquee) */
.top-announcement-bar {
  width: 100%;
  background-color: #111827;
  color: #ffffff;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 500;
  position: sticky;
  top: 0;
  z-index: 100;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marqueeScroll 22s linear infinite;
  will-change: transform;
}

.top-announcement-bar:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-content {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  padding-left: 1.75rem;
  white-space: nowrap;
}

.marquee-separator {
  color: #10b981;
  font-size: 15px;
  opacity: 0.85;
}

@keyframes marqueeScroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(50%);
  }
}

/* Global Footer Support Info */
.global-footer {
  padding: 2rem 1.25rem;
  text-align: center;
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.footer-support-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.925rem;
  color: var(--text-muted);
}

.support-phone-icon {
  flex-shrink: 0;
  color: #10b981;
}

.support-phone-link {
  color: var(--color-primary);
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s ease;
}

.support-phone-link:hover {
  text-decoration: underline;
  color: var(--color-primary-hover);
}

.footer-copyright {
  font-size: 0.825rem;
  color: var(--text-subtle);
}

/* 6. Prominent Polished Main Logo with Ambient Glow & Hover Animation */
.logo-wrapper {
  text-align: center;
  margin-bottom: 24px;
  position: relative;
  z-index: 2;
}

.club-logo {
  width: 220px;
  max-height: 140px;
  height: auto;
  object-fit: contain;
  display: inline-block;
  margin: 0 auto;
  filter: drop-shadow(0 0 15px rgba(34, 197, 94, 0.3));
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.35s ease;
  cursor: pointer;
}

.club-logo:hover {
  transform: scale(1.06);
  filter: drop-shadow(0 0 22px rgba(34, 197, 94, 0.5));
}

/* 7. Typography Hierarchy */
.card-header {
  text-align: center;
  margin-bottom: 2rem;
}

.main-title {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.4rem;
  line-height: 1.35;
}

.main-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* 8. Global Error Alert Banner */
.global-alert-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background-color: var(--color-error-bg);
  border: 1px solid var(--color-error-border);
  color: var(--color-error);
  padding: 0.9rem 1.15rem;
  border-radius: var(--radius-md);
  font-size: 0.925rem;
  font-weight: 600;
  margin-bottom: 1.75rem;
  animation: bannerSlideIn 0.25s ease;
}

.alert-svg-icon {
  flex-shrink: 0;
}

@keyframes bannerSlideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 9. Form Fields & Touch-Friendly Inputs */
.form-field {
  margin-bottom: 1.35rem;
  display: flex;
  flex-direction: column;
}

.field-label {
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.req {
  color: var(--color-error);
}

.optional-badge {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-subtle);
}

.input-control {
  width: 100%;
  min-height: var(--min-tap-target);
  font-family: inherit;
  font-size: 0.975rem;
  color: var(--text-main);
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 0.7rem 1rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.input-control::placeholder {
  color: var(--text-subtle);
  font-size: 0.875rem;
}

.input-control:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18), 0 0 15px rgba(34, 197, 94, 0.15);
}

/* Button Loading Spinner */
.btn-spinner {
  animation: rotateSpinner 1s linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
}

.spinner-circle {
  stroke-dasharray: 45;
  stroke-dashoffset: 15;
}

@keyframes rotateSpinner {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.ltr-field {
  direction: ltr;
  text-align: right;
}

/* Custom Select Dropdowns */
.select-wrapper {
  position: relative;
  width: 100%;
}

.select-control {
  appearance: none;
  -webkit-appearance: none;
  padding-left: 2.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 0.95rem center;
  cursor: pointer;
}

.select-control option {
  background-color: var(--bg-card);
  color: var(--text-main);
}

.textarea-control {
  resize: vertical;
  min-height: 110px;
  line-height: 1.6;
}

/* Input Error States */
.input-control.has-error {
  border-color: var(--color-error);
  background-color: var(--color-error-bg);
}

.field-error {
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--color-error);
  margin-top: 0.35rem;
}

.hidden {
  display: none !important;
}

/* 10. Buttons & Actions */
.form-actions {
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-size: 0.975rem;
  font-weight: 600;
  min-height: var(--min-tap-target);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-block {
  width: 100%;
}

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

.btn-primary:hover:not(:disabled) {
  background-color: var(--color-primary-hover);
  transform: translateY(-1px);
}

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

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

.btn-secondary {
  background-color: var(--bg-card);
  color: var(--text-muted);
  border-color: var(--border-subtle);
}

.btn-secondary:hover {
  background-color: var(--table-hover-bg);
  color: var(--text-main);
}

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

.btn-accent:hover {
  background-color: var(--color-accent-hover);
}

/* Refresh Button Spin Animation */
.refresh-icon {
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.refresh-icon.spinning {
  animation: spin 0.75s linear infinite;
}

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

/* 11. Post-Submission Success Screen (Personalized) */
.success-screen-card {
  text-align: center;
  animation: successFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes successFadeIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.success-logo {
  max-height: 120px;
}

.success-badge-wrap {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: var(--color-success-bg);
  color: var(--color-success);
  border: 2px solid var(--color-success-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0.5rem auto 1.25rem;
}

.personalized-message-box {
  background-color: var(--bg-subtle-box);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem 1.5rem;
  text-align: right;
  line-height: 1.85;
  font-size: 1rem;
  color: var(--text-main);
  margin-bottom: 2rem;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.personalized-message-box strong {
  color: var(--color-primary);
  font-weight: 700;
}

.success-actions {
  display: flex;
  justify-content: center;
}

.success-actions .btn {
  min-width: 190px;
}

/* 12. Admin Dashboard View */
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1.25rem;
  gap: 1rem;
}

.admin-stats {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.count-badge {
  font-weight: 700;
  color: var(--color-primary);
  background: rgba(59, 130, 246, 0.12);
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
}

/* Netlify Cloud Submissions Guidance Banner */
.netlify-cloud-banner {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background-color: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.25rem;
  margin-bottom: 1.5rem;
}

.cloud-banner-icon {
  color: var(--color-accent);
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.cloud-banner-content {
  flex: 1;
}

.cloud-banner-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.cloud-banner-text {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 0.65rem;
}

.cloud-banner-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--color-accent);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.cloud-banner-link:hover {
  text-decoration: underline;
}

.netlify-cloud-banner.banner-warning {
  background-color: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.3);
}
.netlify-cloud-banner.banner-warning .cloud-banner-icon {
  color: #d97706;
}

.netlify-cloud-banner.banner-error {
  background-color: var(--color-error-bg);
  border-color: var(--color-error-border);
}
.netlify-cloud-banner.banner-error .cloud-banner-icon {
  color: var(--color-error);
}

.netlify-cloud-banner.banner-success {
  background-color: var(--color-success-bg);
  border-color: var(--color-success-border);
}
.netlify-cloud-banner.banner-success .cloud-banner-icon {
  color: var(--color-success);
}

/* Netlify Cloud API Configuration Box */
.cloud-setup-card {
  background-color: var(--bg-subtle-box);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  animation: bannerSlideIn 0.25s ease;
}

.cloud-setup-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cloud-setup-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.cloud-setup-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.cloud-setup-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.admin-controls {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.search-field {
  flex: 1;
  min-width: 240px;
}

.admin-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Excel-like Data Table */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
}

.minimal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: right;
}

.minimal-table th {
  background-color: var(--table-head-bg);
  color: var(--text-main);
  font-weight: 600;
  padding: 0.8rem 0.95rem;
  border-bottom: 1.5px solid var(--border-subtle);
  white-space: nowrap;
}

.minimal-table td {
  padding: 0.8rem 0.95rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
  white-space: nowrap;
}

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

.minimal-table tr:hover {
  background-color: var(--table-hover-bg);
}

.empty-notice {
  text-align: center;
  padding: 2.75rem 1rem;
  color: var(--text-muted);
  font-size: 0.925rem;
}

/* 13. Admin Passcode Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  z-index: 1000;
}

.modal-box {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-modal);
  border: 1px solid var(--border-subtle);
  max-width: 440px;
  width: 100%;
  padding: 2.25rem;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--text-main);
}

.modal-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.modal-actions .btn {
  flex: 1;
}

.text-center {
  text-align: center;
}

/* 14. Global Footer & Support Contact ("للاستفسار والدعم: 0543010076") */
.global-footer {
  text-align: center;
  padding: 1.5rem 1rem;
  color: var(--text-subtle);
  font-size: 0.9rem;
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  background-color: var(--bg-page);
  width: 100%;
}

.footer-support-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 30px;
  padding: 0.5rem 1.25rem;
  margin-bottom: 0.85rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  transition: all 0.25s ease;
}

.footer-support-box:hover {
  border-color: var(--border-focus);
  box-shadow: var(--shadow-card);
}

.support-phone-icon {
  color: var(--color-accent);
  flex-shrink: 0;
}

.support-label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-main);
}

.support-phone-link {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--color-accent);
  text-decoration: none;
  font-family: var(--font-family);
  transition: color 0.2s ease;
}

.support-phone-link:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
}

.footer-copyright {
  font-size: 0.825rem;
  margin: 0;
  color: var(--text-muted);
}

/* Receipt Support Contact Footer */
.receipt-support-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-top: 1px dashed var(--border-subtle);
  padding-top: 0.85rem;
  margin-top: 1.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.receipt-phone-link {
  font-weight: 700;
  color: var(--color-accent);
  text-decoration: none;
}

.receipt-phone-link:hover {
  text-decoration: underline;
}

/* 15. Mobile & Tablet Responsive Media Queries */
@media (max-width: 640px) {
  .content-card {
    padding: 2rem 1.25rem;
    border-radius: var(--radius-md);
  }
  .main-title {
    font-size: 1.35rem;
  }
  .main-subtitle {
    font-size: 0.875rem;
  }
  .club-logo {
    max-height: 120px;
    max-width: 180px;
  }
  .admin-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .netlify-cloud-banner {
    flex-direction: column;
    gap: 0.5rem;
  }
  .cloud-setup-fields {
    grid-template-columns: 1fr;
  }
  .admin-controls {
    flex-direction: column;
  }
  .admin-buttons {
    width: 100%;
  }
  .admin-buttons .btn {
    flex: 1;
  }
  .personalized-message-box {
    padding: 1.25rem 1rem;
    font-size: 0.95rem;
  }
}

/* PDPL Privacy Notice (Finding 15) */
.privacy-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  background-color: var(--bg-subtle-box);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  margin-bottom: 1.25rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.privacy-icon {
  color: var(--color-accent);
  flex-shrink: 0;
  margin-top: 0.15rem;
}

/* 16. Admin Passcode Input Specific Fix (Requirement 1 & Finding 1) */
#admin-passcode {
  background-color: var(--bg-input) !important;
  background-image: none !important;
  color: var(--text-main) !important;
  -webkit-text-fill-color: var(--text-main) !important;
  opacity: 1 !important;
  letter-spacing: 0.18em;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-size: 1.1rem !important;
  direction: ltr !important;
  text-align: right !important;
}

#admin-passcode::placeholder {
  letter-spacing: normal !important;
  font-family: 'Cairo', system-ui, sans-serif !important;
  font-size: 0.925rem !important;
  color: var(--text-subtle) !important;
  direction: rtl !important;
  text-align: right !important;
}

.passcode-code-badge {
  display: inline-block;
  background: rgba(59, 130, 246, 0.12);
  color: var(--color-primary);
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace !important;
  font-size: 0.95rem;
  font-weight: 700;
  border: 1px solid rgba(59, 130, 246, 0.3);
  unicode-bidi: isolate;
  direction: ltr !important;
  transition: all 0.2s ease;
}

.passcode-code-badge:hover {
  background: rgba(59, 130, 246, 0.22);
  transform: translateY(-1px);
}

#admin-passcode:-webkit-autofill,
#admin-passcode:-webkit-autofill:hover,
#admin-passcode:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--bg-input) inset !important;
  -webkit-text-fill-color: var(--text-main) !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* 17. Admin Stats & Visitor Badge (Requirement 7) */
.stat-badge-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-left: 0.5rem;
}

.visitor-badge {
  background: rgba(16, 185, 129, 0.12) !important;
  color: #10b981 !important;
}

/* 18. Filters Master Wrapper (Dual Filter Bars - Requirement 5) */
.filters-master-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
  background: var(--bg-subtle-box);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.filter-group-label {
  font-size: 0.825rem;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 75px;
  white-space: nowrap;
}

.filter-pill-container {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0;
  flex-wrap: wrap;
}

.filter-pill-scroll {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  overflow-x: visible;
  padding: 0.25rem 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex: 1;
}

.filter-pill-scroll::-webkit-scrollbar {
  display: none;
}

.filter-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.4rem 0.95rem;
  border-radius: 9999px;
  font-size: 0.825rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.filter-pill:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(59, 130, 246, 0.06);
}

.filter-pill.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Stage Pill Specific Active Colors (Requirement 5) */
.stage-pill.stage-pending.active { background: #ea580c !important; border-color: #ea580c !important; box-shadow: 0 2px 8px rgba(234, 88, 12, 0.3); }
.stage-pill.stage-stage1.active { background: #2563eb !important; border-color: #2563eb !important; box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3); }
.stage-pill.stage-stage2.active { background: #9333ea !important; border-color: #9333ea !important; box-shadow: 0 2px 8px rgba(147, 51, 234, 0.3); }
.stage-pill.stage-accepted.active { background: #16a34a !important; border-color: #16a34a !important; box-shadow: 0 2px 8px rgba(22, 163, 74, 0.3); }
.stage-pill.stage-rejected.active { background: #dc2626 !important; border-color: #dc2626 !important; box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3); }

/* Status Select Dropdown inside Admin Table (Requirement 5) */
.status-select-wrap {
  position: relative;
  display: inline-block;
  min-width: 125px;
}

.status-select {
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.35rem 0.65rem 0.35rem 1.4rem;
  border-radius: 20px;
  border: 1.5px solid transparent;
  cursor: pointer;
  outline: none;
  width: 100%;
  transition: all 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
  background-position: left 0.45rem center;
  background-repeat: no-repeat;
  background-size: 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234b5563' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.status-pending {
  background-color: rgba(234, 88, 12, 0.12) !important;
  color: #ea580c !important;
  border-color: rgba(234, 88, 12, 0.35) !important;
}
.status-stage1 {
  background-color: rgba(37, 99, 235, 0.12) !important;
  color: #2563eb !important;
  border-color: rgba(37, 99, 235, 0.35) !important;
}
.status-stage2 {
  background-color: rgba(147, 51, 234, 0.12) !important;
  color: #9333ea !important;
  border-color: rgba(147, 51, 234, 0.35) !important;
}
.status-accepted {
  background-color: rgba(22, 163, 74, 0.12) !important;
  color: #16a34a !important;
  border-color: rgba(22, 163, 74, 0.35) !important;
}
.status-rejected {
  background-color: rgba(220, 38, 38, 0.12) !important;
  color: #dc2626 !important;
  border-color: rgba(220, 38, 38, 0.35) !important;
}

/* 18b. Executive Visual Analytics Panel (Requirement 7) */
.analytics-dashboard-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-card);
}

.analytics-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.85rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.analytics-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.analytics-title svg {
  color: var(--color-primary);
}

.analytics-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* KPI Cards Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.kpi-card {
  background: var(--bg-subtle-box);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.kpi-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.kpi-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1.2;
}

.kpi-value.kpi-success { color: #16a34a; }
.kpi-value.kpi-highlight { color: #2563eb; font-size: 1.1rem; word-break: break-word; }
.kpi-value.kpi-time { font-size: 0.95rem; font-weight: 700; color: var(--text-main); }

.kpi-hint {
  font-size: 0.75rem;
  color: var(--text-subtle);
  margin-top: 0.25rem;
}

/* Subcards inside Analytics */
.analytics-subcard {
  background: var(--bg-subtle-box);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1.15rem;
  margin-bottom: 1.25rem;
}

.analytics-subheading {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.85rem;
  border-bottom: 1px dashed var(--border-subtle);
  padding-bottom: 0.4rem;
}

/* Funnel Pipeline Grid */
.funnel-pipeline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.75rem;
}

.funnel-step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.5rem;
  text-align: center;
  border-top: 3px solid var(--color-primary);
  transition: transform 0.2s ease;
}

.funnel-step-card:hover {
  transform: translateY(-2px);
}

.funnel-step-pending { border-top-color: #ea580c; }
.funnel-step-stage1 { border-top-color: #2563eb; }
.funnel-step-stage2 { border-top-color: #9333ea; }
.funnel-step-accepted { border-top-color: #16a34a; }
.funnel-step-rejected { border-top-color: #dc2626; }

.funnel-step-name {
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.funnel-step-count {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
}

.funnel-step-pct {
  font-size: 0.725rem;
  color: var(--text-subtle);
}

/* Distributions (Bars Grid) */
.distributions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 768px) {
  .distributions-grid {
    grid-template-columns: 1fr;
  }
}

.bars-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.bar-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.bar-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
}

.bar-track {
  width: 100%;
  height: 8px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 4px;
  overflow: hidden;
}

[data-theme="dark"] .bar-track {
  background: rgba(255, 255, 255, 0.08);
}

.bar-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: 4px;
  transition: width 0.4s ease;
}

/* 19. Table Loading Overlay & Professional Spinner (Requirement 6) */
.table-wrapper {
  position: relative;
}

.table-loading-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 1.5rem;
  background: var(--bg-card);
  gap: 1rem;
}

.spinner-ring {
  width: 44px;
  height: 44px;
  border: 4px solid var(--border-subtle);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.loading-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
}

/* 20. Read-Only Application Receipt Card (Requirements 2, 3, 4) */
.receipt-card {
  border-top: 4px solid var(--color-primary);
  position: relative;
  overflow: hidden;
}

.receipt-card > *:not(.receipt-watermark) {
  position: relative;
  z-index: 1;
}

.receipt-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  max-width: 80%;
  opacity: 0.1;
  pointer-events: none;
  z-index: 0;
  -webkit-filter: none !important;
  filter: none !important;
}

.receipt-signatures-wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 2rem;
  margin-bottom: 1.5rem;
  padding-top: 1rem;
  gap: 1.5rem;
  font-family: 'Cairo', sans-serif;
}

.signature-box {
  display: flex;
  flex-direction: column;
  flex: 1;
  max-width: 250px;
}

.signature-box.signature-right {
  text-align: right;
  align-items: flex-start;
}

.signature-box.signature-left {
  text-align: left;
  align-items: flex-end;
}

.signature-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.signature-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  border-top: 1.5px solid var(--border-subtle);
  padding-top: 0.5rem;
  width: 100%;
}

.receipt-contact-footer {
  border-top: 1px dashed var(--border-subtle);
  padding-top: 1rem;
  margin-top: 1rem;
  text-align: center;
}

.receipt-contact-footer .footer-contact {
  margin-bottom: 0;
}

/* 20b. Admin Student Application Preview Modal (Requirement 1: max-height: 90vh, fixed header, modal body scroll) */
.preview-modal-box {
  max-width: 780px !important;
  width: 100%;
  max-height: 90vh !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
}

.modal-header-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.1rem 1.5rem;
  background: var(--bg-card);
  z-index: 2;
}

.modal-body-scroll {
  flex: 1 1 auto;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  padding: 1.5rem;
  overscroll-behavior: contain;
}

.modal-preview-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.modal-close-icon {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  color: var(--text-subtle);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  line-height: 1;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.modal-close-icon:hover {
  color: var(--color-error);
  background-color: var(--color-error-bg);
}

.modal-receipt-inner {
  border: 1px solid var(--border-subtle);
  box-shadow: none;
  padding: 1.75rem 1.5rem;
  border-radius: var(--radius-md);
}

/* Action button in Admin table */
.btn-action-preview {
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background-color: var(--bg-subtle-box);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--color-primary);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-action-preview:hover {
  background-color: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
  transform: translateY(-1px);
}

.theme-logo {
  transition: opacity 0.25s ease;
}

.receipt-header {
  text-align: center;
  margin-bottom: 1.25rem;
}

.receipt-logo {
  max-height: 100px;
  margin-bottom: 0.5rem;
}

.receipt-institution {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.receipt-badge-wrap {
  margin-top: 0.5rem;
}

.receipt-status-badge {
  display: inline-block;
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.25rem 0.85rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
}

.receipt-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg-subtle-box);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-top: 1rem;
  flex-wrap: wrap;
}

.receipt-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 1.5rem 0;
}

.receipt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.5rem;
  margin-bottom: 1.5rem;
}

.receipt-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: var(--bg-subtle-box);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.receipt-field-full {
  grid-column: 1 / -1;
}

.receipt-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.receipt-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  word-break: break-word;
}

.receipt-skills-box {
  white-space: pre-wrap;
  line-height: 1.6;
  margin: 0;
  font-weight: 500;
}

.receipt-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  background-color: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  margin-bottom: 1.75rem;
  font-size: 0.825rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.receipt-notice svg {
  color: var(--color-primary);
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.receipt-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.receipt-actions .btn {
  min-width: 170px;
}

/* 20c. Printable Comprehensive Analytics Report Sheet (Requirement 2) */
.analytics-report-sheet {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-top: 2rem;
}

.analytics-report-sheet.hidden {
  display: none !important;
}

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.report-header-brand {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.report-logo {
  max-height: 80px;
  width: auto;
  object-fit: contain;
}

.report-header-titles {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.report-institution {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.report-main-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
}

.report-tagline {
  font-size: 0.8rem;
  color: var(--text-subtle);
}

.report-meta-box {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.825rem;
}

.report-meta-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.report-section {
  margin-bottom: 1.5rem;
}

.report-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.85rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-subtle);
}

.report-kpis-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.report-kpi-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
}

.report-kpi-card.report-kpi-success {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.05);
}

.report-kpi-card.report-kpi-danger {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.05);
}

.report-kpi-label {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-muted);
}

.report-kpi-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0.35rem 0;
}

.report-kpi-card.report-kpi-success .report-kpi-value {
  color: var(--color-success);
}

.report-kpi-card.report-kpi-danger .report-kpi-value {
  color: var(--color-danger);
}

.report-kpi-sub {
  font-size: 0.775rem;
  color: var(--text-subtle);
}

.report-rejection-callout {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(239, 68, 68, 0.08);
  border: 1.5px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.25rem;
  margin-bottom: 1.5rem;
}

.callout-badge {
  background: #dc2626;
  color: #ffffff;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.callout-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.callout-heading {
  font-size: 0.9rem;
  color: #dc2626;
}

.callout-desc {
  font-size: 0.85rem;
  color: var(--text-main);
  margin: 0;
  font-weight: 600;
}

.report-charts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.report-chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

.report-chart-title {
  font-size: 0.925rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.85rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-subtle);
}

.report-bars-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.report-pipeline-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.report-bar-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.775rem;
  color: var(--text-muted);
}

.report-bar-name {
  font-weight: 600;
}

.report-bar-count {
  font-weight: 700;
}

.report-bar-track {
  width: 100%;
  height: 8px;
  background: var(--border-subtle);
  border-radius: 4px;
  overflow: hidden;
}

.report-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.report-signatures-wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1.5px dashed var(--border-color);
}

/* 21. Strict Single-Page PDF Print Receipt Styling (@media print) */
@media print {
  @page {
    size: A4 portrait;
    margin: 0.8cm 1.2cm;
  }

  /* Universal exact colors */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Reset body and html completely: remove shadows, borders, background */
  html,
  body {
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 10pt !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: none !important;
    width: 100% !important;
    min-height: auto !important;
  }

  /* Hide ALL outer UI: announcement bar, navigation, buttons, footers, other cards */
  .top-announcement-bar,
  .top-nav,
  header:not(.admin-header):not(.report-header),
  nav,
  .nav-wrapper,
  .theme-toggle-wrap,
  .btn-theme-toggle,
  #theme-toggle-btn,
  .theme-label,
  .theme-icon,
  .admin-access-wrap,
  #admin-trigger-btn,
  .global-footer,
  .receipt-actions,
  .no-print,
  #form-card,
  #success-card,
  #passcode-modal {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* When NOT in analytics print mode and NOT in preview mode, hide admin and preview modal */
  body:not(.printing-analytics):not(.printing-preview) #admin-section,
  body:not(.printing-analytics):not(.printing-preview) #admin-preview-modal,
  body:not(.printing-analytics):not(.printing-preview) #analytics-report-container {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
  }

  /* Reset main container */
  .page-container,
  main {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
  }

  /* Mode 1: Individual Student Registration Receipt (Strict Single A4 Page) */
  body:not(.printing-analytics):not(.printing-preview) #my-application-card,
  body:not(.printing-analytics):not(.printing-preview) .receipt-card:not(.modal-receipt-inner) {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 1.2rem 1.5rem !important;
    background: #ffffff !important;
    color: #0f172a !important;
    box-shadow: none !important;
    border: 1.5px solid #0f172a !important;
    border-radius: 8px !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    page-break-after: avoid !important;
    break-after: avoid !important;
  }

  .receipt-watermark {
    display: none !important;
  }

  .receipt-header {
    text-align: center !important;
    margin-bottom: 0.85rem !important;
  }

  .receipt-logo {
    max-height: 65px !important;
    width: auto !important;
    margin: 0 auto 0.35rem !important;
    display: block !important;
  }

  .receipt-institution {
    display: block !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: #475569 !important;
  }

  #receiptTitle {
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    margin: 0.25rem 0 !important;
  }

  .receipt-badge-wrap {
    margin-top: 0.35rem !important;
  }

  .receipt-status-badge {
    display: inline-block !important;
    border: 1.5px solid #10b981 !important;
    color: #065f46 !important;
    background: #d1fae5 !important;
    padding: 0.2rem 0.8rem !important;
    border-radius: 20px !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
  }

  .receipt-meta {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #1e293b !important;
    padding: 0.45rem 0.85rem !important;
    border-radius: 6px !important;
    font-size: 0.8rem !important;
    margin-top: 0.65rem !important;
  }

  .receipt-divider {
    height: 1.5px !important;
    background: #0f172a !important;
    margin: 0.75rem 0 !important;
  }

  .receipt-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.5rem 0.85rem !important;
    margin-bottom: 0.75rem !important;
  }

  .receipt-field {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    padding: 0.45rem 0.75rem !important;
    border-radius: 6px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.15rem !important;
  }

  .receipt-field-full {
    grid-column: 1 / -1 !important;
  }

  .receipt-label {
    font-size: 0.75rem !important;
    color: #64748b !important;
    font-weight: 700 !important;
  }

  .receipt-value {
    font-size: 0.9rem !important;
    color: #0f172a !important;
    font-weight: 700 !important;
  }

  .receipt-skills-box {
    max-height: 60px !important;
    overflow: hidden !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    color: #1e293b !important;
    line-height: 1.4 !important;
    margin: 0 !important;
  }

  .receipt-notice {
    background: #f0fdf4 !important;
    border: 1px solid #86efac !important;
    color: #166534 !important;
    padding: 0.45rem 0.75rem !important;
    border-radius: 6px !important;
    font-size: 0.75rem !important;
    margin-bottom: 0.75rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.45rem !important;
  }

  .receipt-signatures-wrap {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-end !important;
    margin-top: 0.85rem !important;
    padding-top: 0.75rem !important;
    border-top: 1.5px dashed #cbd5e1 !important;
    gap: 1.5rem !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .signature-box.signature-right {
    text-align: right !important;
    align-items: flex-start !important;
  }

  .signature-box.signature-left {
    text-align: left !important;
    align-items: flex-end !important;
  }

  .signature-title {
    color: #475569 !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
  }

  .signature-name {
    color: #0f172a !important;
    font-size: 0.95rem !important;
    font-weight: 800 !important;
    padding-top: 0.25rem !important;
  }

  .receipt-support-footer {
    border-top: 1px solid #e2e8f0 !important;
    padding-top: 0.4rem !important;
    margin-top: 0.6rem !important;
    text-align: center !important;
    font-size: 0.75rem !important;
    color: #64748b !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.35rem !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .receipt-phone-link {
    color: #0f172a !important;
    font-weight: 700 !important;
    text-decoration: none !important;
  }

  /* Mode 2: Executive Analytics Report Print Mode */
  body.printing-analytics * {
    visibility: hidden;
  }
  body.printing-analytics #analytics-report-container,
  body.printing-analytics #analytics-report-container * {
    visibility: visible !important;
    display: block !important;
  }
  body.printing-analytics #analytics-report-container {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 1cm 1.2cm !important;
    background: #ffffff !important;
    color: #0f172a !important;
    box-shadow: none !important;
    border: none !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  /* Mode 3: Admin Modal Preview Print Mode */
  body.printing-preview * {
    visibility: hidden;
  }
  body.printing-preview #admin-preview-modal,
  body.printing-preview #admin-preview-modal .modal-receipt-inner,
  body.printing-preview #admin-preview-modal .modal-receipt-inner * {
    visibility: visible !important;
  }
  body.printing-preview #admin-preview-modal {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    display: block !important;
    background: transparent !important;
    padding: 0 !important;
  }
  body.printing-preview #admin-preview-modal .modal-box {
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
  }
  body.printing-preview #admin-preview-modal .modal-body-scroll {
    overflow: visible !important;
    padding: 0 !important;
  }
  body.printing-preview .modal-header-bar,
  body.printing-preview .receipt-actions {
    display: none !important;
  }
}

