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

:root {
  --navy-950: #040b14;
  --navy-900: #07111f;
  --navy-850: #0a1727;
  --navy-800: #0d1b2d;
  --navy-700: #13263d;

  --white: #ffffff;
  --text: #edf4fb;
  --muted: #91a3b7;
  --muted-light: #b9c6d4;

  --green: #159447;
  --green-bright: #1fb95a;
  --green-dark: #0d6d34;

  --gold: #d9aa42;
  --gold-light: #f0cc70;

  --border: rgba(255, 255, 255, 0.09);
  --input-border: rgba(255, 255, 255, 0.12);

  --danger: #ff5f6d;
  --success: #36d477;
}

html {
  min-height: 100%;
  background: var(--navy-950);
}

body {
  min-height: 100vh;
  min-height: 100dvh;

  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif;

  color: var(--text);
  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(21, 148, 71, 0.13),
      transparent 34%
    ),
    radial-gradient(
      circle at 100% 100%,
      rgba(217, 170, 66, 0.06),
      transparent 30%
    ),
    var(--navy-950);

  -webkit-font-smoothing: antialiased;
}


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

.auth-page {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;

  display: flex;
  justify-content: center;
  align-items: center;

  padding: 28px 16px;
}


/* =========================================
   AUTH CARD
   ========================================= */

.auth-card {
  width: 100%;
  max-width: 460px;

  padding: 34px 28px 24px;

  background:
    linear-gradient(
      145deg,
      rgba(13, 27, 45, 0.98),
      rgba(7, 17, 31, 0.99)
    );

  border: 1px solid var(--border);
  border-radius: 22px;

  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);

  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: "";

  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;

  height: 2px;

  background:
    linear-gradient(
      90deg,
      transparent,
      var(--gold),
      var(--green),
      transparent
    );

  opacity: 0.8;
}


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

.brand-section {
  text-align: center;
  margin-bottom: 32px;
}

.badge-wrapper {
  width: 86px;
  height: 86px;

  margin: 0 auto 16px;

  display: flex;
  justify-content: center;
  align-items: center;

  border-radius: 50%;

  background:
    radial-gradient(
      circle,
      rgba(255, 255, 255, 0.07),
      rgba(255, 255, 255, 0.015)
    );

  border: 1px solid rgba(217, 170, 66, 0.35);

  box-shadow:
    0 0 0 5px rgba(217, 170, 66, 0.035),
    0 12px 32px rgba(0, 0, 0, 0.35);
}

.brand-badge {
  width: 72px;
  height: 72px;

  object-fit: contain;

  display: block;
}

.brand-section h1 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 1.7px;
  line-height: 1.25;

  color: var(--white);
}

.brand-tagline {
  margin-top: 8px;

  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2.6px;

  color: var(--gold-light);
}


/* =========================================
   AUTH VIEW
   ========================================= */

.auth-view {
  width: 100%;
}

.auth-view[hidden] {
  display: none;
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading h2 {
  font-size: 25px;
  line-height: 1.2;
  font-weight: 750;

  color: var(--white);
}

.section-heading p {
  margin-top: 9px;

  font-size: 14px;
  line-height: 1.6;

  color: var(--muted);
}


/* =========================================
   BACK ROW
   ========================================= */

.back-row {
  display: flex;
  align-items: center;
  gap: 9px;

  margin-bottom: 17px;

  color: var(--gold-light);

  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}

.back-button {
  width: 32px;
  height: 32px;

  border: 1px solid var(--border);
  border-radius: 9px;

  background: rgba(255, 255, 255, 0.035);
  color: var(--white);

  font-size: 18px;
  line-height: 1;

  cursor: pointer;

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.back-button:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(217, 170, 66, 0.35);
}

.back-button:active {
  transform: scale(0.95);
}


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

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;

  margin-bottom: 8px;

  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;

  color: var(--muted-light);
}

.input-box {
  width: 100%;
  min-height: 52px;

  display: flex;
  align-items: center;

  border: 1px solid var(--input-border);
  border-radius: 12px;

  background: rgba(4, 11, 20, 0.7);

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.input-box:focus-within {
  border-color: rgba(31, 185, 90, 0.8);

  background: rgba(4, 11, 20, 0.9);

  box-shadow:
    0 0 0 3px rgba(21, 148, 71, 0.11);
}

.input-icon {
  width: 46px;

  flex: 0 0 46px;

  display: flex;
  justify-content: center;
  align-items: center;

  color: var(--gold-light);

  font-size: 14px;
  font-weight: 800;
}

.input-box input {
  min-width: 0;
  flex: 1;

  height: 50px;

  border: 0;
  outline: 0;

  background: transparent;

  color: var(--white);

  font-family: inherit;
  font-size: 14px;
}

.input-box input::placeholder {
  color: #617286;
}

.input-box input:-webkit-autofill,
.input-box input:-webkit-autofill:hover,
.input-box input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--white);
  -webkit-box-shadow: 0 0 0 1000px var(--navy-900) inset;
  transition: background-color 9999s ease-in-out 0s;
}


/* =========================================
   PASSWORD TOGGLE
   ========================================= */

.password-toggle {
  flex: 0 0 auto;

  margin-right: 10px;
  padding: 7px 8px;

  border: 0;

  background: transparent;

  color: var(--green-bright);

  font-family: inherit;
  font-size: 11px;
  font-weight: 750;

  cursor: pointer;
}

.password-toggle:hover {
  color: var(--gold-light);
}


/* =========================================
   FIELD HINT
   ========================================= */

.field-hint {
  display: block;

  margin-top: 7px;

  font-size: 11px;
  line-height: 1.5;

  color: var(--muted);
}


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

.primary-button {
  width: 100%;
  min-height: 52px;

  margin-top: 5px;

  border: 0;
  border-radius: 12px;

  background:
    linear-gradient(
      135deg,
      var(--green-bright),
      var(--green-dark)
    );

  color: var(--white);

  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;

  cursor: pointer;

  box-shadow:
    0 10px 24px rgba(21, 148, 71, 0.2);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.primary-button:hover {
  filter: brightness(1.08);

  box-shadow:
    0 13px 30px rgba(21, 148, 71, 0.28);
}

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

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}


/* =========================================
   LOADER
   ========================================= */

.button-loader {
  display: none;

  align-items: center;
  justify-content: center;

  gap: 4px;
}

.button-loader span {
  width: 5px;
  height: 5px;

  border-radius: 50%;

  background: var(--white);

  animation: buttonPulse 1s infinite ease-in-out;
}

.button-loader span:nth-child(2) {
  animation-delay: 0.15s;
}

.button-loader span:nth-child(3) {
  animation-delay: 0.3s;
}

.primary-button.loading .button-text {
  display: none;
}

.primary-button.loading .button-loader {
  display: flex;
}

@keyframes buttonPulse {
  0%,
  80%,
  100% {
    opacity: 0.35;
    transform: scale(0.8);
  }

  40% {
    opacity: 1;
    transform: scale(1);
  }
}


/* =========================================
   MESSAGES
   ========================================= */

.form-message {
  display: none;

  margin: 0 0 14px;

  padding: 11px 12px;

  border-radius: 9px;

  font-size: 12px;
  line-height: 1.5;
}

.form-message.show {
  display: block;
}

.form-message.error {
  color: #ffb4bb;

  background: rgba(255, 95, 109, 0.08);

  border: 1px solid rgba(255, 95, 109, 0.2);
}

.form-message.success {
  color: #9af0b8;

  background: rgba(54, 212, 119, 0.08);

  border: 1px solid rgba(54, 212, 119, 0.2);
}


/* =========================================
   LINKS
   ========================================= */

.auth-links {
  display: flex;
  justify-content: center;

  margin-top: 17px;
}

.text-button {
  border: 0;
  background: transparent;

  color: var(--gold-light);

  font-family: inherit;
  font-size: 12px;
  font-weight: 700;

  cursor: pointer;

  transition: color 0.2s ease;
}

.text-button:hover {
  color: var(--white);
}

.register-prompt {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;

  gap: 5px;

  margin-top: 25px;

  font-size: 12px;
  color: var(--muted);
}

.register-prompt a {
  color: var(--green-bright);

  font-weight: 750;
  text-decoration: none;
}

.register-prompt a:hover {
  color: var(--gold-light);
}


/* =========================================
   SECURITY NOTE
   ========================================= */

.security-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;

  margin-top: 21px;
  padding: 13px;

  border: 1px solid rgba(217, 170, 66, 0.12);
  border-radius: 10px;

  background: rgba(217, 170, 66, 0.035);
}

.security-icon {
  width: 20px;
  height: 20px;

  flex: 0 0 20px;

  display: flex;
  justify-content: center;
  align-items: center;

  border-radius: 50%;

  background: rgba(54, 212, 119, 0.12);

  color: var(--success);

  font-size: 11px;
  font-weight: 800;
}

.security-note p {
  font-size: 11px;
  line-height: 1.55;

  color: var(--muted);
}


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

.auth-footer {
  margin-top: 30px;

  text-align: center;
}

.footer-line {
  width: 70px;
  height: 1px;

  margin: 0 auto 13px;

  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(217, 170, 66, 0.55),
      transparent
    );
}

.auth-footer p {
  font-size: 10px;
  color: #66798d;

  letter-spacing: 0.2px;
}

.auth-footer span {
  display: block;

  margin-top: 5px;

  font-size: 9px;
  color: #4e6073;
}


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

@media (max-width: 480px) {

  .auth-page {
    align-items: flex-start;

    padding:
      22px
      12px
      20px;
  }

  .auth-card {
    padding:
      28px
      18px
      20px;

    border-radius: 18px;
  }

  .brand-section {
    margin-bottom: 27px;
  }

  .badge-wrapper {
    width: 78px;
    height: 78px;
  }

  .brand-badge {
    width: 65px;
    height: 65px;
  }

  .brand-section h1 {
    font-size: 17px;
    letter-spacing: 1.3px;
  }

  .brand-tagline {
    font-size: 9px;
    letter-spacing: 2px;
  }

  .section-heading h2 {
    font-size: 23px;
  }

  .input-box {
    min-height: 50px;
  }

  .input-box input {
    height: 48px;
    font-size: 14px;
  }

  .primary-button {
    min-height: 50px;
  }
}


/* =========================================
   VERY SMALL PHONES
   ========================================= */

@media (max-width: 350px) {

  .auth-page {
    padding-left: 8px;
    padding-right: 8px;
  }

  .auth-card {
    padding-left: 15px;
    padding-right: 15px;
  }

  .brand-section h1 {
    font-size: 15px;
  }

  .section-heading h2 {
    font-size: 21px;
  }
}
