/* ===== DoliCRM Pro - premium CRM charter (blue / white / violet) ===== */
:root {
	--crm-blue: #2563eb;
	--crm-blue-d: #1e40af;
	--crm-violet: #7c5ce6;
	--crm-teal: #0ea5a4;
	--crm-bg: #f4f6fe;
	--crm-ink: #1f2740;
}

/* top main-menu icon */
#mainmenuspan_dolicrmpro,
div.mainmenu.dolicrmpro,
.mainmenu.dolicrmpro .tmenuimageforpng,
li#mainmenutd_dolicrmpro .tmenuimageforpng {
	background-image: url(../img/object_crmmenu.png) !important;
	background-repeat: no-repeat !important;
	background-position: center center !important;
	background-size: contain !important;
	min-width: 20px;
	min-height: 20px;
}
.menulogo-crm { vertical-align: middle; }

/* in-page navigation bar */
.crm-topbar {
	display: flex; flex-wrap: wrap; gap: 4px;
	background: linear-gradient(90deg, #eef2ff, #f1ecfd);
	border: 1px solid #dfe3f7; border-radius: 10px;
	padding: 6px; margin: 6px 0 14px 0;
}
.crm-tab {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 6px 12px; border-radius: 8px; font-size: 0.86em;
	color: var(--crm-ink); text-decoration: none; white-space: nowrap;
}
.crm-tab:hover { background: #ffffff; color: var(--crm-blue); }
.crm-tab .fas { color: var(--crm-blue); }
.crm-tab-active,
.crm-tab-active:link,
.crm-tab-active:visited,
.crm-tab-active:hover,
.crm-tab-active:focus { background: var(--crm-blue) !important; color: #fff !important; }
.crm-tab-active .fas { color: #fff !important; }

/* Custom object PNG: force small globally (filename is module-unique). */
img[src*="object_dolicrmpro"],
img[src*="object_crmmenu"] {
	width: 16px !important; height: 16px !important;
	max-width: 16px !important; max-height: 16px !important;
	min-width: 0 !important; object-fit: contain; vertical-align: middle;
}

/* dashboard hero */
.crm-dash-hero {
	background: linear-gradient(120deg, var(--crm-blue), var(--crm-violet));
	color: #fff; border-radius: 14px; padding: 18px 22px; margin-bottom: 16px;
	box-shadow: 0 8px 22px rgba(37,99,235,0.25);
}
.crm-dash-hero-title { font-size: 1.5em; font-weight: 700; }
.crm-dash-hero-title .fas { margin-right: 8px; }
.crm-dash-hero-sub { opacity: 0.92; margin-top: 4px; }

/* zone titles */
.crm-zone-title {
	font-size: 1.05em; font-weight: 700; color: var(--crm-ink);
	margin: 18px 0 10px 0; padding-bottom: 6px;
	border-bottom: 2px solid var(--crm-blue);
}
.crm-zone-title .fas { color: var(--crm-blue); margin-right: 6px; }
.crm-zone-alert { border-bottom-color: #d9534f; }
.crm-zone-alert .fas { color: #d9534f; }

/* KPI grid + cards */
.crm-kpi-grid {
	display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 12px; margin-bottom: 8px;
}
.crm-kpi {
	display: flex; align-items: center; gap: 12px;
	background: #fff; border: 1px solid #e6e9f7; border-radius: 12px;
	padding: 14px 16px; box-shadow: 0 2px 6px rgba(0,0,0,0.04);
	border-left: 5px solid var(--crm-blue);
}
.crm-kpi-icon {
	width: 46px; height: 46px; border-radius: 12px;
	display: flex; align-items: center; justify-content: center;
	background: var(--crm-bg); color: var(--crm-blue); font-size: 1.3em;
}
.crm-kpi-value { font-size: 1.45em; font-weight: 700; color: var(--crm-ink); line-height: 1.1; }
.crm-kpi-label { font-size: 0.82em; color: #6a728c; }
.crm-kpi-sub { font-size: 0.74em; color: #99a0b6; }
.crm-kpi-blue { border-left-color: var(--crm-blue); }
.crm-kpi-blue .crm-kpi-icon { color: var(--crm-blue); }
.crm-kpi-violet { border-left-color: var(--crm-violet); }
.crm-kpi-violet .crm-kpi-icon { color: var(--crm-violet); }
.crm-kpi-green { border-left-color: #22b07d; }
.crm-kpi-green .crm-kpi-icon { color: #22b07d; }
.crm-kpi-teal { border-left-color: var(--crm-teal); }
.crm-kpi-teal .crm-kpi-icon { color: var(--crm-teal); }
.crm-kpi-orange { border-left-color: #f0ad4e; }
.crm-kpi-orange .crm-kpi-icon { color: #f0ad4e; }
.crm-kpi-red { border-left-color: #d9534f; }
.crm-kpi-red .crm-kpi-icon { color: #d9534f; }
.crm-kpi-grey { border-left-color: #b7bdce; }
.crm-kpi-grey .crm-kpi-icon { color: #98a0b6; }

/* charts row */
.crm-chart-row { display: flex; flex-wrap: wrap; gap: 14px; }
.crm-chart-box {
	flex: 1 1 420px; background: #fff; border: 1px solid #e6e9f7;
	border-radius: 12px; padding: 12px;
}
.crm-empty { color: #99a0b6; display: flex; align-items: center; justify-content: center; min-height: 120px; }

/* alert / quick tiles */
.crm-alert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.crm-alert-tile { display: block; text-decoration: none; border-radius: 12px; padding: 16px; color: #fff; text-align: center; box-shadow: 0 3px 10px rgba(0,0,0,0.10); }
.crm-alert-count { font-size: 1.8em; font-weight: 800; }
.crm-alert-label { font-size: 0.85em; opacity: 0.95; }
.crm-alert-red { background: linear-gradient(135deg, #e25c54, #d9534f); }
.crm-alert-orange { background: linear-gradient(135deg, #f3b863, #f0ad4e); }
.crm-alert-blue { background: linear-gradient(135deg, #4f8bf0, #2563eb); }
.crm-alert-violet { background: linear-gradient(135deg, #9277ee, #7c5ce6); }
.crm-alert-green { background: linear-gradient(135deg, #34c08a, #22b07d); }

/* generic card */
.crm-card { background: #fff; border: 1px solid #e6e9f7; border-radius: 12px; padding: 16px 18px; margin-bottom: 14px; }
.crm-card h3 { margin-top: 0; color: var(--crm-ink); }
.crm-card h3 .fas { color: var(--crm-blue); margin-right: 6px; }

/* cockpit */
.crm-cockpit { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.crm-cockpit .crm-kpi { flex: 1 1 180px; }
.crm-related { margin-top: 14px; }

/* ===== Kanban pipeline board ===== */
.crm-kanban-hint { color: #6a728c; font-size: 0.85em; margin: 4px 0 12px 0; }
.crm-kanban { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; }
.crm-kcol { flex: 0 0 250px; background: #eef1fb; border: 1px solid #e0e4f4; border-radius: 12px; padding: 8px; min-height: 120px; }
.crm-kcol-head { display: flex; align-items: center; justify-content: space-between; font-weight: 700; color: var(--crm-ink); padding: 4px 6px 8px 6px; border-bottom: 2px solid var(--crm-blue); margin-bottom: 8px; }
.crm-kcol-count { background: var(--crm-blue); color: #fff; border-radius: 10px; padding: 1px 8px; font-size: 0.78em; }
.crm-kcol-total { font-size: 0.78em; color: #6a728c; font-weight: 600; padding: 0 6px 8px 6px; }
.crm-kcard { background: #fff; border: 1px solid #e6e9f7; border-left: 4px solid var(--crm-violet); border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; cursor: grab; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.crm-kcard:active { cursor: grabbing; }
.crm-kcard-title { font-weight: 600; color: var(--crm-ink); font-size: 0.9em; }
.crm-kcard-title a { color: var(--crm-ink); text-decoration: none; }
.crm-kcard-meta { font-size: 0.78em; color: #6a728c; margin-top: 4px; display: flex; justify-content: space-between; }
.crm-kcard-amount { font-weight: 700; color: var(--crm-blue); }
.crm-kcol.crm-drop-hover { background: #e0e7ff; outline: 2px dashed var(--crm-blue); }
.crm-kcol-won { border-color: #bfe7d4; }
.crm-kcol-won .crm-kcol-head { border-bottom-color: #22b07d; }
.crm-kcol-lost .crm-kcol-head { border-bottom-color: #d9534f; }

/* reporting */
.crm-report-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.crm-rt { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 8px; background: #fff; border: 1px solid #e6e9f7; text-decoration: none; color: var(--crm-ink); font-size: 0.84em; }
.crm-rt .fas { color: var(--crm-blue); }
.crm-rt-active,
.crm-rt-active:link,
.crm-rt-active:visited,
.crm-rt-active:hover,
.crm-rt-active:focus { background: var(--crm-blue) !important; color: #fff !important; }
.crm-rt-active .fas { color: #fff !important; }
.crm-export-bar { margin: 10px 0; }

/* compact list filter action row */
.crm-filter-actions { display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; }
.crm-filter-actions input[type=image] { width: 16px; height: 16px; }
.crm-colselect a, .crm-colselect button, .crm-colselect .button { padding: 1px 5px !important; font-size: .85em !important; }
td.maxwidthsearch { white-space: nowrap; width: 1%; }
tr.liste_titre_filter td { padding-top: 2px; padding-bottom: 2px; }

/* misc */
.crm-list { list-style: none; padding-left: 0; }
.crm-list li { padding: 6px 0; border-bottom: 1px dashed #e6e9f7; }
.crm-roadmap, .crm-about ul { list-style: none; padding-left: 0; }
.crm-roadmap li { padding: 5px 0; }
.crm-demo-box { background: var(--crm-bg); border: 1px dashed var(--crm-blue); border-radius: 12px; padding: 16px; }
.crm-demo-actions { margin: 10px 0; }
.crm-intro { color: #4a516a; max-width: 900px; line-height: 1.5; }

/* linked-records panel (cross-interface navigation) */
.crm-linked { margin-top: 14px; }
.crm-linkblock { background: #fff; border: 1px solid #e6e9f7; border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.crm-linkblock h4 { margin: 0 0 8px 0; color: var(--crm-ink); font-size: 0.95em; }
.crm-linkblock h4 .fas { color: var(--crm-blue); margin-right: 6px; }
.crm-linkblock .crm-linkcount { background: var(--crm-blue); color: #fff; border-radius: 10px; padding: 0 7px; font-size: 0.78em; margin-left: 6px; }
.crm-quickadd { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 14px 0; }

/* clean print output: hide chrome, keep the report table */
@media print {
	.crm-topbar, .crm-report-tabs, .crm-export-bar,
	.side-nav, #id-left, #id-top, .login_block, .tmenu, .vmenu,
	#tooltip, .butAction { display: none !important; }
	#id-right, .fiche, body { margin: 0 !important; }
	.crm-zone-title { border-color: #888 !important; }
	table.noborder, table.liste { width: 100% !important; }
}
