/* Estilos adicionais para melhor compatibilidade */
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-tramitação-interna {
    background-color: #e3f2fd;
    color: #1976d2;
}

.status-tramitação-externa {
    background-color: #e8f5e8;
    color: #388e3c;
}

.status-arquivamento {
    background-color: #ffebee;
    color: #d32f2f;
}

.status-encaminhamento-(capo) {
    background-color: #fff3e0;
    color: #f57c00;
}

/* Melhorias para responsividade */
@media (max-width: 480px) {
    .login-box {
        margin: 10px;
        padding: 20px;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 2px;
    }
    
    .btn-small {
        width: 100%;
    }
}

/* Estilos para tabela responsiva */
@media (max-width: 768px) {
    .table-container {
        font-size: 0.8rem;
    }
    
    table th,
    table td {
        padding: 8px 4px;
    }
}

/* Correções para melhor UX */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Melhorias para gráficos */
.chart-container canvas {
    max-height: 300px;
}

/* Estilos para alertas customizados */
.alert {
    position: relative;
    animation: slideIn 0.3s ease;
}

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

/* Loading spinner melhorado */
.loading {
    vertical-align: middle;
}

/* Melhorias para modal */
.modal {
    backdrop-filter: blur(2px);
}

.modal-content {
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Estilos para campos de data lado a lado */
.date-range {
    display: flex;
    gap: 10px;
    align-items: center;
}

.date-range input {
    flex: 1;
}

.date-range span {
    font-size: 0.9rem;
    color: #666;
}

/* Filtros ultra-minimalistas */
.filters {
    background: #fafafa;
    border-radius: 3px;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #e1e5e9;
}

.filter-section {
    margin-bottom: 10px;
}

.filter-row {
    display: flex;
    gap: 6px;
    align-items: end;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 160px;
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-weight: 400;
    color: #6b7280;
    font-size: 0.7rem;
    margin-bottom: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 5px 8px;
    border: 1px solid #d6d9dc;
    border-radius: 2px;
    font-size: 0.75rem;
    background: #ffffff;
    transition: all 0.15s ease;
    height: 28px;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 1px rgba(79, 70, 229, 0.1);
}

.filter-group input::placeholder {
    color: #a1a1aa;
    font-size: 0.75rem;
}

.date-filter label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    color: #4a5568;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.filter-buttons {
    display: flex;
    gap: 4px;
    justify-content: flex-start;
    flex-wrap: wrap;
    padding-top: 8px;
    margin-top: 6px;
    border-top: 1px solid #eaecf0;
}

.btn-filter {
    min-width: 65px;
    padding: 3px 7px;
    font-size: 0.6rem;
    font-weight: 400;
    white-space: nowrap;
    border: 1px solid #d0d4d9;
    border-radius: 2px;
    cursor: pointer;
    background: #fafbfc;
    color: #525252;
    transition: all 0.12s ease;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-filter:hover {
    background: #f0f1f3;
    border-color: #9ca0a8;
    transform: none;
}

.btn-filter.btn-primary {
    background: #6366f1;
    border-color: #6366f1;
    color: white;
}

.btn-filter.btn-primary:hover {
    background: #5855eb;
    border-color: #5855eb;
}

.btn-filter.btn-warning {
    background: #f59e0b;
    border-color: #f59e0b;
    color: white;
}

.btn-filter.btn-warning:hover {
    background: #ea9d0a;
    border-color: #ea9d0a;
}

.btn-filter.btn-secondary {
    background: #6b7280;
    border-color: #6b7280;
    color: white;
}

.btn-filter.btn-secondary:hover {
    background: #5f6470;
    border-color: #5f6470;
}

.btn-filter.btn-success {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

.btn-filter.btn-success:hover {
    background: #0ea670;
    border-color: #0ea670;
}

.btn-filter.btn-danger {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
}

.btn-filter.btn-danger:hover {
    background: #dc2f2f;
    border-color: #dc2f2f;
}

/* Responsividade para filtros ultra-minimalistas */
@media (max-width: 768px) {
    .filter-row {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
    
    .filter-group {
        min-width: 100%;
    }
    
    .filter-buttons {
        justify-content: stretch;
    }
    
    .btn-filter {
        flex: 1;
        min-width: auto;
    }
    
    .activity-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
    
    .activity-filters select,
    .activity-filters input {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .filters {
        padding: 8px;
        margin-bottom: 8px;
    }
    
    .filter-buttons {
        gap: 4px;
    }
    
    .btn-filter {
        padding: 3px 6px;
        font-size: 0.6rem;
        min-width: 50px;
        height: 24px;
    }
    
    .filter-group input,
    .filter-group select {
        height: 28px;
        padding: 4px 8px;
        font-size: 0.75rem;
    }
    
    .filter-group label {
        font-size: 0.65rem;
    }
}

/* Estilo para checkboxes de tipo de documento */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: #374151;
    cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
    width: auto !important;
    height: auto !important;
    margin: 0;
    cursor: pointer;
}

.checkbox-item:hover {
    color: #1f2937;
}

@media (max-width: 768px) {
    .checkbox-group {
        flex-direction: column;
        gap: 8px;
    }
}

/* Alertas personalizados */
.alertas-personalizados {
    margin-bottom: 15px;
}

.alerta-personalizado {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}

.alerta-personalizado .alerta-conteudo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.alerta-personalizado .alerta-icone {
    font-size: 1.2rem;
}

.alerta-personalizado .alerta-texto {
    flex: 1;
}

.alerta-personalizado .alerta-acoes {
    display: flex;
    gap: 8px;
}

.btn-alerta {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-alerta:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 768px) {
    .alerta-personalizado {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 8px;
    }
    
    .alerta-personalizado .alerta-acoes {
        justify-content: center;
    }
}

/* Produtividade */
.productivity-summary {
    margin-bottom: 30px;
}

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

.summary-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.summary-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.summary-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.activity-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    padding: 10px;
    background: #fafafa;
    border-radius: 4px;
    align-items: center;
    flex-wrap: wrap;
    border: 1px solid #e1e5e9;
}

.activity-filters select,
.activity-filters input {
    padding: 5px 8px;
    border: 1px solid #d6d9dc;
    border-radius: 3px;
    font-size: 0.8rem;
    background: #ffffff;
    height: 28px;
    min-width: 120px;
}

.activity-filters select:focus,
.activity-filters input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 1px rgba(79, 70, 229, 0.1);
}

.productivity-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.productivity-table-container {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.productivity-table {
    width: 100%;
    margin-top: 15px;
}

.productivity-table th,
.productivity-table td {
    padding: 12px 8px;
    text-align: center;
    font-size: 0.9rem;
}

.productivity-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.ranking-position {
    font-weight: bold;
    color: #3498db;
}

.ranking-gold {
    color: #f39c12;
}

.ranking-silver {
    color: #95a5a6;
}

.ranking-bronze {
    color: #e67e22;
}

.productivity-charts {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.productivity-charts .chart-container {
    flex: 1;
    min-height: 300px;
}

/* Checkbox de tipos de documento */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: normal;
    font-size: 0.9rem;
    cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
    width: auto;
    height: auto;
    margin: 0;
}

/* Ícones para ações */
.action-icon {
    width: 16px;
    height: 16px;
    display: inline-block;
    margin-right: 4px;
}

.icon-view::before {
    content: "👁";
    font-size: 14px;
}

.icon-edit::before {
    content: "✏️";
    font-size: 14px;
}

.icon-delete::before {
    content: "🗑️";
    font-size: 14px;
}

/* Botões de ação com ícones */
.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    padding: 6px 8px;
}

.btn-icon span {
    font-size: 14px;
}

/* Alertas Personalizados */
.alerta-personalizado {
    background: linear-gradient(135deg, #8e44ad 0%, #9b59b6 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin: 10px 0;
    box-shadow: 0 4px 12px rgba(142, 68, 173, 0.3);
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: default;
    transition: all 0.3s ease;
}

.alerta-personalizado:hover {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    transform: translateY(-1px);
}

.alerta-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.alerta-text {
    flex: 1;
    font-weight: 500;
}

.btn-concluir {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-concluir:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}