/* Staff login pages: Google sign-in (f/vcsd418.php, plain /index.php) and the
   password form (f/login.php: ?united / ?without_google / d1 / q2).
   One responsive layout, form column left + brand aside right (aside >=1025px
   only). Both brands share the orange accent; .lp--l4g only swaps the logo
   (rendered white — the L4G PNG is black). Scoped under .lp. */

.lp {
    --lp-accent: #F1B822;
    --lp-accent-hover: #FFC93C;
    --lp-on-accent: #111111;
    --lp-accent-text: #F1B822;
    --lp-ring: rgba(241, 184, 34, 0.45);

    --lp-bg: #0f1012;
    --lp-surface: #17181b;
    --lp-border: rgba(255, 255, 255, 0.12);
    --lp-border-strong: rgba(255, 255, 255, 0.22);
    --lp-text: #f4f4f5;
    --lp-muted: #a1a1aa;
    --lp-danger: #f87171;
    --lp-danger-bg: rgba(248, 113, 113, 0.1);
}

html,
.lp-body {
    margin: 0;
    min-height: 100%;
    background: #0f1012;
}

.lp-body {
    -webkit-font-smoothing: antialiased;
}

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

.lp {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    overflow-x: hidden;
    background: var(--lp-bg);
    color: var(--lp-text);
    font-family: "Poppins", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

.lp svg {
    flex-shrink: 0;
}

/* ===== Brand aside (desktop) ===== */
.lp-aside {
    position: relative;
    flex: 1 1 55%;
    display: none;
    overflow: hidden;
    background: #111;
}

.lp-aside__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lp-aside__shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.15) 40%, rgba(0, 0, 0, 0.75) 100%);
}

.lp-aside__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: 48px 56px;
}

.lp-aside__eyebrow {
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
}

.lp-aside__title {
    margin: 0;
    max-width: 520px;
    font-size: 36px;
    font-weight: 600;
    line-height: 1.2;
    color: #fff;
}

.lp-accent-text {
    color: var(--lp-accent-text);
}

.lp-aside__footer {
    margin: 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

/* ===== Logo (the L4G PNG is black — rendered white on dark surfaces) ===== */
.lp-logo {
    display: block;
    height: auto;
    width: auto;
}

.lp--l4g .lp-logo {
    filter: brightness(0) invert(1);
}

/* The aside content is a flex column: without align-self the logo stretches to
   max-width (the SVG then centres its glyphs, the PNG distorts). */
/* Sized by WIDTH, not height: both files are "LIMOS4..." edge to edge, the L4G
   PNG just adds a GERMANY line below, so equal widths = equal wordmarks. */
.lp-logo--aside {
    align-self: flex-start;
    width: 212px;
    height: auto;
}

.lp-logo--card {
    width: 140px;
    height: auto;
    margin: 0 auto 28px;
}

/* ===== Form column ===== */
.lp-main {
    flex: 1 1 45%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 40px 16px 24px;
    background:
        radial-gradient(120% 80% at 50% 0%, rgba(255, 255, 255, 0.04) 0%, transparent 60%),
        var(--lp-bg);
}

.lp-card {
    width: 100%;
    max-width: 400px;
    padding: 32px 24px;
    background: var(--lp-surface);
    border: 1px solid var(--lp-border);
    border-radius: 16px;
    box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.6);
}

.lp-card__title {
    margin: 0 0 4px;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--lp-text);
}

.lp-card__subtitle {
    margin: 0 0 24px;
    color: var(--lp-muted);
}

.lp-main__footer {
    margin: 24px 0 0;
    font-size: 12px;
    color: var(--lp-muted);
}

/* ===== Error alert ===== */
.lp-alert {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 0 0 20px;
    padding: 12px 14px;
    border: 1px solid rgba(248, 113, 113, 0.35);
    border-radius: 10px;
    background: var(--lp-danger-bg);
    color: #fecaca;
}

.lp-alert p {
    margin: 0;
}

.lp-alert__icon {
    width: 18px;
    height: 18px;
    margin-top: 1px;
    fill: none;
    stroke: var(--lp-danger);
    stroke-width: 2;
    stroke-linecap: round;
}

/* ===== Fields ===== */
.lp-form {
    margin: 0;
}

.lp-field {
    margin-bottom: 18px;
}

.lp-field__label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--lp-text);
}

.lp-field__control {
    position: relative;
}

.lp-field__icon {
    position: absolute;
    left: 14px;
    top: 50%;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    fill: none;
    stroke: var(--lp-muted);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
    transition: stroke 0.15s;
}

.lp-input {
    display: block;
    width: 100%;
    height: 48px;
    padding: 0 14px 0 44px;
    border: 1px solid var(--lp-border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--lp-text);
    font: inherit;
    font-size: 15px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    -webkit-appearance: none;
    appearance: none;
}

.lp-input--password {
    padding-right: 52px;
}

.lp-input:hover {
    border-color: var(--lp-border-strong);
}

.lp-input:focus {
    border-color: var(--lp-accent-text);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px var(--lp-ring);
}

.lp-input:focus ~ .lp-field__icon,
.lp-field__control:focus-within .lp-field__icon {
    stroke: var(--lp-accent-text);
}

.lp-input[aria-invalid="true"],
.lp-field--empty .lp-input {
    border-color: var(--lp-danger);
}

/* Chrome autofill keeps the dark surface */
.lp-input:-webkit-autofill,
.lp-input:-webkit-autofill:hover,
.lp-input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--lp-text);
    -webkit-box-shadow: 0 0 0 1000px #202126 inset;
    caret-color: var(--lp-text);
    transition: background-color 9999s;
}

.lp-field__error {
    display: none;
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--lp-danger);
}

.lp-field--empty .lp-field__error {
    display: block;
}

.lp-field__hint {
    margin: 6px 0 0;
    font-size: 12px;
    color: #fbbf24;
}

.lp-field__hint:empty {
    display: none;
}

/* ===== Show / hide password ===== */
.lp-reveal {
    position: absolute;
    right: 4px;
    top: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--lp-muted);
    cursor: pointer;
    transform: translateY(-50%);
}

.lp-reveal:hover {
    color: var(--lp-text);
}

.lp-reveal:focus-visible {
    outline: 2px solid var(--lp-accent-text);
    outline-offset: -2px;
}

.lp-reveal svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.lp-reveal__hide,
.lp-reveal[aria-pressed="true"] .lp-reveal__show {
    display: none;
}

.lp-reveal[aria-pressed="true"] .lp-reveal__hide {
    display: block;
}

/* ===== Submit ===== */
.lp-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 48px;
    margin-top: 8px;
    border: 0;
    border-radius: 10px;
    background: var(--lp-accent);
    color: var(--lp-on-accent);
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.08s;
}

.lp-submit:hover {
    background: var(--lp-accent-hover);
}

.lp-submit:active {
    transform: scale(0.99);
}

.lp-submit:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--lp-bg), 0 0 0 5px var(--lp-accent-text);
}

.lp-submit:disabled {
    cursor: progress;
    opacity: 0.85;
}

.lp-submit__spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: lp-spin 0.7s linear infinite;
}

.lp-submit.is-loading .lp-submit__spinner {
    display: inline-block;
}

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

/* ===== Divider + Google link ===== */
.lp-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0 16px;
    font-size: 12px;
    color: var(--lp-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.lp-divider::before,
.lp-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--lp-border);
}

.lp-alt {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 44px;
    border: 1px solid var(--lp-border);
    border-radius: 10px;
    color: var(--lp-text);
    font-weight: 500;
    text-decoration: none;
    transition: border-color 0.15s, background 0.15s;
}

.lp-alt:hover {
    border-color: var(--lp-border-strong);
    background: rgba(255, 255, 255, 0.04);
    color: var(--lp-text);
    text-decoration: none;
}

.lp-alt:focus-visible {
    outline: 2px solid var(--lp-accent-text);
    outline-offset: 2px;
}

.lp-alt svg {
    width: 18px;
    height: 18px;
}

.lp [hidden] {
    display: none !important;
}

.lp-alt__icon {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.lp-card__note {
    margin: 8px 0 0;
    font-size: 12px;
    text-align: center;
    color: var(--lp-muted);
}

/* ===== Google sign-in (f/vcsd418.php) ===== */
.lp-google {
    position: relative;
}

/* Our visual button. Google's iframe paints with a fallback font and swaps to
   Google Sans ~1s later; we never show that iframe, only this static face. */
.lp-gbtn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 44px;
    border-radius: 10px;
    background: #ffffff;
    color: #1f1f1f;
    font-size: 15px;
    font-weight: 500;
    transition: background 0.15s, box-shadow 0.15s;
}

.lp-gbtn svg {
    width: 18px;
    height: 18px;
}

/* The iframe sits on top, so hover/focus land on it — style via the parent. */
.lp-google:hover .lp-gbtn {
    background: #f1f3f4;
}

.lp-google:focus-within .lp-gbtn {
    box-shadow: 0 0 0 3px var(--lp-bg), 0 0 0 5px var(--lp-accent-text);
}

/* The real GSI button, exactly over the face, invisible but clickable. */
.lp-google .g_id_signin {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    opacity: 0.0001;
}

.lp-google .g_id_signin iframe {
    margin: 0 !important;
}

.lp-google__status {
    margin-top: 12px;
    justify-content: center;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--lp-muted);
}

.lp-google__status .lp-submit__spinner {
    display: inline-block;
}

/* ===== Responsive ===== */
@media (min-width: 480px) {
    .lp-card {
        padding: 40px 36px;
    }
}

@media (min-width: 1025px) {
    .lp-aside {
        display: block;
    }

    .lp-main {
        flex: 0 0 520px;
        padding: 48px;
    }

    .lp-logo--card {
        display: none;
    }

    .lp-main__footer {
        display: none;
    }
}

@media (min-width: 1440px) {
    .lp-main {
        flex-basis: 600px;
    }

    .lp-aside__title {
        font-size: 42px;
    }

    .lp-logo--aside {
        width: 240px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lp-aside__video {
        display: none;
    }

    .lp-submit__spinner {
        animation-duration: 2s;
    }
}
