*{box-sizing:border-box}
:root{
    --bg:#f4f7fb;
    --card:#fff;
    --text:#1f2937;
    --muted:#64748b;
    --line:#e5e7eb;
    --primary:#e8752c;
    --primary-dark:#c85e1e;
    --menu:#ffffff;
    --menu-hover:#f8fafc;
    --danger:#b91c1c;
}
html,body{margin:0;padding:0;font-family:Segoe UI,Arial,sans-serif;color:var(--text);background:var(--bg)}
.login-body{min-height:100vh;display:grid;place-items:center;padding:24px}
.login-shell{width:min(460px,100%)}
.login-card{background:var(--card);border:1px solid var(--line);border-radius:18px;padding:30px;box-shadow:0 18px 50px rgba(15,23,42,.10)}
.login-logo-wrap{text-align:center;margin-bottom:14px}
.login-logo{display:block;width:min(300px,86%);height:auto;margin:0 auto}
.login-heading{text-align:center;margin-bottom:24px}
.login-heading h1{margin:0;font-size:25px}
.login-heading p{margin:5px 0 0;color:var(--muted)}
label{display:block;font-weight:600;margin:14px 0 6px}
input,select{width:100%;height:44px;border:1px solid #cbd5e1;border-radius:9px;padding:0 12px;background:#fff;font-size:15px}
input:focus,select:focus{outline:2px solid rgba(232,117,44,.18);border-color:var(--primary)}
.btn-primary{width:100%;margin-top:22px;height:46px;border:0;border-radius:9px;background:var(--primary);color:#fff;font-weight:700;font-size:15px;cursor:pointer}
.btn-primary:hover{background:var(--primary-dark)}
.alert{border-radius:8px;padding:12px 14px;margin-bottom:16px}.alert-error{background:#fef2f2;color:var(--danger);border:1px solid #fecaca}
.loading{margin-top:18px;color:var(--muted)}.loading-bar{height:6px;background:#e2e8f0;border-radius:999px;overflow:hidden;margin-bottom:8px}.loading-bar span{display:block;width:45%;height:100%;background:var(--primary);animation:load 1.1s infinite alternate}
@keyframes load{to{width:100%}}

.topbar{min-height:82px;height:auto;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:8px 28px}
.topbar-brand{display:flex;align-items:center;gap:22px}
.topbar-logo{height:62px;width:auto;object-fit:contain;display:block}
.topbar .muted{margin-left:0;font-size:14px;color:var(--muted)}
.topbar-user{display:flex;align-items:center;gap:14px}.topbar-user form{margin:0}
.btn-link{border:0;background:none;color:#1d5f91;cursor:pointer;font-weight:700}

.main-menu{background:var(--menu);border-bottom:1px solid var(--line);position:relative;z-index:40}
.menu-inner{max-width:1300px;margin:0 auto;display:flex;align-items:stretch;padding:0 24px}
.menu-item{position:relative}
.menu-button,.menu-link{appearance:none;border:0;background:transparent;color:#263649;text-decoration:none;padding:14px 16px;font-weight:600;font-size:14px;display:flex;align-items:center;cursor:pointer;height:48px}
.menu-button:hover,.menu-link:hover,.menu-item.open>.menu-button{background:var(--menu-hover);color:var(--primary-dark)}
.dropdown{display:none;position:absolute;top:100%;left:0;min-width:260px;max-height:65vh;overflow:auto;background:#fff;border:1px solid var(--line);border-radius:0 0 10px 10px;box-shadow:0 16px 35px rgba(15,23,42,.14);padding:7px;z-index:60}
.menu-item.open>.dropdown{display:block}
.dropdown a{display:block;padding:10px 12px;border-radius:7px;color:#263649;text-decoration:none;font-size:13px;white-space:nowrap}
.dropdown a:hover{background:#fff4ed;color:var(--primary-dark)}
.dropdown-separator{height:1px;background:var(--line);margin:5px 4px}
.dropdown-note{display:block;padding:10px 12px;color:var(--muted);font-size:12px;line-height:1.4}

.container{max-width:1300px;margin:0 auto;padding:24px}
.dashboard-heading{display:flex;align-items:end;justify-content:space-between;margin-bottom:16px}
.dashboard-heading h1{font-size:22px;margin:0}.dashboard-heading p{margin:4px 0 0;color:var(--muted)}
.cards{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px}
.cards-finance{grid-template-columns:repeat(4,minmax(0,1fr));margin-top:14px}
.card-stat{background:#fff;border:1px solid var(--line);border-radius:14px;padding:18px}
.card-stat span{display:block;color:var(--muted);font-size:13px}
.card-stat strong{display:block;font-size:25px;margin-top:8px;color:#10233f}

@media(max-width:900px){
    .cards,.cards-finance{grid-template-columns:repeat(2,minmax(0,1fr))}
    .menu-inner{overflow-x:auto;padding:0 8px}
    .menu-button,.menu-link{white-space:nowrap}
}
@media(max-width:560px){
    .cards,.cards-finance{grid-template-columns:1fr}
    .topbar{align-items:flex-start;gap:10px;padding:12px 14px;flex-direction:column}
    .topbar-brand{width:100%;justify-content:space-between}
    .topbar-logo{height:48px}
    .container{padding:14px}
}

.dashboard-status-cards {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.status-atrasado span {
    color: #d4a800;
    font-weight: 700;
}

.status-cancelado span {
    color: #e00000;
    font-weight: 700;
}

.status-ativo span {
    color: #003cff;
    font-weight: 700;
}

.status-suspenso-cancelado span {
    color: #ff0000;
    font-weight: 700;
}

.status-funeral span {
    color: #111827;
    font-weight: 700;
}

.status-total span {
    color: #ff0000;
    font-weight: 700;
}

@media(max-width:1100px) {
    .dashboard-status-cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media(max-width:700px) {
    .dashboard-status-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.dashboard-graficos {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 16px;
    margin-top: 22px;
    padding-bottom: 30px;
}

.grafico-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 18px;
}

.grafico-titulo {
    margin-bottom: 15px;
}

.grafico-titulo h2 {
    margin: 0;
    font-size: 17px;
    color: #10233f;
}

.grafico-titulo span {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 13px;
}

.grafico-area {
    position: relative;
    height: 300px;
}

@media(max-width:900px) {
    .dashboard-graficos {
        grid-template-columns: 1fr;
    }
}

.cards-finance {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.finance-entrada span {
    color: #15803d;
    font-weight: 700;
}

.finance-saida span {
    color: #dc2626;
    font-weight: 700;
}

.finance-saldo span {
    color: #1d4ed8;
    font-weight: 700;
}

.finance-entrada strong {
    color: #166534;
}

.finance-saida strong {
    color: #b91c1c;
}

.finance-saldo strong {
    color: #1e40af;
}

@media(max-width:1000px) {
    .cards-finance {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media(max-width:600px) {
    .cards-finance {
        grid-template-columns: 1fr;
    }
}

.card-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
}

.card-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(15, 23, 42, .12);
}

.card-link:active {
    transform: translateY(0);
}

.card-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
}

.card-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(15, 23, 42, .12);
}

.card-link:active {
    transform: translateY(0);
}

.clientes-acoes {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-relatorio-parcelas {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    background: #e8752c;
    color: #ffffff;
    border-radius: 8px;
    padding: 10px 16px;
    font-weight: 700;
    border: 1px solid #e8752c;
}

.btn-relatorio-parcelas:hover {
    background: #c85e1e;
    border-color: #c85e1e;
}

@media(max-width:700px) {
    .clientes-acoes {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .btn-relatorio-parcelas,
    .btn-voltar {
        text-align: center;
        justify-content: center;
    }
}

.status-baixa {
    border-left: 5px solid #e8752c;
    background: #fff7ed;
}

.status-baixa strong {
    color: #c85e1e;
    font-size: 24px;
}

.status-baixa small {
    margin-top: 6px;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
}

.status-baixa:hover {
    background: #ffedd5;
}



/* PAF SIDEBAR 2026 */

.paf-app-layout {
    display: flex;
    align-items: stretch;
    min-height: calc(100vh - 78px);
    background: #f4f6f8;
}

.paf-sidebar {
    width: 245px;
    min-width: 245px;
    background: #10233f;
    color: #ffffff;
    min-height: calc(100vh - 78px);
    border-right: 1px solid #1e3658;
}

.sidebar-title {
    padding: 20px 18px 12px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .8px;
    color: #94a3b8;
}

.sidebar-nav {
    padding: 0 10px 25px;
}

.sidebar-group {
    margin-top: 18px;
}

.sidebar-group-title {
    padding: 0 10px 8px;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .7px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 42px;
    padding: 0 12px;
    margin-bottom: 4px;
    border-radius: 8px;
    color: #e2e8f0;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition: background .15s ease, color .15s ease;
}

.sidebar-link:hover {
    background: #1d3658;
    color: #ffffff;
}

.sidebar-link.active {
    background: #e8752c;
    color: #ffffff;
}

.sidebar-link.disabled {
    opacity: .45;
    cursor: default;
}

.sidebar-link.disabled:hover {
    background: transparent;
}

.sidebar-icon {
    width: 22px;
    text-align: center;
    font-size: 16px;
}

.paf-main-content {
    flex: 1;
    min-width: 0;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 28px 32px 50px;
}

.sidebar-toggle {
    display: none;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #10233f;
    font-size: 21px;
    cursor: pointer;
}

.sidebar-overlay {
    display: none;
}

@media(max-width: 900px) {

    .sidebar-toggle {
        display: inline-flex;
    }

    .paf-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: -270px;
        z-index: 10001;
        min-height: 100vh;
        transition: left .2s ease;
        box-shadow: 8px 0 25px rgba(0,0,0,.22);
        overflow-y: auto;
    }

    .paf-sidebar.aberto {
        left: 0;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(15,23,42,.55);
        z-index: 10000;
    }

    .sidebar-overlay.aberto {
        display: block;
    }

    .paf-main-content {
        width: 100%;
        padding: 20px 14px 40px;
    }
}


/* =========================================================
   PAF MENU LATERAL SAFE
   ========================================================= */

.paf-sidebar-safe {
    position: fixed;
    top: 74px;
    left: 0;
    bottom: 0;
    width: 235px;
    z-index: 900;
    overflow-y: auto;

    background: #10233f;
    border-right: 1px solid #1e3658;
}

.sidebar-safe-title {
    padding: 20px 18px 12px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 900;
}

.sidebar-safe-nav {
    padding: 0 10px 30px;
}

.sidebar-safe-group {
    margin: 20px 10px 8px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .7px;
    color: #94a3b8;
}

.sidebar-safe-link {
    display: flex;
    align-items: center;
    gap: 10px;

    min-height: 42px;
    padding: 0 12px;
    margin-bottom: 4px;

    border-radius: 8px;

    color: #e2e8f0;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
}

.sidebar-safe-link:hover {
    background: #1d3658;
    color: #ffffff;
}

.sidebar-safe-link.active {
    background: #e8752c;
    color: #ffffff;
}

.sidebar-safe-disabled {
    padding: 10px 12px;
    color: #94a3b8;
    font-size: 12px;
    opacity: .55;
}

body.app-body .main-menu {
    display: none;
}

body.app-body main.dashboard-only {
    margin-left: 235px;
    max-width: none;
    width: auto;
    padding-left: 30px;
    padding-right: 30px;
}

.paf-menu-mobile {
    display: none;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    border-radius: 7px;
    width: 38px;
    height: 38px;
    font-size: 21px;
    cursor: pointer;
}

.paf-sidebar-overlay-safe {
    display: none;
}

@media(max-width: 900px) {

    .paf-menu-mobile {
        display: inline-block;
    }

    .paf-sidebar-safe {
        top: 0;
        left: -255px;
        z-index: 10001;
        width: 245px;
        transition: left .20s ease;
        box-shadow: 7px 0 25px rgba(0,0,0,.25);
    }

    .paf-sidebar-safe.aberto {
        left: 0;
    }

    .paf-sidebar-overlay-safe {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 10000;
        background: rgba(15,23,42,.55);
    }

    .paf-sidebar-overlay-safe.aberto {
        display: block;
    }

    body.app-body main.dashboard-only {
        margin-left: 0;
        padding-left: 14px;
        padding-right: 14px;
    }
}


/* =========================================================
   REMOVE PAGINACAO PADRAO GIGANTE DO LARAVEL
   CLIENTES / CONTRATOS
   ========================================================= */

body.clientes-contratos-page nav[role="navigation"] {
    display: none !important;
}

body.clientes-contratos-page nav[role="navigation"] svg {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

body.clientes-contratos-page .paginacao-paf {
    display: flex !important;
}


/* =========================================================
   PAGINACAO CLIENTES / CONTRATOS
   ========================================================= */

.clientes-contratos-page .paginacao-paf {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 14px !important;
    padding: 16px !important;
}

.clientes-contratos-page .page-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    min-width: 105px !important;
    height: 36px !important;

    padding: 0 14px !important;

    border-radius: 8px !important;

    background: #111111 !important;
    color: #ffffff !important;

    text-decoration: none !important;

    font-size: 11px !important;
    font-weight: 900 !important;
}

.clientes-contratos-page a.page-btn:hover {
    background: #e8752c !important;
    color: #ffffff !important;
}

.clientes-contratos-page .page-btn.disabled {
    background: #e2e8f0 !important;
    color: #94a3b8 !important;
}

.clientes-contratos-page .page-info {
    color: #64748b !important;
    font-size: 12px !important;
}

.clientes-contratos-page .page-info strong {
    color: #10233f !important;
    font-size: 13px !important;
}


.topbar-logo {
    height: 46px;
    width: auto;
    object-fit: contain;
    display: block;
}
