:root {
    --navy: #06275f;
    --navy-dark: #031a43;
    --cream: #f5efe4;
    --white: #ffffff;
    --gold: #ffb329;
    --red: #df2027;
    --text: #082454;
    --muted: #6d665e;
    --border: #e4ddd3;
    --shadow: 0 24px 60px rgba(6, 39, 95, 0.16);
}

* {
    box-sizing: border-box;
}

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

body {
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--cream);
    color: var(--text);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.auth-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 46%) minmax(420px, 54%);
}

.auth-brand-panel {
    min-width: 0;
    padding: clamp(30px, 4vw, 64px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: var(--white);
    background:
        radial-gradient(
            circle at 75% 18%,
            rgba(255,255,255,0.08),
            transparent 28%
        ),
        linear-gradient(
            145deg,
            var(--navy),
            var(--navy-dark)
        );
}

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

.auth-logo {
    width: clamp(125px, 10vw, 170px);
    height: clamp(125px, 10vw, 170px);
    object-fit: contain;
}

.auth-brand h1 {
    margin: 0;
    font-size: clamp(24px, 2.5vw, 38px);
    line-height: 1.08;
}

.auth-brand strong {
    display: block;
    margin-top: 8px;
    color: var(--gold);
    letter-spacing: 0.17em;
}

.auth-brand span {
    display: block;
    margin-top: 8px;
    color: var(--gold);
}

.auth-message {
    max-width: 600px;
    padding: 50px 0;
}

.auth-message h2 {
    margin: 0;
    font-size: clamp(44px, 5vw, 76px);
    line-height: 0.95;
}

.auth-message p {
    margin: 24px 0 0;
    max-width: 520px;
    color: rgba(255,255,255,0.84);
    font-size: 17px;
    line-height: 1.75;
}

.auth-credit {
    padding-top: 22px;
    border-top: 1px solid rgba(255,255,255,0.18);
    font-size: 14px;
}

.auth-credit a {
    color: var(--gold);
    font-weight: 800;
}

.auth-form-panel {
    min-width: 0;
    padding: 34px;
    display: grid;
    place-items: center;
}

.auth-card {
    width: min(100%, 560px);
    padding: clamp(28px, 4vw, 48px);
    border: 1px solid var(--border);
    border-radius: 28px;
    background: var(--white);
    box-shadow: var(--shadow);
}

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

.auth-card-header span {
    display: inline-block;
    margin-bottom: 11px;
    color: var(--red);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.auth-card-header h2 {
    margin: 0;
    font-size: clamp(30px, 4vw, 44px);
}

.auth-card-header p {
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 800;
}

.form-control {
    width: 100%;
    min-height: 54px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--white);
    color: var(--text);
    outline: none;
}

.form-control:focus {
    border-color: var(--navy);
    box-shadow: 0 0 0 4px rgba(6,39,95,0.1);
}

.password-field {
    position: relative;
}

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

.password-toggle {
    position: absolute;
    top: 50%;
    right: 9px;
    width: 42px;
    height: 42px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--navy);
    cursor: pointer;
}

.auth-row {
    margin: 4px 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    font-size: 14px;
}

.remember-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.forgot-link {
    color: var(--navy);
    font-weight: 800;
}

.auth-button {
    width: 100%;
    min-height: 56px;
    border: 0;
    border-radius: 15px;
    color: var(--white);
    font-weight: 800;
    cursor: pointer;
}

.auth-button.admin {
    background: var(--navy);
}

.auth-button.registry {
    background: var(--red);
}

.auth-back {
    display: block;
    margin-top: 24px;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.auth-alert {
    margin-bottom: 22px;
    padding: 14px 16px;
    border-radius: 13px;
    font-size: 14px;
    line-height: 1.5;
}

.auth-alert.error {
    color: #85151a;
    background: #fde8e9;
    border: 1px solid #f6b9bc;
}

.auth-alert.success {
    color: #15603b;
    background: #e8f8ef;
    border: 1px solid #afe1c4;
}

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

    .auth-brand-panel {
        min-height: auto;
        padding: 26px 22px 34px;
    }

    .auth-message {
        padding: 42px 0 28px;
    }

    .auth-message h2 {
        font-size: clamp(40px, 11vw, 58px);
    }

    .auth-form-panel {
        padding: 34px 18px;
    }
}

@media (max-width: 560px) {
    .auth-brand {
        align-items: flex-start;
        gap: 14px;
    }

    .auth-logo {
        width: 90px;
        height: 90px;
    }

    .auth-brand h1 {
        font-size: 19px;
    }

    .auth-brand strong {
        font-size: 11px;
    }

    .auth-brand span {
        font-size: 12px;
    }

    .auth-message h2 {
        font-size: 40px;
    }

    .auth-form-panel {
        padding: 26px 14px;
    }

    .auth-card {
        padding: 25px 18px;
        border-radius: 22px;
    }

    .auth-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }
}
