:root,[data-bs-theme=light] {
    --bs-blue: #435ebe;
    --bs-indigo: #6610f2;
    --bs-purple: #6f42c1;
    --bs-pink: #d63384;
    --bs-red: #dc3545;
    --bs-orange: #fd7e14;
    --bs-yellow: #ffc107;
    --bs-green: #198754;
    --bs-teal: #20c997;
    --bs-cyan: #0dcaf0;
    --bs-white: #fff;
    --bs-gray: #6c757d;
    --bs-gray-dark: #343a40;
    --bs-gray-100: #f8f9fa;
    --bs-gray-200: #e9ecef;
    --bs-gray-300: #dee2e6;
    --bs-gray-400: #ced4da;
    --bs-gray-500: #adb5bd;
    --bs-gray-600: #6c757d;
    --bs-gray-700: #495057;
    --bs-gray-800: #343a40;
    --bs-gray-900: #212529;
    --bs-primary: #435ebe;
    --bs-secondary: #6c757d;
    --bs-success: #198754;
    --bs-info: #0dcaf0;
    --bs-warning: #ffc107;
    --bs-danger: #dc3545;
    --bs-light: #ced4da;
    --bs-dark: #131313;
    --bs-primary-rgb: 67, 94, 190;
    --bs-secondary-rgb: 108, 117, 125;
    --bs-success-rgb: 25, 135, 84;
    --bs-info-rgb: 13, 202, 240;
    --bs-warning-rgb: 255, 193, 7;
    --bs-danger-rgb: 220, 53, 69;
    --bs-light-rgb: 206, 212, 218;
    --bs-dark-rgb: 19, 19, 19;
    --bs-primary-text-emphasis: #1b264c;
    --bs-secondary-text-emphasis: #2b2f32;
    --bs-success-text-emphasis: #0a3622;
    --bs-info-text-emphasis: #055160;
    --bs-warning-text-emphasis: #664d03;
    --bs-danger-text-emphasis: #58151c;
    --bs-light-text-emphasis: #495057;
    --bs-dark-text-emphasis: #495057;
    --bs-primary-bg-subtle: #d9dff2;
    --bs-secondary-bg-subtle: #f8f9fa;
    --bs-success-bg-subtle: #d1e7dd;
    --bs-info-bg-subtle: #cff4fc;
    --bs-warning-bg-subtle: #fff3cd;
    --bs-danger-bg-subtle: #f8d7da;
    --bs-light-bg-subtle: #fcfcfd;
    --bs-dark-bg-subtle: #ced4da;
    --bs-primary-border-subtle: #b4bfe5;
    --bs-secondary-border-subtle: #e9ecef;
    --bs-success-border-subtle: #a3cfbb;
    --bs-info-border-subtle: #9eeaf9;
    --bs-warning-border-subtle: #ffe69c;
    --bs-danger-border-subtle: #f1aeb5;
    --bs-light-border-subtle: #e9ecef;
    --bs-dark-border-subtle: #adb5bd;
    --bs-white-rgb: 255, 255, 255;
    --bs-black-rgb: 0, 0, 0;
    --bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    --bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    --bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, .15), rgba(255, 255, 255, 0));
    --bs-body-font-family: "Nunito";
    --bs-body-font-size: 1rem;
    --bs-body-font-weight: 400;
    --bs-body-line-height: 1.5;
    --bs-body-color: #607080;
    --bs-body-color-rgb: 96, 112, 128;
    --bs-body-bg: #f2f7ff;
    --bs-body-bg-rgb: 242, 247, 255;
    --bs-emphasis-color: #000;
    --bs-emphasis-color-rgb: 0, 0, 0;
    --bs-secondary-color: rgba(96, 112, 128, .75);
    --bs-secondary-color-rgb: 96, 112, 128;
    --bs-secondary-bg: #e9ecef;
    --bs-secondary-bg-rgb: 233, 236, 239;
    --bs-tertiary-color: rgba(96, 112, 128, .5);
    --bs-tertiary-color-rgb: 96, 112, 128;
    --bs-tertiary-bg: #f8f9fa;
    --bs-tertiary-bg-rgb: 248, 249, 250;
    --bs-heading-color: #25396f;
    --bs-link-color: #435ebe;
    --bs-link-color-rgb: 67, 94, 190;
    --bs-link-decoration: underline;
    --bs-link-hover-color: #364b98;
    --bs-link-hover-color-rgb: 54, 75, 152;
    --bs-code-color: #d63384;
    --bs-highlight-color: #607080;
    --bs-highlight-bg: #fcf8e3;
    --bs-border-width: 1px;
    --bs-border-style: solid;
    --bs-border-color: #dee2e6;
    --bs-border-color-translucent: rgba(0, 0, 0, .175);
    --bs-border-radius: .25rem;
    --bs-border-radius-sm: .2rem;
    --bs-border-radius-lg: .3rem;
    --bs-border-radius-xl: 1rem;
    --bs-border-radius-xxl: 2rem;
    --bs-border-radius-2xl: var(--bs-border-radius-xxl);
    --bs-border-radius-pill: 50rem;
    --bs-box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15);
    --bs-box-shadow-sm: 0 .125rem .25rem rgba(0, 0, 0, .075);
    --bs-box-shadow-lg: 0 .75rem 3rem rgba(0, 0, 0, .225);
    --bs-box-shadow-inset: inset 0 1px 2px rgba(0, 0, 0, .075);
    --bs-focus-ring-width: .25rem;
    --bs-focus-ring-opacity: .25;
    --bs-focus-ring-color: rgba(67, 94, 190, .25);
    --bs-form-valid-color: #198754;
    --bs-form-valid-border-color: #198754;
    --bs-form-invalid-color: #dc3545;
    --bs-form-invalid-border-color: #dc3545
}

#password, #oldpassword, #newpassword, #renewpassword {
    -webkit-text-security: disc;
}

/* --- Custom minimalista --- */
.login-container {
    max-width: 340px;
    margin: 40px auto 0 auto;
    background: #fff;
    padding: 30px 22px 22px 22px;
    border-radius: 18px;
    box-shadow: 0 4px 32px rgba(0,0,0,0.08);
}
.login-container img {
    display: block;
    margin: 0 auto 18px auto;
    width: 64px;
    border-radius: 16px;
    background: #f8f8f8;
}
.login-input {
    margin-bottom: 18px;
    border-radius: 12px !important;
    font-size: 1.12em;
    padding-left: 40px !important;
    background: #fafafa;
    border: 1px solid #eee;
}
.login-icon {
    position: absolute;
    left: 12px;
    top: 11px;
    font-size: 1.2em;
    color: #aaa;
}
.field-group {
    position: relative;
}
.field-group input[type="password"],
.field-group input[type="text"] {
    width: 100%;
    padding-right: 12px !important;
}
.ui-btn.btn-confirmar {
    border-radius: 12px;
    background: #337ab7;
    color: #fff;
    font-weight: bold;
    box-shadow: 0 1px 4px rgba(51,122,183,0.15);
    margin-top: 8px;
}
.ui-btn.btn-confirmar:active {
    background: #245482;
}
.login-footer {
    text-align: center;
    font-size: 0.95em;
    color: #bbb;
    margin-top: 18px;
}

/* Navigation */
.jqm-navmenu-panel li.active > a {
    font-weight: 700;
    color: var(--bs-primary);
}
.jqm-navmenu-panel .submenu-open > a .ui-icon {
    transform: rotate(180deg);
    transition: transform .2s ease;
}
.jqm-navmenu-panel .fa-solid,
.jqm-navmenu-panel .fa-regular {
    margin-right: 6px;
    color: var(--bs-primary);
}

/* Cards and lists */
.consumo-list .ui-btn {
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    border: 1px solid #eef1f6;
}
.consumo-list .dow-label {
    display: inline-block;
    background: #eef1f6;
    color: #25396f;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.85em;
    margin-right: 6px;
}
.consumo-detail-popup {
    min-width: 240px;
    max-width: 360px;
}
.empty-state {
    padding: 18px;
    border: 1px dashed #c8d3e1;
    background: #f8fbff;
    text-align: center;
    border-radius: 12px;
    color: #607080;
}
.load-more-wrapper {
    text-align: center;
    margin: 12px 0 64px; /* espaço extra para não encostar no FAB */
}

/* Floating action button */
.fab {
    position: fixed;
    bottom: 82px;
    right: 22px;
    z-index: 999;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #337ab7;
    color: #fff !important;
    box-shadow: 0 10px 25px rgba(51,122,183,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35em;
}
.fab:active { background: #245482; }

/* Toasts */
.toast {
    position: fixed;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    background: #131313;
    color: #fff;
    padding: 12px 18px;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.2);
    z-index: 1000;
    display: none;
    max-width: 90%;
    text-align: center;
}
.toast.success { background: #198754; }
.toast.error { background: #dc3545; }
.toast.info { background: #0dcaf0; color:#01202c; }

/* Loaders / skeleton */
.loader {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #d9e2f1;
    border-top-color: #435ebe;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Form tweaks */
.field-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220,53,69,0.2);
}
.field-label-inline {
    font-weight: 700;
    color: #25396f;
    margin-bottom: 6px;
    display: block;
}
.inline-helper {
    font-size: 0.9em;
    color: #607080;
    margin: 6px 0 12px;
}

/* Dashboard summaries */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin: 12px 0 16px;
}
.summary-card {
    background: #fff;
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.05);
    border: 1px solid #eef1f6;
}
.summary-card strong { display: block; font-size: 0.95em; color: #25396f; }
.summary-card span { font-size: 1.2em; color: #435ebe; }
.summary-card .delta.positive { color: #198754; }
.summary-card .delta.negative { color: #dc3545; }

.text-break {
    word-wrap: break-word!important;
    word-break: break-word!important
}

.text-primary {
    --bs-text-opacity: 1;
    color: rgba(var(--bs-primary-rgb),var(--bs-text-opacity))!important
}

.text-secondary {
    --bs-text-opacity: 1;
    color: rgba(var(--bs-secondary-rgb),var(--bs-text-opacity))!important
}

.text-success {
    --bs-text-opacity: 1;
    color: rgba(var(--bs-success-rgb),var(--bs-text-opacity))!important
}

.text-info {
    --bs-text-opacity: 1;
    color: rgba(var(--bs-info-rgb),var(--bs-text-opacity))!important
}

.text-warning {
    --bs-text-opacity: 1;
    color: rgba(var(--bs-warning-rgb),var(--bs-text-opacity))!important
}

.text-danger {
    --bs-text-opacity: 1;
    color: rgba(var(--bs-danger-rgb),var(--bs-text-opacity))!important
}

.text-light {
    --bs-text-opacity: 1;
    color: rgba(var(--bs-light-rgb),var(--bs-text-opacity))!important
}

.text-dark {
    --bs-text-opacity: 1;
    color: rgba(var(--bs-dark-rgb),var(--bs-text-opacity))!important
}

.text-black {
    --bs-text-opacity: 1;
    color: rgba(var(--bs-black-rgb),var(--bs-text-opacity))!important
}

.text-white {
    --bs-text-opacity: 1;
    color: rgba(var(--bs-white-rgb),var(--bs-text-opacity))!important
}
