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

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: hsl(220, 20%, 97%);
    min-height: 100vh;
    color: hsl(222, 47%, 11%);
    line-height: 1.6;
}

/* Container principal */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: hsl(220, 20%, 97%);
}

/* Header */
.header {
    background: white;
    border-bottom: 1px solid hsl(220, 13%, 91%);
    padding: 0;
    margin-bottom: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 50;
    border-radius: 0;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* Header Logo */
.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.logo-icon i {
    font-size: 20px;
    color: white;
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 20px;
    font-weight: 700;
    color: hsl(222, 47%, 11%);
    margin: 0;
    line-height: 1.2;
    font-family: 'Outfit', system-ui, sans-serif;
}

.logo-subtitle {
    font-size: 12px;
    color: hsl(220, 9%, 46%);
    margin: 0;
    line-height: 1.2;
}

/* Header Navigation */
.header-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: transparent;
    color: hsl(220, 9%, 46%);
    text-decoration: none;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    cursor: pointer;
    font-family: inherit;
    position: relative;
}

.nav-btn:hover {
    color: hsl(222, 47%, 11%);
    background: hsl(220, 14%, 96%);
}

.nav-btn i {
    font-size: 14px;
}

.nav-btn-outline {
    border: 1px solid hsl(220, 13%, 91%);
}

.nav-btn-outline:hover {
    border-color: hsl(211, 30%, 26%);
    color: hsl(211, 30%, 26%);
    background: hsl(211, 30%, 26%, 0.05);
}

.nav-btn-logout {
    color: hsl(0, 84%, 60%);
}

.nav-btn-logout:hover {
    background: hsl(0, 84%, 60%, 0.1);
    color: hsl(0, 84%, 55%);
}

/* Dropdown Menu */
.nav-dropdown {
    position: relative;
}

.nav-btn-dropdown {
    gap: 4px;
}

.nav-btn-dropdown i.fa-chevron-down {
    font-size: 10px;
    margin-left: 2px;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: white;
    border: 1px solid hsl(220, 13%, 91%);
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    z-index: 1000;
    overflow: hidden;
}

/* Dropdown será controlado via JavaScript */
.nav-dropdown .dropdown-menu {
    display: none;
}

.nav-dropdown .dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: hsl(222, 47%, 11%);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 14px;
    border-bottom: 1px solid hsl(220, 13%, 91%);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: hsl(211, 30%, 26%, 0.05);
    color: hsl(211, 30%, 26%);
}

.dropdown-item i {
    font-size: 14px;
    width: 16px;
    text-align: center;
}

.nav-logout:hover {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.2), rgba(220, 53, 69, 0.2));
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Retângulo Esquerdo - Título */
.header-left {
    flex: 1;
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, rgba(250, 120, 47, 0.05), rgba(250, 140, 70, 0.05));
    border-radius: 15px;
    border: 1px solid rgba(250, 120, 47, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo i {
    font-size: 2.2rem;
    color: hsl(211, 30%, 26%);
}

.logo h1 {
    font-size: 2.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, hsl(211, 30%, 26%), hsl(211, 30%, 38%));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.1rem;
    color: #666;
    font-weight: 400;
}

/* Retângulo Direito - Informações */
.header-right {
    flex: 1;
    padding: 20px;
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.05), rgba(56, 249, 215, 0.05));
    border-radius: 15px;
    border: 1px solid rgba(67, 233, 123, 0.1);
}

.version-status {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.version-badge-header, .export-date-header {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(250, 120, 47, 0.1), rgba(250, 140, 70, 0.1));
    padding: 10px 15px;
    border-radius: 12px;
    border: 1px solid rgba(250, 120, 47, 0.2);
    color: hsl(211, 30%, 26%);
    font-weight: 600;
    font-size: 0.9rem;
}

.version-badge-header i, .export-date-header i {
    font-size: 0.9rem;
}

.features-preview {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.features-label {
    color: #333;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.features-tags {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.feature-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.1), rgba(56, 249, 215, 0.1));
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(67, 233, 123, 0.2);
    color: #43e97b;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.feature-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(67, 233, 123, 0.2);
}

.feature-tag i {
    font-size: 0.8rem;
    min-width: 16px;
}

/* Main Content - Two Columns */
.main-content {
    display: flex;
    gap: 30px;
}
.left-column {
    flex-basis: 25%;
    max-width: 25%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.right-column {
    flex-basis: 75%;
    max-width: 75%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Cards base */
.upload-card, .results-card, .logs-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    border: 1px solid hsl(220, 13%, 91%);
}

.upload-card {
    flex-shrink: 0;
}

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

.upload-header i {
    font-size: 3rem;
    color: hsl(211, 30%, 26%);
    margin-bottom: 15px;
}

.upload-header h2 {
    font-size: 1.8rem;
    color: hsl(222, 47%, 11%);
    font-weight: 600;
}

/* File Input */
.file-input-container {
    position: relative;
    margin-bottom: 30px;
}

.file-input-container input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-input-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    border: 3px dashed hsl(211, 30%, 26%);
    border-radius: 15px;
    background: linear-gradient(135deg, rgba(250, 120, 47, 0.05), rgba(250, 140, 70, 0.05));
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-input-label:hover {
    border-color: hsl(211, 30%, 26%);
    background: hsl(211, 30%, 26%, 0.05);
    transform: translateY(-2px);
}

.file-input-label i {
    font-size: 2.5rem;
    color: hsl(211, 30%, 26%);
    margin-bottom: 12px;
}

.file-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.file-hint {
    font-size: 0.9rem;
    color: hsl(220, 9%, 46%);
}

/* Buttons */
.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, hsl(211, 30%, 26%), hsl(211, 30%, 38%));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1), 0 0 20px hsl(211, 30%, 26%, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, hsl(220, 14%, 96%), hsl(220, 13%, 91%));
    color: hsl(222, 47%, 11%);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

.btn-success {
    background: linear-gradient(135deg, hsl(142, 76%, 36%), hsl(142, 76%, 40%));
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.3);
}

.btn-info {
    background: linear-gradient(135deg, hsl(220, 14%, 96%), hsl(220, 13%, 91%));
    color: hsl(222, 47%, 11%);
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

.btn-outline {
    background: transparent;
    border: 1px solid hsl(220, 13%, 91%);
    color: hsl(222, 47%, 11%);
}

.btn-outline:hover {
    background: hsl(211, 30%, 26%, 0.05);
    border-color: hsl(211, 30%, 26%);
    color: hsl(211, 30%, 26%);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Flash Messages */
.flash-messages {
    margin-bottom: 20px;
}

.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 10px;
    font-weight: 500;
}

.alert-warning {
    background: #f8f9fa;
    color: #495057;
    border-left: 4px solid #6c757d;
    border-radius: 8px;
    padding: 15px 20px;
    margin: 10px 0;
    font-weight: 500;
}

/* Results Section */
.results-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.results-header i {
    font-size: 2rem;
    color: hsl(211, 30%, 26%);
}

.results-header h2 {
    font-size: 1.6rem;
    color: #333;
    font-weight: 600;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
    align-items: stretch;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: linear-gradient(135deg, rgba(250, 120, 47, 0.1), rgba(250, 140, 70, 0.1));
    border-radius: 12px;
    border: 1px solid rgba(250, 120, 47, 0.2);
    min-height: 80px;
}

.stat-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, hsl(211, 30%, 26%), hsl(211, 30%, 38%));
    border-radius: 10px;
    color: white;
    font-size: 1.1rem;
}

.stat-content {
    display: flex;
    flex-direction: column;
    text-align: center;
}

.stat-number {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.3;
    margin-top: 2px;
}

/* Download Section */
.download-section {
    border-top: 1px solid #eee;
    padding-top: 25px;
}

.download-section h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 15px;
    font-weight: 600;
}

.download-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Full Width Section */
.full-width-section {
    width: 100%;
    margin-top: 20px;
}

/* Logs Section */
.logs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.logs-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logs-title h2 {
    font-size: 1.6rem;
    color: #333;
    font-weight: 600;
    margin: 0;
}

.logs-title i {
    color: hsl(211, 30%, 26%);
    font-size: 1.8rem;
}

.logs-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Custom Checkbox */
.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #333;
    font-weight: 500;
}

.filter-checkbox input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    background: white;
    border: 2px solid hsl(211, 30%, 26%);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.checkmark::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: white;
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.filter-checkbox input[type="checkbox"]:checked + .checkmark {
    background: hsl(211, 30%, 26%);
}

.filter-checkbox input[type="checkbox"]:checked + .checkmark::after {
    opacity: 1;
}

.logs-content {
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.logs-container {
    max-height: 300px;
    overflow-y: auto;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    border: 1px solid #e9ecef;
}

.log-entry {
    padding: 10px;
    margin-bottom: 10px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid hsl(211, 30%, 26%);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
}

.log-entry:last-child {
    margin-bottom: 0;
}

/* Footer */
.footer {
    margin-top: 40px;
    text-align: center;
    padding: 20px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.footer-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.footer-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-copyright {
    text-align: center;
    margin-top: 10px;
}

.footer-copyright p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin: 0;
}

.footer-version {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 600px;
    width: 100%;
}

.version-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.version-badge, .export-date {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    font-size: 0.95rem;
}

.version-badge i, .export-date i {
    color: hsl(211, 30%, 26%);
    font-size: 1rem;
}

.updates-info {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 15px;
}

.updates-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.updates-title i {
    color: #43e97b;
    font-size: 1rem;
}

.updates-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.update-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.update-item i {
    color: hsl(211, 30%, 26%);
    font-size: 0.9rem;
}

/* Responsividade para o footer */
@media (max-width: 768px) {
    .version-info {
        flex-direction: column;
        gap: 15px;
    }
    
    .updates-list {
        gap: 6px;
    }
    
    .update-item {
        font-size: 0.8rem;
        padding: 5px 10px;
    }
    
    .footer-version {
        padding: 15px;
    }
}

/* Loading Elements */
#loading-bar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    width: 0%;
    background: linear-gradient(90deg, hsl(211, 30%, 26%), hsl(211, 30%, 38%));
    z-index: 9999;
    transition: width 0.4s ease;
}

#spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.spinner-container {
    text-align: center;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid hsl(211, 30%, 26%);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.spinner-text {
    font-size: 1.1rem;
    color: #333;
    font-weight: 500;
    margin-bottom: 10px;
}

.progress-info {
    font-size: 0.9rem;
    color: #666;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header {
        padding: 20px;
    }
    
    .logo h1 {
        font-size: 1.8rem;
    }
    
    .main-content {
        flex-direction: column;
    }
    
    .left-column {
        flex: none;
        width: 100%;
    }
    
    .upload-card, .results-card, .logs-card {
        padding: 20px;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .download-buttons {
        flex-direction: column;
    }
    
    .logs-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .logs-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .logo {
        flex-direction: column;
        gap: 10px;
    }
    
    .logo h1 {
        font-size: 1.8rem;
    }
    
    .file-input-label {
        padding: 40px 15px;
    }
    
    .file-input-label i {
        font-size: 2.5rem;
    }
}

/* Histórico de PDFs Gerados */
.history-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    border: 1px solid hsl(220, 13%, 91%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 20px;
}

/* Log de processamento em tempo real (abaixo do histórico) */
.realtime-logs-body {
    max-height: 220px;
    overflow-y: auto;
    margin-top: 10px;
    padding: 12px 14px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-family: monospace;
    font-size: 0.86rem;
    color: #1f2933;
}

.realtime-logs-body .alert {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 0.85rem;
}

.history-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 18px;
}

.history-header i {
    font-size: 2rem;
    color: hsl(211, 30%, 38%);
}

.history-header h2 {
    font-size: 1.4rem;
    color: #333;
    font-weight: 600;
}

.history-filters {
    margin-bottom: 15px;
    display: flex;
    align-items: end;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
}

.filter-input {
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
    transition: border-color 0.3s ease;
    min-width: 150px;
}

.filter-input:focus {
    outline: none;
    border-color: hsl(211, 30%, 26%);
    box-shadow: 0 0 0 3px rgba(250, 120, 47, 0.1);
}

#filtro-conta {
    padding: 7px 14px;
    border-radius: 8px;
    border: 1px solid hsl(211, 30%, 38%);
    background: #f7f7fb;
    color: #333;
    font-size: 1rem;
}

#historico-cards {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-height: 120px;
    margin-bottom: 18px;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
}

.historico-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: linear-gradient(135deg, rgba(250, 120, 47, 0.08), rgba(250, 140, 70, 0.08));
    border-radius: 14px;
    padding: 18px 22px;
    box-shadow: 0 2px 10px rgba(250, 120, 47, 0.07);
    border: 1px solid #e0e0f7;
    transition: box-shadow 0.2s;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}
.historico-card:hover {
    box-shadow: 0 4px 18px rgba(250, 120, 47, 0.18);
}
.historico-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.historico-nome {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}
.historico-data {
    font-size: 0.95rem;
    color: #666;
}
.historico-conta {
    font-size: 0.95rem;
    color: hsl(211, 30%, 38%);
}
.btn-download {
    background: linear-gradient(135deg, hsl(211, 30%, 26%), hsl(211, 30%, 38%));
    color: #fff;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 7px;
    border: none;
    transition: background 0.2s;
}
.btn-download:hover {
    background: linear-gradient(135deg, hsl(211, 30%, 38%), hsl(211, 30%, 26%));
}

#paginacao-historico {
    display: flex;
    gap: 7px;
    justify-content: center;
    margin-bottom: 5px;
}
.paginacao-btn {
    background: transparent;
    border: 1.5px solid hsl(211, 30%, 38%);
    color: hsl(211, 30%, 38%);
    border-radius: 7px;
    padding: 7px 15px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.paginacao-btn.ativo, .paginacao-btn:hover {
    background: hsl(211, 30%, 38%);
    color: #fff;
}

/* Histórico - ações dos cards */
.historico-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
}
.btn-view {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
    color: #fff;
    border-radius: 7px;
    padding: 7px 12px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    border: none;
    transition: background 0.2s;
    order: 1;
}
.btn-view:hover {
    background: linear-gradient(135deg, #38f9d7, #43e97b);
    color: #fff;
}
.btn-download {
    background: linear-gradient(135deg, hsl(211, 30%, 38%), hsl(211, 30%, 26%));
    color: #fff;
    border-radius: 7px;
    padding: 7px 12px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    border: none;
    transition: background 0.2s;
    order: 2;
}
.btn-download:hover {
    background: linear-gradient(135deg, hsl(211, 30%, 26%), hsl(211, 30%, 38%));
}
.btn-remove {
    background: linear-gradient(135deg, #ff5858, #f09819);
    color: #fff;
    border-radius: 7px;
    padding: 7px 12px;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.2s;
    order: 3;
}
.btn-remove:hover {
    background: linear-gradient(135deg, #f09819, #ff5858);
}
.historico-card.removido {
    background: #ffeaea !important;
    border: 2px solid #ff5858 !important;
    opacity: 1 !important;
    filter: none !important;
}
@media (max-width: 600px) {
    .historico-actions {
        flex-direction: column;
        gap: 4px;
    }
    .btn-view, .btn-download, .btn-remove {
        width: 100%;
        justify-content: center;
    }
}

/* Login Page */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, hsl(211, 30%, 26%) 0%, hsl(211, 30%, 38%) 100%);
}
.login-card {
  background: rgba(255,255,255,0.97);
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(102,126,234,0.18);
  padding: 40px 30px 30px 30px;
  max-width: 350px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: stretch;
}
.login-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.login-header i {
  font-size: 2.2rem;
  color: hsl(211, 30%, 26%);
}
.login-header h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #333;
}
.login-card label {
  font-weight: 500;
  color: #333;
}
.login-card input[type="password"] {
  padding: 10px;
  border-radius: 8px;
  border: 1.5px solid hsl(211, 30%, 38%);
  font-size: 1rem;
  margin-bottom: 10px;
}
.login-card button.btn {
  margin-top: 10px;
}

/* Zebra striping para tabela de logs */
.logs-table tr.zebra-even {
  background: #f7f7fb;
}
.logs-table tr.zebra-odd {
  background: #ede7f6;
}
.logs-table th, .logs-table td {
  padding: 7px 8px;
  text-align: left;
  vertical-align: top;
}
.logs-table th {
  background: hsl(211, 30%, 38%);
  color: #fff;
  font-weight: 600;
}
.truncated-text {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
}
.btn-popup {
  margin-left: 8px;
  padding: 4px 10px;
  font-size: 0.9rem;
  border-radius: 7px;
  background: linear-gradient(135deg, #a8edea, #fed6e3);
  color: #333;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-popup:hover {
  background: linear-gradient(135deg, #fed6e3, #a8edea);
}

/* Popup para texto bruto */
.full-text-popup {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.full-text-popup .popup-content {
  background: #fff;
  border-radius: 14px;
  padding: 30px 25px;
  max-width: 600px;
  width: 95vw;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(102,126,234,0.18);
  position: relative;
}
.full-text-popup .close-popup {
  position: absolute;
  top: 10px;
  right: 18px;
  font-size: 1.7rem;
  color: hsl(211, 30%, 38%);
  cursor: pointer;
  font-weight: bold;
}
.full-text-popup pre {
  white-space: pre-wrap;
  word-break: break-all;
  font-size: 1rem;
  color: #333;
  margin-top: 18px;
}

/* Popup de Instruções */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.instrucoes-popup {
    background: white;
    border-radius: 20px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: popupSlideIn 0.3s ease-out;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

.popup-header h2 {
    font-size: 1.5rem;
    color: #333;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.popup-header h2 i {
    color: hsl(211, 30%, 26%);
}

.close-popup {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-popup:hover {
    background: #f5f5f5;
    color: #333;
}

.popup-body {
    padding: 30px;
}

.instrucao-step {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    align-items: flex-start;
}

.instrucao-step:last-child {
    margin-bottom: 0;
}

.step-number {
    background: linear-gradient(135deg, hsl(211, 30%, 26%), hsl(211, 30%, 38%));
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 5px;
}

.step-content h3 {
    font-size: 1.1rem;
    color: #333;
    font-weight: 600;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.step-content h3 i {
    color: hsl(211, 30%, 26%);
    font-size: 1rem;
}

.step-content p {
    color: #666;
    line-height: 1.6;
    margin: 0 0 10px 0;
}

.step-content ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
}

.step-content li {
    color: #666;
    line-height: 1.5;
    margin-bottom: 5px;
}

.step-content strong {
    color: #333;
    font-weight: 600;
}

.popup-footer {
    padding: 20px 30px 30px 30px;
    border-top: 1px solid #eee;
    text-align: center;
}

/* Responsividade para o header */
@media (max-width: 768px) {
    .logo h1 {
        font-size: 1.8rem;
    }
    
    .logo i {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .footer-buttons {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .footer-copyright {
        margin-top: 15px;
    }
}

/* Responsividade para o popup */
@media (max-width: 768px) {
    .instrucoes-popup {
        margin: 10px;
        max-height: 95vh;
    }
    
    .popup-header {
        padding: 20px 20px 15px 20px;
    }
    
    .popup-header h2 {
        font-size: 1.3rem;
    }
    
    .popup-body {
        padding: 20px;
    }
    
    .instrucao-step {
        gap: 15px;
        margin-bottom: 20px;
    }
    
    .step-number {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    
    .step-content h3 {
        font-size: 1rem;
    }
    
    .popup-footer {
        padding: 15px 20px 25px 20px;
    }
}

/* Popup central: processamento concluído */
.conclusao-popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
    padding: 20px;
}

.conclusao-popup-box {
    background: white;
    border-radius: 16px;
    padding: 28px 32px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.conclusao-popup-icon {
    font-size: 3rem;
    color: hsl(142, 71%, 40%);
    margin-bottom: 12px;
}

.conclusao-popup-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: hsl(222, 47%, 11%);
    margin-bottom: 10px;
}

.conclusao-popup-text {
    font-size: 0.95rem;
    color: hsl(215, 16%, 35%);
    line-height: 1.5;
    margin-bottom: 22px;
}

.conclusao-popup-btn {
    min-width: 120px;
}

.conclusao-popup-checklist {
    list-style: none;
    text-align: left;
    margin: 0 0 18px 0;
    padding: 0;
    font-size: 0.95rem;
    color: hsl(222, 47%, 18%);
}

.conclusao-popup-checklist li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    line-height: 1.45;
}

.conclusao-popup-checklist li:last-child {
    margin-bottom: 0;
}

.conclusao-check {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: hsl(142, 71%, 42%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    margin-top: 2px;
}
