/* ==========================================
   1. VARIABEL & GLOBAL STYLING
   ========================================== */
:root { 
    --primary: #0f4c81; 
    --primary-hover: #0a355c; 
    --bg-body: #f8fafc; 
    --card-border: #e2e8f0; 
}

body { 
    background-color: var(--bg-body); 
    font-family: 'Plus Jakarta Sans', sans-serif; 
    color: #1e293b; 
}

.survey-container { 
    background: #ffffff; 
    border-radius: 20px; 
    box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.05); 
    border: 1px solid var(--card-border); 
    overflow: hidden; 
    width: 100%; 
}

.step { display: none; } 
.step.active { display: block; }

.form-select, .form-control { 
    display: block; 
    width: 100% !important; 
    border-radius: 12px; 
    border: 1.5px solid #cbd5e1; 
    padding: 12px 14px; 
    font-size: 0.9rem; 
    font-weight: 500; 
}


/* Likert Scale Buttons (Ubah dari 6 kolom menjadi 5 kolom) */
.likert-group { 
    display: grid; 
    grid-template-columns: repeat(5, 1fr); 
    gap: 6px; 
    margin-top: 8px; 
    width: 100%; 
}

.likert-option { position: relative; width: 100%; }
.likert-option input[type="radio"] { 
    position: absolute; 
    opacity: 0; 
    cursor: pointer; 
    width: 100%; 
    height: 100%; 
    z-index: 2; 
}

.likert-btn { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    height: 52px; 
    background: #f8fafc; 
    border: 2px solid #e2e8f0; 
    border-radius: 12px; 
    font-weight: 800; 
    color: #64748b; 
}

.likert-option.opt-98 .likert-btn { background: #f1f5f9; border-color: #cbd5e1; color: #64748b; }
.likert-option input[type="radio"]:checked + .likert-btn { 
    background: var(--primary); 
    color: #ffffff; 
    border-color: var(--primary); 
    box-shadow: 0 4px 12px rgba(15, 76, 129, 0.3); 
}
.likert-option.opt-98 input[type="radio"]:checked + .likert-btn { background: #475569; border-color: #475569; color: #ffffff; }

.likert-legend { 
    display: flex; 
    justify-content: space-between; 
    font-size: 0.75rem; 
    font-weight: 600; 
    color: #64748b; 
    margin-bottom: 4px; 
}

.sub-question-box { 
    background: #f8fafc; 
    border: 1px solid #e2e8f0; 
    border-left: 5px solid var(--primary); 
    border-radius: 14px; 
    padding: 18px; 
    margin-top: 18px; 
}

.btn-brand { 
    background: var(--primary); 
    color: white; 
    border-radius: 12px; 
    padding: 12px 24px; 
    font-weight: 700; 
    border: none; 
}
.btn-brand:hover { background: var(--primary-hover); color: white; }

.btn-outline-custom { 
    border: 2px solid #e2e8f0; 
    color: #64748b; 
    border-radius: 12px; 
    padding: 12px 24px; 
    font-weight: 700; 
    background: transparent; 
}

/* ==========================================
   2. TABEL KISH GRID DESKTOP
   ========================================== */
#kkTable {
    width: 100% !important;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0 6px;
}

#kkTable th {
    vertical-align: middle;
    padding: 10px 6px;
    font-size: 0.875rem;
}

#kkTable td {
    vertical-align: middle;
    padding: 6px;
    background-color: #ffffff;
}

#kkTable .col-no { width: 45px; text-align: center; }
#kkTable .col-nama { width: 32%; }
#kkTable .col-usia { width: 85px; text-align: center; }
#kkTable .col-gender { width: 110px; }
#kkTable .col-status { width: 130px; text-align: center; }
#kkTable .col-aksi { width: 45px; text-align: center; }

#kkTable input.form-control,
#kkTable select.form-select {
    width: 100% !important;
    height: 38px !important;
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    box-sizing: border-box;
}

.badge-status {
    display: inline-block;
    width: 100%;
    max-width: 110px;
    padding: 0.4em 0.5em;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    text-align: center;
    white-space: nowrap;
}

/* ==========================================
   3. TAMPILAN CARD KISH GRID MOBILE (< 576px)
   ========================================== */
@media (max-width: 575.98px) {
    .likert-group { gap: 4px; } 
    .likert-btn { height: 48px !important; }

    #kkTable thead {
        display: none;
    }

    #kkTbody tr {
        display: block;
        background-color: #ffffff;
        border: 1px solid #e2e8f0 !important;
        border-radius: 12px;
        padding: 12px 14px;
        margin-bottom: 12px;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
        position: relative;
    }

    #kkTbody td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 5px 0 !important;
        border: none !important;
        width: 100% !important;
        background: transparent !important;
    }

    #kkTbody td:nth-child(1)::before { content: "No. Anggota:"; font-weight: 600; font-size: 0.85rem; color: #475569; }
    #kkTbody td:nth-child(2)::before { content: "Nama:"; font-weight: 600; font-size: 0.85rem; color: #475569; }
    #kkTbody td:nth-child(3)::before { content: "Usia:"; font-weight: 600; font-size: 0.85rem; color: #475569; }
    #kkTbody td:nth-child(4)::before { content: "Gender:"; font-weight: 600; font-size: 0.85rem; color: #475569; }
    #kkTbody td:nth-child(5)::before { content: "Status:"; font-weight: 600; font-size: 0.85rem; color: #475569; }

    #kkTbody td input, 
    #kkTbody td select {
        width: 60% !important;
        max-width: 200px !important;
        text-align: left !important;
    }

    #kkTbody td.col-status {
        justify-content: space-between;
    }

    #kkTbody td:last-child {
        position: absolute;
        top: 10px;
        right: 12px;
        width: auto !important;
    }
    #kkTbody td:last-child::before {
        content: "";
    }
}