:root {
    --bg-1: #edf3ef;
    --bg-2: #d7e4db;
    --card: #ffffff;
    --text-main: #26372d;
    --text-sub: #63786b;
    --primary: #4a6352;
    --primary-hover: #3c5244;
    --border: #cfddd4;
    --input-bg: #f8fbf9;
    --error-bg: #fff2f2;
    --error-border: #efc7c7;
    --error-text: #9f3333;
    --success-bg: #eefaf1;
    --success-border: #c8e8d2;
    --success-text: #1f6a3d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 8% 15%, rgba(74, 99, 82, 0.08) 0%, transparent 36%),
        radial-gradient(circle at 88% 80%, rgba(74, 99, 82, 0.14) 0%, transparent 35%),
        linear-gradient(145deg, var(--bg-1), var(--bg-2));
    animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.container {
    width: 100%;
    max-width: 980px;
    animation: slideUp 0.6s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    display: grid;
    grid-template-columns: 1fr 0.95fr;
    background: var(--card);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 26px 60px rgba(35, 56, 43, 0.2);
    animation: cardEntrance 0.7s ease;
}

@keyframes cardEntrance {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.auth-pane {
    padding: 48px 44px 34px;
    order: 2;
}

.brand-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid #d6e5dc;
    background: #f2f8f5;
    color: #3f5f4f;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.card h1 {
    color: var(--text-main);
    margin-bottom: 8px;
    font-size: 38px;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.page-subtitle {
    color: var(--text-sub);
    font-size: 15px;
    margin-bottom: 22px;
}

.box {
    background: transparent;
}

.alert {
    text-align: left;
    font-size: 13px;
    border-radius: 11px;
    padding: 10px 12px;
    margin-bottom: 12px;
    border: 1px solid transparent;
    animation: slideIn 0.4s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.alert-success {
    background: var(--success-bg);
    border-color: var(--success-border);
    color: var(--success-text);
}

.alert-error {
    background: var(--error-bg);
    border-color: var(--error-border);
    color: var(--error-text);
}

.btn {
    display: block;
    width: 100%;
    border: 1px solid var(--border);
    background: #fff;
    padding: 13px 14px;
    border-radius: 12px;
    margin-bottom: 12px;
    text-decoration: none;
    color: #30483d;
    font-weight: 800;
    letter-spacing: 0.02em;
    transition: all 0.25s ease;
    text-align: center;
}

.btn:hover {
    background: #eef4f1;
    border-color: #b9cec1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.btn-primary {
    background: linear-gradient(135deg, #5f7b68, var(--primary));
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 10px 20px rgba(74, 99, 82, 0.26);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #557261, var(--primary-hover));
    border-color: var(--primary-hover);
}

.register-text {
    font-size: 12px;
    letter-spacing: 0.06em;
    color: #6f8578;
    margin-top: 10px;
    margin-bottom: 6px;
}

.register-link {
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    color: #3f5f4f;
}

.register-link:hover {
    text-decoration: underline;
}

.back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 6px;
    padding: 11px 14px;
    border-radius: 12px;
    border: 1px solid #bcd0c4;
    background: #eef4f0;
    color: #365145;
    text-decoration: none;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.02em;
    transition: all 0.22s ease;
}

.back-link:hover {
    background: #e4ede7;
    border-color: #9fb8aa;
    transform: translateY(-1px);
    text-decoration: none;
}

.auth-links {
    margin-top: 10px;
    display: grid;
    gap: 10px;
}

.input {
    width: 100%;
    padding: 13px 14px;
    margin-bottom: 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--input-bg);
    outline: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.input::placeholder {
    color: #7e9487;
}

.input:focus {
    border-color: #6d8e7b;
    box-shadow: 0 0 0 3px rgba(109, 142, 123, 0.2);
    background: #fff;
    transform: translateY(-1px);
}

button.btn {
    cursor: pointer;
}

.error-list {
    list-style: none;
}

.error-list li + li {
    margin-top: 4px;
}

.visual-pane {
    position: relative;
    min-height: 560px;
    background:
        radial-gradient(circle at 20% 22%, rgba(255, 255, 255, 0.25) 0%, transparent 42%),
        radial-gradient(circle at 80% 82%, rgba(255, 255, 255, 0.2) 0%, transparent 38%),
        linear-gradient(135deg, #739784, #4a6352 55%, #33473b);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    order: 1;
}

.visual-pane::before,
.visual-pane::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    pointer-events: none;
}

.visual-pane::before {
    width: 220px;
    height: 220px;
    top: -80px;
    right: -60px;
}

.visual-pane::after {
    width: 180px;
    height: 180px;
    bottom: -60px;
    left: -40px;
}

.visual-content {
    text-align: center;
    color: #fff;
    position: relative;
    z-index: 2;
}

.visual-logo-link {
    width: 108px;
    height: 108px;
    border-radius: 28px;
    margin: 0 auto 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(3px);
    transition: transform 0.2s ease;
}

.visual-logo-link:hover {
    transform: translateY(-2px);
}

.visual-logo-link img {
    width: 70px;
    height: 70px;
}

.visual-title {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 0.03em;
    margin-bottom: 10px;
}

.visual-text {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

@media (max-width: 900px) {
    .container {
        max-width: 520px;
    }

    .card {
        grid-template-columns: 1fr;
    }

    .visual-pane {
        min-height: 220px;
        order: 1;
        border-bottom: 1px solid rgba(255, 255, 255, 0.24);
    }

    .visual-title {
        font-size: 22px;
    }

    .auth-pane {
        padding: 26px 18px 20px;
        order: 2;
    }

    .card h1 {
        font-size: 30px;
    }
}
