/* ==========================================================
   PAGAMENTOS LIGHT
========================================================== */

[data-theme="light"] {

    --modal-card-bg: #ffffff;
    --modal-card-border: #e5e7eb;

    --modal-grafico-bg: #ffffff;
    --modal-resumo-bg: #ffffff;

    --modal-text: #111827;
    --modal-text-secondary: #6b7280;
}

/* ==========================================================
   PAGAMENTOS DARK
========================================================== */

[data-theme="dark"] {

    --modal-card-bg: #0f172a;
    --modal-card-border: #334155;

    --modal-grafico-bg: #0f172a;
    --modal-resumo-bg: #0f172a;

    --modal-text: #e2e8f0;
    --modal-text-secondary: #94a3b8;
}

.mp-container {

    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-Bottom: 10px;

}

.mp-card {

    background: #ffffff;
    border-radius: 14px;
    padding: 20px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);

}

.mp-card-header {

    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;

}

.mp-card-title {

    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--modal-text);

}

.mp-logo-wrapper {

    display: flex;
    justify-content: center;
    margin-bottom: 20px;

}

.mp-seguradora-logo {

    max-width: 140px;
    max-height: 50px;
    object-fit: contain;

}

.mp-resumo-grid,
.mp-financeiro-grid {

    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;

}

.mp-info-item {

    display: flex;
    flex-direction: column;
    gap: 4px;

}

.mp-label {

    font-size: 12px;
    color: var(--modal-text-secondary);
    font-weight: 600;
    text-transform: uppercase;

}

.mp-value {

    font-size: 14px;
    color: var(--modal-text);
    font-weight: 600;

}

.mp-form {

    display: flex;
    flex-direction: column;
    gap: 16px;

}

.mp-field {

    display: flex;
    flex-direction: column;
    gap: 6px;

}

.mp-field-label {

    font-size: 13px;
    font-weight: 600;
    color: #374151;

}

.mp-input {

    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px;
    background: #f8fafc !important;
    color: #111827 !important;
    font-size: 14px;
    outline: none;
    transition: all .2s ease;

}

.mp-input:focus {

    border-color: #2563eb !important;
    box-shadow:
        0 0 0 3px rgba(37,99,235,.12) !important;

}

.mp-textarea {

    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 12px;
    font-size: 14px;
    resize: vertical;
    outline: none;

}

.mp-textarea:focus {

    border-color: #2563eb;

}

.mp-resumo-parcelamento {

    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 8px;

}

.mp-actions {

    display: flex;
    justify-content: flex-end;
    margin-top: 8px;

}

.mp-btn {

    border: none;
    border-radius: 10px;
    padding: 12px 20px;
    cursor: pointer;
    font-weight: 600;
    transition: .2s;

}

.mp-btn-primary {

    background: #2563eb;
    color: #ffffff;

}

.mp-btn-primary:disabled {
    background: #cbd5e1 !important;
    cursor: not-allowed;
    opacity: 1;
}

.mp-btn-primary:hover {

    opacity: .9;

}

.mp-btn-secondary {

    background: #f3f4f6;
    color: #111827;

}

.mp-table-wrapper {

    overflow-x: auto;

}

.mp-table {

    width: 100%;
    border-collapse: collapse;

}

.mp-table thead tr {

    background: #f9fafb;

}

.mp-table th {

    padding: 12px;
    text-align: left;
    font-size: 13px;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;

}

.mp-table td {

    padding: 12px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;

}

.mp-empty-state {

    text-align: center;
    padding: 40px 20px;

}

.mp-empty-icon {

    font-size: 40px;
    margin-bottom: 12px;

}

.mp-empty-title {

    font-size: 16px;
    font-weight: 700;
    color: #111827;

}

.mp-empty-description {

    margin-top: 6px;
    font-size: 14px;
    color: #6b7280;

}

.modal-content.modal-pagamentos {

    width: 95% !important;
    max-width: 600px !important;
    max-height: 90vh !important;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: #F5F7FB;
    margin: 36px 12px 22px 12px !important;
    padding: 8px;
    border-radius: 18px;

}

.mp-textarea::placeholder {

    color: #6b7280 !important;
    opacity: 1 !important;

}

.mp-input::placeholder {

    color: #6b7280 !important;
    opacity: 1 !important;

}

.mp-tabela{
    width:100%;
}

.mp-tabela-head{
    display:grid;
    grid-template-columns:
        40px
        100px
        120px
        90px
        30px;

    font-size:12px;
    font-weight:700;
    color:#64748b;
    padding: 0 0px 12px 12px;

    border-bottom:1px solid #e2e8f056;
}

.mp-tabela-row{
    display:grid;
    grid-template-columns:
        40px
        100px
        120px
        100px
        50px;

    align-items:center;

    padding:6px 10px;

    border-bottom:1px solid #f1f5f9;
    border-radius: 6px;
    border-left: 3px solid #facc15;
}

.mp-parcela-alerta {

    background: #e6afb3;
    border-radius: 6px;
    border-left: 3px solid #ef4444;

}

.mp-parcela-paga {

    background: rgba(34,197,94,.12);
    border-radius: 6px;
    border-left: 3px solid #22c55e;

}

.mp-parcela-paga .mp-status{
    color:#22c55e;
    font-weight:600;
}

.mp-parcela-paga .mp-btn-editar{
    background:#162338;
}

.mp-parcela-paga .mp-btn-editar:hover{
    background:#1e2f4a;
}

.mp-parcela-alerta .mp-btn-editar {
    background: #ffe4e6;
}

.mp-parcela-paga .mp-btn-editar {
    background: #d8e5f1;
}


.mp-status{
    display:flex;
    align-items:center;
    justify-content:flex-start;

    gap: 8px;

    font-size:12px;
    font-weight:600;
}

.mp-status-dot{
    width:10px;
    height:10px;
    border-radius:50%;
    display: inline-block;
    
}

.mp-status-dot.a-vencer{
    background:#facc15;
}

.mp-status-dot.pago{
    background:#22c55e;
}

.mp-status-dot.vencido{
    background:#ef4444;
}

.mp-parcela-alerta .mp-status{

    color:#fecaca !important;

}

.mp-parcela-alerta .mp-status *{

    color:#fecaca !important;

}

.mp-btn-editar{

    width:34px;
    height:34px;
    border:none;
    border-radius:8px;
    background: #d8e5f1;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;

    transition:.2s;
}

.mp-btn-editar:hover{
    background:#e2e8f0;
}

.mp-parcelas-mobile{
    display:none;
}

.modal-content.modal-pagamentos::-webkit-scrollbar{
    width:10px;
}

.modal-content.modal-pagamentos::-webkit-scrollbar-track{
    background:transparent;
}

.modal-content.modal-pagamentos::-webkit-scrollbar-thumb{
    background:#CBD5E1;
    border-radius:999px;
}

.modal-content.modal-pagamentos::-webkit-scrollbar-thumb:hover{
    background:#94A3B8;
}

.modal-content.modal-pagamentos{
    scrollbar-width: thin;
    scrollbar-color: #94A3B8 transparent;
}

/* ==========================================================
   DARK MODE
========================================================== */

[data-theme="dark"] .mp-card {

    background: #111827;
    border: 1px solid #335155;

}

[data-theme="dark"] .mp-input {

    background: #0f172a !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;

}

[data-theme="dark"] .mp-textarea {

    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;

}

[data-theme="dark"] .mp-parcela-card {

    background: #111827;
    border-color: #374151;

}

[data-theme="dark"] .mp-btn-editar{

    background:#1e293b;
    color:#e2e8f0;

}

[data-theme="dark"] .mp-btn-editar:hover{

    background:#334155;

}

[data-theme="dark"] .mp-tabela-head{

    color:#cbd5e1;
    border-bottom:1px solid #334155;

}

[data-theme="dark"] .mp-tabela-row{

    border-bottom:1px solid #243244;

}

[data-theme="dark"] .mp-status{

    color:#e2e8f0;

}

.mp-parcela-alerta .mp-status span:last-child{

    color:#ef4444 !important;
    font-weight:600;

}

.mp-parcela-paga .mp-status span:last-child{

    color:#22c55e !important;
    font-weight:600;

}

@media (max-width: 467px) {

    .mp-resumo-grid,
    .mp-financeiro-grid,
    .mp-resumo-parcelamento {

        grid-template-columns: 1fr;

    }

    .mp-card {

        padding: 16px;

    }

}

@media (max-width:540px){

    .mp-tabela{
        display:none;
    }

    .mp-parcelas-mobile{
        display:flex;
        flex-direction:column;
        gap:12px;
    }

    .mp-parcela-card{

        background:#fff;
        border:1px solid #e5e7eb;
        border-radius:12px;
        padding:14px;
    }

    .mp-parcela-topo{

        display:flex;
        justify-content:space-between;
        align-items:center;
        margin-bottom:12px;
    }

    .mp-parcela-numero{

        font-size:15px;
        font-weight:700;
        margin-bottom:12px;
    }

    .mp-parcela-info{

        display:flex;
        justify-content:space-between;
    }

    .mp-parcela-info span{

        display:block;
        font-size:12px;
        color:#64748b;
        margin-bottom:4px;
    }

    .mp-parcela-info strong{

        font-size:14px;
    }

}

