/**
 * ECOVENT login — fixed split layout (no reflow / jitter)
 */

#eco-login-brand {
  display: none;
}

html.eco-login-active #eco-login-brand {
  display: flex;
}

html.eco-login-active,
html.eco-login-active body {
  margin: 0;
  height: 100%;
  overflow: hidden;
}

html.eco-login-active body {
  font-family: "Cairo", Tahoma, sans-serif;
}

/* Brand — fixed right half (RTL) */
html.eco-login-active #eco-login-brand {
  position: fixed;
  top: 0;
  right: 0;
  width: 50%;
  height: 100vh;
  height: 100dvh;
  z-index: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2.5rem 2rem;
  background: linear-gradient(145deg, #0a1f44 0%, #123a6b 45%, #1a4d7a 100%);
  color: #fff;
  overflow: hidden;
  box-sizing: border-box;
}

html.eco-login-active #eco-login-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/images/hero-bg-new.jpg") center / cover no-repeat;
  opacity: 0.18;
  pointer-events: none;
}

html.eco-login-active #eco-login-brand::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 80%, rgba(201, 162, 39, 0.15), transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.08), transparent 45%);
  pointer-events: none;
}

/* Form — fixed left half */
html.eco-login-active #root {
  position: fixed;
  top: 0;
  left: 0;
  width: 50%;
  height: 100vh;
  height: 100dvh;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #f4f7fc 0%, #eef2f8 100%);
  padding: 1.5rem;
  box-sizing: border-box;
  overflow: auto;
}

html.eco-login-active #root > .min-h-screen {
  min-height: auto !important;
  width: 100%;
  max-width: 26rem;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
}

.eco-login-brand__inner {
  position: relative;
  z-index: 1;
  max-width: 22rem;
}

.eco-login-brand__logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 0.75rem;
  padding: 0.85rem 1.35rem;
  margin: 0 auto 1.75rem;
  max-width: min(20rem, 88vw);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08), 0 16px 40px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  text-decoration: none;
}

.eco-login-brand__logo {
  display: block;
  height: 3.25rem;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.eco-login-brand__badge {
  display: inline-flex;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.eco-login-brand__title {
  font-family: "Oswald", "Cairo", sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 700;
  margin: 0 0 0.75rem;
}

.eco-login-brand__text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.88);
}

.eco-login-brand__features {
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
  text-align: right;
  display: grid;
  gap: 0.6rem;
}

.eco-login-brand__features li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.9);
}

.eco-login-brand__features li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c9a227;
  flex-shrink: 0;
}

#eco-login-back {
  display: none;
}

html.eco-login-active #eco-login-back {
  display: inline-flex;
}

.eco-login-back {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(10, 31, 68, 0.12);
  color: #0a1f44;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(10, 31, 68, 0.08);
}

.eco-login-back:hover {
  background: #fff;
}

html.eco-login-active #root [data-slot="card"] {
  width: 100% !important;
  border: none !important;
  border-radius: 1rem !important;
  box-shadow: 0 4px 6px rgba(10, 31, 68, 0.04), 0 20px 50px rgba(10, 31, 68, 0.1) !important;
  background: #fff !important;
}

html.eco-login-active #root [data-slot="card-header"] {
  padding: 2rem 2rem 0.5rem !important;
  text-align: center;
}

html.eco-login-active #root [data-slot="card-title"] {
  font-size: 1.45rem !important;
  font-weight: 700 !important;
  color: #0a1f44 !important;
}

html.eco-login-active #root [data-slot="card-content"] {
  padding: 1.25rem 2rem 2rem !important;
}

html.eco-login-active #root input {
  height: 2.85rem !important;
  border-radius: 0.6rem !important;
  border: 1px solid #d8e0ec !important;
  background: #f8fafc !important;
  font-family: "Cairo", sans-serif !important;
  width: 100%;
}

html.eco-login-active #root input:focus {
  outline: none !important;
  border-color: #1a4d7a !important;
  background: #fff !important;
  box-shadow: 0 0 0 3px rgba(26, 77, 122, 0.15) !important;
}

html.eco-login-active #root button[type="submit"] {
  height: 2.85rem !important;
  border-radius: 0.6rem !important;
  font-weight: 700 !important;
  background: linear-gradient(135deg, #0a1f44 0%, #1a4d7a 100%) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(10, 31, 68, 0.28) !important;
}

/* Mobile — stack */
@media (max-width: 899px) {
  html.eco-login-active #eco-login-brand {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 2rem 1.5rem 1.5rem;
  }

  html.eco-login-active #root {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 0;
    flex: 1;
  }

  html.eco-login-active body {
    overflow-y: auto;
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
  }

  .eco-login-brand__features {
    display: none;
  }

  .eco-login-brand__logo {
    height: 2.5rem;
  }

  .eco-login-brand__logo-wrap {
    padding: 0.7rem 1.1rem;
    margin-bottom: 1rem;
  }
}

@media (min-width: 900px) {
  html.eco-login-active body {
    overflow: hidden;
  }
}
