/* ==========================================================================
   RSUD SMART — transparansi: grafik komplain, survei kepuasan (IKM), alur komplain
   ========================================================================== */
.rs-trans-page { padding-block: clamp(2rem, 5vw, 3.5rem) clamp(3rem, 7vw, 5rem); }
.rs-trans-page > * { margin-block: 0; }
.rs-trans { display: grid; gap: 1.25rem; }
.rs-trans h3 { margin: 0; font-size: 1.05rem; }

/* ---------- Tab periode ---------- */
.rs-ttabs-wrap { display: grid; gap: 1.25rem; }
.rs-ttabs { display: flex; flex-wrap: wrap; gap: .4rem; padding: .35rem; border-radius: 999px; background: #fff; border: 1px solid var(--rs-line); box-shadow: var(--rs-shadow); justify-self: start; max-width: 100%; }
.rs-ttabs button { border: 0; background: transparent; padding: .55rem 1.1rem; border-radius: 999px; font: inherit; font-weight: 700; font-size: .9rem; color: var(--rs-muted); cursor: pointer; transition: background .2s, color .2s; }
.rs-ttabs button:hover { color: var(--rs-primary); }
.rs-ttabs button[aria-selected="true"] { background: var(--rs-primary); color: #fff; }
.rs-tpanel { display: grid; gap: 1.25rem; }
.rs-tpanel[hidden] { display: none; }
.rs-tcard .rs-ttabs { box-shadow: none; background: var(--rs-surface); border: 0; margin-bottom: .25rem; }

/* ---------- Ringkasan angka ---------- */
.rs-tstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; }
.rs-tstats > div { padding: 1.2rem 1.3rem; border-radius: var(--rs-r-l); background: #fff; border: 1px solid var(--rs-line); box-shadow: var(--rs-shadow); }
.rs-tstats small { display: block; font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--rs-muted); }
.rs-tstats strong { display: block; margin-top: .25rem; font-size: clamp(1.8rem, 4vw, 2.4rem); line-height: 1.1; color: var(--rs-primary); font-variant-numeric: tabular-nums; }
.rs-tstats strong.is-text { font-size: clamp(1.15rem, 2.4vw, 1.4rem); line-height: 1.25; padding: .35rem 0 .2rem; }
.rs-tstats span { display: block; margin-top: .2rem; font-size: .85rem; color: var(--rs-muted); }
.rs-tstats .is-good strong { color: var(--rs-accent-dark); }

/* ---------- Kartu grafik ---------- */
.rs-tgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.rs-tcard { min-width: 0; padding: 1.4rem; border-radius: var(--rs-r-l); background: #fff; border: 1px solid var(--rs-line); box-shadow: var(--rs-shadow); display: grid; gap: 1rem; align-content: start; }
.rs-tcard--wide { grid-column: 1 / -1; }
.rs-tcard__note { margin: -.6rem 0 0; font-size: .86rem; color: var(--rs-muted); }
.rs-ttitle { margin: .5rem 0 0 !important; }

/* Batang horizontal */
.rs-hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: .65rem; }
.rs-hbars li { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr) 3.6rem; gap: .75rem; align-items: center; font-size: .9rem; }
.rs-hbars__label { overflow-wrap: anywhere; line-height: 1.3; }
.rs-hbars__track { height: 12px; border-radius: 99px; background: var(--rs-surface); overflow: hidden; }
.rs-hbars__bar { display: block; height: 100%; width: var(--w); border-radius: 99px; background: var(--c, var(--rs-secondary)); transition: width 1s var(--rs-ease); }
.rs-hbars__val { text-align: right; font-variant-numeric: tabular-nums; }
.rs-hbars li.is-zero { color: var(--rs-muted); }
.rs-hbars li.is-zero .rs-hbars__val { font-weight: 600; }

/* Batang vertikal */
.rs-vbars { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: clamp(.4rem, 2vw, 1.25rem); align-items: end; height: 260px; padding-top: .5rem; }
.rs-vbars__col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: .35rem; min-width: 0; }
.rs-vbars__col strong { font-size: 1.05rem; color: var(--rs-primary); }
.rs-vbars__bar { width: min(64px, 100%); height: calc((100% - 3.4rem) * var(--h) / 100); min-height: 4px; flex: none; border-radius: 10px 10px 4px 4px; background: var(--rs-grad); transition: height 1s var(--rs-ease); }
.rs-vbars__col small { font-size: .8rem; font-weight: 700; color: var(--rs-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* Donat */
.rs-donut { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; }
.rs-donut__ring { position: relative; width: 168px; aspect-ratio: 1; border-radius: 50%; flex: none; }
.rs-donut__ring > span { position: absolute; inset: 24px; border-radius: 50%; background: #fff; display: grid; place-content: center; text-align: center; }
.rs-donut__ring strong { font-size: 2rem; line-height: 1; color: var(--rs-primary); }
.rs-donut__ring small { font-size: .78rem; color: var(--rs-muted); }
.rs-donut__legend { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; font-size: .9rem; flex: 1 1 180px; }
.rs-donut__legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: .5rem; vertical-align: -1px; }
.rs-donut__legend small { color: var(--rs-muted); }

/* Cincin persentase */
.rs-tring { --p: 0; position: relative; width: 140px; aspect-ratio: 1; border-radius: 50%; justify-self: center; background: conic-gradient(var(--rs-accent-dark) calc(var(--p) * 1%), var(--rs-surface) 0); }
.rs-tring > span { position: absolute; inset: 16px; border-radius: 50%; background: #fff; display: grid; place-content: center; text-align: center; }
.rs-tring strong { font-size: 1.8rem; line-height: 1; color: var(--rs-accent-dark); }
.rs-tring small { color: var(--rs-muted); font-size: .8rem; }

/* Tabel data */
.rs-tdata summary { cursor: pointer; font-size: .82rem; font-weight: 700; color: var(--rs-secondary); }
.rs-tdata table { width: 100%; margin-top: .6rem; border-collapse: collapse; font-size: .88rem; }
.rs-tdata caption { text-align: left; font-weight: 700; padding-bottom: .4rem; }
.rs-tdata th, .rs-tdata td { padding: .4rem .6rem; border-bottom: 1px solid var(--rs-line); text-align: left; }
.rs-tdata td { text-align: right; font-variant-numeric: tabular-nums; }

/* Tindak lanjut */
.rs-tl { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.rs-tl li { padding: 1.2rem; border-radius: var(--rs-r-l); background: #fff; border: 1px solid var(--rs-line); box-shadow: var(--rs-shadow); display: grid; gap: .75rem; align-content: start; }
.rs-tl p { margin: 0; font-size: .92rem; line-height: 1.55; }
.rs-tl small { display: block; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .15rem; }
.rs-tl__q small { color: var(--rs-emergency); }
.rs-tl__a { padding: .8rem .9rem; border-radius: var(--rs-r-m); background: #EAF7EE; }
.rs-tl__a small { color: var(--rs-accent-dark); }

.rs-tsource { margin: 0; font-size: .82rem; color: var(--rs-muted); }
.rs-tcta { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; padding: 1.3rem 1.5rem; border-radius: var(--rs-r-l); background: var(--rs-surface); border: 1px solid var(--rs-line); }
.rs-tcta > div { flex: 1 1 260px; }
.rs-tcta strong { display: block; font-size: 1.05rem; }
.rs-tcta span { font-size: .9rem; color: var(--rs-muted); }

/* ---------- Survei kepuasan ---------- */
.rs-skm__hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1.25rem; }
.rs-skm__score { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; padding: 1.6rem; border-radius: var(--rs-r-l); background: var(--rs-grad-navy); color: #fff; box-shadow: var(--rs-shadow-lift); }
.rs-skm__gauge { position: relative; width: 170px; aspect-ratio: 1; border-radius: 50%; flex: none; background: conic-gradient(from -135deg, #7EE08A calc((var(--p) - 25) / 75 * 270deg), rgba(255, 255, 255, .16) 0 270deg, transparent 0); }
.rs-skm__gauge > span { position: absolute; inset: 16px; border-radius: 50%; background: #16244F; display: grid; place-content: center; text-align: center; }
.rs-skm__gauge strong { font-size: 2.3rem; line-height: 1; font-variant-numeric: tabular-nums; }
.rs-skm__gauge small { font-size: .78rem; color: #B9C6E6; }
.rs-skm__score > div:last-child { flex: 1 1 200px; }
.rs-skm__period { display: block; font-size: .78rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: #A7E58F; }
.rs-skm__mutu { margin: .5rem 0 0; font-size: 1.15rem; font-weight: 700; }
.rs-skm__mutu b { display: inline-grid; place-content: center; width: 2.2rem; height: 2.2rem; margin-right: .4rem; border-radius: 10px; background: #fff; color: var(--c); font-size: 1.3rem; }
.rs-skm__delta { margin: .6rem 0 0; font-weight: 700; font-size: .92rem; }
.rs-skm__delta.is-up { color: #A7E58F; }
.rs-skm__delta.is-down { color: #FFB4BE; }
.rs-skm__resp { margin: .35rem 0 0; font-size: .88rem; color: #C9D3EC; }
.rs-skm__inst { display: grid; gap: .75rem; }
.rs-skm__inst > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .15rem .75rem; align-items: baseline; padding: 1rem 1.2rem; border-radius: var(--rs-r-m); background: #fff; border: 1px solid var(--rs-line); box-shadow: var(--rs-shadow); border-left: 5px solid var(--c); }
.rs-skm__inst small { font-weight: 800; font-size: .9rem; }
.rs-skm__inst strong { font-size: 1.6rem; line-height: 1; color: var(--c); font-variant-numeric: tabular-nums; grid-row: span 2; align-self: center; }
.rs-skm__badge { font-size: .8rem; font-weight: 700; color: var(--c); }
.rs-skm__inst em { font-style: normal; font-size: .8rem; color: var(--rs-muted); grid-column: 1; }
.rs-skm__bar { grid-column: 1 / -1; height: 6px; border-radius: 99px; background: var(--rs-surface); overflow: hidden; margin-top: .4rem; }
.rs-skm__bar i { display: block; height: 100%; background: var(--c); border-radius: 99px; }
.rs-skm__legend { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.rs-skm__legend li { display: flex; align-items: center; gap: .65rem; font-weight: 600; }
.rs-skm__legend b { display: inline-grid; place-content: center; width: 2rem; height: 2rem; border-radius: 9px; background: var(--c); color: #fff; }
.rs-skm__legend span { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--rs-muted); font-weight: 500; }
.rs-skm__docs { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.rs-skm__docs a { display: flex; align-items: center; gap: .7rem; padding: .75rem .9rem; border-radius: var(--rs-r-m); background: var(--rs-surface); font-weight: 700; text-decoration: none; color: var(--rs-primary); }
.rs-skm__docs a:hover { background: #E6EEF9; }
.rs-skm__docs svg { width: 22px; height: 22px; flex: none; color: var(--rs-emergency); }

/* Grafik tren */
.rs-trend-wrap { overflow-x: auto; }
.rs-trend { display: block; width: 100%; min-width: 620px; height: auto; font-family: inherit; }
.rs-trend__grid { stroke: var(--rs-line); stroke-width: 1; }
.rs-trend__ax, .rs-trend__lbl { fill: var(--rs-muted); font-size: 12px; }
.rs-trend__lbl { font-weight: 600; }
.rs-trend__a { stroke: #0A7F4A; stroke-width: 1.5; stroke-dasharray: 6 5; }
.rs-trend__alabel { fill: #0A7F4A; font-size: 12px; font-weight: 700; }
.rs-trend__area { fill: rgba(58, 132, 196, .1); }
.rs-trend__line { fill: none; stroke: var(--rs-secondary); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.rs-trend__pt circle { stroke: #fff; stroke-width: 3; }
.rs-trend__val { fill: var(--rs-ink); font-size: 12.5px; font-weight: 800; }

/* ---------- Alur komplain ---------- */
.rs-alur__flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; counter-reset: none; }
.rs-alur__step { position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 1rem; padding: 1.3rem 1.4rem; border-radius: var(--rs-r-l); background: #fff; border: 1px solid var(--rs-line); box-shadow: var(--rs-shadow); }
.rs-alur__step:not(:last-child)::after { content: ""; position: absolute; left: calc(1.4rem + 25px); bottom: -1rem; width: 2px; height: 1rem; background: var(--rs-accent-dark); }
.rs-alur__num { display: grid; place-content: center; width: 52px; height: 52px; border-radius: 16px; background: var(--rs-accent-dark); color: #fff; font-weight: 800; font-size: 1.3rem; }
.rs-alur__step--decide .rs-alur__num { background: #C99A18; transform: rotate(45deg); border-radius: 12px; width: 44px; height: 44px; margin: 4px; }
.rs-alur__step--decide .rs-alur__num { font-size: 0; }
.rs-alur__step--decide .rs-alur__num::before { content: "?"; font-size: 1.3rem; transform: rotate(-45deg); }
.rs-alur__step p { margin: .35rem 0 0; color: var(--rs-muted); line-height: 1.6; }
.rs-alur__kanal { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .6rem; }
.rs-alur__kanal li { display: flex; }
.rs-alur__kanal li > a, .rs-alur__kanal li:not(:has(a)) { display: flex; flex: 1; align-items: center; gap: .7rem; box-sizing: border-box; padding: .75rem .9rem; border-radius: var(--rs-r-m); background: var(--rs-surface); text-decoration: none; color: var(--rs-ink); }
.rs-alur__kanal li > a:hover { background: #E6EEF9; }
.rs-alur__kanal svg { width: 22px; height: 22px; flex: none; color: var(--rs-secondary); }
.rs-alur__kanal strong { display: block; font-size: .9rem; }
.rs-alur__kanal small { display: block; font-size: .78rem; color: var(--rs-muted); overflow-wrap: anywhere; }
.rs-alur__grades { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin-top: 1rem; }
.rs-alur__grades > div { padding: 1rem; border-radius: var(--rs-r-m); border: 1.5px solid var(--g); background: color-mix(in srgb, var(--g) 8%, #fff); }
.rs-alur__grades strong { color: var(--g); font-size: 1.05rem; }
.rs-alur__grades strong span { font-weight: 600; color: var(--rs-ink); font-size: .9rem; }
.rs-alur__grades p { margin: .35rem 0; font-size: .86rem; color: var(--rs-ink); }
.rs-alur__grades em { font-size: .85rem; font-weight: 700; color: var(--g); }
.rs-alur__branch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin-top: .9rem; }
.rs-alur__branch > div { padding: 1rem; border-radius: var(--rs-r-m); }
.rs-alur__branch .is-yes { background: #EAF7EE; }
.rs-alur__branch .is-no { background: #FDECEE; }
.rs-alur__branch b { display: inline-block; padding: .1rem .6rem; border-radius: 99px; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: #fff; background: var(--rs-accent-dark); }
.rs-alur__branch .is-no b { background: var(--rs-emergency); }
.rs-alur__branch strong { display: block; margin-top: .4rem; }
.rs-alur__branch p { margin: .25rem 0 0; font-size: .88rem; }

/* Animasi muncul (dimatikan bila pengguna memilih gerak minimal) */
.rs-trans:not(.is-in) .rs-hbars__bar { width: 0; }
.rs-trans:not(.is-in) .rs-vbars__bar { height: 0; }
@media (prefers-reduced-motion: reduce) {
	.rs-hbars__bar, .rs-vbars__bar { transition: none; }
}

@media (max-width: 900px) {
	.rs-tgrid, .rs-skm__hero { grid-template-columns: minmax(0, 1fr); }
	.rs-alur__grades { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
	.rs-hbars li { grid-template-columns: minmax(0, 1fr) 3.4rem; gap: .25rem .6rem; }
	.rs-hbars__track { grid-column: 1 / -1; grid-row: 2; }
	.rs-hbars__val { grid-row: 1; grid-column: 2; }
	.rs-tcard { padding: 1.1rem; }
	.rs-alur__step { grid-template-columns: minmax(0, 1fr); }
	.rs-alur__step:not(:last-child)::after { left: calc(1.4rem + 25px); }
	.rs-alur__branch { grid-template-columns: minmax(0, 1fr); }
	.rs-vbars { height: 200px; }
	.rs-ttabs { border-radius: var(--rs-r-m); }
	.rs-skm__gauge { width: 140px; }
	.rs-skm__gauge strong { font-size: 1.9rem; }
}
