/* ============================================================
   SIM PUSKESMAS AKELAMO — Stylesheet utama
   Porting desain original + animasi dashboard + komponen baru
   ============================================================ */

:root {
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #162d2c;
    background: #f5f8f7;
    font-synthesis: none;
    --green-dark: #065d35;
    --green: #087c45;
    --green-light: #e9f7ef;
}

* { box-sizing: border-box }
body { margin: 0 }
button, input, select, textarea { font: inherit }
button { cursor: pointer }
button:disabled { opacity: .5; cursor: not-allowed }
a { color: inherit; text-decoration: none }
img { max-width: 100% }

/* ---------------- LAYOUT ---------------- */
.layout { display: flex; min-height: 100vh }
.sidebar {
    width: 254px; flex: 0 0 254px; position: fixed; inset: 0 auto 0 0;
    background: #fff; border-right: 1px solid #e8efeb; padding: 26px 15px;
    display: flex; flex-direction: column; z-index: 15;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 8px 8px 25px; border-bottom: 1px solid #edf1ee }
.brand img { width: 47px; height: 47px; object-fit: contain }
.brand b { font-size: 15px; color: #12352a }
.brand small { display: block; margin-top: 3px; color: #829089; font-size: 11px; letter-spacing: 1.2px; font-weight: 800 }
.nav-title { font-size: 10px; color: #9daaa5; font-weight: 800; letter-spacing: 1.5px; margin: 28px 12px 12px }
.nav-item {
    width: 100%; display: flex; align-items: center; gap: 12px; border: 0; background: none;
    border-radius: 11px; padding: 13px 13px; text-align: left; color: #697d76;
    font-weight: 650; margin: 2px 0; font-size: 13px; position: relative; overflow: hidden;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}
.nav-item span:first-child { width: 20px; text-align: center; font-size: 17px }
.nav-item:hover { background: #f2f8f4; color: #08673c; transform: translateX(3px) }
.nav-item.active { background: #e7f5ed; color: #076f3b; font-weight: 750 }
.nav-item.active::before {
    content: ''; position: absolute; left: 0; top: 22%; bottom: 22%; width: 4px;
    border-radius: 4px; background: var(--green);
    animation: navIndicator .35s cubic-bezier(.2,.8,.3,1) both;
}
@keyframes navIndicator { from { transform: scaleY(0) } to { transform: scaleY(1) } }
.sidebar-bottom { margin-top: auto; padding: 20px 10px; border-top: 1px solid #edf1ee; color: #8a9790; font-size: 11px }

.main { margin-left: 254px; width: calc(100% - 254px); min-height: 100vh; display: flex; flex-direction: column }
.topbar {
    height: 77px; background: #fff; border-bottom: 1px solid #e9efeb; display: flex;
    align-items: center; justify-content: space-between; padding: 0 34px;
    position: sticky; top: 0; z-index: 10;
}
.topbar-left { display: flex; gap: 12px; align-items: center }
.crumb { font-size: 12px; color: #9ca9a2 }
.crumb strong { font-size: 14px; color: #29483a; margin-left: 8px }
.profile { display: flex; align-items: center; gap: 12px }
.avatar {
    border-radius: 50%; height: 37px; width: 37px; display: grid; place-items: center;
    color: #fff; background: linear-gradient(135deg, #0d7945, #16a46a); font-weight: 800;
    box-shadow: 0 4px 12px #0d794535;
}
.profile b { display: block; font-size: 12px }
.profile small { display: block; color: #91a099; font-size: 11px; text-transform: capitalize }
.logout { background: #fff; border: 1px solid #e1e8e4; border-radius: 9px; padding: 9px 11px; color: #6e8076; transition: all .18s }
.logout:hover { background: #ffefec; border-color: #f3c9c1; color: #b34d42 }
.content { max-width: 1500px; margin: auto; padding: 32px 34px; width: 100%; flex: 1 }

/* Footer aplikasi — Developed by Cipta Karya Digital */
.app-footer {
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
    padding: 18px 34px; border-top: 1px solid #e8efeb; background: #fff;
    color: #8a9790; font-size: 12px;
}
.app-footer a { color: #087944; font-weight: 700; transition: color .18s }
.app-footer a:hover { color: var(--green-dark); text-decoration: underline }

/* ---------------- HERO & STATISTIK ---------------- */
.hero {
    background: linear-gradient(113deg, #064f32, #087e49 69%, #16a46a);
    background-size: 180% 180%;
    color: #fff; border-radius: 19px; padding: 31px 33px; display: flex;
    justify-content: space-between; align-items: center; gap: 20px;
    box-shadow: 0 16px 35px #0e6b4620; position: relative; overflow: hidden;
}
.hero-animated { animation: heroGradient 9s ease infinite, fadeUp .55s cubic-bezier(.2,.8,.3,1) both }
.hero::after {
    content: ''; position: absolute; right: -140px; top: -160px; width: 380px; height: 380px;
    border: 60px solid #ffffff0d; border-radius: 50%; animation: ringFloat 7s ease-in-out infinite;
}
.hero-inner { position: relative; z-index: 1 }
.hero h1 { font-size: 26px; line-height: 1.3; margin: 7px 0 8px }
.hero p { font-size: 13px; color: #d7f4e6; margin: 0; max-width: 580px; line-height: 1.7 }
.eyebrow { font-size: 11px; letter-spacing: 1.8px; font-weight: 800; text-transform: uppercase; color: #bde9ce }
.hero-badge {
    background: #ffffff20; padding: 13px 17px; border: 1px solid #ffffff3a; border-radius: 13px;
    white-space: nowrap; font-weight: 750; font-size: 13px; position: relative; z-index: 1;
    animation: fadeUp .55s .15s cubic-bezier(.2,.8,.3,1) both;
}
@keyframes heroGradient { 0%,100% { background-position: 0% 50% } 50% { background-position: 100% 50% } }
@keyframes ringFloat { 0%,100% { transform: translateY(0) rotate(0) } 50% { transform: translateY(14px) rotate(6deg) } }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 28px 0 17px }
.section-head h2 { font-size: 18px; margin: 0; letter-spacing: -.4px }
.section-head p { margin: 5px 0; color: #82938a; font-size: 12px }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px }
.stats-two { grid-template-columns: repeat(2, minmax(0, 1fr)) }
.stat, .panel {
    background: #fff; border: 1px solid #e8eeea; border-radius: 15px;
    box-shadow: 0 6px 24px #23432c07;
}
.stat { padding: 22px; min-height: 139px; position: relative; overflow: hidden }
.stat-animated {
    animation: fadeUp .6s var(--delay, 0s) cubic-bezier(.2,.8,.3,1) both;
    transition: transform .25s cubic-bezier(.2,.8,.3,1), box-shadow .25s ease, border-color .25s ease;
}
.stat-animated:hover {
    transform: translateY(-6px) scale(1.015);
    box-shadow: 0 18px 40px #134d2e1a;
    border-color: #bfe6cf;
}
.stat-animated:hover .icon-tile { transform: rotate(-6deg) scale(1.12); background: #d5f1e1 }
.stat .icon-tile {
    width: 42px; height: 42px; display: grid; place-items: center; background: #e9f7ef;
    border-radius: 12px; color: #087944; font-size: 20px;
    transition: transform .3s cubic-bezier(.34,1.56,.64,1), background .25s;
}
.stat small { color: #8b9c91; display: block; margin: 14px 0 7px; font-size: 12px }
.stat strong { font-size: 24px; letter-spacing: -1px; font-variant-numeric: tabular-nums; display: block }
.stat em { font-size: 11px; color: #69a587; display: block; font-style: normal; margin-top: 5px }

/* Titik aksen dekoratif pada kartu statistik */
.stat-animated::before {
    content: ''; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px;
    border-radius: 50%; background: radial-gradient(circle, #0b955214, transparent 70%);
    transition: transform .4s ease;
}
.stat-animated:hover::before { transform: scale(1.5) }

.panels { display: grid; grid-template-columns: 1.2fr .8fr; gap: 17px; margin-top: 17px }
.panel { padding: 23px }
.panel h3 { font-size: 15px; margin: 0 0 17px }
.quick-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px }
.quick {
    padding: 14px; text-align: left; background: #f7faf8; border: 1px solid #e9f1ea;
    border-radius: 10px; color: #2e5c46; font-weight: 700; font-size: 12px;
    transition: background .18s, transform .18s, box-shadow .18s;
}
.quick:hover { background: #e9f6ee; transform: translateY(-2px); box-shadow: 0 8px 18px #0d794515 }
.schedule-row { padding: 12px 0; border-top: 1px solid #eaf0eb; animation: fadeUp .5s ease both }
.schedule-row b { font-size: 12px }

.muted { font-size: 12px; line-height: 1.6; color: #84928b }

/* Animasi masuk umum */
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px) } to { opacity: 1; transform: translateY(0) } }
.anim-up { animation: fadeUp .55s var(--delay, 0s) cubic-bezier(.2,.8,.3,1) both }

/* Tag berdenyut */
.tag {
    display: inline-block; background: #e9f8ef; color: #16774a; padding: 7px 11px;
    border-radius: 100px; font-size: 11px; font-weight: 750;
}
.tag-pulse { animation: tagPulse 2.4s ease-in-out infinite }
@keyframes tagPulse { 0%,100% { box-shadow: 0 0 0 0 #0b955200 } 50% { box-shadow: 0 0 0 7px #0b95521f } }

/* ---------------- TABEL ---------------- */
.table-wrap { overflow: auto; background: #fff; border: 1px solid #e8efea; border-radius: 14px }
.data-table { width: 100%; border-collapse: collapse; white-space: nowrap; text-align: left }
.data-table th {
    background: #f8faf9; color: #8b9e92; text-transform: uppercase; letter-spacing: .7px;
    font-size: 10px; padding: 17px 18px; position: sticky; top: 0;
}
.data-table td {
    padding: 16px 18px; border-top: 1px solid #edf1ee; font-size: 12px; color: #3d5549;
    max-width: 280px; overflow: hidden; text-overflow: ellipsis;
}
.data-table tbody tr { animation: rowIn .4s ease both; transition: background .15s }
.data-table tbody tr:hover { background: #f6fbf7 }
@keyframes rowIn { from { opacity: 0; transform: translateX(-8px) } to { opacity: 1; transform: none } }

.pill {
    display: inline-block; background: #ecf8ef; color: #0b7741; border-radius: 7px;
    font-weight: 750; padding: 6px 9px; font-size: 11px;
}
.pill.orange { background: #fff3e3; color: #b87314 }
.pill.red { background: #ffedeb; color: #bf5145 }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 24px 0 16px }
.toolbar .actions { display: flex; gap: 9px; flex-wrap: wrap }

/* ---------------- FORM ---------------- */
.field { display: flex; flex-direction: column; gap: 7px }
.field label { font-size: 11px; color: #657f6e; font-weight: 750 }
.field input, .field select, .field textarea, .search {
    background: #fff; border: 1px solid #dce8df; padding: 12px 13px; border-radius: 9px;
    outline: none; color: #263c30; min-width: 0; width: 100%; font-size: 13px;
    transition: border-color .18s, box-shadow .18s;
}
.field input:focus, .field select:focus, .field textarea:focus, .search:focus {
    border-color: #0b9552; box-shadow: 0 0 0 3px #0983481a;
}
.field textarea { min-height: 85px; resize: vertical }
.toolbar input { width: min(350px, 100%) }

/* Tombol intip password — dipakai di SEMUA input password */
.pw-wrap { position: relative; display: flex }
.pw-wrap input { padding-right: 46px }
.pw-toggle {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    border: 0; background: transparent; color: #7d938a; width: 34px; height: 34px;
    border-radius: 8px; display: grid; place-items: center; transition: all .18s;
}
.pw-toggle:hover { background: #ecf6ef; color: #087944 }
.pw-toggle .eye-closed { display: none }
.pw-toggle.showing .eye-open { display: none }
.pw-toggle.showing .eye-closed { display: block }

.btn {
    border: none; background: #087c45; color: #fff; border-radius: 9px; padding: 12px 16px;
    font-weight: 750; font-size: 12px; white-space: nowrap;
    transition: background .18s, transform .18s, box-shadow .18s;
}
.btn:hover { background: #065e35; transform: translateY(-1px); box-shadow: 0 8px 18px #087c4530 }
.btn.secondary { color: #276745; background: #edf8f0; border: 1px solid #d7eddf }
.btn.secondary:hover { background: #ddf3e4 }
.btn.danger { background: #fff0ed; color: #b34d42 }
.btn.danger:hover { background: #ffe3de }
.btn.tiny { padding: 7px 10px }
.row-actions { display: flex; gap: 7px }

.flash-ok, .form-error-box {
    background: #fff3e3; color: #9a5d10; border: 1px solid #f5dcb8; border-radius: 10px;
    padding: 11px 14px; font-size: 12px; margin-bottom: 14px; animation: fadeUp .4s ease both;
}

/* ---------------- LOGIN (split: branding KIRI, form kanan) ---------------- */
.login-body { background: #fff }
.login-page { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; background: #fff }

.login-art {
    background: linear-gradient(140deg, #05452a, #07824b); background-size: 160% 160%;
    animation: heroGradient 10s ease infinite;
    padding: 8vw; display: flex; flex-direction: column; justify-content: center;
    position: relative; overflow: hidden; color: #fff;
}
.login-logo {
    width: 108px; height: 108px; object-fit: contain; background: #fff; border-radius: 24px;
    padding: 13px; position: relative; z-index: 1;
    animation: logoPop .7s cubic-bezier(.34,1.56,.64,1) both, logoFloat 5s 1s ease-in-out infinite;
}
@keyframes logoPop { from { transform: scale(0) rotate(-12deg); opacity: 0 } to { transform: none; opacity: 1 } }
@keyframes logoFloat { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-8px) } }
.login-art h1 {
    font-size: clamp(29px, 4vw, 49px); max-width: 530px; line-height: 1.2; margin: 30px 0 15px;
    position: relative; z-index: 1; animation: fadeUp .6s .2s cubic-bezier(.2,.8,.3,1) both;
}
.login-art p {
    font-size: 15px; max-width: 470px; color: #d0e9d9; line-height: 1.9; position: relative; z-index: 1;
    animation: fadeUp .6s .35s cubic-bezier(.2,.8,.3,1) both;
}
.art-points {
    list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 10px;
    font-size: 13px; color: #cdeeda; position: relative; z-index: 1;
}
.art-points li { animation: fadeUp .6s both }
.art-points li:nth-child(1) { animation-delay: .5s }
.art-points li:nth-child(2) { animation-delay: .62s }
.art-points li:nth-child(3) { animation-delay: .74s }
.art-caption {
    margin-top: 34px; color: #bbebcf; font-size: 12px; position: relative; z-index: 1;
    letter-spacing: 1.5px; font-weight: 700; animation: fadeUp .6s .9s both;
}
/* Bentuk dekoratif bergerak */
.art-blob {
    position: absolute; border-radius: 50%; filter: blur(2px); opacity: .16; background: #fff; z-index: 0;
}
.art-blob.b1 { width: 300px; height: 300px; right: -90px; bottom: -110px; animation: blobFloat 9s ease-in-out infinite }
.art-blob.b2 { width: 160px; height: 160px; right: 180px; top: 12%; opacity: .1; animation: blobFloat 7s 1.2s ease-in-out infinite reverse }
.art-ring {
    position: absolute; width: 470px; height: 470px; border: 80px solid #ffffff0b;
    border-radius: 50%; right: -190px; top: -100px; animation: ringFloat 8s ease-in-out infinite;
}
@keyframes blobFloat { 0%,100% { transform: translate(0,0) scale(1) } 50% { transform: translate(-16px,-22px) scale(1.08) } }

.login-form-wrap {
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    padding: 35px; position: relative;
}
.login-form {
    width: min(390px, 100%); animation: fadeUp .6s .15s cubic-bezier(.2,.8,.3,1) both;
}
.login-form .kicker { color: #0f8e50; font-weight: 800; font-size: 12px; letter-spacing: 1.5px }
.login-form h2 { font-size: 29px; margin: 10px 0 8px }
.login-form > p { font-size: 13px; color: #81958a; line-height: 1.6; margin: 0 0 30px }
.login-form .field { margin: 17px 0 }
.btn-login {
    width: 100%; padding: 15px; margin-top: 14px; font-size: 13px;
    transition: transform .18s, box-shadow .18s, background .18s;
}
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 12px 26px #087c4540 }
.login-foot { font-size: 11px; color: #a1aaa4; margin-top: 28px }
.login-footer { margin-top: 34px; font-size: 11px; color: #a1aaa4 }
.login-footer a { color: #087944; font-weight: 700 }
.login-footer a:hover { text-decoration: underline }

/* Baris captcha: input + gambar + tombol refresh */
.captcha-row { display: flex; gap: 9px; align-items: center }
.captcha-row input { flex: 1; letter-spacing: 2px; text-transform: uppercase; font-weight: 700 }
.captcha-row img {
    border: 1px solid #dce8df; border-radius: 9px; background: #f2f9f4; height: 46px; width: 140px;
    flex: 0 0 auto; object-fit: contain; transition: transform .2s;
}
.captcha-row img:active { transform: scale(.97) }
.captcha-refresh {
    border: 1px solid #dce8df; background: #fff; color: #087944; border-radius: 9px;
    width: 42px; height: 42px; flex: 0 0 auto; transition: all .2s;
}
.captcha-refresh:hover { background: #e9f7ef; transform: rotate(90deg) }
.form-error { color: #b94636; font-size: 12px; min-height: 17px }

/* ---------------- MODAL ---------------- */
.modal-backdrop {
    position: fixed; inset: 0; background: #12281d99; z-index: 100; display: grid;
    place-items: center; padding: 15px; animation: backdropIn .2s ease both;
}
@keyframes backdropIn { from { opacity: 0 } to { opacity: 1 } }
.modal {
    background: #fff; width: min(660px, 100%); max-height: 92vh; overflow: auto;
    border-radius: 17px; padding: 27px; box-shadow: 0 15px 70px #06130a50;
    animation: modalIn .3s cubic-bezier(.2,.8,.3,1) both;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(24px) scale(.97) } to { opacity: 1; transform: none } }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 19px }
.modal-head h2 { font-size: 19px; margin: 0 }
.close { border: 0; background: #f4f7f4; color: #586b5f; width: 32px; height: 32px; border-radius: 8px; transition: all .18s }
.close:hover { background: #ffe3de; color: #b34d42 }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px }
.form-grid .wide { grid-column: 1/-1 }
.modal-actions { display: flex; justify-content: end; gap: 9px; margin-top: 25px }

/* ---------------- NOTIFIKASI ---------------- */
.notification {
    position: fixed; bottom: 24px; right: 24px; background: #123f29; color: #fff; border-radius: 12px;
    padding: 13px 18px; z-index: 200; max-width: 350px; box-shadow: 0 10px 35px #123f292b;
    font-size: 12px; animation: notifIn .35s cubic-bezier(.2,.8,.3,1) both;
}
.notification.error { background: #b34636 }
@keyframes notifIn { from { opacity: 0; transform: translateY(16px) } to { opacity: 1; transform: none } }

/* ---------------- QR & LAINNYA ---------------- */
.qr-panel { display: flex; gap: 28px; align-items: center; flex-wrap: wrap }
.qr-panel img {
    height: 245px; width: 245px; max-width: 100%; border: 1px solid #e1eee6;
    border-radius: 14px; padding: 12px; animation: qrFloat 5s ease-in-out infinite;
}
@keyframes qrFloat { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-7px) } }
.qr-side { flex: 1; min-width: 210px }
.qr-link { word-break: break-all; background: #f4f9f6; padding: 12px; border-radius: 8px; font-size: 12px; margin: 12px 0 }
.empty { padding: 40px; text-align: center; color: #8a9b91 }
.mobile-menu { display: none }
.footer-note { font-size: 11px; color: #9ba9a1; margin: 26px 0 }

/* ---------------- SURVEI PUBLIK ---------------- */
.survey-body { background: #edf6ef }
.survey-shell { min-height: 100vh; padding: 38px 15px; display: grid; place-items: center }
.survey-box {
    background: #fff; border: 1px solid #dcece1; box-shadow: 0 25px 65px #235e2a12;
    border-radius: 22px; padding: 32px; width: min(560px, 100%);
}
.survey-brand { display: flex; align-items: center; gap: 12px }
.survey-brand img { height: 59px; width: 59px; object-fit: contain }
.survey-brand strong { color: #125333; font-size: 18px }
.survey-brand small { display: block; color: #8aa195; font-size: 12px }
.survey-box h1 { margin: 29px 0 7px; font-size: 25px }
.survey-box p { font-size: 13px; line-height: 1.7; color: #82968a }
.survey-box .field { margin-top: 21px }
.rating-choice { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 9px }
.rating-choice label {
    text-align: center; border: 1px solid #e0eae1; border-radius: 10px; padding: 12px 3px;
    cursor: pointer; position: relative; transition: all .18s;
}
.rating-choice label:hover { transform: translateY(-3px); border-color: #0e8b50 }
.rating-choice input { position: absolute; opacity: 0; width: 1px; height: 1px }
.rating-choice label:has(input:checked) {
    border-color: #0e8b50; background: #e9f8ef; color: #09633c;
    animation: ratingPop .35s cubic-bezier(.34,1.56,.64,1);
}
@keyframes ratingPop { 50% { transform: scale(1.08) } }
.rating-choice span { display: block; font-size: 21px }
.rating-choice small { font-size: 10px; color: #7b9885 }
.btn-survey { width: 100%; margin-top: 23px; padding: 15px; font-size: 13px }
.survey-footer { margin-top: 26px; text-align: center; font-size: 11px; color: #a1aaa4 }
.survey-footer a { color: #087944; font-weight: 700 }
.hp-field { position: absolute; left: -9999px; top: -9999px; opacity: 0; height: 0; overflow: hidden }

/* ---------------- TERMINAL SUPER ADMIN ---------------- */
.terminal-shell {
    background: #081510; border: 1px solid #1e3b2b; border-radius: 15px; overflow: hidden;
    box-shadow: 0 20px 50px #0a1f1430;
}
.term-bar {
    display: flex; align-items: center; gap: 8px; background: #0e2419;
    padding: 12px 16px; border-bottom: 1px solid #1e3b2b;
}
.term-dot { width: 11px; height: 11px; border-radius: 50% }
.term-title { margin-left: 10px; color: #7fae92; font-size: 11px; font-family: 'SF Mono', ui-monospace, Menlo, Consolas, monospace }
.term-output {
    font-family: 'SF Mono', ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.75;
    color: #c9e8d5; padding: 18px; min-height: 320px; max-height: 460px; overflow: auto; background: #081510;
}
.term-line { white-space: pre-wrap; word-break: break-word; animation: rowIn .25s ease both }
.term-prompt { color: #4fd47f; font-weight: 700 }
.term-ok { color: #4fd47f }
.term-err { color: #ff9d8f }
.term-warn-line { color: #ffd166 }
.term-dim { color: #6b8f7d }
.term-input-row {
    display: flex; gap: 10px; align-items: center; padding: 14px 16px;
    background: #0e2419; border-top: 1px solid #1e3b2b; flex-wrap: wrap;
}
.term-prefix { color: #4fd47f; font-family: 'SF Mono', ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; white-space: nowrap }
.term-input-row input {
    flex: 1; min-width: 180px; background: #081510; border: 1px solid #1e3b2b; color: #c9e8d5;
    font-family: 'SF Mono', ui-monospace, Menlo, Consolas, monospace; border-radius: 8px;
    padding: 10px 12px; outline: none; transition: border-color .18s, box-shadow .18s;
}
.term-input-row input:focus { border-color: #2f8f5b; box-shadow: 0 0 0 3px #2f8f5b26 }
.cursor { display: inline-block; width: 9px; color: #4fd47f; animation: blink 1s steps(1) infinite }
@keyframes blink { 50% { opacity: 0 } }
.term-pass-row {
    display: none; gap: 10px; align-items: center; padding: 12px 16px; flex-wrap: wrap;
    background: #1a0f0d; border-top: 1px solid #52281f;
}
.term-pass-row.show { display: flex; animation: fadeUp .3s ease both }
.term-pass-row label { color: #ffb3a6; font-size: 12px; font-weight: 700 }
.term-warn { color: #ff8a75; font-size: 16px }
.term-pass-row .pw-wrap { flex: 1; min-width: 200px; max-width: 320px }
.term-pass-row .pw-wrap input { background: #081510; border: 1px solid #52281f; color: #ffd9d2 }
.term-pass-row .pw-toggle { color: #d99a8e }
.term-pass-row .pw-toggle:hover { background: #33201b; color: #ffb3a6 }
.term-actions {
    padding: 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
    gap: 10px; background: #0e2419; border-top: 1px solid #1e3b2b;
}
.term-btn {
    text-align: left; background: #081510; border: 1px solid #1e3b2b; border-radius: 10px;
    padding: 12px 14px; color: #c9e8d5; transition: all .18s;
}
.term-btn b { display: block; font-size: 12px; font-family: 'SF Mono', ui-monospace, Menlo, Consolas, monospace }
.term-btn small { display: block; margin-top: 5px; color: #6b8f7d; font-size: 10.5px; line-height: 1.5 }
.term-btn:hover { border-color: #2f8f5b; transform: translateY(-2px); box-shadow: 0 8px 18px #0a1f1440 }
.term-btn.danger { border-color: #52281f }
.term-btn.danger b { color: #ffb3a6 }
.term-btn.danger:hover { border-color: #ff8a75; box-shadow: 0 8px 18px #52281f40 }
.terminal-shell code { font-family: 'SF Mono', ui-monospace, Menlo, Consolas, monospace; background: #eef6f0; padding: 2px 6px; border-radius: 5px; font-size: 11px }

/* ---------------- KARTU STATISTIK LINK ---------------- */
.stat-link { cursor: pointer; display: block; text-decoration: none }
.stat-go {
    display: inline-block; margin-top: 10px; font-size: 10.5px; font-weight: 800;
    color: #0b9552; letter-spacing: .3px;
    opacity: 0; transform: translateX(-6px); transition: all .25s ease;
}
.stat-link:hover .stat-go { opacity: 1; transform: translateX(0) }
.stat-link:active { transform: translateY(-2px) scale(.99) }

/* ---------------- BAR CHART ANIMASI ---------------- */
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 17px; margin-top: 17px }
.chart-panel { min-height: 260px }
.chart-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px }
.chart-head h3 { margin: 0 }
.chart-legend { display: flex; gap: 14px; font-size: 11px; color: #6b8f7d; font-weight: 700 }
.chart-legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px }
.dot-in { background: linear-gradient(180deg, #16a46a, #087c45) }
.dot-out { background: linear-gradient(180deg, #f2a65a, #e07f2e) }

.bar-chart {
    display: flex; align-items: flex-end; gap: 4%; height: 220px; padding: 10px 6px 0;
    border-bottom: 2px solid #e3ece6;
}
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end }
.bar-group { display: flex; align-items: flex-end; gap: 5px; height: 100%; width: 100%; justify-content: center }
.bar {
    width: 26px; max-width: 46%; border-radius: 7px 7px 3px 3px; position: relative;
    height: 0; transition: height 1s cubic-bezier(.2,.8,.3,1);
    background: linear-gradient(180deg, #16a46a, #087c45);
    box-shadow: 0 4px 12px #087c4526;
}
.bar.bar-out { background: linear-gradient(180deg, #f2a65a, #e07f2e); box-shadow: 0 4px 12px #e07f2e26 }
.bar-val {
    position: absolute; top: -22px; left: 50%; transform: translateX(-50%) scale(.7);
    font-size: 10px; font-weight: 800; color: #0b6e41; white-space: nowrap;
    opacity: 0; transition: all .5s .8s ease; pointer-events: none;
}
.bar-out .bar-val { color: #a35c14 }
.bar.loaded .bar-val { opacity: 1; transform: translateX(-50%) scale(1) }
.bar-col:hover .bar { filter: brightness(1.12); transform: scaleY(1.02); transform-origin: bottom }
.bar-lbl { font-size: 10.5px; color: #84928b; font-weight: 700 }

/* ---------------- VENN DIAGRAM ANIMASI ---------------- */
.venn-wrap { display: grid; place-items: center; padding: 6px 0 }
.venn { width: 100%; max-width: 340px; height: auto }
.venn-circle { fill-opacity: 0; animation: vennFill 1.1s .3s ease forwards }
.venn-a { fill: #16a46a80; stroke: #087c45; stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: vennPop .7s .15s cubic-bezier(.34,1.56,.64,1) both, vennFill 1.1s .35s ease forwards }
.venn-b { fill: #f2a65a66; stroke: #e07f2e; stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: vennPop .7s .3s cubic-bezier(.34,1.56,.64,1) both, vennFill 1.1s .5s ease forwards }
@keyframes vennPop { from { transform: scale(0) } to { transform: scale(1) } }
@keyframes vennFill { from { fill-opacity: 0 } to { fill-opacity: .45 } }
.venn-num {
    font-size: 26px; font-weight: 800; fill: #0b3d2a; font-variant-numeric: tabular-nums;
    animation: fadeUp .6s .7s ease both;
}
.venn-num-both { fill: #7a4a10 }
.venn-cap { font-size: 10px; font-weight: 800; fill: #6b8f7d; animation: fadeUp .6s .85s ease both }
.venn-cap-both { fill: #a3742e }
.venn-caption { text-align: center; margin: 10px 0 0 }

/* ---------------- LAPORAN ---------------- */
.report-filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; background: #fff; border: 1px solid #e8eeea; border-radius: 14px; padding: 18px; margin-bottom: 18px }
.report-filters .field { margin: 0; min-width: 150px; flex: 1 }
.report-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.report-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 13px; margin: 16px 0 }
.report-sum { background: #fff; border: 1px solid #e8eeea; border-radius: 13px; padding: 16px 18px; animation: fadeUp .5s ease both }
.report-sum small { display: block; color: #8b9c91; font-size: 11px; margin-bottom: 6px; font-weight: 700 }
.report-sum strong { font-size: 19px; letter-spacing: -.5px }

/* ---------------- NOTIFIKASI (LONCENG) ---------------- */
.notif-wrap { position: relative }
.notif-bell {
    position: relative; border: 1px solid #dfe9e2; background: #fff; border-radius: 11px;
    width: 40px; height: 40px; font-size: 16px; cursor: pointer; transition: all .2s;
}
.notif-bell:hover { background: #e9f7ef; transform: translateY(-1px) rotate(-8deg) }
.notif-badge {
    position: absolute; top: -7px; right: -7px; background: #e03e3e; color: #fff;
    border-radius: 99px; font-size: 9.5px; font-weight: 800; min-width: 18px; height: 18px;
    display: grid; place-items: center; padding: 0 4px; border: 2px solid #fff;
    animation: badgePulse 2s infinite;
}
@keyframes badgePulse { 0%,100% { box-shadow: 0 0 0 0 #e03e3e55 } 50% { box-shadow: 0 0 0 5px #e03e3e00 } }
.notif-panel {
    position: absolute; right: 0; top: 48px; width: 330px; max-width: 86vw;
    background: #fff; border: 1px solid #e3ece6; border-radius: 15px;
    box-shadow: 0 18px 46px #0b3d2a22; overflow: hidden; z-index: 90;
    animation: fadeUp .22s ease;
}
.notif-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 15px; border-bottom: 1px solid #eef4ef; font-size: 13px }
.notif-head button { border: none; background: none; color: #0b7a45; font-weight: 800; font-size: 11px; cursor: pointer }
.notif-head button:disabled { color: #9db3a6; cursor: default }
.notif-item { display: flex; gap: 11px; padding: 11px 15px; text-decoration: none; color: #2c4034; border-bottom: 1px solid #f3f8f4; font-size: 12.5px; align-items: flex-start }
.notif-item:hover { background: #f3faf5 }
.notif-item.unread { background: #eefaf2 }
.notif-item.unread .notif-text b { color: #0b6e41 }
.notif-icon { width: 30px; height: 30px; border-radius: 9px; background: #e9f7ef; color: #0b7a45; display: grid; place-items: center; font-size: 14px; flex: none }
.notif-text { display: flex; flex-direction: column; gap: 2px }
.notif-text small { color: #8b9c91; font-size: 10.5px }
.notif-empty { padding: 26px 15px; text-align: center; color: #8b9c91; font-size: 12px }
.notif-foot { display: block; text-align: center; padding: 10px; font-size: 12px; font-weight: 800; color: #0b7a45; text-decoration: none; background: #f3faf5 }
.notif-foot:hover { background: #e9f7ef }
.profile-link { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; padding: 3px 6px; border-radius: 10px; transition: background .2s }
.profile-link:hover { background: #f0f7f2 }

/* halaman notifikasi */
.notif-row { display: flex; gap: 13px; align-items: center; padding: 14px 6px; border-bottom: 1px solid #eef4ef; text-decoration: none; color: #2c4034 }
.notif-row b { display: block; font-size: 13.5px }
.notif-row small { color: #7d938a; font-size: 12px }
.notif-row time { margin-left: auto; font-size: 11px; color: #9db3a6; white-space: nowrap }
.notif-row.unread { background: #f0faf4; border-radius: 12px; padding-left: 14px }
.notif-row.unread b::after { content: '●'; color: #0b9552; font-size: 9px; margin-left: 7px; vertical-align: 2px }

/* ---------------- RESEP ---------------- */
.rx-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px }
.rx-items { display: flex; flex-direction: column; gap: 11px; margin: 14px 0 }
.rx-item {
    display: grid; grid-template-columns: 2fr 1.4fr .55fr 38px; gap: 11px; align-items: end;
    background: #f6faf7; border: 1px dashed #cfe4d6; border-radius: 12px; padding: 12px;
    animation: fadeUp .3s ease;
}
.rx-del { height: 38px; border: 1px solid #e5c9c9; background: #fdf3f3; color: #b03e3e; border-radius: 9px; cursor: pointer; font-size: 14px; transition: all .2s }
.rx-del:hover { background: #f8e0e0; transform: scale(1.06) }
.rx-qty input { text-align: center }
.rx-card { border: 1px solid #e3ece6; border-radius: 13px; margin-bottom: 10px; background: #fff; overflow: hidden }
.rx-card summary {
    display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; gap: 2px 10px;
    align-items: center; padding: 13px 15px; cursor: pointer; list-style: none; user-select: none;
}
.rx-card summary::-webkit-details-marker { display: none }
.rx-card summary::after { content: '▾'; color: #9db3a6; grid-column: 4; grid-row: 1 / span 2 }
.rx-card[open] summary::after { content: '▴' }
.rx-card summary:hover { background: #f6faf7 }
.rx-status { font-size: 10px; font-weight: 800; padding: 4px 10px; border-radius: 99px; grid-row: 1 / span 2 }
.rx-status.aktif { background: #fff4e3; color: #a06b14 }
.rx-status.diserahkan { background: #e9f7ef; color: #0b6e41 }
.rx-card summary small { grid-column: 2 }
.rx-doctor { grid-column: 3; font-size: 10.5px; color: #7d938a; font-weight: 700; text-align: right }
.rx-body { padding: 4px 15px 15px; border-top: 1px solid #eef4ef }
.rx-dispense { display: flex; gap: 12px; align-items: center; margin-top: 12px; flex-wrap: wrap }
.rx-filter select { padding: 8px 12px; border-radius: 10px; border: 1px solid #d7e4da; background: #fff; font-weight: 700 }
.rx-done summary b { color: #57766a }

/* ---------------- PROFIL / KV ---------------- */
.kv { width: 100%; border-collapse: collapse; margin-bottom: 18px }
.kv td { padding: 9px 4px; border-bottom: 1px solid #eef4ef; font-size: 13.5px; vertical-align: top }
.kv td:first-child { color: #7d938a; width: 175px }
.panel-form { display: flex; flex-direction: column; gap: 13px }
.check-row { display: flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13.5px }
.check-row input { width: 18px; height: 18px; accent-color: #0b7a45 }

/* ---------------- LOG ---------------- */
.tag-danger { background: #fbe9e9; color: #b03e3e }

/* ---------------- HALAMAN PASIEN PUBLIK ---------------- */
.survey-shell-wide { max-width: 880px }
.schedule-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 16px 0 }
.day-card { background: #f6faf7; border: 1px solid #dfe9e2; border-radius: 14px; padding: 13px; animation: fadeUp .4s ease both }
.day-title {
    font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
    color: #fff; background: #0b7a45; border-radius: 8px; padding: 6px 10px; display: inline-block; margin-bottom: 10px;
}
.day-doc { padding: 7px 0; border-bottom: 1px dashed #d7e4da }
.day-doc:last-child { border-bottom: none }
.day-doc b { display: block; font-size: 13px; color: #16382a }
.day-doc small { color: #7d938a; font-size: 11.5px }
.regis-success { text-align: center; padding: 26px 8px }
.regis-check {
    width: 74px; height: 74px; margin: 0 auto 16px; border-radius: 50%;
    background: #e9f7ef; color: #0b9552; font-size: 36px; display: grid; place-items: center;
    border: 3px solid #0b9552; animation: vennPop .6s cubic-bezier(.34,1.56,.64,1) both;
}
.rm-box {
    font-size: 30px; font-weight: 900; letter-spacing: 3px; color: #0b6e41;
    background: #eefaf2; border: 2px dashed #7cc79c; border-radius: 14px;
    padding: 16px; margin: 16px auto; max-width: 340px; font-variant-numeric: tabular-nums;
}
.captcha-row { display: flex; align-items: center; gap: 10px }
.captcha-row input { flex: 1 }
.captcha-refresh {
    width: 46px; height: 46px; border-radius: 10px; border: 1px solid #d7e4da; background: #fff;
    font-size: 18px; cursor: pointer; transition: all .2s;
}
.captcha-refresh:hover { background: #e9f7ef; transform: rotate(90deg) }
.btn-wide { width: 100% }

/* ---------------- RESPONSIF ---------------- */
@media (max-width: 1100px) {
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)) }
    .panels { grid-template-columns: 1fr }
    .chart-grid { grid-template-columns: 1fr }
    .rx-grid { grid-template-columns: 1fr }
    .rx-item { grid-template-columns: 1fr 1fr; }
    .rx-qty, .rx-item .rx-del { grid-column: auto }
}
@media (max-width: 640px) {
    .rx-item { grid-template-columns: 1fr }
    .notif-panel { right: -60px }
    .profile-link div:last-child { display: none }
}
@media (max-width: 760px) {
    .sidebar { transform: translateX(-100%); transition: transform .2s; box-shadow: 8px 0 35px #091d141c }
    body.mobile-open .sidebar { transform: translateX(0) }
    .main { margin-left: 0; width: 100% }
    .topbar { padding: 0 18px; height: 66px }
    .mobile-menu { display: inline-block; border: 0; background: #e9f6ed; color: #0b7142; border-radius: 8px; padding: 9px }
    .content { padding: 19px 16px }
    .hero { padding: 24px 20px }
    .hero h1 { font-size: 21px }
    .hero-badge { display: none }
    .stats { gap: 10px }
    .stat { padding: 16px; min-height: 125px }
    .stat strong { font-size: 21px }
    .login-page { grid-template-columns: 1fr }
    .login-art { padding: 38px 25px; min-height: 260px }
    .login-logo { width: 68px; height: 68px; border-radius: 14px }
    .login-art h1 { font-size: 26px; margin: 15px 0 6px }
    .login-art p { font-size: 12px }
    .login-form-wrap { padding: 38px 22px }
    .form-grid { grid-template-columns: 1fr }
    .toolbar { align-items: stretch; flex-direction: column }
    .toolbar input { width: 100% }
    .profile b { max-width: 105px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
    .app-footer { flex-direction: column; text-align: center; padding: 16px 18px }
    .rating-choice { grid-template-columns: repeat(3, 1fr) }
}
