/* =====================================================================
   Login sahifasi. Chapda brend paneli (slayd-shou fon), o'ngda kirish formasi.
   Ranglar loyihaning yangi (yashil/oltin) uslubiga mos; tema — <html data-theme>.
   ===================================================================== */
:root {
  --bg: #eef4f1;
  --card: rgba(255, 255, 255, 0.92);
  --text: #0e2019;
  --muted: #587068;
  --stroke: rgba(20, 70, 52, 0.16);
  --input: #ffffff;
  --input-solid: #ffffff;   /* autofill uchun QATTIQ (shaffof emas) fon */
  --accent: #0e8f6b;
  --accent-2: #22c08a;
  --gold: #d9a94a;
  --danger: #dc2626;
  --danger-bg: rgba(239, 68, 68, 0.1);
  --ring: rgba(16, 185, 129, 0.35);
  --shadow: 0 24px 60px rgba(10, 50, 38, 0.14), 0 2px 6px rgba(10, 50, 38, 0.06);
  /* O'ng panel fon rasmi: kun varianti (yorug' tema) */
  --panel-bg: url("../images/main-orqafon-kun.png") center / cover no-repeat, var(--bg);
}

:root[data-theme="dark"] {
  color-scheme: dark;   /* brauzer forma elementlari va autofill ham qorong'i uslubda */
  --bg: #06130f;
  --card: rgba(11, 34, 27, 0.86);
  --text: #e7f3ee;
  --muted: #9bb5aa;
  --stroke: rgba(255, 255, 255, 0.12);
  --input: rgba(255, 255, 255, 0.05);
  --input-solid: #0e2b22;
  --accent: #3fd6a5;
  --danger: #fca5a5;
  --danger-bg: rgba(239, 68, 68, 0.14);
  --ring: rgba(63, 214, 165, 0.35);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  /* tun varianti (qorong'i tema) */
  --panel-bg: url("../images/main-orqafon-tun.png") center / cover no-repeat, var(--bg);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  font-family: "Inter", "Segoe UI", ui-sans-serif, system-ui, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font-family: inherit;
}

[hidden] {
  display: none !important;
}

.lg {
  min-height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
}

/* ---------------------------------------------------------------------
   Chap panel: slayd-shou + brend
   --------------------------------------------------------------------- */
.lg-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #06231a;
}

.lg-hero-bg {
  position: absolute;
  inset: 0;
}

.lg-hero-bg::before,
.lg-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: opacity 1.6s ease;
  transform: scale(1.04);
  animation: lg-kenburns 22s ease-in-out infinite alternate;
}

.lg-hero-bg::before {
  background-image: var(--imgA);
  opacity: 1;
}

.lg-hero-bg::after {
  background-image: var(--imgB);
  opacity: 0;
}

.lg-hero-bg[data-layer="b"]::before {
  opacity: 0;
}

.lg-hero-bg[data-layer="b"]::after {
  opacity: 1;
}

@keyframes lg-kenburns {
  to {
    transform: scale(1.12) translate(-1.2%, -0.8%);
  }
}

.lg-hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(4, 30, 22, 0.78) 0%, rgba(4, 30, 22, 0.55) 40%, rgba(4, 30, 22, 0.9) 100%),
    linear-gradient(90deg, rgba(6, 60, 44, 0.75), rgba(6, 60, 44, 0.1) 70%);
}

.lg-hero-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px 52px 32px;
}

.lg-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.lg-brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 0 0 1.5px rgba(230, 194, 126, 0.7), 0 10px 26px rgba(0, 0, 0, 0.4);
}

.lg-brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
}

.lg-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.lg-brand-text b {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.lg-brand-text small {
  margin-top: 3px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #e6c27e;
}

.lg-hero-copy {
  max-width: 560px;
}

.lg-eyebrow {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(230, 194, 126, 0.5);
  background: rgba(217, 169, 74, 0.16);
  backdrop-filter: blur(6px);
  color: #f1d38f;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lg-hero-copy h2 {
  margin: 18px 0 14px;
  font-size: clamp(30px, 3.2vw, 46px);
  line-height: 1.12;
  font-weight: 850;
  letter-spacing: -0.01em;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.35);
}

.lg-hero-copy p {
  margin: 0 0 26px;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
}

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

.lg-features li {
  display: flex;
  align-items: center;
  gap: 14px;
  width: fit-content;
  max-width: 100%;
  padding: 10px 18px 10px 10px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(10px) saturate(140%);
  font-size: 14.5px;
  font-weight: 650;
}

.lg-ficon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #12a57c, #0b6b50);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.28);
}

.lg-ficon svg {
  width: 20px;
  height: 20px;
}

.lg-hero-foot {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.62);
}

/* ---------------------------------------------------------------------
   O'ng panel: forma
   --------------------------------------------------------------------- */
.lg-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 76px 28px 28px;
  background: var(--panel-bg);
}

.lg-topbar {
  position: absolute;
  top: 22px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.lg-seg {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: var(--card);
  backdrop-filter: blur(8px);
}

.lg-seg button {
  min-width: 38px;
  height: 32px;
  padding: 0 10px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.lg-seg button:hover:not([aria-pressed="true"]) {
  color: var(--text);
}

.lg-seg button[aria-pressed="true"] {
  color: #fff;
  background: linear-gradient(135deg, #12a57c, #0b6b50);
  box-shadow: 0 3px 8px rgba(8, 107, 83, 0.3);
}

.lg-theme {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: var(--card);
  backdrop-filter: blur(8px);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.lg-theme:hover {
  border-color: var(--accent);
}

.lg-theme svg {
  width: 19px;
  height: 19px;
}

.lg-i-sun {
  display: none;
}

:root[data-theme="dark"] .lg-i-sun {
  display: block;
}

:root[data-theme="dark"] .lg-i-moon {
  display: none;
}

.lg-card {
  width: 100%;
  max-width: 430px;
  padding: 38px 36px 30px;
  border-radius: 26px;
  border: 1px solid var(--stroke);
  background: var(--card);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--shadow);
  animation: lg-rise 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.lg-card.has-error {
  animation: lg-rise 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both, lg-shake 0.5s 0.5s ease;
}

@keyframes lg-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

@keyframes lg-shake {
  20%, 60% { transform: translateX(-7px); }
  40%, 80% { transform: translateX(7px); }
}

.lg-card-logo {
  display: none;
  margin-bottom: 22px;
}

.lg-card-logo img {
  display: block;
  height: 46px;
  width: auto;
}

:root[data-theme="dark"] .lg-card-logo img {
  padding: 6px 12px;
  border-radius: 12px;
  background: #fff;
}

.lg-title {
  margin: 0;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.015em;
}

.lg-desc {
  margin: 8px 0 26px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.lg-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: -6px 0 18px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(239, 68, 68, 0.32);
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.4;
}

.lg-alert svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.lg-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.lg-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.lg-field label {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--muted);
}

.lg-input {
  position: relative;
  display: flex;
  align-items: center;
}

.lg-lead {
  position: absolute;
  left: 15px;
  width: 20px;
  height: 20px;
  color: var(--muted);
  pointer-events: none;
  transition: color 0.15s ease;
}

.lg-input input {
  width: 100%;
  height: 52px;
  padding: 0 48px 0 46px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: var(--input);
  color: var(--text);
  font-size: 15px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.lg-input input::placeholder {
  color: var(--muted);
  opacity: 0.6;
}

.lg-input input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--ring);
}

.lg-input:focus-within .lg-lead {
  color: var(--accent);
}

/* Brauzer avto-to'ldirish sariq fonini yo'q qilamiz */
.lg-input input:-webkit-autofill,
.lg-input input:-webkit-autofill:hover,
.lg-input input:-webkit-autofill:focus,
.lg-input input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--text) !important;
  caret-color: var(--text);
  /* Qattiq (shaffof bo'lmagan) qoplama — Chrome'ning och-ko'k autofill fonini to'liq yopadi */
  box-shadow: 0 0 0 100px var(--input-solid) inset !important;
  transition: background-color 99999s ease-in-out 0s;
}

.lg-peek {
  position: absolute;
  right: 7px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.lg-peek:hover,
.lg-peek.is-on {
  color: var(--accent);
  background: rgba(14, 143, 107, 0.1);
}

.lg-peek:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--ring);
}

.lg-peek svg {
  width: 20px;
  height: 20px;
}

.lg-i-eyeoff {
  display: none;
}

.lg-peek.is-on .lg-i-eyeoff {
  display: block;
}

.lg-peek.is-on .lg-i-eye {
  display: none;
}

.lg-caps {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 750;
  color: #b45309;
}

:root[data-theme="dark"] .lg-caps {
  color: #fbbf24;
}

.lg-caps svg {
  width: 15px;
  height: 15px;
}

.lg-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: -2px;
}

.lg-check {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 650;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}

.lg-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.lg-box {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.5px solid var(--stroke);
  background: var(--input);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.lg-box svg {
  width: 13px;
  height: 13px;
}

.lg-check input:checked + .lg-box {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #12a57c, #0b6b50);
}

.lg-check input:focus-visible + .lg-box {
  box-shadow: 0 0 0 3px var(--ring);
}

.lg-link {
  border: none;
  background: none;
  padding: 2px 0;
  font-size: 13px;
  font-weight: 750;
  color: var(--accent);
  cursor: pointer;
}

.lg-link:hover {
  text-decoration: underline;
}

.lg-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: -4px;
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid rgba(14, 143, 107, 0.3);
  background: rgba(14, 143, 107, 0.09);
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.45;
  animation: lg-rise 0.25s ease both;
}

.lg-note svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.lg-btn {
  position: relative;
  height: 54px;
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  border-radius: 15px;
  overflow: hidden;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  background: linear-gradient(135deg, #12a57c 0%, #086b53 100%);
  box-shadow: 0 12px 26px rgba(8, 107, 83, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.14s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.lg-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}

.lg-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 16px 32px rgba(8, 107, 83, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.lg-btn:hover::after {
  left: 130%;
}

.lg-btn:active {
  transform: scale(0.985);
}

.lg-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--ring), 0 12px 26px rgba(8, 107, 83, 0.34);
}

.lg-btn-arrow {
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease;
}

.lg-btn:hover .lg-btn-arrow {
  transform: translateX(4px);
}

.lg-spin {
  display: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: lg-spin 0.7s linear infinite;
}

.lg-btn.is-loading {
  cursor: progress;
  filter: saturate(0.9);
}

.lg-btn.is-loading .lg-btn-arrow {
  display: none;
}

.lg-btn.is-loading .lg-spin {
  display: inline-block;
}

@keyframes lg-spin {
  to {
    transform: rotate(360deg);
  }
}

.lg-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px dashed var(--stroke);
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.lg-secure svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.lg-powered {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.lg-powered b {
  color: var(--text);
  font-weight: 800;
}

/* ---------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------- */
@media (max-width: 980px) {
  .lg {
    grid-template-columns: 1fr;
  }
  .lg-hero {
    display: none;
  }
  .lg-card-logo {
    display: block;
  }
  .lg-panel {
    min-height: 100vh;
    padding-top: 84px;
  }
}

@media (max-width: 480px) {
  .lg-panel {
    padding: 78px 14px 22px;
  }
  .lg-card {
    padding: 28px 20px 22px;
    border-radius: 22px;
  }
  .lg-title {
    font-size: 26px;
  }
  .lg-topbar {
    right: 14px;
    top: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lg-hero-bg::before,
  .lg-hero-bg::after,
  .lg-card,
  .lg-btn::after,
  .lg-spin {
    animation: none !important;
    transition: none !important;
  }
}
