/* Toastr custom styles*/
#toast-container {
}

#toast-container.toast-bottom-center > div, #toast-container.toast-top-center > div {
    margin: 10px auto 0;
}

#toast-container > .toast-info,
#toast-container > .toast-error,
#toast-container > .toast-warning,
#toast-container > .toast-success {
    background-image: none;
}

#toast-container > div {
    background: #fff;
    padding: 20px;
    color: #6a6c6f;
    box-shadow: 0 0 1px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.2);
    opacity: 1;
}

#toast-container > div:hover {
    box-shadow: 0 0 1px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toast-close-button {
    color: #000;
    opacity: 0.2;
}

.toast-info {
    background: #fff;
    border-left: 6px solid #3498db;
}

.toast-success {
    background: #fff;
    border-left: 6px solid #62cb31;
}

.toast-warning {
    background: #fff;
    border-left: 6px solid #ffb606;
}

.toast-error {
    background: #fff;
    border-left: 6px solid #e74c3c;
}

.toast-progress {
    opacity: 0.6;
}

.toast-info .toast-progress {
    background-color: #3498db;
}

.toast-success .toast-progress {
    background-color: #62cb31;
}

.toast-warning .toast-progress {
    background-color: #ffb606;
}

.toast-error .toast-progress {
    background-color: #e74c3c;
}

/* Nestable list */

.dd {
    position: relative;
    display: block;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 13px;
    line-height: 20px;
}

.dd-list {
    display: block;
    position: relative;
    margin: 0;
    padding: 0;
    list-style: none;
}

.dd-list .dd-list {
    padding-left: 30px;
}

.dd-collapsed .dd-list {
    display: none;
}

.dd-item,
.dd-empty,
.dd-placeholder {
    display: block;
    position: relative;
    margin: 0;
    padding: 0;
    min-height: 20px;
    font-size: 13px;
    line-height: 20px;
}

.dd-handle {
    display: block;
    margin: 5px 0;
    padding: 5px 10px;
    color: #333;
    text-decoration: none;
    border: 1px solid #e4e5e7;
    background: #f7f9fa;
    -webkit-border-radius: 3px;
    border-radius: 3px;
    box-sizing: border-box;
    -moz-box-sizing: border-box;
}

.dd-handle span {
    font-weight: bold;
}

.dd-handle:hover {
    background: #f0f0f0;
    cursor: pointer;
    font-weight: bold;
}

.dd-item > button {
    display: block;
    position: relative;
    cursor: pointer;
    float: left;
    width: 25px;
    height: 20px;
    margin: 5px 0;
    padding: 0;
    text-indent: 100%;
    white-space: nowrap;
    overflow: hidden;
    border: 0;
    background: transparent;
    font-size: 12px;
    line-height: 1;
    text-align: center;
    font-weight: bold;
}

.dd-item > button:before {
    content: '+';
    display: block;
    position: absolute;
    width: 100%;
    text-align: center;
    text-indent: 0;
}

.dd-item > button[data-action="collapse"]:before {
    content: '-';
}

#nestable2 .dd-item > button {
    font-family: FontAwesome;
    height: 34px;
    width: 33px;
    color: #c1c1c1;

}

#nestable2 .dd-item > button:before {
    content: "\f067";
}

#nestable2 .dd-item > button[data-action="collapse"]:before {
    content: "\f068";
}

.dd-placeholder,
.dd-empty {
    margin: 5px 0;
    padding: 0;
    min-height: 30px;
    background: #f2fbff;
    border: 1px dashed #e4e5e7;
    box-sizing: border-box;
    -moz-box-sizing: border-box;
}

.dd-empty {
    border: 1px dashed #bbb;
    min-height: 100px;
    background-color: #e5e5e5;
    background-image: -webkit-linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff), -webkit-linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff);
    background-image: -moz-linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff), -moz-linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff);
    background-image: linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff), linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff);
    background-size: 60px 60px;
    background-position: 0 0, 30px 30px;
}

.dd-dragel {
    position: absolute;
    z-index: 9999;
    pointer-events: none;
}

.dd-dragel > .dd-item .dd-handle {
    margin-top: 0;
}

.dd-dragel .dd-handle {
    -webkit-box-shadow: 2px 4px 6px 0 rgba(0, 0, 0, .1);
    box-shadow: 2px 4px 6px 0 rgba(0, 0, 0, .1);
}

/**
* Nestable Extras
*/
.nestable-lists {
    display: block;
    clear: both;
    padding: 30px 0;
    width: 100%;
    border: 0;
    border-top: 2px solid #e4e5e7;
    border-bottom: 2px solid #e4e5e7;
}

#nestable-menu {
    padding: 0;
    margin: 10px 0 20px 0;
}

#nestable-output,
#nestable2-output {
    width: 100%;
    font-size: 0.75em;
    line-height: 1.333333em;
    font-family: open sans, lucida grande, lucida sans unicode, helvetica, arial, sans-serif;
    padding: 5px;
    box-sizing: border-box;
    -moz-box-sizing: border-box;
}

#nestable2 .dd-handle {
    color: inherit;
    border: 1px dashed #e4e5e7;
    background: #f7f9fa;
    padding: 10px;
}

#nestable2 .dd-handle:hover {
    /*background: #bbb;*/
}

#nestable2 span.label {
    margin-right: 10px;
}

#nestable-output,
#nestable2-output {
    font-size: 12px;
    padding: 25px;
    box-sizing: border-box;
    -moz-box-sizing: border-box;
}

.settings-icon-image {
    height: 3.65em;
}

.dashboard-icon-image {
    height: 2.65em;
}

.modal-header {
    padding: 15px 30px;
    background: #f7f9fa
}

#map-area {
    height: 400px;
    width: 100%;
}

.break-word {
    word-wrap: break-word;
}

.hpanel .alert{
    margin-bottom: 10px
}




.alertStatusYellow{
    color: #000;
    background-color: #F8F17E;
    border-color: rgb(255, 241, 0);
}

.alertStatusGrey{
    color: #000;
    background-color: #828282;
    border-color: rgb(130, 130, 130);
}

.alertStatusOrange{
    color: #ffffff;
    background-color: #ff9604;
    border-color: rgb(255, 150, 4);
}

.alertStatusGreen{
    color: #FFF;
    background-color: rgba(17, 59, 0, 1);
    border-color: rgba(17, 59, 0, 1);
}

.alertStatusRed{
    color: #FFF;
    background-color: rgba(152, 0, 0, 1);
    border-color: rgba(152, 0, 0, 1);
}
.alertStatusPurple{
    color: #FFF;
    background-color: rgba(84, 0, 152, 1);
    border-color: rgba(84, 0, 152, 1);
}

.alertStatusBlack{
    color: #FFF;
    background-color: #000;
    border-color: #000;
}

.alertStatusBlue{
    color: #FFF;
    background-color: #4475FF;
    border-color: #4475FF;
}

.dotStatusYellow{
    color: rgb(255, 241, 0);
}

.dotStatusOrange{
    color: rgb(255, 150, 4);
}

.dotStatusGreen{
    color:  rgba(35, 121, 0, 1);
}

.dotStatusRed{
    color: rgba(255, 0, 0, 1);
}
.dotStatusPurple{
    color: rgba(84, 0, 152, 1);
}

.dotStatusBlack{
    color: #000;
}

.dotStatusBlue{
    color: #4475FF;
}

.dotStatusGrey{
    color: #828282;
}

.modal .chosen-container{
    width: 100% !important;
}

/*
 * Horizontal registry list nav-pills: same link color for every item; only remove Bootstrap’s
 * solid blue *background* on the active pill — text/icons stay one consistent blue.
 * :not(.nav-stacked) avoids clashing with vertical section tabs on show pages.
 */
.hpanel .panel-body ul.nav.nav-pills:not(.nav-stacked) > li > a,
.hpanel .panel-body ul.nav.nav-pills:not(.nav-stacked) > li.active > a,
.hpanel .panel-body ul.nav.nav-pills:not(.nav-stacked) > li.active > a:hover,
.hpanel .panel-body ul.nav.nav-pills:not(.nav-stacked) > li.active > a:focus {
	color: #337ab7 !important;
	background-color: transparent !important;
	border-radius: 4px;
	font-weight: 400;
}
.hpanel .panel-body ul.nav.nav-pills:not(.nav-stacked) > li > a .fa,
.hpanel .panel-body ul.nav.nav-pills:not(.nav-stacked) > li.active > a .fa {
	color: #337ab7 !important;
}
.hpanel .panel-body ul.nav.nav-pills:not(.nav-stacked) > li > a:hover,
.hpanel .panel-body ul.nav.nav-pills:not(.nav-stacked) > li > a:focus {
	color: #23527c !important;
	background-color: rgba(0, 0, 0, 0.04) !important;
}
.hpanel .panel-body ul.nav.nav-pills:not(.nav-stacked) > li > a:hover .fa,
.hpanel .panel-body ul.nav.nav-pills:not(.nav-stacked) > li > a:focus .fa {
	color: #23527c !important;
}

/* Sections sidebar — Farm / Farmer / Commodity / User show (flat, BAIMS green #2e7d32) */
.farmer-show-sections,
.farm-show-sections {
	margin-top: 8px;
}
@media (min-width: 992px) {
	.farmer-show-sections,
	.farm-show-sections {
		display: flex;
		flex-wrap: nowrap;
		align-items: flex-start;
	}
	.farmer-show-sections .farmer-show-sidebar.col-xs-12,
	.farm-show-sections .farmer-show-sidebar.col-xs-12 {
		float: none;
		width: auto;
		flex: 0 0 200px;
		max-width: 200px;
		min-width: 0;
	}
	.farmer-show-sections .farmer-show-tab-panel-wrap.col-xs-12,
	.farm-show-sections .farmer-show-tab-panel-wrap.col-xs-12 {
		float: none;
		width: auto !important;
		flex: 1 1 auto;
		min-width: 0;
	}
	.farmer-show-sidebar .farmer-show-sidebar-title {
		padding: 12px 10px 10px;
		font-size: 10px;
	}
	ul.farmer-show-side-nav.nav-pills {
		padding: 6px 8px 10px;
	}
	ul.farmer-show-side-nav.nav-pills > li > a {
		padding: 9px 8px;
		font-size: 12px;
	}
	ul.farmer-show-side-nav.nav-pills > li > a .fa {
		margin-right: 6px;
		min-width: 16px;
		font-size: 13px;
	}
}
/* Mobile / tablet: horizontal scroll section tabs (desktop sidebar unchanged at 992px+) */
@media (max-width: 991px) {
	.farmer-show-sections .farmer-show-sidebar {
		margin-bottom: 8px;
		position: sticky;
		top: 0;
		z-index: 100;
		background: #fff;
		border-bottom: 1px solid #e8ece8;
		box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
	}
	.farmer-show-sidebar .farmer-show-sidebar-title {
		padding: 8px 12px 2px;
		font-size: 10px;
	}
	ul.farmer-show-side-nav.nav-pills {
		display: flex;
		flex-direction: row;
		flex-wrap: nowrap;
		overflow-x: auto;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
		scroll-snap-type: x proximity;
		scrollbar-width: thin;
		gap: 4px;
		padding: 4px 8px 10px;
		margin: 0;
	}
	ul.farmer-show-side-nav.nav-pills > li {
		flex: 0 0 auto;
		float: none;
		scroll-snap-align: start;
	}
	ul.farmer-show-side-nav.nav-pills > li.farmer-show-nav-bottom {
		margin-top: 0;
		padding-top: 0;
		border-left: 2px solid #e0e0e0;
		margin-left: 4px;
		padding-left: 4px;
	}
	ul.farmer-show-side-nav.nav-pills > li > a {
		padding: 8px 12px;
		margin: 0;
		white-space: nowrap;
		font-size: 12px;
		border-radius: 20px;
	}
	ul.farmer-show-side-nav.nav-pills > li > a .fa {
		margin-right: 6px;
		min-width: 14px;
		font-size: 13px;
	}
	.farmer-show-tab-panel-wrap > .tab-content {
		padding-top: 10px !important;
	}
}
.farmer-show-sidebar {
	background: transparent;
	border: none;
	border-radius: 0;
	padding: 0;
	margin-bottom: 16px;
	box-shadow: none;
}
.farmer-show-sidebar-title {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #2e7d32;
	margin: 0;
	padding: 14px 16px 12px;
	border-bottom: none;
}
.farmer-show-sidebar-title .fa {
	margin-right: 8px;
	opacity: 0.9;
}
ul.farmer-show-side-nav.nav-pills {
	margin-bottom: 0;
	padding: 8px 10px 12px;
}
ul.farmer-show-side-nav.nav-pills > li {
	float: none;
	margin: 0;
}
ul.farmer-show-side-nav.nav-pills > li + li {
	border-top: none;
}
ul.farmer-show-side-nav.nav-pills > li.farmer-show-nav-bottom {
	border-top: none;
	margin-top: 6px;
	padding-top: 6px;
}
ul.farmer-show-side-nav.nav-pills > li > a {
	border-radius: 8px;
	padding: 12px 12px 12px 10px;
	color: #424242;
	font-weight: 500;
	font-size: 13px;
	line-height: 1.35;
	border: 1px solid transparent;
	display: flex;
	align-items: center;
	margin-top: 2px;
	margin-bottom: 2px;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
ul.farmer-show-side-nav.nav-pills > li > a:hover,
ul.farmer-show-side-nav.nav-pills > li > a:focus {
	background-color: #e8f5e9 !important;
	border-color: transparent;
	color: #1b5e20 !important;
}
ul.farmer-show-side-nav.nav-pills > li.active > a,
ul.farmer-show-side-nav.nav-pills > li.active > a:hover,
ul.farmer-show-side-nav.nav-pills > li.active > a:focus {
	background: linear-gradient(180deg, #43a047 0%, #2e7d32 100%) !important;
	border-color: transparent !important;
	color: #fff !important;
	font-weight: 600;
	box-shadow: none;
}
ul.farmer-show-side-nav.nav-pills > li > a .fa {
	margin-right: 10px;
	min-width: 20px;
	text-align: center;
	font-size: 14px;
	opacity: 0.92;
}
ul.farmer-show-side-nav.nav-pills > li.active > a .fa {
	opacity: 1;
}
.farmer-show-tab-panel-wrap {
	min-height: 280px;
}
.farmer-record-history-title {
	font-size: 16px;
	font-weight: 700;
	color: #333;
	margin: 8px 0 16px;
}
hr.farmer-profile-audit-sep {
	margin: 24px 0 16px;
}

/* -------------------------------------------------------------------------
   Show pages — compact status chips (replaces full-width flash/alert rows)
   ------------------------------------------------------------------------- */
.show-status-chips {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 10px;
	margin: 0 0 14px;
}
.farmer-profile-alerts.show-status-chips,
.farmer-profile-alerts .show-status-chips {
	margin-bottom: 14px;
}
.show-status-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	max-width: 100%;
	padding: 6px 10px 6px 8px;
	border-radius: 999px;
	border: 1px solid transparent;
	font-size: 13px;
	line-height: 1.35;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.show-status-chip__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	flex-shrink: 0;
	font-size: 12px;
}
.show-status-chip__body {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 6px;
	min-width: 0;
}
.show-status-chip__label {
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	opacity: 0.85;
}
.show-status-chip__value {
	font-weight: 600;
	color: inherit;
}
.show-status-chip__value a {
	font-weight: 600;
	text-decoration: underline;
}
.show-status-chip__dismiss {
	flex-shrink: 0;
	margin: 0 0 0 2px;
	padding: 0 4px;
	border: none;
	background: transparent;
	font-size: 16px;
	line-height: 1;
	opacity: 0.55;
	cursor: pointer;
	color: inherit;
}
.show-status-chip__dismiss:hover {
	opacity: 0.9;
}
.show-status-chip--info {
	background: #e8f4fc;
	border-color: #b8daef;
	color: #1a4d6e;
}
.show-status-chip--info .show-status-chip__icon {
	background: #d0e8f7;
	color: #1565a8;
}
.show-status-chip--success {
	background: #e8f5e9;
	border-color: #c8e6c9;
	color: #1b5e20;
}
.show-status-chip--success .show-status-chip__icon {
	background: #c8e6c9;
	color: #2e7d32;
}
.show-status-chip--warning {
	background: #fff8e1;
	border-color: #ffe082;
	color: #6d4c00;
}
.show-status-chip--warning .show-status-chip__icon {
	background: #ffecb3;
	color: #f57f17;
}
.show-status-chip--danger {
	background: #ffebee;
	border-color: #ffcdd2;
	color: #b71c1c;
}
.show-status-chip--danger .show-status-chip__icon {
	background: #ffcdd2;
	color: #c62828;
}
.global-flash-status-chips {
	padding: 10px 0 0;
}
.global-flash-status-chips .show-status-chips {
	margin-bottom: 0;
}
@media (min-width: 992px) {
	.farmer-show-sidebar {
		position: sticky;
		top: 12px;
		max-height: calc(100vh - 100px);
		overflow-y: auto;
	}
}

/* -------------------------------------------------------------------------
   Legacy show pages — col-md-3 + nav-stacked tabs (mobile horizontal scroll)
   ------------------------------------------------------------------------- */
@media (max-width: 991px) {
	.scaffold-show ul.nav.nav-pills.nav-stacked[role="tablist"]:not(.farmer-show-side-nav):not(.dv-layer-menu) {
		display: flex;
		flex-direction: row;
		flex-wrap: nowrap;
		overflow-x: auto;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
		scroll-snap-type: x proximity;
		scrollbar-width: thin;
		gap: 4px;
		padding: 6px 8px 10px;
		margin: 0 0 12px;
		position: sticky;
		top: 0;
		z-index: 99;
		background: #fff;
		border-bottom: 1px solid #e8ece8;
		box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
	}
	.scaffold-show ul.nav.nav-pills.nav-stacked[role="tablist"]:not(.farmer-show-side-nav):not(.dv-layer-menu) > li {
		flex: 0 0 auto;
		float: none;
		scroll-snap-align: start;
	}
	.scaffold-show ul.nav.nav-pills.nav-stacked[role="tablist"]:not(.farmer-show-side-nav):not(.dv-layer-menu) > li > a {
		padding: 8px 14px;
		margin: 0;
		white-space: nowrap;
		border-radius: 20px;
	}
}

/* Profile detail cards — compact label/value rows on mobile (all show pages) */
@media (max-width: 991px) {
	.farmer-profile-section .info-row {
		flex-direction: row;
		align-items: baseline;
		gap: 4px 8px;
		padding: 5px 10px;
	}
	.farmer-profile-section .info-label {
		flex: 0 0 38%;
		min-width: 0;
		font-size: 10px;
	}
	.farmer-profile-section .info-value {
		flex: 1 1 58%;
		min-width: 0;
		font-size: 12px;
		word-break: break-word;
	}
	.farmer-profile-header {
		padding: 14px 16px;
		margin-bottom: 14px;
	}
	.farmer-profile-actions .btn {
		font-size: 12px;
		padding: 6px 10px;
	}
	.ug-info-row {
		flex-direction: row;
		align-items: baseline;
		gap: 4px 8px;
	}
	.ug-info-row .ug-info-value {
		text-align: right;
		font-style: normal;
	}
}

/* Data visualization — layer / chart side menus */
@media (max-width: 991px) {
	.dv-sidebar {
		position: sticky;
		top: 0;
		z-index: 100;
		background: #fff;
	}
	.dv-sidebar .dv-sidebar-title {
		padding: 10px 12px 4px;
	}
	ul.dv-layer-menu.nav-pills {
		display: flex;
		flex-direction: row;
		flex-wrap: nowrap;
		overflow-x: auto;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
		scroll-snap-type: x proximity;
		scrollbar-width: thin;
		gap: 4px;
		padding: 4px 8px 10px;
		margin: 0;
	}
	ul.dv-layer-menu.nav-pills > li {
		flex: 0 0 auto;
		float: none;
		scroll-snap-align: start;
	}
	ul.dv-layer-menu.nav-pills > li.dv-group-label {
		align-self: center;
		padding: 4px 8px;
		font-size: 10px;
		white-space: nowrap;
	}
	ul.dv-layer-menu.nav-pills > li > a {
		padding: 8px 12px;
		white-space: nowrap;
		border-radius: 20px;
	}
}

/* -------------------------------------------------------------------------
   Mobile-friendly tables — horizontal scroll, DataTables toolbar stack
   ------------------------------------------------------------------------- */
.baims-table-scroll,
.table-responsive.baims-table-scroll {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin-bottom: 1rem;
}
.baims-dt-mobile-scroll {
	width: 100%;
	max-width: 100%;
}
.commodity-view-list-wrap.baims-table-scroll,
#farmerCommoditiesListWrap,
#farmerFarmsListWrap,
#farmerAttachmentsListWrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}
@media (max-width: 991px) {
	.baims-dt-mobile-scroll {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		margin-bottom: 1rem;
	}
	.baims-table-scroll > table.table,
	.baims-dt-mobile-scroll table.dataTable {
		margin-bottom: 0;
	}
	.baims-table-scroll > table.table {
		min-width: 520px;
	}
	/* DataTables controls: stack length / buttons / filter */
	.dataTables_wrapper > .row {
		margin-left: 0;
		margin-right: 0;
	}
	.dataTables_wrapper > .row:first-child > [class*="col-"],
	.dataTables_wrapper > .row:last-child > [class*="col-"] {
		width: 100%;
		float: none;
		text-align: left !important;
		margin-bottom: 10px;
	}
	.dataTables_wrapper .dataTables_length,
	.dataTables_wrapper .dataTables_filter,
	.dataTables_wrapper .dataTables_info,
	.dataTables_wrapper .dataTables_paginate {
		text-align: left;
		float: none;
	}
	.dataTables_wrapper .dataTables_filter input {
		width: 100%;
		max-width: 100%;
		margin-left: 0;
		display: block;
	}
	.dataTables_wrapper .dt-buttons {
		text-align: left;
		float: none;
	}
	.dataTables_wrapper .dt-buttons .btn {
		margin: 0 6px 6px 0;
	}
	/* Permission matrices (user / user group) */
	#userGroupRoles,
	#roleTable {
		min-width: 640px;
	}
	/* Long text in inspection / journal cells */
	.scaffold-show table.table td.question,
	.scaffold-show table.table td {
		word-break: break-word;
	}
	.tab-pane table.table thead th {
		white-space: nowrap;
	}
}

/* -------------------------------------------------------------------------
   Registry / dashboard overview pages — card KPIs, panels, tables (Cost-of-
   production style: pastel header band, centered value, white cards on gray)
   ------------------------------------------------------------------------- */
.overview-dashboard {
	background: #f5f7fa;
	padding: 16px 20px 32px;
	border-radius: 0;
}
.overview-dashboard .dash-header-actions .btn {
	margin-left: 6px;
}
.overview-dashboard .overview-page-head h2,
.overview-dashboard .overview-page-head h3 {
	font-size: 24px;
	font-weight: 700;
	letter-spacing: -0.02em;
}
.overview-dashboard .overview-page-head .text-muted {
	font-size: 14px;
}

/* KPI tiles — pastel card, white badge + icon, title row, nested white panel (value + foot) */
.dash-kpi {
	position: relative;
	border-radius: 12px;
	overflow: hidden;
	margin-bottom: 20px;
	padding: 12px 12px 12px;
	color: #1a202c;
	box-shadow: 0 2px 10px rgba(15, 23, 42, 0.07);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.kpi-green.dash-kpi {
	background: linear-gradient(165deg, #e8f5e9 0%, #d4edd9 55%, #cfead6 100%);
}
.kpi-orange.dash-kpi {
	background: linear-gradient(165deg, #fff8e8 0%, #ffefd5 55%, #ffe8c8 100%);
}
.kpi-red.dash-kpi {
	background: linear-gradient(165deg, #fce8ec 0%, #f8dce3 55%, #f5d0dc 100%);
}
.kpi-purple.dash-kpi {
	background: linear-gradient(165deg, #f3e8f7 0%, #ead8f2 55%, #e5cef0 100%);
}
/* Main dashboard Quick Stats — one consistent theme (same palette as kpi-green) */
.kpi-dashboard.dash-kpi {
	background: linear-gradient(165deg, #e8f5e9 0%, #d4edd9 55%, #cfead6 100%);
}
.kpi-dashboard .dash-kpi-icon-badge .ico {
	color: #2e7d32;
}
.dash-kpi-head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 2px 4px 12px;
	min-height: 40px;
	background: transparent;
}
.dash-kpi-icon-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 1px 4px rgba(15, 23, 42, 0.1);
	flex-shrink: 0;
}
.dash-kpi-icon-badge .ico {
	font-size: 17px;
	line-height: 1;
}
.kpi-green .dash-kpi-icon-badge .ico {
	color: #2e7d32;
}
.kpi-orange .dash-kpi-icon-badge .ico {
	color: #e65100;
}
.kpi-red .dash-kpi-icon-badge .ico {
	color: #c62828;
}
.kpi-purple .dash-kpi-icon-badge .ico {
	color: #7b1fa2;
}
.dash-kpi-title {
	font-size: 13px;
	font-weight: 600;
	color: #1e293b;
	line-height: 1.35;
	flex: 1;
	text-align: left;
}
/* Legacy: title lived in .sub inside head */
.dash-kpi-head .sub {
	margin: 0;
	font-size: 13px;
	font-weight: 600;
	color: #1e293b;
	line-height: 1.35;
	flex: 1;
}
.dash-kpi-panel,
.dash-kpi-body {
	background: #fff;
	border-radius: 10px;
	padding: 14px 16px 16px;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
	text-align: left;
}
.dash-kpi-panel h2,
.dash-kpi-body h2 {
	margin: 0 0 8px;
	font-size: 28px;
	font-weight: 700;
	color: #0f172a;
	line-height: 1.15;
	letter-spacing: -0.02em;
}
.dash-kpi-panel h2 .dash-kpi-total,
.dash-kpi-body h2 .dash-kpi-total {
	font-size: 0.55em;
	font-weight: 600;
	color: #64748b;
}
.dash-kpi-foot {
	margin: 0;
	font-size: 12px;
	font-weight: 400;
	color: #64748b;
	line-height: 1.4;
}
a.dashboard-stat-tile {
	display: block;
	color: inherit;
	text-decoration: none;
}
a.dashboard-stat-tile.desk-stat-tile:hover,
a.dashboard-stat-tile.desk-stat-tile:focus {
	box-shadow: 0 6px 16px rgba(15, 23, 42, 0.1);
	transform: translateY(-2px);
}
a.dashboard-stat-tile:focus {
	outline: none;
}
.dashboard-quick-stats [class*="col-"] {
	padding-left: 14px;
	padding-right: 14px;
}
.dashboard-quick-stats .desk-stat-tile {
	margin-bottom: 18px;
}

/* Dashboard top row: Work Desk | Quick Stats side by side */
.dashboard-kpi-columns {
	margin-bottom: 8px;
}

.dashboard-kpi-column {
	padding-top: 4px;
	padding-bottom: 4px;
}

@media (min-width: 992px) {
	.dashboard-kpi-columns .dashboard-kpi-column--workdesk + .dashboard-kpi-column--quickstats {
		border-left: 1px solid #edf0f4;
	}
}

@media (max-width: 991px) {
	.dashboard-kpi-column--quickstats {
		border-top: 1px solid #edf0f4;
		margin-top: 12px;
		padding-top: 20px;
	}
}

.dashboard-kpi-column--compact {
	padding-left: 18px;
	padding-right: 18px;
}

.dashboard-kpi-column--compact .dashboard-kpi-column-head-bar {
	justify-content: center;
	text-align: center;
	width: 100%;
}

.dashboard-kpi-column--compact .dashboard-kpi-column-title {
	width: 100%;
	text-align: center;
}

.dashboard-kpi-column--compact .dashboard-kpi-column-tiles {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	margin-left: 0;
	margin-right: 0;
	width: 100%;
}

.dashboard-kpi-column--compact .dashboard-kpi-column-tiles > [class*="col-"] {
	padding-left: 8px;
	padding-right: 8px;
}

.dashboard-kpi-column-tiles {
	margin-bottom: 0;
}

.dashboard-kpi-column-tiles > [class*="col-"] {
	display: flex;
	flex-direction: column;
}

.dashboard-kpi-column-head-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 12px;
	margin-bottom: 12px;
	min-height: 32px;
}

.dashboard-kpi-column-head-bar--centered {
	justify-content: center;
}

.dashboard-kpi-column-title {
	font-size: 24px;
	font-weight: 700;
	letter-spacing: -0.02em;
}

.dashboard-kpi-column-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	justify-content: center;
	flex-shrink: 0;
}

@media (min-width: 768px) {
	.dashboard-kpi-column-head-bar:not(.dashboard-kpi-column-head-bar--centered) .dashboard-kpi-column-actions {
		justify-content: flex-end;
		margin-left: auto;
	}
}

.dashboard-kpi-column--compact .desk-stat-tile-inner {
	min-height: 108px;
	padding: 12px 14px;
	gap: 10px;
}

.dashboard-kpi-column--compact .desk-stat-tile-value {
	font-size: 26px;
}

.dashboard-kpi-column--compact .desk-stat-tile-label {
	font-size: 12px;
}

.dashboard-kpi-column--compact .desk-stat-tile-hint {
	font-size: 11px;
	line-height: 1.35;
	margin-bottom: 0;
}

.dashboard-kpi-column--compact .desk-stat-tile-icon {
	width: 40px;
	height: 40px;
	font-size: 18px;
}

.dashboard-kpi-column--compact .desk-stat-tile {
	margin-bottom: 14px;
}

.dashboard-workdesk-actions-col {
	justify-content: center;
}

.dashboard-workdesk-actions-slot {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 10px;
	flex: 1;
	width: 100%;
	min-height: 108px;
	margin-bottom: 14px;
	padding: 4px 0;
}

.dashboard-kpi-column--compact .dashboard-workdesk-actions-slot {
	min-height: 108px;
}

.dashboard-workdesk-actions-slot .btn {
	font-size: 13px;
	font-weight: 600;
	padding: 10px 14px;
	border-radius: 8px;
	line-height: 1.35;
	white-space: normal;
}

.dashboard-workdesk-actions-slot .btn .fa {
	opacity: 0.9;
}

.dashboard-workdesk-actions-slot .btn.dashboard-workdesk-cta {
	background: linear-gradient(180deg, #f57c00 0%, #e65100 100%);
	border-color: #bf360c;
	color: #fff;
	box-shadow: 0 2px 8px rgba(230, 81, 0, 0.35);
}

.dashboard-workdesk-actions-slot .btn.dashboard-workdesk-cta:hover,
.dashboard-workdesk-actions-slot .btn.dashboard-workdesk-cta:focus {
	background: linear-gradient(180deg, #ef6c00 0%, #d84315 100%);
	border-color: #bf360c;
	color: #fff;
	box-shadow: 0 4px 12px rgba(230, 81, 0, 0.45);
}

/* Content cards (Recent records, distribution) */
.overview-dashboard .hpanel {
	border-radius: 10px;
	border: 1px solid #e2e8f0;
	box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
	background: #fff;
	overflow: hidden;
	margin-bottom: 20px;
}
.overview-dashboard .hpanel .panel-heading {
	padding: 14px 18px;
	font-size: 15px;
	font-weight: 600;
	color: #1e293b;
	background: #fafbfc;
	border-bottom: 1px solid #edf0f4;
}
.overview-dashboard .hpanel .panel-heading .fa {
	margin-right: 8px;
	opacity: 0.85;
	color: #475569;
}
.overview-dashboard .hpanel .table {
	margin-bottom: 0;
}
.overview-dashboard .hpanel .table thead > tr > th {
	border-bottom: 1px solid #e2e8f0;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #64748b;
	font-weight: 600;
	background: #fafbfc;
}
.overview-dashboard .hpanel .table > tbody > tr > td {
	border-top-color: #f1f5f9;
	vertical-align: middle;
}

/* Mini bar next to % in distribution tables */
.overview-pct-cell {
	white-space: nowrap;
	text-align: right;
}
.overview-pct-cell .overview-pct-bar-wrap {
	display: inline-block;
	vertical-align: middle;
	width: 56px;
	height: 6px;
	background: #e2e8f0;
	border-radius: 4px;
	overflow: hidden;
	margin-right: 8px;
}
.overview-pct-cell .overview-pct-bar {
	display: block;
	height: 100%;
	background: linear-gradient(90deg, #43a047, #81c784);
	border-radius: 4px;
	min-width: 2px;
}

/* Settlement registry hub tiles (overview) */
.overview-dashboard .settlement-hub-row {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 16px;
}
.overview-dashboard .settlement-hub-row .settlement-hub-tile {
	flex: 1 1 0;
	min-width: 200px;
	text-align: center;
	margin-bottom: 0;
}
.overview-dashboard .settlement-hub-row .settlement-hub-tile .btn {
	min-height: 120px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding-top: 1.25rem;
	padding-bottom: 1.25rem;
	border-radius: 10px;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

/* Farmer / Farm create-edit — two-column card layout */
.farmer-create-page,
.farm-create-page,
.commodity-create-page {
	background: #f5f7fa;
	padding: 20px 0 40px;
}
/* Page header — title, subtitle, actions (matches registry “register” reference) */
.registry-create-header {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px;
	margin-bottom: 24px;
}
.registry-create-title {
	font-size: 26px;
	font-weight: 700;
	color: #0f172a;
	margin: 0;
	letter-spacing: -0.02em;
	line-height: 1.2;
}
.registry-create-subtitle {
	font-size: 14px;
	color: #64748b;
	margin: 8px 0 0;
	line-height: 1.45;
	max-width: 560px;
}
.registry-create-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}
.registry-create-actions .btn {
	border-radius: 8px;
	font-weight: 600;
	padding: 8px 16px;
	border: 1px solid #cbd5e1;
	background: #fff;
	color: #334155;
}
.registry-create-actions .btn:hover {
	background: #f8fafc;
	border-color: #94a3b8;
	color: #1e293b;
}
/* Section cards — icon + title + optional help, description on right */
/* overflow: visible so Chosen / Select2 dropdowns are not clipped at card edges */
/* No default z-index here — avoids creating stacking contexts that interfere with other UI */
.registry-form-section {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
	margin-bottom: 20px;
	overflow: visible;
	position: relative;
}
/* Lift only the card that has an open select, above sibling cards (modest values; do not use 10k+) */
.registry-form-section:has(.chosen-container-active),
.registry-form-section:has(.select2-container--open) {
	z-index: 10;
}
.registry-form-section-head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-start;
	gap: 12px 20px;
	padding: 16px 20px;
	border-bottom: 1px solid #f1f5f9;
	background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
	border-radius: 10px 10px 0 0;
}
.registry-form-section-head-main {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	min-width: 0;
}
.registry-form-section-ico {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 10px;
	background: #ecfdf5;
	color: #059669;
	font-size: 17px;
	flex-shrink: 0;
}
.registry-form-section-title {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: #1e293b;
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	line-height: 1.3;
}
.registry-form-help {
	color: #94a3b8;
	font-size: 15px;
	font-weight: 400;
	cursor: help;
}
.registry-form-section-desc {
	margin: 0;
	font-size: 12px;
	color: #64748b;
	line-height: 1.45;
	flex: 1 1 220px;
	text-align: right;
	max-width: 440px;
	align-self: center;
}
@media (max-width: 767px) {
	.registry-form-section-desc {
		text-align: left;
		max-width: none;
		align-self: flex-start;
	}
}
.registry-form-section-body {
	padding: 18px 20px 22px;
	border-radius: 0 0 10px 10px;
	overflow: visible;
}
/* Chosen / Select2: only inside .registry-form-section on these pages (not every select in the app) */
.farmer-create-page .registry-form-section .chosen-container .chosen-drop,
.farm-create-page .registry-form-section .chosen-container .chosen-drop,
.commodity-create-page .registry-form-section .chosen-container .chosen-drop,
.farmer-create-page .registry-form-section .select2-container--open .select2-dropdown,
.farm-create-page .registry-form-section .select2-container--open .select2-dropdown,
.commodity-create-page .registry-form-section .select2-container--open .select2-dropdown {
	z-index: 1020;
}
.farmer-create-page-title,
.farm-create-page-title,
.commodity-create-page-title {
	font-size: 24px;
	font-weight: 700;
	color: #1e293b;
	margin: 0 0 20px;
	letter-spacing: -0.02em;
}
.farmer-create-layout > .row {
	margin-left: -8px;
	margin-right: -8px;
}
.farmer-create-layout > .row > [class*="col-"] {
	padding-left: 8px;
	padding-right: 8px;
}
/* Two columns side-by-side (md+; flex overrides BS3 floats) */
@media (min-width: 768px) {
	.farmer-create-layout > .row {
		display: flex;
		flex-wrap: nowrap;
		align-items: flex-start;
	}
	.farmer-create-layout > .row > [class*="col-"] {
		float: none;
	}
}
.farmer-create-card {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
	padding: 20px 22px 22px;
	margin-bottom: 18px;
}
.farmer-create-col-side .farmer-create-card {
	margin-bottom: 0;
}
.farmer-create-card-title {
	font-size: 13px;
	font-weight: 600;
	color: #475569;
	margin: 20px 0 12px;
	padding-bottom: 8px;
	border-bottom: 1px solid #f1f5f9;
	text-transform: none;
	letter-spacing: 0;
}
.farmer-create-card-title:first-child {
	margin-top: 0;
}
.farmer-form-two-col.farmer-create-layout .form-group,
.farmer-create-card .form-group,
.registry-form-section-body .form-group {
	margin-bottom: 14px;
}
/* Farm create: stack district + farmer pickers (horizontal field templates) vertically */
.farmer-create-layout .farm-farmer-picker .form-group.row {
	margin-left: 0;
	margin-right: 0;
}
.farmer-create-layout .farm-farmer-picker .form-group.row .control-label {
	width: 100%;
	float: none;
	text-align: left;
	padding-top: 0;
	margin-bottom: 4px;
}
.farmer-create-layout .farm-farmer-picker .form-group.row > [class*="col-"] {
	width: 100%;
	float: none;
	padding-left: 0;
	padding-right: 0;
}
.farmer-create-layout .commodity-flags .form-group.row {
	margin-left: 0;
	margin-right: 0;
}
.farmer-create-layout .commodity-flags .form-group.row .control-label {
	width: 100%;
	float: none;
	text-align: left;
	padding-top: 0;
	margin-bottom: 4px;
}
.farmer-create-layout .commodity-flags .form-group.row > [class*="col-"] {
	width: 100%;
	float: none;
	padding-left: 0;
	padding-right: 0;
}
.farmer-form-two-col.farmer-create-layout .control-label {
	display: block;
	width: 100%;
	text-align: left;
	font-weight: 600;
	font-size: 12px;
	color: #334155;
	margin-bottom: 4px;
	padding-top: 0;
}
.farmer-form-two-col.farmer-create-layout .form-control {
	width: 100%;
	border-radius: 6px;
	border-color: #cbd5e1;
}
.farmer-create-card textarea.form-control,
.registry-form-section-body textarea.form-control {
	min-height: 100px;
}
.farm-create-map-area {
	min-height: 280px;
	width: 100%;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	background: #f8fafc;
}
.farmer-create-footer {
	margin-top: 24px;
	padding: 20px 0 8px;
	clear: both;
	text-align: center;
}
/* Create + Cancel: identical footprint (primary was wider/taller than default before) */
.farmer-create-footer .btn {
	font-weight: 600;
	padding: 10px 28px;
	min-width: 140px;
	border-radius: 8px;
	box-sizing: border-box;
	vertical-align: middle;
	line-height: 1.35;
}
.farmer-create-footer .btn + .btn {
	margin-left: 10px;
}

/* Commodity index — same shell as farmer list (plain container-fluid + hpanel); page-specific layout in commodity/index.gsp */
.commodity-index-page {
	padding-bottom: 24px;
}

/* Commodity tree — slide-out drawer (full-width list; tree on demand) */
body.commodity-drawer-open {
	overflow: hidden;
}
.commodity-tree-drawer {
	position: fixed;
	inset: 0;
	z-index: 1050;
	pointer-events: none;
	visibility: hidden;
	transition: visibility 0.25s;
}
.commodity-tree-drawer.is-open {
	pointer-events: auto;
	visibility: visible;
}
.commodity-tree-drawer-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.45);
	opacity: 0;
	transition: opacity 0.25s ease;
}
.commodity-tree-drawer.is-open .commodity-tree-drawer-backdrop {
	opacity: 1;
}
.commodity-tree-drawer-panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(440px, 94vw);
	max-width: 100%;
	background: #fff;
	box-shadow: -8px 0 32px rgba(15, 23, 42, 0.18);
	transform: translateX(100%);
	transition: transform 0.28s ease;
	display: flex;
	flex-direction: column;
	text-align: left;
	border-left: 1px solid #e2e8f0;
}
.commodity-tree-drawer.is-open .commodity-tree-drawer-panel {
	transform: translateX(0);
}
.commodity-tree-drawer-header {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 16px;
	border-bottom: 1px solid #edf0f4;
	background: #fafbfc;
}
.commodity-tree-drawer-title {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	color: #1e293b;
}
.commodity-tree-drawer-title .fa {
	margin-right: 8px;
	color: #2e7d32;
}
.commodity-tree-drawer-close {
	margin-top: 0;
	opacity: 0.65;
	font-size: 22px;
	font-weight: 300;
	line-height: 1;
	padding: 4px 8px;
}
.commodity-tree-drawer-body {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 12px 16px 20px;
	-webkit-overflow-scrolling: touch;
}
.commodity-tree-drawer-hint {
	margin-bottom: 10px;
	line-height: 1.4;
}
.commodity-tree-drawer-tree {
	min-height: 200px;
}
.commodity-index-page #commodityTreeDrawer .jstree-anchor {
	text-decoration: none;
}

