:root {
    --primary-color: #a7348b;
    --primary-dark: #8a2973;
    --primary-light: #c54ba8;
    --secondary-color: #4CAF50;
    --accent-color: #f6da01;
    --text-color: #333;
    --text-light: #666;
    --border-color: #ddd;
    --bg-color: #f4f4f4;
    --card-bg: #fff;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    
    /* Weight colors */
    --weight-fix: #00ff00;
    --weight-90: #66ff66;
    --weight-80: #99ff99;
    --weight-70: #ccffcc;
    --weight-60: #ffffcc;
    --weight-50: #f6da01;
    --weight-40: #ffcccc;
    --weight-30: #ff9999;
    --weight-20: #ff6666;
    --weight-10: #ff3333;
    --weight-exclude: #ff0033;
}

.number-grid-section.card {
    max-width: 300px;
    margin: 0 auto;
    margin-bottom: 30px;
    box-shadow: rgb(120 0 166 / 55%) 0px 25px 20px -20px;
}

.scores-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 8px;
}

.scores-title {
    font-size: 0.9rem;
    margin-top: 10px;
    margin-bottom: 5px;
    background: #4d9500;
    color: white;
    padding: 2px;
    border-radius: 5px;
    text-align: center;
}

.results-cards {
    display: flex !important;
    gap: 10px;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    align-content: center;
}

.result-card {
    background: var(--bg-color);
    border-radius: 8px;
    padding: 15px;
    transition: var(--transition);
    max-width: 280px;
    box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
}

.btn-icon {
    background: #00af07 !important;
    color: white ;
}

.result-grid {
    border: 1px solid #a1a1a1;
    padding: 2px;
    border-radius: 5px;
    box-shadow: rgba(0, 0, 0, 0.12) 0px 1px 3px, rgba(0, 0, 0, 0.24) 0px 1px 2px;
}

.filter-grid {
    display: flex !important;
    gap: 16px;
    flex-direction: row;
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
    align-items: flex-start;
}

.filter-item {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-content: center;
    justify-content: center;
    align-items: center;
}

.filter-control.mini {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-content: center;
    justify-content: center;
    align-items: center;
    gap: 2px;
}

.result-actions {
    display: flex;
    gap: 8px;
}

.config-basic {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
}

.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    background: #efefef;
    border: 1px solid #e5e5e5;
    margin-top: 10px;
    border-radius: 10px;
    box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;
}

.app-header h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
}

.mode-toggle {
    display: flex;
    gap: 8px;
    background: var(--bg-color);
    padding: 4px;
    border-radius: 8px;
}

.mode-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: var(--text-color);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
    font-weight: 500;
}

.mode-btn.active {
    background: var(--primary-color);
    color: white;
}

.mode-btn:not(.active):hover {
    background: rgba(167, 52, 139, 0.1);
}

.mode-btn .icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    transition: var(--transition);
    box-shadow: rgba(0, 0, 0, 0.18) 0px 2px 4px;
    border: 1px solid #f8dbff;
}

.card:hover {
    box-shadow: rgb(213 104 255 / 55%) 0px 25px 20px -20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn .icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(167, 52, 139, 0.3);
}

.btn-secondary {
    background: #dc3545;
    color: white;
}

.btn-secondary:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.btn-export {
    background: var(--secondary-color);
    color: white;
}

.btn-export:hover {
    background: #45a049;
}

.btn-reset-weights {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--bg-color);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-reset-weights:hover {
    background: var(--primary-color);
    color: white;
}

.btn-reset-weights .icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.custom-select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: var(--transition);
}

.custom-select:hover {
    border-color: var(--primary-color);
}

.custom-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(167, 52, 139, 0.1);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay p {
    color: white;
    font-size: 1.2rem;
    margin-top: 20px;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: white;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    min-width: 300px;
    animation: slideIn 0.3s ease;
    font-size: 1rem;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    border-left: 4px solid var(--secondary-color);
    background: #4caf50;
    color: white !important;
}

.toast.error { 
    border-left: 4px solid #dc3545; 
    
}

.toast.warning {
    border-left: 4px solid #ffc107; 
    
}

.toast.info { 
    border-left: 4px solid #17a2b8;
    color: black;
}

/* Hidden class */
.hidden {
    display: none !important;
}

/* Advanced mode only elements */
body:not(.mode-advanced) .advanced-only {
    display: none !important;
}

.number-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 20px;
    border: 1px solid gray;
    padding: 3px;
    border-radius: 5px;
    background: #e9e9e9;
    box-shadow: rgba(50, 50, 105, 0.15) 0px 2px 5px 0px, rgba(0, 0, 0, 0.05) 0px 1px 1px 0px;
}

.app-header h1 {
    color: #ffffff;
    font-size: 1.8rem;
}


/* Header */
.app-header {
    padding: 20px;
    border-radius: 12px;
    box-shadow: rgba(0, 0, 0, 0.12) 0px 1px 3px, rgba(0, 0, 0, 0.24) 0px 1px 2px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(114deg, #d100cb, #7500a5);
    color: white;
}


.filter-section {
    background: var(--bg-color);
    padding: 16px;
    border-radius: 8px;
    box-shadow: rgba(0, 0, 0, 0.05) 0px 0px 0px 1px, rgb(209, 213, 219) 0px 0px 0px 1px inset !important;
}

.weight-legend {
    display: flex;
    flex-wrap: nowrap;
    gap: 15px;
    padding: 12px;
    background: var(--bg-color);
    border-radius: 8px;
    font-size: 0.85rem;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: center;
    align-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-direction: column;
    flex-wrap: nowrap;
    align-content: center;
    justify-content: center;
}

.weight-preset-grid {
    display: flex;
    flex-direction: row-reverse;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 5px;
}


/* Modal Backdrop */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    cursor: pointer;
    opacity: 1;
    transition: opacity 0.2s ease;
}

/* Modal Container */
.weight-selector-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.2s ease;
}

/* Modal Content */
.weight-selector {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    min-width: 400px;
    max-width: 90vw;
    cursor: default;
}

/* Header do Modal */
.weight-selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.weight-selector-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.close-modal {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
}

.close-modal:hover {
    background-color: #f0f0f0;
    color: #333;
}

/* Body do Modal */
.weight-selector-body {
    padding: 20px;
}

/* Opções Rápidas */
.weight-quick-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.weight-option {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.weight-option:hover {
    border-color: #007bff;
    background-color: #f0f8ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
}

.weight-option.fix-btn:hover {
    border-color: #28a745;
    background-color: #f0fff4;
}

.weight-option.exclude-btn:hover {
    border-color: #dc3545;
    background-color: #fff5f5;
}

.option-icon {
    font-size: 20px;
}

/* Slider Container */
.weight-slider-container {
    margin-bottom: 20px;
}

.weight-slider-container label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #333;
}

.slider-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.weight-slider {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, #ff4444, #ffff44, #44ff44);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.weight-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: white;
    border: 3px solid #007bff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.weight-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    border-color: #0056b3;
}

.weight-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: white;
    border: 3px solid #007bff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.slider-value {
    font-size: 16px;
    font-weight: 700;
    color: #007bff;
    min-width: 35px;
    text-align: right;
}

/* Grid de Presets */
.weight-preset-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.weight-option.preset {
    padding: 10px;
    border: none;
    color: #333;
    font-weight: 600;
    font-size: 13px;
}

.weight-option.preset:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Responsivo */
@media (max-width: 500px) {
    .weight-selector {
        min-width: 90vw;
    }
    
    .weight-preset-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* Modal Backdrop - CORREÇÃO */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    cursor: pointer;
    opacity: 1;
    transition: opacity 0.2s ease;
    /* CORREÇÃO: Desabilitar eventos de ponteiro durante animação */
    pointer-events: auto;
}

.modal-backdrop.closing {
    pointer-events: none;
}

/* Modal Container - CORREÇÃO */
.weight-selector-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.2s ease;
    pointer-events: auto;
}

.weight-selector-modal.closing {
    pointer-events: none;
}

/* Botões de preset - CORREÇÃO: Remover transições que causam conflito */
.weight-option.preset {
    padding: 10px;
    border: none;
    color: #333;
    font-weight: 600;
    font-size: 13px;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    /* Removido transition de background */
}

.weight-option.preset:active {
    transform: scale(0.95);
}

/* Prevenir seleção de texto ao clicar rápido */
.weight-option,
.weight-selector,
.weight-selector * {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.weight-exclude {
    box-shadow: rgba(9, 30, 66, 0.25) 0px 1px 1px, rgba(9, 30, 66, 0.13) 0px 0px 1px 1px;
}

.weight-legend {
    box-shadow: rgba(0, 0, 0, 0.15) 2.4px 2.4px 3.2px;
}

.btn-reset-weights {
    box-shadow: rgba(9, 30, 66, 0.25) 0px 1px 1px, rgba(9, 30, 66, 0.13) 0px 0px 1px 1px;
}

#contestStart {
    padding: 5px;
}

#contestEnd {
    padding: 5px;
}


.grid-pts {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-content: center;
    justify-content: center;
    align-items: center;
    width: fit-content;
    box-shadow: rgba(0, 0, 0, 0.12) 0px 1px 3px, rgba(0, 0, 0, 0.24) 0px 1px 2px;
    padding: 4px;
    border-radius: 6px;
}

.grid-pts-faixa {
    font-size: 0.9rem;
    border-bottom: 1px solid gray;
    margin-bottom: 3px;
}


.pts-value {
    font-size: 0.8rem;
}


/* Classe neutra (sem pontuação) */
.pts-neutral {
    background: linear-gradient(135deg, #ebebeb, #efefef);
    color: gray;
}

/* Classes coloridas */
.pts-yellow {
    background: linear-gradient(135deg, #5feb77, #a0ffbc);
}

.pts-green {
    background: linear-gradient(135deg, #28f149, #91ffa4);
}

.pts-blue {
    background: linear-gradient(135deg, #00ff2b, #00ff4f);
}

.pts-pink {
    background: linear-gradient(135deg, #00c3a4, #00c5bc);
    color: white;
    font-weight: 500;
}

.pts-gold {
    background: linear-gradient(135deg, #ed00fd, #bbb500);
    color: white;
    font-weight: 500;
}


/* ============================================
   MODAL DE EXPORTAÇÃO AVANÇADO
   ============================================ */

.export-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.export-modal .modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1;
}

.export-modal .modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    overflow: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 2;
    animation: modalSlideIn 0.3s ease;
}

.export-modal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.export-modal .modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.export-modal .modal-header h3 i {
    font-size: 22px;
}

.export-modal .close-modal {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    font-size: 28px;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.export-modal .close-modal:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.export-modal .modal-body {
    padding: 10px;
    max-height: calc(85vh - 160px);
    overflow-y: auto;
}

.export-option-group {
    margin-bottom: 28px;
}

.export-option-group h4 {
    color: #764ba2;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.export-option-group h4 i {
    font-size: 16px;
}

.export-format-options,
.export-columns-options,
.export-action-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.export-option-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.export-option-label:hover {
    border-color: #764ba2;
    background: #f8f9ff;
}

.export-option-label input[type="radio"],
.export-option-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #764ba2;
    margin-top: 2px;
    flex-shrink: 0;
}

.export-option-content {
    flex: 1;
}

.export-option-content strong {
    display: block;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.export-option-content small {
    display: block;
    color: #666;
    font-size: 12px;
    line-height: 1.4;
}

.export-modal .modal-footer .btn {
    padding: 12px 55px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.export-modal .btn-secondary {
    background: #6c757d;
    color: #ffffff;
}

.export-modal .btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.export-modal .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.export-modal .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(118, 75, 162, 0.4);
}

.export-modal .btn-primary i,
.export-modal .btn-secondary i {
    font-size: 16px;
}


/* ===================================
   FILTROS DINÂMICOS DO BANCO
   =================================== */

/* Botão de Filtros Dinâmicos */
.btn-dynamic-filters {
    padding: 8px 16px;
    border: 2px solid #6366f1;
    background: white;
    color: #6366f1;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-dynamic-filters:hover {
    background: #6366f1;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-dynamic-filters.active {
    background: #6366f1;
    color: white;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.btn-dynamic-filters.active:hover {
    background: #4f46e5;
}

/* Seção de Filtros Dinâmicos */
.dynamic-filters-section {
    margin-top: 16px;
    border: 2px solid #6366f1;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
}

.dynamic-filters-section .filtros-header {
    background: linear-gradient(135deg, #a7348b 0%, #ef00b5e3 100%);
    color: white;
}

.filter-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
}

/* Seletores Dinâmicos */
.dynamic-filters-selectors {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
    padding: 16px;
    background: white;
    border-radius: 8px;
    box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
}

.dynamic-selector-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dynamic-selector-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #4b5563;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dynamic-selector-label i {
    color: #6366f1;
    font-size: 14px;
}

.dynamic-selector {
    padding: 10px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236366f1' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.dynamic-selector:hover {
    border-color: #6366f1;
    background-color: #f8f9ff;
}

.dynamic-selector:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.dynamic-selector option {
    padding: 10px;
    font-weight: 500;
}

/* Controle do Filtro Dinâmico */
.dynamic-filter-control {
    padding: 16px;
    background: linear-gradient(135deg, #a7348b 0%, #f5d700 100%);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin: 0 auto;
    justify-items: center;
    box-shadow: rgba(0, 0, 0, 0.12) 0px 1px 3px, rgba(0, 0, 0, 0.24) 0px 1px 2px;
}

.filter-count {
    display: inline-block;
    padding: 2px 8px;
    background: #e0e7ff;
    color: #4f46e5;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
}


/* Info Box */
.info-box {
    display: flex;
    gap: 16px;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.info-box.info {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 2px solid #93c5fd;
}

.info-box.success {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #86efac;
}

.info-box i {
    font-size: 32px;
    flex-shrink: 0;
}

.info-box.info i {
    color: #3b82f6;
}

.info-box.success i {
    color: #22c55e;
}

.info-content h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
}

.info-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #4b5563;
}

/* Requirements Box */
.requirements-box {
    padding: 16px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 16px;
}

.requirements-box h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
}

.requirements-box h4 i {
    color: #6366f1;
}

.requirements-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.req-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

.req-item.met {
    background: #f0fdf4;
    color: #166534;
}

.req-item.met i {
    color: #22c55e;
    font-size: 16px;
}

.req-item.unmet {
    background: #fef2f2;
    color: #991b1b;
}

.req-item.unmet i {
    color: #ef4444;
    font-size: 16px;
}

/* Warning Box */
.warning-box {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #fbbf24;
    border-radius: 12px;
}

.warning-box i {
    font-size: 24px;
    color: #d97706;
    flex-shrink: 0;
}

.warning-content strong {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 700;
    color: #92400e;
}

.warning-content p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #78350f;
}

/* Responsividade */
@media (max-width: 768px) {
    .dynamic-filters-selectors {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 12px;
    }

    .filters-actions {
        flex-direction: column;
        gap: 8px;
    }

    .btn-dynamic-filters {
        width: 100%;
        justify-content: center;
    }

    .modal-compact {
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
    }

    .info-box,
    .warning-box {
        flex-direction: column;
    }

    .info-box i,
    .warning-box i {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .dynamic-selector-label {
        font-size: 12px;
    }

    .dynamic-selector {
        font-size: 13px;
        padding: 8px 12px;
    }

    .filter-badge {
        font-size: 11px;
        padding: 2px 8px;
    }
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dynamic-filters-section .filtro-content {
    animation: slideDown 0.3s ease;
    background: linear-gradient(135deg, #a7348b 0%, #f5d70000 100%);
}

/* Estados de Loading */
.dynamic-selector:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #f3f4f6;
}

.dynamic-selector option:disabled {
    color: #9ca3af;
}


.dynamic-filters-modal {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-content: center;
    align-items: center;
}

.modal-content.modal-compact .modal-footer {
    padding: 0px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    justify-content: space-around;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 5px;
    flex-direction: row;
    align-items: center;
    align-content: center;
    padding-top: 10px;
    padding-bottom: 5px;
    border: 1px solid #e1e1e1;
    flex-wrap: wrap;
}