/* ============================================================
 * fanelbossdashboard - Mali Inventory & Financial Analysis module
 * ============================================================ */

/* In the Eldy theme, #id-container has display:table + table-layout:fixed and no width.
   Wide tables enlarge the container and overflow the page; we fix the width module-wide
   so wide tables stay in their own scroll containers (div-table-responsive). */
body.mod-fanelbossdashboard #id-container {
	width: 100%;
	max-width: 100%;
}
/* Since #id-right is display:table-cell + width:100%, with the left menu (.side-nav)
   the total width is 100%+menu and overflows the page. The container is set to block
   and the left menu is floated, #id-right sits next to the menu using BFC (overflow:hidden)
   and takes the remaining width automatically (Dolibarr classforhorizontalscrolloftabs approach). */
body.mod-fanelbossdashboard #id-container {
	display: block;
	width: 100%;
	max-width: 100%;
}
body.mod-fanelbossdashboard .side-nav {
	display: block;
	float: left;
}
body.mod-fanelbossdashboard #id-right {
	display: block;
	overflow: hidden;
	width: auto;
	max-width: 100%;
}
div.mainmenu.fanelbossdashboard {
  /* background-image: url(/custom/fanelbossdashboard/img/fanelbossdashboard.png);  */
background-image: url('https://erp.ygm.com.tr/htdocs/custom/fanelbossdashboard/img/dashboard32.png');
  background-position-y: 3px;
  filter: saturate(0);
}
/* Top horizontal scrollbar synchronized with the wide calendar table below it */
.trend-scroll-top {
	overflow-x: auto;
	overflow-y: hidden;
	max-width: 100%;
}
.trend-scroll-top-inner {
	height: 1px;
	width: 100%;
}
.trend-scroll-top::-webkit-scrollbar {
	height: 10px;
}
.trend-scroll-top::-webkit-scrollbar-thumb {
	background: #ccc;
	border-radius: 5px;
}
/* Side-by-side panels (Income statement + Cash flow) that wrap on narrow screens.
   align-items: stretch keeps the panels the same height, so the inner boxes
   (e.g. the Business Health Score card) fill the full column. */
.trend-panel-row {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: stretch;
	width: 100%;
}
.trend-panel {
	flex: 1 1 340px;
	min-width: 0;
}
.trend-panel .div-table-responsive-no-min table {
	table-layout: fixed;
}
/* Tabbed detail panels (Customer 360, Dead Stock, Dormant Stock) */
.c360-tabs {
	list-style: none;
	margin: 0 0 12px 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	border-bottom: 2px solid #e0e0e0;
}
.c360-tabs li {
	cursor: pointer;
	padding: 8px 16px;
	border: 1px solid #d5d5d5;
	border-bottom: none;
	border-radius: 4px 4px 0 0;
	background: #f6f6f6;
	color: #555;
	font-size: 12px;
	font-weight: 600;
	user-select: none;
}
.c360-tabs li:hover {
	background: #ececec;
}
.c360-tabs li.active {
	background: #fff;
	color: #1b6ac9;
	border-color: #1b6ac9 #1b6ac9 #fff #1b6ac9;
	margin-bottom: -2px;
}
.c360-panel {
	padding: 4px 0;
}
body.page-customer-360 .c360-tabs li.active,
body.page-dead-stock .c360-tabs li.active,
body.page-dormant-stock .c360-tabs li.active {
	border-color: #1b6ac9 #1b6ac9 #fff #1b6ac9;
}
/* Advanced hub: responsive card grid - cards stretch to fill the full width
   (auto-fit + 1fr), so the last row expands too and leaves no gap */
.adv-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 14px;
}
.adv-card {
	min-width: 0;
	border: 1px solid #dcdcdc;
	border-radius: 10px;
	padding: 14px 16px;
	background: #fff;
	transition: box-shadow 0.15s ease, transform 0.15s ease;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.adv-card:hover {
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
	transform: translateY(-2px);
}
.adv-card a.adv-link {
	text-decoration: none;
	color: inherit;
	display: flex;
	flex-direction: column;
	gap: 10px;
	height: 100%;
}
.adv-head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: -14px -16px 10px;
	padding: 14px 16px;
	border-radius: 10px 10px 0 0;
	color: #fff;
}
.adv-icon {
	width: 36px;
	height: 36px;
	border-radius: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.22);
	color: #fff;
	font-size: 16px;
	flex: 0 0 36px;
}
.adv-title {
	font-weight: 700;
	font-size: 13px;
	color: #fff;
}
.adv-desc {
	font-size: 12px;
	color: #556a82;
	line-height: 1.45;
}
.adv-open {
	font-size: 11px;
	font-weight: 600;
	color: #1b6ac9;
	margin-top: auto;
}
/* Graphic dashboard: chart boxes stay visible even with no data.
   A light border/background keeps the "empty" chart area clearly visible
   until the user enters the period containing data. */
.graphicchartbox {
	position: relative;
	border: 1px solid #e2e2e2;
	border-radius: 6px;
	background: #fafafa;
	padding: 6px;
	overflow: hidden;
}
.graphicchartbox canvas {
	width: 100% !important;
	height: 100% !important;
}
.graphic-empty-note {
	color: #999;
	font-size: 11px;
	text-align: center;
	padding: 6px 0 2px;
}
/* Graphic dashboard: sticky filter panel (header + body) */
.fanel-filter-panel {
	position: sticky;
	top: 80px;
	z-index: 120;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 10px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
	margin: 6px 0 14px;
	overflow: hidden;
}
.fanel-filter-head {
	display: flex;
	align-items: center;
	gap: 7px;
	font-weight: 700;
	font-size: 12px;
	color: #1b6ac9;
	padding: 8px 12px;
	background: #f4f8fc;
	border-bottom: 1px solid #eef1f4;
}
.fanel-filter-body {
	padding: 8px 12px 10px;
}
.fanel-filter-table {
	margin: 0;
	width: 100%;
}
.fanel-filter-table td {
	padding: 3px 6px;
	vertical-align: middle;
}
.fanel-filter-table select,
.fanel-filter-table input[type="submit"] {
	margin: 0;
}
/* Graphic dashboard: left sticky group navigation (guide-side style, paging not anchors) */
.graph-layout {
	display: flex;
	align-items: flex-start;
	gap: 14px;
}
.fanel-graph-nav {
	flex: 0 0 225px;
	width: 225px;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 2px;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 10px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
	padding: 10px;
	font-size: 12px;
	z-index: 100;
}
.fanel-graph-nav-head {
	display: flex;
	align-items: center;
	gap: 7px;
	font-weight: 700;
	font-size: 12px;
	color: #1b6ac9;
	padding: 4px 6px 8px;
	border-bottom: 1px solid #eef1f4;
	margin-bottom: 4px;
}
.fanel-nav-btn {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	border: none;
	background: none;
	cursor: pointer;
	padding: 7px 10px;
	border-radius: 6px;
	color: #444;
	font-size: 12px;
	text-align: left;
	transition: background 0.12s ease;
	white-space: nowrap;
}
.fanel-nav-btn:hover {
	background: #eef3f8;
	color: #1b6ac9;
}
.fanel-nav-btn.active {
	background: #1b6ac9;
	color: #fff;
	font-weight: 600;
}
.fanel-nav-btn i {
	width: 16px;
	text-align: center;
}
.fanel-nav-sep {
	height: 1px;
	width: 100%;
	background: #e5e5e5;
	margin: 6px 0;
}
.graph-pages {
	flex: 1;
	min-width: 0;
}
/* Grup gecisinde aktif sayfa soldan kayarak + yumusak soluklasarak girsin */
@keyframes fanelSlideIn {
	from { opacity: 0; transform: translateX(14px); }
	to { opacity: 1; transform: translateX(0); }
}
.graph-page {
	animation: fanelSlideIn .28s ease-out;
}
@media (prefers-reduced-motion: reduce) {
	.graph-page { animation: none; }
}
@media (max-width: 1150px) {
	.graph-layout {
		flex-direction: column;
	}
	.fanel-graph-nav {
		position: static;
		flex: none;
		width: 100%;
		max-height: none;
		flex-direction: row;
		flex-wrap: wrap;
		align-items: center;
		gap: 4px;
	}
	.fanel-graph-nav-head {
		border-bottom: none;
		margin-bottom: 0;
		padding: 2px 8px 2px 2px;
	}
	.fanel-nav-btn {
		width: auto;
	}
	.fanel-nav-sep {
		width: 1px;
		height: 18px;
		margin: 0 6px;
	}
	.graph-pages {
		width: 100%;
	}
}