/* Custom CSS for Modern Flask App */
:root {
    --primary-color: #3b82f6;
    --primary-dark: #1e40af;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;
    --dark-bg: #0f172a;
    --dark-card: #1e293b;
    --dark-border: #334155;
    --text-light: #e2e8f0;
    --text-muted: #94a3b8;
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Font Family */
body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Modern Navbar */
.modern-navbar {
    background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #475569 100%) !important;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.modern-navbar:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* Brand Styling */
.brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

.brand-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin: 0;
}

.brand-subtitle {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
    margin: 0;
}

/* Modern Nav Links */
.modern-nav-link {
    position: relative;
    padding: 0.75rem 1rem !important;
    margin: 0 0.25rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.modern-nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white !important;
    transform: translateY(-1px);
}

.modern-nav-link.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(29, 78, 216, 0.2));
    color: white !important;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.modern-nav-link i {
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.modern-nav-link:hover i {
    transform: scale(1.1);
}

/* Modern Toggler */
.modern-toggler {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

.modern-toggler:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

/* User Dropdown */
.modern-user-dropdown {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 0.5rem 1rem !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.modern-user-dropdown:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.user-name {
    font-weight: 600;
    color: white;
    font-size: 0.9rem;
}

.user-role {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    font-weight: 400;
}

/* Modern Dropdown */
.modern-dropdown {
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

.modern-dropdown-header {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin: 0.5rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar-large {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.user-details {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.user-details strong {
    color: white;
    font-size: 0.9rem;
}

.user-details small {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
}

.modern-dropdown-item {
    padding: 0.75rem 1rem;
    margin: 0.25rem 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.modern-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateX(4px);
}

.modern-dropdown-item.text-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Main Content */
.main-content {
    flex: 1;
    padding-top: 120px;
    padding-bottom: 60px;
    /* Conteúdo ocupa 90% da largura total (5% de margem de cada lado) */
    padding-left: 5%;
    padding-right: 5%;
}

/* Hero Section */
.hero-section {
    margin-bottom: 60px;
    padding: 60px 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(30, 64, 175, 0.1));
    border-radius: var(--border-radius);
    border: 1px solid rgba(59, 130, 246, 0.2);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.hero-content {
    animation: fadeInUp 0.8s ease-out;
}

.features-badges .badge {
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 20px;
    animation: pulse 2s infinite;
}

/* Upload Section */
.upload-section {
    margin-bottom: 60px;
}

.upload-card {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.upload-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed var(--dark-border);
    border-radius: var(--border-radius);
    padding: 40px;
    text-align: center;
    background: rgba(59, 130, 246, 0.02);
    transition: var(--transition);
    cursor: pointer;
}

.upload-zone:hover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
    transform: scale(1.02);
}

.upload-zone.dragover {
    border-color: var(--success-color);
    background: rgba(16, 185, 129, 0.1);
    transform: scale(1.02);
}

.upload-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
}

/* File Info */
.file-info {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    animation: slideInDown 0.5s ease-out;
}

/* Sheet Selection */
.sheet-selection {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    animation: slideInUp 0.5s ease-out;
}

/* Processing Section */
.processing-section {
    margin-bottom: 60px;
}

/* Agents Grid */
.agents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.agent-card {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.agent-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    transition: var(--transition);
}

.agent-card.processing::before {
    animation: shimmer 2s infinite;
}

.agent-card.completed {
    border-color: var(--success-color);
    background: rgba(16, 185, 129, 0.05);
}

.agent-card.error {
    border-color: var(--danger-color);
    background: rgba(239, 68, 68, 0.05);
}

.agent-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.agent-card.processing .agent-icon {
    animation: spin 2s linear infinite;
}

.agent-card.completed .agent-icon {
    color: var(--success-color);
}

.agent-card.error .agent-icon {
    color: var(--danger-color);
}

.agent-name {
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 5px;
}

.agent-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 15px;
}

/* Status Badges */
.status-badge {
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-block;
}

.status-waiting {
    background: rgba(100, 116, 139, 0.2);
    color: var(--text-muted);
}

.status-processing {
    background: rgba(251, 146, 60, 0.2);
    color: #fb923c;
    animation: pulse 1.5s infinite;
}

.status-completed {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success-color);
}

.status-error {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger-color);
}

/* Progress Container */
.progress-container {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--border-radius);
    padding: 20px;
}

.progress {
    height: 10px;
    background: var(--dark-border);
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--success-color), var(--primary-color), var(--info-color));
    background-size: 200% 100%;
    animation: gradient 3s ease infinite;
}

/* Pipeline Flow */
.pipeline-flow {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--border-radius);
    padding: 20px;
}

.pipeline-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.pipeline-step {
    padding: 8px 16px;
    background: var(--dark-border);
    color: var(--text-muted);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.pipeline-step.active {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.pipeline-step.completed {
    background: var(--success-color);
    color: white;
}

/* Results Section */
.results-section {
    margin-bottom: 60px;
}

/* File Info Banner */
.file-info-banner {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(6, 182, 212, 0.1));
    border-bottom: 1px solid rgba(16, 185, 129, 0.3);
    padding: 20px;
}

/* Validation Messages */
.validation-messages {
    padding: 0 20px;
}

.validation-messages .alert {
    margin-bottom: 10px;
    border: none;
    border-radius: 8px;
}

/* JSON Container */
.json-container {
    background: #1e1e1e;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    overflow: auto;
    max-height: 600px;
}

.json-result {
    color: #d4d4d4;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Custom Scrollbar */
.json-container::-webkit-scrollbar {
    width: 8px;
}

.json-container::-webkit-scrollbar-track {
    background: #2d2d2d;
}

.json-container::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.json-container::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: var(--transition);
    border: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

@keyframes gradient {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .main-content {
        padding-left: 4%;
        padding-right: 4%;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding-top: 100px;
        padding-left: 3%;
        padding-right: 3%;
    }
    
    .hero-section {
        padding: 40px 0;
        margin-bottom: 40px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .agents-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 15px;
    }
    
    .pipeline-steps {
        flex-direction: column;
        gap: 5px;
    }
    
    .pipeline-steps .bi-arrow-right {
        transform: rotate(90deg);
    }
    
    .upload-zone {
        padding: 30px 20px;
    }
    
    .upload-icon {
        font-size: 2rem;
    }
    
    .file-info-banner .row {
        text-align: center;
    }
    
    .file-info-banner .col-md-6:last-child {
        margin-top: 10px;
    }
}

/* Dark Theme Enhancements */
.card {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
}

.form-control, .form-select {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    color: var(--text-light);
}

.form-control:focus, .form-select:focus {
    background: var(--dark-card);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
    color: var(--text-light);
}

.modal-content {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading * {
    cursor: wait !important;
}

/* Success States */
.success-glow {
    animation: successGlow 2s ease-in-out;
}

@keyframes successGlow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(16, 185, 129, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.8);
    }
} 

/* Animações para os agents */
@keyframes gentle-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

@keyframes bounce-in {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.05); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes slide-in {
    0% { transform: translateX(-20px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

/* Melhorar as transições dos agents */
.agent-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.agent-card.agent-waiting {
    animation: slide-in 0.5s ease-out;
}

.agent-card.agent-processing {
    animation: gentle-pulse 2s infinite ease-in-out;
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(13, 110, 253, 0.3);
}

.agent-card.agent-completed {
    animation: bounce-in 0.6s ease-out;
    border-color: #28a745;
    box-shadow: 0 0 20px rgba(40, 167, 69, 0.3);
}

.agent-card.agent-error {
    border-color: #dc3545;
    box-shadow: 0 0 20px rgba(220, 53, 69, 0.3);
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Ícones dos agents com animações */
.agent-icon i {
    transition: all 0.3s ease;
    font-size: 1.5rem;
}

.agent-icon .spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Melhorar barra de progresso */
.progress-bar {
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animação para o texto de progresso */
.progress-text {
    transition: opacity 0.3s ease;
}

/* Pipeline flow com animações mais suaves */
.pipeline-step {
    transition: all 0.4s ease;
    transform-origin: center;
}

.pipeline-step.active {
    animation: gentle-pulse 1.5s ease-in-out;
}

.pipeline-step.completed {
    animation: bounce-in 0.5s ease-out;
} 

/* ===== LAYOUT OTIMIZADO ===== */

/* Hero section compacta */
.hero-section-compact {
    background: linear-gradient(135deg, #0d6efd 0%, #6610f2 50%, #d63384 100%);
    padding: 2rem 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hero-section-compact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content-compact {
    position: relative;
    z-index: 1;
}

.features-badges-compact .badge {
    font-size: 0.875rem;
    padding: 0.6rem 1rem;
    border-radius: 25px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.badge.bg-success {
    background: linear-gradient(135deg, #198754, #20c997) !important;
    box-shadow: 0 4px 15px rgba(25, 135, 84, 0.3);
}

.badge.bg-info {
    background: linear-gradient(135deg, #0dcaf0, #6f42c1) !important;
    box-shadow: 0 4px 15px rgba(13, 202, 240, 0.3);
}

.badge.bg-warning {
    background: linear-gradient(135deg, #ffc107, #fd7e14) !important;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

/* Main content area */
.main-content-area {
    padding: 2rem 0;
    background: linear-gradient(180deg, 
        rgba(255,255,255,0.05) 0%, 
        transparent 100%
    );
}

/* Upload card compacta */
.upload-card-compact {
    border-radius: 12px;
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.95);
}

/* Upload zone melhorada */
.upload-zone-compact {
    border: 2px dashed #495057;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(145deg, rgba(248, 249, 250, 0.05), rgba(248, 249, 250, 0.02));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.upload-zone-compact:hover {
    border-color: #0d6efd;
    background: linear-gradient(145deg, rgba(13, 110, 253, 0.1), rgba(13, 110, 253, 0.05));
    box-shadow: 0 4px 20px rgba(13, 110, 253, 0.2);
    transform: translateY(-2px);
}

.upload-zone-compact.dragover {
    border-color: #198754;
    background: linear-gradient(145deg, rgba(25, 135, 84, 0.15), rgba(25, 135, 84, 0.08));
    box-shadow: 0 8px 30px rgba(25, 135, 84, 0.3);
    transform: scale(1.02);
}

.upload-icon-compact {
    font-size: 2.5rem;
    color: #4dabf7;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 8px rgba(13, 110, 253, 0.3));
}

.upload-content-compact {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.file-info-compact {
    background: linear-gradient(135deg, rgba(25, 135, 84, 0.15), rgba(25, 135, 84, 0.05));
    border: 2px solid rgba(25, 135, 84, 0.3);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(25, 135, 84, 0.2);
}

.file-info-compact h6 {
    color: #51cf66;
    font-weight: 600;
}

.file-info-compact small {
    color: #a3e635;
}

/* Sheet selection melhorada */
.sheet-selection-compact {
    background: linear-gradient(135deg, rgba(13, 202, 240, 0.15), rgba(13, 202, 240, 0.05));
    border: 2px solid rgba(13, 202, 240, 0.3);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(13, 202, 240, 0.2);
}

.sheet-selection-compact label {
    color: #4dabf7;
    font-weight: 600;
}

.sheet-selection-compact .text-success {
    color: #51cf66 !important;
}

/* Progress section compacta */
.progress-section-compact {
    /* Estilos já definidos pelos existentes */
}

/* Agents grid otimizada */
.agents-grid-optimized {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.agent-card-compact {
    background: linear-gradient(145deg, #2a2d3e, #1e2130);
    border: 1px solid #3d4466;
    border-radius: 12px;
    padding: 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.agent-card-compact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #6c757d, #495057);
    transition: all 0.3s ease;
}

.agent-card-compact.agent-waiting {
    border-color: #495057;
    background: linear-gradient(145deg, #2a2d3e, #1e2130);
}

.agent-card-compact.agent-waiting::before {
    background: linear-gradient(180deg, #6c757d, #495057);
}

.agent-card-compact.agent-processing {
    border-color: #0d6efd;
    background: linear-gradient(145deg, #1a2332, #0f1419);
    box-shadow: 0 8px 32px rgba(13, 110, 253, 0.4);
}

.agent-card-compact.agent-processing::before {
    background: linear-gradient(180deg, #0d6efd, #084298);
}

.agent-card-compact.agent-completed {
    border-color: #198754;
    background: linear-gradient(145deg, #1a2e1f, #0f1912);
    box-shadow: 0 8px 32px rgba(25, 135, 84, 0.4);
}

.agent-card-compact.agent-completed::before {
    background: linear-gradient(180deg, #198754, #146c43);
}

.agent-card-compact.agent-error {
    border-color: #dc3545;
    background: linear-gradient(145deg, #2e1a1a, #19090f);
    box-shadow: 0 8px 32px rgba(220, 53, 69, 0.4);
}

.agent-card-compact.agent-error::before {
    background: linear-gradient(180deg, #dc3545, #b02a37);
}

.agent-icon-compact {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.2), rgba(13, 110, 253, 0.1));
    color: #0d6efd;
    font-size: 1.4rem;
    flex-shrink: 0;
    border: 1px solid rgba(13, 110, 253, 0.3);
    transition: all 0.3s ease;
}

.agent-card-compact.agent-processing .agent-icon-compact {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.3), rgba(13, 110, 253, 0.15));
    color: #4dabf7;
    border-color: rgba(13, 110, 253, 0.5);
    animation: pulse-glow 2s infinite ease-in-out;
}

.agent-card-compact.agent-completed .agent-icon-compact {
    background: linear-gradient(135deg, rgba(25, 135, 84, 0.3), rgba(25, 135, 84, 0.15));
    color: #51cf66;
    border-color: rgba(25, 135, 84, 0.5);
}

.agent-card-compact.agent-waiting .agent-icon-compact {
    background: linear-gradient(135deg, rgba(108, 117, 125, 0.2), rgba(108, 117, 125, 0.1));
    color: #adb5bd;
    border-color: rgba(108, 117, 125, 0.3);
}

.agent-card-compact.agent-error .agent-icon-compact {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.3), rgba(220, 53, 69, 0.15));
    color: #ff6b7a;
    border-color: rgba(220, 53, 69, 0.5);
}

@keyframes pulse-glow {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(13, 110, 253, 0.3);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 30px rgba(13, 110, 253, 0.5);
        transform: scale(1.05);
    }
}

.agent-content {
    flex: 1;
    min-width: 0;
}

.agent-name {
    font-size: 1rem;
    font-weight: 600;
    color: #f8f9fa;
    margin-bottom: 0.25rem;
}

.agent-desc {
    font-size: 0.85rem;
    color: #adb5bd;
    margin: 0 0 0.5rem 0;
}

.status-badge-compact {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid transparent;
}

.status-badge-compact.status-waiting {
    background: linear-gradient(135deg, rgba(108, 117, 125, 0.2), rgba(108, 117, 125, 0.1));
    color: #adb5bd;
    border-color: rgba(108, 117, 125, 0.3);
}

.status-badge-compact.status-processing {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.3), rgba(13, 110, 253, 0.2));
    color: #4dabf7;
    border-color: rgba(13, 110, 253, 0.4);
    animation: badge-pulse 2s infinite ease-in-out;
}

.status-badge-compact.status-completed {
    background: linear-gradient(135deg, rgba(25, 135, 84, 0.3), rgba(25, 135, 84, 0.2));
    color: #51cf66;
    border-color: rgba(25, 135, 84, 0.4);
}

.status-badge-compact.status-error {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.3), rgba(220, 53, 69, 0.2));
    color: #ff6b7a;
    border-color: rgba(220, 53, 69, 0.4);
}

@keyframes badge-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Pipeline flow horizontal */
.pipeline-flow-horizontal {
    background: linear-gradient(145deg, #2a2d3e, #1e2130);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #3d4466;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.pipeline-steps-horizontal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.pipeline-step-horizontal {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    border-radius: 12px;
    background: linear-gradient(145deg, #343a46, #2a2f3a);
    border: 2px solid #495057;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 1;
    min-width: 90px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.pipeline-step-horizontal i {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: #6c757d;
    transition: all 0.3s ease;
}

.pipeline-step-horizontal span {
    font-size: 0.8rem;
    font-weight: 600;
    color: #adb5bd;
    transition: all 0.3s ease;
}

.pipeline-step-horizontal.active {
    background: linear-gradient(145deg, #1a2332, #0f1419);
    border-color: #0d6efd;
    box-shadow: 0 4px 20px rgba(13, 110, 253, 0.3);
    transform: translateY(-2px);
}

.pipeline-step-horizontal.active i {
    color: #4dabf7;
    animation: step-glow 2s infinite ease-in-out;
}

.pipeline-step-horizontal.active span {
    color: #4dabf7;
}

.pipeline-step-horizontal.completed {
    background: linear-gradient(145deg, #1a2e1f, #0f1912);
    border-color: #198754;
    box-shadow: 0 4px 20px rgba(25, 135, 84, 0.3);
}

.pipeline-step-horizontal.completed i {
    color: #51cf66;
}

.pipeline-step-horizontal.completed span {
    color: #51cf66;
}

@keyframes step-glow {
    0%, 100% { 
        filter: drop-shadow(0 0 5px rgba(13, 110, 253, 0.5));
    }
    50% { 
        filter: drop-shadow(0 0 10px rgba(13, 110, 253, 0.8));
    }
}

.pipeline-arrow {
    color: #495057;
    font-size: 1.2rem;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Results section full width */
.results-section-fullwidth {
    /* Aproveita toda a largura disponível */
}

.file-info-banner-compact {
    background: linear-gradient(135deg, rgba(248, 249, 250, 0.1), rgba(248, 249, 250, 0.05));
    border-bottom: 1px solid #3d4466;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.validation-messages-compact {
    padding: 0.5rem 1rem;
}

.json-container-optimized {
    max-height: 60vh;
    overflow-y: auto;
    background: linear-gradient(145deg, #1a1d29, #0f1419);
    position: relative;
    border-radius: 0 0 12px 12px;
}

.json-result-optimized {
    margin: 0;
    padding: 2rem;
    background: transparent;
    border: none;
    color: #e9ecef;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Responsividade melhorada */
@media (max-width: 991.98px) {
    .main-content-area {
        padding: 1rem 0;
    }
    
    .agents-grid-optimized {
        grid-template-columns: 1fr;
    }
    
    .pipeline-steps-horizontal {
        justify-content: center;
        gap: 0.25rem;
    }
    
    .pipeline-step-horizontal {
        min-width: 60px;
    }
    
    .pipeline-step-horizontal span {
        font-size: 0.7rem;
    }
    
    .pipeline-arrow {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .hero-section-compact {
        padding: 1.5rem 0;
    }
    
    .hero-content-compact h1 {
        font-size: 1.5rem;
    }
    
    .agent-card-compact {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .pipeline-steps-horizontal {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .pipeline-step-horizontal {
        flex-direction: row;
        gap: 0.5rem;
        justify-content: center;
        width: 100%;
    }
    
    .file-info-banner-compact .row > div {
        text-align: center;
        margin-bottom: 0.5rem;
    }
}

/* Scrollbar personalizada para JSON */
.json-container-optimized::-webkit-scrollbar {
    width: 8px;
}

.json-container-optimized::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.json-container-optimized::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.json-container-optimized::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Animações aprimoradas para layout compacto */
.agent-card-compact.agent-processing {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.25);
}

.agent-card-compact.agent-completed {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(var(--success-rgb), 0.25);
}

/* Otimizações de espaço */
.card-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Ensure proper spacing */
.g-4 > * {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.g-2 > * {
    padding-left: 0.375rem;
    padding-right: 0.375rem;
} 

/* Progress section melhorada */
.progress-section-compact .card {
    background: linear-gradient(145deg, #2a2d3e, #1e2130);
    border: 1px solid #3d4466;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.progress {
    background: linear-gradient(90deg, #1e2130, #2a2d3e);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.progress-bar {
    background: linear-gradient(90deg, #0d6efd, #4dabf7);
    box-shadow: 0 2px 10px rgba(13, 110, 253, 0.4);
}

/* Upload card melhorada */
.upload-card-compact {
    background: linear-gradient(145deg, #2a2d3e, #1e2130);
    border: 1px solid #3d4466;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
} 

/* Botões melhorados */
.btn-primary {
    background: linear-gradient(135deg, #0d6efd, #4dabf7);
    border: none;
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #084298, #0d6efd);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.4);
}

.btn-outline-primary {
    border: 2px solid #0d6efd;
    color: #4dabf7;
    background: transparent;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, #0d6efd, #4dabf7);
    border-color: #4dabf7;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
}

/* Card headers melhorados */
.card-header.bg-primary {
    background: linear-gradient(135deg, #0d6efd, #4dabf7) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.card-header.bg-warning {
    background: linear-gradient(135deg, #ffc107, #fd7e14) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.card-header.bg-info {
    background: linear-gradient(135deg, #0dcaf0, #6f42c1) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.card-header.bg-success {
    background: linear-gradient(135deg, #198754, #20c997) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
} 

/* Results section melhorada */
.results-section-fullwidth .card {
    background: linear-gradient(145deg, #2a2d3e, #1e2130);
    border: 1px solid #3d4466;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Texto melhorado */
.upload-zone-compact h6 {
    color: #f8f9fa;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.upload-zone-compact p {
    color: #adb5bd;
    margin-bottom: 1rem;
}

/* Progress section específica */
.progress-section-compact .card-header.bg-info {
    background: linear-gradient(135deg, #0dcaf0, #17a2b8) !important;
}

/* Form controls melhorados */
.form-select {
    background: linear-gradient(145deg, #343a46, #2a2f3a);
    border: 1px solid #495057;
    color: #f8f9fa;
    border-radius: 8px;
}

.form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    background: linear-gradient(145deg, #1a2332, #0f1419);
} 

/* Banner de seção para validação */
.section-banner {
    background: linear-gradient(90deg, #f59e0b22, #fffbe622);
    border-left: 8px solid var(--warning-color);
    box-shadow: 0 4px 24px rgba(245, 158, 11, 0.08);
    margin-bottom: 2rem;
    padding: 1.5rem 2rem;
    border-radius: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.section-banner i {
    font-size: 2.5rem;
    opacity: 0.85;
}

/* Inputs com ícones */
.input-group .input-group-text {
    background: var(--dark-border);
    color: var(--primary-color);
    border: none;
    border-radius: 8px 0 0 8px;
    font-size: 1.1rem;
}
.input-group .form-control {
    border-radius: 0 8px 8px 0;
}

/* Tabela de itens sticky header */
.table-responsive .sticky-top {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--light-bg);
}

/* Aba JSON Processado */
#json-processado {
    background: #1e1e1e;
    border-radius: 8px;
    padding: 1rem;
    font-family: 'Courier New', 'Monaco', 'Menlo', monospace;
    line-height: 1.4;
    color: #d4d4d4;
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 100%;
    display: block;
}

/* Container do JSON */
.bg-dark pre {
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    margin: 0;
    padding: 0;
}

#json-processado .string { color: #ce9178; }
#json-processado .number { color: #b5cea8; }
#json-processado .boolean { color: #569cd6; }
#json-processado .null { color: #569cd6; }
#json-processado .key { color: #9cdcfe; }

/* Scrollbar personalizada para o JSON */
#json-processado::-webkit-scrollbar {
    width: 8px;
}

#json-processado::-webkit-scrollbar-track {
    background: #2d2d2d;
    border-radius: 4px;
}

#json-processado::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

#json-processado::-webkit-scrollbar-thumb:hover {
    background: #777;
}

/* Botão de ação animado */
.btn-success.animate__pulse {
    animation: pulse 1.5s infinite;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    transition: box-shadow 0.3s;
}
.btn-success.animate__pulse:hover {
    animation: none;
    box-shadow: 0 0 16px 4px rgba(16, 185, 129, 0.3);
    transform: scale(1.04);
}

/* Responsividade para tela de validação */
@media (max-width: 767.98px) {
    .section-banner {
        flex-direction: column;
        text-align: center;
        padding: 1rem 0.5rem;
        gap: 0.5rem;
    }
    .card-body {
        padding: 1rem !important;
    }
    .btn-lg {
        font-size: 1rem;
        padding: 0.75rem 1.5rem;
    }
    .table-responsive {
        font-size: 0.95rem;
    }
}

/* Tooltips customizados */
[data-bs-toggle="tooltip"] {
    cursor: pointer;
}

/* Validação de campos obrigatórios */
.form-label .text-danger {
    font-weight: bold;
}

.form-select.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-select.is-valid {
    border-color: #198754;
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
}

.valid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #198754;
}

/* Estilos para paginação */
.pagination .page-link {
    border-radius: 0.375rem;
    margin: 0 0.125rem;
    border: 1px solid #dee2e6;
    color: #6c757d;
    transition: all 0.2s ease-in-out;
}

.pagination .page-link:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
    color: #495057;
}

.pagination .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
    font-weight: 600;
}

.pagination .page-item.disabled .page-link {
    background-color: transparent;
    border-color: #dee2e6;
    color: #6c757d;
    cursor: not-allowed;
}

/* Responsividade para paginação */
@media (max-width: 768px) {
    .pagination {
        justify-content: center;
    }
    
    .pagination .page-link {
        padding: 0.375rem 0.5rem;
        font-size: 0.875rem;
    }
}

/* Estilos para botão de processamento */
.btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.btn-secondary:disabled {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #fff;
}

/* Animação para o ícone de processamento */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.bi-hourglass-split {
    animation: spin 2s linear infinite;
}

/* ===== MARGENS PARA PÁGINAS ESPECÍFICAS ===== */

/* Conteúdo ocupa 90% da largura total (5% de margem de cada lado = 10% total máximo) */
.main-container {
    margin-left: 5% !important;
    margin-right: 5% !important;
    max-width: 90% !important;
    width: 90% !important;
}

.subtipos-page {
    max-width: 90% !important;
    width: 90% !important;
    margin-left: 5% !important;
    margin-right: 5% !important;
}

/* Container do Bootstrap - garantir 90% de largura */
.container {
    max-width: 90% !important;
    width: 90% !important;
    margin-left: 5% !important;
    margin-right: 5% !important;
}

/* Ajustes responsivos para essas páginas */
@media (max-width: 1200px) {
    .main-container {
        margin-left: 5% !important;
        margin-right: 5% !important;
        max-width: 90% !important;
        width: 90% !important;
    }
    
    .subtipos-page {
        max-width: 90% !important;
        width: 90% !important;
        margin-left: 5% !important;
        margin-right: 5% !important;
    }
    
    .container {
        max-width: 90% !important;
        width: 90% !important;
        margin-left: 5% !important;
        margin-right: 5% !important;
    }
}

@media (max-width: 768px) {
    .main-container {
        margin-left: 5% !important;
        margin-right: 5% !important;
        max-width: 90% !important;
        width: 90% !important;
    }
    
    .subtipos-page {
        max-width: 90% !important;
        width: 90% !important;
        margin-left: 5% !important;
        margin-right: 5% !important;
    }
    
    .container {
        max-width: 90% !important;
        width: 90% !important;
        margin-left: 5% !important;
        margin-right: 5% !important;
    }
} 