﻿@import url('https://fonts.googleapis.com/css2?family=Sora:wght@500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
    --brand-900: #17123a;
    --brand-800: #221b45;
    --brand-700: #2c2557;
    --brand-accent: #7f77dd;
    --brand-accent-strong: #5a51c9;
    --ink: #1f2d2c;
    --slate: #5b6b6a;
    --mist: #f4f5fb;
    --paper: #ffffff;
    --amber: #e0a458;
    --danger: #c14a4a;
    --radius: 14px;
    --shadow-lg: 0 24px 60px -20px rgba(23, 18, 58, 0.35);
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--ink);
    background: var(--mist);
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
}

/* ---------- Left brand panel ---------- */
.brand-panel {
    position: relative;
    background: linear-gradient(160deg, var(--brand-900) 0%, var(--brand-800) 65%, var(--brand-700) 100%);
    color: var(--paper);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem 3.5rem;
    overflow: hidden;
}

    .brand-panel::before {
        content: "";
        position: absolute;
        inset: -20% -10% auto auto;
        width: 480px;
        height: 480px;
        border-radius: 50%;
        border: 1px solid rgba(255, 255, 255, 0.10);
    }

    .brand-panel::after {
        content: "";
        position: absolute;
        right: 8%;
        bottom: 6%;
        width: 220px;
        height: 220px;
        border-radius: 50%;
        border: 1px dashed rgba(255, 255, 255, 0.16);
    }

.brand-mark {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: 0.02em;
    z-index: 1;
}

    .brand-mark .seal {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: var(--brand-accent);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1rem;
        position: relative;
    }

.brand-copy {
    z-index: 1;
    max-width: 420px;
}

    .brand-copy .eyebrow {
        text-transform: uppercase;
        letter-spacing: 0.16em;
        font-size: 0.72rem;
        color: rgba(255, 255, 255, 0.65);
        margin-bottom: 0.9rem;
    }

    .brand-copy h1 {
        font-family: 'Sora', sans-serif;
        font-weight: 600;
        font-size: 2.1rem;
        line-height: 1.28;
        margin: 0 0 1rem;
    }

    .brand-copy p {
        color: rgba(255, 255, 255, 0.78);
        line-height: 1.6;
        font-size: 0.95rem;
        margin: 0;
    }

.brand-foot {
    z-index: 1;
    display: flex;
    gap: 2rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.55);
}

/* ---------- Right form panel ---------- */
.form-panel {
    background: var(--paper);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
}

.form-card {
    width: 100%;
    max-width: 380px;
}

    .form-card .kicker {
        font-size: 0.8rem;
        color: var(--slate);
        margin-bottom: 0.35rem;
    }

    .form-card h2 {
        font-family: 'Sora', sans-serif;
        font-size: 1.6rem;
        font-weight: 600;
        margin: 0 0 2rem;
        color: var(--brand-900);
    }

.field {
    margin-bottom: 1.35rem;
}

    .field label {
        display: block;
        font-size: 0.85rem;
        font-weight: 500;
        color: var(--ink);
        margin-bottom: 0.45rem;
    }

    .field .input-wrap {
        position: relative;
    }

    .field input {
        width: 100%;
        padding: 0.8rem 0.95rem;
        border: 1.5px solid #e3e2ef;
        border-radius: 10px;
        font-size: 0.95rem;
        font-family: inherit;
        color: var(--ink);
        background: #fbfbfe;
        transition: border-color 0.15s ease, box-shadow 0.15s ease;
    }

        .field input::placeholder {
            color: #a7a6bb;
        }

        .field input:focus,
        .field select:focus {
            outline: none;
            border-color: var(--brand-accent);
            box-shadow: 0 0 0 4px rgba(127, 119, 221, 0.18);
            background: var(--paper);
        }

    .field select {
        width: 100%;
        padding: 0.8rem 0.95rem;
        border: 1.5px solid #e3e2ef;
        border-radius: 10px;
        font-size: 0.95rem;
        font-family: inherit;
        color: var(--ink);
        background: #fbfbfe;
        transition: border-color 0.15s ease, box-shadow 0.15s ease;
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235b6b6a' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 0.95rem center;
    }

.validation-success {
    background: #eaf3de;
    border: 1px solid #c0dd97;
    color: #3b6d11;
    font-size: 0.85rem;
    padding: 0.7rem 0.9rem;
    border-radius: 10px;
    margin-bottom: 1.3rem;
}

.field .toggle-visibility {
    position: absolute;
    right: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--slate);
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 0.25rem;
}

.row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: -0.4rem 0 1.6rem;
    font-size: 0.85rem;
}

.remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--slate);
}

    .remember input {
        accent-color: var(--brand-accent);
    }

.forgot-link {
    color: var(--brand-accent-strong);
    text-decoration: none;
    font-weight: 500;
}

    .forgot-link:hover {
        text-decoration: underline;
    }

.btn-submit {
    width: 100%;
    padding: 0.85rem;
    border: none;
    border-radius: 10px;
    background: var(--brand-accent);
    color: var(--paper);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Sora', sans-serif;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}

    .btn-submit:hover {
        background: var(--brand-accent-strong);
    }

    .btn-submit:active {
        transform: translateY(1px);
    }

.validation-summary {
    background: #fdecec;
    border: 1px solid #f3c9c9;
    color: var(--danger);
    font-size: 0.85rem;
    padding: 0.7rem 0.9rem;
    border-radius: 10px;
    margin-bottom: 1.3rem;
}

.field-error {
    color: var(--danger);
    font-size: 0.78rem;
    margin-top: 0.35rem;
}

.form-foot {
    margin-top: 1.8rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--slate);
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .login-shell {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .brand-panel {
        padding: 2rem 1.75rem;
        min-height: 220px;
    }

    .brand-copy h1 {
        font-size: 1.5rem;
    }

    .brand-copy p {
        display: none;
    }

    .brand-foot {
        display: none;
    }
}

@media (max-width: 480px) {
    .form-panel {
        padding: 1.5rem 1.25rem;
    }

    .brand-panel {
        padding: 1.75rem 1.25rem;
        min-height: 170px;
    }

    .brand-copy h1 {
        font-size: 1.3rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}
