/*
 * Aplikasi pengguna (orang tua, kader, tenaga kesehatan). Mobile-first, kolom tunggal maksimal 480px.
 * Gaya ramah dan berwarna: biru sebagai warna utama, mint dan kuning sebagai pendamping,
 * kartu membulat besar, ikon dalam kotak berwarna.
 */

.usr-body {
    --accent: #16a34a;
    --accent-ink: #15803d;
    --accent-wash: #dcfce7;
    --navy: #0f172a;
    --ink: #0f172a;
    --ink-soft: #334155;
    --muted: #64748b;
    --line: #e2e8f0;
    --line-soft: #f1f5f9;
    --bg: #f0fdf4;
    --mint: #dcfce7;
    --mint-ink: #15803d;
    --mint-strong: #22c55e;
    --sun: #fef3c7;
    --sun-ink: #92400e;
    --pink: #ffe4e6;
    --pink-ink: #be123c;
    --sky: #e0f2fe;
    --sky-ink: #0369a1;
    --shadow: 0 6px 18px rgba(15, 23, 42, .07);
    --font: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;

    margin: 0;
    background: #e2ece6;
    color: var(--ink-soft);
    font-family: var(--font);
    font-size: 15.5px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.usr-body h1, .usr-body h2, .usr-body h3, .usr-body h4, .usr-body h5, .usr-body h6 {
    color: var(--ink); font-family: var(--font); font-weight: 800; letter-spacing: -0.01em;
}

.usr-shell { max-width: 480px; min-height: 100vh; margin: 0 auto; background: var(--bg); position: relative; box-shadow: 0 0 40px rgba(15, 23, 42, .08); }

/* ---------------------------------------------------------------- bilah atas */
.usr-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: #fff; }
.usr-brand { font-weight: 800; font-size: 20px; letter-spacing: -0.02em; color: var(--accent); text-decoration: none; display: inline-flex; align-items: center; gap: 7px; }
.usr-chip { margin-left: auto; max-width: 62%; display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; background: var(--accent-wash); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 14px; }
.usr-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usr-chip i { color: var(--accent); font-size: 11px; }
.usr-chip .avatar { width: 28px; height: 28px; }
.usr-role { margin-left: auto; font-size: 13px; color: var(--accent-ink); background: var(--accent-wash); padding: 4px 12px; border-radius: 999px; font-weight: 700; }
.usr-main { padding: 16px 16px 120px; }
.usr-main.has-hero { padding-top: 0; }

/* ---------------------------------------------------------------- navigasi bawah dan tombol melayang */
.usr-nav {
    position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; z-index: 40;
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    background: #fff; border-radius: 24px 24px 0 0; box-shadow: 0 -6px 24px rgba(15, 23, 42, .09);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
}
.usr-nav a, .usr-nav button {
    display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 2px; color: var(--muted);
    font-size: 11.5px; font-weight: 700; text-decoration: none; background: none; border: 0;
}
.usr-nav i { font-size: 20px; line-height: 1; width: 52px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; transition: background .15s; }
.usr-nav a.is-active { color: var(--accent); }
.usr-nav a.is-active i { background: var(--accent-wash); }
.usr-nav form { display: contents; }

.fab { white-space: nowrap;
    position: fixed; bottom: 86px; left: 50%; transform: translateX(-50%); z-index: 35;
    display: inline-flex; align-items: center; gap: 8px; padding: 13px 24px; border-radius: 999px; border: 0;
    background: var(--accent); color: #fff; font-weight: 800; font-size: 15.5px; text-decoration: none;
    box-shadow: 0 10px 24px rgba(22, 163, 74, .35);
}
.fab:hover { color: #fff; background: var(--accent-ink); }

/* ---------------------------------------------------------------- kepala beranda */
.hero { position: relative; margin: 0; padding: 20px 20px 78px; background: var(--accent); color: #fff; border-radius: 0 0 30px 30px; overflow: hidden; }
.hero::before, .hero::after { content: ''; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .09); }
.hero::before { width: 170px; height: 170px; right: -50px; top: -60px; }
.hero::after { width: 90px; height: 90px; right: 60px; bottom: -34px; background: rgba(255, 255, 255, .14); }
.hero h1 { color: #fff; font-size: 26px; margin: 0; position: relative; z-index: 1; }
.hero p { margin: 2px 0 0; color: #dcfce7; font-size: 14.5px; position: relative; z-index: 1; }
.hero .spark { position: absolute; right: 26px; top: 22px; width: 34px; height: 34px; z-index: 1; }
.hero-card { position: relative; z-index: 2; margin-top: -54px; }

.avatar { width: 56px; height: 56px; flex-shrink: 0; display: block; }

/* ---------------------------------------------------------------- tipografi dan panel */
.u-h1 { font-size: 24px; font-weight: 800; margin: 0; }
.u-lead { margin: 2px 0 0; color: var(--muted); font-size: 14.5px; }
.u-head { margin-bottom: 14px; }
.u-back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 8px; padding: 4px 12px 4px 8px; border-radius: 999px; background: #fff; color: var(--ink-soft); font-size: 13px; font-weight: 700; text-decoration: none; box-shadow: var(--shadow); }
.u-back:hover { color: var(--accent); }
.u-section { font-size: 15px; font-weight: 800; color: var(--ink); margin: 22px 2px 10px; }
.u-muted { color: var(--muted); }
.u-small { font-size: 13.5px; }

.u-panel, .card--shadow-2 { background: #fff; border: 0; border-radius: 22px; box-shadow: var(--shadow); padding: 16px; }
.u-panel + .u-panel, .u-panel + .u-list, .u-list + .u-panel { margin-top: 12px; }
.br-10 { border-radius: 22px; }
.u-panel-title { font-size: 16px; font-weight: 800; margin: 0 0 10px; }
.u-panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.u-panel-head .u-panel-title { margin: 0; }
.u-panel-head a, .u-panel-head span { font-size: 13.5px; color: var(--muted); font-weight: 600; }
.u-divider { border: 0; border-top: 2px dashed var(--line); margin: 14px 0; }
.u-panel.is-mint { background: var(--mint); box-shadow: none; }
.u-panel.is-sky { background: var(--sky); box-shadow: none; }

/* daftar baris */
.u-list { background: #fff; border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; }
.u-row { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line-soft); color: inherit; text-decoration: none; background: transparent; }
.u-row:last-child { border-bottom: 0; }
a.u-row:hover, a.u-row:active { background: #f7fdf9; color: inherit; }
.u-row > i.lead-icon { width: 42px; height: 42px; border-radius: 14px; background: var(--accent-wash); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.u-row .grow { flex: 1; min-width: 0; }
.u-row .t { font-weight: 800; color: var(--ink); line-height: 1.3; }
.u-row .d { font-size: 13.5px; color: var(--muted); line-height: 1.35; }
.u-row > i.chev { color: #94a3b8; font-size: 13px; }
.u-row .thumb { width: 60px; height: 60px; border-radius: 14px; background-size: cover; background-position: center; background-color: var(--accent-wash); flex-shrink: 0; }

/* ubin menu berwarna */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { display: block; padding: 14px; border-radius: 22px; text-decoration: none; color: var(--ink); min-height: 112px; position: relative; overflow: hidden; }
.tile i { width: 44px; height: 44px; border-radius: 14px; background: rgba(255, 255, 255, .75); display: inline-flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 10px; }
.tile b { display: block; font-weight: 800; line-height: 1.25; }
.tile span { display: block; font-size: 12.5px; opacity: .72; margin-top: 2px; line-height: 1.3; }
.tile.is-mint { background: var(--mint); } .tile.is-mint i { color: var(--mint-ink); }
.tile.is-sun { background: var(--sun); } .tile.is-sun i { color: var(--sun-ink); }
.tile.is-sky { background: var(--sky); } .tile.is-sky i { color: var(--sky-ink); }
.tile.is-pink { background: var(--pink); } .tile.is-pink i { color: var(--pink-ink); }

/* ringkasan angka */
.u-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.u-stat { padding: 12px 14px; border-radius: 18px; background: #fff; box-shadow: var(--shadow); text-decoration: none; color: inherit; display: block; }
.u-stat b { display: block; font-size: 28px; line-height: 1.1; color: var(--ink); font-weight: 800; font-variant-numeric: tabular-nums; }
.u-stat span { font-size: 13px; color: var(--muted); font-weight: 600; }
.u-stat.is-high { background: var(--pink); box-shadow: none; } .u-stat.is-high b { color: var(--pink-ink); }
.u-stat.is-mid { background: var(--sun); box-shadow: none; } .u-stat.is-mid b { color: var(--sun-ink); }

/* kartu ukuran (pilih parameter grafik) */
.m-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.m-card { position: relative; border: 2px solid transparent; border-radius: 18px; background: #eef2f6; color: var(--muted); padding: 8px 6px 10px; text-align: left; font: inherit; line-height: 1.2; }
.m-card i { display: flex; align-items: center; justify-content: center; width: 100%; height: 30px; margin-bottom: 8px; border-radius: 10px; background: rgba(255, 255, 255, .6); font-size: 17px; }
.m-card small { display: block; font-size: 11.5px; font-weight: 700; }
.m-card b { display: block; font-size: 17px; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.m-card b em { font-style: normal; font-size: 11.5px; font-weight: 700; }
.m-card.is-active { background: var(--mint); border-color: var(--mint-strong); color: var(--mint-ink); }
.m-card.is-active i { background: var(--mint-strong); color: #fff; }
.m-card.is-active b { color: var(--ink); }
.m-card.is-active::after { content: ''; position: absolute; left: 50%; bottom: -9px; width: 14px; height: 14px; background: var(--mint); border-right: 2px solid var(--mint-strong); border-bottom: 2px solid var(--mint-strong); transform: translateX(-50%) rotate(45deg); border-radius: 0 0 4px 0; }

.chart-card { background: var(--mint); border-radius: 24px; padding: 14px 12px 12px; margin-top: 4px; }
.chart-card .title { text-align: center; font-weight: 800; color: var(--ink); }
.chart-card .big { text-align: center; font-size: 26px; font-weight: 800; color: var(--ink); line-height: 1.2; margin: 2px 0 10px; }
.chart-card .big small { font-size: 14px; font-weight: 700; color: var(--muted); }
.chart-inner { background: #fff; border-radius: 20px; padding: 12px 10px 10px; }
.legend { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; font-size: 12px; color: var(--muted); font-weight: 700; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 5px; vertical-align: -1px; }

/* riwayat aktivitas */
.u-tl { list-style: none; margin: 0; padding: 0; }
.u-tl li { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.u-tl li:last-child { border-bottom: 0; }
.u-tl time { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.u-tl .t { font-weight: 800; color: var(--ink); line-height: 1.3; }
.u-tl .d { font-size: 13.5px; color: var(--muted); }

/* level prioritas sebagai pil lembut */
.usr-body .lvl { padding: 4px 12px 4px 9px; border-radius: 999px; background: var(--line-soft); font-weight: 800; }
.usr-body .lvl.is-tinggi { background: var(--pink); color: var(--pink-ink); }
.usr-body .lvl.is-sedang { background: var(--sun); color: var(--sun-ink); }
.usr-body .lvl.is-rendah { background: var(--mint); color: var(--mint-ink); }
.usr-body .lvl.is-belum { background: var(--line-soft); color: var(--muted); }
.usr-body .lvl::before { border-radius: 50%; }
.usr-body .lvl.is-tinggi::before { background: var(--pink-ink); }
.usr-body .lvl.is-sedang::before { background: var(--sun-ink); }
.usr-body .lvl.is-rendah::before { background: var(--mint-strong); }

.usr-body .u-factor { border: 0; background: var(--bg); border-radius: 14px; }
.usr-body .u-factor .pts { background: #fff; border-radius: 8px; }

/* ---------------------------------------------------------------- formulir dan tombol */
.usr-body label, .usr-body .form-label { font-size: 13.5px; font-weight: 700; color: var(--ink-soft); margin-bottom: 5px; }
.usr-body .form-control, .usr-body .form-select, .usr-body .input-group-text {
    min-height: 48px; border-radius: 14px; border: 2px solid var(--line); font-size: 15.5px; color: var(--ink); background-color: #fff; font-family: var(--font);
}
.usr-body .input-group > .form-control { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.usr-body .input-group > .input-group-text { border-radius: 0 14px 14px 0; background: var(--bg); color: var(--muted); font-weight: 700; border-left: 0; }
.usr-body textarea.form-control { min-height: 88px; }
.usr-body .form-control:focus, .usr-body .form-select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(22, 163, 74, .18); }
.usr-body .form-control::placeholder { color: #94a3b8; }
.usr-body .btn { min-height: 48px; border-radius: 16px; font-weight: 800; font-size: 15.5px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-family: var(--font); }
.usr-body .btn-sm { min-height: 38px; font-size: 14px; padding: 0 14px; border-radius: 12px; }
.usr-body .btn-primary { --bs-btn-bg: var(--accent); --bs-btn-border-color: var(--accent); --bs-btn-hover-bg: var(--accent-ink); --bs-btn-hover-border-color: var(--accent-ink); --bs-btn-active-bg: var(--accent-ink); --bs-btn-active-border-color: var(--accent-ink); --bs-btn-disabled-bg: var(--accent); --bs-btn-disabled-border-color: var(--accent); box-shadow: 0 6px 14px rgba(22, 163, 74, .28); }
.usr-body .btn-outline-primary { --bs-btn-color: var(--accent-ink); --bs-btn-border-color: var(--accent); --bs-btn-hover-bg: var(--accent); --bs-btn-hover-border-color: var(--accent); --bs-btn-hover-color: #fff; --bs-btn-active-bg: var(--accent); --bs-btn-active-border-color: var(--accent); }
.usr-body .btn-outline-secondary { --bs-btn-color: var(--ink-soft); --bs-btn-border-color: var(--line); --bs-btn-bg: #fff; --bs-btn-hover-bg: var(--accent-wash); --bs-btn-hover-border-color: var(--accent-wash); --bs-btn-hover-color: var(--accent-ink); border-width: 2px; }
.usr-body .btn-outline-success { --bs-btn-color: var(--mint-ink); --bs-btn-border-color: var(--mint-strong); --bs-btn-hover-bg: var(--mint-strong); --bs-btn-hover-border-color: var(--mint-strong); border-width: 2px; }
.usr-body .alert { border: 0; border-radius: 16px; font-size: 14.5px; font-weight: 600; }
.usr-body .alert-success { background: var(--mint); color: var(--mint-ink); }
.usr-body .alert-danger { background: var(--pink); color: var(--pink-ink); }
.usr-body .alert-warning { background: var(--sun); color: var(--sun-ink); }
.usr-body .alert-info, .usr-body .alert-secondary { background: var(--sky); color: var(--accent-ink); }
.usr-body .table { font-size: 14px; --bs-table-bg: transparent; }
.usr-body .table thead th { font-size: 12px; font-weight: 800; color: var(--muted); border-bottom: 2px solid var(--line); background: transparent; }
.usr-body .modal-content { border-radius: 24px; border: 0; }
.usr-body .pagination { --bs-pagination-color: var(--accent-ink); --bs-pagination-active-bg: var(--accent); --bs-pagination-active-border-color: var(--accent); --bs-pagination-border-radius: 12px; }
.usr-body .form-check-input:checked { background-color: var(--accent); border-color: var(--accent); }

.u-field { margin-bottom: 14px; }
.u-error { color: var(--pink-ink); font-size: 13px; margin-top: 4px; font-weight: 600; }
.u-filter { display: flex; gap: 8px; margin-bottom: 12px; }
.u-filter .form-control { flex: 1; }

.blog-content { font-size: 16.5px; line-height: 1.75; color: var(--ink-soft); }
.blog-content img { max-width: 100%; height: auto; border-radius: 16px; }
