:root {
	--gesvasa-primary: #154C2B;
	--gesvasa-accent: #B9CE2B;
	--gesvasa-primary-soft: #eaf1ed;
	--gesvasa-accent-soft: #f3f8d9;
	--gesvasa-danger: #b12626;
}

.gesvasa-mini-grid { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:12px; margin-bottom:14px; }
.gesvasa-mini-kpi { border:1px solid #dce7df; border-radius:10px; background:#f8fcf8; padding:12px; }
.gesvasa-mini-kpi-label { color:#5a7363; font-size:12px; text-transform:uppercase; letter-spacing:0.05em; }
.gesvasa-mini-kpi-value { color:#154c2b; font-size:24px; font-weight:700; line-height:1.1; margin-top:4px; }
.gesvasa-mini-kpi-value-link { font-size:18px; }
.gesvasa-mini-panel { border:1px solid #dce7df; border-radius:12px; background:#fff; margin-bottom:16px; overflow:hidden; }
.gesvasa-mini-title { background:#154c2b; color:#fff; padding:10px 12px; font-weight:700; }
.gesvasa-mini-body { padding:12px; }
.gesvasa-mini-links { margin-top:10px; color:#4e6658; font-size:12px; }

#residuo-popup-overlay { display:none; position:fixed; z-index:10000; inset:0; background:rgba(0,0,0,0.42); }
#residuo-popup-overlay.is-open { display:flex; align-items:center; justify-content:center; padding:16px; }
#residuo-popup { background:#fff; width:100%; max-width:1060px; border:none; border-radius:12px; box-shadow:0 18px 45px rgba(0,0,0,0.2); overflow:hidden; max-height:92vh; }
#residuo-popup.gesvasa-popup-wide { max-width:1660px; }
#residuo-popup .popup-header { display:flex; justify-content:space-between; align-items:center; background:#f3f8d9; color:#154c2b; border-bottom:1px solid #c8d67a; padding:12px 16px; font-weight:700; }
#residuo-popup .popup-body { padding:16px; overflow-y:auto; max-height:calc(92vh - 58px); background:#ffffff; }
#residuo-popup .popup-close { display:inline-flex; align-items:center; justify-content:center; width:28px; height:28px; border:1px solid #9cb46a; border-radius:8px; text-decoration:none; color:#154c2b; font-size:17px; font-weight:700; background:#fff; line-height:1; }
#residuo-popup .popup-close:hover { background:#eef6df; }
#residuo-popup .minwidth300, #residuo-popup .minwidth100, #residuo-popup input.flat, #residuo-popup select.flat, #residuo-popup .select2-container { width:100% !important; max-width:none !important; }
#residuo-popup table.border { border:1px solid #d0ddd5; border-radius:12px; overflow:hidden; }
#residuo-popup table.border tr.liste_titre td { background:#f3f8d9; color:#154c2b; font-weight:700; border-bottom:1px solid #c8d67a; }
#residuo-popup table.border td { padding:10px !important; }
#residuo-popup table.border .titlefield { color:#294434; font-weight:600; width:220px; }
#residuo-popup input.flat, #residuo-popup select.flat { border:1px solid #9cb46a !important; border-radius:8px !important; background:#ffffff !important; min-height:34px !important; box-sizing:border-box; }
#residuo-popup input.flat:focus, #residuo-popup select.flat:focus { outline:none; border-color:#154c2b !important; box-shadow:0 0 0 2px rgba(185, 206, 43, 0.35); }
#residuo-popup .select2-container--default .select2-selection--single { border:1px solid #9cb46a !important; border-radius:8px !important; min-height:34px !important; display:flex; align-items:center; }
#residuo-popup .select2-container--default .select2-selection--single .select2-selection__rendered { line-height:32px; }
#residuo-popup .popup-actions { display:flex; justify-content:flex-end; align-items:center; gap:10px; margin-top:14px; }
#residuo-popup .popup-actions .button { border-radius:8px; min-height:34px; padding:6px 16px; }
#residuo-popup .popup-actions .button-save { background:#154c2b; border:1px solid #154c2b; color:#fff; }
#residuo-popup .popup-actions .button-save:hover { background:#113c22; border-color:#113c22; }
#mainbody #residuo-popup .popup-actions .button-cancel { background:#c53f3f !important; border:1px solid #c53f3f !important; color:#ffffff !important; text-decoration:none; display:flex; padding:0em 0.7em !important; font-weight:700; }
#mainbody #residuo-popup .popup-actions .button-cancel:hover { background:#a83333 !important; border-color:#a83333 !important; color:#ffffff !important; }

#delete-movement-modal { display:none; position:fixed; z-index:10001; left:0; top:0; width:100%; height:100%; overflow:auto; background-color:rgba(0,0,0,0.42); }
#delete-movement-modal .modal-content { background:#fff; margin:10% auto; padding:20px; border:none; width:420px; border-radius:12px; box-shadow:0 18px 45px rgba(0,0,0,0.2); }
#delete-movement-modal .modal-title { margin:0 0 8px 0; color:#273729; font-weight:700; }
#delete-movement-modal .modal-desc { margin:0 0 12px 0; color:#4d5b4f; }
#delete-movement-modal .modal-box { padding:10px 12px; background:#f5faf0; border:1px solid #d8e7c8; border-radius:8px; color:#2f5f2f; font-weight:600; word-break:break-all; }
#delete-movement-modal .modal-note { margin:12px 0 0 0; color:#6a6a6a; font-size:12px; }
#delete-movement-modal .modal-actions { text-align:right; margin-top:16px; }
#mainbody #delete-movement-modal .button-delete { background:#c53f3f !important; border-color:#c53f3f !important; color:#fff !important; }
#mainbody #delete-movement-modal .button-delete:hover,
#mainbody#delete-movement-modal .button-delete:hover,
#delete-movement-modal .button-delete:hover { background:#a83333 !important; border-color:#a83333 !important; }

.select2-drop, .select2-dropdown, .select2-container--open .select2-dropdown { z-index:10050 !important; }
#residuo-popup-overlay .select2-drop, #residuo-popup-overlay .select2-dropdown { z-index:10060 !important; }

.gesvasa-dashboard-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(220px, 1fr)); gap:14px; margin:16px 0 20px 0; }
.gesvasa-kpi { border:1px solid #d9e4db; border-radius:12px; background:linear-gradient(180deg, #fbfdf9 0%, #f3f8f2 100%); padding:16px; }
.gesvasa-kpi-label { color:#58705f; font-size:13px; margin-bottom:6px; text-transform:uppercase; letter-spacing:0.04em; }
.gesvasa-kpi-value { color:#153b24; font-size:28px; font-weight:700; line-height:1.1; }
.gesvasa-kpi-note { color:#6d7f72; font-size:12px; margin-top:6px; }
.gesvasa-two-columns { display:grid; grid-template-columns:2fr 1fr; gap:16px; margin-top:16px; }
.gesvasa-three-columns { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:16px; margin-top:16px; }
.gesvasa-panel { border:1px solid #d8e4d8; border-radius:12px; background:#fff; overflow:hidden; }
.gesvasa-panel-title { background:#154C2B; color:#fff; padding:12px 14px; font-weight:700; border-bottom:1px solid #BFD23F; }
.gesvasa-panel-body { padding:14px; }
.gesvasa-breadcrumb { margin:16px 0 4px 0; display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.gesvasa-breadcrumb-item { display:inline-flex; align-items:center; gap:8px; }
.gesvasa-breadcrumb-link { display:inline-flex; align-items:center; border:1px solid #cad8cb; background:#fff; color:#23452f !important; border-radius:999px; padding:4px 10px; text-decoration:none; font-size:12px; font-weight:700 !important; text-transform:uppercase; }
.gesvasa-breadcrumb-link:hover { background:#f0f6ec; border-color:#b7c9b8; }
.gesvasa-breadcrumb-current { display:inline-flex; align-items:center; border:1px solid #89a98f; background:#e8f3e6; color:#1f4f2f; border-radius:999px; padding:4px 10px; font-size:12px; font-weight:700; }
.gesvasa-breadcrumb-sep { color:#7a8d7f; font-size:13px; }
.gesvasa-filterbar { margin-top:14px; border:1px solid #cfddd0; border-radius:18px; overflow:hidden; background:linear-gradient(135deg, #173f2a 0%, #245338 56%, #f0f6de 56%, #f8fbf1 100%); box-shadow:0 14px 34px rgba(24, 59, 39, 0.12); }
.gesvasa-filter-shell { display:grid; grid-template-columns:minmax(220px, 320px) 1fr; }
.gesvasa-filter-aside { padding:20px; color:#f4fbf5; border-right:1px solid #BFD23F; }
.gesvasa-filter-kicker { font-size:12px; text-transform:uppercase; letter-spacing:0.12em; opacity:0.72; margin-bottom:8px; }
.gesvasa-filter-title { font-size:28px; line-height:1.05; font-weight:700; margin:0 0 10px 0; }
.gesvasa-filter-note { font-size:13px; line-height:1.5; color:rgba(244,251,245,0.82); max-width:240px; }
.gesvasa-filter-period { display:inline-flex; align-items:center; gap:8px; margin-top:14px; padding:8px 12px; border-radius:999px; background:rgba(255,255,255,0.12); font-size:12px; font-weight:600; }
.gesvasa-filter-main { padding:20px; background:linear-gradient(180deg, rgba(255,255,255,0.92) 0%, #f8fbf1 100%); }
.gesvasa-filter-fields { display:grid; grid-template-columns:repeat(auto-fit, minmax(160px, 1fr)); gap:14px; }
.gesvasa-field label { display:block; margin-bottom:6px; color:#395643; font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:0.05em; }
.gesvasa-field select.flat { width:100%; min-height:40px; border:1px solid #b8ccb9; border-radius:12px; padding:0 10px; background:#fff; }
.gesvasa-filter-actions { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:16px; flex-wrap:wrap; }
.gesvasa-filter-hint { color:#6d7f72; font-size:12px; }
.gesvasa-filter-buttons { display:flex; gap:10px; flex-wrap:wrap; }
.gesvasa-filter-buttons .button { border-radius:999px; padding:8px 16px; }
.gesvasa-filter-buttons .button-cancel { background:#fff !important; color:#21452d !important; border:1px solid #b8ccb9 !important; }
.gesvasa-filter-buttons .button-quick-reset { background:#fdf1cf !important; border:1px solid #e6c778 !important; color:#6f5019 !important; }
.gesvasa-filter-origin { margin-top:10px; display:flex; align-items:center; gap:8px; flex-wrap:wrap; font-size:12px; }
.gesvasa-filter-origin .tag { background:#fff7de; border:1px solid #e6c778; color:#73521e; border-radius:999px; padding:4px 10px; font-weight:700; }
.gesvasa-detail-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:12px; }
.gesvasa-detail-search { min-width:280px; flex:1; max-width:420px; }
.gesvasa-detail-search input { width:100%; min-height:40px; border:1px solid #c8d7c8; border-radius:12px; padding:0 14px; background:#fff; }
.gesvasa-detail-status { color:#6d7f72; font-size:12px; }
.gesvasa-detail-table td, .gesvasa-detail-table th { white-space:nowrap; }
.gesvasa-detail-table th.gesvasa-sortable { cursor:pointer; user-select:none; position:relative; padding-right:20px; }
.gesvasa-detail-table th.gesvasa-sortable:after { content:"\2195"; position:absolute; right:8px; color:#7d8f81; font-size:11px; }
.gesvasa-detail-table th.gesvasa-sort-asc:after { content:"\2191"; color:#2a5b3b; }
.gesvasa-detail-table th.gesvasa-sort-desc:after { content:"\2193"; color:#2a5b3b; }
.gesvasa-amount-in { color:#1f6d3d; font-weight:600; }
.gesvasa-amount-out { color:#a63b32; font-weight:600; }
.gesvasa-amount-treatment { color:#2f5f9a; font-weight:700; }
.gesvasa-balance { color:#1d3557; font-weight:700; }
.gesvasa-chart-wrap { position:relative; height:280px; width:100%; overflow:hidden; }
.gesvasa-chart-wrap canvas { width:100% !important; height:100% !important; display:block; }
.gesvasa-chart-note { margin-top:10px; color:#425b4b; font-size:12px; min-height:18px; }
.gesvasa-view-controls { margin:14px 0 0 0; display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.gesvasa-view-buttons { display:flex; gap:8px; flex-wrap:wrap; }
.gesvasa-view-buttons .button { border-radius:999px; font-weight:700; }
#mainbody a.button:not(.buttongen):not(.bordertransp):not(.gesvasa-view-buttons .button.gesvasa-active) { background:#154C2B !important; color:#fff !important; border-color:#154C2B !important; }
.gesvasa-view-note { color:#5f7668; font-size:12px; }
.gesvasa-secondary-hidden { display:none; }
.gesvasa-op-links { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:12px; margin-top:16px; }
.gesvasa-op-link { display:block; border:1px solid #d5e2d7; border-radius:12px; padding:14px; text-decoration:none !important; background:linear-gradient(180deg, #fff 0%, #f3f8f2 100%); }
.gesvasa-op-link-title { color:#17492c; font-size:15px; font-weight:700; margin-bottom:6px; }
.gesvasa-op-link-desc { color:#5a7363; font-size:12px; line-height:1.4; }
.gesvasa-percent-switch { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:10px; }
.gesvasa-percent-switch .button { border-radius:999px; }
.gesvasa-percent-switch .button.gesvasa-active { background:#154C2B !important; color:#fff !important; border-color:#154C2B !important; }

@media (max-width: 1100px) {
	.gesvasa-two-columns, .gesvasa-three-columns, .gesvasa-filter-shell, .gesvasa-filter-fields, .gesvasa-op-links { grid-template-columns:1fr; }
}

@media (max-width: 960px) {
	.gesvasa-mini-grid { grid-template-columns:1fr; }
}

@media (max-width: 768px) {
	#residuo-popup-overlay.is-open { padding:2vh 8px; }
	#residuo-popup .popup-body { padding:12px; }
	#residuo-popup table.border .titlefield { width:130px; }
	#residuo-popup .popup-actions { flex-direction:column-reverse; align-items:stretch; }
}

