/* Reset e configurações básicas - apenas para página de login */
body.login-page * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 0;
    margin: 0;
    overflow-x: hidden;
}

/* Header da TavolaTech */
.login-header {
    background: white;
    padding: 25px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: relative;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: 80px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 25px;
}

.logo-placeholder {
    height: 60px;
    width: 60px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.25);
    transition: all 0.3s ease;
}

.logo-placeholder:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.35);
}

.logo-placeholder i {
    font-size: 1.6rem;
    color: white;
}

.logo {
    height: 60px;
    width: auto;
    object-fit: contain;
    max-width: 60px;
}

.login-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin: 0;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.header-link {
    color: #666;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    padding: 10px 16px;
    border-radius: 8px;
    position: relative;
}

.header-link:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

/* Container principal */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 100px);
    padding: 20px;
    margin-top: 100px;
}

/* Box do login */
.login-box {
    background: white;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
    overflow: hidden;
    animation: slideUp 0.6s ease-out;
    width: 100%;
    max-width: 420px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cabeçalho do formulário */
.login-form-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 30px 35px;
    text-align: center;
}

.login-form-header h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
    opacity: 0.95;
    line-height: 1.4;
}

/* Mensagem de erro */
.error-space {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    margin-bottom: 15px;
    display: none;
}

.error-space.show {
    display: block;
}

/* Formulário */
.login-form {
    padding: 20px 40px 25px 40px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-group {
    margin-bottom: 15px !important;
    padding: 8px 0 !important;
}

.form-group:first-child {
    margin-top: 0 !important;
}

.form-group:last-child {
    margin-bottom: 80px !important;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 50px !important;
    font-weight: 600;
    color: #374151;
    font-size: 1rem;
}

.form-group label i {
    color: #667eea;
    width: 18px;
    font-size: 1rem;
}

.form-group input {
    width: 100%;
    padding: 30px 25px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #f9fafb;
    font-weight: 500;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input:hover {
    border-color: #667eea;
}


/* Espaçamento final limpo */

/* Botão de login */
.login-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 25px 24px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.login-btn:active {
    transform: translateY(0);
}

/* Responsividade */
@media (max-width: 768px) {
    .header-content {
        padding: 0 15px;
    }
    
    .header-right {
        gap: 15px;
    }
    
    .header-link {
        font-size: 0.8rem;
        padding: 6px 10px;
    }
    
    .login-header h1 {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 0 10px;
    }
    
    .header-left {
        gap: 8px;
    }
    
    .logo-placeholder {
        height: 40px;
        width: 40px;
    }
    
    .logo-placeholder i {
        font-size: 1.2rem;
    }
    
    .logo {
        height: 40px;
        max-width: 40px;
    }
    
    .login-header h1 {
        font-size: 1.3rem;
    }
    
    .header-right {
        gap: 10px;
    }
    
    .header-link {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
    
    .login-form-header {
        padding: 20px;
    }
    
    .login-form-header h2 {
        font-size: 1.1rem;
    }
    
    .login-form {
        padding: 30px 20px;
        gap: 30px;
    }
    
    .login-container {
        padding: 10px;
        height: calc(100vh - 70px);
    }
}

/* Animações adicionais */
.form-group input {
    animation: fadeIn 0.6s ease-out;
}

.form-group:nth-child(1) input {
    animation-delay: 0.1s;
}

.form-group:nth-child(2) input {
    animation-delay: 0.2s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Estados de loading */
.login-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.login-btn.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}