:root {
    --brand: #007bff;
    --brand-dark: #0056b3;
    --ink: #1f2937;
    --line: #e5eaf1;
    --surface: #ffffff;
    --canvas: #f4f7fb;
}

html { min-height: 100%; }
body { min-height: 100vh; color: var(--ink); background: var(--canvas) !important; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: .925rem; }

.navbar { min-height: 64px; padding: .55rem 1.5rem; background: linear-gradient(118deg, #006ddc 0%, #007bff 52%, #1688ff 100%) !important; box-shadow: 0 2px 16px rgba(0, 61, 130, .22); }
.navbar-brand { display: inline-flex; align-items: center; margin-right: 1.35rem; font-size: 1.05rem; font-weight: 700; letter-spacing: .01em; }
.navbar-brand::before { width: 29px; height: 29px; margin-right: .65rem; border: 2px solid rgba(255, 255, 255, .85); border-radius: 8px; content: "G"; color: #fff; font-size: .8rem; line-height: 25px; text-align: center; }
.navbar-dark .navbar-nav .nav-link { padding: .55rem .7rem; border-radius: .35rem; color: rgba(255,255,255,.86); font-size: .875rem; transition: background-color .18s ease, color .18s ease; }
.navbar-dark .navbar-nav .nav-link:hover, .navbar-dark .navbar-nav .show > .nav-link { color: #fff; background: rgba(255,255,255,.14); }

.dropdown-menu { margin-top: .45rem; padding: .45rem; border: 1px solid rgba(31, 41, 55, .08); border-radius: .5rem; box-shadow: 0 12px 30px rgba(31, 41, 55, .16); font-size: .875rem; }
.dropdown-item { padding: .5rem .75rem; border-radius: .3rem; }
.dropdown-item:active { background-color: var(--brand); }
.dropdown-header { color: var(--brand); font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

main.container-fluid { max-width: 1600px; margin-top: 75px !important; padding: 1.5rem; }
.portal-main { margin-top: 75px; padding-top: 1.5rem; padding-bottom: 1.5rem; }
.auth-main { margin-top: 0 !important; padding-top: 5rem; }
.card { overflow: hidden; border: 1px solid var(--line); border-radius: .65rem; background: var(--surface); box-shadow: 0 4px 16px rgba(31, 41, 55, .045) !important; }
.card-header { padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--line) !important; background-color: var(--surface) !important; }
.card-body { padding: 1.25rem; }
.card-header .h4, .card-header .h5 { color: #172033; font-weight: 650; }

.btn { border-radius: .4rem; font-weight: 600; box-shadow: none; transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease; }
.btn-primary { background-color: var(--brand); border-color: var(--brand); }
.btn-primary:hover, .btn-primary:focus { background-color: var(--brand-dark); border-color: var(--brand-dark); box-shadow: 0 4px 10px rgba(0, 123, 255, .22); }
.btn:not(.dropdown-item):not(.navbar-toggler):hover { transform: translateY(-1px); }
.btn-outline-primary { border-color: #b8d9ff; color: #0069d9; }
.btn-outline-primary:hover { background-color: var(--brand); border-color: var(--brand); }

label { margin-bottom: .4rem; color: #4b5563; font-size: .82rem; font-weight: 650; }
.form-control, .custom-select { min-height: calc(1.5em + .75rem + 2px); border-color: #d6dee9; border-radius: .4rem; color: var(--ink); }
.form-control:focus, .custom-select:focus { border-color: #79b8ff; box-shadow: 0 0 0 .2rem rgba(0, 123, 255, .13); }
.form-control::placeholder { color: #9ca3af; }

.table { color: #374151; font-size: .875rem; }
.table thead th { border-top: 0; border-bottom: 1px solid #d9e1ea; background: #f7f9fc; color: #526071; font-size: .72rem; font-weight: 700; letter-spacing: .045em; text-transform: uppercase; vertical-align: middle; }
.table td, .table th { padding: .8rem .75rem; vertical-align: middle; }
.table-striped tbody tr:nth-of-type(odd) { background-color: rgba(247, 249, 252, .72); }
.table-hover tbody tr:hover { background-color: #edf6ff; }
.table-responsive { border-radius: .45rem; }
.lista-assinaturas .signature-cell { min-width: 250px; height: 42px; }
.lista-assinaturas .w-10 { width: 10%; }
.lista-assinaturas .w-20 { width: 20%; }
.lista-assinaturas .w-35 { width: 35%; }
.aviso-debito { max-width: 1000px; margin-right: auto; margin-left: auto; }
.aviso-debito__texto { max-width: 820px; line-height: 1.55; }

.alert { border: 0; border-radius: .45rem; box-shadow: 0 2px 8px rgba(31, 41, 55, .05); }
a { color: #006fdc; }
a:hover { color: #0056b3; }
.boleto-print { max-width: 900px; margin: 0 auto; font-family: Arial, sans-serif; color: #000; background: #fff !important; }
.boleto-print .card-header, .boleto-print .card-body { color: #000; background: #fff !important; }
.theme-dark .boleto-print .card-header .h4, .theme-dark .boleto-print .card-header .h5 { color: #172033; }
.boleto-print .card-body { padding: 1.5rem; }.boleto-head { display:flex; justify-content:space-between; align-items:center; min-height:42px; border-bottom:1px solid #000; font-size:1.05rem; }.boleto-print table { width:100%; border-collapse:collapse; font-size:.78rem; }.boleto-print th,.boleto-print td { padding:.2rem .3rem; border:1px solid #000; vertical-align:top; }.boleto-print th { font-weight:700; }.boleto-print p { margin:.55rem .25rem; font-size:.8rem; }.boleto-cut { margin:1.5rem 0; border:0; border-top:2px dashed #000; }.boleto-barcode { display:flex; justify-content:space-between; align-items:end; border-top:1px solid #000; padding-top:.5rem; }.boleto-barcode img { max-width:72%; height:58px; }.boleto-barcode span { font-size:.78rem; font-weight:700; }
.boleto-period-item { margin-bottom: 2rem; }

/* Dashboard: status cards become concise, scannable indicators. */
.card .card.border-secondary, .card .card.border-info, .card .card.border-primary, .card .card.border-success { height: 100%; border-width: 1px !important; border-left-width: 4px !important; border-radius: .5rem; transition: transform .18s ease, box-shadow .18s ease; }
.card a.text-decoration-none:hover .card { transform: translateY(-3px); box-shadow: 0 8px 18px rgba(31, 41, 55, .1) !important; }
.card .h3 { font-size: 2rem; font-weight: 700; letter-spacing: -.04em; }

@media (min-width: 992px) { .navbar .dropdown:hover > .dropdown-menu { display: block; } }
@media (max-width: 991.98px) { .navbar { padding-right: 1rem; padding-left: 1rem; } .navbar-nav { padding-top: .45rem; } .navbar-dark .navbar-nav .nav-link { padding-left: .5rem; } .dropdown-menu { margin: .15rem 0 .3rem; box-shadow: none; } }
@media (max-width: 575.98px) { main.container-fluid { margin-top: 64px !important; padding: 1rem; } .portal-main { margin-top: 64px; padding-top: 1rem; padding-bottom: 1rem; } .auth-main { margin-top: 0 !important; padding-top: 2.5rem; } .card-header { padding: 1rem; } .card-body { padding: 1rem; } .card-header.d-flex { align-items: flex-start !important; flex-direction: column; } .card-header.d-flex .btn { margin-top: .75rem; } .table td, .table th { white-space: nowrap; } }

.theme-dark {
    --ink: #e5e7eb;
    --line: #3b475a;
    --surface: #1f2937;
    --canvas: #121212;
}

.theme-dark body.bg-light { background-color: var(--canvas) !important; }
.theme-dark .card-header .h4, .theme-dark .card-header .h5, .theme-dark label { color: #f3f4f6; }
.theme-dark .dropdown-menu, .theme-dark .form-control, .theme-dark .custom-select { color: var(--ink); background-color: var(--surface); }
.theme-dark .dropdown-menu { border-color: var(--line); }
.theme-dark .dropdown-item { color: var(--ink); }
.theme-dark .dropdown-item:hover, .theme-dark .dropdown-item:focus { color: #fff; background-color: #374151; }
.theme-dark .dropdown-divider { border-top-color: var(--line); }
.theme-dark .form-control, .theme-dark .custom-select, .theme-dark .form-control-file { border-color: var(--line); }
.theme-dark .form-control::placeholder { color: #9ca3af; }
.theme-dark .table { color: var(--ink); }
.theme-dark .table-bordered, .theme-dark .table-bordered td, .theme-dark .table-bordered th, .theme-dark .table td, .theme-dark .table th { border-color: var(--line); }
.theme-dark .table thead th { color: #cbd5e1; background-color: #273449; border-color: var(--line); }
.theme-dark .table-striped tbody tr:nth-of-type(odd) { background-color: rgba(255, 255, 255, .04); }
.theme-dark .table-hover tbody tr:hover { color: var(--ink); background-color: #273449; }
.theme-dark .text-muted { color: #aab4c3 !important; }
.theme-dark .btn-outline-primary { border-color: #5da9f6; color: #8bc4ff; }
.theme-dark .btn-outline-secondary { border-color: #8b96a5; color: #c7d0db; }

@media print {
    @page { size: A4 portrait; margin: 12mm; }
    body { background: #fff !important; font-size: 10pt; }
    .theme-dark body { color: #000 !important; background: #fff !important; }
    .navbar, .no-print { display: none !important; }
    main.container-fluid { max-width: none; margin: 0 !important; padding: 0; }
    .report-print-area { overflow: visible; margin: 0 12mm; padding: 0; border: 0; box-shadow: none !important; }
    .report-print-area .card-body { overflow: visible; padding: 0; border: 0; box-shadow: none !important; }
    .report-print-area .card-header { padding: 0 0 1rem; border: 0 !important; }
    .theme-dark .report-print-area, .theme-dark .report-print-area .card, .theme-dark .report-print-area .card-header, .theme-dark .report-print-area .card-body { color: #000 !important; background: #fff !important; }
    .theme-dark .report-print-area .card-header .h4, .theme-dark .report-print-area .card-header .h5 { color: #172033 !important; }
    .table-responsive { overflow: visible; }
    .table { font-size: 9pt; }
    .table td, .table th { padding: .35rem .45rem; white-space: normal; }
    .table thead th { background: #f1f1f1 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .theme-dark .report-print-area .table { color: #000 !important; }
    .theme-dark .report-print-area .table, .theme-dark .report-print-area .table td, .theme-dark .report-print-area .table th { border-color: #dee2e6 !important; }
    .theme-dark .report-print-area .table thead th { color: #526071 !important; border-color: #dee2e6 !important; }
    .theme-dark .report-print-area .table-striped tbody tr:nth-of-type(odd) { background-color: rgba(0, 0, 0, .05) !important; }
    .lista-assinaturas .signature-cell { min-width: 0; height: 32px; }
    .aviso-debito { max-width: none; }
    .boleto-print { max-width:none; margin:0 12mm; }.boleto-print .card-body { padding:0; }.boleto-print .card-header { display:none; }.boleto-print table { font-size:8pt; }.boleto-print p { font-size:8pt; }.boleto-barcode img { height:52px; }
    .boleto-period-item { break-after:page; page-break-after:always; margin:0; }.boleto-period-item:last-child { break-after:auto; page-break-after:auto; }
}
