/* Ruci Medika: dasbor, rekam medis, halaman masuk, dan layar antrean. Tanpa pustaka eksternal. */
:root {
    --nt-teal: #0e4f4c;
    --nt-navy: #0e4f4c;
    --nt-gold: #e07a4f;
    --nt-card: #ffffff;
    --nt-text: #1f2d2b;
    --nt-muted: #687b78;
    --nt-line: #e2e8e7;
    --nt-track: #edf2f1;
    --nt-good: #2e7d32;
    --nt-warn: #ef6c00;
    --nt-bad: #c62828;
}
.dark {
    --nt-card: rgb(24 24 27);
    --nt-text: #e5e7eb;
    --nt-muted: #9aaba8;
    --nt-line: rgb(63 63 70);
    --nt-track: rgb(39 39 42);
}
.nt-muted { color: var(--nt-muted); font-size: .85rem; }

.nt-dash { color: var(--nt-text); }
.nt-dash a.nt-row, .nt-dash a.nt-kpi { color: inherit; text-decoration: none; }
.nt-dash a.nt-row:hover b { text-decoration: underline; }
.nt-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.nt-header p { margin: 2px 0 0; color: var(--nt-muted); font-size: .9rem; }
.nt-eyebrow { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--nt-gold); font-weight: 600; }

.nt-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.nt-kpi { display: block; background: var(--nt-card); border-radius: 12px; padding: 14px 16px; box-shadow: 0 1px 6px #0000000f; border-left: 4px solid #607d8b; }
.nt-kpi span { display: block; color: var(--nt-muted); font-size: .75rem; margin-bottom: 4px; }
.nt-kpi strong { font-size: 1.4rem; }
.nt-kpi.good { border-left-color: var(--nt-good); }
.nt-kpi.warning { border-left-color: var(--nt-warn); }
.nt-kpi.danger { border-left-color: var(--nt-bad); }

.nt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.nt-panel { background: var(--nt-card); border-radius: 12px; padding: 16px; box-shadow: 0 1px 6px #0000000f; min-width: 0; }
.nt-panel.wide { grid-column: span 2; }
.nt-panel h3 { font-size: .95rem; font-weight: 600; margin: 0 0 12px; }
.nt-panel h3 small { font-weight: 400; color: var(--nt-muted); font-size: .72rem; margin-left: 6px; }
@media (max-width: 1100px) { .nt-grid { grid-template-columns: 1fr; } .nt-panel.wide { grid-column: auto; } }

.nt-row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--nt-line); font-size: .85rem; }
.nt-row:last-child { border-bottom: 0; }
.nt-row b { display: block; font-weight: 600; }
.nt-row small { display: block; color: var(--nt-muted); font-size: .75rem; }
.nt-row small a { text-decoration: underline !important; }
.nt-dot { width: 10px; height: 10px; border-radius: 50%; background: #78909c; }
.nt-dot.terlambat { background: var(--nt-bad); } .nt-dot.segera { background: var(--nt-warn); } .nt-dot.terjadwal { background: var(--nt-good); }
.nt-due { text-align: right; font-weight: 600; white-space: nowrap; }
.nt-due.terlambat { color: var(--nt-bad); }
.nt-time { font-weight: 700; font-size: 1rem; text-align: center; min-width: 58px; color: var(--nt-teal); }
.dark .nt-time { color: #6fc3b8; }

.nt-bar { display: grid; grid-template-columns: 150px 1fr 32px; gap: 8px; align-items: center; margin: 8px 0; font-size: .8rem; }
.nt-bar .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-bar .track { height: 10px; background: var(--nt-track); border-radius: 8px; overflow: hidden; }
.nt-bar .fill { display: block; height: 100%; background: linear-gradient(90deg, var(--nt-teal), #1f8a7f); border-radius: 8px; }
.nt-bar b { text-align: right; }

/* Laporan: filter dan tabel. */
.nt-filter { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 14px; }
.nt-filter label { display: flex; flex-direction: column; font-size: .75rem; color: var(--nt-muted); gap: 4px; }
.nt-filter select { border-radius: 8px; border: 1px solid var(--nt-line); background: var(--nt-card); color: var(--nt-text); padding: 6px 30px 6px 10px; font-size: .875rem; }
.nt-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.nt-table th { text-align: left; font-weight: 600; color: var(--nt-muted); border-bottom: 2px solid var(--nt-line); padding: 6px 8px; }
.nt-table td { border-bottom: 1px solid var(--nt-line); padding: 6px 8px; vertical-align: top; }
.nt-table td.num { text-align: right; white-space: nowrap; }

/* Label data contoh (situs demo). */
.nt-contoh { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; background: #fff4d6; color: #6b4a00; border-bottom: 1px solid #f0d38a; padding: 6px 16px; font-size: .8rem; text-align: center; position: relative; z-index: 40; }
.nt-contoh strong { background: #c2410c; color: #fff; border-radius: 4px; padding: 1px 8px; letter-spacing: .06em; font-size: .72rem; }
.dark .nt-contoh { background: #3a2f12; color: #f3dfa6; border-color: #5c4a1c; }

/* Masuk sebagai tamu di halaman login. */
/* Halaman masuk: panel merek terang di kiri, formulir di kanan. Hanya CSS, tanpa gambar atau font tambahan. */
.fi-simple-layout:has(.nt-masuk-merek) { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; align-items: stretch; justify-content: stretch; background: #fff; }
.dark .fi-simple-layout:has(.nt-masuk-merek) { background: #0f141a; }
.fi-simple-layout:has(.nt-masuk-merek) .fi-simple-main-ctn { display: flex; align-items: center; justify-content: center; padding: 40px 24px; min-width: 0; }
.fi-simple-layout:has(.nt-masuk-merek) .fi-simple-main { width: 100%; max-width: 420px; margin: 0; border-radius: 16px; position: relative; z-index: 2; border: 1px solid #e9edf1; box-shadow: 0 1px 2px #0e4f4c0f, 0 12px 40px #0e4f4c14; }
.dark .fi-simple-layout:has(.nt-masuk-merek) .fi-simple-main { border-color: #ffffff14; }
.fi-simple-layout:has(.nt-masuk-merek) .fi-simple-main::before { content: ""; position: absolute; top: -1px; left: 28px; right: 28px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--nt-gold), transparent); }
.fi-simple-layout:has(.nt-masuk-merek) .fi-simple-main .fi-logo { display: none; }
.fi-simple-layout:has(.nt-masuk-merek) .fi-simple-header-heading { font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif; font-weight: 500; font-size: 1.7rem; letter-spacing: -.01em; color: var(--nt-navy); }
.dark .fi-simple-layout:has(.nt-masuk-merek) .fi-simple-header-heading { color: #e6edf3; }
.fi-simple-layout:has(.nt-masuk-merek) .fi-simple-header-subheading { color: #6b7a87; font-size: .88rem; }

.nt-masuk-merek { position: relative; overflow: hidden; background: #f2f7f6; color: var(--nt-navy); padding: 48px 64px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; border-right: 1px solid #dfeae8; min-width: 0; }
.dark .nt-masuk-merek { background: #131a22; color: #e6edf3; border-right-color: #ffffff12; }
.nt-masuk-merek > *:not(.nt-masuk-garis) { position: relative; z-index: 1; }
.nt-masuk-logo img { height: 48px; width: auto; }
.nt-masuk-logo .nt-logo-gelap, .dark .nt-masuk-logo .nt-logo-terang { display: none; }
.dark .nt-masuk-logo .nt-logo-gelap { display: block; }
.nt-masuk-isi { max-width: 460px; }
.nt-masuk-pita { margin: 0 0 18px; color: #b85a32; font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.dark .nt-masuk-pita { color: var(--nt-gold); }
.nt-masuk-isi h2 { margin: 0 0 16px; font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif; font-size: 2.55rem; line-height: 1.15; font-weight: 500; letter-spacing: -.01em; }
.nt-masuk-lead { margin: 0 0 30px; font-size: .98rem; line-height: 1.65; color: #4f6273; max-width: 420px; }
.dark .nt-masuk-lead { color: #9fb0bf; }
.nt-masuk-isi ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.nt-masuk-isi li { display: flex; align-items: baseline; gap: 12px; padding: 12px 0; border-top: 1px solid #d6e4e1; font-size: .9rem; color: #2c3e4f; }
.dark .nt-masuk-isi li { border-top-color: #ffffff1a; color: #cdd8e2; }
.nt-masuk-isi li span { font-size: .7rem; font-weight: 600; color: #b85a32; letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.nt-masuk-kaki { margin: 0; font-size: .76rem; color: #8a96a1; letter-spacing: .02em; }
/* Garis halus: kisi tipis dan busur konsentris samar di pojok kanan bawah, seperti gelombang denyut di monitor. */
.nt-masuk-garis { position: absolute; inset: 0; pointer-events: none; background:
    radial-gradient(circle at 105% 108%, transparent 0 160px, #e07a4f33 160px 161px, transparent 161px 220px, #0e4f4c14 220px 221px, transparent 221px 280px, #0e4f4c0f 280px 281px, transparent 281px 340px, #0e4f4c0a 340px 341px, transparent 341px),
    repeating-linear-gradient(90deg, #0e4f4c07 0 1px, transparent 1px 56px),
    repeating-linear-gradient(0deg, #0e4f4c07 0 1px, transparent 1px 56px); }
.dark .nt-masuk-garis { opacity: .5; filter: invert(1); }

@media (max-width: 900px) {
    .fi-simple-layout:has(.nt-masuk-merek) { grid-template-columns: minmax(0, 1fr); align-content: start; background: #f2f7f6; }
    .dark .fi-simple-layout:has(.nt-masuk-merek) { background: #131a22; }
    .nt-masuk-merek { padding: 28px 24px 16px; gap: 0; border-right: 0; background: transparent; align-items: center; }
    .nt-masuk-isi, .nt-masuk-kaki, .nt-masuk-garis { display: none; }
    .nt-masuk-logo img { height: 40px; }
    .fi-simple-layout:has(.nt-masuk-merek) .fi-simple-main-ctn { align-items: flex-start; padding: 8px 16px 40px; }
}

/* Bagian bawah formulir masuk: pilihan tamu, tautan panduan. */
.nt-masuk-tambahan { margin-top: 4px; display: grid; gap: 16px; }
.nt-masuk-pemisah { display: flex; align-items: center; gap: 12px; color: #8a96a1; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.nt-masuk-pemisah::before, .nt-masuk-pemisah::after { content: ""; flex: 1; height: 1px; background: #d6e4e1; }
.dark .nt-masuk-pemisah::before, .dark .nt-masuk-pemisah::after { background: #ffffff1a; }
.nt-tamu-form { display: grid; gap: 12px; }
.nt-tamu-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.nt-tamu-form legend { padding: 0; margin-bottom: 8px; font-size: .82rem; font-weight: 600; color: #2c3e4f; }
.dark .nt-tamu-form legend { color: #cdd8e2; }
.nt-tamu-pilihan { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.nt-tamu-pilihan label { position: relative; cursor: pointer; min-width: 0; }
.nt-tamu-pilihan input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.nt-tamu-pilihan label > span { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 10px 12px; border: 1px solid #d6e4e1; border-radius: 10px; background: #fff; transition: border-color .15s, box-shadow .15s, background .15s; }
.nt-tamu-pilihan b { font-size: .82rem; font-weight: 600; color: var(--nt-navy); line-height: 1.25; }
.nt-tamu-pilihan small { font-size: .7rem; color: #8a96a1; line-height: 1.3; }
.nt-tamu-pilihan label:hover > span { border-color: #e8b39b; }
.nt-tamu-pilihan label:has(input:checked) > span { border-color: var(--nt-gold); background: #fdf3ee; box-shadow: 0 0 0 1px var(--nt-gold); }
.nt-tamu-pilihan input:focus-visible + span { outline: 2px solid var(--nt-navy); outline-offset: 2px; }
.dark .nt-tamu-pilihan label > span { background: #ffffff08; border-color: #ffffff1f; }
.dark .nt-tamu-pilihan b { color: #e6edf3; }
.dark .nt-tamu-pilihan label:has(input:checked) > span { background: #e07a4f1a; }
.nt-tamu-tombol { width: 100%; padding: 10px 16px; border-radius: 8px; border: 1px solid var(--nt-navy); background: #fff; color: var(--nt-navy); font-weight: 600; font-size: .9rem; cursor: pointer; transition: background .15s, color .15s; }
.nt-tamu-tombol:hover { background: var(--nt-navy); color: #fff; }
.dark .nt-tamu-tombol { background: transparent; border-color: #9fb0bf; color: #e6edf3; }
.dark .nt-tamu-tombol:hover { background: #ffffff14; }
.nt-tamu-catatan { margin: 0; font-size: .74rem; line-height: 1.5; color: #8a96a1; text-align: center; }
.nt-masuk-pelajari { justify-self: center; text-align: center; font-size: .86rem; font-weight: 600; color: #b85a32; text-decoration: none; }
.nt-masuk-panduan { justify-self: center; margin-top: -10px; font-size: .8rem; color: #6b7a87; text-decoration: underline; text-underline-offset: 3px; }
.nt-masuk-pelajari:hover { text-decoration: underline; text-underline-offset: 3px; }
.dark .nt-masuk-pelajari { color: var(--nt-gold); }
.dark .nt-masuk-panduan { color: #9fb0bf; }
.nt-masuk-percaya { margin: 0; padding-top: 14px; border-top: 1px solid #dfeae8; text-align: center; font-size: .7rem; letter-spacing: .02em; color: #8a96a1; }
.dark .nt-masuk-percaya { border-top-color: #ffffff12; }
@media (max-width: 480px) {
    .nt-tamu-pilihan { grid-template-columns: minmax(0, 1fr); }
    .nt-tamu-pilihan label > span { flex-direction: row; justify-content: space-between; align-items: baseline; gap: 8px; }
}

/* Pita tamu di bawah pita DATA CONTOH. */
.nt-pita-tamu { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; padding: 7px 20px; background: var(--nt-navy); color: #dfe8ef; font-size: .8rem; }
.nt-pita-tamu .label { padding: 2px 10px; border-radius: 999px; background: var(--nt-gold); color: #2a1206; font-weight: 700; font-size: .7rem; letter-spacing: .04em; text-transform: uppercase; }
.nt-pita-tamu nav { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-left: auto; }
.nt-pita-tamu a { color: #dfe8ef; text-decoration: none; opacity: .8; }
.nt-pita-tamu a:hover { opacity: 1; text-decoration: underline; }
.nt-pita-tamu a.aktif { opacity: 1; font-weight: 700; color: #fff; box-shadow: inset 0 -2px 0 var(--nt-gold); }

/* Rekam medis: ringkasan kunjungan dan riwayat di atas formulir. */
.rm-alergi { display: inline-block; margin: 0 0 8px; padding: 6px 12px; border-radius: 8px; background: #fde8e8; color: #9b1c1c; font-weight: 700; font-size: .85rem; }
.dark .rm-alergi { background: #4c1d1d; color: #fecaca; }
.rm-keluhan { font-size: .85rem; margin-bottom: 6px; }
.rm-riwayat { font-size: .8rem; color: var(--nt-muted); border-left: 3px solid var(--nt-line); padding: 4px 0 4px 10px; }
.rm-riwayat b { color: var(--nt-text); }
.rm-riwayat span { color: var(--nt-teal); }
.dark .rm-riwayat span { color: #6fc3b8; }
.rm-ringkas { color: var(--nt-text); font-size: .875rem; }
.rm-kosong { color: var(--nt-muted); font-style: italic; margin: 2px 0 8px; font-size: .82rem; }
.rm-vital { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-bottom: 14px; }
.rm-vital div { background: var(--nt-track); border-radius: 10px; padding: 8px 10px; }
.rm-vital span { display: block; font-size: .7rem; color: var(--nt-muted); text-transform: uppercase; letter-spacing: .04em; }
.rm-vital b { font-size: 1rem; }
.rm-soap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; margin-bottom: 14px; }
.rm-soap h4, .rm-grid h4 { margin: 10px 0 4px; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--nt-gold); font-weight: 700; }
.rm-soap p { margin: 0; line-height: 1.5; }
.rm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.rm-baris { padding: 5px 0; border-bottom: 1px solid var(--nt-line); }
.rm-baris small { display: block; color: var(--nt-muted); font-size: .74rem; }
.rm-kode { display: inline-block; min-width: 48px; font-weight: 700; color: var(--nt-teal); }
.dark .rm-kode { color: #6fc3b8; }
.rm-abnormal { color: var(--nt-bad); }
@media (max-width: 1000px) { .rm-soap, .rm-grid { grid-template-columns: minmax(0, 1fr); } }

/* Dasbor: papan antrean per poli. */
.md-antrean { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.md-antrean a { display: block; text-decoration: none; color: inherit; background: var(--nt-track); border-radius: 12px; padding: 12px; }
.md-antrean span { display: block; font-size: .72rem; color: var(--nt-muted); }
.md-antrean strong { display: block; font-size: 1.6rem; color: var(--nt-teal); font-variant-numeric: tabular-nums; line-height: 1.2; }
.dark .md-antrean strong { color: #6fc3b8; }
.md-antrean small { font-size: .75rem; color: var(--nt-muted); }
.md-tren { display: flex; align-items: flex-end; gap: 4px; height: 90px; padding-top: 8px; }
.md-tren div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.md-tren i { display: block; width: 100%; max-width: 26px; background: linear-gradient(180deg, #1f8a7f, var(--nt-teal)); border-radius: 4px 4px 0 0; min-height: 2px; }
.md-tren small { font-size: .62rem; color: var(--nt-muted); }
.md-tanggal { border-radius: 8px; border: 1px solid var(--nt-line); background: var(--nt-card); color: var(--nt-text); padding: 6px 10px; font-size: .875rem; }
.md-catatan { font-size: .78rem; color: var(--nt-muted); margin-top: 10px; }
.md-angka { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 14px; }
.md-angka div { background: var(--nt-track); border-radius: 10px; padding: 10px 12px; }
.md-angka span { display: block; font-size: .72rem; color: var(--nt-muted); }
.md-angka b { font-size: 1.25rem; }
.md-angka b.baik { color: var(--nt-good); } .md-angka b.buruk { color: var(--nt-bad); }
.md-lb1 th, .md-lb1 td { text-align: center; white-space: nowrap; }
.md-lb1 td:nth-child(2) { text-align: left; white-space: normal; }
.md-gulir { overflow-x: auto; }

/* Situs demo multi-klinik: kartu pilihan klinik di halaman masuk dan pil di pita tamu. */
.nt-klinik-pilihan a { display: block; min-width: 0; text-decoration: none; }
.nt-klinik-pilihan a > span { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 10px 12px; border: 1px solid #d6e4e1; border-radius: 10px; background: #fff; transition: border-color .15s, box-shadow .15s, background .15s; }
.nt-klinik-pilihan a:hover > span { border-color: #e8b39b; }
.nt-klinik-pilihan a.aktif > span { border-color: var(--nt-gold); background: #fdf3ee; box-shadow: 0 0 0 1px var(--nt-gold); }
.nt-klinik-pilihan a:focus-visible { outline: 2px solid var(--nt-navy); outline-offset: 2px; border-radius: 10px; }
.dark .nt-klinik-pilihan a > span { background: #ffffff08; border-color: #ffffff1f; }
.dark .nt-klinik-pilihan a.aktif > span { background: #e07a4f1a; }
.nt-pita-klinik { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.nt-pita-tamu a.pil { opacity: 1; padding: 1px 10px; border-radius: 999px; border: 1px solid #ffffff59; font-weight: 600; }
.nt-pita-tamu a.pil:hover { background: #ffffff1f; text-decoration: none; }
.nt-pita-tamu a.pil.aktif { background: var(--nt-gold); border-color: var(--nt-gold); color: #2a1206; box-shadow: none; }
