
/* ===== Employee Self Review – formal corporate styling inside Dolibarr ===== */

.er-shell {
	max-width: 920px;
	margin: 0 auto 2rem auto;
}

/* ---------- Hero banner ---------- */

.er-hero {
	background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 48%, #0c4a6e 100%);
	color: #f8fafc;
	border-radius: 4px;
	padding: 1.75rem 2rem;
	margin-bottom: 1.5rem;
	box-shadow: 0 4px 24px rgba(15, 23, 42, 0.25);
	border: 1px solid rgba(255, 255, 255, 0.08);
}

.er-hero h1 {
	margin: 0 0 0.35rem 0;
	font-size: 1.45rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.er-hero .er-sub {
	margin: 0;
	font-size: 0.95rem;
	opacity: 0.88;
	line-height: 1.5;
}

.er-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	margin-top: 1rem;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.er-meta span {
	border: 1px solid rgba(255, 255, 255, 0.25);
	padding: 0.35rem 0.65rem;
	border-radius: 2px;
}

/* ---------- Progress bar ---------- */

.er-progress-wrap {
	margin-bottom: 1.25rem;
}

.er-wizard-progress {
	margin-top: 0.25rem;
}

.er-step-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin: 0 0 1rem 0;
}

.er-step-pill {
	min-width: 2rem;
	height: 2rem;
	border-radius: 999px;
	border: 1px solid #cbd5e1;
	background: #ffffff;
	color: #475569;
	font-size: 0.78rem;
	font-weight: 600;
	cursor: pointer;
}

.er-step-pill.er-step-filled {
	background: #dcfce7;
	border-color: #22c55e;
	color: #166534;
}

.er-step-pill.er-step-pending {
	background: #fff7ed;
	border-color: #fdba74;
	color: #9a3412;
}

.er-step-pill.active {
	box-shadow: 0 0 0 2px rgba(12, 74, 110, 0.25);
	border-color: #0c4a6e;
	color: #0c4a6e;
}

.er-progress-label {
	font-size: 0.82rem;
	color: #475569;
	margin-bottom: 0.35rem;
	font-weight: 600;
}

.er-progress-bar {
	height: 8px;
	background: #e2e8f0;
	border-radius: 4px;
	overflow: hidden;
}

.er-progress-fill {
	height: 100%;
	background: linear-gradient(90deg, #0ea5e9, #0284c7);
	border-radius: 4px;
	transition: width 0.4s ease;
}

/* ---------- Question cards ---------- */

.er-card {
	background: #fff;
	border: 1px solid #cbd5e1;
	border-radius: 4px;
	padding: 1.25rem 1.5rem;
	margin-bottom: 1rem;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.er-section-card {
	border-left: 4px solid #0c4a6e;
	background: #f8fafc;
}

.er-card h3 {
	margin: 0 0 0.5rem 0;
	font-size: 1.05rem;
	color: #0f172a;
	font-weight: 600;
}

.er-qblock + .er-qblock {
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px dashed #cbd5e1;
}

.er-help {
	font-size: 0.88rem;
	color: #475569;
	margin: 0 0 0.75rem 0;
	line-height: 1.45;
}

.er-card .er-qnum {
	display: block;
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #64748b;
	margin-bottom: 0.25rem;
}

.er-required {
	color: #ef4444;
	font-weight: 700;
}

.er-readonly {
	background: #f1f5f9;
	border-color: #e2e8f0;
}

.er-readonly input,
.er-readonly textarea,
.er-readonly select {
	background: #f1f5f9;
	cursor: not-allowed;
}

/* Full-width textarea inside cards */
.er-textarea {
	width: 100%;
	box-sizing: border-box;
}

.er-check-row {
	padding: 0.15rem 0;
}

/* ---------- Actions ---------- */

.er-actions {
	margin-top: 1.5rem;
	padding-top: 1rem;
	border-top: 1px solid #e2e8f0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
}

.er-submit-btn {
	background: #0c4a6e !important;
	color: #fff !important;
	border-color: #0c4a6e !important;
	font-weight: 600;
}

.er-submit-btn:hover {
	background: #0e7490 !important;
	border-color: #0e7490 !important;
}

.er-wizard-actions {
	justify-content: flex-start;
}

/* ---------- Period selector ---------- */

.er-period-select {
	margin-bottom: 1.25rem;
	max-width: 520px;
}

/* ---------- Top menu icon ---------- */

div.mainmenu.employee_reviews::before {
	content: "\f007";
}

div.mainmenu.employee_reviews {
	background-image: none;
}

/* ---------- Admin tables ---------- */

.er-admin-table {
	width: 100%;
	border-collapse: collapse;
}

.er-admin-table th,
.er-admin-table td {
	border: 1px solid #e2e8f0;
	padding: 0.5rem 0.65rem;
	text-align: left;
}

.er-admin-table th {
	background: #f8fafc;
	font-weight: 600;
	font-size: 0.85rem;
}

.er-admin-table tr:hover td {
	background: #f8fafc;
}

.er-peer-scale {
	display: flex;
	flex-wrap: nowrap;
	gap: 0.25rem;
	white-space: nowrap;
	overflow-x: auto;
	padding-bottom: 2px;
}

.er-peer-chip {
	display: inline-flex;
	align-items: center;
}

.er-peer-chip input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.er-peer-chip span {
	display: inline-block;
	padding: 0.2rem 0.38rem;
	border: 1px solid #cbd5e1;
	border-radius: 14px;
	background: #ffffff;
	color: #334155;
	font-size: 0.74rem;
	line-height: 1.2;
	cursor: pointer;
	transition: all 0.15s ease;
}

.er-peer-chip input:checked + span {
	background: #0c4a6e;
	border-color: #0c4a6e;
	color: #ffffff;
	box-shadow: 0 1px 4px rgba(12, 74, 110, 0.3);
}

.er-readonly .er-peer-chip span {
	cursor: not-allowed;
}

.er-readonly .er-peer-chip input:checked + span {
	background: #64748b;
	border-color: #64748b;
}

.er-peer-comment {
	width: 100%;
	min-width: 320px;
	box-sizing: border-box;
	resize: vertical;
}

.er-empty-row td {
	text-align: center;
	color: #94a3b8;
	padding: 1.25rem;
	font-style: italic;
}

/* HR-only block on Submissions detail (not shown on employee form). */
.er-admin-only {
	border: 1px dashed #94a3b8;
	background: #f8fafc;
	margin-top: 1.5rem;
}

.er-mgmt-section {
	border-left: 4px solid #0ea5e9;
}

.er-attendance-table {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.35rem;
	margin: 0.5rem 0 1rem 0;
}

.er-attendance-row {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0.5rem 1rem;
	padding: 0.35rem 0.5rem;
	border: 1px solid #e2e8f0;
	background: #f8fafc;
}

.er-payroll-matrix-title {
	margin: 1.25rem 0 0.5rem 0;
	font-size: 1rem;
	font-weight: 600;
	color: #0f172a;
}

.er-matrix-rank-row td {
	font-size: 0.8rem;
	vertical-align: middle;
}

.er-matrix-rank-label {
	font-weight: 600;
	white-space: normal;
}

.er-matrix-rank-legend {
	margin-top: 0.5rem;
	margin-bottom: 0;
}

.er-matrix-rank-tip {
	cursor: help;
}

.er-payroll-neighbor-tip {
	position: fixed;
	z-index: 20020;
	max-width: 24rem;
	max-height: 70vh;
	overflow: auto;
	background: #fff;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
	font-size: 0.8rem;
	line-height: 1.35;
	pointer-events: none;
	padding: 0.5rem 0.65rem;
}

.er-payroll-neighbor-tip .er-caption {
	font-weight: 600;
	margin-bottom: 0.35rem;
	color: #0f172a;
}

.er-payroll-neighbor-tip table {
	width: 100%;
	border-collapse: collapse;
}

.er-payroll-neighbor-tip th,
.er-payroll-neighbor-tip td {
	padding: 0.2rem 0.35rem;
	text-align: left;
	border-bottom: 1px solid #f1f5f9;
	vertical-align: top;
}

.er-payroll-neighbor-tip th {
	font-weight: 600;
	color: #334155;
	background: #f8fafc;
}

.er-payroll-neighbor-tip .er-payroll-neighbor-self td {
	background: #eff6ff;
	font-weight: 600;
}

.er-matrix-table {
	margin-top: 0.35rem;
	font-size: 0.85rem;
}

.er-matrix-table th,
.er-matrix-table td {
	white-space: nowrap;
	padding: 0.35rem 0.45rem;
}

.er-matrix-num {
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.er-matrix-duration {
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.er-matrix-pay-full {
	background: #dcfce7;
}

.er-matrix-abs-warn {
	background: #fecaca;
}

.er-matrix-el-warn {
	background: #ffedd5;
}

.er-kpi-files td form {
	margin: 0;
}
