/* Login page (resources/views/auth/login.blade.php) — "Arch" design.
 *
 * Sizes follow --u = min(1vw, 1.8vh), so the layout shrinks with whichever of width or height is
 * tighter (a 1366x625 laptop window gets a smaller page than a 1366x768 one) and never needs to
 * scroll on desktop. Every size is clamped so it stays readable on tiny and huge screens.
 *   >= 992px  two columns: arched photo + form
 *   < 992px   one column: logo, photo banner, form (tablets, phones)
 *   < 576px   phone spacing
 */
:root {
    --lg-navy: #14264d;
    --lg-brand: #1D428A;
    --lg-green: #2f6fe0;      /* accent (was green): the portal blue */
    --lg-green-dark: #1D428A;
    --lg-gold: #f0b429;
    --lg-gold-soft: #f8d36a;
    --lg-cream: #f2f6fc;
    --lg-muted: #62708a;
    --lg-line: #dde6f3;
    --lg-grad: linear-gradient(135deg, #2f6fe0 0%, #1D428A 100%);
    --lg-grad-hover: linear-gradient(135deg, #3d7df0 0%, #23509f 100%);
    --lg-danger: #c0392b;
    --u: min(1vw, 1.8vh);
}

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

html { -webkit-text-size-adjust: 100%; }

.lg-body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
    background: var(--lg-cream);
    color: var(--lg-navy);
    position: relative;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.lg-dots {
    position: fixed;
    inset: 0;
    background-image: radial-gradient(rgba(20, 38, 77, .06) 1px, transparent 1px);
    background-size: 22px 22px;
    pointer-events: none;
}

.lg-blob { position: fixed; border-radius: 50%; pointer-events: none; }
.lg-blob-1 { right: -10vw; top: -18vh; width: max(34vw, 280px); height: max(34vw, 280px); background: #e1ebfb; }
.lg-blob-2 { right: 6vw; bottom: -12vh; width: max(14vw, 140px); height: max(14vw, 140px); border: 2px dashed var(--lg-gold); opacity: .5; }

/* ---------- Logo (partials/ucs_logo) ---------- */
.ucs-logo {
    display: inline-flex;
    align-items: center;
    gap: .55em;
    color: var(--lg-brand);
    line-height: 1;
    text-decoration: none;
}

.ucs-logo-emblem { height: 2.7em; width: auto; flex: none; display: block; }
.ucs-logo-text { display: flex; flex-direction: column; gap: .3em; min-width: 0; }

.ucs-logo-name {
    font-family: 'Manrope', 'Segoe UI', sans-serif;
    font-weight: 800;
    font-size: .82em;
    letter-spacing: .07em;
    text-transform: uppercase;
    white-space: nowrap;
}

.ucs-logo-tag { font-family: 'Manrope', 'Segoe UI', sans-serif; font-size: .6em; font-weight: 500; letter-spacing: .02em; white-space: nowrap; }

/* ---------- Page grid ---------- */
.lg-page {
    position: relative;
    width: 100%;
    max-width: 1720px;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    column-gap: clamp(40px, calc(var(--u) * 6), 120px);
    padding: clamp(24px, calc(var(--u) * 3.5), 64px) clamp(28px, calc(var(--u) * 5.5), 110px);
}

/* ---------- Left: arched photo ---------- */
.lg-visual { display: flex; justify-content: center; align-items: center; }

.lg-arch-wrap {
    position: relative;
    width: min(100%, calc(var(--u) * 38), 720px);
    aspect-ratio: 720 / 880;
}

.lg-arch-line {
    position: absolute;
    inset: 0;
    transform: translate(5%, -3.2%);
    border: 2px solid var(--lg-gold);
    border-radius: 999px 999px 36px 36px;
}

.lg-arch {
    position: absolute;
    inset: 0;
    border-radius: 999px 999px 36px 36px;
    overflow: hidden;
    background: var(--lg-green-dark);
    box-shadow: 0 30px 70px rgba(20, 38, 77, .18);
}

.lg-arch img { width: 100%; height: 100%; object-fit: cover; object-position: 60% center; display: block; }

.lg-arch::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(21, 48, 107, 0) 42%, rgba(10, 23, 51, .9) 100%);
}

.lg-arch-text { position: absolute; left: 8%; right: 8%; bottom: 7%; color: #fff; z-index: 2; }

.lg-arch-text p {
    margin: 0;
    font-family: 'Manrope', system-ui, sans-serif;
    font-style: normal;
        font-weight: 600;
    font-size: clamp(16px, calc(var(--u) * 1.75), 34px);
    line-height: 1.3;
}

.lg-arch-text span {
    display: block;
    margin-top: .9em;
    font-size: clamp(10px, calc(var(--u) * .75), 14px);
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--lg-gold-soft);
}

.lg-sun {
    position: absolute;
    right: -5%;
    top: -4%;
    width: 23%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--lg-navy);
    color: var(--lg-gold-soft);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 3;
    box-shadow: 0 18px 44px rgba(20, 38, 77, .3);
}

.lg-sun i { font-size: clamp(18px, calc(var(--u) * 2.2), 44px); }
.lg-sun b { margin-top: .5em; font-size: clamp(8px, calc(var(--u) * .62), 12px); letter-spacing: .16em; color: #fff; white-space: nowrap; }

.lg-float {
    position: absolute;
    background: #fff;
    border-radius: clamp(12px, calc(var(--u) * 1.1), 20px);
    padding: clamp(8px, calc(var(--u) * .9), 18px) clamp(12px, calc(var(--u) * 1.2), 22px);
    box-shadow: 0 22px 54px rgba(20, 38, 77, .16);
    display: flex;
    align-items: center;
    gap: clamp(8px, calc(var(--u) * .8), 14px);
    z-index: 3;
    white-space: nowrap;
}

.lg-float-1 { left: -9%; top: 57%; }
.lg-float-2 { right: -8%; top: 39%; }

.lg-float-ic {
    width: clamp(30px, calc(var(--u) * 2.6), 50px);
    aspect-ratio: 1;
    border-radius: 30%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(13px, calc(var(--u) * 1.15), 22px);
    flex: none;
}

.lg-ic-green { background: #e8f0fe; color: var(--lg-green); }
.lg-ic-gold { background: #fbf1da; color: #b98316; }
.lg-float b { display: block; font-size: clamp(12px, calc(var(--u) * 1.1), 21px); }
.lg-float small { font-size: clamp(10px, calc(var(--u) * .72), 13px); color: #6c7891; }

/* ---------- Right: forms ---------- */
.lg-panel { display: flex; justify-content: center; min-width: 0; }
.lg-panel-inner { width: 100%; max-width: 600px; }

.lg-logo { font-size: clamp(18px, calc(var(--u) * 1.6), 32px); margin-bottom: clamp(22px, calc(var(--u) * 4.2), 70px); }

.lg-mini-hero { display: none; }

.lg-view { display: none; animation: lg-in .35s ease; }
.lg-view.is-active { display: block; }

@keyframes lg-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .lg-view { animation: none; }
    .lg-btn, .lg-input, .lg-switch-track, .lg-switch-track::after { transition: none; }
}

.lg-eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: clamp(11px, calc(var(--u) * .78), 14px);
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--lg-green);
}

.lg-eyebrow::before { content: ""; width: clamp(28px, calc(var(--u) * 2.4), 44px); height: 2px; background: var(--lg-green); }

.lg-title {
    margin: clamp(10px, calc(var(--u) * 1.1), 20px) 0 0;
    font-family: 'Manrope', system-ui, sans-serif;
    font-weight: 800;
    font-size: clamp(32px, calc(var(--u) * 4.1), 78px);
    line-height: 1.05;
    letter-spacing: -.035em;
    overflow-wrap: break-word;
}

.lg-title em { color: var(--lg-green); }

.lg-lead {
    margin: clamp(10px, calc(var(--u) * .9), 16px) 0 0;
    font-size: clamp(14px, calc(var(--u) * .98), 18px);
    line-height: 1.6;
    color: var(--lg-muted);
    max-width: 560px;
}

.lg-form { margin-top: clamp(18px, calc(var(--u) * 2.2), 40px); }

.lg-label { display: block; font-size: clamp(13px, calc(var(--u) * .78), 14px); font-weight: 700; margin: clamp(14px, calc(var(--u) * 1.1), 20px) 0 8px; letter-spacing: .02em; }
.lg-form .lg-label:first-of-type { margin-top: 0; }

.lg-input {
    height: clamp(48px, calc(var(--u) * 3.3), 62px);
    border-radius: clamp(12px, calc(var(--u) * .9), 16px);
    background: #fff;
    border: 1.5px solid var(--lg-line);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 14px 0 18px;
    transition: border-color .15s, box-shadow .15s;
}

.lg-input > i { font-size: 17px; color: #9aa3b5; width: 20px; text-align: center; flex: none; }

.lg-input input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    font: inherit;
    font-size: 16px; /* 16px stops iOS zooming into the field */
    color: var(--lg-navy);
}

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

/* Browser autofill (Chrome/Edge/Safari paint saved emails and passwords light blue): keep the field white. */
.lg-input input:-webkit-autofill,
.lg-input input:-webkit-autofill:hover,
.lg-input input:-webkit-autofill:focus,
.lg-input input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #fff inset;
    box-shadow: 0 0 0 1000px #fff inset;
    -webkit-text-fill-color: var(--lg-navy);
    caret-color: var(--lg-navy);
    transition: background-color 9999s ease-out 0s;
}

.lg-input input:autofill { background-color: #fff; }
.lg-input:focus-within { border-color: var(--lg-green); box-shadow: 0 0 0 5px rgba(47, 111, 224, .12); }
.lg-input:focus-within > i { color: var(--lg-green); }
.lg-input.has-error { border-color: var(--lg-danger); box-shadow: 0 0 0 4px rgba(192, 57, 43, .1); }

.lg-eye { border: 0; background: transparent; color: #9aa3b5; font-size: 17px; cursor: pointer; padding: 10px; margin-right: -4px; border-radius: 8px; }
.lg-eye:hover { color: var(--lg-navy); }
.lg-eye:focus-visible { outline: 2px solid var(--lg-green); }

.lg-error { color: var(--lg-danger); font-size: 13.5px; font-weight: 600; margin-top: 8px; }
.lg-error:empty { display: none; }

.lg-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px 16px;
    margin: clamp(14px, calc(var(--u) * 1.3), 24px) 0 clamp(18px, calc(var(--u) * 1.8), 32px);
    font-size: clamp(14px, calc(var(--u) * .85), 15px);
    color: var(--lg-muted);
}

.lg-switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; position: relative; }
.lg-switch input { position: absolute; opacity: 0; pointer-events: none; }
.lg-switch-track { width: 44px; height: 25px; border-radius: 20px; background: #d6d9e0; position: relative; transition: background .2s; flex: none; }
.lg-switch-track::after { content: ""; position: absolute; left: 3px; top: 3px; width: 19px; height: 19px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.lg-switch input:checked + .lg-switch-track { background: var(--lg-green); }
.lg-switch input:checked + .lg-switch-track::after { transform: translateX(19px); }
.lg-switch input:focus-visible + .lg-switch-track { box-shadow: 0 0 0 4px rgba(47, 111, 224, .2); }

.lg-link { border: 0; background: none; padding: 4px 0; font: inherit; font-weight: 700; color: var(--lg-green); cursor: pointer; }
.lg-link:hover { text-decoration: underline; }

.lg-btn {
    width: 100%;
    height: clamp(54px, calc(var(--u) * 3.6), 66px);
    border: 0;
    border-radius: clamp(14px, calc(var(--u) * 1), 18px);
    background: var(--lg-grad);
    color: #fff;
    font: inherit;
    font-weight: 700;
    font-size: clamp(16px, calc(var(--u) * 1.05), 18px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px 0 clamp(20px, calc(var(--u) * 1.6), 28px);
    cursor: pointer;
    box-shadow: 0 18px 40px rgba(29, 66, 138, .32);
    transition: transform .15s, box-shadow .15s, background .15s;
}

.lg-btn:hover { background: var(--lg-grad-hover); transform: translateY(-1px); box-shadow: 0 22px 46px rgba(20, 38, 77, .28); }
.lg-btn:active { transform: translateY(0); }
.lg-btn:focus-visible { outline: 3px solid var(--lg-gold-soft); outline-offset: 3px; }
.lg-btn:disabled { opacity: .7; cursor: wait; }

.lg-btn-ic {
    width: clamp(40px, calc(var(--u) * 2.6), 48px);
    aspect-ratio: 1;
    border-radius: 12px;
    background: var(--lg-gold-soft);
    color: var(--lg-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex: none;
}

.lg-back { border: 0; background: none; padding: 4px 0; margin-bottom: clamp(14px, calc(var(--u) * 1.5), 26px); font: inherit; font-size: 15px; font-weight: 700; color: var(--lg-muted); cursor: pointer; display: inline-flex; gap: 10px; align-items: center; }
.lg-back:hover { color: var(--lg-navy); }

.lg-steps { margin: clamp(16px, calc(var(--u) * 1.4), 24px) 0 clamp(18px, calc(var(--u) * 1.6), 28px); display: grid; gap: clamp(8px, calc(var(--u) * .7), 12px); }
.lg-steps div { display: flex; align-items: center; gap: 14px; font-size: clamp(14px, calc(var(--u) * .85), 15px); color: var(--lg-muted); line-height: 1.4; }
.lg-steps span { width: 30px; height: 30px; flex: none; border-radius: 50%; background: #e8f0fe; color: var(--lg-green); font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; }

.lg-done-ic { width: clamp(60px, calc(var(--u) * 4.2), 76px); aspect-ratio: 1; border-radius: 50%; background: #e8f0fe; color: var(--lg-green); display: flex; align-items: center; justify-content: center; font-size: clamp(24px, calc(var(--u) * 1.8), 32px); margin-bottom: 10px; box-shadow: 0 0 0 10px rgba(47, 111, 224, .07); }
#doneView .lg-btn { margin-top: clamp(22px, calc(var(--u) * 2), 34px); }

.lg-help { margin-top: clamp(20px, calc(var(--u) * 1.9), 32px); font-size: 13.5px; color: #8a93a6; display: flex; flex-wrap: wrap; gap: 6px 24px; }
.lg-help i { color: var(--lg-green); margin-right: 7px; }

/* ---------- Laptops 992–1199: keep the cards inside the arch ---------- */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .lg-float-1 { left: -5%; }
    .lg-float-2 { right: -4%; }
}

/* ---------- Big screens (2K / 4K): keep growing a little, then stop ---------- */
@media (min-width: 2000px) {
    :root { --u: min(24px, 0.9vw, 1.8vh); }
    .lg-input input { font-size: clamp(16px, calc(var(--u) * .85), 20px); }
    .lg-label, .lg-row, .lg-steps div, .lg-help { font-size: clamp(14px, calc(var(--u) * .78), 18px); }
    .lg-panel-inner { max-width: 680px; }
}

/* ---------- Short laptop windows (e.g. 1366x768, 1366x625, 1280x600): tighten so nothing scrolls ---------- */
@media (min-width: 992px) and (max-height: 820px) {
    .lg-page { padding-top: 18px; padding-bottom: 18px; }
    .lg-logo { margin-bottom: 18px; }
    .lg-title { font-size: clamp(28px, calc(var(--u) * 4), 56px); }
    .lg-form { margin-top: 16px; }
    .lg-label { margin: 12px 0 6px; }
    .lg-input { height: 46px; }
    .lg-row { margin: 12px 0 16px; }
    .lg-btn { height: 50px; }
    .lg-btn-ic { width: 38px; }
    .lg-help { margin-top: 14px; }
    .lg-steps { margin: 12px 0 16px; gap: 6px; }
    .lg-back { margin-bottom: 10px; }
}

/* ---------- Tablets and phones: one column ---------- */
@media (max-width: 991.98px) {
    :root { --u: 11px; }

    .lg-page {
        grid-template-columns: 1fr;
        align-items: start;
        padding: clamp(24px, 5vw, 48px) clamp(16px, 6vw, 48px) 32px;
    }

    .lg-visual { display: none; }
    .lg-panel-inner { max-width: 560px; margin: 0 auto; }
    .lg-logo { font-size: clamp(15px, 3.2vw, 22px); margin-bottom: 22px; }

    .lg-mini-hero {
        display: block;
        position: relative;
        height: clamp(140px, 30vw, 240px);
        border-radius: 22px;
        overflow: hidden;
        margin-bottom: 26px;
        background: var(--lg-green-dark);
        box-shadow: 0 18px 40px rgba(20, 38, 77, .15);
    }

    .lg-mini-hero img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; display: block; }
    .lg-mini-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(21, 48, 107, 0) 25%, rgba(10, 23, 51, .85) 100%); }

    .lg-mini-hero p {
        position: absolute;
        left: 18px;
        right: 18px;
        bottom: 14px;
        margin: 0;
        z-index: 1;
        color: #fff;
        font-family: 'Manrope', system-ui, sans-serif;
        font-style: normal;
        font-weight: 600;
        font-size: clamp(14px, 2.6vw, 20px);
        line-height: 1.35;
    }

    .lg-title { font-size: clamp(32px, 6.4vw, 52px); }
    .lg-lead { font-size: 15px; }
    .lg-blob-1 { width: 70vw; height: 70vw; }
}

/* Phones */
@media (max-width: 575.98px) {
    .lg-page { padding: 18px 16px 24px; }
    .lg-logo { margin-bottom: 18px; }
    .lg-mini-hero { border-radius: 18px; margin-bottom: 22px; }
    .lg-mini-hero p { left: 14px; right: 14px; bottom: 12px; }
    .lg-eyebrow { font-size: 11px; letter-spacing: .18em; }
    .lg-help { flex-direction: column; }
    .lg-blob-2 { display: none; }
}

/* Very narrow phones (320–359px) */
@media (max-width: 359.98px) {
    .lg-logo { font-size: 13px; }
    .lg-title { font-size: 29px; }
    .lg-mini-hero { height: 120px; }
    .lg-mini-hero p { font-size: 13px; }
    .lg-row { font-size: 13.5px; }
}

/* Short phones (iPhone SE and similar): slimmer banner so the button stays on screen */
@media (max-width: 991.98px) and (max-height: 720px) {
    .lg-mini-hero { height: 96px; margin-bottom: 18px; }
    .lg-mini-hero p { display: none; }
    .lg-title { font-size: clamp(28px, 6.4vw, 44px); }
    .lg-form { margin-top: 16px; }
    .lg-label { margin: 12px 0 6px; }
    .lg-row { margin: 12px 0 16px; }
}

/* Phones held sideways: little height, skip the banner */
@media (max-width: 991.98px) and (max-height: 500px) {
    .lg-mini-hero { display: none; }
    .lg-page { padding-top: 16px; }
}
