* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a73e8;
    --primary-hover: #1557b0;
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --border-color: #dadce0;
    --error-color: #d93025;
    --success-color: #1e8e3e;
    --background: #fff;
    --shadow: 0 1px 3px 0 rgba(60,64,67,.3), 0 4px 8px 3px rgba(60,64,67,.15);
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-wrapper {
    width: 100%;
    max-width: 450px;
    animation: fadeIn 0.5s ease-in;
}

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

.login-card {
    background: var(--background);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 48px 40px 36px;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    max-width: 80px;
    height: auto;
    margin-bottom: 16px;
}

.login-header h1 {
    font-size: 24px;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.login-header p {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 400;
}

.login-form {
    margin-top: 24px;
}

.input-group {
    position: relative;
    margin-bottom: 24px;
}

.input-group input {
    width: 100%;
    padding: 13px 15px;
    font-size: 16px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    outline: none;
    background: transparent;
    transition: all 0.3s;
    color: var(--text-primary);
}

.input-group input:focus {
    border-color: var(--primary-color);
    border-width: 2px;
    padding: 12px 14px;
}

.input-group input:focus + label,
.input-group input:not(:placeholder-shown) + label {
    top: -8px;
    left: 8px;
    font-size: 12px;
    color: var(--primary-color);
    background: white;
    padding: 0 4px;
}

.input-group label {
    position: absolute;
    left: 15px;
    top: 14px;
    color: var(--text-secondary);
    font-size: 16px;
    pointer-events: none;
    transition: all 0.3s;
}

.input-border {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s;
}

.input-group input:focus ~ .input-border {
    width: 100%;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    padding: 4px;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.toggle-password:hover {
    opacity: 1;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    position: relative;
    height: 18px;
    width: 18px;
    border: 2px solid var(--border-color);
    border-radius: 2px;
    margin-right: 8px;
    transition: all 0.3s;
}

.checkbox-container:hover input ~ .checkmark {
    border-color: var(--primary-color);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

#loginMessage {
    margin-bottom: 16px;
}

.alert {
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 16px;
    animation: slideDown 0.3s ease;
}

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

.alert-error {
    background-color: #fce8e6;
    color: var(--error-color);
    border: 1px solid #f5c6cb;
}

.alert-success {
    background-color: #e6f4ea;
    color: var(--success-color);
    border: 1px solid #c3e6cb;
}

.btn-login {
    width: 100%;
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.25px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.btn-login:hover {
    background: var(--primary-hover);
    box-shadow: 0 1px 2px 0 rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15);
}

.btn-login:active {
    transform: scale(0.98);
}

.btn-login:disabled {
    background: #dadce0;
    cursor: not-allowed;
}

.btn-loader {
    display: inline-block;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.login-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.login-footer p {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Responsivo */
@media (max-width: 480px) {
    .login-card {
        padding: 32px 24px;
    }
    
    .login-header h1 {
        font-size: 20px;
    }
    
    .login-header p {
        font-size: 14px;
    }
}

/* Animação de ripple no botão */
.btn-login::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-login:active::before {
    width: 300px;
    height: 300px;
}
