:root {
    --auth-primary: #2457c5;
    --auth-primary-hover: #1946a5;
    --auth-text: #172033;
    --auth-muted: #64748b;
    --auth-border: #dbe2ec;
    --auth-background: #f3f6fb;
    --auth-danger: #b42318;
    --auth-danger-bg: #fef3f2;
    --auth-success: #166534;
    --auth-success-bg: #f0fdf4;
}

* {
    box-sizing: border-box;
}

body.auth-body {
    margin: 0;
    min-height: 100vh;
    background: var(--auth-background);
    color: var(--auth-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.auth-header {
    display: flex;
    align-items: center;
    min-height: 84px;
    padding: 16px max(24px, calc((100% - 1120px) / 2));
    background: #fff;
    border-bottom: 1px solid #e7ecf3;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: var(--auth-text);
    text-decoration: none;
}

.auth-brand img {
    display: block;
    width: auto;
    height: 48px;
    object-fit: contain;
}

.auth-brand-name {
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -0.4px;
}

.auth-main {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 64px 20px 80px;
}

.auth-container {
    width: 100%;
    max-width: 440px;
}

.auth-heading {
    margin: 0 0 10px;
    color: var(--auth-text);
    font-size: 29px;
    font-weight: 750;
    line-height: 1.25;
    letter-spacing: -0.7px;
    text-align: center;
}

.auth-subtitle {
    margin: 0 0 30px;
    color: var(--auth-muted);
    font-size: 15px;
    line-height: 1.6;
    text-align: center;
}

.auth-card {
    padding: 32px;
    background: #fff;
    border: 1px solid #e8edf4;
    border-radius: 14px;
    box-shadow: 0 12px 36px rgba(30, 50, 80, 0.07);
}

.auth-field {
    margin-bottom: 22px;
}

.auth-label {
    display: block;
    margin-bottom: 8px;
    color: #293449;
    font-size: 14px;
    font-weight: 650;
}

.auth-input {
    display: block;
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    color: var(--auth-text);
    background: #fff;
    border: 1px solid var(--auth-border);
    border-radius: 7px;
    outline: none;
    font: inherit;
    font-size: 15px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-input::placeholder {
    color: #9aa5b5;
}

.auth-input:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(36, 87, 197, 0.12);
}

.auth-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 47px;
    padding: 12px 18px;
    color: #fff;
    background: var(--auth-primary);
    border: 1px solid var(--auth-primary);
    border-radius: 7px;
    font: inherit;
    font-size: 15px;
    font-weight: 650;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.auth-button:hover {
    color: #fff;
    background: var(--auth-primary-hover);
    border-color: var(--auth-primary-hover);
}

.auth-button:focus-visible,
.auth-link:focus-visible {
    outline: 3px solid rgba(36, 87, 197, 0.3);
    outline-offset: 3px;
}

.auth-actions {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 8px;
}

.auth-link {
    color: var(--auth-primary);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
}

.auth-link:hover {
    color: var(--auth-primary-hover);
    text-decoration: underline;
}

.auth-message {
    margin-bottom: 22px;
    padding: 13px 15px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.auth-message p {
    margin: 0 0 5px;
}

.auth-message p:last-child {
    margin-bottom: 0;
}

.auth-message-error {
    color: var(--auth-danger);
    background: var(--auth-danger-bg);
    border-color: #fecdca;
}

.auth-message-success {
    color: var(--auth-success);
    background: var(--auth-success-bg);
    border-color: #bbf7d0;
}

.auth-footer {
    padding: 0 20px 28px;
    color: #8a96a8;
    font-size: 12px;
    text-align: center;
}

@media (max-width: 600px) {
    .auth-header {
        min-height: 72px;
        padding: 14px 20px;
    }

    .auth-brand img {
        height: 40px;
    }

    .auth-brand-name {
        font-size: 19px;
    }

    .auth-main {
        padding: 38px 16px 56px;
    }

    .auth-heading {
        font-size: 26px;
    }

    .auth-card {
        padding: 25px 21px;
        border-radius: 11px;
    }
}
