/* UPMED MSDS Dashboard */
:root {
	--bg: #f0f5fa;
	--card: #ffffff;
	--ink: #1e293b;
	--muted: #5b6b80;
	--line: #dfe7f1;
	--soft: #f5f8fc;
	--accent: #046bd2;
	--accent-ink: #045cb4;
	--accent-soft: #e8f1fc;
	--side: #0b2545;
	--side-ink: #c9d8ec;
	--red: #c0392b;
	--red-soft: #fbeceb;
	--yel: #a86a0c;
	--yel-soft: #fdf3e2;
	--ok: #1e7b4f;
	--ok-soft: #e7f5ee;
	--s1: #2a78d6;
	--s2: #eb6834;
	--radius: 14px;
	--shadow: 0 1px 2px rgba(15, 35, 70, .05), 0 4px 16px rgba(15, 35, 70, .05);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.msds-app-body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font: 15.5px/1.55 "Lora", Georgia, "Times New Roman", serif;
}
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.25; margin: 0; font-weight: 600; }
button, input, select, textarea { font: inherit; color: inherit; }
.app-loading { padding: 40px; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* Shell ---------------------------------------------------------------- */
.side {
	position: fixed; inset: 0 auto 0 0; width: 250px; background: var(--side); color: var(--side-ink);
	display: flex; flex-direction: column; padding: 18px 12px; z-index: 30; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 16px; color: #fff; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: #046bd2; color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 18px; }
.brand b { display: block; font-size: 16px; letter-spacing: .5px; }
.brand small { display: block; font-size: 12px; color: var(--side-ink); }
.side-clinic { margin: 0 6px 14px; padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, .07); }
.side-clinic b { display: block; color: #fff; font-size: 14px; }
.side-clinic small { display: block; font-size: 12px; }
.side-clinic .count { display: inline-block; margin-top: 8px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: rgba(4, 107, 210, .35); color: #d6e8ff; }
.side-clinic .count.soon { background: rgba(192, 57, 43, .35); color: #ffd9d4; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--side-ink); text-decoration: none; font-size: 14px; font-weight: 500; }
.nav-item svg { width: 20px; height: 20px; flex: none; fill: currentColor; }
.nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-item.active { background: #046bd2; color: #fff; }
.nav-lock { margin-left: auto; opacity: .7; display: flex; }
.nav-lock svg { width: 16px; height: 16px; }
.nav-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .1); }
.nav-item.small { font-size: 13px; padding: 8px 12px; }
.main { margin-left: 250px; min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
	position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
	padding: 12px 28px; background: rgba(240, 245, 250, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.top-title { font-weight: 700; font-size: 18px; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.save-status { font-size: 12px; color: var(--muted); }
.save-status.err { color: var(--red); font-weight: 600; }
.icon-btn { border: 0; background: transparent; padding: 6px; border-radius: 8px; cursor: pointer; display: none; }
.icon-btn svg { width: 24px; height: 24px; }
.view { padding: 24px 28px 48px; max-width: 1280px; width: 100%; outline: none; }
.scrim { display: none; }

/* Building blocks -------------------------------------------------------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 18px; }
.card h2 { font-size: 16px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.intro-card p { margin: 6px 0 0; }
.empty { text-align: center; padding: 40px 20px; }
.empty p { max-width: 520px; margin: 8px auto 18px; color: var(--muted); }
.empty .btn-row { justify-content: center; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn {
	display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--card); color: var(--ink);
	border-radius: 10px; padding: 8px 14px; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; line-height: 1.3;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-ink); color: #fff; }
.btn.sm { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn.lg { padding: 11px 20px; font-size: 15px; }
.btn.danger:hover { border-color: var(--red); color: var(--red); }
.btn:disabled { opacity: .6; cursor: default; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 5px; padding: 1px 6px; vertical-align: 1px; white-space: nowrap; }
.tag.r { background: var(--red-soft); color: var(--red); }
.tag.y { background: var(--yel-soft); color: var(--yel); }
.eff { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 5px; padding: 0 6px; border: 1px solid currentColor; vertical-align: 1px; white-space: nowrap; }
.eff.quick { color: var(--ok); }
.eff.moderate { color: var(--yel); }
.eff.planned { color: var(--muted); }
.chip { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 99px; padding: 2px 10px; white-space: nowrap; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.bad { background: var(--red-soft); color: var(--red); }
.chip.wait { background: #edf2f8; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-2 > .card { margin-bottom: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }

/* Hero and KPIs ---------------------------------------------------------- */
.hero {
	display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px;
	background: linear-gradient(120deg, #0b2545, #046bd2); color: #fff; border-radius: var(--radius); padding: 24px; margin-bottom: 18px;
}
.hero h1 { font-size: 22px; }
.hero p { margin: 6px 0 0; color: #d9e7f8; max-width: 720px; }
.hero .btn { border-color: rgba(255, 255, 255, .5); background: rgba(255, 255, 255, .08); color: #fff; }
.hero .btn.primary { background: #fff; color: var(--accent-ink); border-color: #fff; }
.hero .btn:hover { background: rgba(255, 255, 255, .18); color: #fff; }
.hero .btn.primary:hover { background: #eaf2fd; color: var(--accent-ink); }
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 10px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kpi-label { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.kpi-value { font-size: 26px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 12px; color: var(--muted); }
.kpi.bad .kpi-value { color: var(--red); }
.kpis + .muted { margin: 0 0 18px; }

/* Bars and chart ----------------------------------------------------------- */
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 118px; gap: 10px; align-items: center; font-size: 13px; }
.bar-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-label b { display: inline-block; width: 40px; color: var(--muted); font-weight: 700; }
.bar-track { height: 10px; background: #e9eff6; border-radius: 99px; overflow: hidden; }
.bar-track i { display: block; height: 100%; background: var(--s1); border-radius: 99px; }
.bar-val { font-variant-numeric: tabular-nums; text-align: right; }
.bar-val em { font-style: normal; font-size: 11px; font-weight: 700; margin-left: 4px; }
.red-dot { color: var(--red); }
.yel-dot { color: var(--yel); }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); margin-bottom: 6px; flex-wrap: wrap; }
.legend i, .tt i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
i.s1 { background: var(--s1); }
i.s2 { background: var(--s2); }
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; }
.chart .grid { stroke: #e6edf5; stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .line.s1, .chart .dot.s1 { stroke: var(--s1); }
.chart .line.s2, .chart .dot.s2 { stroke: var(--s2); }
.chart .dot { fill: #fff; stroke-width: 2; }
.chart .hair { stroke: #9aa9bb; stroke-dasharray: 3 3; }
.chart .dlabel { fill: var(--ink); font-size: 12px; font-weight: 700; }
.tt { position: absolute; top: 30px; width: 210px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 12px; box-shadow: 0 6px 20px rgba(0, 0, 0, .1); pointer-events: none; }
.chart-empty { padding: 30px 10px; text-align: center; }

/* Lists -------------------------------------------------------------------- */
.qlist, .plan-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.qlist a, .plan-list a { display: flex; gap: 12px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); background: var(--soft); }
.qlist a:hover, .plan-list a:hover { border-color: var(--accent); background: var(--accent-soft); }
.q-num { flex: none; width: 30px; height: 30px; border-radius: 8px; background: var(--card); border: 1px solid var(--line); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.q-body, .plan-list a > span:last-child { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.q-title { font-weight: 600; font-size: 14px; }
.q-tip { font-size: 13px; color: var(--muted); }
.plan-col .card-head { margin-bottom: 4px; }
.plan-col.quick { border-top: 4px solid var(--ok); }
.plan-col.moderate { border-top: 4px solid var(--yel); }
.plan-col.planned { border-top: 4px solid var(--muted); }
.count-badge { font-weight: 700; font-size: 13px; background: var(--soft); border: 1px solid var(--line); border-radius: 99px; padding: 0 10px; }
.plan-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; }
.plan-head p { margin: 4px 0 0; }
.pill-link { display: inline-block; min-width: 30px; text-align: center; padding: 2px 8px; margin: 2px; border-radius: 8px; border: 1px solid var(--line); text-decoration: none; }
.feature-list { margin: 0 0 16px 18px; padding: 0; }
.feature-list li { margin-bottom: 6px; }
.switch { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.switch select, #switch-r { border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; background: var(--card); max-width: 280px; }

/* Table -------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.tbl th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .3px; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td a { font-weight: 600; text-decoration: none; }
.tbl .acts { white-space: nowrap; text-align: right; }
.tbl .acts .btn { margin-left: 4px; }
.up { color: var(--ok); font-weight: 700; }
.down { color: var(--red); font-weight: 700; }

/* Editor ------------------------------------------------------------------- */
.editor-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 14px; padding: 16px 20px; }
.fields { display: flex; flex-wrap: wrap; gap: 12px; flex: 1 1 420px; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.field.grow { flex: 1 1 240px; }
.field input { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 15px; font-weight: 500; color: var(--ink); background: #fff; }
.editor { display: grid; grid-template-columns: 230px minmax(0, 1fr) 260px; gap: 18px; align-items: start; }
.editor.demo { grid-template-columns: minmax(0, 1fr) 260px; }
.area-tabs { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; box-shadow: var(--shadow); }
.area-tab { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: var(--ink); font-size: 13px; }
.area-tab b { font-size: 11px; color: var(--muted); }
.area-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.area-count { font-size: 11px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.area-tab:hover { background: var(--soft); }
.area-tab.active { background: var(--accent-soft); color: var(--accent-ink); }
.area-tab.active b { color: var(--accent-ink); }
.area-tab.complete .area-count { color: var(--ok); }
.area-tab.has-red .area-count { color: var(--red); }
.area-title { margin: 2px 0 14px; }
.area-title h2 { font-size: 20px; margin-top: 2px; }
.ind { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px; box-shadow: var(--shadow); transition: background .3s; }
.ind.is-ok { border-left-color: var(--ok); }
.ind.is-bad { border-left-color: var(--red); }
.ind.is-na { border-left-color: #b8c4d3; }
.ind.flash { background: #fff8e1; }
.ind-head { display: flex; gap: 12px; align-items: flex-start; }
.ind-num { flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--soft); border: 1px solid var(--line); display: grid; place-items: center; font-weight: 800; }
.ind-text { font-weight: 600; font-size: 15px; padding-top: 5px; }
.ind-body { margin: 10px 0 0 46px; font-size: 14px; }
.ind-body p { margin: 0 0 8px; }
.check { color: var(--ink); }
.check b, .tip b { font-weight: 700; }
.tip { background: var(--accent-soft); border-radius: 10px; padding: 8px 12px; color: #1c3656; }
.ind-foot { margin: 8px 0 0 46px; display: flex; flex-direction: column; gap: 8px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.seg-btn { border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 7px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.seg-btn:hover { border-color: #9fb4cc; }
.seg-btn.f[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); color: #fff; }
.seg-btn.p[aria-pressed="true"] { background: var(--yel); border-color: var(--yel); color: #fff; }
.seg-btn.n[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: #fff; }
.seg-btn.x[aria-pressed="true"] { background: #6b7a83; border-color: #6b7a83; color: #fff; }
.part { display: none; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.part.show { display: inline-flex; }
.part select { border: 1px solid var(--line); border-radius: 8px; padding: 5px 6px; background: #fff; }
.ind-status { font-size: 13px; font-weight: 600; min-height: 1px; }
.ind-status.ok { color: var(--ok); }
.ind-status.bad { color: var(--red); }
.ind-status.hint { color: var(--yel); }
.ind.locked { opacity: .75; }
.lock-pill { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); border: 1px dashed #c5d2e2; border-radius: 99px; padding: 3px 10px; white-space: nowrap; }
.lock-pill svg, .locked-list h2 svg { width: 14px; height: 14px; vertical-align: -2px; }
.pager { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; }
.sum { position: sticky; top: 76px; padding: 18px; }
.sum-score { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.sum-score b { display: block; font-size: 18px; font-variant-numeric: tabular-nums; }
.ring { --p: 0; width: 76px; height: 76px; border-radius: 50%; background: conic-gradient(var(--accent) calc(var(--p) * 1%), #e3eaf3 0); display: grid; place-items: center; flex: none; }
.ring b { width: 58px; height: 58px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 16px; }
.sum-line { display: flex; justify-content: space-between; font-size: 14px; padding: 6px 0; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.bad-t { color: var(--red); }
.progress { height: 6px; background: #e6edf5; border-radius: 99px; overflow: hidden; margin: 10px 0 12px; }
.progress i { display: block; height: 100%; background: var(--accent); }
.sum-status { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.sum-status .chip { align-self: flex-start; }
.locked-list h2 { margin-bottom: 6px; }

/* Profile form ------------------------------------------------------------- */
.pform .card h2 { margin-bottom: 12px; }
.pgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.pf { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.pf.wide { grid-column: 1 / -1; }
.pf > label { font-size: 13px; font-weight: 600; }
.pf input[type=text], .pf input[type=tel], .pf input[type=email], .pf input[type=number], .pf input[type=date], .pf select, .pf textarea {
	border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; background: #fff; width: 100%; font-size: 15px;
}
.pf input:focus, .pf select:focus, .pf textarea:focus, .field input:focus { outline: 2px solid rgba(4, 107, 210, .25); border-color: var(--accent); }
.req { font-weight: 500; font-size: 11px; color: var(--accent); background: var(--accent-soft); border-radius: 99px; padding: 1px 7px; margin-left: 4px; }
.help { font-size: 12px; color: var(--muted); }
.checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.check-card { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; font-size: 14px; }
.check-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.check-card input, .check-line input { margin-top: 3px; accent-color: var(--accent); }
.check-line { display: flex; gap: 10px; font-size: 14px; }
.form-bar { position: sticky; bottom: 0; display: flex; justify-content: flex-end; align-items: center; gap: 14px; padding: 14px 0; background: linear-gradient(to top, var(--bg) 70%, rgba(240, 245, 250, 0)); }
.perr { color: var(--red); font-weight: 600; font-size: 14px; }

/* Guide -------------------------------------------------------------------- */
.guide-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 12px; }
.guide-grid p { margin: 4px 0 0; font-size: 13px; }
.steps { margin: 0; padding-left: 20px; }
.steps li { margin-bottom: 6px; }
.tips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tip-card { display: flex; gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--soft); }
.tip-card p { margin: 3px 0 0; font-size: 13px; color: var(--muted); }
.tip-no { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }

/* Report ------------------------------------------------------------------- */
.report-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.report {
	background: #fff; max-width: 210mm; margin: 0 auto; padding: 16mm 15mm; box-shadow: 0 2px 24px rgba(0, 0, 0, .1);
	border-radius: 4px; font-size: 12.5px; line-height: 1.45; color: #111;
}
.r-head { display: flex; justify-content: space-between; gap: 20px; border-bottom: 3px solid var(--accent); padding-bottom: 12px; margin-bottom: 16px; }
.r-kicker { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--accent); }
.r-head h1 { font-size: 22px; margin: 2px 0 4px; }
.r-head p { margin: 0; color: #444; font-size: 12px; max-width: 460px; }
.r-brand { text-align: right; }
.r-brand b { display: block; font-size: 20px; color: var(--accent); letter-spacing: 1px; }
.r-brand span { font-size: 11px; color: #555; }
.r-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; margin-bottom: 14px; }
.r-box { border: 1px solid #d7e2ee; border-radius: 6px; padding: 10px 12px; }
.r-box h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--accent); margin-bottom: 6px; }
.r-dl { margin: 0; display: grid; gap: 3px; }
.r-dl div { display: grid; grid-template-columns: 130px 1fr; gap: 8px; }
.r-dl dt { color: #555; }
.r-dl dd { margin: 0; font-weight: 600; }
.r-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 10px; }
.r-kpis div { border: 1px solid #d7e2ee; border-radius: 6px; padding: 8px 10px; background: #f5f8fc; }
.r-kpis span { display: block; font-size: 11px; color: #555; }
.r-kpis b { font-size: 18px; }
.r-verdict { padding: 8px 12px; border-radius: 6px; font-weight: 700; margin: 0 0 12px; }
.r-verdict.ok { background: var(--ok-soft); color: var(--ok); }
.r-verdict.bad { background: var(--red-soft); color: var(--red); }
.report h2 { font-size: 14px; margin: 18px 0 8px; color: var(--accent-ink); border-bottom: 1px solid #d7e2ee; padding-bottom: 4px; }
.r-note { margin: -2px 0 8px; color: #555; font-size: 11.5px; }
.r-tbl { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.r-tbl th { background: #eaf2fb; text-align: left; padding: 5px 6px; border: 1px solid #d7e2ee; font-weight: 700; }
.r-tbl td { padding: 4px 6px; border: 1px solid #d7e2ee; vertical-align: top; }
.r-tbl .num { text-align: center; white-space: nowrap; }
.r-tbl .r-area td { background: #f5f8fc; font-weight: 700; color: var(--accent-ink); }
.r-tbl .r-total td { font-weight: 700; background: #f5f8fc; }
.r-tbl .res.ok { color: var(--ok); font-weight: 700; }
.r-tbl .res.bad { color: var(--red); font-weight: 700; }
.r-sign { display: grid; grid-template-columns: 2fr 1.3fr 1fr; gap: 20px; margin: 30px 0 16px; }
.r-sign span { font-size: 11px; color: #555; }
.r-sign i { display: block; border-bottom: 1px solid #333; height: 28px; }
.r-foot { font-size: 10.5px; color: #666; border-top: 1px solid #d7e2ee; padding-top: 8px; }

/* Responsive --------------------------------------------------------------- */
@media (max-width: 1180px) {
	.editor { grid-template-columns: 210px minmax(0, 1fr); }
	.editor .sum { grid-column: 1 / -1; grid-row: 1; position: static; display: grid; grid-template-columns: auto 1fr 1fr 1fr; gap: 6px 18px; align-items: center; }
	.editor .sum .progress, .editor .sum .sum-status { grid-column: 1 / -1; }
	.editor .sum .sum-score { margin: 0; }
	.editor .sum .sum-line { border-top: 0; flex-direction: column; }
	.editor.demo { grid-template-columns: minmax(0, 1fr); }
	.kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
	.side { transform: translateX(-100%); transition: transform .2s; }
	body.nav-open .side { transform: none; }
	body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 25; }
	.main { margin-left: 0; }
	.icon-btn { display: inline-flex; }
	.topbar { padding: 10px 16px; }
	.view { padding: 16px 16px 40px; }
	.grid-2 { grid-template-columns: 1fr; }
	.editor { grid-template-columns: 1fr; }
	.area-tabs { position: static; flex-direction: row; overflow-x: auto; padding: 6px; }
	.area-tab { grid-template-columns: auto auto; flex: none; }
	.area-tab .area-name { display: none; }
	.guide-grid { grid-template-columns: 1fr 1fr; }
	.tips, .checks, .pgrid { grid-template-columns: 1fr; }
	.report { padding: 18px; }
	.r-grid, .r-kpis { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
	.kpis { grid-template-columns: 1fr 1fr; }
	.hero { padding: 18px; }
	.hero h1 { font-size: 19px; }
	.ind-body, .ind-foot { margin-left: 0; }
	.editor .sum { grid-template-columns: auto 1fr; }
	.tbl thead { display: none; }
	.tbl tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
	.tbl td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 4px 2px; }
	.tbl td[data-l]::before { content: attr(data-l); color: var(--muted); font-size: 12px; font-weight: 600; }
	.tbl .acts { justify-content: flex-start; flex-wrap: wrap; }
	.bar-row { grid-template-columns: 1fr 80px; }
	.bar-row .bar-track { grid-column: 1 / -1; grid-row: 2; }
	.r-grid, .r-kpis { grid-template-columns: 1fr; }
	.r-dl div { grid-template-columns: 1fr; gap: 0; }
	.guide-grid { grid-template-columns: 1fr; }
	.top-title { font-size: 16px; }
}

/* Print: only the report --------------------------------------------------- */
@page { size: A4; margin: 12mm; }
@media print {
	body.msds-app-body { background: #fff; }
	.side, .topbar, .scrim, .no-print, .report-bar { display: none !important; }
	.main { margin: 0; }
	.view { padding: 0; max-width: none; }
	.report { box-shadow: none; max-width: none; margin: 0; padding: 0; border-radius: 0; }
	.r-tbl tr, .r-box, .r-kpis, .r-sign { break-inside: avoid; }
	.r-grid { grid-template-columns: 1.2fr 1fr !important; }
	.r-kpis { grid-template-columns: repeat(4, 1fr) !important; }
	.r-dl div { grid-template-columns: 130px 1fr !important; gap: 8px !important; }
	.r-tbl thead { display: table-header-group; }
	.report h2 { break-after: avoid; }
	* { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.side-clinic small.fw { margin-top: 4px; opacity: .8; font-size: 11px; }
.hero .hero-fw { font-size: 13px; color: #bcd3f0; margin-top: 4px; }
.fw-pick { font-size: 13px; }
.fw-pick a { color: #fff; }
.side-clinic .demo-tag { display: block; }
.side-clinic b + small + small.fw ~ .demo-tag, .side-clinic .count + .demo-tag, .side-clinic small.fw + .demo-tag { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .12); }
.access-note { border-left: 4px solid var(--yel); }
.access-note p { margin: 6px 0 0; }

/* Documents ------------------------------------------------------------- */
.doc-series { margin-bottom: 18px; }
.doc-current { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; justify-content: space-between; padding: 14px; border: 1px solid var(--accent); background: var(--accent-soft); border-radius: 12px; }
.doc-current h3 { font-size: 16px; }
.doc-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; font-size: 13px; color: var(--muted); }
.doc-meta .chip { font-size: 11px; }
.doc-notes { margin: 8px 0 0; font-size: 14px; }
.doc-prev { margin-top: 10px; }
.doc-prev summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); padding: 4px 0; }
.doc-prev ul { list-style: none; margin: 6px 0 0; padding: 0; }
.doc-prev li { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; font-size: 14px; background: var(--card); }
.doc-kind { font-size: 11px; font-weight: 700; border-radius: 5px; padding: 1px 6px; background: #fff; border: 1px solid var(--line); color: var(--muted); }
.chip.cur { background: #046bd2; color: #fff; }

/* Documents and registers ------------------------------------------------ */
.reg-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 18px; }
.reg-desc { margin: -6px 0 12px; }
.reg-list { display: flex; flex-direction: column; gap: 8px; }
.reg-item { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-start; justify-content: space-between; padding: 12px 14px; border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 10px; background: var(--card); }
.reg-item.st-ok { border-left-color: var(--ok); }
.reg-item.st-work { border-left-color: var(--yel); }
.reg-item.st-miss { border-left-color: var(--red); }
.reg-item.st-na { border-left-color: #6b7a83; opacity: .8; }
.reg-body { flex: 1 1 320px; min-width: 0; }
.reg-text { font-weight: 600; font-size: 15px; }
.reg-ind { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 5px; padding: 1px 6px; background: var(--accent-soft); color: var(--accent-ink); vertical-align: 1px; white-space: nowrap; }
.reg-tip { font-size: 13px; color: var(--muted); margin-top: 4px; }
.reg-date { font-size: 12px; color: var(--muted); margin-top: 4px; }
.reg-date:empty { display: none; }
.reg-item .seg-btn { padding: 6px 10px; font-size: 12px; }
.reg-line { margin: 8px 0 0; }
.reg-print { display: none; }
.r-kpis b.r-small { font-size: 15px; }
@media (max-width: 900px) { .reg-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media print {
	.reg-print { display: block; }
	.reg-print .r-tbl td:nth-child(2), .reg-print .r-tbl td:nth-child(4) { white-space: nowrap; }
}

/* Printable templates ---------------------------------------------------- */
@page { size: A4; margin: 10mm; }
@page land { size: A4 landscape; margin: 10mm; }
#tpl-print { display: none; }
.reg-tpl { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 7px; font-size: 12.5px; color: var(--muted); }
.reg-tpl svg { width: 14px; height: 14px; }
.linkish { border: 0; background: none; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 2px; }
.linkish:hover { color: var(--accent-ink); }
.btn svg + * , .btn svg { vertical-align: -3px; }
.tpl-list { display: flex; flex-direction: column; gap: 8px; }
.tpl-row { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.tpl-info b { display: block; font-size: 15px; }
.tpl-prev { flex-basis: 100%; overflow: hidden; background: #e7edf4; border-radius: 10px; padding: 10px; }
.tpl-prev .tpl-page { background: #fff; box-shadow: 0 2px 10px rgba(15, 35, 60, .18); margin: 0 auto 10px; padding: 8mm; box-sizing: content-box; }
.tpl-prev .tpl-page:last-child { margin-bottom: 0; }

/* Page layout shared by templates, the report and the checklist (screen preview and print). */
.tpl-page { color: #111; font-family: 'Lora', Georgia, serif; font-size: 9.5pt; line-height: 1.3; display: flex; flex-direction: column; overflow: hidden; }
.tpl-page.s-p { width: 190mm; height: 276mm; }
.tpl-page.s-l { width: 277mm; height: 189mm; page: land; }
.a5x2 { flex-direction: row; }
.a5x2 .half { width: 50%; box-sizing: border-box; padding: 0 7mm; display: flex; flex-direction: column; }
.a5x2 .half:first-child { padding-left: 0; }
.a5x2 .half:last-child { padding-right: 0; border-left: 1px dashed #888; }
.ph { display: flex; justify-content: space-between; align-items: flex-end; gap: 6mm; border-bottom: 1.5pt solid #111; padding-bottom: 2.5mm; margin-bottom: 3mm; }
.ph-clinic b { display: block; font-size: 16pt; line-height: 1.15; }
.ph-clinic span { display: block; font-size: 8.5pt; color: #333; margin-top: .6mm; }
.ph-title { text-align: right; flex: none; max-width: 48%; }
.ph-title b { display: block; font-size: 11.5pt; }
.ph-title span { display: block; font-size: 8pt; color: #444; margin-top: .6mm; }
.ph-title .ph-page { font-size: 9pt; color: #111; margin-top: 1.5mm; }
.ph.rx .ph-clinic b { font-size: 14pt; }
.ph.rx .rx-doc { font-weight: 600; font-size: 10pt; color: #111; }
.tpl-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.pf-foot { display: flex; justify-content: space-between; gap: 6mm; font-size: 7pt; color: #666; border-top: .5pt solid #bbb; padding-top: 1.4mm; margin-top: 3mm; font-family: 'Lora', Georgia, serif; }
.report .pf-foot { margin-top: 6mm; }
.report .ph { margin-bottom: 14px; }
.tb-h { font-size: 10pt; margin: 2mm 0 1.2mm; font-weight: 700; }
.tb-p { font-size: 8.5pt; margin: 1mm 0 2.2mm; color: #222; }
.tb-t { width: 100%; border-collapse: collapse; table-layout: fixed; margin: 1mm 0 3mm; }
.tb-t th, .tb-t td { border: .6pt solid #333; padding: 1mm 1.2mm; vertical-align: top; font-size: 8.5pt; overflow: hidden; }
.tb-t th { background: #eef2f7; font-size: 7.8pt; text-align: left; font-weight: 600; vertical-align: bottom; }
.tb-t td { height: 7mm; }
.tb-t.fill { flex: 1; height: 100%; }
.tb-t.fill td { height: auto; }
.tb-t.pre td { height: 5.8mm; padding-top: .7mm; padding-bottom: .7mm; }
.tb-t tr[style] td { height: auto; }
.tb-t.dense th, .tb-t.dense td { font-size: 6.8pt; padding: .6mm .4mm; text-align: center; }
.tb-t.dense th:nth-child(-n+2), .tb-t.dense td:nth-child(-n+2) { text-align: left; padding-left: 1mm; }
.tb-f { display: grid; gap: 2.6mm 7mm; margin: 1mm 0 3mm; }
.tb-f.c1 { grid-template-columns: 1fr; }
.tb-f.c2 { grid-template-columns: 1fr 1fr; }
.tb-f.c3 { grid-template-columns: 1fr 1fr 1fr; }
.tb-f div { display: flex; align-items: flex-end; gap: 2mm; min-width: 0; }
.tb-f span { font-size: 8.5pt; max-width: 62%; }
.tb-f i { flex: 1; border-bottom: .6pt solid #333; height: 5mm; min-width: 12mm; }
.tb-c { list-style: none; margin: 1mm 0 3mm; padding: 0; display: grid; gap: 1.7mm 6mm; }
.tb-c.c1 { grid-template-columns: 1fr; }
.tb-c.c2 { grid-template-columns: 1fr 1fr; }
.tb-c.c3 { grid-template-columns: 1fr 1fr 1fr; }
.tb-c.c4 { grid-template-columns: repeat(4, 1fr); }
.tb-c li { display: flex; gap: 2mm; align-items: flex-start; font-size: 8.5pt; }
.tb-c .bx { width: 3.2mm; height: 3.2mm; border: .7pt solid #111; flex: none; margin-top: .4mm; }
.tb-l { margin: 1mm 0 2.5mm; }
.tb-l span { display: block; font-size: 8.5pt; }
.tb-l i { display: block; border-bottom: .6pt solid #333; height: 6.5mm; }
.tb-b { border: .6pt solid #333; padding: 1.5mm 2mm; margin: 1mm 0 3mm; }
.tb-b span { font-size: 8.5pt; color: #333; }
.tb-s { display: flex; gap: 10mm; margin: 2mm 0 4mm; padding-top: 5mm; }
.tpl-body > .tb-s:last-child { margin-top: auto; margin-bottom: 0; }
.tb-s div { flex: 1; }
.tb-s i { display: block; border-bottom: .7pt solid #111; height: 8mm; }
.tb-s span { font-size: 8pt; color: #333; }
.kit-wrap { display: flex; gap: 5mm; }
.kit-wrap .tb-t { flex: 1; }
.tb-t.kit td { height: 5.6mm; padding: .5mm 1mm; font-size: 8pt; }
.tb-t.kit th { font-size: 7.5pt; }
.kit-months { margin-top: auto; }

@media print {
	body.print-tpl #msds-app, body.print-tpl noscript { display: none !important; }
	body.print-tpl #tpl-print { display: block; }
	.tpl-page { break-after: page; page-break-after: always; }
	.tpl-page:last-child { break-after: auto; page-break-after: auto; }
	* { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}


/* Collapsible sidebar on desktop ----------------------------------------- */
.icon-btn.menu-btn { display: inline-flex; margin-left: -6px; }
.icon-btn.menu-btn:hover { background: rgba(4, 107, 210, .08); }
.side, .main { transition: width .18s ease, margin-left .18s ease, padding .18s ease; }
@media (min-width: 901px) {
	body.side-mini .side { width: 72px; padding: 18px 10px; overflow-x: hidden; }
	body.side-mini .main { margin-left: 72px; }
	body.side-mini .brand { justify-content: center; padding: 4px 0 16px; }
	body.side-mini .brand > span:last-child, body.side-mini .side-clinic, body.side-mini .nav-item > span, body.side-mini .nav-lock { display: none !important; }
	body.side-mini .nav-item { justify-content: center; padding: 10px; }
	body.side-mini .nav-foot { padding-top: 10px; }
}

/* Urdu, filled examples and notices -------------------------------------- */
@font-face {
	font-family: 'JameelNooriNastaleeq';
	src: local('Jameel Noori Nastaleeq'), local('Jameel Noori Nastaleeq Regular'), local('JameelNooriNastaleeq'),
		url('https://cdn.jsdelivr.net/npm/jameel-noori@1.1.2/fonts/jameel-noori-nastaleeq4.woff2') format('woff2');
	font-display: swap;
}
.ur, .ur-title { font-family: 'JameelNooriNastaleeq', 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', serif; }
.ur-title { font-size: 19px; font-weight: 400; line-height: 1.6; }
.tpl-page.ur { font-size: 12pt; line-height: 1.6; }
.tpl-page.ur .ph-clinic b { font-family: 'Lora', Georgia, serif; }
.tpl-page.ur .ph-title b { font-size: 18pt; font-weight: 400; line-height: 1.5; }
.tpl-page.ur .ph-title { text-align: left; }
.tpl-page.ur .tb-h { font-size: 14pt; font-weight: 400; }
.tpl-page.ur .tb-f span, .tpl-page.ur .tb-l span, .tpl-page.ur .tb-p, .tpl-page.ur .tb-s span { font-size: 12pt; }
.tpl-page.ur .tb-c li { font-size: 11.5pt; line-height: 1.55; }
.tpl-page.ur .tb-f i { min-height: 7.5mm; }
.tpl-page.ur .tb-l i { height: 8mm; }
.tpl-page.ur .tb-c { gap: 1mm 6mm; }
.tpl-page.ur .tb-c .bx { margin-top: 1.8mm; }
.tpl-page.ur .tb-t th, .tpl-page.ur .tb-t td { font-size: 12pt; }
.tpl-page.ur .ph-clinic span, .tpl-page.ur .ph-title span { font-family: 'Lora', Georgia, serif; font-size: 8.5pt; }
.tb-t th { text-align: start; }
.tb-pl { font-size: 12pt; line-height: 1.55; margin: 3mm 0 4mm; }
.tpl-page.ur .tb-pl { font-size: 19pt; line-height: 2; }
.tb-u { margin: 1mm 0 4mm; padding-inline-start: 7mm; }
.tb-u li { font-size: 11pt; margin-bottom: 2mm; }
.tpl-page.ur .tb-u li { font-size: 16pt; line-height: 1.9; }
.tpl-page { position: relative; }
.a5x2 .half { position: relative; }
.hw { font-family: 'Caveat', 'Segoe Script', cursive; font-style: normal; color: #1a3f9c; font-size: 12.5pt; line-height: 1.05; font-weight: 500; }
.tpl-page.ur .hw { font-family: 'JameelNooriNastaleeq', 'Noto Nastaliq Urdu', serif; font-size: 12.5pt; line-height: 1.25; }
.tpl-page.ur .hw { unicode-bidi: isolate; }
.tpl-page.ur .hw.lat { font-family: 'Caveat', 'Segoe Script', cursive; font-size: 12.5pt; line-height: 1.05; }
.tb-f i, .tb-s i { display: flex; align-items: flex-end; padding: 0 1mm; height: auto; min-height: 5mm; line-height: 1.05; }
.tb-l i { display: flex; align-items: flex-end; overflow: hidden; white-space: nowrap; padding: 0 1mm; }
.tb-s i { min-height: 8mm; }
.tb-f .hw { font-size: 11.5pt; }
.tb-l i { display: flex; }
.tb-s i { display: flex; }
.tb-t td .hw { font-size: 11pt; }
.tb-t.dense td .hw, .tb-t.kit td .hw { font-size: 9.5pt; }
.box-hw { white-space: pre-line; margin-top: 2mm; line-height: 1.5; }
.tb-c .bx.on { display: grid; place-items: center; color: #1a3f9c; font-weight: 700; font-size: 10pt; line-height: 1; }
.wm { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; font: 700 90pt 'Lora', Georgia, serif; color: rgba(200, 30, 30, .07); transform: rotate(-28deg); z-index: 0; letter-spacing: 8pt; }
.tpl-page.ur .wm { font-family: 'JameelNooriNastaleeq', serif; font-weight: 400; font-size: 110pt; }
.ex-note { margin: -1mm 0 2.5mm; padding: 1.2mm 2mm; border: .6pt dashed #c0392b; color: #9b2c1f; font-size: 8pt; border-radius: 1.5mm; }
.tpl-page.ur .ex-note { font-size: 11pt; line-height: 1.6; }
.ex-link { font-weight: 500; font-size: 12px; }
.ur-link { font-family: 'JameelNooriNastaleeq', 'Noto Nastaliq Urdu', serif; font-size: 16px; font-weight: 400; text-decoration: none; }
.tpl-pair { display: inline-flex; align-items: baseline; gap: 4px; }
.btn.sm.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.reg-tpl { row-gap: 6px; }

/* Understanding MSDS series ---------------------------------------------- */
.ser-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.ser-tools input[type=search] { flex: 1 1 280px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 14px; background: #fff; }
.ser-tools .seg-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.ser-list { display: flex; flex-direction: column; gap: 8px; }
.ser-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; color: inherit; text-decoration: none; background: var(--card); }
.ser-item:hover { border-color: var(--accent); background: var(--accent-soft); }
.ser-no { flex: none; width: 30px; height: 30px; border-radius: 8px; background: #edf2f8; color: var(--muted); display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.ser-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ser-title { font-weight: 600; font-size: 15px; }
.ser-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ser-ex { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chip.early { background: #fff3db; color: #8a5a00; font-size: 11px; }
.rd { max-width: 820px; padding: 28px 34px; }
.rd-head h1 { font-size: 26px; line-height: 1.25; margin: 10px 0 6px; }
.rd-badges { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rd-body { font-size: 17px; line-height: 1.75; color: #1f2937; }
.rd-body p { margin: 0 0 14px; }
.rd-body h6, .rd-body h5, .rd-body h4, .rd-body h3 { font-size: 18px; margin: 26px 0 8px; color: var(--side); }
.rd-body ul, .rd-body ol { margin: 0 0 16px; padding-left: 22px; }
.rd-body li { margin-bottom: 6px; }
.rd-body .rd-kicker, .rd-body .rd-kicker2 { font-size: 13px; color: var(--muted); margin: 0 0 4px; }
.rd-body .rd-kicker2 { margin-bottom: 18px; }
.rd-cta { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.rd-nav { max-width: 820px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.ind-read { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: none; }
.ind-read:hover { text-decoration: underline; }
.ind-read svg { width: 16px; height: 16px; }
@media (max-width: 600px) { .rd { padding: 18px; } .rd-head h1 { font-size: 21px; } .rd-body { font-size: 16px; } }

/* Free sample forms in the demo ------------------------------------------ */
.demo-name { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; max-width: 420px; }
.demo-name label { font-size: 13px; font-weight: 600; }
.demo-name input { padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 15px; }
.more-tpl { columns: 2; margin: 10px 0 16px; padding-left: 18px; font-size: 13px; color: var(--muted); }
.more-tpl li { break-inside: avoid; margin-bottom: 3px; }
@media (max-width: 600px) { .more-tpl { columns: 1; } }

/* Membership offer: price and WhatsApp ---------------------------------- */
.btn.wa { background: #1f9d55; border-color: #1f9d55; color: #fff; }
.btn.wa:hover { background: #17834a; border-color: #17834a; color: #fff; }
.btn.wa svg { width: 18px; height: 18px; }
.btn.wa.sm svg { width: 15px; height: 15px; }
.join-price { margin: 8px 0 10px; font-size: 15px; }
.join-price b { color: var(--accent-ink); }
.hero.cta .join-price { color: #e6f0fb; margin: 4px 0 10px; }
.hero.cta .join-price b { color: #fff; font-size: 17px; }
.cta-join { display: flex; flex-direction: column; align-items: flex-start; }
.top-right .btn + .btn { margin-left: 6px; }
@media (max-width: 600px) { .top-wa span { display: none; } }
@media (max-width: 600px) { .top-price { display: none; } }

/* Score buttons under the indicator title, with a how-to hint ----------- */
.ind-score { margin-top: 10px; padding: 10px 12px; background: #f6f9fc; border: 1px solid var(--line); border-radius: 10px; }
.score-label { font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--accent); }
.ind.is-ok .ind-score { background: var(--ok-soft); border-color: transparent; }
.ind.is-bad .ind-score { background: var(--red-soft); border-color: transparent; }
.ind.is-na .ind-score { background: #eef1f4; border-color: transparent; }
.ind-score + .ind-body { margin-top: 12px; }
.score-hint { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; margin: 0 0 14px; border-radius: 12px; background: var(--accent-soft); border: 1px solid #c9ddf5; font-size: 14px; line-height: 1.55; }
.score-hint > svg { width: 22px; height: 22px; flex: none; color: var(--accent); margin-top: 1px; }
.score-hint > div { flex: 1; }
.score-hint .btn { flex: none; }
@media (max-width: 600px) { .score-hint { flex-wrap: wrap; } .ind-score { margin-left: 0; } }

/* Layouts that follow the samples in the manual ------------------------- */
.tb-f.c4 { grid-template-columns: 1.3fr 1fr 1fr 1fr; }
.rx2 { display: flex; justify-content: space-between; align-items: flex-start; gap: 8mm; margin-bottom: 2mm; }
.rx2-band { background: #c62828; color: #fff; font: 700 17pt 'Lora', Georgia, serif; padding: 2.5mm 6mm; max-width: 60%; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.rx2-doc { text-align: right; display: flex; flex-direction: column; font-size: 9pt; line-height: 1.35; }
.rx2-doc b { font-size: 12pt; }
.rx2-sup { font-size: 8pt; color: #888; margin: 1mm 0 2mm 18mm; }
.rx2-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2mm 8mm; font-size: 8.5pt; color: #555; border-top: .6pt solid #999; padding-top: 1.5mm; margin-top: 3mm; }
.sb { margin: 2mm auto 5mm; width: 250mm; height: 118mm; background: #1e4fa3; color: #fff; border: 3mm solid #d9dde3; border-radius: 3mm; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4mm; text-align: center; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.sb-name { font: 700 34pt/1.1 'Lora', Georgia, serif; }
.sb-doc { font: 600 18pt 'Lora', Georgia, serif; display: flex; flex-direction: column; }
.sb-doc small { font-size: 13pt; font-weight: 400; }
.sb-row { display: flex; gap: 14mm; font-size: 13pt; }
.sb-time { font-size: 13pt; background: rgba(255, 255, 255, .15); padding: 1.5mm 6mm; border-radius: 2mm; }
.dp-wrap { display: flex; flex-direction: column; align-items: center; margin: 6mm 0 8mm; }
.dp { width: 254mm; height: 101.6mm; box-sizing: border-box; background: #dff0e3; border: 4mm solid #37474f; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 4mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.dp b { font: 700 40pt/1.1 'Lora', Georgia, serif; color: #1f2d3a; }
.dp span { font: 600 20pt 'Lora', Georgia, serif; color: #1f2d3a; margin-top: 3mm; }
.dp-size { font-size: 8pt; color: #777; margin-top: 1.5mm; }
.exit-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; gap: 6mm; }
.exit-sign { background: #d32f2f; color: #fff; display: flex; align-items: center; gap: 10mm; padding: 10mm 18mm; border-radius: 3mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.exit-sign span { font: 700 110pt/1 Arial, Helvetica, sans-serif; letter-spacing: 4pt; }
.exit-sign .run { width: 34mm; height: 46mm; color: #fff; }
.exit-sign .arrow { width: 28mm; height: 28mm; color: #fff; }
.exit-ur { font: 400 44pt/1.6 'JameelNooriNastaleeq', 'Noto Nastaliq Urdu', serif; color: #d32f2f; }
.hw-title { font: 700 15pt 'Lora', Georgia, serif; color: #1e4fa3; margin: 2mm 0 3mm; }
.hw-cols { display: grid; grid-template-columns: 1fr 1.3fr; gap: 6mm; margin-bottom: 5mm; }
.hw-box { border: .8pt solid #1e4fa3; border-radius: 2mm; padding: 3mm 4mm; }
.hw-box b { font-size: 13pt; }
.hw-box ul { margin: 2mm 0 0; padding-left: 5mm; font-size: 11pt; line-height: 1.55; }
.hw-steps { list-style: none; margin: 0 0 4mm; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 3mm 6mm; }
.hw-steps li { display: flex; gap: 3mm; align-items: flex-start; font-size: 11pt; line-height: 1.4; border: .6pt solid #cfd8e3; border-radius: 2mm; padding: 3mm; }
.hw-steps li span { flex: none; width: 9mm; height: 9mm; border-radius: 50%; background: #1e4fa3; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.hw-note { font-size: 10pt; background: #eef4fb; padding: 3mm 4mm; border-radius: 2mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.bl { border: 1pt dashed #777; padding: 8mm 6mm; margin-bottom: 8mm; text-align: center; font: 400 40pt/1.7 'JameelNooriNastaleeq', 'Noto Nastaliq Urdu', serif; background: #fff; }

/* Disclaimer ------------------------------------------------------------- */
.app-disc { display: flex; gap: 10px; align-items: flex-start; margin: 0 28px 28px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--muted); font-size: 12.5px; line-height: 1.5; max-width: 1224px; }
.app-disc svg, .hero-disc svg, .disc-card h2 svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--accent); }
.app-disc p { margin: 0; }
.hero-disc { display: flex; gap: 10px; align-items: flex-start; margin: -6px 0 18px; padding: 12px 16px; border-radius: 12px; background: var(--yel-soft); color: #6b4a0f; font-size: 13px; line-height: 1.5; }
.cta-disc { margin: 8px 0 0; font-size: 12px; opacity: .85; }
.disc-card h2 { display: flex; align-items: center; gap: 8px; }
.disc-list { display: grid; gap: 14px; }
.disc-item b { display: block; margin-bottom: 3px; }
.disc-item p { margin: 0; color: var(--muted); line-height: 1.55; }
@media (max-width: 900px) { .app-disc { margin: 0 16px 20px; } }
@media print { .app-disc, .hero-disc { display: none !important; } }

/* Light demo welcome ------------------------------------------------------- */
.demo-welcome { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.demo-welcome h1 { font-size: 20px; margin: 0 0 4px; }
.demo-welcome p { margin: 0; }
.demo-welcome .fw-pick { margin-top: 6px; }
.demo-welcome .fw-pick a { color: var(--accent); }
.demo-welcome .btn { flex: none; }

/* Guided tour ---------------------------------------------------------------- */
.tour-block { position: fixed; inset: 0; z-index: 100000; background: transparent; }
.tour-hole { position: fixed; z-index: 100001; border-radius: 12px; pointer-events: none; box-shadow: 0 0 0 3px rgba(255, 255, 255, .9), 0 0 0 9999px rgba(8, 22, 44, .62); transition: left .25s ease, top .25s ease, width .25s ease, height .25s ease; }
.tour-pop { position: fixed; z-index: 100002; background: #fff; color: var(--ink); border-radius: 14px; padding: 16px 18px 14px; box-shadow: 0 12px 40px rgba(0, 0, 0, .25); transition: left .25s ease, top .25s ease; }
.tour-count { font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: .3px; }
.tour-pop h3 { margin: 4px 0 6px; font-size: 17px; }
.tour-pop p { margin: 0 0 14px; font-size: 14px; line-height: 1.55; color: var(--muted); }
.tour-btns { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tour-skip { border: 0; background: none; color: var(--muted); font-size: 13px; cursor: pointer; padding: 6px 0; text-decoration: underline; }
@media print { .tour { display: none !important; } }

/* Keep icons inside card headings small */
.card h2 > svg { width: 20px; height: 20px; vertical-align: -3px; flex: none; }

/* Quiet membership mentions ------------------------------------------------ */
.more-note { display: flex; gap: 8px; align-items: center; margin: 0 0 18px; padding: 0 4px; font-size: 13px; color: var(--muted); }
.more-note svg { width: 15px; height: 15px; flex: none; }
.member-card { max-width: 640px; }
.member-card .feature-list { margin: 10px 0 14px; padding-left: 20px; color: var(--muted); }
.member-card .feature-list li { margin: 3px 0; }
.member-price { font-weight: 700; font-size: 16px; margin: 0 0 12px; color: var(--ink); }
.member-card .btn svg { width: 16px; height: 16px; }
.top-wa { padding: 5px 8px; }
.top-wa svg { width: 16px; height: 16px; }

/* Choose your facility (2.16) */
.fw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-bottom: 18px; }
.fw-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; }
.fw-card.cur { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft), var(--shadow); }
.fw-card p { margin: 0; }
.fw-card-top { display: flex; gap: 12px; align-items: center; }
.fw-card-top h3 { font-size: 18px; }
.fw-icon { display: inline-flex; width: 42px; height: 42px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); align-items: center; justify-content: center; flex: 0 0 auto; }
.fw-icon svg { width: 22px; height: 22px; }
.fw-card-foot { margin-top: auto; padding-top: 8px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.chip.fw-free { background: var(--soft); color: var(--muted); border: 1px solid var(--line); }

/* Find an indicator (2.17.1) */
.ind-search { position: relative; margin-top: 14px; }
.ind-search input { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px 10px 38px; background: var(--soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%235b6b80' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E") no-repeat 13px center; font-size: 15px; }
.ind-search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; background-color: #fff; }
.ind-res { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(15, 35, 70, .14); max-height: 360px; overflow-y: auto; padding: 6px; }
.ind-hit { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; background: none; border: 0; border-radius: 8px; padding: 8px 10px; cursor: pointer; }
.ind-hit:hover, .ind-hit.sel { background: var(--accent-soft); }
.ind-hit .q-num { flex: 0 0 auto; min-width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; background: #fff; }
.ind-hit-body { display: flex; flex-direction: column; gap: 2px; }
.ind-none { margin: 8px 10px; }
@media print { .ind-search { display: none; } }
.editor-head { flex-wrap: wrap; }
.editor-head .ind-search { flex: 1 1 100%; width: 100%; margin-top: 4px; }
