  body, html {
      margin: 0;
      padding: 0;
      height: 100%;
      width: 100%;
      font-family: 'Arial', sans-serif;
    }

    body {
      padding-top: 86px;
    }
    
    .preload-overlay {
      position: fixed;
      inset: 0;
      width: 100%;
      min-height: 100vh;
      min-height: 100dvh;
      background:
        linear-gradient(135deg, rgba(1, 17, 42, 0.88), rgba(0, 92, 62, 0.72)),
        url('../imgs/gate1.webp') center / cover no-repeat;
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 9999;
      padding: 24px;
      overflow: hidden;
      transition: opacity 0.45s ease, visibility 0.45s ease;
    }

    .preload-overlay::before {
      content: "";
      position: absolute;
      inset: 0;
      background: rgba(255, 255, 255, 0.08);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
    }

    .box-wrap {
      position: relative;
      width: min(92vw, 380px);
      padding: 0 20px;
      color: #fff;
      text-align: center;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
    }

    .preload-logo-wrap {
      position: relative;
      width: 124px;
      height: 124px;
      display: grid;
      place-items: center;
      margin-bottom: 18px;
      border-radius: 50%;
    
    }

    .preload-logo-wrap::before {
      content: "";
      position: absolute;
      inset: -8px;
      border-radius: inherit;
      border: 3px solid rgba(255, 255, 255, 0.28);
      border-top-color: #22c55e;
      
      animation: preloadSpin 1.35s linear infinite;
    }

    .preload-logo-wrap img {
      width: 104px;
      height: 104px;
      object-fit: contain;
      border-radius: 50%;
    }

    .preload-kicker {
      margin: 0 0 6px;
      font-size: 0.78rem;
      font-weight: 700;
      letter-spacing: 0.16em;
      text-transform: uppercase;
      color: #bbf7d0;
    }

    .box-wrap h2 {
      margin: 0;
      font-size: 1.35rem;
      line-height: 1.25;
      font-weight: 800;
      letter-spacing: 0;
    }

    .preload-progress {
      width: 100%;
      height: 5px;
      margin-top: 24px;
      overflow: hidden;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.22);
    }

    .preload-progress span {
      display: block;
      width: 42%;
      height: 100%;
      border-radius: inherit;
      background: linear-gradient(90deg, #22c55e, #ffffff);
      animation: preloadBar 1.25s ease-in-out infinite;
    }

    .preload-note {
      margin: 14px 0 0;
      font-size: 0.9rem;
      color: rgba(255, 255, 255, 0.82);
    }

    @keyframes preloadSpin {
      to { transform: rotate(360deg); }
    }

    @keyframes preloadBar {
      0% { transform: translateX(-110%); }
      100% { transform: translateX(250%); }
    }

    @media (max-width: 480px) {
      .box-wrap {
        padding: 28px 22px;
        border-radius: 16px;
      }

      .preload-logo-wrap {
        width: 110px;
        height: 110px;
      }

      .preload-logo-wrap img {
        width: 92px;
        height: 92px;
      }

      .box-wrap h2 {
        font-size: 1.15rem;
      }
    }

    @media (prefers-reduced-motion: reduce) {
      .preload-overlay,
      .preload-logo-wrap::before,
      .preload-progress span {
        animation: none;
        transition-duration: 1.01ms;
      }
    }
    
    /* Error shake animation */
    @keyframes errorShake {
      0%, 100% { transform: translateX(0); }
      10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
      20%, 40%, 60%, 80% { transform: translateX(5px); }
    }
    
    .error-shake {
      animation: errorShake 0.6s ease-in-out;
      border-left: 5px solid #e53e3e !important; /* Red border for errors */
    }
    
    .loaded .preload-overlay {
      opacity: 0;
      visibility: hidden;
    }
    
    .site-header {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      z-index: 1100;
      background: linear-gradient(135deg, rgba(0, 47, 122, 0.96), rgba(0, 115, 223, 0.94));
      box-shadow: 0 10px 28px rgba(1, 17, 42, 0.22);
    }

    .site-header .navbar {
      min-height: 74px;
      margin: 0;
      padding: 10px clamp(14px, 3vw, 34px);
      background: transparent;
      position: static;
      width: 100%;
      z-index: auto;
    }

    .site-header .navbar-brand {
      display: inline-flex;
      align-items: center;
      min-width: 0;
      padding: 0;
      margin: 0;
      font-weight: bold;
    }

    .site-header .navbar-brand img {
      display: block;
      width: clamp(180px, 28vw, 330px);
      height: auto;
      max-height: 54px;
      object-fit: contain;
    }

    .portal-login-btn {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      min-height: 40px;
      padding: 0 16px;
      border: 1px solid rgba(255, 255, 255, 0.32);
      border-radius: 999px;
      color: #fff;
      background: rgba(255, 255, 255, 0.12);
      font-weight: 700;
      line-height: 1;
      text-decoration: none;
      transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    }

    .portal-login-btn:hover,
    .portal-login-btn:focus {
      color: #fff;
      background: rgba(255, 255, 255, 0.2);
      border-color: rgba(255, 255, 255, 0.5);
      transform: translateY(-1px);
    }

    @media (max-width: 640px) {
      body {
        padding-top: 76px;
      }

      .site-header .navbar {
        min-height: 66px;
        padding: 8px 12px;
      }

      .site-header .navbar-brand img {
        width: min(58vw, 230px);
        max-height: 48px;
      }

      .portal-login-btn {
        min-height: 36px;
        padding: 0 12px;
        font-size: 0.85rem;
      }
    }
    
    .required-field label:after {
      content: " *";
      color: red;
    }
    
    .shaded-section {
      background-color: #f8fafc;
    }
    
    .section-border {
      border-left: 6px solid #02114c;
      padding-left: 1rem;
      transition: border-color 0.3s ease;
    }
    .section-border2 {
  border-left: 6px solid #970422 ; /* or desired color */
  padding-left: 1rem;
  transition: border-color 0.3s ease;
}
    #sticky-dock {
      position: fixed;
      bottom: -30px;
      right: 10px;
      z-index: 1000;
      padding:0px;
      transition: transform 0.3s ease, opacity 0.3s ease;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      max-width: 120px;
      height: auto;
    }
    
    #sticky-dock:hover {
      transform: scale(1.05);
    }
    
    /* Optional: Add animation for when the page loads */
    @keyframes dockEntrance {
      from {
        opacity: 0;
        transform: translateY(20px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }
    
    #sticky-dock {
      animation: dockEntrance 0.6s ease-out forwards;
    }
    
    /* Optional: Hide dock when user is at the very bottom of the page */
    body.at-bottom #sticky-dock {
      opacity: 0.5;
    }
    
    /* Load More Animation */
    .loading-spinner {
      display: inline-block;
      width: 20px;
      height: 20px;
      border: 3px solid rgba(0, 0, 0, 0.1);
      border-radius: 50%;
      border-top-color: #3498db;
      animation: spin 1s ease-in-out infinite;
      margin-right: 8px;
      vertical-align: middle;
    }
    
    @keyframes spin {
      to { transform: rotate(360deg); }
    }
    
    /* Hidden sections for load more functionality */
    .loadable-section {
      display: none;
      opacity: 0;
      transform: translateY(20px);
      transition: opacity 0.5s ease, transform 0.5s ease;
    }
    
    .loadable-section.visible {
      display: block;
      opacity: 1;
      transform: translateY(0);
    }
    
    /* N/A button styles */
    .na-button {
      padding: 2px 8px;
      font-size: 0.75rem;
      background-color: #f3f4f6;
      border: 1px solid #d1d5db;
      border-radius: 4px;
      color: #4b5563;
      cursor: pointer;
      transition: all 0.2s;
      margin-left: 8px;
    }
    
    .na-button:hover {
      background-color: #e5e7eb;
      color: #1f2937;
    }
    
    .na-button.active {
      background-color: #d1fae5;
      border-color: #10b981;
      color: #047857;
    }
    
    .field-with-na {
      display: flex;
      align-items: center;
    }
    
    .field-with-na input {
      flex: 1;
    }
    
    /* Additional CSS for Digital Signature */
.signature-container {
  overflow: hidden;
  border-radius: 0.375rem;
}

#signatureCanvas {
  touch-action: none; /* Prevent scrolling while drawing on touch devices */
}

/* Styling for agreement status */
#parentAgreementStatus {
  transition: all 0.3s ease;
}

#parentAgreementStatus.bg-green-50 {
  border-color: #a7f3d0 !important;
}

/* Animation for when signature is completed */
@keyframes signatureComplete {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.signature-complete {
  animation: signatureComplete 0.5s ease-in-out;
}

/* Ensure the modal displays properly on mobile */
@media (max-width: 640px) {
  #agreementModal .max-w-2xl {
    width: 100%;
    max-height: 85vh;
  }
  
  #signatureCanvas {
    height: 150px; /* Smaller canvas for mobile */
  }
}

/* Improve button visibility */
#openAgreementBtn {
  white-space: nowrap;
}

/* Style for the parents agreement section to make it more prominent */
.parents-agreement-section {
  border-left-color: #1e40af !important;
}

/* Custom checkbox styling */
#confirmSignature {
  cursor: pointer;
}

/* Disable the "I Agree" checkbox directly (it'll be controlled by the popup) */
#agree[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}
    
    /* Additional CSS for Digital Signature */
.signature-container {
  overflow: hidden;
  border-radius: 0.375rem;
}

#signatureCanvas {
  touch-action: none; /* Prevent scrolling while drawing on touch devices */
}

/* Styling for agreement status */
#parentAgreementStatus {
  transition: all 0.3s ease;
}

#parentAgreementStatus.bg-green-50 {
  border-color: #a7f3d0 !important;
}

/* Animation for when signature is completed */
@keyframes signatureComplete {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.signature-complete {
  animation: signatureComplete 0.5s ease-in-out;
}

/* Modal positioning and scrolling fixes */
#agreementModal {
  align-items: flex-start !important;
  padding-top: 20px !important;
  padding-bottom: 20px !important;
 z-index: 9999;
}

/* Ensure the modal displays properly on all devices */
@media (max-width: 768px) {
  #agreementModal .max-w-2xl {
    width: 100%;
    margin: 5px auto;
    max-height: 80vh;
  }
  
  #signatureCanvas {
    height: 150px; /* Smaller canvas for mobile */
  }
  
  /* Smaller text on mobile */
  #agreementModal .prose {
    font-size: 0.9rem;
  }
  
  /* Adjust modal padding on mobile */
  #agreementModal .px-6 {
    padding-left: 1rem;
    padding-right: 1rem;
  }
#sticky-dock {
      position: fixed;
      bottom: -10px;
      right: 10px;
      z-index: 1000;
      padding:0px;
      transition: transform 0.3s ease, opacity 0.3s ease;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      max-width: 80px;
      height: auto;
    }
}

/* Improve button visibility */
#openAgreementBtn {
  white-space: nowrap;
}

/* Style for the parents agreement section to make it more prominent */
.parents-agreement-section {
  border-left-color: #1e40af !important;
}

/* Custom checkbox styling */
#confirmSignature {
  cursor: pointer;
}

/* Disable the "I Agree" checkbox directly (it'll be controlled by the popup) */
#agree[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}
    
    
    
