body[data-page] {
  background: #f5f7fb;
  color: #1f2937;
}

.portal-header {
  min-height: 64px;
  box-shadow: 0 1px 0 rgba(31, 41, 55, 0.04);
}

.portal-shell-bar {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.portal-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #e5e7eb;
}

.portal-school-name {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  color: #111827;
}

.portal-school-subtitle {
  font-size: 0.78rem;
  color: #6b7280;
}

.portal-live-clock {
  min-width: 220px;
  text-align: right;
  font-size: 0.84rem;
  font-weight: 600;
  color: #374151;
}

.portal-nav-link {
  color: #4b5563;
  font-weight: 600;
  text-decoration: none;
}

.portal-nav-link.active {
  color: #066fd1;
}

.portal-nav-link.coming-soon {
  opacity: 0.45;
  pointer-events: none;
}

.portal-footer {
  margin-top: 3rem;
  padding: 1rem 0;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 0.875rem;
}

.portal-page {
  min-height: calc(100vh - 128px);
}

.portal-page-container {
  max-width: 960px;
}

.portal-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.portal-title-row h2 {
  margin: 0;
}

.portal-class-badge[hidden] {
  display: none !important;
}

.portal-entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.portal-entry-actions .btn {
  min-width: 220px;
}

.portal-steps-sticky {
  position: sticky;
  top: 72px;
  z-index: 10;
  padding: 0.75rem 0 0.5rem;
  background: linear-gradient(180deg, #f5f7fb 75%, rgba(245, 247, 251, 0));
}

.portal-steps-wrap {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
  padding: 1rem;
}

.steps .step-item {
  padding-top: 2rem;
}

.steps .step-item .step-label {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #4b5563;
}

.steps .step-item.step-complete::before {
  content: "\f26e";
  font-family: "bootstrap-icons";
  font-size: 0.85rem;
}

.steps .step-item.step-complete .step-label,
.steps .step-item.active .step-label {
  color: #111827;
}

.portal-step-panel[hidden],
.portal-entry-panel[hidden] {
  display: none !important;
}

.portal-form-card {
  border-radius: 1rem;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.portal-info-box {
  border-left: 4px solid #066fd1;
  background: rgba(6, 111, 209, 0.08);
  border-radius: 0.75rem;
  padding: 1rem 1rem 1rem 1.125rem;
}

.portal-doc-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.portal-doc-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  background: #fff;
}

.portal-doc-item i {
  font-size: 1.25rem;
  color: #066fd1;
}

.portal-step-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.portal-step-actions .portal-right-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-left: auto;
}

.portal-clear-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: #6b7280;
  text-decoration: none;
}

.portal-clear-link:hover {
  color: #066fd1;
}

.portal-field {
  margin-bottom: 1rem;
}

.portal-field .form-label {
  font-weight: 600;
  color: #374151;
}

.portal-field .form-control,
.portal-field .form-select {
  border-radius: 0.75rem;
}

.portal-field .invalid-feedback,
.portal-group-error {
  display: block;
  min-height: 1.25rem;
  margin-top: 0.35rem;
  color: #d63939;
  font-size: 0.78rem;
}

.portal-inline-pair {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 0.75rem;
}

.portal-photo-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 1rem;
  background: #f8fafc;
  min-height: 320px;
  padding: 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.portal-photo-dropzone.is-dragover {
  border-color: #066fd1;
  background: rgba(6, 111, 209, 0.06);
}

.portal-photo-preview {
  width: 144px;
  height: 180px;
  object-fit: cover;
  border-radius: 0.75rem;
  border: 1px solid #d1d5db;
  margin: 0 auto;
  background: #fff;
}

.portal-upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.portal-upload-card {
  border: 1px solid #e5e7eb;
  border-radius: 0.85rem;
  padding: 1rem;
  background: #fff;
  min-height: 168px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.portal-upload-card.is-uploaded {
  border-color: rgba(47, 179, 68, 0.5);
  background: rgba(47, 179, 68, 0.04);
}

.portal-upload-status {
  font-size: 0.82rem;
  font-weight: 700;
}

.portal-upload-status.pending {
  color: #6b7280;
}

.portal-upload-status.done {
  color: #2fb344;
}

.portal-review-section + .portal-review-section {
  margin-top: 1.5rem;
}

.portal-review-section h3 {
  font-size: 1rem;
  margin-bottom: 0.85rem;
}

.portal-review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1rem;
}

.portal-review-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid #e5e7eb;
}

.portal-review-row strong {
  color: #111827;
}

.portal-review-row span {
  text-align: right;
  color: #4b5563;
}

.portal-section-card {
  border-radius: 0.9rem;
  border: 1px solid #e5e7eb;
}

.portal-status-form-card,
.portal-status-result-card {
  border-radius: 1rem;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.portal-inline-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.portal-inline-filter .portal-filter-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.portal-filter-item .form-label {
  margin: 0;
  min-width: 100px;
  font-weight: 600;
}

.portal-status-alert i {
  font-size: 1rem;
}

.portal-upload-notes {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1rem;
}

@media (max-width: 767.98px) {
  .portal-shell-bar {
    flex-wrap: wrap;
    justify-content: center;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .portal-live-clock {
    min-width: 0;
    width: 100%;
    text-align: center;
  }

  .portal-title-row,
  .portal-step-actions,
  .portal-step-actions .portal-right-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .portal-doc-list,
  .portal-upload-grid,
  .portal-review-grid,
  .portal-inline-pair {
    grid-template-columns: 1fr;
  }

  .portal-steps-wrap {
    overflow-x: auto;
  }

  .steps {
    min-width: 720px;
  }

  .portal-step-actions .btn {
    width: 100%;
  }
}
