:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --text-color: #333;
    --bg-color: #f5f5f5;
    --card-bg: #fff;
    --border-color: #ddd;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

.dark-mode {
    --primary-color: #3498db;
    --secondary-color: #34495e;
    --accent-color: #e74c3c;
    --text-color: #ecf0f1;
    --bg-color: #1a1a1a;
    --card-bg: #2c3e50;
    --border-color: #34495e;
    --shadow: 0 2px 10px rgba(0,0,0,0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: var(--transition);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* HEADER MELHORADO PARA DESKTOP */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
}

.logo img {
    height: 50px;
    width: auto;
}

.logo h1 {
    font-size: 1.8rem;
    color: var(--primary-color);
    white-space: nowrap;
}

.nav-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #1a252f;
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
    justify-content: center;
    padding: 15px;
    font-size: 1.1rem;
}

.auth-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.auth-card {
    background: var(--card-bg);
    border-radius: 15px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 450px;
    padding: 2.5rem;
    transition: var(--transition);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: #666;
}

.auth-form {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon i:first-child {
    position: absolute;
    left: 15px;
    color: #666;
    z-index: 1;
}

.input-with-icon input {
    width: 100%;
    padding: 15px 50px 15px 45px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--bg-color);
    color: var(--text-color);
    transition: var(--transition);
}

.input-with-icon input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.input-with-icon input::placeholder {
    color: #888;
}

.btn-toggle-password {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    z-index: 1;
    padding: 5px;
    transition: var(--transition);
}

.btn-toggle-password:hover {
    color: var(--primary-color);
}

.form-group small {
    display: block;
    margin-top: 8px;
}

.form-group small a {
    color: var(--accent-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.form-group small a:hover {
    color: #c0392b;
    text-decoration: underline;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.success-message, .error-message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: none;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.auth-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.auth-footer p {
    color: #666;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.auth-footer a:hover {
    color: #2980b9;
    text-decoration: underline;
}

.invite-info {
    margin-top: 1rem;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.invite-info i {
    font-size: 1.2rem;
}

footer {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    margin-top: 3rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 1rem;
}

.social-links a {
    color: var(--primary-color);
    font-size: 1.5rem;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--accent-color);
    transform: translateY(-3px);
}

footer p {
    margin: 5px 0;
    color: #666;
}

/* MEDIA QUERIES MELHORADAS */

/* Para tablets e notebooks menores */
@media (max-width: 1024px) {
    .container {
        max-width: 95%;
    }
    
    .auth-card {
        max-width: 400px;
    }
}

/* Para tablets */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .logo {
        justify-content: center;
    }
    
    .nav-buttons {
        flex-direction: row;
        width: 100%;
        justify-content: center;
        gap: 10px;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .auth-card {
        padding: 2rem;
        margin: 0 1rem;
    }
    
    .auth-header h2 {
        font-size: 1.8rem;
    }
}

/* Para celulares */
@media (max-width: 480px) {
    header {
        padding: 1rem 0;
    }
    
    .logo img {
        height: 40px;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .nav-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
        padding: 12px;
    }
    
    .auth-card {
        padding: 1.5rem;
        margin: 0 0.5rem;
    }
    
    .auth-header h2 {
        font-size: 1.5rem;
    }
    
    .input-with-icon input {
        padding: 12px 45px 12px 40px;
    }
}

/* Para telas muito pequenas (celulares antigos) */
@media (max-width: 360px) {
    .logo {
        flex-direction: column;
        gap: 10px;
    }
    
    .logo img {
        height: 35px;
    }
    
    .logo h1 {
        font-size: 1.3rem;
    }
    
    .auth-card {
        padding: 1rem;
    }
    
    .auth-header h2 {
        font-size: 1.3rem;
    }
    
    .btn {
        padding: 10px;
        font-size: 0.85rem;
    }
}

/* Para telas muito grandes (desktop grande) */
@media (min-width: 1400px) {
    .container {
        max-width: 1300px;
    }
    
    .auth-card {
        max-width: 500px;
        padding: 3rem;
    }
    
    .auth-header h2 {
        font-size: 2.2rem;
    }
    
    .input-with-icon input {
        padding: 18px 50px 18px 45px;
        font-size: 1.1rem;
    }
}