:root {
    --primary-color: #2563eb;
    --secondary-color: #16a34a;
    --accent-color: #f59e0b;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f8fafc;
    --border-color: #e5e7eb;
    --error-color: #dc2626;
    --success-color: #16a34a;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.login-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    overflow: hidden;
    width: 100%;
    max-width: 900px;
    min-height: 600px;
}

.login-left {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
    opacity: 0.1;
}

.login-content {
    position: relative;
    z-index: 2;
}

.login-right {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.brand-logo {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.brand-logo i {
    margin-right: 0.5rem;
    font-size: 2.5rem;
}

.welcome-text {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    padding: 0.75rem 0;
    display: flex;
    align-items: center;
}

.feature-list i {
    margin-right: 1rem;
    font-size: 1.2rem;
    color: var(--accent-color);
}

.login-form {
    width: 100%;
}

.form-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.form-subtitle {
    color: var(--text-light);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    display: block;
}

.form-control {
    border: 2px solid var(--border-color);
    border-radius: 10px !important;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    width: 100%;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
    border-radius: 10px !important;
}

.input-group {
    position: relative;
}

.input-group i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    z-index: 10;
    pointer-events: none;
}

.input-group .form-control {
    padding-left: 3rem;
    padding-right: 3rem;
    border-radius: 10px !important;
}

/* Garantir que todos os inputs tenham cantos arredondados */
input[type="email"],
input[type="password"],
input[type="text"] {
    border-radius: 10px !important;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    z-index: 10;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: var(--primary-color);
}

.password-toggle:focus {
    outline: none;
    color: var(--primary-color);
}

.btn-login {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    color: white;
    padding: 0.875rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 10px;
    width: 100%;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
}

.divider span {
    background: white;
    padding: 0 1rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.btn-register {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.875rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 10px;
    width: 100%;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-register:hover {
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
}

.alert {
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: none;
}

.alert-danger {
    background: rgba(220, 38, 38, 0.1);
    color: var(--error-color);
}

.alert-success {
    background: rgba(22, 163, 74, 0.1);
    color: var(--success-color);
}

.forgot-password {
    text-align: center;
    margin-top: 1rem;
}

.forgot-password a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.forgot-password a:hover {
    text-decoration: underline;
}

.back-home {
    position: absolute;
    top: 2rem;
    left: 2rem;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-home:hover {
    color: var(--accent-color);
    text-decoration: none;
}

@media (max-width: 768px) {
    .login-container {
        margin: 1rem;
        min-height: auto;
    }
    
    .login-left {
        padding: 2rem;
        text-align: center;
    }
    
    .login-right {
        padding: 2rem;
    }
    
    .brand-logo {
        font-size: 1.5rem;
        justify-content: center;
    }
    
    .form-title {
        font-size: 1.5rem;
        text-align: center;
    }
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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