/* =====================================================
   UNICROSS Registration Portal — Custom Styles
   Layered on top of Bootstrap 5
   ===================================================== */

:root {
  --unicross-navy: #1a2332;
  --unicross-blue: #1e73be;
  --unicross-success: #28a745;
  --unicross-danger: #dc3545;
  --unicross-warning: #ffc107;
}

/* ─── Shared Header ─────────────────────────────────── */
.site-header {
  background-color: var(--unicross-navy);
  padding: 16px 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  border-bottom: 2px solid #c9a84c;
}

.site-header .header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-header .header-logo {
  height: 60px;
  width: auto;
  display: block;
  flex-shrink: 0;
  /* Logo displayed as-is (blue/colour on white JPG background).
     If the logo appears as a white box on dark, swap to:
     filter: brightness(0) invert(1); */
}

.site-header .header-divider {
  width: 1px;
  height: 44px;
  background-color: rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}

.site-header .wordmark {
  line-height: 1.1;
}

.site-header .wordmark .brand-main {
  font-size: 1.75rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.04em;
}

.site-header .wordmark .brand-sub {
  font-size: 1rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.06em;
}

.site-header .university-name {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 0.2rem;
}

.site-header .header-session-label {
  margin-left: auto;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
  text-align: right;
  white-space: nowrap;
  line-height: 1.3;
}

/* ─── Shared Footer ─────────────────────────────────── */
.site-footer {
  background-color: var(--unicross-navy);
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.85rem;
  padding: 1.25rem 0;
  margin-top: auto;
}

/* ─── Page wrapper (keeps footer at bottom) ─────────── */
.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page-content {
  flex: 1;
}

/* ─── Hero Section ───────────────────────────────────── */
.hero-section {
  background: linear-gradient(135deg, var(--unicross-navy) 0%, #243447 100%);
  color: #ffffff;
  padding: 3rem 0 2.5rem;
  text-align: center;
}

.hero-section h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.hero-section p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 1rem;
  margin-bottom: 0;
}

/* ─── Registration Cards ─────────────────────────────── */
.card-section {
  padding: 2.5rem 0;
  background-color: #f4f6f9;
}

.reg-card {
  border: none;
  border-radius: 0.5rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  height: 100%;
}

.reg-card .card-header {
  background-color: var(--unicross-navy);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  padding: 1rem 1.25rem;
  border-bottom: 3px solid var(--unicross-blue);
}

.reg-card .card-body {
  padding: 1.75rem 1.5rem;
  background-color: #ffffff;
}

.reg-card .card-header .card-icon {
  width: 2rem;
  height: 2rem;
  background-color: var(--unicross-blue);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.5rem;
  font-size: 0.9rem;
}

/* ─── Buttons ────────────────────────────────────────── */
.btn-unicross-blue {
  background-color: var(--unicross-blue);
  border-color: var(--unicross-blue);
  color: #ffffff;
  font-weight: 600;
}

.btn-unicross-blue:hover,
.btn-unicross-blue:focus {
  background-color: #175fa0;
  border-color: #175fa0;
  color: #ffffff;
}

.btn-unicross-navy {
  background-color: var(--unicross-navy);
  border-color: var(--unicross-navy);
  color: #ffffff;
  font-weight: 600;
} 

.btn-unicross-navy:hover,
.btn-unicross-navy:focus {
  background-color: #111823;
  border-color: #111823;
  color: #ffffff;
}

/* ─── Instructions Section ───────────────────────────── */
.instructions-section {
  padding: 2.5rem 0;
  background-color: #ffffff;
}

.instructions-section h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--unicross-navy);
  margin-bottom: 1.25rem;
}

.instructions-section .step-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: steps;
}

.instructions-section .step-list li {
  counter-increment: steps;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e9ecef;
}

.instructions-section .step-list li:last-child {
  border-bottom: none;
}

.instructions-section .step-list li::before {
  content: counter(steps);
  background-color: var(--unicross-blue);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.85rem;
  min-width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

/* ─── Form helpers ───────────────────────────────────── */
.form-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #343a40;
}

.form-control:focus {
  border-color: var(--unicross-blue);
  box-shadow: 0 0 0 0.2rem rgba(30, 115, 190, 0.2);
}

/* ─── Validation feedback ────────────────────────────── */
.field-error {
  font-size: 0.8rem;
  color: var(--unicross-danger);
  margin-top: 0.25rem;
  display: none;
}

.field-error.visible {
  display: block;
}

/* ─── Shared page-title bar (used on inner pages) ───── */
.page-title-bar {
  background-color: var(--unicross-navy);
  color: #ffffff;
  padding: 1.25rem 0;
}

.page-title-bar h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
}

.page-title-bar p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0.25rem 0 0;
}

/* ─── Alert banners ─────────────────────────────────── */
.alert-success-banner {
  background-color: #d4edda;
  border-left: 5px solid var(--unicross-success);
  color: #155724;
}

.alert-danger-banner {
  background-color: #f8d7da;
  border-left: 5px solid var(--unicross-danger);
  color: #721c24;
}

/* ─── Responsive tweaks ─────────────────────────────── */
@media (max-width: 767.98px) {
  .hero-section h1 {
    font-size: 1.35rem;
  }

  .site-header .header-logo {
    height: 44px;
  }

  .site-header .wordmark .brand-main {
    font-size: 1.4rem;
  }

  .site-header .header-session-label {
    display: none;
  }

  .reg-card {
    margin-bottom: 1.5rem;
  }
}

/* ── Static sidebar ──────────────────────────── */
    .reg-sidebar {
      position: fixed;
      top: 0;
      left: 0;
      width: 260px;
      height: 100vh;
      background-color: var(--unicross-navy);
      color: #fff;
      padding: 1.25rem 1.25rem 1.5rem;
      display: flex;
      flex-direction: column;
      overflow-y: auto;
      z-index: 100;
    }

    /* Push all page content right of the sidebar */
    .page-wrapper-side { margin-left: 260px; }

    /* ── Main content area ────────────────────────── */
    .reg-inner {
      max-width: 860px;
      margin: 0 auto;
      padding: 1.5rem 1.25rem;
    }
    @media (max-width: 575.98px) {
      .reg-inner { padding: 1rem 0.75rem; }
    }

    /* ── Mobile: hide sidebar, remove margin ─────── */
    @media (max-width: 767.98px) {
      .reg-sidebar  { display: none; }
      .page-wrapper { margin-left: 0; }
    }

    /* ── Sidebar internals ───────────────────────── */
    .sb-candidate {
      margin-bottom: 1.25rem;
    }
    .sb-candidate-name {
      font-weight: 700;
      font-size: 0.95rem;
      color: #fff;
      word-break: break-word;
    }
    .sb-candidate-reg {
      font-size: 0.75rem;
      color: rgba(255,255,255,0.55);
      margin-top: 0.2rem;
    }
    .sb-divider {
      border: none;
      border-top: 1px solid rgba(255,255,255,0.12);
      margin: 0 0 1rem;
    }
    .sb-steps {
      list-style: none;
      padding: 0;
      margin: 0;
      flex: 1;
    }
    .sb-step {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      padding: 0.65rem 0;
    }
    .sb-step + .sb-step {
      border-top: 1px solid rgba(255,255,255,0.07);
    }
    .sb-step-dot {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.78rem;
      font-weight: 700;
      background: rgba(255,255,255,0.1);
      color: rgba(255,255,255,0.4);
      transition: background 0.2s, color 0.2s;
    }
    .sb-step.active    .sb-step-dot { background: var(--unicross-blue); color: #fff; }
    .sb-step.completed .sb-step-dot { background: var(--unicross-success); color: #fff; }
    .sb-step-label {
      font-size: 0.83rem;
      color: rgba(255,255,255,0.45);
      transition: color 0.2s;
    }
    .sb-step.active    .sb-step-label { color: #fff; font-weight: 600; }
    .sb-step.completed .sb-step-label { color: rgba(255,255,255,0.75); }

    /* ── Clickable step states ───────────────────── */
    .sb-step.active,
    .sb-step.completed {
      cursor: pointer;
      border-radius: 6px;
      transition: background 0.15s;
    }
    .sb-step.active:hover,
    .sb-step.completed:hover {
      background: rgba(255,255,255,0.08);
    }
    .sb-step:not(.active):not(.completed) {
      cursor: not-allowed;
      opacity: 0.5;
    }

    /* ── Shake animation for pending steps ───────── */
    @keyframes sb-shake {
      0%, 100% { transform: translateX(0); }
      20%      { transform: translateX(-6px); }
      50%      { transform: translateX(5px); }
      80%      { transform: translateX(-4px); }
    }
    .sb-step.sb-shake { animation: sb-shake 0.35s ease; }

    .sb-footer {
      font-size: 0.72rem;
      color: rgba(255,255,255,0.3);
      margin-top: auto;
      padding-top: 1rem;
    }

    /* ── Step indicator (top horizontal) ────────── */
    .step-indicator {
      display: flex;
      align-items: flex-start;
      justify-content: center;
    }
    .step-item {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.4rem;
      min-width: 68px;
    }
    .step-circle {
      width: 44px;
      height: 44px;
      border-radius: 50%;
      background-color: #dee2e6;
      color: #6c757d;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 700;
      font-size: 0.95rem;
      flex-shrink: 0;
      transition: background-color 0.25s, color 0.25s;
    }
    .step-item.active    .step-circle { background-color: var(--unicross-navy); color: #fff; }
    .step-item.completed .step-circle { background-color: #28a745; color: #fff; }
    .step-label {
      font-size: 0.72rem;
      color: #6c757d;
      font-weight: 500;
      text-align: center;
      white-space: nowrap;
    }
    .step-item.active    .step-label { color: var(--unicross-navy); font-weight: 700; }
    .step-item.completed .step-label { color: #28a745; font-weight: 600; }
    .step-connector {
      flex: 1;
      height: 2px;
      background-color: #dee2e6;
      margin: 22px 4px 0;
      transition: background-color 0.25s;
    }
    .step-connector.completed { background-color: #28a745; }

    /* ── Step sections ───────────────────────────── */
    .step-section { display: none; }
    .step-section.active { display: block; }

    /* ── Upload zones ────────────────────────────── */
    .upload-zone {
      border: 2px dashed #ced4da;
      border-radius: 0.5rem;
      padding: 1rem 1.25rem;
      background-color: #f8f9fa;
      transition: border-color 0.2s;
    }
    .upload-zone:focus-within { border-color: var(--unicross-blue); }
    .upload-zone .upload-label {
      font-size: 0.875rem;
      font-weight: 600;
      color: var(--unicross-navy);
      margin-bottom: 0.35rem;
    }
    .upload-zone .upload-hint {
      font-size: 0.78rem;
      color: #6c757d;
      margin-bottom: 0.5rem;
    }
    #passport-view {
      width: 110px;
      height: 130px;
      object-fit: cover;
      border-radius: 0.375rem;
      border: 2px solid var(--unicross-blue);
      margin-top: 0.75rem;
    }
    #olevel-view {
      width: 110px;
      height: 130px;
      object-fit: cover;
      border-radius: 0.375rem;
      border: 2px solid var(--unicross-blue);
      margin-top: 0.75rem;
    }
    #olevel2-view {
      width: 110px;
      height: 130px;
      object-fit: cover;
      border-radius: 0.375rem;
      border: 2px solid var(--unicross-blue);
      margin-top: 0.75rem;
    }
    #jamb-view {
      width: 110px;
      height: 130px;
      object-fit: cover;
      border-radius: 0.375rem;
      border: 2px solid var(--unicross-blue);
      margin-top: 0.75rem;
    }
    #passport-preview {
      display: none;
      width: 110px;
      height: 130px;
      object-fit: cover;
      border-radius: 0.375rem;
      border: 2px solid var(--unicross-blue);
      margin-top: 0.75rem;
    }
    #olevel-preview {
      display: none;
      width: 110px;
      height: 130px;
      object-fit: cover;
      border-radius: 0.375rem;
      border: 2px solid var(--unicross-blue);
      margin-top: 0.75rem;
    }
    #olevel2-preview {
      display: none;
      width: 110px;
      height: 130px;
      object-fit: cover;
      border-radius: 0.375rem;
      border: 2px solid var(--unicross-blue);
      margin-top: 0.75rem;
    }
    #jamb-preview {
      display: none;
      width: 110px;
      height: 130px;
      object-fit: cover;
      border-radius: 0.375rem;
      border: 2px solid var(--unicross-blue);
      margin-top: 0.75rem;
    }
    .file-ok {
      font-size: 0.8rem;
      color: var(--unicross-success);
      margin-top: 0.25rem;
    }

    /* ── Results / SSCE tables ───────────────────── */
    .results-card .card-header {
      background-color: #fff;
      border-bottom: 1px solid #dee2e6;
      color: var(--unicross-navy);
      font-weight: 600;
    }
    .results-card thead th {
      font-size: 0.8rem;
      background-color: #f1f3f5;
      font-weight: 600;
      color: #495057;
    }
    .results-card tbody td { vertical-align: middle; }

    .utme-total-row { background-color: #eef4fc; }
    #utme-total {
      max-width: 88px;
      font-weight: 700;
      color: var(--unicross-navy);
      background-color: #dce9f8;
      text-align: center;
      cursor: default;
    }

    .remove-ssce-row { font-size: 1rem; line-height: 1; }
    #ssce-block-2 { display: none; }

    td .field-error { font-size: 0.75rem; }
    .is-invalid-cell { border-color: var(--unicross-danger) !important; }

    /* Locked SSCE row */
    .ssce-subject[disabled] {
      background-color: #e9ecef;
      color: #495057;
      cursor: default;
      opacity: 1;
    }

    /* Section sub-header inside card */
    .card-section-header {
      font-size: 0.8rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: var(--unicross-navy);
      border-bottom: 1px solid #dee2e6;
      padding-bottom: 0.5rem;
      margin-bottom: 1rem;
      margin-top: 0.25rem;
    }
