@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap");

:root {
  --brand-bg: #0b2f8a;
  --brand-orange: #f78a1d;
  --brand-orange-hot: #ff9a2e;
  --pill-bg: rgba(255, 255, 255, 0.94);
  --pill-bg-focus: #ffffff;
  --text-muted: #7a8499;
  --text-body: #1e293b;
  --text-on-art: #ffffff;
  --btn-blue: #1a5fd4;
  --btn-blue-hover: #154db0;
  --btn-blue-shadow: rgba(10, 40, 120, 0.45);
  --icon-circle: #ffffff;
  --icon-color: #4b5568;
  --card-radius: 28px;
  --sheet-max: 420px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body.auth-page {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: "Poppins", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--brand-bg);
  background-image: url("ZSMM.png");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  background-attachment: fixed;
  overflow-x: hidden;
  color: var(--text-body);
}

/* Light veil — image stays visible end-to-end */
body.auth-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(5, 22, 70, 0.22) 0%,
      rgba(5, 22, 70, 0.05) 35%,
      rgba(5, 22, 70, 0.18) 70%,
      rgba(5, 22, 70, 0.42) 100%
    );
  pointer-events: none;
  z-index: 0;
}

body.auth-page::after {
  content: none;
}

.auth-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: var(--sheet-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: 0 1rem 0;
}

/* -- Header (logo + tabs on blue) -- */
.auth-header {
  flex-shrink: 0;
  text-align: center;
  padding: 2rem 1.25rem 0;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.35rem;
}

.brand-logo-img {
  width: 200px;
  max-width: 58vw;
  height: auto;
  display: block;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.35));
}

.auth-tabs {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 3.5rem;
  position: relative;
  padding-bottom: 0;
}

.auth-tab {
  color: rgba(255, 255, 255, 0.62);
  font-size: 1.15rem;
  font-weight: 500;
  text-decoration: none;
  line-height: 1.2;
  padding: 0 0.15rem 14px;
  position: relative;
  z-index: 3;
  transition: color 0.15s ease;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.auth-tab:hover {
  color: rgba(255, 255, 255, 0.88);
}

.auth-tab.active {
  color: #ffffff;
  font-weight: 700;
}

/* Brand orange underline under active tab */
.auth-tab.active::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 6px;
  transform: translateX(-50%);
  width: 42px;
  height: 3px;
  background: var(--brand-orange);
  border-radius: 3px;
  z-index: 4;
  box-shadow: 0 0 10px rgba(247, 138, 29, 0.55);
}

/* Soft notch over glass card */
.auth-tab.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1px;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 11px solid rgba(255, 255, 255, 0.22);
  z-index: 4;
  pointer-events: none;
}

/* -- Glass form over brand art -- */
.auth-card {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-bottom: none;
  border-radius: var(--card-radius) var(--card-radius) 0 0;
  padding: 1.75rem 1.5rem 1.25rem;
  margin-top: 0.35rem;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 -4px 28px rgba(4, 18, 60, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  min-height: 0;
}

.auth-card > form {
  flex: 0 0 auto;
}

.auth-footer {
  flex-shrink: 0;
  margin-top: 0.85rem;
  padding: 0.15rem 0 0.35rem;
}

/* -- Input pills (solid for readable text over art) -- */
.input-pill {
  display: flex;
  align-items: center;
  gap: 0;
  position: relative;
  background: var(--pill-bg);
  border-radius: 999px;
  padding: 0.24rem 0.5rem 0.24rem 0.26rem;
  margin-bottom: 0.85rem;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 5px 16px rgba(4, 18, 60, 0.17);
  transition: background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.input-pill:focus-within {
  background: var(--pill-bg-focus);
  border-color: var(--brand-orange);
  box-shadow:
    0 0 0 2px rgba(247, 138, 29, 0.35),
    0 7px 18px rgba(4, 18, 60, 0.2);
}

.input-pill .pill-icon {
  width: 2.35rem;
  height: 2.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--icon-circle);
  border-radius: 50%;
  color: var(--icon-color);
  font-size: 1.08rem;
  flex-shrink: 0;
  box-shadow: 0 2px 7px rgba(30, 50, 90, 0.11);
}

.input-pill .pill-icon i {
  line-height: 1;
  display: block;
}

.input-pill .prefix {
  color: #6b7280;
  font-weight: 500;
  font-size: 0.92rem;
  margin: 0 0.12rem 0 0.5rem;
  flex-shrink: 0;
  letter-spacing: 0.01em;
}

.input-pill input {
  border: none !important;
  background: transparent !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 0.55rem 0.35rem;
  flex: 1 1 0%;
  width: auto;
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--text-body);
  min-width: 0;
  border-radius: 0 !important;
}

.input-pill:has(.toggle-eye) input {
  padding-right: 2.6rem;
}

.input-pill input:focus {
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
}

.input-pill input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.input-pill .toggle-eye {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 2.4rem;
  height: 2.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8b93a7;
  background: none;
  border: none;
  flex-shrink: 0;
  cursor: pointer;
  border-radius: 50%;
  font-size: 1.08rem;
  padding: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s ease, background 0.15s ease;
}

.input-pill .toggle-eye:hover {
  color: #5c6478;
  background: rgba(255, 255, 255, 0.65);
}

.input-pill .toggle-eye i {
  line-height: 1;
  pointer-events: none;
}

/* -- Remember checkbox -- */
.form-check-remember {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.15rem 0 1.2rem 0.2rem;
}

.form-check-remember input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 1.15rem;
  height: 1.15rem;
  border: 2px solid rgba(255, 255, 255, 0.75);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.form-check-remember input[type="checkbox"]:checked {
  background: var(--brand-orange);
  border-color: var(--brand-orange);
}

.form-check-remember input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 3.5px;
  top: 0.5px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.form-check-remember label {
  color: var(--text-on-art);
  font-size: 0.88rem;
  font-weight: 500;
  margin: 0;
  cursor: pointer;
  user-select: none;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

/* -- Buttons -- */
.btn-brand {
  width: 100%;
  background: var(--brand-orange) !important;
  border: none !important;
  color: #fff !important;
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  padding: 0.72rem 1rem;
  min-height: 48px;
  border-radius: 999px !important;
  box-shadow: 0 8px 20px rgba(247, 138, 29, 0.4) !important;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.btn-brand:hover,
.btn-brand:active {
  background: var(--brand-orange-hot) !important;
  color: #fff;
}

.btn-brand:active {
  transform: scale(0.985);
}

.btn-outline-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: rgba(255, 255, 255, 0.16);
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  color: #ffffff;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.7rem 0.85rem;
  min-height: 48px;
  border-radius: 999px;
  margin-top: 0.75rem;
  margin-bottom: 0;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-outline-pill:hover {
  background: rgba(255, 255, 255, 0.28);
  border-color: #ffffff;
  color: #ffffff;
}

/* -- Footer over art -- */
.footer-links {
  text-align: center;
  margin-top: 0;
}

.footer-links a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

.footer-links a:hover {
  color: var(--brand-orange-hot);
  text-decoration: underline;
}

.footer-lang {
  text-align: center;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.8rem;
  margin-top: 0.45rem;
  padding-bottom: 0;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.footer-lang a {
  color: var(--brand-orange-hot);
  text-decoration: none;
  font-weight: 700;
  margin-left: 0.15rem;
}

.footer-lang a:hover {
  text-decoration: underline;
}

@media (max-width: 380px) {
  .auth-wrapper {
    padding: 0 0.75rem 0;
  }

  .auth-tabs {
    gap: 2.6rem;
  }

  .auth-tab {
    font-size: 1.05rem;
  }

  .brand-logo-img {
    width: 170px;
  }

  .auth-card {
    padding: 1.5rem 1.5rem 1.15rem;
  }

  .input-pill {
    min-height: 46px;
  }

  .input-pill .pill-icon {
    width: 2.2rem;
    height: 2.2rem;
    font-size: 1rem;
  }
}

/* Avoid fixed-bg jank on phones */
@media (max-width: 768px) {
  body.auth-page {
    background-attachment: scroll;
    background-position: center 18%;
  }
}
