:root {
    --navy: #0b254b;
    --muted: #657085;
    --line: #d8dee9;
    --primary: #0039d8;
    --primary-hover: #002db0;
    --card-shadow: 0 24px 70px rgba(11, 37, 75, .16);
}

* { box-sizing: border-box; }

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

body {
    min-height: 100vh;
    overflow-x: hidden;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    color: var(--navy);
    background: url('/images/login.png') center center / cover no-repeat fixed;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(255,255,255,.12) 0%, rgba(255,255,255,.34) 44%, rgba(255,255,255,.05) 100%),
        radial-gradient(circle at 42% 35%, rgba(255,255,255,.42), transparent 24%);
}

.login-page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(420px, 1.05fr) minmax(430px, .95fr);
    align-items: start;
    padding: 78px clamp(52px, 8vw, 150px) 60px;
    gap: clamp(52px, 5.6vw, 110px);
}

.hero-panel {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    min-height: 620px;
}

.hero-copy {
    width: min(520px, 100%);
    margin-top: 85px;
}

.brand-logo {
    display: block;
    width: min(390px, 92%);
    height: auto;
    margin: 0 0 56px;
}

.hero-copy h1 {
    margin: 0 0 22px;
    font-size: clamp(44px, 3.2vw, 58px);
    line-height: 1.11;
    letter-spacing: -.045em;
    font-weight: 900;
    color: var(--navy);
}

.hero-copy p {
    margin: 0 0 30px;
    color: #3f4d63;
    font-size: clamp(18px, 1.18vw, 22px);
    line-height: 1.45;
    font-weight: 500;
}

.category-row {
    display: grid;
    grid-template-columns: repeat(5, 76px);
    gap: 26px;
    align-items: start;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: #071a39;
}

.category-circle {
    width: 68px;
    height: 68px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.92);
    box-shadow: 0 16px 34px rgba(9, 31, 63, .08);
    font-size: 30px;
}

.category-circle.purple { color: #662cff; }
.category-circle.blue { color: #0077ff; }
.category-circle.green { color: #67bd84; }
.category-circle.orange { color: #ff8a10; }
.category-circle.pink { color: #fb2a72; }

.login-card {
    width: min(570px, 100%);
    min-height: 820px;
    justify-self: start;
    border-radius: 22px;
    background: rgba(255,255,255,.96);
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(255,255,255,.82);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-inner {
    width: 100%;
    padding: 48px 48px 42px;
}

.card-icon {
    display: block;
    width: 132px;
    height: 132px;
    object-fit: contain;
    margin: 0 auto 18px;
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-header h2 {
    margin: 0 0 10px;
    font-size: 32px;
    line-height: 1.05;
    letter-spacing: -.04em;
    font-weight: 900;
    color: var(--navy);
}

.login-header p {
    margin: 0;
    font-size: 18px;
    color: #667085;
    font-weight: 500;
}

.login-alert,
.validation-summary-errors {
    margin: 0 0 18px;
    padding: 13px 16px;
    border-radius: 12px;
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 14px;
    font-weight: 700;
}

.validation-summary-errors ul { margin: 0; padding-left: 18px; }
.validation-summary-valid { display: none; }

.login-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.field-group label {
    display: block;
    margin: 0 0 12px;
    font-size: 15px;
    line-height: 1;
    color: #071a39;
    font-weight: 800;
}

.input-shell {
    height: 58px;
    display: flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
    overflow: hidden;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.input-shell:focus-within {
    border-color: rgba(0,57,216,.42);
    box-shadow: 0 0 0 4px rgba(0,57,216,.10);
}

.input-shell > i {
    width: 52px;
    min-width: 52px;
    display: flex;
    justify-content: center;
    color: #7a8497;
    font-size: 20px;
}

.input-shell input {
    width: 100%;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 0 16px 0 0;
    color: #0b1736;
    font: inherit;
    font-size: 15px;
    font-weight: 500;
}

.input-shell input::placeholder { color: #7c8595; opacity: 1; }

.password-toggle {
    width: 52px;
    min-width: 52px;
    height: 100%;
    border: 0;
    background: transparent;
    color: #7a8497;
    cursor: pointer;
    font-size: 18px;
}

.password-toggle:hover { color: #26324a; }

.forgot-link {
    display: block;
    margin-top: 14px;
    text-align: right;
    color: #0038ff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

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

.field-validation-error {
    display: block;
    margin-top: 8px;
    color: #dc2626;
    font-size: 13px;
    font-weight: 700;
}

.login-button {
    width: 100%;
    height: 58px;
    margin-top: 12px;
    border: 0;
    border-radius: 10px;
    background: var(--primary);
    box-shadow: 0 12px 24px rgba(0,57,216,.20);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .18s ease, background .18s ease;
}

.login-button:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.divider {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 34px 0 23px;
    color: #667085;
    font-size: 15px;
    font-weight: 500;
}

.divider::before,
.divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: #dce1ea;
}

.social-stack {
    display: grid;
    gap: 10px;
}

.social-button {
    height: 52px;
    border: 1px solid #dbe1eb;
    border-radius: 10px;
    background: #fff;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    text-decoration: none;
    color: #071a39;
    font-size: 16px;
    font-weight: 700;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.social-button:hover {
    border-color: #c7cfdd;
    box-shadow: 0 10px 24px rgba(9, 31, 63, .06);
    transform: translateY(-1px);
}

.social-button i {
    grid-column: 1;
    justify-self: end;
    margin-right: 20px;
    font-size: 23px;
}

.social-button span {
    grid-column: 2;
    white-space: nowrap;
}

.google-icon { color: #4285f4; }
.facebook-icon { color: #1877f2; }
.apple-icon { color: #000; }

.signup-text {
    margin: 28px 0 0;
    text-align: center;
    color: #5f687a;
    font-size: 15px;
    font-weight: 500;
}

.signup-text a {
    color: #0038ff;
    font-weight: 600;
    text-decoration: none;
}

@media (max-width: 1200px) {
    .login-page {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 30px;
        padding: 38px 22px;
    }

    .hero-panel {
        min-height: auto;
        justify-content: center;
        text-align: center;
    }

    .hero-copy { margin: 0; }
    .brand-logo { margin: 0 auto 28px; }
    .category-row { justify-content: center; }
    .login-card { justify-self: center; min-height: auto; }
}

@media (max-width: 680px) {
    body { background-position: center top; }

    body::before { background: rgba(255,255,255,.54); }

    .login-page {
        display: block;
        padding: 22px 14px;
    }

    .hero-panel { display: none; }

    .login-card {
        width: 100%;
        border-radius: 20px;
    }

    .card-inner { padding: 34px 20px 28px; }
    .card-icon { width: 104px; height: 104px; }
    .login-header h2 { font-size: 29px; }
    .login-header p { font-size: 16px; }
}
