:root {
    --auth-bg: #f6f4ef;
    --auth-panel: #ffffff;
    --auth-panel-muted: #faf8f2;
    --auth-text: #1f2933;
    --auth-muted: #64707a;
    --auth-primary: #dcaa50;
    --auth-primary-strong: #c89842;
    --auth-border: #e5ddcc;
    --auth-shadow: 0 4px 14px rgba(28, 38, 49, 0.08);
    --auth-radius-lg: 12px;
    --auth-radius-md: 8px;
    --auth-radius-sm: 6px;
}

* {
    box-sizing: border-box;
}

.auth-login-page,
.auth-register-page {
    margin: 0;
    min-height: 100vh;
    background: var(--auth-bg);
    color: var(--auth-text);
    font-family: "Jost", "Segoe UI", sans-serif;
}

.auth-shell {
    width: min(1200px, 100% - 32px);
    margin: 16px auto;
    display: grid;
    grid-template-columns: minmax(280px, 420px) minmax(320px, 1fr);
    gap: 16px;
    align-items: stretch;
}

.auth-side {
    background: var(--auth-panel);
    border: 1px solid var(--auth-border);
    border-top: 4px solid var(--auth-primary);
    border-radius: var(--auth-radius-lg);
    box-shadow: var(--auth-shadow);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-side-logo {
    display: inline-flex;
    width: fit-content;
}

.auth-side-logo img {
    width: 110px;
    height: auto;
}

.auth-eyebrow {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--auth-muted);
    font-size: 0.8rem;
    font-weight: 600;
}

.auth-side h1 {
    margin: 0;
    font-family: "Jost", "Segoe UI", sans-serif;
    font-size: clamp(1.45rem, 2.2vw, 2rem);
    line-height: 1.25;
    font-weight: 700;
}

.auth-side p {
    margin: 0;
    color: var(--auth-muted);
    line-height: 1.6;
    font-size: 0.95rem;
}

.auth-side-list {
    margin: 8px 0 0;
    padding-left: 18px;
    color: #52606b;
    display: grid;
    gap: 4px;
}

.auth-side-list li::marker {
    color: var(--auth-primary);
}

.auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #4d5a66;
    font-weight: 600;
    font-size: 0.9rem;
}

.auth-back-link:hover {
    color: #2f3d48;
}

.auth-form-wrap {
    display: flex;
    align-items: center;
}

.auth-card {
    width: 100%;
    background: var(--auth-panel);
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-lg);
    box-shadow: var(--auth-shadow);
    padding: 22px;
}

.auth-card-head {
    margin-bottom: 12px;
}

.auth-card-head h2 {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.3;
}

.auth-card-head p {
    margin: 4px 0 0;
    color: var(--auth-muted);
    font-size: 0.93rem;
}

.auth-status {
    display: block;
    min-height: 20px;
    margin-bottom: 10px;
    color: #0f8f57;
    font-size: 0.9rem;
}

.form-group label {
    font-weight: 600;
    color: #3c4d5a;
    margin-bottom: 6px;
}

.auth-login-page .form-control,
.auth-register-page .form-control,
.auth-modal-content .form-control {
    border: 1px solid #d5cbb8;
    border-radius: var(--auth-radius-sm);
    background: #fff;
    padding: 10px 12px;
    font-size: 0.95rem;
}

.auth-login-page .form-control:focus,
.auth-register-page .form-control:focus,
.auth-modal-content .form-control:focus {
    border-color: #d8ae67;
    box-shadow: 0 0 0 2px rgba(220, 170, 80, 0.2);
}

.auth-primary-btn {
    width: 100%;
    border: 1px solid transparent;
    border-radius: var(--auth-radius-sm);
    background: var(--auth-primary);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 10px 12px;
    transition: background-color 0.15s ease;
}

.auth-primary-btn:hover,
.auth-primary-btn:focus {
    background: var(--auth-primary-strong);
    color: #fff;
}

.auth-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #5d6973;
    font-size: 0.92rem;
}

.auth-links a {
    color: #8d6a2a;
    text-decoration: none;
    font-weight: 600;
}

.auth-links a:hover {
    color: #725422;
}

.auth-link-btn {
    border: 0;
    background: transparent;
    padding: 0;
    width: fit-content;
    color: #8d6a2a;
    font-weight: 600;
}

.auth-link-btn:hover {
    color: #725422;
}

.auth-modal-content {
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-md);
}

.auth-modal-content .modal-header,
.auth-modal-content .modal-footer {
    border-color: #efe7d6;
}

.auth-modal-status {
    color: #0f8f57;
    font-size: 0.88rem;
}

.auth-modal-status.error {
    color: #b42318;
}

.auth-register-shell .auth-side {
    background: var(--auth-panel-muted);
}

.auth-register-shell .auth-side .img-register {
    width: 100%;
    margin-top: 10px;
    border-radius: var(--auth-radius-md);
    border: 1px solid var(--auth-border);
    object-fit: cover;
    max-height: 280px;
}

.auth-card-register {
    align-self: stretch;
}

.auth-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
}

.create-password-warn {
    min-height: 18px;
    display: block;
    margin-top: 4px;
    color: #b42318;
    font-size: 0.82rem;
}

.auth-register-btn {
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.auth-login-shell .auth-side {
    min-height: calc(100vh - 32px);
    justify-content: center;
}

@media (max-width: 1024px) {
    .auth-shell {
        grid-template-columns: 1fr;
        width: min(760px, 100% - 20px);
        margin: 10px auto;
    }

    .auth-login-shell .auth-side {
        min-height: auto;
    }

    .auth-form-wrap {
        align-items: stretch;
    }
}

@media (max-width: 720px) {
    .auth-card,
    .auth-side {
        padding: 14px;
    }

    .auth-form-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }
}
