/* ===== Ruang Pemeriksaan (ronsen.html) ===== */
.app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 40; background: rgba(9,13,24,.94); backdrop-filter: blur(12px); color: #fff; }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 66px; }
.topbar .save { font: 600 12px var(--f-mono); letter-spacing: .09em; text-transform: uppercase; color: rgba(205,214,228,.6); display: flex; align-items: center; gap: 8px; }
.progress { height: 3px; background: rgba(255,255,255,.08); }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--cyan), var(--gold-2)); transition: width .5s cubic-bezier(.2,.8,.2,1); }

.gate { flex: 1; display: grid; place-items: center; padding: 48px var(--gutter); background: radial-gradient(900px 600px at 70% 10%, #18263F, var(--night) 70%); color: #fff; }
.gate-card { width: 100%; max-width: 520px; text-align: center; }
.gate-card .badge { width: 86px; height: 86px; margin: 0 auto 26px; border-radius: 26px; display: grid; place-items: center; background: radial-gradient(circle at 30% 25%, #223352, #080D18); box-shadow: inset 0 0 0 1px rgba(143,208,227,.4), 0 0 50px rgba(143,208,227,.25); }
.gate h1 { font-family: var(--f-serif); font-weight: 400; font-size: clamp(36px, 6vw, 54px); line-height: 1.02; }
.gate h1 em { color: var(--gold-2); }
.gate p { color: rgba(226,230,238,.68); margin: 16px 0 0; }
.gate .token-input { margin-top: 30px; width: 100%; text-align: center; padding: 18px; border-radius: 16px; background: rgba(255,255,255,.06); border: 1.5px solid rgba(255,255,255,.16); color: #fff; font: 600 20px var(--f-code); letter-spacing: .14em; text-transform: uppercase; outline: none; transition: border-color .2s, box-shadow .2s; }
.gate .token-input:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(143,208,227,.15); }
.gate .token-input::placeholder { color: rgba(255,255,255,.3); letter-spacing: .1em; }
.gate .btn { margin-top: 14px; }
.gate .msg { min-height: 24px; margin-top: 14px; font-size: 14px; color: #FCA5A5; }
.gate .alt { margin-top: 26px; font-size: 14px; color: rgba(226,230,238,.55); }
.gate .alt a { color: var(--gold-2); font-weight: 700; }
.resume { margin-top: 22px; padding: 16px; border-radius: 16px; background: rgba(143,208,227,.08); box-shadow: inset 0 0 0 1px rgba(143,208,227,.25); font-size: 14px; text-align: left; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }

/* Kartu pasien */
.sheet { flex: 1; padding: 40px 0 120px; }
.sheet-head { margin-bottom: 30px; }
.sheet-head h1 { font-family: var(--f-serif); font-weight: 400; font-size: clamp(34px, 5vw, 50px); line-height: 1.04; margin-top: 12px; }
.sheet-head h1 em { color: var(--gold); }
.sheet-head p { color: var(--muted); margin: 10px 0 0; max-width: 620px; }
.patient { padding: clamp(20px, 4vw, 36px); }
.patient-id { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 18px; margin-bottom: 24px; border-bottom: 1px dashed var(--line-2); font: 600 12px var(--f-mono); letter-spacing: .09em; color: var(--muted); text-transform: uppercase; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 22px; }
.grid2 .full { grid-column: 1 / -1; }
.complaints { display: flex; flex-wrap: wrap; gap: 10px; }
.cbtn { padding: 11px 16px; border-radius: 999px; border: 1.5px solid var(--line-2); background: #fff; cursor: pointer; font-size: 14px; font-weight: 600; transition: all .15s; min-height: 44px; }
.cbtn:hover { border-color: var(--ink); }
.cbtn.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.cbtn.on::before { content: '✓ '; color: var(--gold-2); }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 13.5px; color: var(--ink-2); }
.consent input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--ink); flex: none; }
.form-err { color: var(--crit); font-size: 14px; font-weight: 600; min-height: 20px; }
.bottom-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(255,255,255,.92); backdrop-filter: blur(12px); box-shadow: 0 -1px 0 var(--line); padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); }
.bottom-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bottom-in .info { font-size: 13px; color: var(--muted); }
.bottom-in .info b { color: var(--ink); }

/* Pemeriksaan */
.exam { display: grid; grid-template-columns: 300px 1fr; gap: 40px; padding-top: 36px; padding-bottom: 130px; align-items: start; }
.side { position: sticky; top: 92px; }
.side-card { background: var(--night); color: #fff; border-radius: 22px; padding: 18px; box-shadow: var(--shadow); }
.side-card .rb-body { height: 300px; width: auto; margin: 0 auto; }
.side-card .lab { font: 600 12px var(--f-mono); letter-spacing: .09em; color: rgba(198,214,232,.6); text-transform: uppercase; display: flex; justify-content: space-between; }
.secs { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 2px; }
.secs li { display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 7px 10px; border-radius: 10px; color: rgba(226,230,238,.55); cursor: default; }
.secs li i { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.25); flex: none; display: grid; place-items: center; font-size: 10px; font-style: normal; }
.secs li.done { color: rgba(226,230,238,.85); cursor: pointer; }
.secs li.done i { background: var(--cyan); box-shadow: none; color: var(--night); }
.secs li.done i::after { content: '✓'; font-weight: 800; }
.secs li.cur { background: rgba(143,208,227,.1); color: #fff; font-weight: 700; }
.secs li.cur i { box-shadow: inset 0 0 0 2px var(--gold-2); }

.sec-head { margin-bottom: 26px; }
.sec-head .k { font: 600 12.5px var(--f-mono); letter-spacing: .09em; color: var(--cyan-2); text-transform: uppercase; }
.sec-head h2 { font-family: var(--f-serif); font-weight: 400; font-size: clamp(36px, 5vw, 54px); line-height: 1; margin-top: 10px; }
.sec-head h2 em { color: var(--gold); }
.sec-head p { color: var(--muted); margin: 12px 0 0; max-width: 640px; }
.q { padding: clamp(18px, 3vw, 28px); margin-bottom: 16px; scroll-margin-top: 100px; transition: box-shadow .3s; }
.q.miss { box-shadow: 0 0 0 2px var(--crit), var(--shadow-sm); }
.q-t { display: flex; gap: 14px; align-items: flex-start; font-size: clamp(16.5px, 2vw, 19px); font-weight: 700; line-height: 1.4; margin-bottom: 16px; }
.q-t .qn { font: 600 11.5px var(--f-mono); color: var(--muted); padding-top: 5px; flex: none; min-width: 26px; }
.opts { display: grid; gap: 8px; }
.opt { display: flex; align-items: center; gap: 14px; text-align: left; width: 100%; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; font-size: 15px; line-height: 1.45; transition: border-color .15s, background .15s, transform .1s; min-height: 52px; }
.opt:hover { border-color: var(--line-2); background: #FAFCFF; }
.opt:active { transform: scale(.995); }
.opt .r { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--line-2); flex: none; transition: all .15s; }
.opt.on { border-color: var(--ink); background: #F3F6FB; font-weight: 600; }
.opt.on .r { box-shadow: inset 0 0 0 7px var(--ink); }
.opts.vital { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.opts.vital .opt { justify-content: flex-start; }

/* Analisis */
.analyzing { position: fixed; inset: 0; z-index: 100; background: radial-gradient(800px 600px at 50% 40%, #18263F, var(--night)); color: #fff; display: grid; place-items: center; text-align: center; padding: 24px; opacity: 0; pointer-events: none; transition: opacity .5s; }
.analyzing.on { opacity: 1; pointer-events: auto; }
.analyzing .rb-body { height: min(50vh, 380px); width: auto; margin: 0 auto 24px; }
.analyzing h2 { font-family: var(--f-serif); font-weight: 400; font-size: clamp(30px, 5vw, 44px); }
.analyzing .phase { font: 600 12.5px var(--f-mono); letter-spacing: .09em; color: var(--cyan); text-transform: uppercase; margin-top: 14px; min-height: 18px; }

@media (max-width: 960px) {
  .exam { grid-template-columns: 1fr; gap: 0; padding-top: 20px; }
  .side { display: none; }
}
@media (max-width: 640px) {
  .grid2 { grid-template-columns: 1fr; }
  .opts.vital { grid-template-columns: 1fr; }
  .bottom-in .info { display: none; }
  .bottom-in { justify-content: stretch; }
  .bottom-in .btn { flex: 1; }
  .topbar .save span.t { display: none; }
}
