:root {
    --auth-bg: #f4f7fb;
    --auth-ink: #172033;
    --auth-muted: #637089;
    --auth-primary: #176b87;
    --auth-primary-dark: #0d4b63;
    --auth-accent: #f4b740;
    --auth-card: #ffffff;
    --auth-border: #dce4ef;
    --auth-shadow: 0 24px 70px rgba(23, 32, 51, 0.16);
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--auth-ink);
    background:
        radial-gradient(circle at 18% 20%, rgba(244, 183, 64, 0.2), transparent 28%),
        linear-gradient(135deg, #eef6f8 0%, var(--auth-bg) 46%, #f9fbfd 100%);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.auth-shell {
    width: min(1120px, calc(100% - 32px));
    min-height: 100vh;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    align-items: center;
    gap: 48px;
    padding: 40px 0;
}

.auth-shell.single {
    grid-template-columns: minmax(320px, 440px);
    justify-content: center;
}

.auth-panel {
    min-height: 600px;
    padding: 48px;
    border-radius: 28px;
    background:
        linear-gradient(155deg, rgba(13, 75, 99, 0.96), rgba(23, 107, 135, 0.9)),
        linear-gradient(45deg, rgba(244, 183, 64, 0.35), transparent);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--auth-shadow);
    overflow: hidden;
    position: relative;
}

.auth-panel::after {
    content: "";
    position: absolute;
    inset: auto -18% -22% 30%;
    height: 280px;
    background: rgba(255, 255, 255, 0.12);
    transform: rotate(-8deg);
    border-radius: 32px;
}

.auth-brand,
.auth-copy,
.auth-highlights {
    position: relative;
    z-index: 1;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-mark {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    color: var(--auth-primary-dark);
    background: #ffffff;
    font-weight: 800;
    font-size: 28px;
}

.brand-kicker {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.auth-brand h1,
.auth-copy h2,
.auth-card-header h2 {
    margin: 0;
    letter-spacing: 0;
}

.auth-brand h1 {
    font-size: 28px;
    font-weight: 800;
}

.auth-copy {
    max-width: 560px;
}

.auth-copy h2 {
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.02;
    font-weight: 800;
}

.auth-copy p {
    width: min(480px, 100%);
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 17px;
    line-height: 1.7;
}

.auth-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.auth-highlights span {
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.1);
    font-size: 14px;
    font-weight: 700;
}

.auth-card {
    width: 100%;
    padding: 36px;
    border: 1px solid rgba(220, 228, 239, 0.9);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--auth-shadow);
    backdrop-filter: blur(18px);
}

.auth-card-header {
    margin-bottom: 28px;
}

.auth-card-header p {
    margin: 0 0 8px;
    color: var(--auth-primary);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.auth-card-header h2 {
    color: var(--auth-ink);
    font-size: 32px;
    font-weight: 800;
}

.auth-card-header span {
    display: block;
    margin-top: 10px;
    color: var(--auth-muted);
    line-height: 1.6;
}

.auth-form {
    display: grid;
    gap: 18px;
}

.form-field {
    display: grid;
    gap: 8px;
}

.form-field label {
    color: #334158;
    font-size: 14px;
    font-weight: 750;
}

.field-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.field-row a,
.auth-link-center {
    color: var(--auth-primary);
    font-size: 14px;
    font-weight: 750;
    text-decoration: none;
}

.field-row a:hover,
.auth-link-center:hover {
    color: var(--auth-primary-dark);
    text-decoration: underline;
}

.form-control {
    min-height: 50px;
    border: 1px solid var(--auth-border);
    border-radius: 14px;
    color: var(--auth-ink);
    background: #fbfdff;
    font-size: 15px;
}

.form-control:focus {
    border-color: rgba(23, 107, 135, 0.55);
    box-shadow: 0 0 0 4px rgba(23, 107, 135, 0.12);
}

.password-field {
    position: relative;
}

.password-field .form-control {
    padding-right: 72px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    min-width: 52px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    color: var(--auth-primary-dark);
    background: #e9f4f6;
    font-size: 13px;
    font-weight: 800;
}

.password-toggle:hover {
    background: #d7ecf0;
}

.btn-auth {
    width: 100%;
    min-height: 52px;
    border: 0;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--auth-primary), var(--auth-primary-dark));
    font-weight: 800;
    box-shadow: 0 14px 28px rgba(23, 107, 135, 0.28);
}

.btn-auth:hover {
    filter: brightness(1.04);
}

.auth-link-center {
    justify-self: center;
}

.alert {
    border: 0;
    border-radius: 14px;
    font-size: 14px;
}

@media (max-width: 900px) {
    .auth-shell {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .auth-panel {
        min-height: auto;
        padding: 32px;
    }

    .auth-copy {
        margin: 64px 0;
    }
}

@media (max-width: 540px) {
    .auth-shell {
        width: min(100% - 20px, 440px);
        padding: 20px 0;
    }

    .auth-panel {
        display: none;
    }

    .auth-card {
        padding: 26px 20px;
        border-radius: 18px;
    }

    .auth-card-header h2 {
        font-size: 28px;
    }
}
