/* Reset e configurações básicas */
* {
    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;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

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

.header-content h1 {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.header-content p {
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
    font-weight: 300;
}

/* Main content */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Cards base */
.upload-card,
.search-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.upload-card:hover,
.search-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.upload-card h2,
.search-card h2 {
    color: #4a5568;
    font-size: 1.5rem;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.upload-card h2 i,
.search-card h2 i {
    color: #667eea;
}

/* Upload Area */
.upload-area {
    border: 3px dashed #cbd5e0;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #f7fafc;
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: #667eea;
    background: #edf2f7;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 3rem;
    color: #a0aec0;
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

.upload-area:hover .upload-icon,
.upload-area.drag-over .upload-icon {
    color: #667eea;
}

.upload-area h3 {
    color: #4a5568;
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.upload-area p {
    color: #718096;
    margin-bottom: 20px;
}

/* File List */
.file-list {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #e2e8f0;
}

.file-list h3 {
    color: #4a5568;
    margin-bottom: 15px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f7fafc;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: background 0.3s ease;
}

.file-item:hover {
    background: #edf2f7;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-info i {
    color: #667eea;
    font-size: 1.2rem;
}

.file-name {
    font-weight: 600;
    color: #2d3748;
}

.file-size {
    color: #718096;
    font-size: 0.9rem;
}

.btn-remove {
    background: #fed7d7;
    color: #c53030;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-remove:hover {
    background: #feb2b2;
    transform: scale(1.1);
}

/* Upload Actions */
.upload-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

/* Processing Status */
.processing-status {
    margin-top: 25px;
    padding: 20px;
    background: #edf2f7;
    border-radius: 10px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s ease;
}

/* Search Header */
.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.data-info {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #718096;
    font-weight: 500;
}

/* Form styles */
.search-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.form-group input::placeholder {
    color: #a0aec0;
}

/* Buttons */
.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    white-space: nowrap;
}

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

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

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

.btn-secondary {
    background: #f7fafc;
    color: #4a5568;
    border: 2px solid #e2e8f0;
}

.btn-secondary:hover:not(:disabled) {
    background: #edf2f7;
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.3);
}

.btn-outline {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline:hover:not(:disabled) {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
}

/* Results section */
.results-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f7fafc;
    flex-wrap: wrap;
    gap: 15px;
}

.results-header h3 {
    color: #4a5568;
    font-size: 1.4rem;
}

.results-info {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.results-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.results-controls label {
    color: #718096;
    font-weight: 500;
    font-size: 0.9rem;
}

.results-controls select {
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: white;
}

/* Loading spinner */
.loading-spinner {
    text-align: center;
    padding: 40px;
    color: #667eea;
    font-size: 1.1rem;
}

.loading-spinner i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

/* Results container */
.results-container {
    min-height: 200px;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #a0aec0;
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.no-results p {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.no-results small {
    font-size: 0.9rem;
    color: #cbd5e0;
}

/* Company cards */
.company-card {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.company-card:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: #667eea;
    background: white;
}

.company-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.company-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 5px;
}

.company-cnpj {
    color: #667eea;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
}

.company-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.status-ativa {
    background: #c6f6d5;
    color: #22543d;
}

.status-baixada {
    background: #fed7d7;
    color: #742a2a;
}

.status-suspensa {
    background: #feebc8;
    color: #7b341e;
}

.status-inapta {
    background: #e2e8f0;
    color: #4a5568;
}

.status-nula {
    background: #fbb6ce;
    color: #97266d;
}

.status-desconhecida {
    background: #e2e8f0;
    color: #4a5568;
}

.company-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 0.8rem;
    color: #718096;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 3px;
}

.detail-value {
    color: #2d3748;
    font-weight: 500;
    word-break: break-word;
}

.card-footer {
    text-align: center;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
}

.card-footer small {
    color: #a0aec0;
    font-style: italic;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    flex-wrap: wrap;
}

.btn-pagination {
    background: white;
    border: 2px solid #e2e8f0;
    color: #4a5568;
    padding: 8px 12px;
    font-size: 0.9rem;
    min-width: 40px;
}

.btn-pagination:hover:not(:disabled) {
    border-color: #667eea;
    color: #667eea;
}

.btn-pagination:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#pageInfo {
    color: #718096;
    font-weight: 500;
    margin: 0 10px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 15px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h3 {
    color: #2d3748;
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #a0aec0;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f7fafc;
    color: #4a5568;
}

.modal-body {
    padding: 30px;
}

.company-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.detail-section {
    background: #f7fafc;
    padding: 20px;
    border-radius: 10px;
}

.detail-section h4 {
    color: #4a5568;
    font-size: 1.1rem;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 15px;
}

.detail-row .label {
    font-weight: 600;
    color: #718096;
    font-size: 0.9rem;
    min-width: 120px;
    flex-shrink: 0;
}

.detail-row .value {
    color: #2d3748;
    font-weight: 500;
    text-align: right;
    word-break: break-word;
}

.detail-row .value.status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    text-transform: uppercase;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header-content h1 {
        font-size: 2rem;
    }
    
    .upload-card,
    .search-card,
    .results-section {
        padding: 20px;
    }
    
    .upload-area {
        padding: 30px 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        justify-content: center;
    }
    
    .search-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .results-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .company-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .company-details {
        grid-template-columns: 1fr;
    }
    
    .pagination {
        flex-direction: column;
        gap: 10px;
    }
    
    .company-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-row {
        flex-direction: column;
        gap: 5px;
    }
    
    .detail-row .value {
        text-align: left;
    }
    
    .modal-content {
        margin: 10px;
        max-height: 95vh;
    }
    
    .modal-header,
    .modal-body {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .upload-area {
        padding: 20px 15px;
    }
    
    .upload-area h3 {
        font-size: 1.1rem;
    }
    
    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .company-card {
        padding: 15px;
    }
    
    .detail-section {
        padding: 15px;
    }
}

/* Animações e transições */
.company-card {
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.upload-area.drag-over {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}



/* Estilos para o logotipo */
.header-logo {
    height: 50px;
    margin-right: 15px;
    vertical-align: middle;
}

/* Seção de Botões de Estado */
.state-buttons-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    text-align: center;
}

.state-buttons-section h2 {
    color: #4a5568;
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.state-section-subtitle {
    color: #718096;
    font-size: 1.1rem;
    margin-bottom: 25px;
    font-weight: 500;
}

.state-buttons-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    justify-content: center;
}

.state-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.state-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    color: white;
    text-decoration: none;
}

/* Descrição da demonstração */
.demo-description {
    color: #718096;
    font-size: 1rem;
    margin-bottom: 20px;
    font-style: italic;
    background: #f7fafc;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

/* Botão Flutuante de CTA */
.floating-cta {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25d366; /* WhatsApp green */
    color: white;
    padding: 15px 25px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    z-index: 1000;
    animation: pulse-cta 2s infinite;
}

.floating-cta:hover {
    background: #128c7e; /* Darker WhatsApp green */
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.3);
    color: white;
    text-decoration: none;
}

.floating-cta i {
    font-size: 1.5rem;
}

.floating-cta span {
    font-size: 1rem;
}

/* Animação do botão flutuante */
@keyframes pulse-cta {
    0% {
        box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3);
    }
    50% {
        box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
    }
    100% {
        box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3);
    }
}

/* Ajustes responsivos */
@media (max-width: 768px) {
    .state-buttons-section h2 {
        font-size: 1.5rem;
    }

    .state-section-subtitle {
        font-size: 1rem;
    }

    .state-button {
        padding: 12px 8px;
        font-size: 0.9rem;
    }

    .floating-cta {
        bottom: 20px;
        right: 20px;
        padding: 12px 20px;
        font-size: 1rem;
    }

    .floating-cta i {
        font-size: 1.2rem;
    }

    .floating-cta span {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .state-buttons-container {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }

    .floating-cta span {
        display: none;
    }

    .floating-cta {
        padding: 15px;
        border-radius: 50%;
    }
}

