/* The sign-in page. One screen, no photographs, no slider.
 *
 * The page was a photograph behind a glass card, with a script that swapped
 * the photograph every few seconds. The owner asked for none of that: a
 * clean page that looks like the product. Everything here is drawn by CSS —
 * the mark, the glow, the grid — so there is nothing to load and nothing to
 * go missing on a server without the image folder. */

:root {
  --lg-ground: #f7f5f2;
  --lg-card: #ffffff;
  --lg-panel: #1d1d1f;
  --lg-panel-ink: #f5f5f4;
  --lg-panel-muted: #a9a8ad;
  --lg-ink: #1d1d1f;
  --lg-muted: #6b6b72;
  --lg-line: #e8e5e0;
  --lg-red: #c8281e;
  --lg-red-dark: #a51f17;
  --lg-red-soft: #fbeae8;
  --lg-green: #1b8a4c;
  --lg-radius: 22px;
  --lg-font: 'Poppins', 'Open Sans', system-ui, -apple-system, sans-serif;
}

html, body { height: 100%; }

body.lg-page {
  margin: 0;
  font-family: var(--lg-font);
  color: var(--lg-ink);
  background:
    radial-gradient(900px 600px at -10% -20%, rgba(200, 40, 30, 0.12), transparent 60%),
    radial-gradient(700px 500px at 110% 110%, rgba(200, 40, 30, 0.08), transparent 60%),
    var(--lg-ground);
  -webkit-font-smoothing: antialiased;
}

/* A faint grid, so the ground reads as a surface and not as a void. */
body.lg-page::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(29, 29, 31, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 29, 31, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}

.lg-wrap {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  position: relative;
}

.lg-card {
  width: 100%;
  max-width: 920px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: var(--lg-card);
  border-radius: var(--lg-radius);
  border: 1px solid rgba(29, 29, 31, 0.06);
  box-shadow:
    0 30px 70px rgba(29, 29, 31, 0.14),
    0 2px 6px rgba(29, 29, 31, 0.05);
  overflow: hidden;
}

/* ── The brand panel ────────────────────────────────────────────────── */

.lg-brand {
  background:
    radial-gradient(500px 360px at 100% 0%, rgba(200, 40, 30, 0.35), transparent 65%),
    var(--lg-panel);
  color: var(--lg-panel-ink);
  padding: 40px 40px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
}

.lg-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.lg-mark__dot {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: linear-gradient(135deg, #e0483c, var(--lg-red));
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.5px;
  color: #fff;
  box-shadow: 0 10px 24px rgba(200, 40, 30, 0.35);
}

.lg-mark__name {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.lg-mark__name span { color: #ff8a80; }

.lg-brand h1 {
  font-size: 30px;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.8px;
  margin: 0 0 10px;
  text-wrap: balance;
}

.lg-brand p {
  margin: 0;
  color: var(--lg-panel-muted);
  font-size: 14px;
  line-height: 1.55;
  max-width: 34ch;
}

.lg-bullets {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.lg-bullets li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: #d9d8dc;
}

.lg-bullets li::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff8a80;
  flex: none;
}

.lg-brand__foot {
  font-size: 12px;
  color: var(--lg-panel-muted);
  letter-spacing: 0.2px;
}

/* ── The form ───────────────────────────────────────────────────────── */

.lg-form {
  padding: 40px 40px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.lg-form h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.4px;
  margin: 0 0 4px;
}

.lg-form .lg-lead {
  margin: 0 0 24px;
  color: var(--lg-muted);
  font-size: 13.5px;
}

.lg-field { margin-bottom: 16px; }

.lg-field label {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--lg-ink);
  margin-bottom: 6px;
}

.lg-input {
  position: relative;
}

.lg-input input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--lg-line);
  border-radius: 12px;
  background: #fbfaf8;
  font: inherit;
  font-size: 14.5px;
  color: var(--lg-ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}

.lg-input input::placeholder { color: #a7a6ab; }

.lg-input input:focus {
  background: #fff;
  border-color: var(--lg-red);
  box-shadow: 0 0 0 4px rgba(200, 40, 30, 0.12);
}

.lg-input--password input { padding-right: 74px; }

.lg-eye {
  position: absolute;
  right: 6px;
  top: 6px;
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--lg-muted);
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
}

.lg-eye:hover, .lg-eye:focus-visible { background: var(--lg-red-soft); color: var(--lg-red); outline: none; }

.input-error {
  display: block;
  min-height: 0;
  margin-top: 5px;
  font-size: 12px;
  color: var(--lg-red);
}

.form-message { font-size: 13px; }
.form-message:not(:empty) { margin-bottom: 14px; }

.lg-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 0 18px;
  font-size: 13px;
}

.lg-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--lg-muted);
  cursor: pointer;
}

.lg-check input {
  width: 17px;
  height: 17px;
  accent-color: var(--lg-red);
  margin: 0;
}

.lg-link {
  color: var(--lg-red);
  font-weight: 500;
  text-decoration: none;
}

.lg-link:hover { text-decoration: underline; color: var(--lg-red-dark); }

.lg-btn {
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(180deg, #d9342a, var(--lg-red));
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.1px;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(200, 40, 30, 0.28);
  transition: transform .08s ease, box-shadow .15s, filter .15s;
}

.lg-btn:hover { filter: brightness(1.04); }
.lg-btn:active { transform: translateY(1px); box-shadow: 0 6px 14px rgba(200, 40, 30, 0.25); }
.lg-btn:focus-visible { outline: 3px solid rgba(200, 40, 30, 0.35); outline-offset: 2px; }

.lg-captcha { margin: 0 0 16px; }

.lg-foot {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--lg-line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--lg-muted);
}

.lg-foot .lg-ok {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lg-foot .lg-ok::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lg-green);
}

/* ── What the server says back (messages/success, messages/danger) ── */

.form-message .alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.45;
  border: 1px solid transparent;
}

.form-message .alert strong { font-weight: 500; }

.form-message .alert::before {
  content: '';
  flex: none;
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
}

.form-message .alert-success {
  background: #e8f6ec;
  border-color: #bfe5cb;
  color: #14532d;
}
.form-message .alert-success::before { background: var(--lg-green); }

.form-message .alert-danger,
.form-message .alert-warning {
  background: var(--lg-red-soft);
  border-color: #f3c3bf;
  color: #7a1a13;
}
.form-message .alert-danger::before,
.form-message .alert-warning::before { background: var(--lg-red); }

/* ── The loader the form script shows while a sign-in is in flight ─── */

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(247, 245, 242, 0.72);
  backdrop-filter: blur(2px);
}

.overlay .loader {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  border: 4px solid rgba(200, 40, 30, 0.18);
  border-top-color: var(--lg-red);
  animation: lg-spin .8s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .overlay .loader { animation-duration: 2s; }
  .lg-btn { transition: none; }
}

/* ── Phone ──────────────────────────────────────────────────────────── */

@media (max-width: 760px) {
  .lg-card { grid-template-columns: 1fr; max-width: 460px; }
  .lg-brand { padding: 26px 24px 22px; gap: 18px; }
  .lg-brand h1 { font-size: 22px; }
  .lg-bullets { display: none; }
  .lg-brand__foot { display: none; }
  .lg-form { padding: 26px 24px 24px; }
}
