* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", sans-serif;
}

:root {
    --auth-green: #0F5D3B;
    --auth-green-light: #2E8B57;
    --auth-ink: #1f2937;
    --auth-muted: #64748b;
    --auth-border: #d7e0dc;
}

body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: #edf7f0;
    color: var(--auth-ink);
}

.container {
    display: flex;
    width: min(100%, 980px);
    min-height: 580px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(15, 93, 59, 0.08);
    border-radius: 24px;
    box-shadow: 0 22px 60px rgba(15, 93, 59, 0.14);
}

.left {
    display: flex;
    width: 40%;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 48px 36px;
    background: var(--auth-green);
    color: #fff;
    text-align: center;
}

.left img {
    width: min(180px, 72%);
    aspect-ratio: 1;
    object-fit: contain;
    margin-bottom: 24px;
    padding: 8px;
    background: #fff;
    border-radius: 50%;
}

.left h1 {
    margin-bottom: 8px;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
}

.left p {
    max-width: 220px;
    color: #d7ffe4;
    font-size: 1.05rem;
    line-height: 1.5;
}

.right {
    display: flex;
    width: 60%;
    align-items: center;
    padding: clamp(32px, 6vw, 72px);
}

.right form {
    width: min(100%, 440px);
    margin: 0 auto;
}

.right h2 {
    margin-bottom: 28px;
    color: var(--auth-green);
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    line-height: 1.15;
}

.field {
    margin-bottom: 16px;
}

.field label,
.role-label {
    display: block;
    margin-bottom: 7px;
    color: #334155;
    font-size: 0.95rem;
    font-weight: 600;
}

input,
select {
    width: 100%;
    min-height: 50px;
    padding: 12px 16px;
    border: 1px solid var(--auth-border);
    border-radius: 10px;
    background: #fbfdfc;
    color: var(--auth-ink);
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input::placeholder {
    color: #89959f;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--auth-green);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(15, 93, 59, 0.12);
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 58px;
}

.password-toggle {
    position: absolute;
    right: 8px;
    top: 28px;
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--auth-green);
    cursor: pointer;
    font-size: 1.15rem;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    background: #e8f5e9;
}

button[type="submit"] {
    width: 100%;
    min-height: 50px;
    margin-top: 8px;
    padding: 12px 18px;
    border: 0;
    border-radius: 10px;
    background: var(--auth-green);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

button[type="submit"]:hover {
    background: var(--auth-green-light);
    box-shadow: 0 8px 18px rgba(15, 93, 59, 0.18);
    transform: translateY(-1px);
}

button:focus-visible,
a:focus-visible {
    outline: 3px solid #D4AF37;
    outline-offset: 3px;
}

a {
    color: var(--auth-green);
    text-decoration: none;
    font-weight: 700;
}

.right form > p {
    margin-top: 14px;
    color: var(--auth-muted);
    line-height: 1.5;
}

.right form > p a {
    display: inline-block;
    padding: 4px 0;
}

.success{
background:#d4edda;
color:#155724;
padding:12px;
border-radius:8px;
margin-bottom:15px;
}

.error{
background:#f8d7da;
color:#721c24;
padding:12px;
border-radius:8px;
margin-bottom:15px;
}

.role-group {
    margin-bottom: 15px;
}

.role-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    background-color: #ffffff;
    cursor: pointer;
}

.role-select:focus {
    outline: none;
    border-color: var(--auth-green);
}

@media (max-width: 800px) {
    body {
        place-items: start center;
        padding: 16px 12px;
    }

    .container {
        width: min(100%, 560px);
        min-height: auto;
        flex-direction: column;
        border-radius: 20px;
    }

    .left,
    .right {
        width: 100%;
    }

    .left {
        padding: 32px 20px 28px;
    }

    .left img {
        width: 112px;
        margin-bottom: 16px;
    }

    .right {
        padding: 30px 20px 34px;
    }
}

@media (max-width: 420px) {
    body {
        padding: 12px 8px;
    }

    .left,
    .right {
        padding-right: 16px;
        padding-left: 16px;
    }

    .left h1 {
        font-size: 32px;
    }

    input,
    select {
        font-size: 0.95rem;
    }
}