@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

.riwayat-wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 16px;
}

.riwayat-header {
    text-align: center;
    margin-bottom: 32px;
}

.riwayat-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: #2D5A3D;
    margin-bottom: 6px;
}

.riwayat-subtitle {
    font-size: 13px;
    color: #6B7F70;
}

/* ─── Empty ─── */
.riwayat-empty {
    text-align: center;
    padding: 60px 20px;
    color: #6B7F70;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.btn-cek {
    display: inline-block;
    margin-top: 16px;
    padding: 10px 24px;
    background: linear-gradient(135deg, #4F7C59, #2D5A3D);
    color: white;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-cek:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(45,90,61,0.25);
    color: white;
}

/* ─── Card ─── */
.riwayat-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.riwayat-card {
    background: #ffffff;
    border: 1px solid #D8E8D2;
    border-radius: 16px;
    padding: 20px 24px;
    box-shadow: 0 4px 16px rgba(45,90,61,0.07);
}

.riwayat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}

.riwayat-hasil-badge {
    font-size: 13px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 50px;
}

.riwayat-hasil-badge.gastritis {
    background: #fff3e0;
    color: #e65100;
}

.riwayat-hasil-badge.gerd {
    background: #fce4ec;
    color: #c62828;
}

.riwayat-hasil-badge.dispepsia {
    background: #e8f5e9;
    color: #2e7d32;
}

.riwayat-tanggal {
    font-size: 12px;
    color: #6B7F70;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ─── Section ─── */
.riwayat-section {
    border-top: 1px solid #E8F0E5;
    padding-top: 12px;
    margin-top: 12px;
}

.riwayat-section-label {
    font-size: 11px;
    font-weight: 700;
    color: #7DAA6E;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.riwayat-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 3px 0;
}

.riwayat-key {
    color: #6B7F70;
}

.riwayat-val {
    font-weight: 600;
    color: #1C2B22;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 300px;
}

/* ─── Gejala Tags ─── */
.riwayat-gejala-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.gejala-tag {
    background: #F4FAF1;
    border: 1px solid #D8E8D2;
    color: #2D5A3D;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 50px;
}

/* ─── Gaya Hidup Tags ─── */
.riwayat-gayahidup-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.gayahidup-tag {
    font-size: 12px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 50px;
}

.gayahidup-tag.aktif {
    background: #fff0f0;
    color: #c0392b;
    border: 1px solid #f5c6cb;
}

.gayahidup-tag.tidak {
    background: #F4FAF1;
    color: #2D5A3D;
    border: 1px solid #D8E8D2;
}

/* ─── Indikasi Lain Tags ─── */
.riwayat-indikasi-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.indikasi-tag {
    background: #fff8e1;
    border: 1px solid #ffe082;
    color: #f57f17;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 50px;
}

/* ─── Saran ─── */
.riwayat-saran-text {
    font-size: 12.5px;
    color: #5a4a00;
    line-height: 1.65;
    background: #fffbee;
    border: 1px solid rgba(245, 217, 122, 0.5);
    border-left: 3px solid #e6a800;
    border-radius: 8px;
    padding: 10px 13px;
    margin: 0;
}
