/* ============================================
   LOGIN MALTETEC - VISUAL + FUNCIONALIDADES
   ============================================ */

/* Variáveis CSS */
:root {
    --maltetec-neon: #00ffcc;
    --maltetec-blue: #0066cc;
    --maltetec-dark: #1a1a2e;
    --maltetec-gray: #16213e;
    --white: #ffffff;
    --error: #ff4757;
    --success: #2ed573;
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --shadow: 0 15px 35px rgba(0, 255, 204, 0.1);
    --border-radius: 12px;
}

/* Reset e base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--gradient);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
}

/* Background animado */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.floating-shapes {
    position: relative;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    background: rgba(0, 255, 204, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.shape:nth-child(1) {
    width: 100px;
    height: 100px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape:nth-child(2) {
    width: 80px;
    height: 80px;
    top: 70%;
    right: 10%;
    animation-delay: 2s;
}

.shape:nth-child(3) {
    width: 120px;
    height: 120px;
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

.shape:nth-child(4) {
    width: 60px;
    height: 60px;
    top: 50%;
    right: 30%;
    animation-delay: 1s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* Container principal */
.login-container {
    width: 100%;
    max-width: 450px;
    margin: 20px;
    position: relative;
    z-index: 1;
}

/* Card de login */
.login-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 40px 30px;
    backdrop-filter: blur(10px);
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    0% { transform: translateY(30px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

/* Header */
.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo-container h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--maltetec-blue);
    margin-bottom: 5px;
}

.logo-tech {
    color: var(--maltetec-neon);
}

.logo-subtitle {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

/* Alertas */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    animation: alertSlide 0.3s ease;
}

@keyframes alertSlide {
    0% { transform: translateX(-100%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

.alert-success {
    background: rgba(46, 213, 115, 0.1);
    color: var(--success);
    border: 1px solid rgba(46, 213, 115, 0.2);
}

.alert-error {
    background: rgba(255, 71, 87, 0.1);
    color: var(--error);
    border: 1px solid rgba(255, 71, 87, 0.2);
}

/* Formulário */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Grupos de input */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--maltetec-dark);
    font-size: 14px;
}

.input-label i {
    color: var(--maltetec-neon);
    width: 16px;
}

/* Campos de input */
.input-field {
    padding: 14px 16px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fafbfc;
}

.input-field:focus {
    outline: none;
    border-color: var(--maltetec-neon);
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 255, 204, 0.1);
}

.input-field.error {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.1);
}

/* Container de senha */
.password-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: color 0.3s ease;
}

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

/* Mensagens de erro */
.input-error {
    color: var(--error);
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

.input-error.show {
    display: block;
    animation: errorSlide 0.3s ease;
}

@keyframes errorSlide {
    0% { opacity: 0; transform: translateY(-5px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Opções de login */
.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 16px 0;
}

/* Checkbox customizado */
.checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    user-select: none;
}

.checkbox-container input {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    background: #f5f5f5;
    border: 2px solid #ddd;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-container input:checked + .checkmark {
    background: var(--maltetec-neon);
    border-color: var(--maltetec-neon);
}

.checkbox-container input:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Link esqueci senha */
.forgot-password {
    color: var(--maltetec-blue);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: var(--maltetec-neon);
}

/* Botão de login */
.login-btn {
    background: linear-gradient(135deg, var(--maltetec-neon), var(--maltetec-blue));
    color: white;
    padding: 16px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 255, 204, 0.3);
}

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

.login-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Footer */
.login-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #666;
    font-size: 12px;
    line-height: 1.6;
}

.login-footer a {
    color: var(--maltetec-blue);
    text-decoration: none;
}

.login-footer a:hover {
    color: var(--maltetec-neon);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal {
    background: white;
    border-radius: var(--border-radius);
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow);
    animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.modal-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: var(--maltetec-dark);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--error);
}

.modal-body {
    padding: 20px 24px;
}

.modal-body p {
    margin-bottom: 16px;
    color: #666;
}

.modal-footer {
    padding: 16px 24px 20px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn-primary, .btn-secondary {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--maltetec-neon);
    color: white;
}

.btn-primary:hover {
    background: var(--maltetec-blue);
}

.btn-secondary {
    background: #f5f5f5;
    color: #666;
}

.btn-secondary:hover {
    background: #eee;
}

/* Responsividade */
@media (max-width: 480px) {
    .login-card {
        padding: 30px 20px;
        margin: 10px;
    }

    .logo-container h1 {
        font-size: 28px;
    }

    .login-options {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .forgot-password {
        text-align: center;
    }
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}