* {
  box-sizing: border-box;
}

:root {
  --page-bg: #f7f8fa;
  --card-bg: #ffffff;
  --text: #222;
  --muted: #777;
  --border: #d8dce2;
  --button: #1677ff;
  --button-hover: #0969e8;
  --shadow: 0 3px 18px rgba(0, 0, 0, 0.07);
}


/* =========================================================
   PAGE
   ========================================================= */

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--page-bg);
  color: var(--text);
}

body {
  min-height: 100vh;
}

body.modal-open {
  overflow: hidden;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px 62px;
  position: relative;
}


/* =========================================================
   MAIN CARD
   ========================================================= */

.auth-card {
  width: min(420px, 100%);
  min-height: 520px;
  background: var(--card-bg);
  border: 1px solid #e7e9ed;
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 42px 45px 30px;
  text-align: left;
}


/* =========================================================
   BRAND / LOGO
   ========================================================= */

.brand {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  margin-bottom: 0;
}

.academy-logo {
  display: block;
  width: auto;
  height: 60px;
  max-width: 155px;
  object-fit: contain;
  object-position: left center;
  margin-bottom: -8px;
}


/* =========================================================
   FORM AREA
   ========================================================= */

.form-area {
  min-height: 230px;
}

.step {
  display: none;
  opacity: 0;
  transform: translateX(8px);
}

.step.active {
  display: block;
  animation: stepIn 180ms ease forwards;
}

@keyframes stepIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}


/* =========================================================
   HEADINGS
   ========================================================= */

h1 {
  margin: 0 0 9px;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.2px;
}

.subtitle {
  margin: 0 0 25px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}


/* =========================================================
   SELECTED PROVIDER
   ========================================================= */

.selected-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: #555;
  font-size: 12px;
  font-weight: 600;
}

.selected-entry-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 22px;
}

.selected-entry-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}


/* =========================================================
   FORMS
   ========================================================= */

form {
  width: 100%;
}

input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: 4px;
  outline: none;
  padding: 0 13px;
  font-size: 14px;
  color: var(--text);
  background: #fff;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}

input:focus {
  border-color: #8dbaff;
  box-shadow:
    0 0 0 3px rgba(22, 119, 255, 0.09);
}

input::placeholder {
  color: #9a9da3;
}


/* =========================================================
   PRIMARY BUTTON
   ========================================================= */

.primary-btn {
  width: 100%;
  height: 46px;
  margin-top: 17px;
  border: 0;
  border-radius: 4px;
  background: var(--button);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 150ms ease,
    transform 80ms ease;
}

.primary-btn:hover {
  background: var(--button-hover);
}

.primary-btn:active {
  transform: translateY(1px);
}

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


/* =========================================================
   BACK BUTTON
   ========================================================= */

.back-btn {
  margin-top: 16px;
  border: 0;
  background: transparent;
  color: #777;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
}

.back-btn:hover {
  color: #222;
}


/* =========================================================
   LINK ENTRIES
   ========================================================= */

.link-entries {
  margin-top: 18px;
  width: 100%;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #555;
  font-size: 10px;
  letter-spacing: 1.2px;
  white-space: nowrap;
  font-weight: 700;
}

.divider::after {
  content: "";
  height: 1px;
  background: #eceef1;
  flex: 1;
}


/* =========================================================
   PROVIDER ICON ROW
   ========================================================= */

.entry-icons {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 18px;
  gap: 8px;
  flex-wrap: nowrap;
}

.entry-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  flex: 0 0 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e1e3e7;
  border-radius: 50%;
  background: #fff;
  color: #333;
  text-decoration: none;
  line-height: 1;
  transition:
    box-shadow 150ms ease,
    transform 150ms ease,
    border-color 150ms ease,
    background 150ms ease;
}

.entry-icon:hover {
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.10);
  transform: translateY(-1px);
  border-color: #d2d5da;
}

.entry-icon:active {
  transform: translateY(0);
}

.entry-icon svg {
  width: 23px;
  height: 23px;
  display: block;
}

.entry-icon:first-child svg {
  width: 22px;
  height: 22px;
}


/* =========================================================
   YAHOO
   ========================================================= */

.yahoo-mark {
  color: #720e9e;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.4px;
  line-height: 1;
}


/* =========================================================
   CONFIRMATION MODAL
   ========================================================= */

.confirmation-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 160ms ease,
    visibility 160ms ease;
}

.confirmation-modal.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 24, 30, 0.42);
}

.modal-box {
  position: relative;
  z-index: 2;
  width: min(360px, 100%);
  background: #fff;
  border-radius: 8px;
  padding: 34px 30px 30px;
  text-align: center;
  box-shadow:
    0 14px 45px rgba(0, 0, 0, 0.16);
  transform: translateY(8px) scale(0.98);
  transition:
    transform 160ms ease;
}

.confirmation-modal.active .modal-box {
  transform: translateY(0) scale(1);
}


/* =========================================================
   MODAL CHECK ICON
   ========================================================= */

.modal-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef6ff;
  color: #1677ff;
  font-size: 22px;
  font-weight: 600;
}


/* =========================================================
   MODAL HEADING
   ========================================================= */

.modal-box h2 {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.15px;
}


/* =========================================================
   MODAL MESSAGE
   ========================================================= */

.modal-box p {
  margin: 0 auto;
  max-width: 280px;
  color: #777;
  font-size: 14px;
  line-height: 1.55;
}


/* =========================================================
   MODAL BUTTON
   ========================================================= */

.modal-close {
  width: 100%;
  height: 44px;
  margin-top: 24px;
  border: 0;
  border-radius: 4px;
  background: var(--button);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 150ms ease,
    transform 80ms ease;
}

.modal-close:hover {
  background: var(--button-hover);
}

.modal-close:active {
  transform: translateY(1px);
}


/* =========================================================
   FOOTER
   ========================================================= */

.footer-note {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 21px;
  margin: 0;
  color: #a1a4a9;
  font-size: 11px;
  text-align: center;
}


/* =========================================================
   ACCESSIBILITY
   ========================================================= */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 480px) {
  .brand {
    margin-bottom: 6px;
  }

  .page-shell {
    align-items: flex-start;
    padding-top: 45px;
    padding-bottom: 70px;
  }

  .auth-card {
    min-height: 500px;
    padding: 35px 25px 25px;
  }

  .brand {
  margin-bottom: 0;
}

.academy-logo {
    height: 48px;
    max-width: 140px;
    margin-bottom: -8px;
  }


  /* Keep all seven icons on one line */

  .entry-icons {
    gap: 4px;
    justify-content: space-between;
    flex-wrap: nowrap;
  }

  .entry-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    flex: 0 0 36px;
  }

  .entry-icon svg {
    width: 21px;
    height: 21px;
  }

  .entry-icon:first-child svg {
    width: 20px;
    height: 20px;
  }

  .yahoo-mark {
    font-size: 13px;
  }


  /* Slightly smaller modal on narrow screens */

  .confirmation-modal {
    padding: 16px;
  }

  .modal-box {
    padding: 30px 24px 26px;
  }
}