/* ========================================
   EngeFlow - Estilos Complementares
   Tailwind CSS + Estilos customizados
   ======================================== */

/* ========================================
   Ticket Impressora Térmica (80mm)
   ======================================== */

/* Esconde a área de impressão na tela */
.ticket-termica {
    display: none;
}

/* ========================================
   Estilos de Impressão (Impressora Térmica)
   ======================================== */

@media print {
    /* Esconde tudo exceto a área de impressão */
    body * {
        visibility: hidden;
    }
    
    /* Remove backgrounds e cores desnecessárias */
    body {
        background: white !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Mostra apenas a área de impressão térmica */
    .ticket-termica,
    .ticket-termica * {
        visibility: visible;
    }
    
    .ticket-termica {
        display: block !important;
        position: absolute;
        left: 0;
        top: 0;
        width: 80mm; /* Largura padrão impressora térmica 80mm */
        max-width: 80mm;
        padding: 2mm;
        margin: 0;
        font-family: 'Courier New', Courier, monospace;
        font-size: 12pt;
        line-height: 1.3;
        text-align: center;
        color: black !important;
        background: white !important;
    }
    
    /* Para impressoras de 58mm, ajuste a largura */
    /* .ticket-termica { width: 58mm; max-width: 58mm; } */
    
    .ticket-header {
        margin-bottom: 3mm;
    }
    
    .ticket-empresa {
        font-size: 14pt;
        font-weight: bold;
        margin-bottom: 2mm;
    }
    
    .ticket-linha {
        font-size: 10pt;
        margin: 1mm 0;
    }
    
    .ticket-body {
        margin: 4mm 0;
    }
    
    .ticket-label {
        font-size: 12pt;
        margin-bottom: 2mm;
    }
    
    .ticket-codigo {
        font-size: 36pt;
        font-weight: bold;
        margin: 3mm 0;
        letter-spacing: 2px;
    }
    
    .ticket-tipo {
        font-size: 14pt;
        font-weight: bold;
        margin-bottom: 3mm;
    }
    
    .ticket-data {
        font-size: 10pt;
        margin-top: 2mm;
    }
    
    .ticket-qrcode {
        margin: 4mm 0;
    }
    
    .ticket-qr-label {
        font-size: 9pt;
        margin-bottom: 2mm;
    }
    
    .ticket-qr-img {
        width: 35mm;
        height: 35mm;
    }
    
    .ticket-footer {
        margin-top: 3mm;
    }
    
    .ticket-msg {
        font-size: 10pt;
        margin: 1mm 0;
    }
    
    .ticket-agradecimento {
        font-size: 9pt;
        font-style: italic;
        margin-top: 2mm;
    }
    
    /* Configurações de página para impressora térmica */
    @page {
        size: 80mm auto; /* Largura 80mm, altura automática */
        margin: 0;
    }
}

/* ========================================
   Formulário do Cliente - Página especial
   ======================================== */

.formulario-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.formulario-container {
    background: white;
    border-radius: 1.25rem;
    padding: 2rem;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    margin: 0 auto;
}

.formulario-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.senha-badge {
    display: inline-block;
    color: white;
    font-size: 2rem;
    font-weight: bold;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
}

/* ========================================
   Login Atendente
   ======================================== */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 1.25rem;
}

.login-box {
    background: white;
    border-radius: 1.25rem;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    text-align: center;
}

.login-header {
    margin-bottom: 1.5rem;
}

.login-icon {
    font-size: 4rem;
    margin-bottom: 0.75rem;
}

.login-header h1 {
    color: #1e293b;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #64748b;
    font-size: 0.95rem;
}

.login-form .campo-grupo {
    text-align: left;
    margin-bottom: 1rem;
}

.login-form .campo-label {
    display: block;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.login-form .campo-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.625rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: #f8fafc;
}

.login-form .campo-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.btn-login {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 0.625rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* Alertas */
.mensagens {
    margin-bottom: 1rem;
}

.mensagens .alerta {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.mensagens .alerta-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.mensagens .alerta-success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.mensagens .alerta-info {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

/* ========================================
   Alterar Senha
   ======================================== */

.alterar-senha-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.alterar-senha-container {
    width: 100%;
    max-width: 400px;
    padding: 1.25rem;
}

.alterar-senha-box {
    background: white;
    border-radius: 1.25rem;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    text-align: center;
}

/* ========================================
   Upload de Arquivos - Formulário Cliente
   ======================================== */

.upload-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e2e8f0;
}

.upload-section h3 {
    color: #1e293b;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.upload-descricao {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

.upload-area {
    border: 3px dashed #d1d5db;
    border-radius: 1rem;
    padding: 2.5rem 1.25rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fafafa;
}

.upload-area:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.upload-area.dragover {
    border-color: #667eea;
    background: #e8edff;
    transform: scale(1.02);
}

.upload-area.uploading {
    opacity: 0.7;
    pointer-events: none;
}

.upload-area.uploading::after {
    content: 'Enviando...';
    display: block;
    margin-top: 0.625rem;
    color: #667eea;
    font-weight: 600;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 0.625rem;
}

.upload-area p {
    color: #1e293b;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.upload-info {
    color: #9ca3af;
    font-size: 0.85rem;
}

.arquivos-enviados {
    margin-top: 1.5rem;
    display: none;
}

.arquivos-enviados h4 {
    color: #1e293b;
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.lista-arquivos {
    list-style: none;
    padding: 0;
    margin: 0;
}

.arquivo-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-radius: 0.625rem;
    margin-bottom: 0.625rem;
    border-left: 4px solid #667eea;
}

.arquivo-item.is-imagem {
    border-left-color: #22c55e;
}

.arquivo-icone {
    font-size: 1.5rem;
}

.arquivo-info {
    flex: 1;
    min-width: 0;
}

.arquivo-nome {
    display: block;
    font-weight: 500;
    color: #1e293b;
    word-break: break-word;
    font-size: 0.95rem;
}

.arquivo-meta {
    display: block;
    font-size: 0.8rem;
    color: #9ca3af;
    margin-top: 0.125rem;
}

.btn-excluir-arquivo {
    background: transparent;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.2s ease;
    padding: 0.25rem;
}

.btn-excluir-arquivo:hover {
    opacity: 1;
    transform: scale(1.1);
}

.upload-section.desabilitado {
    opacity: 0.6;
    pointer-events: none;
}

/* ========================================
   Formulário Cliente - Campos
   ======================================== */

.campo-grupo {
    margin-bottom: 1.25rem;
}

.campo-label {
    display: block;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.campo-label .obrigatorio {
    color: #dc2626;
    margin-left: 0.25rem;
}

.campo-input,
.campo-textarea,
.campo-select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.625rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: #fafafa;
}

.campo-input:focus,
.campo-textarea:focus,
.campo-select:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.campo-textarea {
    resize: vertical;
    min-height: 100px;
}

.campo-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.campo-checkbox input[type="checkbox"] {
    width: 1.5rem;
    height: 1.5rem;
    margin-right: 0.625rem;
    cursor: pointer;
}

.formulario-acoes {
    margin-top: 2rem;
}

.btn-enviar {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-enviar:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-enviar:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Alertas gerais */
.alerta {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
}

.alerta-icone {
    font-size: 1.5rem;
}

.alerta-aviso {
    background: #fffbeb;
    border: 1px solid #f59e0b;
}

.alerta-info {
    background: #eff6ff;
    border: 1px solid #3b82f6;
}

.alerta-sucesso {
    background: #f0fdf4;
    border: 1px solid #22c55e;
}

.alerta strong {
    display: block;
    margin-bottom: 0.25rem;
    color: #1e293b;
}

.alerta p {
    color: #64748b;
    margin: 0;
    font-size: 0.9rem;
}

/* Status da Senha no Formulário */
.formulario-status {
    background: #f8fafc;
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-top: 1.25rem;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 0;
}

.status-item:not(:last-child) {
    border-bottom: 1px solid #e2e8f0;
}

.status-label {
    color: #64748b;
    font-size: 0.9rem;
}

.status-valor {
    font-weight: 600;
    font-size: 1.1rem;
}

.status-aguardando { color: #f59e0b; }
.status-chamando { 
    color: #22c55e; 
    animation: piscar 1s infinite; 
}
.status-atendendo { color: #3b82f6; }

@keyframes piscar {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ========================================
   Utilitários
   ======================================== */

/* Link voltar genérico */
.link-voltar {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
    color: #64748b;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.link-voltar:hover {
    color: #1e293b;
}
