/* Componentes Adicionais */

/* Botões */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    font-family: inherit;
}

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

.btn-primary {
    background: var(--verde);
    color: var(--branco);
}

.btn-primary:hover:not(:disabled) {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.btn-secondary {
    background: var(--cinza);
    color: var(--branco);
}

.btn-secondary:hover:not(:disabled) {
    background: #5a6268;
}

.btn-danger {
    background: var(--vermelho);
    color: var(--branco);
}

.btn-danger:hover:not(:disabled) {
    background: #c82333;
}

.btn-info {
    background: var(--azul);
    color: var(--branco);
}

.btn-info:hover:not(:disabled) {
    background: #0069d9;
}

.btn-warning {
    background: var(--laranja);
    color: var(--branco);
}

.btn-warning:hover:not(:disabled) {
    background: #e96b00;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1.125rem;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* Filtros */
.filters-container {
    background: var(--branco);
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--sombra);
    margin-bottom: 20px;
}

.filters-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

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

.filter-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--cinza);
}

.filter-group input,
.filter-group select {
    padding: 10px;
    border: 2px solid var(--cinza-medio);
    border-radius: 5px;
    font-size: 0.95rem;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--branco);
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--sombra);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-icon {
    font-size: 2.5rem;
    opacity: 0.8;
}

.stat-info h3 {
    font-size: 2rem;
    margin: 0;
    color: var(--preto);
}

.stat-info p {
    margin: 5px 0 0 0;
    color: var(--cinza);
    font-size: 0.9rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--cinza);
}

.empty-state i {
    font-size: 4rem;
    opacity: 0.3;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--cinza);
}

.empty-state p {
    margin-bottom: 20px;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    border: 4px solid var(--cinza-medio);
    border-top: 4px solid var(--verde);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

/* Info Box */
.info-box {
    background: var(--cinza-claro);
    border-left: 4px solid var(--azul);
    padding: 15px 20px;
    border-radius: 5px;
    margin: 20px 0;
}

.info-box.success {
    border-left-color: var(--verde);
    background: #d4edda;
}

.info-box.warning {
    border-left-color: var(--laranja);
    background: #fff3cd;
}

.info-box.danger {
    border-left-color: var(--vermelho);
    background: #f8d7da;
}

.info-box h4 {
    margin: 0 0 10px 0;
    color: var(--preto);
}

.info-box p {
    margin: 0;
    color: var(--cinza);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 5px;
    border-bottom: 2px solid var(--cinza-medio);
    margin-bottom: 20px;
}

.tab {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: var(--cinza);
    transition: all 0.3s;
}

.tab:hover {
    color: var(--verde);
}

.tab.active {
    color: var(--verde);
    border-bottom-color: var(--verde);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal {
    background: var(--branco);
    border-radius: 10px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 20px;
    border-bottom: 2px solid var(--cinza-medio);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.5rem;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--cinza);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 2px solid var(--cinza-medio);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--verde);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    color: var(--cinza);
}

/* Progress Bar */
.progress {
    height: 20px;
    background: var(--cinza-medio);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--verde);
    transition: width 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--branco);
    font-size: 0.85rem;
    font-weight: 600;
}

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    background: var(--preto);
    color: var(--branco);
    text-align: center;
    padding: 8px 12px;
    border-radius: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 0.85rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Divider */
.divider {
    height: 2px;
    background: var(--cinza-medio);
    margin: 30px 0;
}

/* Text Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.text-muted { color: var(--cinza); }
.text-success { color: var(--verde); }
.text-danger { color: var(--vermelho); }
.text-warning { color: var(--laranja); }
.text-info { color: var(--azul); }

.text-bold { font-weight: 600; }
.text-uppercase { text-transform: uppercase; }

/* Spacing Utilities */
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }

.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

.p-1 { padding: 10px; }
.p-2 { padding: 20px; }
.p-3 { padding: 30px; }

/* Responsive */
@media (max-width: 768px) {
    .filters-row {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .tabs {
        overflow-x: auto;
    }
    
    .modal {
        width: 95%;
    }
}
