/* 
 * Estilos Customizados - Sistema SemDívidas
 * Bootstrap 5.3 + Customizações
 */

/* Variáveis de Cores */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --border-radius: 0.5rem;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --box-shadow-lg: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Fonte Global */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.95rem;
    color: var(--dark-color);
    background-color: #f5f6fa;
    min-height: 100vh;
}

/* Container Principal */
main {
    min-height: calc(100vh - 200px);
}

/* Cards */
.card {
    border-radius: var(--border-radius);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-lg) !important;
}

.card-header {
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
    font-weight: 600;
}

/* Botões de Ação Rápida */
.btn-light.rounded-pill:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.12) !important;
    background-color: #fff !important;
}

.btn-light.rounded-pill:hover .text-muted {
    color: var(--dark-color) !important;
}

.btn-light.rounded-pill:active {
    transform: translateY(0);
}

/* Gradiente do Card de Progresso */
.progress-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Animação do Circle Progress */
@keyframes fillProgress {
    from {
        stroke-dasharray: 0 314;
    }
}

.progress-circle {
    animation: fillProgress 1.5s ease-out;
}

/* Dashboard - Painel de Dívidas - Melhor Contraste */
.card-body.text-white .bg-opacity-10,
.card-body.text-white .bg-opacity-20 {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-body.text-white .bg-opacity-10 strong,
.card-body.text-white .bg-opacity-20 strong {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    font-weight: 700;
}

.card-body.text-white .bg-opacity-10 small,
.card-body.text-white .bg-opacity-20 small {
    color: rgba(255, 255, 255, 0.9) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Melhorar contraste dos indicadores coloridos */
.card-body.text-white .bg-success.bg-opacity-20 {
    background-color: rgba(25, 135, 84, 0.25) !important;
    border: 1px solid rgba(25, 135, 84, 0.4);
}

.card-body.text-white .bg-warning.bg-opacity-20 {
    background-color: rgba(255, 193, 7, 0.25) !important;
    border: 1px solid rgba(255, 193, 7, 0.4);
}

.card-body.text-white .bg-info.bg-opacity-20 {
    background-color: rgba(13, 202, 240, 0.25) !important;
    border: 1px solid rgba(13, 202, 240, 0.4);
}

.card-body.text-white .bg-danger.bg-opacity-20 {
    background-color: rgba(220, 53, 69, 0.25) !important;
    border: 1px solid rgba(220, 53, 69, 0.4);
}

/* Contraste para textos principais do painel */
.card-body.text-white .fw-bold,
.card-body.text-white .fw-medium {
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Contraste para percentuais grandes */
.card-body.text-white .position-absolute .fw-bold {
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Botões */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

.btn i {
    font-size: 1rem;
}

/* Navbar */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-link {
    font-weight: 500;
    transition: color 0.2s ease;
    padding: 0.5rem 1rem !important;
}

.nav-link:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Tabelas */
.table {
    font-size: 0.9rem;
}

.table thead th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #dee2e6;
}

.table-hover tbody tr {
    transition: background-color 0.15s ease;
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Forms */
.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.form-control,
.form-select {
    border-radius: var(--border-radius);
    border: 1px solid #ced4da;
    padding: 0.6rem 0.75rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.input-group-text {
    border-radius: var(--border-radius);
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
}

/* Badges */
.badge {
    padding: 0.4rem 0.75rem;
    font-weight: 600;
    border-radius: 0.375rem;
}

/* Alerts */
.alert {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--box-shadow);
}

.alert i {
    font-size: 1.1rem;
}

/* Modal */
.modal-content {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--box-shadow-lg);
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    background-color: #f8f9fa;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    background-color: #f8f9fa;
}

/* Footer */
footer {
    margin-top: auto;
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card,
.alert {
    animation: fadeIn 0.3s ease;
}

/* Utilitários */
.text-muted {
    color: #6c757d !important;
}

.fw-semibold {
    font-weight: 600 !important;
}

.rounded-4 {
    border-radius: 1rem !important;
}

/* Responsividade */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .btn {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
    
    .table {
        font-size: 0.85rem;
    }
}

/* Cores de Status */
.bg-status-ativa {
    background-color: var(--danger-color) !important;
}

.bg-status-quitada {
    background-color: var(--success-color) !important;
}

.bg-status-pausada {
    background-color: var(--warning-color) !important;
}

/* Gráficos */
canvas {
    max-height: 400px;
}

/* Login/Cadastro Pages */
.min-vh-100 {
    min-height: 100vh;
}

/* Skeleton Loading (opcional) */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Scroll suave */
html {
    scroll-behavior: smooth;
}

/* Estilização de scrollbar (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Dropdown */
.dropdown-menu {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-lg);
    border: none;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    transition: background-color 0.15s ease;
}

.dropdown-item:hover {
    background-color: rgba(13, 110, 253, 0.1);
}

/* Progress Bar (para futuras implementações) */
.progress {
    border-radius: var(--border-radius);
    height: 1.5rem;
}

.progress-bar {
    border-radius: var(--border-radius);
}

/* Tooltips */
.tooltip-inner {
    border-radius: var(--border-radius);
}

/* Espaçamentos personalizados */
.py-6 {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
}

.my-6 {
    margin-top: 4rem !important;
    margin-bottom: 4rem !important;
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    footer {
        display: none !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
    }
}
