@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg: #f6f7fb;
    --surface: #ffffff;
    --surface-muted: #f3f5fa;
    --line: #e7ebf3;
    --text: #17181c;
    --text-soft: #6f7685;
    --accent: #111827;
    --blue: #3b82f6;
    --blue-dark: #2563eb;
    --shadow: 0 24px 60px rgba(15, 23, 42, 0.10);
}

* {
    box-sizing: border-box;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(180deg, #f8f9fd 0%, #f3f5fb 100%);
    color: var(--text);
}

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

button,
input {
    font: inherit;
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
}


.auth-side,
.auth-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 32px;
    box-shadow: var(--shadow);
}

.auth-side {
    padding: 38px;
    min-height: 640px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(180deg, #111827 0%, #1f2937 100%);
    color: #ffffff;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 16px;
    background: var(--surface-muted);
    border: 1px solid var(--line);
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.auth-side h1 {
    margin: 0 0 14px;
    font-size: 44px;
    line-height: 1.05;
}

.auth-side p {
    margin: 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 17px;
    line-height: 1.7;
}

.side-points {
    display: grid;
    gap: 14px;
    margin-top: 28px;
}

.side-item {
    display: flex;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.side-badge {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.side-copy strong {
    display: block;
    font-size: 15px;
    margin-bottom: 4px;
}

.side-copy span {
    display: block;
    color: rgba(255,255,255,0.72);
    font-size: 14px;
    line-height: 1.5;
}

.side-footer {
    color: rgba(255,255,255,0.56);
    font-size: 14px;
}

.auth-side-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.auth-user-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.06em;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
    transition: transform 0.2s ease, background 0.2s ease;
}

.auth-user-avatar:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.18);
}

.auth-panel {
    width: min(100%, 560px);
    padding: 42px;
}

.auth-panel-centered {
    margin: 0 auto;
}

.auth-panel-wide {
    width: min(100%, 720px);
}

.auth-brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 30px;
}

.centered-copy {
    justify-content: center;
    text-align: center;
}

.centered-copy > div {
    width: 100%;
}

.auth-row-single {
    justify-content: flex-start;
}

.auth-panel-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 30px;
}

.auth-panel-top h2 {
    margin: 0 0 6px;
    font-size: 34px;
}

.auth-panel-top p {
    margin: 0;
    color: var(--text-soft);
    font-size: 15px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    background: var(--surface-muted);
    color: var(--text);
    font-weight: 600;
}

.auth-form {
    display: grid;
    gap: 18px;
}

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

.input-group {
    display: grid;
    gap: 10px;
}

.input-group label {
    color: #4b5563;
    font-size: 14px;
    font-weight: 600;
}

.input-group input {
    width: 100%;
    min-height: 58px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: var(--surface-muted);
    color: var(--text);
    padding: 0 18px;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.input-group input:focus {
    border-color: #bfd3ff;
    background: #ffffff;
}

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.checkline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-soft);
    font-size: 14px;
}

.checkline input {
    width: 18px;
    height: 18px;
}

.helper-link {
    color: var(--blue-dark);
    font-weight: 600;
    font-size: 14px;
}

.auth-button {
    width: 100%;
    min-height: 60px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 22px;
    border: 0;
    border-radius: 20px;
    background: var(--accent);
    color: #ffffff;
    font-size: 17px;
    line-height: 1.2;
    font-weight: 700;
    text-align: center;
    box-shadow: 0 16px 32px rgba(17, 24, 39, 0.12);
}

.auth-switch {
    margin-top: 22px;
    text-align: center;
    color: var(--text-soft);
    font-size: 15px;
}

.auth-switch a {
    color: var(--blue-dark);
    font-weight: 700;
}

.auth-note {
    margin-top: 22px;
    padding: 18px;
    border-radius: 22px;
    background: var(--surface-muted);
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.6;
}

@media (max-width: 980px) {
    .auth-page {
        padding: 24px;
    }

    .auth-panel,
    .auth-panel-wide {
        width: min(100%, 720px);
    }
}


@media (max-width: 640px) {
    .auth-page {
        padding: 18px;
        gap: 18px;
    }

    .auth-panel {
        width: 100%;
        padding: 24px 20px;
        border-radius: 24px;
    }

    .auth-panel-top h2 {
        font-size: 30px;
    }

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

    .auth-panel-top,
    .auth-brand-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .back-link {
        width: 100%;
    }
}


.auth-alert {
    padding: 14px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.6;
    border: 1px solid var(--line);
    background: var(--surface-muted);
    color: var(--text);
}

.auth-alert.success {
    background: #eefbf2;
    border-color: #bde6cb;
    color: #166534;
}

.auth-alert.error {
    background: #fff1f1;
    border-color: #ffcaca;
    color: #b91c1c;
}

.field-errors {
    display: grid;
    gap: 6px;
    margin-top: -4px;
}

.field-errors span {
    color: #b91c1c;
    font-size: 13px;
}

.auth-help-list {
    margin: 0;
    padding-left: 18px;
    color: var(--text-soft);
    line-height: 1.7;
    font-size: 14px;
}


.auth-row-end-only {
    justify-content: flex-end;
}
