/* Engagement strategy badges (Power/Interest matrix result) -- same visual
   language as the Risk Register's Low/Medium/High badges, but these four
   categories aren't a severity gradient, so each gets a genuinely distinct
   color rather than a single ramp. */
.ims-stakeholder-strategy {
	display: inline-block;
	padding: .15em .6em;
	border-radius: 3px;
	font-size: .82rem;
	font-weight: 600;
	white-space: nowrap;
}
.ims-stakeholder-strategy-manage-closely { background: #f6c8c4; color: #8c1c14; }  /* high power, high interest -- same visual weight as Risk's "High" */
.ims-stakeholder-strategy-keep-satisfied { background: #fbe9b0; color: #7a5c0c; }  /* high power, low interest */
.ims-stakeholder-strategy-keep-informed  { background: #cfe3f7; color: #17456e; } /* low power, high interest */
.ims-stakeholder-strategy-monitor        { background: #e2f2e8; color: #1e5c3a; }  /* low power, low interest -- same visual weight as Risk's "Low" */

/* Compliance obligations view: a filtered subset of the register, flagged
   distinctly since these are legal/regulatory requirements rather than
   general stakeholder management. */
.ims-compliance-obligation-badge {
	display: inline-block;
	padding: .15em .6em;
	border-radius: 3px;
	font-size: .82rem;
	font-weight: 600;
	background: #f0997b;
	color: #4A1B0C;
}

/* ============================================================
 * "Ledger" card redesign for the Stakeholder Engagement module --
 * mirrors the Audit module's redesign (same card/grid/chip
 * language) but scoped under .imssh-app so it only affects
 * Stakeholder's own detail/edit page and Register, using the
 * plugin-wide --sopdoc-* palette (defined in frontend.css) so it
 * stays visually consistent with the other modules.
 * ============================================================ */

.imssh-app { --imssh-radius: 8px; }

/* -- Record head: title + status/type/strategy chips -- */
.imssh-record-head { margin-bottom: 1.1rem; }
.imssh-title { font-size: 1.5rem; font-weight: 700; color: var(--sopdoc-maroon-dark); margin: 0 0 .5rem; font-family: Georgia, serif; }
.imssh-chip-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

/* -- Field grid (Details / Engagement, read + edit) -- */
.imssh-field-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .9rem 1.5rem; }
.imssh-field label { display: block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--sopdoc-muted); margin-bottom: .3em; }
.imssh-field .imssh-field-value { font-size: .95rem; }
.imssh-field input, .imssh-field select {
	width: 100%; font-family: inherit; font-size: .92rem; border: 1px solid var(--sopdoc-border); padding: .4em .5em; border-radius: 4px;
}
.imssh-field-wide { grid-column: 1 / -1; }

/* -- Section cards: wraps each existing "sopdoc-subheading + body"
 * block so the existing heading becomes the card's header bar. -- */
.imssh-section {
	border: 1px solid var(--sopdoc-border); border-radius: var(--imssh-radius);
	background: var(--sopdoc-paper); margin-bottom: 1.1rem; padding: 0 1.1em 1.1em; overflow: hidden;
}
.imssh-section > .sopdoc-subheading:first-child {
	margin: 0 -1.1em 1em; padding: .7em 1.1em; background: var(--sopdoc-cream);
	border-bottom: 1px solid var(--sopdoc-border); font-size: .92rem; color: var(--sopdoc-maroon-dark);
}

/* -- Ledger-style tables inside Stakeholder cards -- */
.imssh-app .sopdoc-related-table { border: none; border-collapse: collapse; width: 100%; }
.imssh-app .sopdoc-related-table td { border: none; border-bottom: 1px solid var(--sopdoc-border); padding: .55em .6em; }
.imssh-app .sopdoc-related-table tr:last-child td { border-bottom: none; }

/* -- Register (list) view: card-ify the existing filterable/
 * sortable table, same treatment as the Audit Register. -- */
.imssh-app .ims-register-table-scroll {
	border: 1px solid var(--sopdoc-border); border-radius: var(--imssh-radius); overflow: auto; background: var(--sopdoc-paper);
}
.imssh-app .ims-register-table { border-collapse: collapse; width: 100%; }
.imssh-app .ims-register-table th, .imssh-app .ims-register-table td { padding: .6em .7em; border-bottom: 1px solid var(--sopdoc-border); }
.imssh-app .ims-register-table thead th {
	background: var(--sopdoc-cream); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em;
	color: var(--sopdoc-muted); font-weight: 700; border-bottom: 1px solid var(--sopdoc-border);
}
.imssh-app .ims-register-table tbody tr:hover { background: var(--sopdoc-cream); }
.imssh-app .ims-register-filters {
	display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; background: var(--sopdoc-cream);
	border: 1px solid var(--sopdoc-border); border-radius: var(--imssh-radius); padding: .8em 1em; margin-bottom: 1em;
}
.imssh-app .ims-register-filters label { font-size: .78rem; color: var(--sopdoc-muted); display: flex; flex-direction: column; gap: .3em; }
.imssh-app .ims-register-filters select, .imssh-app .ims-register-filters input {
	font-family: inherit; font-size: .85rem; border: 1px solid var(--sopdoc-border); border-radius: 4px; padding: .35em .5em;
}

/* -- KPI summary strip above the Register list -- */
.imssh-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.imssh-kpi { border: 1px solid var(--sopdoc-border); border-radius: var(--imssh-radius); background: var(--sopdoc-paper); padding: .8em 1em; }
.imssh-kpi-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--sopdoc-muted); margin-bottom: .4em; }
.imssh-kpi-value { font-size: 1.5rem; font-weight: 700; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--sopdoc-maroon-dark); }
.imssh-kpi-amber .imssh-kpi-value { color: var(--sopdoc-pending); }
.imssh-kpi-accent .imssh-kpi-value { color: var(--sopdoc-success); }

@media (max-width: 780px) {
	.imssh-field-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
	.imssh-field-grid { grid-template-columns: 1fr; }
}
