:root {
    --bg-1: #f8fafc;
    --bg-2: #eaf3ff;
    --ink-1: #10243e;
    --ink-2: #4f6278;
    --line: #d7e3f3;
    --card: rgba(255, 255, 255, 0.88);
    --accent: #1769e6;
    --accent-2: #0ea5a4;
    --danger: #d93025;
    --ok: #1a7f37;
    --shadow-lg: 0 20px 55px rgba(16, 36, 62, 0.18);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Be Vietnam Pro", sans-serif;
    color: var(--ink-1);
    background:
        radial-gradient(circle at 20% 15%, #cde6ff 0, #cde6ff 12%, transparent 30%),
        radial-gradient(circle at 80% 85%, #d6f5ef 0, #d6f5ef 12%, transparent 30%),
        linear-gradient(160deg, var(--bg-1) 0%, var(--bg-2) 100%);
    overflow-x: hidden;
}

.auth-bg-shape {
    position: fixed;
    z-index: 0;
    pointer-events: none;
    border-radius: 999px;
    filter: blur(40px);
    opacity: 0.55;
}

.auth-bg-shape-1 {
    width: 360px;
    height: 360px;
    background: #93c5fd;
    top: -100px;
    right: -80px;
    animation: floatY 8s ease-in-out infinite;
}

.auth-bg-shape-2 {
    width: 300px;
    height: 300px;
    background: #99f6e4;
    bottom: -80px;
    left: -80px;
    animation: floatY 10s ease-in-out infinite reverse;
}

.auth-layout {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 28px;
    padding: 30px;
}

.auth-brand {
    background: linear-gradient(145deg, #0f335f 0%, #164a84 60%, #0b7a86 100%);
    color: #f8fbff;
    border-radius: 28px;
    padding: 48px 44px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    animation: fadeSlide 700ms ease both;
}

.brand-badge {
    display: inline-flex;
    width: fit-content;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    letter-spacing: 0.08em;
    font-size: 12px;
    font-weight: 700;
}

.auth-brand h1 {
    margin: 18px 0 12px;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.1;
}

.auth-brand p {
    margin: 0;
    color: rgba(248, 251, 255, 0.9);
    max-width: 60ch;
}

.brand-points {
    margin: 24px 0 0;
    padding-left: 18px;
    display: grid;
    gap: 10px;
}

.auth-card-wrap {
    display: grid;
    place-items: center;
    animation: fadeSlide 780ms ease both;
}

.auth-card {
    width: min(520px, 96%);
    background: var(--card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    padding: 34px 28px;
}

.auth-head h2 {
    margin: 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: 34px;
}

.auth-head p {
    margin: 8px 0 0;
    color: var(--ink-2);
}

.auth-form {
    margin-top: 22px;
    display: grid;
    gap: 12px;
}

.auth-form label {
    font-weight: 600;
    color: #1f3857;
}

.auth-form input {
    height: 48px;
    border-radius: 12px;
    border: 1px solid var(--line);
    padding: 0 14px;
    font-size: 15px;
    background: #fff;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.auth-form select {
    height: 48px;
    border-radius: 12px;
    border: 1px solid var(--line);
    padding: 0 42px 0 14px;
    font-size: 15px;
    font-family: inherit;
    color: var(--ink-1);
    background-color: #fff;
    background-image:
        linear-gradient(45deg, transparent 50%, #5c7592 50%),
        linear-gradient(135deg, #5c7592 50%, transparent 50%);
    background-position:
        calc(100% - 18px) 20px,
        calc(100% - 12px) 20px;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(23, 105, 230, 0.13);
    transform: translateY(-1px);
}

.auth-form select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(23, 105, 230, 0.13);
    transform: translateY(-1px);
}

.auth-form select option[value=""] {
    color: #8aa0b7;
}

.btn-primary {
    margin-top: 8px;
    height: 50px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(90deg, var(--accent) 0%, #1b87f5 60%, var(--accent-2) 100%);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: transform 170ms ease, box-shadow 170ms ease, filter 170ms ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(23, 105, 230, 0.28);
    filter: saturate(1.08);
}

.auth-foot {
    margin: 18px 0 0;
    text-align: center;
    color: var(--ink-2);
}

.auth-foot a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
}

.auth-foot a:hover {
    text-decoration: underline;
}

.field-error,
.form-error {
    color: var(--danger);
    font-size: 13px;
    margin-top: -6px;
}

.flash-wrap {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
}

.flash {
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 14px;
    border: 1px solid transparent;
}

.flash-success {
    background: #ecfdf3;
    border-color: #bbf7d0;
    color: var(--ok);
}

.flash-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: var(--danger);
}

.flash-info {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

@keyframes fadeSlide {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floatY {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(14px);
    }
}

@media (max-width: 980px) {
    .auth-layout {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .auth-brand {
        padding: 28px 24px;
        border-radius: 20px;
    }

    .auth-card {
        width: 100%;
        padding: 24px 18px;
        border-radius: 18px;
    }

    .auth-head h2 {
        font-size: 28px;
    }
}
