/* Zebrani Motors Login — Premium Desktop + Mobile UI
   UI-only stylesheet. Authentication and form behavior remain in PHP. */

.login-page {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(18px, 3.5vw, 48px);
  background:
    radial-gradient(circle at 12% 8%, rgba(219, 233, 255, .92) 0, transparent 34%),
    radial-gradient(circle at 92% 92%, rgba(222, 234, 255, .72) 0, transparent 30%),
    var(--page);
}

.login-shell {
  width: min(1160px, 100%);
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .96fr);
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(211, 224, 243, .95);
  border-radius: 26px;
  box-shadow: 0 28px 80px rgba(18, 47, 91, .13), 0 4px 14px rgba(18, 47, 91, .05);
}

.brand-panel {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  padding: clamp(34px, 5vw, 68px);
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(ellipse at 88% 12%, rgba(70, 145, 255, .42), transparent 37%),
    radial-gradient(ellipse at 10% 90%, rgba(12, 66, 145, .32), transparent 42%),
    linear-gradient(145deg, #123f8e 0%, #0b2857 58%, #071b3a 100%);
}

.brand-content {
  position: relative;
  z-index: 2;
  width: 100%;
}

.brand-decoration {
  position: absolute;
  z-index: 1;
  right: -118px;
  bottom: -178px;
  width: 430px;
  height: 430px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 50%;
  box-shadow:
    0 0 0 34px rgba(255, 255, 255, .025),
    0 0 0 76px rgba(255, 255, 255, .022),
    0 0 0 124px rgba(255, 255, 255, .018);
  pointer-events: none;
}

.brand-name {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: .17em;
  line-height: 1.15;
}

.brand-name span {
  display: block;
  margin-top: 5px;
  font-size: 10px;
  letter-spacing: .42em;
}

.eyebrow {
  margin: 34px 0 15px;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .17em;
}

.brand-eyebrow {
  color: #dceaff;
}

.eyebrow.blue {
  margin: 0 0 15px;
  color: var(--blue-600);
}

.brand-panel h1 {
  margin: 0;
  font-size: clamp(36px, 4.2vw, 56px);
  line-height: 1.06;
  letter-spacing: -.052em;
  font-weight: 850;
}

.brand-panel h1 span {
  color: #a9ccff;
}

.brand-copy {
  max-width: 390px;
  margin: 20px 0 0;
  color: #dce9ff;
  font-size: 15px;
  line-height: 1.75;
}

.brand-foot {
  margin: 58px 0 0;
  color: #c3d3ed;
  font-size: 12px;
  letter-spacing: .01em;
}

.form-panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: clamp(34px, 5vw, 66px) clamp(28px, 4.2vw, 62px) 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(229, 239, 255, .62), transparent 31%),
    #fff;
}

.form-card {
  width: min(430px, 100%);
  margin: auto 0;
}

.form-card h1,
.form-card h2 {
  margin: 0 0 9px;
  color: var(--ink);
  font-size: clamp(29px, 3vw, 37px);
  font-weight: 850;
  line-height: 1.12;
  letter-spacing: -.047em;
}

.muted {
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.form-card label {
  display: block;
  margin: 19px 0 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
}

.form-card input {
  width: 100%;
  min-width: 0;
  min-height: 51px;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.form-card input::placeholder {
  color: #8795aa;
  opacity: 1;
}

.form-card input:hover {
  border-color: #b8c9e2;
}

.form-card input:focus {
  border-color: var(--blue-600);
  outline: 0;
  box-shadow: 0 0 0 4px rgba(23, 107, 255, .12);
}

.password-field {
  position: relative;
  width: 100%;
}

.password-help {
  display: flex;
  justify-content: flex-end;
  margin-top: 9px;
}

.forgot-password-link {
  color: var(--blue-600);
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
  text-underline-offset: 3px;
}

.forgot-password-link:hover {
  color: #145bd8;
  text-decoration: underline;
}

.forgot-password-link:focus-visible,
.password-help-close:focus-visible {
  outline: 3px solid rgba(23, 107, 255, .25);
  outline-offset: 3px;
  border-radius: 4px;
}

.password-help-message {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #cbdcf5;
  border-left: 3px solid var(--blue-600);
  border-radius: 10px;
  background: #f4f8ff;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.55;
}

.password-help-message[hidden] {
  display: none;
}

.password-help-message strong {
  display: block;
  margin-bottom: 3px;
  font-size: 13px;
}

.password-help-message p {
  margin: 0;
  color: var(--muted);
}

.password-help-close {
  display: inline-block;
  margin: 8px 0 0;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--blue-600);
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.password-field input {
  padding-right: 56px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-height: 40px;
  margin: 0;
  padding: 9px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 9px;
  color: #64758e;
  background: transparent;
  cursor: pointer;
  transition: color .18s ease, background .18s ease;
}

.password-toggle:hover {
  color: var(--blue-600);
  background: rgba(23, 107, 255, .08);
}

.password-toggle:focus-visible,
.login-submit:focus-visible {
  outline: 3px solid rgba(23, 107, 255, .25);
  outline-offset: 3px;
}

.password-toggle .eye-icon {
  display: block;
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-toggle .eye-icon[hidden] {
  display: none;
}

.login-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 52px;
  margin: 25px 0 0;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(100deg, #176bff 0%, #2468e9 100%);
  box-shadow: 0 8px 18px rgba(23, 107, 255, .17);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.login-submit:hover {
  transform: translateY(-1px);
  background: linear-gradient(100deg, #145bd8 0%, #174db8 100%);
  box-shadow: 0 11px 22px rgba(23, 107, 255, .22);
}

.login-submit:active {
  transform: translateY(0);
}

.alert,
.notice {
  padding: 12px 14px;
  margin: 0 0 18px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.55;
}

.alert {
  color: var(--danger-text);
  background: var(--danger-bg);
}

.notice {
  color: var(--navy-900);
  background: var(--blue-100);
}

.login-security {
  margin-top: 22px;
  text-align: center;
}

.security-note {
  margin: 0;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
}

.security-note span {
  color: #16803c;
  font-size: 10px;
}

.security-subnote {
  margin: 5px 0 0;
  color: #8491a5;
  font-size: 11px;
  line-height: 1.5;
}

.corporate-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 7px 10px;
  width: 100%;
  padding-top: 18px;
  color: #8793a5;
  font-size: 10px;
  line-height: 1.55;
  text-align: center;
}

.footer-divider {
  color: #b0bdcf;
}

.setup-wrap {
  width: min(520px, 100%);
  padding: 28px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
}

/* Tablet: retain split identity but reduce the brand panel footprint. */
@media (max-width: 900px) and (min-width: 761px) {
  .login-page {
    padding: 22px;
  }

  .login-shell {
    min-height: 590px;
    grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  }

  .brand-panel {
    padding: 34px;
  }

  .brand-panel h1 {
    font-size: clamp(34px, 4.5vw, 44px);
  }

  .form-panel {
    padding: 34px 30px 18px;
  }
}

/* Mobile: compact brand header + dedicated single-column login panel. */
@media (max-width: 760px) {
  .login-page {
    display: block;
    min-height: 100vh;
    min-height: 100svh;
    padding: max(12px, env(safe-area-inset-top)) 12px max(14px, env(safe-area-inset-bottom));
    background:
      radial-gradient(circle at 50% 0%, rgba(218, 233, 255, .95), transparent 42%),
      var(--page);
  }

  .login-shell {
    width: min(100%, 520px);
    min-height: 0;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 18px 48px rgba(18, 47, 91, .12), 0 3px 10px rgba(18, 47, 91, .04);
  }

  .brand-panel {
    min-height: 0;
    display: block;
    padding: 22px 24px 20px;
  }

  .brand-name {
    font-size: 19px;
  }

  .brand-name span {
    font-size: 9px;
  }

  .brand-eyebrow {
    margin: 15px 0 0;
    font-size: 9px;
    letter-spacing: .15em;
  }

  .brand-panel h1,
  .brand-copy,
  .brand-foot {
    display: none;
  }

  .brand-decoration {
    right: -100px;
    bottom: -190px;
    width: 270px;
    height: 270px;
    opacity: .7;
  }

  .form-panel {
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    padding: 28px 24px 16px;
    background: #fff;
  }

  .form-card {
    width: 100%;
    margin: 0;
  }

  .form-card h1,
  .form-card h2 {
    font-size: clamp(27px, 7vw, 32px);
  }

  .muted {
    margin-bottom: 23px;
    font-size: 13px;
  }

  .form-card label {
    margin-top: 17px;
  }

  .form-card input {
    min-height: 52px;
    font-size: 16px; /* prevents iOS Safari focus zoom */
  }

  .password-toggle {
    width: 42px;
    height: 42px;
  }

  .login-submit {
    min-height: 53px;
    margin-top: 23px;
  }

  .login-security {
    margin-top: 19px;
  }

  .corporate-footer {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #edf1f7;
    font-size: 10px;
  }
}

/* Small phones: keep the form comfortable without horizontal scrolling. */
@media (max-width: 380px) {
  .login-page {
    padding-right: 9px;
    padding-left: 9px;
  }

  .login-shell {
    border-radius: 17px;
  }

  .brand-panel {
    padding: 19px 20px 17px;
  }

  .form-panel {
    padding: 24px 19px 14px;
  }

  .form-card h1,
  .form-card h2 {
    font-size: 27px;
  }

  .corporate-footer {
    gap: 4px 7px;
    font-size: 9px;
  }
}

/* Very short landscape viewports: avoid unnecessary vertical centering. */
@media (max-height: 560px) and (min-width: 761px) {
  .login-page {
    align-items: start;
  }

  .login-shell {
    min-height: 0;
  }

  .brand-panel,
  .form-panel {
    padding-top: 26px;
    padding-bottom: 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
