/* LKH login — ValueTherm-style split layout, LKH blue brand */
:root {
  --lkh-blue: #4e73df;
  --lkh-blue-deep: #6f5be0;
  --lkh-gradient: linear-gradient(160deg, #4e73df, #6f5be0 70%);
  --lkh-text: #0f2634;
  --lkh-muted: #6b7280;
  --lkh-bg-soft: #F6F0F2;
  --lkh-border: #EEE4E8;
  --lkh-radius: 22px;
  --lkh-shadow: 0 24px 60px -20px rgba(36, 26, 32, 0.28);
  --lkh-font: 'Manrope', system-ui, sans-serif;
}

html, body.lkh-auth-page {
  margin: 0;
  min-height: 100%;
  font-family: var(--lkh-font);
  color: var(--lkh-text);
  background: var(--lkh-bg-soft);
  -webkit-font-smoothing: antialiased;
}

html[data-textdirection="-rtl"] body.lkh-auth-page,
html[data-textdirection="-rtl"] body.lkh-auth-page *:not(i):not([data-feather]) {
  font-family: 'Cairo', sans-serif !important;
}

.lkh-auth-layout {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
}

.lkh-auth-visual {
  background: var(--lkh-gradient);
  color: #fff;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.lkh-auth-visual::after {
  content: '';
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  right: -120px;
  bottom: -80px;
  pointer-events: none;
}

.lkh-auth-visual-logo {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.lkh-auth-visual-logo img {
  height: 96px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.lkh-auth-visual-logo span {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.lkh-auth-visual-content {
  position: relative;
  z-index: 1;
  max-width: 420px;
}

.lkh-auth-visual h1 {
  font-size: clamp(28px, 3.5vw, 36px);
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.15;
  margin: 0 0 14px;
  color: #fff !important;
}

.lkh-auth-visual p {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.6;
  margin: 0;
  color: rgba(255, 255, 255, 0.92) !important;
}

.lkh-auth-visual-logo span,
.lkh-auth-visual-foot {
  color: #fff !important;
}

.lkh-auth-visual-foot {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.85;
  position: relative;
  z-index: 1;
}

.lkh-auth-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(78, 115, 223, 0.1), transparent 55%),
    var(--lkh-bg-soft);
}

.lkh-auth-mobile-brand {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 18px;
  font-weight: 800;
  color: var(--lkh-text);
}

.lkh-auth-mobile-brand img {
  height: 72px;
  width: auto;
}

.lkh-auth-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: var(--lkh-radius);
  box-shadow: var(--lkh-shadow);
  padding: 32px 28px;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.lkh-auth-card h2 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.4px;
  margin: 0 0 6px;
  color: var(--lkh-text);
}

.lkh-auth-card .lead {
  font-size: 14px;
  color: var(--lkh-muted);
  font-weight: 500;
  margin: 0 0 24px;
}

.lkh-auth-card .form-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--lkh-text);
  margin-bottom: 6px;
}

.lkh-auth-card .form-control {
  border: 1.4px solid var(--lkh-border);
  border-radius: 12px;
  min-height: 46px;
  font-weight: 500;
  font-size: 16px; /* avoids iOS zoom-on-focus */
  box-shadow: none !important;
}

.lkh-auth-card .form-control:focus {
  border-color: var(--lkh-blue);
  box-shadow: 0 0 0 3px rgba(78, 115, 223, 0.15) !important;
}

.lkh-pass-wrap {
  position: relative;
}

.lkh-pass-wrap .form-control {
  padding-inline-end: 46px;
}

.lkh-pass-toggle {
  position: absolute;
  inset-inline-end: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--lkh-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.lkh-pass-toggle:hover,
.lkh-pass-toggle:focus-visible {
  color: var(--lkh-blue);
  background: rgba(78, 115, 223, 0.1);
  outline: none;
}

.lkh-pass-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lkh-auth-card .input-group-text {
  border: 1.4px solid var(--lkh-border);
  border-radius: 0 12px 12px 0;
  background: #fff;
}

.lkh-auth-card .input-group .form-control {
  border-radius: 12px 0 0 12px;
}

html[data-textdirection="-rtl"] .lkh-auth-card .input-group .form-control {
  border-radius: 0 12px 12px 0;
}

html[data-textdirection="-rtl"] .lkh-auth-card .input-group-text {
  border-radius: 12px 0 0 12px;
}

.lkh-auth-card .btn-primary {
  background: var(--lkh-gradient) !important;
  border: none !important;
  border-radius: 12px !important;
  font-weight: 700 !important;
  min-height: 48px;
  box-shadow: 0 8px 20px rgba(78, 115, 223, 0.28);
  margin-top: 8px;
}

.lkh-auth-card .btn-primary:hover {
  filter: brightness(1.03);
}

/* ── Tablet / phone: keep brand as top hero, form below ── */
@media (max-width: 960px) {
  .lkh-auth-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .lkh-auth-visual {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 10px;
    padding:
      calc(18px + env(safe-area-inset-top, 0px))
      22px
      28px;
    min-height: 0;
  }

  .lkh-auth-visual::after {
    width: 260px;
    height: 260px;
    right: -90px;
    bottom: -110px;
  }

  .lkh-auth-visual-logo {
    margin-bottom: 6px;
  }

  .lkh-auth-visual-logo img {
    height: 44px;
  }

  .lkh-auth-visual-logo span {
    font-size: 20px;
  }

  .lkh-auth-visual-content {
    max-width: none;
  }

  .lkh-auth-visual h1 {
    font-size: 1.55rem;
    letter-spacing: -0.5px;
    margin: 0 0 6px;
  }

  .lkh-auth-visual p {
    font-size: 13.5px;
    line-height: 1.45;
    max-width: 34ch;
    color: rgba(255, 255, 255, 0.9) !important;
  }

  .lkh-auth-visual-foot {
    display: none;
  }

  .lkh-auth-mobile-brand {
    display: none !important;
  }

  .lkh-auth-panel {
    align-items: stretch;
    justify-content: center;
    padding:
      0
      16px
      calc(20px + env(safe-area-inset-bottom, 0px));
    background:
      radial-gradient(ellipse 120% 80% at 50% 0%, rgba(78, 115, 223, 0.08), transparent 55%),
      var(--lkh-bg-soft);
    margin-top: -18px;
    position: relative;
    z-index: 2;
    flex: 1;
    min-height: 0;
  }

  .lkh-auth-card {
    max-width: none;
    margin: 0 auto;
    width: 100%;
    border-radius: 20px 20px 18px 18px;
    box-shadow: 0 12px 32px -16px rgba(15, 38, 52, 0.22);
    padding: 22px 18px 20px;
    border: 1px solid var(--lkh-border);
  }

  .lkh-auth-card h2 {
    font-size: 1.35rem;
  }

  .lkh-auth-card .lead {
    font-size: 13px;
    margin-bottom: 18px;
  }

  .lkh-auth-card .mb-1 {
    margin-bottom: 0.9rem !important;
  }

  .lkh-auth-card .form-control,
  .lkh-auth-card .input-group-text {
    min-height: 50px;
  }

  .lkh-auth-card .btn-primary {
    min-height: 52px;
    margin-top: 4px;
    font-size: 1rem !important;
  }
}

/* Narrow phones */
@media (max-width: 420px) {
  .lkh-auth-visual {
    padding-left: 18px;
    padding-right: 18px;
    padding-bottom: 24px;
  }

  .lkh-auth-visual h1 {
    font-size: 1.35rem;
  }

  .lkh-auth-visual p {
    font-size: 13px;
    max-width: none;
  }

  .lkh-auth-panel {
    padding-left: 12px;
    padding-right: 12px;
    margin-top: -16px;
  }

  .lkh-auth-card {
    padding: 20px 14px 18px;
    border-radius: 18px;
  }
}

/* Short viewports (landscape phone / keyboard open) */
@media (max-width: 960px) and (max-height: 560px) {
  .lkh-auth-visual {
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
    padding-bottom: 16px;
  }

  .lkh-auth-visual-logo img {
    height: 36px;
  }

  .lkh-auth-visual h1 {
    font-size: 1.2rem;
    margin-bottom: 2px;
  }

  .lkh-auth-visual p {
    display: none;
  }

  .lkh-auth-panel {
    margin-top: -12px;
    padding-bottom: 12px;
  }

  .lkh-auth-card {
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .lkh-auth-card .lead {
    display: none;
  }
}
