
:root {
    --blue-deep:    #0B3D6E;
    --blue-mid:     #1565C0;
    --blue-bright:  #2196F3;
    --blue-light:   #E3F2FD;
    --blue-pale:    #F0F8FF;
    --teal:         #00ACC1;
    --white:        #FFFFFF;
    --gray-50:      #FAFBFC;
    --gray-100:     #F4F6F9;
    --gray-200:     #EDF2F7;
    --gray-400:     #A0AEC0;
    --gray-600:     #718096;
    --gray-800:     #2D3748;
    --success:      #38A169;
    --warning:      #D69E2E;
    --danger:       #E53E3E;
    --shadow-sm:    0 2px 8px rgba(11,61,110,.07);
    --shadow-md:    0 4px 20px rgba(11,61,110,.12);
    --shadow-lg:    0 8px 40px rgba(11,61,110,.18);
    --radius:       16px;
    --radius-sm:    10px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--gray-100);
    color: var(--gray-800);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ════════════════════════════════
    HEADER — NEW DESIGN
════════════════════════════════ */
.site-header {
    /* background: linear-gradient(135deg, #0B3D6E 0%, #1565C0 55%, #0097A7 100%); */
    /* background: linear-gradient(135deg, #ffffff 0%, #1565C0 55%, #0b3d6e 100%); */
    background: linear-gradient(135deg, #ffffff 0%, #fcfcfd 55%, #f3f3f3 100%);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 24px rgba(11,61,110,.28);
}

/* Top strip: logos row */
.header-logos-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px 0;
    gap: 12px;
}

/* RS logo (left) */
.logo-rs-wrap {
    display: flex;
    /* align-items: center; */
    /* flex-shrink: 0; */

    margin-bottom: 1.1%;
}
.logo-rs-img {
    height: 46px;
    width: auto;
    object-fit: contain;
    filter: brightness(1) drop-shadow(0 1px 4px rgba(0,0,0,.25));
}

/* Center tagline */
.header-center-tag {
    flex: 1;
    text-align: center;
    display: none; /* show on md+ */
}
.header-center-tag p {
    font-size: 11px;
    color: rgba(255,255,255,.65);
    margin: 0;
    font-style: italic;
    letter-spacing: .2px;
}

/* Partner logos (right) */
.header-partners {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
/* .partner-badge {
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 8px;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
} */

.partner-badge {
    background: rgb(29 133 225);
    border: 1px solid rgb(28 130 222);
    border-radius: 24px;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    margin-bottom: 13px;
}

.partner-badge i { font-size: 14px; color: rgba(255,255,255,.85); }
.partner-badge span { font-size: 10px; font-weight: 700; color: rgba(255,255,255,.85); line-height: 1.2; }
.partner-badge .sub { font-weight: 400; font-size: 9px; display: block; color: rgba(255,255,255,.6); }

/* Bottom strip: page title bar */
.header-title-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 20px 10px;
    margin-top: 6px;
    border-top: 1px solid rgba(255,255,255,.12);
    gap: 10px;
}
.header-page-label {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255,255,255,.9);
    letter-spacing: .3px;
    display: flex;
    align-items: center;
    gap: 7px;
}
.header-page-label i { color: var(--teal); font-size: 13px; }
.header-badge {
    background: rgba(255,255,255,.15);
    color: #fff;
    font-size: 10px; font-weight: 700;
    padding: 3px 10px; border-radius: 20px;
    border: 1px solid rgba(255,255,255,.25);
    letter-spacing: .5px;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ════════════════════════════════
    PROGRESS WIDGET — STANDALONE
════════════════════════════════ */
.progress-widget {
    display: none;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    padding: 16px 20px 14px;
    margin-bottom: 20px;
}
.progress-widget.visible { display: block; }

.progress-steps {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}
.step-dot {
    width: 30px; height: 30px;
    border-radius: 50%;
    border: 2px solid var(--gray-200);
    background: var(--gray-100);
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 800; color: var(--gray-400);
    transition: all .3s;
    flex-shrink: 0;
    position: relative;
}
.step-dot.active {
    background: var(--blue-bright);
    border-color: var(--blue-bright);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(33,150,243,.18);
}
.step-dot.done {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}
.step-dot.done::after {
    content: '✓';
    font-size: 13px;
}
.step-dot.done .dot-num { display: none; }
.step-line {
    flex: 1; height: 3px;
    background: var(--gray-200);
    border-radius: 2px;
    transition: background .4s;
    margin: 0 4px;
}
.step-line.done { background: var(--success); }

.progress-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.progress-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--blue-deep);
}
.progress-pct {
    font-size: 11px;
    font-weight: 700;
    color: var(--blue-bright);
}
.progress { height: 5px; background: var(--gray-200); border-radius: 3px; margin-bottom: 0; }
.progress-bar { background: linear-gradient(90deg, var(--blue-bright), var(--teal)); border-radius: 3px; transition: width .5s ease; }

/* Step labels row */
.step-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
}
.step-label-item {
    font-size: 9px;
    color: var(--gray-400);
    font-weight: 600;
    text-align: center;
    flex: 1;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.step-label-item.active { color: var(--blue-bright); }
.step-label-item.done { color: var(--success); }

/* ════════════════════════════════
    MAIN CONTENT
════════════════════════════════ */
main { flex: 1; padding: 20px 14px 40px; max-width: 680px; margin: 0 auto; width: 100%; }

/* ─── CARDS ─── */
.card-custom {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: none;
    overflow: hidden;
    transition: box-shadow .25s;
}

.card-header-blue {
    background: linear-gradient(90deg, var(--blue-mid), var(--blue-bright));
    padding: 18px 22px;
    display: flex; align-items: center; gap: 12px;
}
.card-header-blue .icon-wrap {
    width: 40px; height: 40px;
    background: rgba(255,255,255,.2);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.card-header-blue .icon-wrap i { font-size: 18px; color: #fff; }
.card-header-blue h2 {
    font-size: 15px; font-weight: 700; color: #fff;
    margin: 0; line-height: 1.3;
}
.card-header-blue p { font-size: 12px; color: rgba(255,255,255,.75); margin: 0; }

.card-body-pad { padding: 22px 20px; }

/* ─── FORM ELEMENTS ─── */
.form-label-custom {
    font-size: 13px; font-weight: 700;
    color: var(--blue-deep); margin-bottom: 6px;
    display: flex; align-items: center; gap: 6px;
}
.form-label-custom i { color: var(--blue-bright); font-size: 14px; }

.form-control-custom {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    font-size: 15px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: border-color .25s, box-shadow .25s;
    background: var(--gray-50);
    width: 100%;
}
.form-control-custom:focus {
    outline: none;
    border-color: var(--blue-bright);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(33,150,243,.12);
}
.form-control-custom.is-invalid { border-color: var(--danger); }
.invalid-msg { font-size: 12px; color: var(--danger); margin-top: 4px; display: none; }
.is-invalid ~ .invalid-msg { display: block; }

/* ─── BUTTONS ─── */
.btn-primary-custom {
    background: linear-gradient(135deg, var(--blue-mid), var(--blue-bright));
    border: none; color: #fff;
    padding: 15px 32px;
    border-radius: var(--radius-sm);
    font-size: 15px; font-weight: 700;
    width: 100%; cursor: pointer;
    transition: transform .2s, box-shadow .2s;
    box-shadow: 0 4px 15px rgba(21,101,192,.35);
    display: flex; align-items: center; justify-content: center; gap: 10px;
}
.btn-primary-custom:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(21,101,192,.45); }

.btn-success-custom {
    background: linear-gradient(135deg, #2E7D32, var(--success));
    border: none; color: #fff;
    padding: 15px 32px;
    border-radius: var(--radius-sm);
    font-size: 15px; font-weight: 700;
    width: 100%; cursor: pointer;
    transition: transform .2s, box-shadow .2s;
    box-shadow: 0 4px 15px rgba(56,161,105,.35);
    display: flex; align-items: center; justify-content: center; gap: 10px;
}
.btn-success-custom:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(56,161,105,.45); }

/* ─── PATIENT INFO ─── */
.patient-info-card {
    background: linear-gradient(135deg, var(--blue-pale), var(--blue-light));
    border: 2px solid rgba(33,150,243,.2);
    border-radius: var(--radius);
    padding: 18px;
}
.patient-avatar {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue-mid), var(--teal));
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
}
.patient-avatar i { font-size: 24px; color: #fff; }
.patient-name { font-size: 17px; font-weight: 800; color: var(--blue-deep); margin: 0 0 2px; }
.patient-meta { font-size: 12px; color: var(--gray-600); }
.info-pill {
    display: inline-flex; align-items: center; gap: 5px;
    background: rgba(33,150,243,.1);
    color: var(--blue-mid);
    font-size: 12px; font-weight: 600;
    padding: 5px 11px; border-radius: 20px;
    border: 1px solid rgba(33,150,243,.2);
    margin: 4px 4px 0 0;
}

/* ─── RIWAYAT CARDS ─── */
.riwayat-card {
    background: #fff;
    border-radius: var(--radius);
    border: 2px solid var(--gray-200);
    padding: 16px 16px 14px;
    transition: border-color .25s, box-shadow .25s, transform .25s;
}
.riwayat-card:hover {
    border-color: var(--blue-bright);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.riwayat-badge {
    font-size: 10px; font-weight: 700;
    padding: 3px 10px; border-radius: 20px;
    text-transform: uppercase; letter-spacing: .5px;
}
.riwayat-badge.selesai { background: #C6F6D5; color: #276749; }
.riwayat-badge.aktif   { background: #BEE3F8; color: #2B6CB0; }
.riwayat-meta { font-size: 12.5px; color: var(--gray-600); margin-bottom: 4px; }
.riwayat-meta i { width: 16px; color: var(--blue-bright); }
.riwayat-diagnosa {
    background: var(--blue-pale);
    border-left: 3px solid var(--blue-bright);
    border-radius: 0 8px 8px 0;
    padding: 8px 12px;
    font-size: 13px; font-weight: 600;
    color: var(--blue-deep);
    margin: 10px 0 12px;
}
.btn-isi-kuisioner {
    background: linear-gradient(135deg, var(--blue-mid), var(--blue-bright));
    border: none; color: #fff;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 700;
    width: 100%; cursor: pointer;
    transition: transform .2s, box-shadow .2s;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    box-shadow: 0 3px 12px rgba(21,101,192,.3);
}

.btn-isi-kuisioner-disabled {
    background: linear-gradient(40deg, #465363, #646566);
    border: none; color: #fff;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 700;
    width: 100%; cursor: pointer;
    transition: transform .2s, box-shadow .2s;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    box-shadow: 0 3px 12px rgba(21,101,192,.3);
}
.btn-isi-kuisioner:hover { transform: translateY(-2px); box-shadow: 0 5px 18px rgba(21,101,192,.4); }

/* ─── SECTION TITLE ─── */
.section-title {
    font-size: 11px; font-weight: 800;
    color: var(--blue-mid);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 24px 0 12px;
    display: flex; align-items: center; gap: 8px;
}
.section-title::after {
    content: ''; flex: 1; height: 2px;
    background: linear-gradient(90deg, var(--blue-light), transparent);
    border-radius: 1px;
}

/* ─── STAR RATING ─── */
.star-group { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.star-group input { display: none; }
.star-group label {
    font-size: 50px; 
    color: var(--gray-200);
    cursor: pointer;
    transition: color .2s, transform .15s;
    line-height: 1;
}
.star-group label:hover,
.star-group label:hover ~ label,
.star-group input:checked ~ label { color: #F6C90E; }
.star-group label:hover { transform: scale(1.15); }
.star-desc {
    font-size: 12px; color: var(--gray-600); margin-top: 4px;
    min-height: 18px; transition: color .2s;
}

/* ─── QUESTION CARD ─── */
.q-card {
    background: #fff;
    border-radius: var(--radius-sm);
    border: 2px solid var(--gray-200);
    padding: 16px 16px 12px;
    margin-bottom: 12px;
    transition: border-color .25s;
}
.q-card:focus-within { border-color: var(--blue-bright); }
.q-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px;
    background: var(--blue-mid);
    color: #fff; border-radius: 50%;
    font-size: 11px; font-weight: 800;
    margin-right: 8px; flex-shrink: 0;
}
.q-text { font-size: 14px; font-weight: 600; color: var(--blue-deep); line-height: 1.4; }

.check-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background .2s;
    margin-bottom: 4px;
}
.check-item:hover { background: var(--blue-pale); }
.check-item input[type="checkbox"],
.check-item input[type="radio"] {
    width: 20px; height: 20px;
    accent-color: var(--blue-bright);
    cursor: pointer; flex-shrink: 0;
}
.check-item span { font-size: 14px; color: var(--gray-800); }

.textarea-custom {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    font-size: 14px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    resize: vertical; min-height: 110px; width: 100%;
    transition: border-color .25s, box-shadow .25s;
    background: var(--gray-50);
}
.textarea-custom:focus {
    outline: none;
    border-color: var(--blue-bright);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(33,150,243,.12);
}
.char-count { font-size: 11px; color: var(--gray-400); text-align: right; margin-top: 4px; }

/* ─── SELECTED BANNER ─── */
.selected-banner {
    background: linear-gradient(90deg, var(--blue-mid), var(--teal));
    border-radius: var(--radius-sm);
    padding: 13px 16px;
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 18px;
}
.selected-banner i { color: rgba(255,255,255,.8); font-size: 18px; }
.selected-banner .label { font-size: 10px; color: rgba(255,255,255,.7); text-transform: uppercase; letter-spacing: .5px; }
.selected-banner .value { font-size: 13px; color: #fff; font-weight: 700; }

/* ─── SUCCESS ─── */
.success-wrap { text-align: center; padding: 16px 6px 36px; }
.success-icon {
    width: 96px; height: 96px;
    background: linear-gradient(135deg, #C6F6D5, #9AE6B4);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 22px;
    box-shadow: 0 8px 30px rgba(56,161,105,.25);
    animation: popIn .5s cubic-bezier(.34,1.56,.64,1) forwards;
}
.success-icon i { font-size: 44px; color: var(--success); }
@keyframes popIn { from{transform:scale(0);opacity:0} to{transform:scale(1);opacity:1} }
.success-title { font-size: 22px; font-weight: 800; color: var(--blue-deep); margin-bottom: 10px; }
.success-sub { font-size: 14px; color: var(--gray-600); line-height: 1.65; margin-bottom: 24px; }
.success-card {
    background: var(--blue-pale);
    border: 2px solid rgba(33,150,243,.2);
    border-radius: var(--radius);
    padding: 16px 18px;
    text-align: left; margin-bottom: 14px;
}
.success-card h4 { font-size: 13px; font-weight: 700; color: var(--blue-mid); margin-bottom: 5px; }
.success-card p { font-size: 13px; color: var(--gray-600); margin: 0; line-height: 1.6; }

/* ─── LOADING ─── */
.spinner-wrap {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 40px 20px;
}
.spinner-circle {
    width: 48px; height: 48px;
    border: 4px solid var(--blue-light);
    border-top-color: var(--blue-bright);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.spinner-text { margin-top: 14px; font-size: 14px; color: var(--gray-600); font-weight: 500; }

/* ─── FOOTER ─── */
footer {
    /* background: var(--blue-deep); */
    background: white;
    color: rgba(255,255,255,.55);
    text-align: center;
    padding: 16px;
    font-size: 12px;
    margin-top: auto;
}
footer a { color: var(--teal); text-decoration: none; }

/* ─── PAGE TRANSITIONS ─── */
.page { display: none; animation: fadeUp .35s ease forwards; }
.page.active { display: block; }
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── UTILITIES ─── */
.text-muted-sm { font-size: 12px; color: var(--gray-400); }

/* ─── RESPONSIVE ─── */
@media (min-width: 576px) {
    .header-center-tag { display: block; }
    .logo-rs-img { height: 52px; }
    main { padding: 24px 20px 60px; }
}
@media (min-width: 768px) {
    main { padding: 32px 0 70px; }
    .header-logos-row { padding: 12px 28px 0; }
    .header-title-bar { padding: 8px 28px 11px; }
}
@media (max-width: 400px) {
    .partner-badge span { display: none; }
    .partner-badge { padding: 5px 8px; }
}



.btn-back{
    border:none;
    background:#fff;
    color:#2563eb;
    padding:10px 16px;
    border-radius:12px;
    font-weight:600;
    margin-bottom:15px;
    box-shadow:0 2px 8px rgba(0,0,0,.08);
    cursor:pointer;
    transition:.2s;
}

.btn-back:hover{
    background:#eff6ff;
}