* {
    box-sizing: border-box;
}

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

body {
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(180deg, #f7f9fb 0%, #edf2f6 100%);
    color: #1f2937;
}

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

.auth-shell {
    width: 100%;
    max-width: 560px;
}

.auth-card {
    background: #ffffff;
    border: 1px solid #e5eaf0;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    padding: 42px 38px 32px;
}

.auth-logo-wrap {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo {
    display: block;
    width: 100%;
    max-width: 380px;
    height: auto;
    margin: 0 auto 18px -10px;
}

.auth-title {
    margin: 10px 0 10px 0;
    text-align: center;
    font-size: 28px;
    font-weight: 600;
    color: #0f172a;
    letter-spacing: -0.2px;
}

.auth-subtitle {
    margin: 6px 0 32px 0;
    opacity: 0.7;
    text-align: center;
    font-size: 15px;
    line-height: 1.5;
    color: #667085;
}

.auth-message {
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.45;
}

.auth-message.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.auth-message.success {
    background: #ecfdf3;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.auth-form {
    width: 100%;
}

.auth-form-group {
    margin-bottom: 20px;
}

.auth-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

.auth-input {
    width: 100%;
    height: 58px;
    padding: 0 16px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    background: #ffffff;
    color: #111827;
    font-size: 16px;
    font-family: inherit;
    line-height: normal;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auth-input:hover {
    border-color: #94a3b8;
}

.auth-input:focus {
    border-color: #2d8dbf;
    box-shadow: 0 0 0 3px rgba(45, 141, 191, 0.15);
    background: #ffffff;
}

.auth-input.is-invalid {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.10);
}

.auth-input.is-invalid:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.field-error {
    min-height: 18px;
    margin-top: 6px;
    color: #dc2626;
    font-size: 13px;
}

.auth-actions {
    margin-top: 8px;
}

.auth-button {
    width: 100%;
    height: 58px;
    border: none;
    border-radius: 14px;
    background: #2d8dbf;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(45, 141, 191, 0.25);
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.02s ease, opacity 0.2s ease;
}

.auth-button:hover {
    background: #2478a4;
    box-shadow: 0 6px 14px rgba(45, 141, 191, 0.35);
}

.auth-button:active {
    transform: translateY(1px);
}

.auth-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.auth-links {
    text-align: center;
    margin-top: 26px;
}

.auth-links a {
    color: #2d8dbf;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
}

.auth-links a:hover {
    text-decoration: underline;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 12px;
    color: #6b7280;
}

.show-password {
    margin-top: 10px;
    margin-left: 6px;
}

.show-password label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #4b5563;
}

.show-password label:hover {
    color: #1f2937;
}

.show-password input[type="checkbox"] {
    margin: 0;
    width: 16px;
    height: 16px;
    transform: translateY(1px);
}

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

    .auth-shell {
        max-width: 100%;
    }

    .auth-card {
        padding: 30px 22px 24px;
        border-radius: 16px;
    }

    .auth-logo-wrap {
        margin-bottom: 24px;
    }

    .auth-logo {
        max-width: 320px;
    }

    .auth-title {
        font-size: 24px;
    }

    .auth-subtitle {
        font-size: 14px;
        margin-bottom: 26px;
    }

    .auth-input,
    .auth-button {
        height: 54px;
    }
}