:root {
    --ink: #06212d;
    --teal: #093145;
    --accent: #0a7864;
    --accent-deep: #065447;
    --leaf: #33ab56;
    --sand: #e8f3ef;
    --line: rgba(9, 49, 69, 0.12);
    --text: #1d3340;
    --muted: #5d7380;
    --white: #ffffff;
    --danger: #b42318;
    --font-display: "Fraunces", Georgia, serif;
    --font-body: "Manrope", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
    height: 100%;
    margin: 0;
}

.login-body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--teal);
    min-height: 100%;
}

.login-topbar {
    position: relative;
    z-index: 5;
    background: #fff;
    min-height: 85px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.login-topbar-inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 6px 20px;
    display: flex;
    align-items: center;
    min-height: 85px;
}

.login-top-logo img {
    height: 73px;
    width: auto;
    max-width: min(520px, 92vw);
    object-fit: contain;
    display: block;
    padding: 4px 0;
}

.login-stage {
    position: relative;
    min-height: calc(100vh - 85px);
    overflow: hidden;
}

.login-atmosphere {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 55% at 12% 18%, rgba(51, 171, 86, 0.28), transparent 55%),
        radial-gradient(ellipse 55% 45% at 88% 82%, rgba(10, 120, 100, 0.35), transparent 50%),
        linear-gradient(145deg, #06212d 0%, #093145 42%, #0a4d55 100%);
    animation: atmosphereDrift 18s ease-in-out infinite alternate;
}

.login-atmosphere::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(circle at 30% 40%, #000 20%, transparent 75%);
    opacity: 0.55;
}

.login-atmosphere::after {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    right: -80px;
    top: -90px;
    background: radial-gradient(circle, rgba(51, 171, 86, 0.22), transparent 68%);
    animation: glowPulse 8s ease-in-out infinite;
}

.login-grid {
    position: relative;
    z-index: 1;
    min-height: calc(100vh - 85px);
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
}

.login-brand-pane,
.login-form-pane {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
}

.login-brand-inner {
    max-width: 460px;
    color: var(--white);
    animation: riseIn 700ms ease both;
}

.login-eyebrow {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(232, 243, 239, 0.72);
}

.login-brand-name {
    margin: 0 0 16px;
    font-family: var(--font-display);
    font-size: clamp(42px, 6vw, 64px);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: #fff;
}

.login-tagline {
    margin: 0;
    max-width: 34ch;
    font-size: 17px;
    line-height: 1.55;
    color: rgba(232, 243, 239, 0.82);
}

.login-form-pane {
    background: transparent;
}

.login-form-shell {
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 18px;
    padding: 36px 34px 28px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(10px);
    animation: riseIn 700ms ease 120ms both;
}

.login-form-head h2 {
    margin: 0 0 6px;
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 700;
    color: var(--ink);
}

.login-form-head p {
    margin: 0 0 24px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.login-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #fef3f2;
    border: 1px solid #fecdca;
    color: var(--danger);
    font-size: 13px;
    font-weight: 600;
    animation: shakeIn 420ms ease;
}

.login-alert i { margin-top: 2px; }

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

.login-field label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 700;
    color: var(--teal);
}

.login-input {
    position: relative;
    display: flex;
    align-items: center;
}

.login-input > i:first-child {
    position: absolute;
    left: 14px;
    color: #7f96a2;
    font-size: 15px;
    pointer-events: none;
}

.login-input input {
    width: 100%;
    height: 48px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0 44px 0 42px;
    font-size: 15px;
    font-family: var(--font-body);
    color: var(--text);
    background: #f8fbfa;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.login-input input:focus {
    outline: none;
    background: #fff;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(10, 120, 100, 0.18);
}

.login-eye {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #7f96a2;
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

.login-eye:hover { color: var(--accent); background: rgba(10, 120, 100, 0.08); }

.login-field.is-invalid .login-input input {
    border-color: #f04438;
}

.login-error {
    display: block;
    margin-top: 6px;
    color: var(--danger);
    font-size: 12px;
    font-weight: 600;
}

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 4px 0 20px;
}

.login-remember {
    margin: 0;
    font-weight: 500;
    font-size: 13px;
    color: var(--muted);
    cursor: pointer;
}

.login-remember input {
    margin-right: 6px;
    vertical-align: -1px;
}

.login-submit {
    width: 100%;
    height: 50px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
    color: #fff;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
    box-shadow: 0 12px 24px rgba(10, 120, 100, 0.28);
}

.login-submit:hover,
.login-submit:focus {
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(10, 120, 100, 0.34);
}

.login-submit:active { transform: translateY(0); }

.login-submit i {
    transition: transform 180ms ease;
}

.login-submit:hover i { transform: translateX(3px); }

.login-foot {
    margin-top: 22px;
    text-align: center;
    color: var(--muted);
    font-size: 12px;
}

@keyframes riseIn {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes atmosphereDrift {
    from { transform: scale(1); }
    to { transform: scale(1.04); }
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.55; transform: translate(0, 0); }
    50% { opacity: 0.9; transform: translate(-18px, 12px); }
}

@keyframes shakeIn {
    0% { opacity: 0; transform: translateX(-8px); }
    60% { opacity: 1; transform: translateX(3px); }
    100% { transform: translateX(0); }
}

@media (max-width: 900px) {
    .login-grid {
        grid-template-columns: 1fr;
    }

    .login-brand-pane {
        padding: 40px 24px 12px;
        align-items: flex-end;
        min-height: 34vh;
    }

    .login-brand-inner {
        text-align: center;
        max-width: 100%;
    }

    .login-topbar-inner { justify-content: center; min-height: 72px; }
    .login-top-logo img { height: 56px; }
    .login-stage { min-height: calc(100vh - 72px); }
    .login-grid { min-height: calc(100vh - 72px); }

    .login-brand-name {
        font-size: 40px;
    }

    .login-tagline {
        margin-left: auto;
        margin-right: auto;
        font-size: 15px;
    }

    .login-form-pane {
        padding: 12px 18px 36px;
        align-items: flex-start;
    }

    .login-form-shell {
        padding: 28px 22px 22px;
        border-radius: 16px;
    }
}
