/* ==========================================================================
   OShelter — admin sign-in
   Redesigned 2026-09-10. Loaded by resources/views/components/layouts/login.blade.php
   and used by that screen only, so every rule here is scoped to `body.lg`.

   Replaces a page that needed jQuery, Bootstrap, select2, tilt.js, Font Awesome
   and two vendor stylesheets to draw one form. This file is the whole design;
   icons are inline SVG in the Blade view.

   Layout: a brand pane (Accra at dusk under an indigo wash, naming what the
   console manages) beside a quiet pane holding the form. Below 960px the brand
   pane becomes a slim header band so the form stays on the first screen.
   ========================================================================== */

/* ---- tokens ------------------------------------------------------------ */
:root {
  --lg-ink:        #0b1230;   /* near-black, biased blue rather than neutral grey */
  --lg-ink-soft:   #46507a;
  --lg-mute:       #6b7398;
  --lg-brand:      #2f6fed;   /* the blue the rest of the admin panel already uses */
  --lg-brand-deep: #16266b;
  --lg-brand-lift: #5b8ef5;
  --lg-gold:       #e9b44c;   /* one warm accent, spent in one place */
  --lg-paper:      #f6f7fb;
  --lg-surface:    #ffffff;
  --lg-line:       #e3e7f2;
  --lg-line-soft:  #eef1f8;
  --lg-danger:     #c8385a;
  --lg-danger-bg:  #fdf0f3;
  --lg-ok:         #1f9d6b;

  --lg-radius:     18px;
  --lg-radius-sm:  12px;
  --lg-shadow:     0 24px 60px -28px rgba(11, 18, 48, .34), 0 2px 6px rgba(11, 18, 48, .05);
  --lg-ring:       0 0 0 3px rgba(47, 111, 237, .22);

  --lg-font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system,
             "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---- base -------------------------------------------------------------- */
body.lg {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--lg-font);
  color: var(--lg-ink);
  background: var(--lg-paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.lg *,
body.lg *::before,
body.lg *::after { box-sizing: border-box; }

body.lg svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.lg :focus-visible {
  outline: 2px solid var(--lg-brand);
  outline-offset: 2px;
  border-radius: 6px;
}

.lg-shell {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ---- shared bits ------------------------------------------------------- */
.lg-eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .72);
}
.lg-eyebrow--ink { color: var(--lg-brand); }

/* ==========================================================================
   brand pane
   ========================================================================== */
.lg-brand {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: var(--lg-brand-deep);
  isolation: isolate;
}

.lg-brand__photo {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: 50% 42%;
  transform: scale(1.06);
  z-index: -2;
}

/* Deep indigo wash: keeps the skyline readable as texture, never as competition
   for the text. Two layers so the top-left (logo) and lower-left (copy) both sit
   on dark ground whatever the crop does. */
.lg-brand__wash {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 90% at 12% 0%, rgba(47, 111, 237, .42), transparent 58%),
    linear-gradient(196deg, rgba(11, 18, 48, .80) 0%, rgba(22, 38, 107, .90) 46%, rgba(11, 18, 48, .96) 100%);
}

.lg-brand__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-height: 100%;
  padding: 40px 44px;
}

.lg-mark {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 10px 16px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .55);
}
.lg-mark img { display: block; height: 34px; width: auto; }

.lg-brand__body { margin-top: auto; max-width: 30rem; }

.lg-brand__title {
  margin: 12px 0 0;
  font-size: clamp(30px, 3.1vw, 44px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.lg-brand__title em {
  display: block;
  font-style: normal;
  color: var(--lg-gold);
}

.lg-modules {
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}
.lg-modules li {
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  gap: 14px;
}
.lg-modules__ico {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .16);
  color: #cddcff;
}
.lg-modules__ico svg { width: 20px; height: 20px; }
.lg-modules span span { display: block; }
.lg-modules li > span:last-child {
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, .68);
}
.lg-modules b {
  display: block;
  font-size: 14.5px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.005em;
}

.lg-brand__foot {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .05em;
  color: rgba(255, 255, 255, .48);
}

/* ==========================================================================
   form pane
   ========================================================================== */
.lg-pane {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 32px 20px 26px;
  background: var(--lg-paper);
}

.lg-card {
  width: 100%;
  max-width: 27rem;
  padding: 30px 30px 26px;
  border-radius: var(--lg-radius);
  background: var(--lg-surface);
  border: 1px solid var(--lg-line);
  box-shadow: var(--lg-shadow);
}

.lg-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}
/* the logo repeats inside the card only where the brand pane is not on screen */
.lg-card__mark { display: none; height: 30px; width: auto; }

/* Environment badge — three deployments of this console exist and they are
   identical once you are inside, so the ground is named before sign-in. */
.lg-env {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  background: var(--lg-line-soft);
  border: 1px solid var(--lg-line);
  color: var(--lg-ink-soft);
}
.lg-env i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lg-mute);
}
.lg-env--production { background: #fdf0f3; border-color: #f6d7de; color: #9d2340; }
.lg-env--production i { background: var(--lg-danger); }
.lg-env--staging { background: #fff8ea; border-color: #f6e6c4; color: #8a6412; }
.lg-env--staging i { background: var(--lg-gold); }
.lg-env--local { background: #eefaf4; border-color: #cdeee0; color: #146c4b; }
.lg-env--local i { background: var(--lg-ok); }

.lg-title {
  margin: 8px 0 0;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.2;
  text-wrap: balance;
}
.lg-sub {
  margin: 7px 0 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--lg-mute);
}

/* ---- error alert ------------------------------------------------------- */
.lg-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 20px;
  padding: 12px 12px 12px 13px;
  border-radius: var(--lg-radius-sm);
  background: var(--lg-danger-bg);
  border: 1px solid #f6d7de;
  color: #8f2039;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.45;
}
.lg-alert__ico { flex: none; color: var(--lg-danger); }
.lg-alert__ico svg { width: 18px; height: 18px; }
.lg-alert__x {
  flex: none;
  margin-left: auto;
  padding: 2px;
  border: 0;
  background: none;
  color: inherit;
  opacity: .55;
  cursor: pointer;
}
.lg-alert__x:hover { opacity: 1; }
.lg-alert__x svg { width: 15px; height: 15px; stroke-width: 2; }

/* ---- form -------------------------------------------------------------- */
.lg-form {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

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

.lg-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border-radius: var(--lg-radius-sm);
  background: #fbfcfe;
  border: 1.5px solid var(--lg-line);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.lg-input:focus-within {
  background: var(--lg-surface);
  border-color: var(--lg-brand);
  box-shadow: var(--lg-ring);
}
.lg-input__ico { flex: none; color: var(--lg-mute); }
.lg-input__ico svg { width: 18px; height: 18px; display: block; }
.lg-input:focus-within .lg-input__ico { color: var(--lg-brand); }

.lg-input input {
  flex: 1;
  min-width: 0;
  padding: 13px 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 15px;
  color: var(--lg-ink);
}
.lg-input input::placeholder { color: #a7aec9; }
.lg-input input:focus { outline: none; }
/* Chrome paints its own autofill background; keep the field looking like a field. */
.lg-input input:-webkit-autofill,
.lg-input input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--lg-ink);
  -webkit-box-shadow: 0 0 0 40px #fbfcfe inset;
}

.lg-reveal {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--lg-mute);
  cursor: pointer;
  transition: color .16s ease, background .16s ease;
}
.lg-reveal:hover { color: var(--lg-ink-soft); background: var(--lg-line-soft); }
.lg-reveal svg { width: 18px; height: 18px; }
.lg-reveal .lg-reveal__off { display: none; }
.lg-reveal.is-on .lg-reveal__on { display: none; }
.lg-reveal.is-on .lg-reveal__off { display: block; }

.lg-field.is-invalid .lg-input { border-color: #eab0bf; background: #fffafb; }
.lg-field.is-invalid .lg-input:focus-within {
  border-color: var(--lg-danger);
  box-shadow: 0 0 0 3px rgba(200, 56, 90, .18);
}
.lg-err {
  margin: 7px 0 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--lg-danger);
}

/* ---- submit ------------------------------------------------------------ */
.lg-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  margin-top: 4px;
  padding: 14px 18px;
  border: 0;
  border-radius: var(--lg-radius-sm);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .01em;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--lg-brand-lift), var(--lg-brand) 42%, var(--lg-brand-deep));
  box-shadow: 0 14px 26px -14px rgba(47, 111, 237, .85);
  transition: transform .14s ease, box-shadow .18s ease, filter .18s ease;
}
.lg-btn:hover:not([disabled]) {
  transform: translateY(-1px);
  box-shadow: 0 18px 32px -14px rgba(47, 111, 237, .95);
  filter: saturate(1.06);
}
.lg-btn:active:not([disabled]) { transform: translateY(0); }
.lg-btn[disabled] { cursor: progress; opacity: .82; box-shadow: none; }
.lg-btn__arrow { width: 18px; height: 18px; stroke-width: 2.1; }
.lg-btn__spin {
  width: 18px;
  height: 18px;
  stroke-width: 2.4;
  animation: lg-spin 900ms linear infinite;
}
@keyframes lg-spin { to { transform: rotate(360deg); } }

/* ---- helper + legal ---------------------------------------------------- */
.lg-help {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--lg-line-soft);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--lg-mute);
}
.lg-help b { color: var(--lg-ink-soft); font-weight: 700; }
.lg-help__ico { flex: none; color: #aab2cd; }
.lg-help__ico svg { width: 16px; height: 16px; display: block; }

.lg-legal {
  margin: 0;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .03em;
  color: #9aa2c0;
  text-align: center;
}

/* ==========================================================================
   phones and small tablets: the brand pane collapses to a header band and
   the form card tucks up under it.
   ========================================================================== */
@media (max-width: 959.98px) {
  .lg-brand { min-height: 0; }
  .lg-brand__inner {
    gap: 16px;
    padding: calc(18px + env(safe-area-inset-top, 0px)) 22px 24px;
  }
  .lg-brand__photo { background-position: 50% 38%; }
  .lg-mark { padding: 8px 13px; border-radius: 12px; }
  .lg-mark img { height: 27px; }
  .lg-brand__body { max-width: none; }
  .lg-brand__title { font-size: 26px; }
  .lg-brand__title em { display: inline; }
  .lg-modules,
  .lg-brand__foot { display: none; }

  .lg-pane {
    justify-content: flex-start;
    padding: 0 16px calc(22px + env(safe-area-inset-bottom, 0px));
  }
  .lg-card {
    margin-top: -30px;
    max-width: 31rem;
    padding: 26px 24px 24px;
  }
  /* iOS Safari zooms the whole page when a focused input is under 16px;
     touch screens want the taller hit area regardless. */
  .lg-input input { font-size: 16px; }
  .lg-reveal { width: 40px; height: 40px; margin-right: -6px; }
  .lg-btn { padding: 15px 18px; }
}

/* narrow phones: pull everything tighter so the form never scrolls sideways */
@media (max-width: 479.98px) {
  .lg-brand__inner { padding: 16px 18px 20px; }
  .lg-brand__title { font-size: 22px; }
  .lg-eyebrow { font-size: 10px; }
  .lg-card { margin-top: -26px; padding: 22px 18px 20px; }
  .lg-title { font-size: 21px; }
  .lg-sub { font-size: 13px; }
  .lg-legal { font-size: 11px; }
}

/* landscape phones + short browser chrome: drop the hero body so the form
   clears the fold, and let the card sit right under the band */
@media (max-height: 620px) and (max-width: 959.98px) {
  .lg-brand__inner { gap: 10px; padding: 12px 20px 14px; }
  .lg-brand__body { display: none; }
  .lg-mark img { height: 23px; }
  .lg-pane { justify-content: flex-start; }
  .lg-card { margin-top: -16px; padding: 20px 22px 18px; }
  .lg-form { gap: 12px; margin-top: 16px; }
  .lg-card__head { margin-bottom: 14px; }
}

/* ==========================================================================
   desktop: two panes side by side
   ========================================================================== */
@media (min-width: 960px) {
  .lg-shell { grid-template-columns: 1.12fr 1fr; }
  .lg-pane { padding: 40px; }
  /* the brand pane already carries the logo at this width */
  .lg-card__head { margin-bottom: 24px; }
}

@media (min-width: 1400px) {
  .lg-brand__inner { padding: 56px 64px; }
  .lg-card { max-width: 28rem; padding: 34px 34px 30px; }
}

/* Without the brand pane the card needs its own logo. */
@media (max-width: 959.98px) {
  .lg-card__mark { display: block; }
}

/* ==========================================================================
   dark scheme — the console gets used late; the form pane should not glare.
   The brand pane is already dark and is left as it is.
   ========================================================================== */
@media (prefers-color-scheme: dark) {
  :root {
    --lg-ink:       #eef1fb;
    --lg-ink-soft:  #b3bcdd;
    --lg-mute:      #8a93b8;
    --lg-paper:     #0a0f26;
    --lg-surface:   #121a3a;
    --lg-line:      #26305a;
    --lg-line-soft: #1c2447;
    --lg-danger-bg: #2c1424;
    --lg-shadow:    0 26px 64px -30px rgba(0, 0, 0, .8), 0 2px 6px rgba(0, 0, 0, .3);
  }
  .lg-input { background: #0e1531; }
  .lg-input input:-webkit-autofill,
  .lg-input input:-webkit-autofill:focus { -webkit-box-shadow: 0 0 0 40px #0e1531 inset; }
  .lg-input input::placeholder { color: #6e779c; }
  .lg-alert { border-color: #57263a; color: #ffb9c8; }
  .lg-env { background: #1c2447; border-color: #2b3663; color: #b3bcdd; }
  .lg-env--production { background: #2c1424; border-color: #57263a; color: #ff9db2; }
  .lg-env--staging { background: #2a2312; border-color: #4d411f; color: #f3ce85; }
  .lg-env--local { background: #0f2a20; border-color: #1e4b39; color: #7fd8b2; }
  .lg-help__ico { color: #6b749a; }
  .lg-legal { color: #6b749a; }
}

/* ==========================================================================
   motion & entrance choreography
   Set once at page load; `both` keeps items hidden until their cue.
   ========================================================================== */

@keyframes lg-kb {
  from { transform: scale(1.06) translateY(0); }
  to   { transform: scale(1.16) translateY(-1.8%); }
}

/* slow aerial drift behind the brand copy */
.lg-brand__photo {
  will-change: transform;
  animation: lg-kb 26s ease-in-out infinite alternate;
}

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

@keyframes lg-pop {
  from { opacity: 0; transform: scale(.82); }
  to   { opacity: 1; transform: scale(1); }
}

/* ---- brand pane: top to bottom, each item a beat after the last ---- */
body.lg-ready .lg-mark { animation: lg-rise .6s cubic-bezier(.22,.61,.36,1) .05s both; }
body.lg-ready .lg-brand__body .lg-eyebrow { animation: lg-rise .55s cubic-bezier(.22,.61,.36,1) .16s both; }
body.lg-ready .lg-brand__title { animation: lg-rise .65s cubic-bezier(.22,.61,.36,1) .23s both; }
body.lg-ready .lg-modules li:nth-child(1) { animation: lg-rise .55s cubic-bezier(.22,.61,.36,1) .34s both; }
body.lg-ready .lg-modules li:nth-child(2) { animation: lg-rise .55s cubic-bezier(.22,.61,.36,1) .42s both; }
body.lg-ready .lg-modules li:nth-child(3) { animation: lg-rise .55s cubic-bezier(.22,.61,.36,1) .50s both; }
body.lg-ready .lg-brand__foot { animation: lg-rise .55s cubic-bezier(.22,.61,.36,1) .60s both; }

/* ---- form pane: the card assembles, then its contents ---- */
body.lg-ready .lg-card { animation: lg-rise .72s cubic-bezier(.22,.61,.36,1) .08s both; }
body.lg-ready .lg-card__head { animation: lg-rise .55s cubic-bezier(.22,.61,.36,1) .2s both; }
body.lg-ready .lg-card .lg-eyebrow--ink { animation: lg-rise .5s cubic-bezier(.22,.61,.36,1) .26s both; }
body.lg-ready .lg-card .lg-title { animation: lg-rise .6s cubic-bezier(.22,.61,.36,1) .31s both; }
body.lg-ready .lg-card .lg-sub { animation: lg-rise .55s cubic-bezier(.22,.61,.36,1) .36s both; }
body.lg-ready .lg-form .lg-field:nth-child(1) { animation: lg-rise .55s cubic-bezier(.22,.61,.36,1) .44s both; }
body.lg-ready .lg-form .lg-field:nth-child(2) { animation: lg-rise .55s cubic-bezier(.22,.61,.36,1) .52s both; }
body.lg-ready .lg-form .lg-btn { animation: lg-rise .55s cubic-bezier(.22,.61,.36,1) .60s both; }
body.lg-ready .lg-help { animation: lg-rise .55s cubic-bezier(.22,.61,.36,1) .68s both; }
body.lg-ready .lg-legal { animation: lg-rise .55s cubic-bezier(.22,.61,.36,1) .76s both; }

/* the environment badge pops in on top of the card head */
body.lg-ready .lg-env { animation: lg-pop .45s cubic-bezier(.34,1.45,.64,1) .42s both; }

/* a slow golden sheen sweeping the headline accent */
.lg-brand__title em {
  background:
    linear-gradient(100deg, var(--lg-gold) 0%, #f6daa0 38%, var(--lg-gold) 58%, var(--lg-gold) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: lg-shine 8s ease-in-out infinite;
}
@keyframes lg-shine {
  0%, 52% { background-position: 0% 0; }
  100%    { background-position: -220% 0; }
}

/* error banner enters with a settle rather than appearing cold */
.lg-alert { animation: lg-alert-in .55s cubic-bezier(.22,.61,.36,1) both; }
@keyframes lg-alert-in {
  0%   { opacity: 0; transform: translateY(-6px); }
  55%  { opacity: 1; transform: translateY(0); }
  68%  { transform: translateX(-4px); }
  80%  { transform: translateX(4px); }
  92%  { transform: translateX(-2px); }
  100% { transform: translateX(0); }
}

/* ==========================================================================
   micro-interactions
   ========================================================================== */

/* module rows: the icon tile lifts and warms on hover */
.lg-modules__ico { transition: transform .2s ease, background .2s ease, border-color .2s ease; }
.lg-modules li:hover .lg-modules__ico {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, .17);
  border-color: rgba(255, 255, 255, .28);
}

/* input icon pops when its field is focused */
.lg-input__ico { transition: transform .22s ease; }
.lg-input:focus-within .lg-input__ico { transform: scale(1.09); }

/* submit arrow nudges toward the destination half-width */
.lg-btn__arrow { transition: transform .18s ease; }
.lg-btn:hover:not([disabled]) .lg-btn__arrow { transform: translateX(4px); }

/* ---- motion preferences ------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  body.lg *,
  body.lg *::before,
  body.lg *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .lg-btn:hover:not([disabled]) { transform: none; }
  .lg-btn:hover:not([disabled]) .lg-btn__arrow { transform: none; }
  .lg-modules li:hover .lg-modules__ico { transform: none; }
  .lg-input:focus-within .lg-input__ico { transform: none; }
}
