:root {
  --page-bg: #171717;
  --brand-navy: #083d71;
  --brand-navy-deep: #062f59;
  --brand-gold: #e2b33a;
  --surface: #ffffff;
  --text-primary: #1f2937;
  --text-secondary: #8b8f98;
  --line: #d9dde4;
  --success-bg: #eefaf1;
  --success-text: #19743a;
  --error-bg: #fff1f1;
  --error-text: #b42318;
  --shadow-shell: 0 26px 70px rgba(0, 0, 0, 0.5);
  --shadow-pill: 0 14px 28px rgba(8, 61, 113, 0.32);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  font-family: "Poppins", sans-serif;
  background:
    radial-gradient(
      circle at top,
      rgba(255, 255, 255, 0.9) 0%,
      rgba(255, 255, 255, 0) 34%
    ),
    linear-gradient(180deg, #f3f6fb 0%, #e8eef7 52%, #dde6f0 100%);
  color: var(--text-primary);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      130deg,
      rgba(255, 255, 255, 0.45) 0%,
      rgba(255, 255, 255, 0) 16%
    ),
    linear-gradient(
      310deg,
      rgba(255, 255, 255, 0.3) 0%,
      rgba(255, 255, 255, 0) 22%
    );
}

main.auth-shell,
main {
  width: min(920px, calc(100vw - 48px));
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  overflow: hidden;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-shell);
  position: relative;
}

.auth-panel {
  position: relative;
}

.auth-panel--brand {
  padding: 64px 54px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f4b8e 0%, #0b4a8e 44%, #093d74 100%);
  overflow: visible;
}

.auth-panel--brand::before {
  content: "";
  position: absolute;
  inset: -24% auto -16% 16%;
  width: 36%;
  background: rgba(255, 255, 255, 0.11);
  transform: skewX(-24deg);
}

.auth-panel--brand::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0) 46%
  );
  pointer-events: none;
}

.brand-content {
  position: relative;
  z-index: 1;
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

.brand-organization {
  color: #dbe7f8;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 12px;
}

.brand-logo {
  width: 150px;
  height: auto;
  object-fit: contain;
}

.brand-title {
  font-size: 38px;
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #ffffff;
}

.brand-title .brand-accent {
  color: #e33f3f;
  font-family: Garamond, serif;
}

.brand-subtitle {
  font-size: 16px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.94);
}

.brand-tagline {
  margin-top: 10px;
  font-size: 18px;
  font-style: italic;
  font-weight: 600;
  color: var(--brand-gold);
}

.auth-pill {
  position: absolute;
  left: 100%;
  right: auto;
  top: 50%;
  transform: translate(-75%, -50%);
  z-index: 2;
  padding: 16px 28px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--brand-navy-deep);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.8px;
  border: 4px solid #0b4a8e;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.22);
}

.auth-panel--form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 52px;
  background: #ffffff;
}

.auth-panel--solo {
  width: 100%;
}

.form-card-header {
  display: flex;
  justify-content: center;
  margin-bottom: 26px;
}

.form-logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.auth-form {
  width: 100%;
}

.form-group {
  position: relative;
  margin-bottom: 24px;
}
.has-icon {
    position: relative;
}

.has-icon input {
    width: 100%;
    padding: 12px 45px 12px 42px; /* left icon + right eye */
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
}

.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #888;
    display: flex;
    align-items: center;
}

.toggle-password:hover {
    color: #333;
}
.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;
}

.form-group.has-icon input {
  padding-left: 44px;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: #8d8d8d;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: color 0.2s ease;
}

.form-group input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fdfdfd;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 15px;
  outline: none;
  box-shadow: none;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input::placeholder {
  color: #a7a7a7;
}

.form-group input:focus {
  border-color: var(--brand-navy);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(8, 61, 113, 0.1);
}

.form-group:focus-within .input-icon {
  color: var(--brand-navy);
}

/* Custom Autofill Styling */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 30px #ffffff inset !important;
  -webkit-text-fill-color: var(--text-primary) !important;
  transition: background-color 5000s ease-in-out 0s;
}



.forgot-password {
  margin: 0 0 26px;
}

.forgot-password a {
  color: #8a8a8a;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.forgot-password a:hover {
  color: var(--brand-navy);
  text-decoration: underline;
}

.btn-signin {
  width: 100%;
  padding: 16px 24px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(180deg, #0d4a85 0%, #083d71 100%);
  color: #ffffff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1.15px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: var(--shadow-pill);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease;
}

.btn-signin:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
  box-shadow: 0 16px 32px rgba(8, 61, 113, 0.36);
}

.btn-signin:active {
  transform: translateY(0);
}

.divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  color: #9ca3af;
  font-size: 13px;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 14px;
  border: 1px solid #d7dce4;
  border-radius: 999px;
  background: #ffffff;
  color: #202124;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.btn-google:hover {
  background: #f8f9fb;
  border-color: #cfd5de;
  transform: translateY(-1px);
}

.error,
.success {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.45;
}

.error {
  background: var(--error-bg);
  color: var(--error-text);
  border-left: 4px solid #ef4444;
}

.success {
  background: var(--success-bg);
  color: var(--success-text);
  border-left: 4px solid #2f9e44;
}

.signup-link {
  text-align: center;
  color: #ffffff;
  font-size: 14px;
}

.signup-link a {
  color: #4ea0ff;
  text-decoration: underline;
  font-weight: 500;
}

button.is-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.82;
}

button.is-loading::after {
  content: "";
  width: 14px;
  height: 14px;
  display: inline-block;
  margin-left: 8px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #ffffff;
  border-radius: 50%;
  vertical-align: middle;
  animation: buttonSpin 0.7s linear infinite;
}

@keyframes buttonSpin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.logo {
  display: flex;
  align-items: center;
  gap: 20px;
}

.auth-shell--compact {
  grid-template-columns: 1fr;
  width: min(520px, calc(100vw - 32px));
  min-height: auto;
}

.auth-shell--compact .auth-panel--brand {
  display: none;
}

.auth-shell--compact .auth-panel--form {
  padding: 44px 40px;
}

.page-title {
  margin-bottom: 10px;
  color: var(--text-primary);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.page-subtitle {
  margin-bottom: 20px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.page-links {
  margin-top: 16px;
  text-align: center;
}

.page-links a {
  color: var(--brand-navy);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.page-links a:hover {
  text-decoration: underline;
}

.form-title,
.form-subtitle {
  display: none;
}

/* Animations */
@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

main.auth-shell {
  animation: floatIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Responsive Styles */
@media (max-width: 920px) {
  body {
    padding: 24px 16px;
  }

  main.auth-shell:not(.auth-shell--compact) {
    width: min(840px, calc(100vw - 32px));
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  }

  main.auth-shell--compact {
    width: min(520px, calc(100vw - 32px));
    grid-template-columns: 1fr;
  }

  .auth-panel--brand {
    padding: 48px 36px;
  }

  .auth-panel--brand::before {
    inset: -30% auto -20% 10%;
    width: 40%;
  }

  .brand-title {
    font-size: 32px;
  }

  .brand-tagline {
    font-size: 16px;
  }

  .auth-pill {
    padding: 12px 22px;
    font-size: 13px;
  }

  .auth-panel--form {
    padding: 48px 36px;
  }


}

@media (max-width: 768px) {
  main.auth-shell:not(.auth-shell--compact) {
    width: min(480px, calc(100vw - 32px));
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .auth-panel--brand {
    display: none;
  }

  .auth-pill {
    display: none;
  }

  .form-card-header {
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
  }

  .form-title {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: var(--brand-navy);
    text-align: center;
    margin-top: 8px;
  }

  .form-title .brand-accent {
    color: #e33f3f;
    font-family: Garamond, serif;
  }

  .form-subtitle {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
  }

  .auth-panel--form {
    padding: 44px 32px;
  }


}

@media (max-width: 560px) {
  body {
    padding: 16px 12px;
  }

  main.auth-shell:not(.auth-shell--compact) {
    width: calc(100vw - 24px);
    border-radius: 20px;
  }

  .auth-panel--form {
    padding: 32px 20px;
  }

  .form-title {
    font-size: 20px;
  }

  .form-subtitle {
    font-size: 12px;
  }


}

/* Footer layout */
footer {
  position: relative;
  display: block;
  width: fit-content;
  max-width: calc(100vw - 32px);
  margin: -15px auto 0;
  padding: 10px 24px;
  text-align: center;
  color: #5b6470;
  background: #f4f6f9;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  font-size: 14px;
  z-index: 10;
}

footer a {
  color: #0056ab;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

footer a:hover {
  color: var(--brand-navy-deep);
  text-decoration: underline;
}
