/* ═══════════════════════════════════════════════════════
   HAYLLI LOGIN — v2.0
   Admin panel login. Split layout: dark left + white right.
   Uses haylli-tokens.css custom properties.
   ═══════════════════════════════════════════════════════ */

/* ── Reset base ── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Page shell ── */
body.bg-gradient-primary {
  background: oklch(0.10 0.016 264);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1.25rem;
}

/* ── Login wrapper ── */
.lg-page {
  display: flex;
  width: 100%;
  max-width: 980px;
  min-height: 580px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px oklch(1 0 0 / 0.06),
    0 32px 80px oklch(0 0 0 / 0.55),
    0 8px 24px oklch(0 0 0 / 0.3);
  animation: lg-reveal 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes lg-reveal {
  from { opacity: 0; transform: translateY(24px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}


/* ═══════════════
   LEFT PANEL
   ═══════════════ */

.lg-panel {
  flex: 1;
  background: oklch(0.15 0.022 264);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Dot grid texture */
.lg-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, oklch(1 0 0 / 0.055) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

/* Accent glow — bottom right corner */
.lg-panel::after {
  content: '';
  position: absolute;
  bottom: -80px;
  right: -80px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: oklch(0.55 0.22 264 / 0.12);
  filter: blur(60px);
  pointer-events: none;
}

.lg-panel-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 2.5rem 2.75rem;
  gap: 0;
}

/* Brand mark */
.lg-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: auto;
}

.lg-logo {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  object-fit: contain;
  flex-shrink: 0;
}

.lg-wordmark {
  font-size: 1.35rem;
  font-weight: 700;
  color: oklch(0.95 0.005 264);
  letter-spacing: -0.02em;
}

/* Claim */
.lg-claim {
  margin-top: 2.5rem;
  margin-bottom: 2rem;
}

.lg-claim-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: oklch(0.95 0.005 264);
  line-height: 1.25;
  letter-spacing: -0.025em;
  margin: 0 0 0.75rem;
  text-wrap: balance;
}

.lg-claim-body {
  font-size: 0.875rem;
  color: oklch(0.62 0.012 264);
  line-height: 1.6;
  margin: 0;
  max-width: 32ch;
}

/* Feature list */
.lg-features {
  list-style: none;
  padding: 0;
  margin: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lg-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.84rem;
  color: oklch(0.72 0.010 264);
  font-weight: 500;
}

.lg-feature-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: oklch(0.55 0.22 264 / 0.18);
  color: oklch(0.72 0.18 264);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.lg-feature:hover .lg-feature-icon {
  background: oklch(0.55 0.22 264 / 0.28);
}

/* Panel footer */
.lg-panel-footer {
  font-size: 0.72rem;
  color: oklch(0.42 0.010 264);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 2rem;
}


/* ═══════════════
   RIGHT PANEL — Form
   ═══════════════ */

.lg-form-panel {
  width: 420px;
  flex-shrink: 0;
  background: oklch(0.975 0.004 264);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.lg-form-inner {
  width: 100%;
  padding: 3rem 3rem;
  display: flex;
  flex-direction: column;
}

/* Header */
.lg-form-header {
  margin-bottom: 2rem;
}

.lg-form-title {
  font-size: 1.625rem;
  font-weight: 700;
  color: oklch(0.18 0.018 264);
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin: 0 0 0.375rem;
}

.lg-form-subtitle {
  font-size: 0.875rem;
  color: oklch(0.50 0.015 264);
  margin: 0;
}

/* Alerts */
.lg-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
}

.lg-alert-success {
  background: oklch(0.95 0.04 164);
  color: oklch(0.42 0.13 164);
}

.lg-alert-error {
  background: oklch(0.96 0.03 22);
  color: oklch(0.44 0.21 22);
}

/* Fields */
.lg-field {
  margin-bottom: 1.25rem;
}

.lg-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: oklch(0.38 0.015 264);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

.lg-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9375rem;
  color: oklch(0.18 0.018 264);
  background: oklch(1 0 0);
  border: 1.5px solid oklch(0.88 0.008 264);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  -webkit-appearance: none;
}

.lg-input:hover:not(:focus) {
  border-color: oklch(0.78 0.010 264);
}

.lg-input:focus {
  border-color: oklch(0.55 0.22 264);
  background: oklch(1 0 0);
  box-shadow: 0 0 0 3.5px oklch(0.55 0.22 264 / 0.14);
}

.lg-input::placeholder {
  color: oklch(0.68 0.010 264);
}

/* Password wrapper */
.lg-input-wrap {
  position: relative;
}

.lg-input--pw {
  padding-right: 44px;
}

.lg-eye {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: oklch(0.60 0.012 264);
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
  line-height: 1;
}

.lg-eye:hover {
  color: oklch(0.40 0.015 264);
  background: oklch(0.93 0.006 264);
}

.lg-eye:focus-visible {
  outline: 2px solid oklch(0.55 0.22 264);
  outline-offset: 2px;
}

/* Error state */
.lg-field--error .lg-input {
  border-color: oklch(0.54 0.21 22);
  box-shadow: 0 0 0 3px oklch(0.54 0.21 22 / 0.10);
}

.lg-error {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: oklch(0.54 0.21 22);
  margin-top: 5px;
  font-weight: 500;
}

/* Remember me */
.lg-meta {
  margin-bottom: 1.5rem;
}

.lg-check {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  user-select: none;
}

.lg-check input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.lg-check-box {
  width: 17px;
  height: 17px;
  border-radius: 5px;
  border: 1.5px solid oklch(0.78 0.010 264);
  background: oklch(1 0 0);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.lg-check input[type="checkbox"]:checked + .lg-check-box {
  background: oklch(0.55 0.22 264);
  border-color: oklch(0.55 0.22 264);
  box-shadow: 0 0 0 2px oklch(0.55 0.22 264 / 0.20);
}

.lg-check input[type="checkbox"]:checked + .lg-check-box::after {
  content: '';
  display: block;
  width: 5px;
  height: 8px;
  border: 1.75px solid oklch(1 0 0);
  border-top: none;
  border-left: none;
  transform: rotate(43deg) translate(-0.5px, -1px);
}

.lg-check input[type="checkbox"]:focus-visible + .lg-check-box {
  outline: 2px solid oklch(0.55 0.22 264);
  outline-offset: 2px;
}

.lg-check-label {
  font-size: 0.8125rem;
  color: oklch(0.46 0.015 264);
  font-weight: 500;
}

/* Submit button */
.lg-submit {
  width: 100%;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  color: oklch(1 0 0);
  background: oklch(0.55 0.22 264);
  border: none;
  border-radius: 11px;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition:
    background 0.18s ease,
    transform 0.14s ease,
    box-shadow 0.18s ease;
  box-shadow: 0 2px 8px oklch(0.55 0.22 264 / 0.30);
  margin-bottom: 1.5rem;
}

.lg-submit:hover {
  background: oklch(0.49 0.22 264);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px oklch(0.55 0.22 264 / 0.38);
}

.lg-submit:active {
  background: oklch(0.46 0.22 264);
  transform: translateY(0) scale(0.985);
  box-shadow: 0 2px 6px oklch(0.55 0.22 264 / 0.25);
}

.lg-submit:focus-visible {
  outline: 2px solid oklch(0.55 0.22 264);
  outline-offset: 3px;
}

.lg-submit svg {
  transition: transform 0.18s ease;
  flex-shrink: 0;
}

.lg-submit:hover svg {
  transform: translateX(3px);
}

/* Copyright */
.lg-copy {
  font-size: 0.7rem;
  color: oklch(0.60 0.010 264);
  text-align: center;
  margin: 0;
  letter-spacing: 0.01em;
}


/* ═══════════════
   RESPONSIVE
   ═══════════════ */

@media (max-width: 760px) {
  body.bg-gradient-primary {
    background: oklch(1 0 0);
    padding: 0;
    align-items: stretch;
  }

  .lg-page {
    flex-direction: column;
    max-width: 100%;
    min-height: 100vh;
    border-radius: 0;
    box-shadow: none;
    animation: none;
  }

  .lg-panel {
    display: none;
  }

  .lg-form-panel {
    width: 100%;
    background: oklch(1 0 0);
    flex: 1;
  }

  .lg-form-inner {
    padding: 2.5rem 1.75rem;
    max-width: 440px;
    margin: 0 auto;
    width: 100%;
  }

  .lg-form-title {
    font-size: 1.5rem;
  }
}

@media (min-width: 761px) and (max-width: 920px) {
  .lg-form-panel {
    width: 380px;
  }

  .lg-form-inner {
    padding: 2.5rem 2.25rem;
  }
}


/* ═══════════════
   REDUCED MOTION
   ═══════════════ */

@media (prefers-reduced-motion: reduce) {
  .lg-page {
    animation: none;
  }

  .lg-input,
  .lg-submit,
  .lg-eye,
  .lg-check-box {
    transition: none;
  }

  .lg-submit:hover {
    transform: none;
  }

  .lg-submit:hover svg {
    transform: none;
  }
}
