/* Washnah Tender Management System V7.5.1
   Approved environmental-sector login screen.
   Visual layer only: authentication routes, CSRF, rate limiting and session flow remain unchanged. */

html,
body.washnah-eco-login {
  min-height: 100%;
}

body.washnah-eco-login {
  --eco-primary: #004741;
  --eco-primary-2: #0b675d;
  --eco-primary-3: #178475;
  --eco-cream: #f0ede4;
  --eco-soft: #e6f1ec;
  --eco-ink: #102b29;
  --eco-muted: #60736f;
  --eco-line: rgba(0, 71, 65, 0.18);
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: hidden;
  color: var(--eco-ink);
  font-family: "DIN Next LT Arabic", "DINNextLTArabic", Arial, Tahoma, sans-serif;
  background:
    radial-gradient(circle at 8% 12%, rgba(0, 71, 65, 0.22), transparent 31%),
    radial-gradient(circle at 88% 82%, rgba(23, 132, 117, 0.16), transparent 34%),
    linear-gradient(135deg, #dcece5 0%, var(--eco-cream) 54%, #faf8f2 100%);
}

body.washnah-eco-login::before,
body.washnah-eco-login::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  filter: blur(2px);
}

body.washnah-eco-login::before {
  width: 420px;
  height: 420px;
  inset-block-start: -230px;
  inset-inline-start: -170px;
  border: 1px solid rgba(0, 71, 65, 0.12);
  box-shadow:
    0 0 0 48px rgba(0, 71, 65, 0.025),
    0 0 0 96px rgba(0, 71, 65, 0.018);
}

body.washnah-eco-login::after {
  width: 360px;
  height: 360px;
  inset-block-end: -225px;
  inset-inline-end: -125px;
  background: radial-gradient(circle, rgba(0, 71, 65, 0.12), transparent 68%);
}

.eco-login-page,
.eco-login-page * {
  box-sizing: border-box;
}

.eco-login-page {
  position: relative;
  isolation: isolate;
  z-index: 1;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(24px, 4vw, 54px) 20px;
}

.eco-nature-background {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.eco-floating-leaf {
  --leaf-size: 18px;
  position: absolute;
  width: var(--leaf-size);
  height: calc(var(--leaf-size) * 0.72);
  border-radius: 100% 0 100% 0;
  background: linear-gradient(135deg, var(--eco-primary-3), var(--eco-primary));
  box-shadow: 0 8px 24px rgba(0, 71, 65, 0.18);
  opacity: 0.28;
  animation: ecoLeafFloat 8s ease-in-out infinite;
}

.eco-leaf-1 { inset-block-start: 15%; inset-inline-start: 8%; --leaf-rotate: 38deg; }
.eco-leaf-2 { inset-block-start: 28%; inset-inline-end: 11%; --leaf-size: 22px; --leaf-rotate: -32deg; animation-delay: -2s; }
.eco-leaf-3 { inset-block-end: 14%; inset-inline-start: 14%; --leaf-size: 24px; --leaf-rotate: 54deg; animation-delay: -4s; }
.eco-leaf-4 { inset-block-end: 25%; inset-inline-end: 7%; --leaf-size: 16px; --leaf-rotate: -46deg; animation-delay: -6s; }
.eco-leaf-5 { inset-block-start: 67%; inset-inline-start: 4%; --leaf-size: 12px; --leaf-rotate: 76deg; animation-delay: -1.5s; }

@keyframes ecoLeafFloat {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(var(--leaf-rotate)); opacity: 0.24; }
  50% { transform: translate3d(0, -22px, 0) rotate(calc(var(--leaf-rotate) + 12deg)); opacity: 0.5; }
}

.eco-login-language {
  position: fixed;
  inset-block-start: max(18px, env(safe-area-inset-top));
  inset-inline-end: max(18px, env(safe-area-inset-right));
  z-index: 5;
  margin: 0;
}

.eco-lang-button {
  appearance: none;
  min-height: 43px;
  border: 1px solid rgba(0, 71, 65, 0.18);
  border-radius: 999px;
  padding: 9px 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--eco-primary);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 10px 28px rgba(0, 71, 65, 0.09);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.eco-lang-button:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 71, 65, 0.42);
  background: #fff;
}

.eco-lang-button:focus-visible,
.eco-login-card a:focus-visible,
.eco-login-card button:focus-visible,
.eco-field-input:focus-visible {
  outline: 3px solid rgba(23, 132, 117, 0.25);
  outline-offset: 3px;
}

.eco-login-container {
  width: min(100%, 460px);
  position: relative;
}

.eco-login-container::before {
  content: "";
  position: absolute;
  inset: 24px -28px -32px;
  z-index: -1;
  border-radius: 52px;
  background: rgba(0, 71, 65, 0.08);
  filter: blur(28px);
}

.eco-login-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 71, 65, 0.15);
  border-radius: 32px;
  padding: clamp(34px, 6vw, 50px) clamp(24px, 6vw, 42px) 30px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    0 28px 68px rgba(0, 71, 65, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.eco-organic-border {
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--eco-primary), var(--eco-primary-3), #9abfae, var(--eco-primary-3), var(--eco-primary));
  background-size: 220% 100%;
  animation: ecoOrganicFlow 5s ease-in-out infinite;
}

@keyframes ecoOrganicFlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.eco-login-header {
  text-align: center;
  margin-bottom: 30px;
}

.eco-logo-shell {
  width: 116px;
  min-height: 82px;
  padding: 16px 14px;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
  position: relative;
  color: #fff;
  background: linear-gradient(145deg, var(--eco-primary), #075a52);
  border-radius: 28px 12px 28px 12px;
  box-shadow:
    0 14px 34px rgba(0, 71, 65, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  animation: ecoLogoBreath 4s ease-in-out infinite;
}

.eco-logo-shell::before,
.eco-logo-shell::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(0, 71, 65, 0.15);
  border-radius: inherit;
  inset: -8px;
}

.eco-logo-shell::after {
  inset: -15px;
  opacity: 0.45;
}

@keyframes ecoLogoBreath {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-3px) scale(1.015); }
}

.eco-logo-image {
  display: block;
  width: min(100%, 90px);
  max-height: 54px;
  object-fit: contain;
  filter: drop-shadow(0 4px 9px rgba(0, 0, 0, 0.12));
}

.eco-logo-fallback {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  color: #fff;
  font-size: 25px;
  font-weight: 900;
}

.eco-login-company {
  margin: 0 0 5px;
  color: var(--eco-primary-2);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.eco-login-title {
  margin: 0;
  color: var(--eco-primary);
  font-family: inherit;
  font-size: clamp(26px, 5vw, 34px);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.eco-login-subtitle {
  max-width: 340px;
  margin: 9px auto 0;
  color: var(--eco-muted);
  font-size: 14px;
  line-height: 1.75;
}

.eco-auth-alert {
  margin: 0 0 18px;
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid;
  border-radius: 15px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.65;
}

.eco-auth-alert svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  margin-top: 2px;
}

.eco-auth-alert--success {
  color: #0c624c;
  background: #e9f8f1;
  border-color: #b9dfcf;
}

.eco-auth-alert--error,
.eco-auth-alert--limited {
  color: #8d2731;
  background: #fff1f2;
  border-color: #efc3c8;
}

.eco-login-form {
  margin: 0;
}

.eco-field {
  position: relative;
  margin-bottom: 22px;
}

.eco-field-input {
  appearance: none;
  width: 100%;
  height: 58px;
  border: 1.5px solid var(--eco-line);
  border-radius: 18px;
  padding: 19px 52px 13px 18px;
  color: var(--eco-ink);
  background: rgba(230, 241, 236, 0.45);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease, transform 180ms ease;
}

[dir="rtl"] .eco-field-input {
  padding: 19px 52px 13px 18px;
}

[dir="ltr"] .eco-field-input {
  padding: 19px 18px 13px 52px;
}

.eco-field--password .eco-field-input {
  padding-inline-end: 60px;
}

.eco-field-input[type="email"],
.eco-field-input[type="password"],
.eco-field-input[type="text"] {
  direction: ltr;
  text-align: left;
}

.eco-field-input:hover {
  border-color: rgba(0, 71, 65, 0.34);
}

.eco-field-input:focus {
  border-color: var(--eco-primary-3);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 0 4px rgba(23, 132, 117, 0.12);
  transform: translateY(-1px);
}

.eco-field-label {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 52px;
  z-index: 2;
  max-width: calc(100% - 118px);
  padding: 0 7px;
  color: #66817b;
  background: linear-gradient(to bottom, transparent 42%, rgba(238, 246, 242, 0.98) 42%);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
  transform: translateY(-50%);
  transform-origin: center;
  transition: inset-block-start 180ms ease, color 180ms ease, font-size 180ms ease, background 180ms ease;
}

[dir="ltr"] .eco-field-label {
  inset-inline-start: 52px;
}

.eco-field-input:focus + .eco-field-label,
.eco-field-input:not(:placeholder-shown) + .eco-field-label,
.eco-field-input:-webkit-autofill + .eco-field-label {
  inset-block-start: 0;
  color: var(--eco-primary);
  background: #fff;
  font-size: 12px;
  font-weight: 900;
}

.eco-field-icon {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 17px;
  z-index: 3;
  width: 21px;
  height: 21px;
  color: var(--eco-primary-2);
  pointer-events: none;
  transform: translateY(-50%);
  transition: color 180ms ease, transform 180ms ease;
}

.eco-field:focus-within .eco-field-icon {
  color: var(--eco-primary-3);
  transform: translateY(-50%) scale(1.06);
}

.eco-password-toggle {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-end: 10px;
  z-index: 4;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  padding: 0;
  color: #62807a;
  background: transparent;
  cursor: pointer;
  transform: translateY(-50%);
  transition: color 180ms ease, background 180ms ease;
}

.eco-password-toggle:hover {
  color: var(--eco-primary);
  background: rgba(0, 71, 65, 0.08);
}

.eco-password-toggle svg {
  width: 20px;
  height: 20px;
}

.eco-password-toggle .eye-closed {
  display: none;
}

.eco-password-toggle[aria-pressed="true"] .eye-open {
  display: none;
}

.eco-password-toggle[aria-pressed="true"] .eye-closed {
  display: block;
}

.eco-login-options {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin: -2px 2px 23px;
}

.eco-forgot-link {
  color: var(--eco-primary-2);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  transition: color 180ms ease;
}

.eco-forgot-link:hover {
  color: var(--eco-primary);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.eco-login-submit {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 56px;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  padding: 14px 22px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  color: #fff;
  background: linear-gradient(110deg, var(--eco-primary), var(--eco-primary-3), var(--eco-primary));
  background-size: 210% 100%;
  box-shadow: 0 14px 30px rgba(0, 71, 65, 0.22);
  font: inherit;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.eco-login-submit::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, transparent 25%, rgba(255, 255, 255, 0.2) 50%, transparent 75%);
  transform: translateX(-120%);
  transition: transform 580ms ease;
}

[dir="rtl"] .eco-login-submit::before {
  transform: translateX(120%);
}

.eco-login-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(0, 71, 65, 0.28);
  background-position: 100% 50%;
}

.eco-login-submit:hover::before {
  transform: translateX(120%);
}

[dir="rtl"] .eco-login-submit:hover::before {
  transform: translateX(-120%);
}

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

.eco-login-submit svg {
  width: 20px;
  height: 20px;
}

.eco-balance-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 25px 0 18px;
  color: rgba(0, 71, 65, 0.34);
}

.eco-balance-divider::before,
.eco-balance-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to var(--divider-dir, right), transparent, rgba(0, 71, 65, 0.2));
}

.eco-balance-divider::after {
  --divider-dir: left;
}

.eco-divider-leaf {
  width: 14px;
  height: 14px;
  display: block;
  position: relative;
  transform: rotate(45deg);
}

.eco-divider-leaf::before,
.eco-divider-leaf::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  background: rgba(23, 132, 117, 0.45);
  border-radius: 100% 0 100% 0;
}

.eco-divider-leaf::after {
  inset-inline-start: 6px;
  inset-block-start: 6px;
  transform: rotate(180deg);
}

.eco-login-secure {
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  color: var(--eco-muted);
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
}

.eco-login-secure svg {
  width: 17px;
  height: 17px;
  color: var(--eco-primary-3);
  flex: 0 0 auto;
}

.eco-card-footer {
  margin: 18px 0 0;
  color: rgba(16, 43, 41, 0.5);
  text-align: center;
  font-size: 11px;
  font-weight: 700;
}

@media (max-width: 560px) {
  .eco-login-page {
    align-items: center;
    padding: 78px 13px 22px;
  }

  .eco-login-language {
    inset-block-start: 14px;
    inset-inline-end: 13px;
  }

  .eco-login-card {
    border-radius: 26px;
    padding: 34px 20px 24px;
  }

  .eco-organic-border {
    height: 5px;
  }

  .eco-logo-shell {
    width: 104px;
    min-height: 72px;
    margin-bottom: 17px;
  }

  .eco-login-header {
    margin-bottom: 25px;
  }

  .eco-login-title {
    font-size: 27px;
  }

  .eco-login-subtitle {
    font-size: 13px;
  }

  .eco-floating-leaf {
    opacity: 0.18;
  }
}

@media (max-height: 720px) and (min-width: 561px) {
  .eco-login-page {
    padding-block: 18px;
  }

  .eco-login-card {
    padding-block: 29px 23px;
  }

  .eco-logo-shell {
    width: 100px;
    min-height: 68px;
    margin-bottom: 14px;
  }

  .eco-login-header {
    margin-bottom: 22px;
  }

  .eco-field {
    margin-bottom: 18px;
  }

  .eco-login-options {
    margin-bottom: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .eco-floating-leaf,
  .eco-organic-border,
  .eco-logo-shell {
    animation: none !important;
  }

  .eco-lang-button,
  .eco-field-input,
  .eco-field-icon,
  .eco-password-toggle,
  .eco-login-submit,
  .eco-login-submit::before {
    transition: none !important;
  }
}

/* V7.5.4 — unified authentication experience
   Extends the approved environmental login theme to password recovery and reset. */
.eco-login-container--wide {
  width: min(100%, 560px);
}

.eco-login-card--reset {
  padding-block: clamp(26px, 4vw, 38px) 24px;
}

.eco-login-header--compact {
  margin-bottom: 22px;
}

.eco-logo-shell--compact {
  width: 100px;
  min-height: 68px;
  margin-bottom: 15px;
  padding: 12px;
}

.eco-logo-shell--compact .eco-logo-image {
  max-height: 46px;
}

.eco-auth-field-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(150px, .65fr);
  gap: 14px;
}

.eco-auth-field-grid .eco-field {
  min-width: 0;
}

.eco-reset-form .eco-field {
  margin-bottom: 16px;
}

.eco-reset-form .eco-field-input {
  height: 55px;
}

.eco-otp-input {
  text-align: center !important;
  letter-spacing: .36em;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
}

.eco-auth-form-hint {
  margin: -2px 2px 18px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--eco-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.65;
}

.eco-auth-form-hint svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin-top: 2px;
  color: var(--eco-primary-3);
}

.eco-auth-actions {
  min-height: 28px;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  text-align: center;
}

.eco-auth-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--eco-muted);
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
  transition: color 180ms ease, transform 180ms ease;
}

.eco-auth-link:hover {
  color: var(--eco-primary);
  transform: translateY(-1px);
}

.eco-auth-link--primary {
  color: var(--eco-primary-2);
}

.eco-auth-link svg {
  width: 17px;
  height: 17px;
}

[dir="rtl"] .eco-auth-link svg {
  transform: scaleX(-1);
}

.eco-auth-actions-separator {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(0, 71, 65, .28);
}

@media (max-width: 620px) {
  .eco-auth-field-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .eco-login-card--reset {
    padding-block: 30px 22px;
  }

  .eco-logo-shell--compact {
    width: 94px;
    min-height: 64px;
  }
}

@media (max-height: 850px) and (min-width: 621px) {
  .eco-auth-page--reset {
    align-items: start;
    padding-block: 20px;
  }

  .eco-login-card--reset {
    padding-block: 24px 20px;
  }

  .eco-login-header--compact {
    margin-bottom: 18px;
  }

  .eco-login-header--compact .eco-login-subtitle {
    margin-top: 5px;
    line-height: 1.55;
  }

  .eco-logo-shell--compact {
    width: 88px;
    min-height: 58px;
    margin-bottom: 10px;
  }

  .eco-reset-form .eco-field {
    margin-bottom: 13px;
  }

  .eco-reset-form .eco-field-input {
    height: 52px;
  }

  .eco-auth-form-hint {
    margin-bottom: 13px;
  }

  .eco-login-card--reset .eco-balance-divider {
    margin-block: 18px 13px;
  }
}
