/* ============================================================
   PANTALLA D'ENTRADA D'EDEMLA (nou disseny 29/11/2026)
   Vista: app/Modules/Auth/Views/login.php. Abans: login_moderno.css (es queda per si cal tornar-hi)
   ============================================================ */
:root {
  --lg-taronja: #f5871f;
  --lg-taronja-fosc: #dd6f0b;
  --lg-fosc: #0f172a;
  --lg-fosc-2: #1e293b;
  --lg-text: #0f172a;
  --lg-gris: #64748b;
  --lg-vora: #d9dee7;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  color: var(--lg-text);
  background:
    radial-gradient(900px 600px at 85% 10%, rgba(245, 135, 31, .18), transparent 60%),
    radial-gradient(700px 500px at 10% 90%, rgba(56, 189, 248, .10), transparent 60%),
    linear-gradient(160deg, #0b1220 0%, #111a2e 55%, #0f172a 100%);
}

.lg { width: 100%; display: flex; justify-content: center; }

.lg-caixa {
  width: 100%;
  max-width: 920px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .04);
  animation: lg-entra .45s ease-out both;
}
@keyframes lg-entra { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- Costat de la marca ---------- */
.lg-marca {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  padding: 40px 40px 32px;
  color: #e2e8f0;
  background:
    radial-gradient(500px 340px at 100% 0%, rgba(245, 135, 31, .35), transparent 65%),
    linear-gradient(165deg, var(--lg-fosc-2) 0%, var(--lg-fosc) 100%);
  overflow: hidden;
}
/* Trama de punts molt suau */
.lg-marca::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px);
  background-size: 18px 18px;
  pointer-events: none;
}
.lg-marca > * { position: relative; }
.lg-marca__dalt { display: flex; align-items: center; gap: 12px; }
.lg-marca__icona { width: 40px; height: 40px; filter: drop-shadow(0 6px 14px rgba(245, 135, 31, .35)); }
.lg-marca__nom { display: block; font-size: 20px; font-weight: 800; letter-spacing: .1em; color: #fff; line-height: 1.1; }
.lg-marca__sub { display: block; font-size: 12px; color: #94a3b8; letter-spacing: .04em; }
.lg-marca h1 { margin: 0 0 22px; font-size: 30px; line-height: 1.2; font-weight: 700; color: #fff; }
.lg-marca ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.lg-marca li { display: flex; align-items: center; gap: 12px; font-size: 15px; color: #cbd5e1; }
.lg-marca li i {
  width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px; background: rgba(245, 135, 31, .16); color: var(--lg-taronja); font-size: 14px;
}
.lg-marca__baix { font-size: 12px; color: #64748b; letter-spacing: .06em; text-transform: uppercase; }

/* ---------- Formulari ---------- */
.lg-form { padding: 44px 44px 30px; display: flex; flex-direction: column; }
/* Logo: la marca (public/assets/img/edemla-marca.svg) + el nom */
.lg-logo { align-self: center; display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.lg-logo img { width: 54px; height: 54px; filter: drop-shadow(0 8px 16px rgba(245, 135, 31, .35)); }
.lg-logo__text { display: flex; flex-direction: column; line-height: 1; }
.lg-logo__text strong { font-size: 28px; font-weight: 800; letter-spacing: .08em; color: var(--lg-text); }
.lg-logo__text small { margin-top: 5px; font-size: 11px; font-weight: 600; letter-spacing: .42em; color: var(--lg-taronja); }
.lg-form h2 { margin: 0; text-align: center; font-size: 26px; font-weight: 700; }
.lg-intro { margin: 6px 0 26px; text-align: center; color: var(--lg-gris); font-size: 14px; }

.lg-camp { display: block; margin-bottom: 16px; }
.lg-camp > span:first-child { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: #334155; }
.lg-input { position: relative; display: flex; align-items: center; }
.lg-input > i { position: absolute; left: 14px; color: #94a3b8; font-size: 14px; pointer-events: none; transition: color .15s; }
.lg-input input {
  width: 100%;
  height: 48px;
  padding: 0 44px 0 40px;
  border: 1px solid var(--lg-vora);
  border-radius: 12px;
  background: #f8fafc;
  font-size: 16px;
  color: var(--lg-text);
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.lg-input input:focus { border-color: var(--lg-taronja); background: #fff; box-shadow: 0 0 0 4px rgba(245, 135, 31, .15); }
.lg-input:focus-within > i { color: var(--lg-taronja); }
.lg-ull {
  position: absolute; right: 6px; width: 36px; height: 36px; border: 0; border-radius: 8px;
  background: transparent; color: #94a3b8; cursor: pointer; font-size: 14px;
}
.lg-ull:hover { color: var(--lg-text); background: #eef2f7; }
.lg-err { display: block; min-height: 0; margin-top: 4px; font-size: 12px; color: #b91c1c; }
.lg-err:empty { display: none; }

.lg-entrar {
  width: 100%;
  height: 50px;
  margin-top: 8px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--lg-taronja) 0%, var(--lg-taronja-fosc) 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .02em;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(245, 135, 31, .35);
  transition: transform .12s, box-shadow .15s, filter .15s, opacity .15s;
}
.lg-entrar:hover:not(:disabled) { filter: brightness(1.05); box-shadow: 0 14px 28px rgba(245, 135, 31, .42); }
.lg-entrar:active:not(:disabled) { transform: translateY(1px); }
.lg-entrar:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.lg-entrar.envia i { animation: lg-gira 1s linear infinite; }
@keyframes lg-gira { to { transform: rotate(360deg); } }

/* Avisos del servidor (contrasenya incorrecta, sessió caducada...) */
.lg-avis p { margin: 0 0 18px; padding: 11px 14px; border-radius: 10px; font-size: 14px; line-height: 1.4; }
.lg-avis .alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.lg-avis .alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

.lg-peu { margin: 26px 0 0; text-align: center; font-size: 12px; color: #94a3b8; }
.lg-peu i { color: #22c55e; margin-right: 4px; }

/* ---------- Tauleta dreta i mòbil: només el formulari ---------- */
@media (max-width: 820px) {
  body { padding: 16px; align-items: flex-start; padding-top: max(16px, 8vh); }
  .lg-caixa { grid-template-columns: 1fr; max-width: 420px; border-radius: 18px; }
  .lg-marca { display: none; }
  .lg-form { padding: 32px 24px 24px; }
}
