/**
 * Estilos Customizados - Sistema de Cobrança
 * Design responsivo e otimizado para mobile
 */

/* ===== VARIÁVEIS E RESET ===== */
:root {
    --primary-color: #A435F0;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --border-radius: 8px;
    --transition: all 0.3s ease;

}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.bg-primary{
    background-color: #61248a !important;
    color: white !important;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: var(--dark-color);
    min-height: 100vh;
}

/* cores fontes */
.text-red {
    color: var(--danger-color) !important;
}
.text-green {
    color: var(--success-color) !important;
}
.text-blue {
    color:#61248A !important;
}

.text-orange {
    color:#FF6B00 !important;
}

input.form-control.input-text-red,
input.input-text-red {
    color: var(--danger-color) !important;
}

input.form-control.input-text-green,
input.input-text-green {
    color: var(--success-color) !important;
    font-weight: 500 !important;
}

input.form-control.input-text-blue,
input.input-text-blue {
    color: 61248A !important;
}





/* ===== NAVBAR ===== */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
}

.navbar-brand i {
    font-size: 1.5rem;
    vertical-align: middle;
}

/* ===== CONTAINER PRINCIPAL ===== */
#app-container {
    min-height: calc(100vh - 56px);
    padding: 20px 0;
}

/* ===== LOADING OVERLAY ===== */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

#loading-overlay .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* ===== TELA DE LOGIN ===== */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #3e1c61 0%, #512979 100%);
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 40px;
    width: 100%;
    max-width: 400px;
}

.login-card .logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-card .logo i {
    font-size: 4rem;
    color: var(--primary-color);
}

.login-card h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--dark-color);
    font-weight: 600;
}

.login-card .form-control {
    border-radius: var(--border-radius);
    padding: 12px;
    border: 1px solid #ddd;
}

.login-card .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.login-card .btn-login {
    width: 100%;
    padding: 12px;
    border-radius: var(--border-radius);
    font-weight: 600;
    margin-top: 20px;
}

.login-card .forgot-password {
    text-align: center;
    margin-top: 15px;
}

.login-card .forgot-password a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
}

.login-card .forgot-password a:hover {
    text-decoration: underline;
}

/* ===== CARDS ===== */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    transition: var(--transition);
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: white;
    border-bottom: 2px solid var(--light-color);
    padding: 15px 20px;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

/* ===== FILTROS ===== */
.filtros-container {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.filtros-toggle {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.filtros-content {
    margin-top: 15px;
}

/* ===== TABELA DE TÍTULOS ===== */
.table-responsive {
    border-radius: var(--border-radius);
    overflow: hidden;
}

.table {
    margin-bottom: 0;
}

.table thead {
    background-color: var(--primary-color);
    color: white;
}

.table thead th {
    border: none;
    font-weight: 600;
    padding: 15px;
}

.table tbody tr {
    transition: var(--transition);
    cursor: pointer;
}

.table tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

.table tbody td {
    padding: 15px;
    vertical-align: middle;
}

 .valor-titulo {
        font-weight: 700;
        color: #61248A !important;
    }

/* Badge de Status */
.badge-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-aberto {
    background-color: #fff3cd;
    color: #856404;
}

.badge-recebido {
    background-color: #d1e7dd;
    color: #0f5132;
}

/* ===== DETALHE DO TÍTULO ===== */
.titulo-info {
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
}

.titulo-info h5 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 600;
}

.titulo-info .info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #dee2e6;
}

.titulo-info .info-row:last-child {
    border-bottom: none;
}

.titulo-info .info-label {
    font-weight: 600;
    color: var(--secondary-color);
}

.titulo-info .info-value {
    color: var(--dark-color);
}



/* ===== FORMULÁRIOS ===== */
.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 8px;
}

.form-control,
.form-select {
    border-radius: var(--border-radius);
    border: 1px solid #ddd;
    padding: 10px 15px;
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-control:disabled,
.form-control[readonly] {
    background-color: #e9ecef;
    cursor: not-allowed;
}

/* ===== BOTÕES ===== */
.btn {
    border-radius: var(--border-radius);
    padding: 10px 20px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
}

.btn i {
    margin-right: 5px;
}

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

.btn-primary:hover {
    background-color: #41BF87;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-maps {
    background-color: #41BF87;
    color: white;}

.btn-maps:hover {
    background-color: #259965;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-success {
    background-color: var(--success-color);
}

.btn-success:hover {
    background-color: #157347;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

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

.btn-danger:hover {
    background-color: #bb2d3b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

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

.btn-secondary:hover {
    background-color: #5c636a;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* ===== PAGINAÇÃO ===== */
.pagination {
    margin-top: 20px;
}

.pagination .page-link {
    color: var(--primary-color);
    border: 1px solid #dee2e6;
    padding: 8px 15px;
    margin: 0 3px;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.pagination .page-link:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* ===== RESUMO / TOTALIZADORES ===== */
.totalizadores {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.totalizador-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.totalizador-card.success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.totalizador-card.warning {
    background: linear-gradient(135deg, #d8a604 0%, #FFDD72 100%);
}

.totalizador-card.red {
    background: linear-gradient(135deg, #dd0e1f 0%, #f5576c 100%);
}

.bg-red {
    background-color: #dd0e1f !important;
}

.totalizador-card.info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.totalizador-card.grey {
    background: linear-gradient(135deg, #383E51 0%, #5f6472 100%);
}

.totalizador-card.dark {
    background: linear-gradient(135deg, #212121 0%, #00f2fe 100%);
}

.totalizador-card .label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 5px;
}

.totalizador-card .value {
    font-size: 1.8rem;
    font-weight: 700;
}

.badge .percentual{
  margin-left: 6px;
  font-size: 0.85em;
} 

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
    .table thead {
        display: none;
    }
    
    .table tbody tr {
        display: block;
        margin-bottom: 15px;
        background-color: #999;
        border: 1px solid #dee2e6;
        border-radius: var(--border-radius);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    .table tbody td {
        display: flex;
        justify-content: space-between;
        padding: 10px 15px;
        border: none;
        border-bottom: 1px solid #dee2e6;
    }

    .table tbody td .valor-titulo {
        font-weight: 700;
        color: #0f5132
    }
    
    .table tbody td:last-child {
        border-bottom: none;
    }
    
    .table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--secondary-color);
    }
    
    .titulo-info .info-row {
        flex-direction: column;
    }
    
    .titulo-info .info-label {
        margin-bottom: 5px;
    }
    
    .totalizadores {
        grid-template-columns: 1fr;
    }
}

/* ===== ANIMAÇÕES ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* ===== TOAST ===== */
.toast {
    min-width: 300px;
}

.toast-header {
    background-color: var(--primary-color);
    color: white;
}

.toast-header .btn-close {
    filter: invert(1);
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--secondary-color);
}

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

.empty-state h4 {
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--secondary-color);
}
