/* =========================================================
   ASSETVISION LOGIN
   Paleta:
   Navy: rgb(2, 25, 68)
   Teal: rgb(0, 110, 137)
   Blue: rgb(1, 55, 91)
   ========================================================= */

:root {
  --navy: #071f34;
  --navy-2: #0a2b44;
  --teal: #008f8c;
  --teal-dark: #007675;
  --ink: #0b1f35;
  --muted: #667180;
  --line: #e1e7ec;
  --surface: #fff;
  --page: #f6f8fa;
  --av-navy: var(--navy);
  --av-teal: var(--teal);
  --av-blue: var(--navy-2);
  --av-white: var(--surface);
  --av-background: var(--page);
  --av-text: var(--ink);
  --av-muted: var(--muted);
  --av-border: var(--line);
  --av-error: #ba1a1a;
  --av-shadow: 0 22px 60px rgba(2, 25, 68, 0.15);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  color: var(--av-text);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background: var(--av-background);
}

button,
input {
  font: inherit;
}

.login-page {
  position: relative;
  display: flex;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 12%, rgba(0, 110, 137, 0.08), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #f7fafe 56%, #edf4fb 100%);
}

.login-wrapper {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: clamp(1rem, 3vh, 2.5rem);
  padding-bottom: clamp(1rem, 3vh, 2.5rem);
}

.brand-header {
  margin-bottom: clamp(1rem, 2.5vh, 2rem);
}

.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand:hover,
.brand:focus {
  color: inherit;
}

.brand-logo {
  display: block;
  width: min(310px, 72vw);
  max-height: clamp(48px, 8vh, 82px);
  height: auto;
}

.brand-symbol {
  position: relative;
  display: block;
  width: 92px;
  height: 58px;
  margin-bottom: 0.65rem;
}

.brand-symbol-left,
.brand-symbol-right {
  position: absolute;
  display: block;
  width: 58px;
  height: 20px;
  border-radius: 4px;
  transform: skewX(-28deg);
}

.brand-symbol-left {
  top: 19px;
  left: 4px;
  background: linear-gradient(135deg, var(--av-blue), var(--av-navy));
  transform: rotate(-60deg) skewX(-15deg);
}

.brand-symbol-right {
  top: 18px;
  right: 2px;
  background: linear-gradient(135deg, var(--av-teal), #0ca5bc);
  transform: rotate(-60deg) skewX(-15deg);
}

.brand-name {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.brand-name-dark {
  color: var(--av-navy);
}

.brand-name-accent {
  color: var(--av-teal);
}

.brand-subtitle {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: clamp(0.35rem, 1vh, 0.75rem);
  color: var(--av-navy);
  font-size: clamp(0.72rem, 2vw, 0.94rem);
  font-weight: 700;
  letter-spacing: 0.21em;
}

.brand-subtitle span {
  display: block;
  width: 42px;
  height: 2px;
  background: var(--av-teal);
}

.login-card {
  padding: clamp(1.35rem, 3vh, 2.6rem) clamp(1.25rem, 4vw, 3.2rem);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--av-shadow);
  backdrop-filter: blur(14px);
}

.login-card-header h1 {
  margin: 0;
  color: var(--av-navy);
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 750;
  letter-spacing: -0.035em;
}

.login-card-header h1 span {
  color: var(--av-teal);
}

.login-card-header p {
  margin: 0.45rem 0 0;
  color: var(--av-muted);
  font-size: 1rem;
}

.title-accent {
  width: 48px;
  height: 4px;
  margin: clamp(0.8rem, 1.8vh, 1.35rem) auto clamp(1rem, 2.3vh, 1.9rem);
  border-radius: 999px;
  background: var(--av-teal);
}

.form-field {
  margin-bottom: clamp(0.9rem, 1.8vh, 1.35rem);
}

.form-field label {
  display: block;
  margin-bottom: 0.55rem;
  color: var(--av-text);
  font-size: 0.96rem;
  font-weight: 700;
}

.input-group {
  position: relative;
  margin-bottom: 0;
}

.input-group-label {
  width: 54px;
  justify-content: center;
  border: 1px solid var(--av-teal);
  border-radius: 7px 0 0 7px;
  color: var(--av-white);
  background: linear-gradient(180deg, var(--av-teal), var(--av-blue));
  font-size: 1.08rem;
}

.input-group-field {
  height: clamp(48px, 6vh, 55px);
  margin: 0;
  padding: 0 3.2rem 0 1rem;
  border: 1px solid var(--av-border);
  border-left: 0;
  border-radius: 0 7px 7px 0;
  color: var(--av-navy);
  background: var(--av-white);
  box-shadow: none;
}

.input-group-field::placeholder {
  color: #8a96aa;
}

.input-group-field:focus {
  border-color: var(--av-teal);
  box-shadow: 0 0 0 3px rgba(0, 110, 137, 0.12);
}

.password-toggle {
  position: absolute;
  z-index: 4;
  top: 50%;
  right: 0.9rem;
  padding: 0.4rem;
  border: 0;
  color: #7b879b;
  background: transparent;
  cursor: pointer;
  transform: translateY(-50%);
}

.password-toggle:hover,
.password-toggle:focus {
  color: var(--av-teal);
}

.form-error-message {
  display: none;
  margin-top: 0.4rem;
  color: var(--av-error);
  font-size: 0.82rem;
}

.form-field.has-error .input-group-field {
  border-color: var(--av-error);
}

.form-field.has-error .form-error-message {
  display: block;
}

.field-error {
  display: block;
  margin-top: 0.45rem;
  color: var(--av-error);
  font-size: 0.82rem;
}

.login-alert {
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid #efb3b3;
  border-radius: 7px;
  color: #8d1515;
  background: #fff1f1;
  font-size: 0.9rem;
}

.login-options {
  margin: 0.25rem 0 1.8rem;
  gap: 1rem;
}

.remember-option {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  color: var(--av-navy);
  cursor: pointer;
}

.remember-option input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--av-teal);
}

.forgot-password {
  color: var(--av-teal);
  font-size: 0.92rem;
  font-weight: 500;
}

.forgot-password:hover,
.forgot-password:focus {
  color: var(--av-blue);
  text-decoration: underline;
}

.login-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  min-height: clamp(50px, 6.2vh, 58px);
  margin: 0;
  border-radius: 7px;
  background: linear-gradient(100deg, var(--av-navy), var(--av-blue));
  font-size: 1.05rem;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.login-button:hover,
.login-button:focus {
  background: linear-gradient(100deg, var(--av-blue), var(--av-teal));
  box-shadow: 0 10px 24px rgba(1, 55, 91, 0.22);
  transform: translateY(-2px);
}

.login-button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.25);
  opacity: 0.72;
  transform: none;
}

.login-feedback {
  min-height: 1.4rem;
  margin-top: 0.75rem;
  color: var(--av-teal);
  text-align: center;
  font-size: 0.88rem;
}

.login-card-footer {
  margin-top: 1rem;
}

.security-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  margin: 0.5rem 0 1rem;
  color: var(--av-blue);
}

.security-divider span {
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--av-border));
}

.security-divider span:last-child {
  background: linear-gradient(90deg, var(--av-border), transparent);
}

.login-card-footer p {
  margin: 0;
  color: var(--av-muted);
  font-size: 0.85rem;
}

.legal-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.05rem;
  margin-top: 1.7rem;
}

.legal-links a {
  color: var(--av-blue);
  font-size: 0.86rem;
}

.legal-links a:hover,
.legal-links a:focus {
  color: var(--av-teal);
}

.legal-links > span {
  width: 1px;
  height: 18px;
  background: #b6c2d1;
}

.industrial-background {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.industrial-background::before,
.industrial-background::after {
  position: absolute;
  bottom: -4%;
  width: 42%;
  height: 40%;
  border: 1px solid rgba(1, 55, 91, 0.08);
  content: "";
  opacity: 0.65;
  transform: skewY(-8deg);
}

.industrial-background::before {
  left: -8%;
  background:
    repeating-linear-gradient(90deg, transparent 0 44px, rgba(1, 55, 91, 0.05) 45px 46px),
    repeating-linear-gradient(0deg, transparent 0 44px, rgba(1, 55, 91, 0.05) 45px 46px);
}

.industrial-background::after {
  right: -8%;
  background:
    repeating-linear-gradient(90deg, transparent 0 54px, rgba(0, 110, 137, 0.05) 55px 56px),
    repeating-linear-gradient(0deg, transparent 0 54px, rgba(0, 110, 137, 0.05) 55px 56px);
}

.network {
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  opacity: 0.12;
  background:
    radial-gradient(circle at 20% 35%, var(--av-teal) 0 4px, transparent 5px),
    radial-gradient(circle at 65% 20%, var(--av-blue) 0 4px, transparent 5px),
    radial-gradient(circle at 80% 65%, var(--av-teal) 0 4px, transparent 5px),
    radial-gradient(circle at 35% 75%, var(--av-blue) 0 4px, transparent 5px);
}

.network-one {
  top: 10%;
  left: 3%;
}

.network-two {
  right: 2%;
  bottom: 4%;
}

@media screen and (max-width: 639px) {
  .login-wrapper {
    padding-top: 1.75rem;
  }

  .brand-header {
    margin-bottom: 1.5rem;
  }

  .brand-subtitle {
    gap: 0.45rem;
    letter-spacing: 0.12em;
  }

  .brand-subtitle span {
    width: 22px;
  }

  .login-card {
    padding: 1.55rem 1.15rem;
    border-radius: 14px;
  }

  .login-options {
    align-items: flex-start;
    flex-direction: column;
  }

  .login-options .cell {
    width: 100%;
  }

  .legal-links {
    flex-direction: column;
    gap: 0.65rem;
  }

  .legal-links > span {
    display: none;
  }
}

@media screen and (max-height: 700px) {
  .login-wrapper { padding-top: 0.75rem; padding-bottom: 0.75rem; }
  .brand-header { margin-bottom: 0.65rem; }
  .brand-logo { max-height: 44px; }
  .brand-subtitle { margin-top: 0.25rem; font-size: 0.68rem; }
  .login-card { padding-top: 1.1rem; padding-bottom: 1.1rem; }
  .login-card-header h1 { font-size: 1.55rem; }
  .title-accent { margin: 0.6rem auto 0.8rem; }
  .form-field { margin-bottom: 0.7rem; }
  .input-group-field { height: 46px; }
  .login-button { min-height: 46px; }
  .login-card-footer { margin-top: 0.6rem; }
  .security-divider { margin: 0.25rem 0 0.6rem; }
}

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