:root {
    --auth-ink: #10203a;
    --auth-muted: #637086;
    --auth-line: #d9e0ea;
    --auth-surface: #ffffff;
    --auth-canvas: #f4f7fb;
    --auth-primary: #3659d9;
    --auth-primary-hover: #2849bf;
    --auth-accent: #14a87b;
    --auth-danger-bg: #fff1f2;
    --auth-danger: #b4233c;
    --auth-warning-bg: #fff8e7;
    --auth-warning: #8a5d00;
}

* { box-sizing: border-box; }

body {
    background: var(--auth-canvas);
    color: var(--auth-ink);
    font-family: "Segoe UI", Tahoma, sans-serif;
    margin: 0;
}

.auth-page {
    display: grid;
    grid-template-columns: minmax(360px, 0.9fr) minmax(480px, 1.1fr);
    min-height: 100vh;
}

.auth-intro {
    background: #10203a;
    color: #edf4ff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: 3rem clamp(2rem, 6vw, 6rem);
    position: relative;
}

.auth-intro::after {
    background-image: linear-gradient(#ffffff12 1px, transparent 1px), linear-gradient(90deg, #ffffff12 1px, transparent 1px);
    background-size: 28px 28px;
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
}

.brand, .intro-content, .intro-footer { position: relative; z-index: 1; }
.brand { color: #ffffff; font-size: 1.45rem; font-weight: 800; text-decoration: none; }
.brand span { color: #75e6c2; }
.intro-content { max-width: 420px; }
.role-label { color: #75e6c2; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.09em; margin: 0 0 1rem; text-transform: uppercase; }
.intro-content h1 { color: #ffffff; font-size: clamp(2.1rem, 4vw, 3.35rem); line-height: 1.08; margin: 0; }
.intro-content p:not(.role-label) { color: #c7d3e6; font-size: 1.05rem; line-height: 1.7; margin: 1.25rem 0 0; }
.intro-footer { color: #9eafc7; font-size: 0.85rem; }

.auth-panel { align-items: center; display: flex; justify-content: center; padding: 2rem; }
.auth-card { max-width: 410px; width: 100%; }
.auth-card h2 { color: var(--auth-ink); font-size: 1.85rem; line-height: 1.2; margin: 0; }
.auth-card > p { color: var(--auth-muted); line-height: 1.6; margin: 0.65rem 0 2rem; }

.form-group, .field { margin-bottom: 1.2rem; }
label { color: #36445a; display: block; font-size: 0.88rem; font-weight: 700; margin-bottom: 0.5rem; }
input, textarea {
    background: var(--auth-surface);
    border: 1px solid var(--auth-line);
    border-radius: 6px;
    color: var(--auth-ink);
    font: inherit;
    min-height: 48px;
    padding: 0.7rem 0.85rem;
    transition: border-color 0.15s, box-shadow 0.15s;
    width: 100%;
}
textarea { min-height: 86px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #95a2b4; }
input:focus, textarea:focus { border-color: var(--auth-primary); box-shadow: 0 0 0 3px #3659d929; outline: none; }

.btn {
    background: var(--auth-primary);
    border: 0;
    border-radius: 6px;
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    min-height: 48px;
    padding: 0.7rem 1rem;
    transition: background 0.15s, transform 0.15s;
    width: 100%;
}
.btn:hover { background: var(--auth-primary-hover); }
.btn:active { transform: translateY(1px); }

.alert, .error {
    border-radius: 6px;
    font-size: 0.9rem;
    line-height: 1.45;
    margin-bottom: 1.25rem;
    padding: 0.8rem 0.9rem;
}
.alert.error, .error { background: var(--auth-danger-bg); color: var(--auth-danger); }
.alert.warning { background: var(--auth-warning-bg); color: var(--auth-warning); }
.alert.success { background: #ebfbf4; color: #087653; }
.footer-link { border-top: 1px solid var(--auth-line); color: var(--auth-muted); font-size: 0.9rem; margin-top: 2rem; padding-top: 1.4rem; text-align: center; }
.footer-link a { color: var(--auth-primary); font-weight: 800; text-decoration: none; }
.footer-link a:hover { text-decoration: underline; }
.back-link { color: var(--auth-muted); display: inline-block; font-size: 0.88rem; margin-top: 1.35rem; text-decoration: none; }
.back-link:hover { color: var(--auth-ink); }
.auth-card--registration { max-width: 450px; }
.auth-card--registration .auth-card-intro { margin-bottom: 1.5rem; }
.auth-card--registration .auth-card-intro p { margin-bottom: 0; }
.auth-card--registration .form-group, .auth-card--registration .field { margin-bottom: 0.95rem; }

@media (max-width: 820px) {
    .auth-page { display: block; }
    .auth-intro { min-height: auto; padding: 1.5rem 1.5rem 2rem; }
    .intro-content { margin-top: 3rem; }
    .intro-content h1 { font-size: 2rem; }
    .intro-footer { display: none; }
    .auth-panel { padding: 2.5rem 1.5rem; }
}