/* ═══════════════════════════════════════════
   PROVIDERE ACADEMY — APPLICATION PORTAL
   Self-contained stylesheet for application.html
   ═══════════════════════════════════════════ */

:root {
  --navy: #162035;
  --navy-deep: #0d1525;
  --gold: #9a8a5a;
  --gold-lt: #c8b87a;
  --gold-pale: #f0ead8;
  --cream: #faf9f5;
  --white: #ffffff;
  --grey: #6b7280;
  --border: #e2ddd5;
  --success: #2f7d5c;
  --success-bg: #e8f3ee;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: "Outfit", sans-serif;
  background: var(--cream);
  color: var(--navy);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ═══ TOP BAR ═══ */
.portal-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.portal-topbar-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0.9rem clamp(1rem, 4vw, 1.75rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.portal-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}
.portal-brand img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}
.portal-brand-txt {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.portal-brand-txt strong {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
}
.portal-brand-txt em {
  font-style: normal;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-lt);
}
.portal-exit {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  white-space: nowrap;
}
.portal-exit:hover {
  color: var(--white);
  border-color: var(--gold-lt);
  background: rgba(255, 255, 255, 0.05);
}

/* ═══ STEPPER — the golden thread ═══ */
.portal-stepper-wrap {
  background: var(--navy);
  padding: 0 0 1.1rem;
  border-bottom: 1px solid var(--border);
}
.portal-stepper {
  list-style: none;
  margin: 0;
  padding: 0.4rem clamp(1rem, 4vw, 1.75rem) 0.6rem;
  max-width: 900px;
  margin-inline: auto;
  display: flex;
  justify-content: space-between;
  gap: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.portal-stepper::-webkit-scrollbar {
  display: none;
}
.ps-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  flex: 1 1 0;
  min-width: 58px;
}
.ps-node {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  font-weight: 700;
  background: var(--navy);
  transition: background 0.25s, border-color 0.25s, color 0.25s, transform 0.25s;
  flex-shrink: 0;
}
.ps-label {
  font-size: 0.63rem;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  white-space: nowrap;
  transition: color 0.25s;
}
.ps-item.done .ps-node {
  background: var(--gold);
  border-color: var(--gold);
  color: transparent;
  font-size: 0;
  position: relative;
}
.ps-item.done .ps-node::after {
  content: "✓";
  font-size: 0.8rem;
  color: var(--navy);
}
.ps-item.current .ps-node {
  border-color: var(--gold-lt);
  color: var(--white);
  transform: scale(1.12);
  box-shadow: 0 0 0 4px rgba(200, 184, 122, 0.18);
}
.ps-item.current .ps-label {
  color: var(--gold-lt);
  font-weight: 600;
}
.ps-item.done .ps-label {
  color: rgba(255, 255, 255, 0.62);
}
.portal-stepper-track {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 1.75rem);
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  position: relative;
}
.portal-stepper-fill {
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-lt));
  border-radius: 2px;
  width: 0%;
  transition: width 0.35s ease;
}

/* ═══ MAIN / SHELL ═══ */
.portal-main {
  flex: 1;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 4vw, 1.75rem) 2rem;
}
.portal-shell {
  max-width: 720px;
  margin: 0 auto;
}
.portal-step-caption {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.4rem, 3.4vw, 1.85rem);
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 1.25rem;
}

/* ═══ CARD ═══ */
.portal-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(22, 32, 53, 0.04), 0 18px 40px -20px rgba(22, 32, 53, 0.14);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.app-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.6rem;
  margin-bottom: 1.1rem;
}
.app-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 560px) {
  .app-row2 {
    grid-template-columns: 1fr;
  }
}
.app-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
}
.app-field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy);
}
.app-field label span {
  color: var(--gold);
}
.app-field input,
.app-field select,
.app-field textarea {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.68rem 0.85rem;
  font-size: 0.88rem;
  font-family: inherit;
  color: var(--navy);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.app-field input:hover,
.app-field select:hover,
.app-field textarea:hover {
  border-color: #c9c2b3;
}
.app-field input:focus,
.app-field select:focus,
.app-field textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(154, 138, 90, 0.14);
}
.app-field textarea {
  resize: vertical;
}
.app-step-hint {
  font-size: 0.78rem;
  color: var(--grey);
  line-height: 1.6;
  margin: -0.35rem 0 1.1rem;
}

/* Add-parent toggle */
.app-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: 1px dashed var(--gold);
  color: var(--gold);
  font-weight: 600;
  font-size: 0.8rem;
  border-radius: 8px;
  padding: 0.6rem 1rem;
  cursor: pointer;
  margin-top: 0.4rem;
  transition: background 0.2s, color 0.2s;
  font-family: inherit;
}
.app-toggle-btn:hover {
  background: var(--gold-pale);
}

/* Document checklist */
.app-doc-col-title {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.6rem;
}
.app-doc-group {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem 1rem;
}
@media (min-width: 540px) {
  .app-doc-group {
    grid-template-columns: 1fr 1fr;
  }
}
.app-doc-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.82rem;
  color: var(--navy);
  line-height: 1.5;
  cursor: pointer;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  transition: border-color 0.2s, background 0.2s;
}
.app-doc-item:hover {
  border-color: var(--gold-lt);
  background: var(--gold-pale);
}
.app-doc-item input[type="checkbox"] {
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--gold);
}

/* Document upload widgets */
.app-doc-upload {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 0.9rem;
  transition: border-color 0.2s, background 0.2s;
}
.app-doc-upload:focus-within,
.app-doc-upload:hover {
  border-color: var(--gold-lt);
  background: var(--gold-pale);
}
.app-doc-upload label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.5rem;
}
.app-doc-upload label span {
  color: var(--gold);
}
.app-doc-upload input[type="file"] {
  width: 100%;
  font-size: 0.76rem;
  font-family: inherit;
  color: var(--navy);
}
.app-doc-upload input[type="file"]::file-selector-button {
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--white);
  background: var(--navy);
  border: none;
  border-radius: 6px;
  padding: 0.45rem 0.85rem;
  margin-right: 0.7rem;
  cursor: pointer;
  transition: background 0.2s;
}
.app-doc-upload input[type="file"]::file-selector-button:hover {
  background: var(--navy-deep);
}
.app-doc-status {
  font-size: 0.72rem;
  color: var(--grey);
  margin: 0.45rem 0 0;
}
.app-doc-status.is-ok {
  color: var(--success);
  font-weight: 600;
}
.app-doc-status.is-error {
  color: #b3432b;
  font-weight: 600;
}

/* Application number badge on success screen */
.portal-appnum {
  background: var(--gold-pale);
  border: 1px solid var(--gold-lt);
  border-radius: 12px;
  padding: 1.1rem 1.4rem;
  margin: 1.25rem auto;
  max-width: 360px;
  text-align: center;
}
.portal-appnum span {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.portal-appnum strong {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.6rem;
  color: var(--navy);
  letter-spacing: 0.02em;
}
.portal-appnum em {
  display: block;
  font-style: normal;
  font-size: 0.72rem;
  color: var(--grey);
  margin-top: 0.5rem;
  line-height: 1.5;
}

/* Submission overlay */
.portal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 21, 37, 0.6);
  backdrop-filter: blur(2px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
.portal-overlay-card {
  background: var(--white);
  border-radius: 14px;
  padding: 2.25rem 2.5rem;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
  max-width: 320px;
}
.portal-overlay-card p {
  margin: 1rem 0 0;
  font-size: 0.85rem;
  color: var(--navy);
  font-weight: 600;
}
.portal-spinner {
  width: 38px;
  height: 38px;
  border: 3px solid var(--gold-pale);
  border-top-color: var(--gold);
  border-radius: 50%;
  margin: 0 auto;
  animation: portal-spin 0.8s linear infinite;
}
@keyframes portal-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Declaration */
.app-consent {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.82rem;
  color: var(--navy);
  line-height: 1.6;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.75rem;
}
.app-consent input[type="checkbox"] {
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--gold);
}
.app-consent span {
  color: var(--gold);
}
.app-note {
  font-size: 0.78rem;
  color: var(--grey);
  margin-top: 1rem;
  line-height: 1.6;
}

/* Review summary (step 8) */
.portal-review {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-bottom: 1.5rem;
}
.pr-group {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.pr-group summary {
  cursor: pointer;
  list-style: none;
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--navy);
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pr-group summary::-webkit-details-marker {
  display: none;
}
.pr-group summary::after {
  content: "＋";
  color: var(--gold);
  font-weight: 400;
}
.pr-group[open] summary::after {
  content: "－";
}
.pr-rows {
  padding: 0.25rem 1rem 0.9rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem 1.2rem;
}
@media (max-width: 540px) {
  .pr-rows {
    grid-template-columns: 1fr;
  }
}
.pr-row {
  font-size: 0.79rem;
  padding: 0.3rem 0;
  border-bottom: 1px dashed var(--border);
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}
.pr-row span:first-child {
  color: var(--grey);
}
.pr-row span:last-child {
  color: var(--navy);
  font-weight: 500;
  text-align: right;
}

/* ═══ BUTTONS ═══ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.7rem;
  font-family: "Outfit", sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.btn:active {
  transform: translateY(0) !important;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.15);
}
.btn-gold {
  background: var(--gold);
  color: var(--white);
}
.btn-gold:hover {
  background: #8a7b4e;
}
.btn-navy {
  background: var(--navy);
  color: var(--white);
}
.btn-navy:hover {
  background: var(--navy-deep);
}
.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: none;
  transform: none;
}

.portal-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
}
.portal-next,
.portal-submit {
  margin-left: auto;
}
@media (max-width: 480px) {
  .portal-nav {
    flex-wrap: wrap;
  }
  .portal-back,
  .portal-next,
  .portal-submit {
    flex: 1 1 auto;
  }
}

/* ═══ SUCCESS STATE ═══ */
.portal-success {
  text-align: center;
  padding: clamp(2.5rem, 6vw, 3.5rem) clamp(1.5rem, 5vw, 2.5rem);
}
.portal-success-ico {
  width: 60px;
  height: 60px;
  background: var(--success-bg);
  color: var(--success);
  border-radius: 50%;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.4rem;
}
.portal-success h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.7rem;
  color: var(--navy);
  margin: 0 0 0.85rem;
}
.portal-success p {
  color: var(--grey);
  font-size: 0.9rem;
  line-height: 1.75;
  max-width: 480px;
  margin: 0 auto 0.75rem;
}
.portal-success-sub {
  font-size: 0.82rem !important;
}
.portal-success .btn {
  margin-top: 1.5rem;
}

/* ═══ FOOTER ═══ */
.portal-footer {
  text-align: center;
  padding: 1.75rem 1rem 2.25rem;
  font-size: 0.74rem;
  color: var(--grey);
  line-height: 1.8;
}
.portal-footer a {
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
}
.portal-footer a:hover {
  color: var(--gold);
}
