* {
    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;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    max-width: 1200px;
    width: 100%;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 28px;
    text-align: center;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    color: #333;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23667eea' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

select:hover {
    border-color: #667eea;
}

select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-buscar {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
}

.btn-buscar:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.btn-buscar:active {
    transform: translateY(0);
}

.btn-buscar:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.loader {
    display: none;
    text-align: center;
    margin-top: 20px;
}

.loader.active {
    display: block;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.resultado {
    margin-top: 30px;
    padding: 20px;
    border-radius: 10px;
    display: none;
}

.resultado.sucesso {
    background: #d4edda;
    border: 2px solid #28a745;
    color: #155724;
    display: block;
}

.resultado.erro {
    background: #f8d7da;
    border: 2px solid #dc3545;
    color: #721c24;
    display: block;
}

.resultado h3 {
    margin-bottom: 10px;
    font-size: 18px;
}

.resultado p {
    margin: 5px 0;
    font-size: 14px;
}

.url-link {
    word-break: break-all;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.url-link:hover {
    text-decoration: underline;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    background: #667eea;
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 10px;
}

.tabela-dados {
    margin-top: 20px;
    overflow-x: auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-height: 500px;
    overflow-y: auto;
}

.tabela-dados table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.tabela-dados th {
    background: #1e3a8a;
    color: white;
    padding: 10px 8px;
    text-align: left;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    position: sticky;
    top: 0;
    z-index: 10;
    border: 1px solid #1e3a8a;
}

.tabela-dados td {
    padding: 8px;
    border: 1px solid #d1d5db;
    color: #333;
    background: white;
}

.tabela-dados tr:hover td {
    background: #f3f4f6;
}

.tabela-dados tr:last-child td {
    border-bottom: 1px solid #d1d5db;
}

.info-box {
    background: #e7f3ff;
    border-left: 4px solid #2196F3;
    padding: 12px;
    margin-top: 15px;
    border-radius: 4px;
    font-size: 13px;
    color: #0d47a1;
}

.search-box {
    margin-bottom: 15px;
}

.search-box input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    color: #333;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-box input::placeholder {
    color: #999;
}

@media (max-width: 480px) {
    .container {
        padding: 25px;
    }

    h1 {
        font-size: 24px;
    }

    .tabela-dados {
        font-size: 10px;
    }

    .tabela-dados th,
    .tabela-dados td {
        padding: 6px 4px;
    }
}


/* Adicione este CSS ao seu arquivo style.css existente */

/* Container da busca com botão de exportação */
.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}

#searchInput {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

#searchInput:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* Botão de exportação Excel */
.btn-export {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.25);
}

.btn-export:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-export:active {
    transform: translateY(0);
}

.btn-export svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
}

/* Responsivo */
@media (max-width: 768px) {
    .search-box {
        flex-direction: column;
    }
    
    #searchInput,
    .btn-export {
        width: 100%;
    }
    
    .btn-export {
        justify-content: center;
    }
}