:root {
  --lg-navy: #012762;
  --lg-navy-deep: #00122E;
  --lg-navy-mid: #0A4A8A;
  --lg-sky: #2A8FCB;
  --lg-sky-hi: #3AA0DB;
  --lg-ink: #0B1526;
  --lg-muted: #6B7A90;
  --lg-line: #DCE3EC;
  --lg-bg: #F2F4F7;
  --lg-font: "IBM Plex Sans Arabic", Tahoma, sans-serif;
  --lg-display: "Alexandria", "IBM Plex Sans Arabic", Tahoma, sans-serif;
}

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

body.lg-body {
  direction: rtl;
  text-align: right;
  font-family: var(--lg-font);
  background: var(--lg-bg);
  color: var(--lg-ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.lg-body input,
body.lg-body button { font-family: var(--lg-font); }
body.lg-body a { color: var(--lg-sky); text-decoration: none; }
body.lg-body a:hover { color: var(--lg-navy); }

.lg-blob {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
.lg-blob-a {
  width: 460px;
  height: 460px;
  top: -170px;
  right: -150px;
  background: linear-gradient(145deg, var(--lg-navy-mid), var(--lg-navy));
  box-shadow: 18px 18px 0 rgba(1, 39, 98, .14);
}
.lg-blob-b {
  width: 360px;
  height: 360px;
  bottom: -170px;
  left: -120px;
  background: linear-gradient(145deg, var(--lg-sky-hi), var(--lg-navy-mid));
  box-shadow: -14px -14px 0 rgba(42, 143, 203, .16);
}

.lg-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.lg-card {
  width: 100%;
  max-width: 1020px;
  min-height: 600px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  background: #fff;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(1, 39, 98, .16), 0 6px 16px rgba(1, 39, 98, .06);
  animation: lgIn .45s ease both;
}
@keyframes lgIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* Form side */
.lg-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px clamp(28px, 5vw, 64px) 32px;
}
.lg-form-inner {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
}
.lg-head {
  text-align: center;
  margin-bottom: 26px;
}
.lg-welcome {
  display: block;
  font-size: .92rem;
  font-weight: 600;
  color: #4B5563;
  letter-spacing: .02em;
  margin-bottom: 10px;
}
.lg-logo {
  display: inline-block;
  line-height: 0;
}
.lg-logo img {
  height: 58px;
  width: auto;
  max-width: 260px;
  object-fit: contain;
}
.lg-sub {
  margin: 16px auto 0;
  max-width: 300px;
  font-size: .86rem;
  line-height: 1.8;
  color: var(--lg-muted);
}

.lg-messages:empty { display: none; }
.lg-messages { margin-bottom: 14px; }
.lg-messages .alert {
  border-radius: 14px;
  font-size: .82rem;
  padding: .65rem .9rem;
  margin-bottom: .5rem;
  border: 1px solid transparent;
}
.lg-messages .alert-danger,
.lg-messages .alert.bg-danger {
  background: #FEF2F2 !important;
  border-color: #FECACA !important;
  color: #991B1B !important;
}
.lg-messages .alert-success,
.lg-messages .alert.bg-success {
  background: #ECFDF5 !important;
  border-color: #A7F3D0 !important;
  color: #065F46 !important;
}
.lg-messages .alert-warning,
.lg-messages .alert.bg-warning {
  background: #EEF4FB !important;
  border-color: #C9D6E8 !important;
  color: var(--lg-navy) !important;
}
.lg-messages .close { display: none; }

/* Pill fields (admin form) */
.lg-field {
  position: relative;
  margin-bottom: 14px;
}
.lg-field i {
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  color: #94A3B8;
  font-size: .9rem;
  pointer-events: none;
}
.lg-field input {
  width: 100%;
  height: 48px;
  padding: 0 50px 0 20px;
  border: 1px solid var(--lg-line);
  border-radius: 999px;
  background: #fff;
  color: var(--lg-ink);
  font-size: .92rem;
  outline: none;
  direction: rtl;
  text-align: right;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.lg-field input::placeholder { color: #9AA6B6; }
.lg-field input:focus {
  border-color: var(--lg-sky);
  box-shadow: 0 0 0 4px rgba(42, 143, 203, .14);
}
.lg-field input.is-invalid { border-color: #F87171; }

.lg-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 6px 20px;
  font-size: .84rem;
}
.lg-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--lg-muted);
  font-weight: 600;
  cursor: pointer;
  margin: 0;
}
.lg-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--lg-navy);
}

.lg-btn {
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--lg-sky-hi), var(--lg-navy));
  color: #fff;
  font-size: .98rem;
  font-weight: 800;
  letter-spacing: .02em;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(1, 39, 98, .28);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.lg-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 18px 32px rgba(1, 39, 98, .32);
}

.lg-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 20px 14px;
  color: #A0AEC0;
  font-size: .8rem;
}
.lg-divider::before,
.lg-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--lg-line);
}
.lg-alt {
  text-align: center;
  font-size: .84rem;
  color: var(--lg-muted);
}
.lg-alt a { font-weight: 800; color: var(--lg-sky); }

.lg-foot {
  margin-top: 28px;
  text-align: center;
  font-size: .72rem;
  line-height: 1.8;
  color: #9AA6B6;
}
.lg-foot a { color: var(--lg-navy) !important; font-weight: 700; }

/* Photo side */
.lg-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  color: #fff;
  text-align: center;
  background: var(--lg-navy-deep) url('../../images/login-hero.jpg') center / cover no-repeat;
  overflow: hidden;
}
.lg-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(1, 39, 98, .82) 0%, rgba(10, 74, 138, .72) 50%, rgba(42, 143, 203, .62) 100%);
}
.lg-media-inner {
  position: relative;
  z-index: 1;
  max-width: 380px;
}
.lg-media-logo {
  width: 240px;
  max-width: 80%;
  height: auto;
  margin: 0 auto 22px;
  display: block;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .25));
}
.lg-media h2 {
  margin: 0 0 10px;
  font-family: var(--lg-display);
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.5;
}
.lg-media p {
  margin: 0;
  font-size: .92rem;
  line-height: 1.9;
  color: rgba(255, 255, 255, .9);
}

/* Vue store/delivery login (persons-login component) */
.lg-card .pl-login .type-badge {
  border-radius: 999px;
  background: #EEF4FB;
  border-color: #D6E4F5;
}
.lg-card .pl-login .field-label { display: none; }
.lg-card .pl-login .auth-input-group { margin-bottom: 14px; }
.lg-card .pl-login .input-icon {
  inset-inline-start: 20px;
  color: #94A3B8;
}
.lg-card .pl-login .auth-input-wrap input {
  min-height: 48px;
  height: 48px;
  padding-block: 0;
  padding-inline-start: 50px;
  padding-inline-end: 20px;
  border-radius: 999px;
  background: #fff;
  border-color: var(--lg-line);
  font-size: .92rem;
}
.lg-card .pl-login .auth-input-wrap input:focus {
  border-color: var(--lg-sky);
  box-shadow: 0 0 0 4px rgba(42, 143, 203, .14);
}
.lg-card .pl-login .auth-row { margin: 4px 6px 20px; }
.lg-card .pl-login .auth-submit {
  min-height: 50px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--lg-sky-hi), var(--lg-navy));
  box-shadow: 0 14px 28px rgba(1, 39, 98, .28);
}
.lg-card .pl-login .type-card {
  border-radius: 18px;
  background: #fff;
}
.lg-card .pl-login .type-card:hover { border-color: var(--lg-sky); }

@media (max-width: 991.98px) {
  .lg-card {
    grid-template-columns: 1fr;
    max-width: 480px;
    min-height: 0;
  }
  .lg-media {
    order: -1;
    min-height: 190px;
    padding: 28px 24px;
  }
  .lg-media h2,
  .lg-media p { display: none; }
  .lg-media-logo { width: 190px; margin-bottom: 0; }
  .lg-form { padding: 32px 24px 24px; }
  .lg-head .lg-logo { display: none; }
  .lg-blob-a { width: 300px; height: 300px; top: -140px; right: -120px; }
  .lg-blob-b { width: 240px; height: 240px; bottom: -120px; left: -100px; }
}
@media (max-width: 480px) {
  .lg-shell { padding: 16px 12px; }
  .lg-card { border-radius: 18px; }
}
