:root {
    --fp-green: #008c4a;
    --fp-green-dark: #005f35;
    --fp-green-soft: #16c784;
    --fp-ink: #071c16;
    --fp-muted: #6b7280;
    --fp-line: #e5e7eb;
    --fp-danger-bg: #fef2f2;
    --fp-danger: #991b1b;
    --fp-white: #ffffff;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    padding: 22px;
    color: var(--fp-ink);
    background: url("/assets/img/bg.jpeg") center center / cover no-repeat fixed;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.page-wrap {
    display: flex;
    min-height: calc(100vh - 44px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
}

.brand-page {
    display: flex;
    min-height: 58px;
    align-items: center;
    justify-content: center;
}

.brand-page img {
    display: block;
    width: min(260px, 72vw);
    max-width: 260px;
    max-height: 74px;
    object-fit: contain;
}

.brand-fallback {
    display: none;
    align-items: center;
    gap: 10px;
    color: var(--fp-green-dark);
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -.04em;
}

.brand-mark {
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--fp-green), var(--fp-green-soft));
    box-shadow: 0 12px 30px rgba(0, 140, 74, .28);
}

.login-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(330px, .9fr);
    width: min(960px, 100%);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .48);
    border-radius: 26px;
    background: rgba(255, 255, 255, .95);
    box-shadow: 0 28px 70px rgba(0, 0, 0, .28);
    backdrop-filter: blur(14px);
}

.login-form-panel,
.login-welcome-panel { min-width: 0; }

.login-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 34px 34px 30px;
    background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.94));
}

.login-form-wrap {
    width: 100%;
    max-width: 395px;
}

.login-title {
    margin: 0;
    text-align: center;
    font-size: clamp(28px, 3.3vw, 42px);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -.045em;
}

.login-subtitle {
    margin: 10px 0 22px;
    color: var(--fp-muted);
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
}

.error-stack {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

.error {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid rgba(153, 27, 27, .12);
    border-radius: 14px;
    color: var(--fp-danger);
    background: var(--fp-danger-bg);
    font-size: 14px;
    line-height: 1.45;
}

.field { margin-bottom: 14px; }

label {
    display: block;
    margin-bottom: 8px;
    color: #18241f;
    font-size: 13px;
    font-weight: 800;
}

.input-wrap { position: relative; }

.input-icon {
    position: absolute !important;
    top: 50% !important;
    left: 15px !important;
    z-index: 2;
    display: grid !important;
    width: 22px !important;
    height: 22px !important;
    place-items: center !important;
    color: #8a948f;
    line-height: 0 !important;
    transform: translateY(-50%) !important;
    pointer-events: none;
}

.input-icon svg {
    display: block !important;
    width: 16px !important;
    height: 16px !important;
    flex: 0 0 auto;
    overflow: visible;
}

input[type="email"],
input[type="password"] {
    width: 100%;
    height: 52px;
    padding: 0 16px 0 46px;
    border: 1px solid var(--fp-line);
    border-radius: 14px;
    outline: none;
    color: var(--fp-ink);
    background: #f6f8f7;
    font: inherit;
    font-size: 15px;
    line-height: 52px;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

input[type="email"]:focus,
input[type="password"]:focus {
    border-color: rgba(0, 140, 74, .62);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 140, 74, .11);
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin: -2px 0 16px;
    font-size: 14px;
}

.remember-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: -2px 0 16px;
    padding: 13px 14px;
    border: 1px solid var(--fp-line);
    border-radius: 16px;
    background: #fbfdfc;
}

.remember-check {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    color: #18241f;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.remember-check input {
    width: 18px;
    height: 18px;
    accent-color: var(--fp-green);
}

.remember-select {
    width: auto;
    min-width: 132px;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid var(--fp-line);
    border-radius: 13px;
    outline: none;
    color: var(--fp-ink);
    background: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
}

.remember-select:disabled {
    opacity: .55;
    background: #f3f5f4;
    cursor: not-allowed;
}

.forgot-link,
.footer-link {
    color: var(--fp-green-dark);
    font-weight: 800;
    text-decoration: none;
}

.forgot-link:hover,
.footer-link:hover { text-decoration: underline; }

.submit-button,
.google-button {
    display: inline-flex;
    width: 100%;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 14px;
    font: inherit;
    font-size: 15px;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.submit-button {
    color: #fff;
    background: linear-gradient(135deg, var(--fp-green), var(--fp-green-dark));
    box-shadow: 0 16px 28px rgba(0, 140, 74, .28);
}

.submit-button:hover,
.google-button:hover { transform: translateY(-1px); }

.submit-button:active,
.google-button:active { transform: translateY(0); }

.divider {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    color: #8a948f;
    font-size: 12px;
}

.divider::before,
.divider::after {
    height: 1px;
    background: var(--fp-line);
    content: "";
}

.google-button {
    border: 1px solid var(--fp-line);
    color: #12211b;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}

.google-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}

.login-footer {
    margin-top: 16px;
    color: var(--fp-muted);
    text-align: center;
    font-size: 13px;
    line-height: 1.55;
}

.login-welcome-panel {
    position: relative;
    display: flex;
    overflow: hidden;
    align-items: center;
    justify-content: center;
    padding: 34px 28px;
    isolation: isolate;
    color: #fff;
    background:
        radial-gradient(circle at 20% 18%, rgba(255,255,255,.18), transparent 32%),
        radial-gradient(circle at 90% 82%, rgba(22,199,132,.30), transparent 36%),
        linear-gradient(135deg, #27c98a 0%, var(--fp-green) 52%, #005c36 100%);
}

.login-welcome-panel::after {
    position: absolute;
    right: -110px;
    bottom: -110px;
    z-index: -1;
    width: 280px;
    height: 280px;
    border-radius: 999px;
    background: rgba(255,255,255,.11);
    content: "";
}

.welcome-content {
    width: min(360px, 100%);
    text-align: center;
}

.welcome-content h2 {
    margin: 0;
    font-size: clamp(28px, 3.2vw, 44px);
    font-weight: 950;
    line-height: 1.08;
    letter-spacing: -.05em;
}

.welcome-content p {
    max-width: 310px;
    margin: 16px auto 0;
    color: rgba(255,255,255,.88);
    font-size: 15px;
    line-height: 1.7;
}

.welcome-pills {
    display: grid;
    gap: 10px;
    margin-top: 28px;
}

.welcome-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 16px;
    color: rgba(255,255,255,.92);
    background: rgba(255,255,255,.12);
    text-align: left;
}

.welcome-pill strong {
    display: block;
    margin-bottom: 2px;
    font-size: 14px;
}

.welcome-pill-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.welcome-pill-text span {
    display: block;
    color: rgba(255,255,255,.76);
    font-size: 12px;
}

.welcome-pill-icon {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    align-self: center;
    place-items: center;
    border-radius: 12px;
    background: rgba(255,255,255,.16);
    line-height: 0;
}

.welcome-pill-icon svg {
    display: block;
    width: 19px;
    height: 19px;
    flex: 0 0 auto;
    overflow: visible;
}

.brand-mark svg,
.error svg,
.google-icon {
    display: block;
    flex: 0 0 auto;
}

.honeypot {
    position: absolute !important;
    top: -99999px !important;
    left: -99999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

@media (max-width: 520px) {
    .remember-box {
        align-items: stretch;
        flex-direction: column;
    }

    .remember-select { width: 100%; }
}

@media (max-width: 920px) {
    body { padding: 16px; }

    .page-wrap {
        min-height: calc(100vh - 32px);
        gap: 14px;
    }

    .login-shell {
        grid-template-columns: 1fr;
        border-radius: 22px;
    }

    .login-welcome-panel {
        order: -1;
        min-height: 220px;
        padding: 30px 24px;
    }

    .welcome-content p { max-width: 520px; }
}

@media (max-width: 640px) {
    body {
        padding: 0;
        background-attachment: scroll;
    }

    .page-wrap {
        min-height: 100vh;
        gap: 0;
    }

    .brand-page {
        width: 100%;
        padding: 18px 18px 10px;
        background: rgba(255,255,255,.10);
        backdrop-filter: blur(4px);
    }

    .brand-page img { max-width: 210px; }

    .login-shell {
        width: 100%;
        min-height: calc(100vh - 86px);
        border-radius: 20px 20px 0 0;
        box-shadow: none;
    }

    .login-form-panel { padding: 26px 18px 30px; }
    .login-form-wrap { max-width: 100%; }

    .login-welcome-panel {
        min-height: 190px;
        padding: 26px 18px;
    }

    .welcome-pills { display: none; }
    .login-title { font-size: 34px; }
    .login-subtitle { margin-bottom: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
