/* Pesquisa de Contratos - Design Elegante e Sofisticado */

/* Variáveis CSS */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --warning-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --danger-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --info-gradient: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #4facfe;
    --warning-color: #43e97b;
    --danger-color: #fa709a;
    --info-color: #a8edea;
    
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --text-light: #a0aec0;
    
    --bg-light: #f7fafc;
    --bg-white: #ffffff;
    --bg-card: #ffffff;
    
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 20px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset e Base */
* {
    box-sizing: border-box;
}

body {
    background: var(--bg-light);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
}

/* Container Principal */
.pesquisa-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 0;
}

/* Header da Pesquisa */
.pesquisa-header {
    background: var(--primary-gradient);
    padding: 2rem 0 1.5rem;
    position: relative;
    overflow: hidden;
}

.pesquisa-header::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="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.titulo-principal {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.75rem;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.8s ease-out;
}

.titulo-principal i {
    margin-right: 0.75rem;
    font-size: 2.25rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.75rem;
    border-radius: 50%;
    backdrop-filter: blur(10px);
}

.subtitulo {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* Conteúdo da Pesquisa */
.pesquisa-content {
    max-width: 1400px;
    margin: 1rem auto 0;
    padding: 0 2rem 4rem;
    position: relative;
    z-index: 2;
}

/* Formulário de Pesquisa */
.formulario-pesquisa {
    background: var(--bg-white);
    border-radius: var(--border-radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-xl);
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.search-form {
    margin: 0;
}

.input-group {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.input-wrapper {
    flex: 1;
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1.25rem;
    z-index: 2;
    transition: var(--transition);
}

.search-input {
    width: 100%;
    padding: 1.25rem 1.25rem 1.25rem 3.5rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--border-radius-lg);
    font-size: 1.125rem;
    font-weight: 500;
    background: var(--bg-white);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.search-input:focus + .input-icon {
    color: var(--primary-color);
}

.btn-pesquisar {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 1.25rem 2rem;
    border-radius: var(--border-radius-lg);
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.btn-pesquisar:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.btn-pesquisar:active {
    transform: translateY(0);
}

/* Resultado da Pesquisa */
.resultado-pesquisa {
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.resultado-header {
    margin-bottom: 1.5rem;
}

.resultado-titulo {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.resultado-titulo i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* Tabela de Contratos */
.table-container {
    background: var(--bg-white);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    overflow-x: auto;
}

.contratos-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1000px;
}

.contratos-table thead {
    background: var(--primary-gradient);
    color: white;
}

.contratos-table thead th {
    padding: 1.5rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.contratos-table thead th i {
    margin-right: 0.5rem;
    font-size: 1rem;
}

.contratos-table tbody tr {
    border-bottom: 1px solid #e2e8f0;
    transition: var(--transition);
}

.contratos-table tbody tr:hover {
    background: var(--bg-light);
    transform: scale(1.01);
}

.contratos-table tbody tr:last-child {
    border-bottom: none;
}

.contratos-table tbody td {
    padding: 1.25rem 1rem;
    font-size: 0.9375rem;
    color: var(--text-primary);
}

/* Badges */
.badge-id {
    background: #e2e8f0;
    color: var(--text-primary);
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 0.875rem;
    display: inline-block;
}

.badge-tipo {
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    background: #f7fafc;
    color: var(--text-primary);
    border: 1px solid #e2e8f0;
}

.badge-tipo.venda {
    background: #f7fafc;
    color: var(--text-primary);
    border: 1px solid #e2e8f0;
}

.badge-tipo.aluguel {
    background: #f7fafc;
    color: var(--text-primary);
    border: 1px solid #e2e8f0;
}

.badge-tipo.compra {
    background: #f7fafc;
    color: var(--text-primary);
    border: 1px solid #e2e8f0;
}

.badge-situacao {
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    background: #f7fafc;
    color: var(--text-primary);
    border: 1px solid #e2e8f0;
}

.badge-situacao.ativo {
    background: #f7fafc;
    color: var(--text-primary);
    border: 1px solid #e2e8f0;
}

.badge-situacao.distratado {
    background: #f7fafc;
    color: var(--text-primary);
    border: 1px solid #e2e8f0;
}

.badge-situacao.suspenso {
    background: #f7fafc;
    color: var(--text-primary);
    border: 1px solid #e2e8f0;
}

.badge-situacao.judicial {
    background: #f7fafc;
    color: var(--text-primary);
    border: 1px solid #e2e8f0;
}

.badge-parcela {
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #f7fafc;
    color: var(--text-primary);
    border: 1px solid #e2e8f0;
}

.badge-parcela i {
    font-size: 0.75rem;
}

.badge-pagas {
    background: #f7fafc;
    color: var(--text-primary);
    border: 1px solid #e2e8f0;
}

.badge-a-vencer {
    background: #f7fafc;
    color: var(--text-primary);
    border: 1px solid #e2e8f0;
}

.badge-vencidas {
    background: #f7fafc;
    color: var(--text-primary);
    border: 1px solid #e2e8f0;
}

/* Ações */
.acoes-cell {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-acao {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-detalhes {
    background: #e2e8f0;
    color: var(--text-primary);
}

.btn-detalhes:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: #cbd5e0;
    color: var(--text-primary);
}

.btn-editar {
    background: #e2e8f0;
    color: var(--text-primary);
}

.btn-editar:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: #cbd5e0;
    color: var(--text-primary);
}

/* Sem Resultados */
.sem-resultados {
    background: var(--bg-white);
    border-radius: var(--border-radius-xl);
    padding: 4rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.sem-resultados-content i {
    font-size: 4rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.sem-resultados-content h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.sem-resultados-content p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* Animações */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsividade */
@media (max-width: 1200px) {
    .contratos-table {
        font-size: 0.875rem;
    }
    
    .contratos-table thead th,
    .contratos-table tbody td {
        padding: 1rem 0.75rem;
    }
}

@media (max-width: 768px) {
    .titulo-principal {
        font-size: 2rem;
    }
    
    .titulo-principal i {
        font-size: 1.75rem;
        padding: 0.5rem;
    }
    
    .pesquisa-content {
        padding: 0 1rem 2rem;
    }
    
    .formulario-pesquisa {
        padding: 2rem 1.5rem;
    }
    
    .input-group {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn-pesquisar {
        width: 100%;
        justify-content: center;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .contratos-table {
        font-size: 0.8125rem;
    }
    
    .contratos-table thead th,
    .contratos-table tbody td {
        padding: 0.75rem 0.5rem;
    }
    
    .badge-tipo,
    .badge-situacao,
    .badge-parcela {
        font-size: 0.75rem;
        padding: 0.375rem 0.625rem;
    }
}

@media (max-width: 480px) {
    .titulo-principal {
        font-size: 1.75rem;
    }
    
    .subtitulo {
        font-size: 1rem;
    }
    
    .resultado-titulo {
        font-size: 1.5rem;
    }
}

/* Scrollbar Personalizada */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

