* {
    box-sizing: border-box;
}

:root {
    --primary-color: #00a884;
    --primary-hover: #008f6f;
    --bg-color: #d1d7db;
    --card-bg: #ffffff;
    --text-primary: #111b21;
    --text-secondary: #54656f;
    --input-bg: #f0f2f5;
    --input-bg-hover: #e9edef;
    --input-border: transparent;
    --input-focus-bg: #ffffff;
    --error-color: #ea0038;
    --success-color: #00a884;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    --font-family: 'Inter', 'Segoe UI', Helvetica, Arial, sans-serif;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    background-image: linear-gradient(180deg, #00a884 0%, #00a884 130px, #d1d7db 130px, #d1d7db 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    color: var(--text-primary);
}

.auth-wrapper {
    width: 100%;
    max-width: 480px;
    padding: 20px;
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.auth-card {
    background: var(--card-bg);
    padding: 48px 40px;
    border-radius: 24px;
    box-shadow: var(--shadow);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.auth-header {
    margin-bottom: 32px;
}

.auth-logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    background-color: var(--primary-color);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    font-weight: bold;
    box-shadow: 0 10px 20px rgba(0, 168, 132, 0.2);
    transform: rotate(-5deg);
    transition: transform 0.3s ease;
}

.auth-logo:hover {
    transform: rotate(0deg) scale(1.05);
}

.auth-logo img {
    width: 100%;
    height: 100%;
    border-radius: 18px;
    object-fit: cover;
}

.auth-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.auth-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.form-group {
    margin-bottom: 24px;
    text-align: left;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-left: 4px;
}

.form-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--input-border);
    border-radius: 16px;
    font-size: 16px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    background-color: var(--input-bg);
    color: var(--text-primary);
    font-weight: 500;
}

.form-input:hover {
    background-color: var(--input-bg-hover);
}

.form-input:focus {
    background-color: var(--input-focus-bg);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 168, 132, 0.1);
    outline: none;
}

.form-input::placeholder {
    color: #aebac1;
    font-weight: 400;
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 12px;
    box-shadow: 0 4px 12px rgba(0, 168, 132, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 168, 132, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

.auth-links {
    margin-top: 32px;
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 500;
}

.auth-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
    position: relative;
}

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

.auth-link::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: currentColor;
    transform: scaleX(0);
    transition: transform 0.2s ease;
    transform-origin: right;
}

.auth-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.alert {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 14px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

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

.alert-error {
    background-color: #fceceb;
    color: var(--error-color);
    border: 1px solid rgba(234, 0, 56, 0.1);
}

.alert-success {
    background-color: #dcfce7;
    color: var(--success-color);
    border: 1px solid rgba(0, 168, 132, 0.1);
}

.password-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #8696a0;
    background: none;
    border: none;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.toggle-password:hover {
    background-color: rgba(0,0,0,0.05);
    color: var(--primary-color);
}

.toggle-password svg {
    width: 22px;
    height: 22px;
}

/* Responsividade */
@media (max-width: 480px) {
    .auth-card {
        padding: 40px 24px;
        border-radius: 20px;
    }
    
    body {
        background-image: none;
        background-color: var(--bg-color);
    }
    
    .auth-wrapper {
        padding: 16px;
    }
    
    .auth-logo {
        width: 56px;
        height: 56px;
        font-size: 24px;
    }
}
