/* PHOENIX Academys — Login / Register UI */
.academy-login-btn {
  height: 44px;
  min-width: 98px;
  padding: 0 15px;
  border: 2px solid #0d1b34;
  border-radius: 9px;
  background: #fff;
  color: #0d1b34;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: .84rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: .2s ease;
  flex: 0 0 auto;
}
.academy-login-btn img { width: 20px; height: 20px; object-fit: contain; }
.academy-login-btn:hover,
.academy-login-btn.logged-in { border-color: #ff6500; color: #ff6500; box-shadow: 0 9px 22px rgba(255,101,0,.12); }
.academy-login-btn.logged-in img { filter: sepia(1) saturate(8) hue-rotate(345deg); }

.mobile-auth-link {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid #dbe3ee;
  border-radius: 10px;
  background: #f8fafc;
  color: #0d1b34;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Poppins', sans-serif;
  font-size: .92rem;
  font-weight: 800;
  cursor: pointer;
}
.mobile-auth-link img { width: 21px; height: 21px; }
.mobile-auth-link.logged-in { border-color: rgba(255,101,0,.35); color: #e85b00; background: rgba(255,101,0,.06); }

body.academy-auth-open { overflow: hidden !important; }
.academy-auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 20050;
  padding: 20px;
  background: rgba(3, 14, 32, .72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
}
.academy-auth-overlay.open { display: flex; animation: academyAuthFade .18s ease both; }
.academy-auth-modal {
  width: min(94vw, 475px);
  max-height: min(92vh, 760px);
  overflow-y: auto;
  position: relative;
  border: 1px solid rgba(255,101,0,.24);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 32px 90px rgba(0,0,0,.32);
  padding: 26px 28px 28px;
  color: #0b1830;
  scrollbar-width: thin;
}
.academy-auth-modal::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: linear-gradient(90deg, #ff6500, #ff8b24, #0a66c2);
}
.academy-auth-close {
  position: absolute;
  top: 13px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  background: #fff;
  color: #0d1b34;
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}
.academy-auth-close:hover { color: #ff6500; border-color: #ffb17d; }
.academy-auth-brand { display: flex; align-items: center; gap: 11px; padding-right: 45px; margin-bottom: 20px; }
.academy-auth-brand img { width: 50px; height: 50px; object-fit: contain; }
.academy-auth-brand strong { display: block; font-size: 1.06rem; font-weight: 900; color: #ff6500; line-height: 1.1; }
.academy-auth-brand strong span { color: #0b1830; }
.academy-auth-brand small { display: block; margin-top: 4px; color: #64748b; font-size: .69rem; font-weight: 700; }
.academy-auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; padding: 6px; margin-bottom: 22px; background: #f0f4f9; border-radius: 13px; }
.academy-auth-tabs[hidden] { display: none !important; }
.academy-auth-tabs button { min-height: 43px; border: 0; border-radius: 9px; background: transparent; color: #536176; font-family: inherit; font-size: .78rem; font-weight: 800; cursor: pointer; }
.academy-auth-tabs button.active { background: #fff; color: #ff6500; box-shadow: 0 6px 18px rgba(15,23,42,.08); }
.academy-auth-view { display: none; }
.academy-auth-view.active { display: block; animation: academyAuthSlide .2s ease both; }
.academy-auth-heading { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 19px; }
.academy-auth-icon { width: 43px; height: 43px; flex: 0 0 43px; border-radius: 12px; background: rgba(255,101,0,.09); display: grid; place-items: center; }
.academy-auth-icon img { width: 23px; height: 23px; object-fit: contain; }
.academy-auth-heading h2 { margin: 0; color: #07152d !important; font-size: 1.38rem; line-height: 1.18; font-weight: 900; }
.academy-auth-heading p { margin: 4px 0 0; color: #64748b !important; font-size: .72rem; line-height: 1.55; }
.academy-auth-field { display: block; margin-bottom: 14px; }
.academy-auth-field > span { display: block; margin-bottom: 7px; color: #26364f; font-size: .68rem; font-weight: 800; }
.academy-auth-input { min-height: 50px; border: 1.5px solid #dce4ee; border-radius: 12px; background: #f8fafc; display: flex; align-items: center; padding: 0 13px; transition: .2s ease; }
.academy-auth-input:focus-within { border-color: #ff6500; background: #fff; box-shadow: 0 0 0 4px rgba(255,101,0,.09); }
.academy-auth-input > img { width: 19px; height: 19px; margin-right: 10px; object-fit: contain; opacity: .72; }
.academy-auth-input input { width: 100%; height: 48px; min-width: 0; border: 0; outline: 0; background: transparent; color: #0b1830; font-family: inherit; font-size: .78rem; font-weight: 600; }
.academy-auth-input input::placeholder { color: #9aa7b8; font-weight: 500; }
.academy-password-toggle { border: 0; background: transparent; color: #ff6500; font-family: inherit; font-size: .63rem; font-weight: 800; padding: 8px 0 8px 8px; cursor: pointer; }
.academy-forgot-link { display: block; margin: -2px 0 15px auto; border: 0; background: transparent; color: #0a66c2; font-family: inherit; font-size: .68rem; font-weight: 800; cursor: pointer; }
.academy-auth-submit { width: 100%; min-height: 52px; border: 0; border-radius: 12px; padding: 0 20px; background: linear-gradient(135deg, #ff6500, #ff7a12); color: #fff; display: flex; align-items: center; justify-content: center; gap: 12px; font-family: inherit; font-size: .84rem; font-weight: 900; cursor: pointer; box-shadow: 0 14px 26px rgba(255,101,0,.22); transition: .2s ease; }
.academy-auth-submit:hover { transform: translateY(-1px); box-shadow: 0 18px 30px rgba(255,101,0,.28); }
.academy-auth-submit:disabled { opacity: .68; cursor: wait; transform: none; }
.academy-auth-submit.loading span:first-child::after { content: '...'; }
.academy-auth-switch { margin: 17px 0 0; text-align: center; color: #66758a !important; font-size: .69rem; }
.academy-auth-switch button { border: 0; background: transparent; color: #ff6500; font-family: inherit; font-weight: 900; cursor: pointer; }
.academy-account-avatar { width: 88px; height: 88px; margin: 8px auto 12px; border-radius: 50%; background: linear-gradient(145deg, #fff1e7, #eef5ff); display: grid; place-items: center; border: 5px solid #fff; box-shadow: 0 10px 30px rgba(8,18,36,.12); }
.academy-account-avatar img { width: 53px; height: 53px; object-fit: contain; }
.academy-account-welcome { text-align: center; color: #64748b; font-size: .82rem; margin-bottom: 20px; }
.academy-account-welcome strong { display: block; color: #07152d; font-size: 1.35rem; font-weight: 900; }
.academy-account-details { display: grid; gap: 10px; margin-bottom: 18px; }
.academy-account-details div { padding: 13px 15px; border: 1px solid #e2e8f0; border-radius: 12px; background: #f8fafc; }
.academy-account-details span { display: block; color: #77859a; font-size: .61rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.academy-account-details strong { display: block; margin-top: 3px; color: #0b1830; font-size: .8rem; overflow-wrap: anywhere; }
.academy-logout-btn { background: #0b1830; box-shadow: 0 13px 24px rgba(7,21,45,.18); }
.academy-logout-btn:hover { box-shadow: 0 16px 28px rgba(7,21,45,.24); }
.academy-auth-toast { position: fixed; left: 50%; bottom: 24px; z-index: 30000; max-width: min(90vw, 460px); padding: 13px 18px; border-radius: 12px; background: #fff; color: #0b1830; border: 1px solid #dce4ee; box-shadow: 0 16px 40px rgba(0,0,0,.18); font: 700 .74rem/1.5 'Poppins', sans-serif; text-align: center; opacity: 0; pointer-events: none; transform: translate(-50%, 30px); transition: .25s ease; }
.academy-auth-toast.show { opacity: 1; transform: translate(-50%, 0); }
.academy-auth-toast.success { border-color: #86efac; }
.academy-auth-toast.error { border-color: #fda4af; color: #be123c; }

@keyframes academyAuthFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes academyAuthSlide { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1320px) and (min-width: 1025px) {
  .academy-login-btn { min-width: 48px; width: 48px; padding: 0; }
  .academy-login-btn .auth-button-label { display: none; }
  .academy-nav-inner, .navbar .nav-inner { gap: 16px !important; }
}

@media (max-width: 1024px) {
  .academy-login-btn { margin-left: auto; }
}

@media (max-width: 768px) {
  .navbar .nav-inner,
  .academy-nav-inner {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto 44px !important;
    gap: 8px !important;
  }
  .academy-login-btn {
    width: auto;
    min-width: 88px;
    height: 43px;
    padding: 0 12px;
    margin: 0;
    font-size: .78rem;
    border-radius: 10px;
  }
  .academy-login-btn img { width: 19px; height: 19px; }
  .academy-login-btn.logged-in { min-width: 76px; max-width: 112px; }
  .academy-login-btn.logged-in .auth-button-label { max-width: 62px; overflow: hidden; text-overflow: ellipsis; }
  .academy-auth-overlay { padding: 9px; align-items: center; }
  .academy-auth-modal { width: 100%; max-height: 94dvh; padding: 22px 18px 23px; border-radius: 20px; }
  .academy-auth-brand img { width: 44px; height: 44px; }
  .academy-auth-heading h2 { font-size: 1.22rem; }
}

@media (max-width: 460px) {
  .navbar .nav-inner,
  .academy-nav-inner { padding-left: 9px !important; padding-right: 9px !important; grid-template-columns: minmax(0,1fr) 74px 42px !important; gap: 5px !important; }
  .academy-brand { gap: 6px !important; }
  .academy-brand .academy-nav-logo-img,
  .navbar .academy-nav-logo-img { width: 38px !important; height: 38px !important; min-width: 38px !important; }
  .academy-brand-title,
  .brand-logo-text { font-size: .73rem !important; }
  .academy-brand-copy small { font-size: .46rem !important; margin-top: 2px !important; }
  .academy-login-btn { width: 74px; min-width: 74px; padding: 0 7px; gap: 5px; font-size: .68rem; }
  .academy-login-btn img { width: 17px; height: 17px; }
  .hamburger { width: 42px !important; min-width: 42px !important; }
  .academy-auth-modal { padding-left: 15px; padding-right: 15px; }
  .academy-auth-brand strong { font-size: .96rem; }
}
