/* Sign-in page. Light and dark (html[data-theme]), phone to desktop. */
.lg-page { margin: 0; background: #F4F6F8; }
html[data-theme="dark"] .lg-page { background: #0D1520; }

.lg {
  --lg-bg: #F4F6F8; --lg-ink: #14202B; --lg-muted: #4F5D6A; --lg-line: #DDE3E8;
  --lg-field: #fff; --lg-field-border: #CBD3DA; --lg-icon: #5A6A78; --lg-btn: var(--accent, #1F5C82); --lg-link: var(--accent, #1F5C82);
  --lg-chip: #fff; --lg-chip-border: #DDE3E8; --lg-brand: #0B1624;
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); min-height: 100vh;
  font-family: var(--font-body, 'Plus Jakarta Sans', system-ui, sans-serif); color: var(--lg-ink); background: var(--lg-bg);
}
html[data-theme="dark"] .lg {
  --lg-bg: #0D1520; --lg-ink: #E8EEF3; --lg-muted: #A9B8C6; --lg-line: #26384A;
  --lg-field: #162231; --lg-field-border: #2B3D50; --lg-icon: #8FA3B5; --lg-btn: var(--accent-fill, #2E86B8); --lg-link: #7CC4EA;
  --lg-chip: #162231; --lg-chip-border: #26384A; --lg-brand: #08101A;
}
.lg *, .lg *::before, .lg *::after { box-sizing: border-box; }

/* Brand panel (always dark) */
.lg-brand {
  position: relative; overflow: hidden; background: var(--lg-brand); color: #fff;
  padding: 56px 64px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
}
.lg-net { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.lg-logo { position: relative; display: flex; align-items: center; gap: 14px; }
.lg-mark {
  width: 48px; height: 48px; border-radius: 14px; background: #fff; color: #0B1624; display: grid; place-items: center;
  font-weight: 800; font-size: 18px; flex-shrink: 0; overflow: hidden;
}
.lg-mark img { max-width: 38px; max-height: 38px; object-fit: contain; }
.lg-name { font-size: 20px; font-weight: 800; letter-spacing: .02em; }
.lg-pitch { position: relative; max-width: 520px; }
.lg-pitch h2 { margin: 0 0 18px; font-size: 44px; line-height: 1.1; font-weight: 800; letter-spacing: -1px; }
.lg-pitch > p { margin: 0 0 32px; font-size: 17px; line-height: 1.55; color: #B7C6D4; }
.lg-feats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.lg-feats li { display: flex; align-items: center; gap: 14px; font-size: 15.5px; font-weight: 600; }
.lg-feats .ico { width: 40px; height: 40px; border-radius: 12px; background: rgba(95, 180, 224, .16); display: grid; place-items: center; flex-shrink: 0; }
.lg-feats svg { width: 20px; height: 20px; stroke: #7CC4EA; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.lg-foot { position: relative; font-size: 13px; color: #8FA3B5; min-height: 1px; }

/* Form panel */
.lg-form { position: relative; display: flex; align-items: center; justify-content: center; padding: 48px; }
.lg-theme {
  position: absolute; top: 28px; right: 32px; width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--lg-chip-border);
  background: var(--lg-chip); color: var(--lg-ink); display: grid; place-items: center; cursor: pointer;
}
.lg-theme svg { width: 20px; height: 20px; }
.lg-theme .theme-ico-sun { display: none; }
html[data-theme="dark"] .lg-theme .theme-ico-sun { display: block; }
html[data-theme="dark"] .lg-theme .theme-ico-moon { display: none; }
.lg-card { width: 400px; max-width: 100%; }
.lg-card h1 { margin: 0 0 8px; font-size: 34px; font-weight: 800; letter-spacing: -.8px; color: var(--lg-ink); }
.lg-sub { margin: 0 0 28px; font-size: 15.5px; color: var(--lg-muted); }

.lg-alert { display: flex; gap: 10px; align-items: flex-start; border-radius: 14px; padding: 12px 14px; margin: 0 0 18px; font-size: 13.5px; font-weight: 600; line-height: 1.45; }
.lg-alert svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lg-alert.is-danger { background: #FDECEA; color: #9B1C1C; }
.lg-alert.is-warning { background: #FFF4DE; color: #7A4B00; }
.lg-alert.is-success { background: #E6F3EC; color: #14673D; }
html[data-theme="dark"] .lg-alert.is-danger { background: rgba(244, 90, 80, .16); color: #FFB4AD; }
html[data-theme="dark"] .lg-alert.is-warning { background: rgba(245, 170, 40, .16); color: #FFD58A; }
html[data-theme="dark"] .lg-alert.is-success { background: rgba(40, 190, 120, .16); color: #8CE0B5; }

.lg-field { margin: 0 0 20px; }
.lg-field label { display: block; font-size: 13.5px; font-weight: 700; margin: 0 0 8px; color: var(--lg-ink); }
.lg-input { position: relative; }
.lg-input > svg { position: absolute; left: 16px; top: 16px; width: 20px; height: 20px; stroke: var(--lg-icon); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.lg-input input {
  width: 100%; height: 52px; padding: 0 16px 0 46px; border-radius: 14px; border: 1.5px solid var(--lg-field-border); background: var(--lg-field);
  color: var(--lg-ink); font: inherit; font-size: 15.5px; outline: none; transition: border-color .15s ease, box-shadow .15s ease;
}
.lg-input input:focus { border-color: var(--lg-link); box-shadow: 0 0 0 3px rgba(var(--accent-rgb, 31, 92, 130), .28); }
.lg-input.has-error input { border-color: #B42318; }
.lg-pw input { padding-right: 78px; }
.lg-show {
  position: absolute; right: 8px; top: 8px; height: 36px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent;
  color: var(--lg-link); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer;
}
.lg-show:hover { background: rgba(var(--accent-rgb, 31, 92, 130), .1); }
.lg-links { display: flex; justify-content: flex-end; margin: -4px 0 22px; font-size: 13.5px; }
.lg-links a, .lg-help a { color: var(--lg-link); font-weight: 700; text-decoration: none; }
.lg-links a:hover, .lg-help a:hover { text-decoration: underline; }
.lg-btn {
  width: 100%; height: 54px; border: 0; border-radius: 14px; background: var(--lg-btn); color: #fff; font: inherit; font-size: 16px; font-weight: 800; cursor: pointer;
  transition: transform .12s ease, filter .15s ease;
}
.lg-btn:hover { filter: brightness(1.06); }
.lg-btn:active { transform: scale(.98); }
.lg-help { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--lg-line); font-size: 13.5px; line-height: 1.55; color: var(--lg-muted); }
.lg-help strong { color: var(--lg-ink); }

/* Tablet and phone: brand on top, form on a rounded sheet below */
@media (max-width: 900px) {
  .lg { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .lg-brand { padding: 36px 24px 56px; gap: 26px; }
  .lg-name { font-size: 18px; }
  .lg-mark { width: 44px; height: 44px; font-size: 16px; }
  .lg-pitch h2 { font-size: 28px; letter-spacing: -.6px; margin: 0; max-width: 340px; }
  .lg-pitch > p, .lg-feats { display: none; }
  .lg-foot { display: none; }
  .lg-form { align-items: flex-start; padding: 26px 24px 32px; margin-top: -28px; border-radius: 28px 28px 0 0; background: var(--lg-bg); }
  .lg-theme { position: static; margin-left: auto; flex-shrink: 0; }
  .lg-card { width: 100%; max-width: 460px; margin: 0 auto; }
  .lg-card h1 { font-size: 26px; letter-spacing: -.5px; margin-bottom: 4px; }
  .lg-sub { font-size: 14.5px; margin-bottom: 18px; }
  .lg-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .lg-input input { height: 50px; font-size: 16px; }
  .lg-input > svg { top: 15px; }
}
@media (min-width: 901px) { .lg-card-head { display: block; } }
@media (prefers-reduced-motion: reduce) { .lg *, .lg *::before { transition: none !important; } }

/* Forgot / reset password pages */
.lg-btn-link { display: grid; place-items: center; text-decoration: none; }
.lg-ghost {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 50px; margin-top: 12px; border-radius: 14px;
  border: 1.5px solid var(--lg-field-border); background: transparent; color: var(--lg-ink); font: inherit; font-size: 15px; font-weight: 700; text-decoration: none;
}
.lg-ghost:hover { background: rgba(127, 144, 160, .12); }
.lg-ghost svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lg-back { display: inline-flex; align-items: center; gap: 6px; margin-top: 22px; font-size: 14px; font-weight: 700; color: var(--lg-link); text-decoration: none; }
.lg-back svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lg-back:hover { text-decoration: underline; }
.lg-hint { margin: -10px 0 20px; font-size: 12.5px; color: var(--lg-muted); }
.lg-note { margin: 18px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--lg-muted); }
.lg-done { text-align: left; }
.lg-done .badge-ico { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; margin: 0 0 18px; background: #E6F3EC; color: #14673D; }
.lg-done .badge-ico svg { width: 30px; height: 30px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
html[data-theme="dark"] .lg-done .badge-ico { background: rgba(40, 190, 120, .16); color: #8CE0B5; }
.lg-done p { margin: 0 0 10px; font-size: 15px; line-height: 1.6; color: var(--lg-muted); }
.lg-done p strong { color: var(--lg-ink); }

/* Landing page (index.php) */
.lg-choices { display: flex; flex-direction: column; gap: 12px; margin: 0 0 18px; }
.lg-choice {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 16px; text-decoration: none; color: var(--lg-ink);
  border: 1.5px solid var(--lg-field-border); background: var(--lg-field); transition: transform .12s ease, border-color .15s ease, box-shadow .15s ease;
}
.lg-choice:hover { border-color: var(--lg-link); box-shadow: 0 8px 22px rgba(15, 23, 42, .08); transform: translateY(-1px); }
.lg-choice:active { transform: scale(.985); }
.lg-choice .ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; background: rgba(var(--accent-rgb, 31, 92, 130), .12); color: var(--lg-link); }
.lg-choice .ico svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.lg-choice .txt { flex: 1; min-width: 0; }
.lg-choice .t { display: block; font-size: 16px; font-weight: 800; }
.lg-choice .d { display: block; margin-top: 2px; font-size: 13.5px; color: var(--lg-muted); }
.lg-choice .go { width: 20px; height: 20px; stroke: var(--lg-muted); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.lg-choice.is-primary { background: var(--lg-btn); border-color: transparent; color: #fff; }
.lg-choice.is-primary .ico { background: rgba(255, 255, 255, .18); color: #fff; }
.lg-choice.is-primary .d { color: rgba(255, 255, 255, .85); }
.lg-choice.is-primary .go { stroke: #fff; }
.lg-choice.is-primary:hover { border-color: transparent; filter: brightness(1.06); }
.lg-app { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; background: rgba(var(--accent-rgb, 31, 92, 130), .08); }
.lg-app .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; background: rgba(var(--accent-rgb, 31, 92, 130), .14); color: var(--lg-link); }
.lg-app .ico svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.lg-app p { margin: 0; flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.5; color: var(--lg-muted); }
.lg-app strong { color: var(--lg-ink); }
.lg-app a { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--lg-link); font-weight: 700; text-decoration: none; }
.lg-app a:hover { text-decoration: underline; }
.lg-app a svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Landing page: with a single main choice, make it big */
.lg-choices .lg-choice.is-primary { padding: 22px 22px; border-radius: 18px; }
.lg-choices .lg-choice.is-primary .ico { width: 52px; height: 52px; border-radius: 16px; }
.lg-choices .lg-choice.is-primary .t { font-size: 19px; }
.lg-choices .lg-choice.is-primary .d { font-size: 14px; }
