.page-wrap {
    padding: 24px
}

/* Header */
.header-row {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    gap: 14px;
    align-items: center;
    margin-bottom: 16px;
}

.back-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #eeeeee;
    background: #eeeeee;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.header-row h1 {
    font-size: 22px;
    margin: 0;
    color: #000000;
}

/* Filters */
.filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 12px 0 14px;
}

.select-wrap {
    position: relative
}

/* .select-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 14px;
    background: #f5f6fb;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    font-weight: 600;
    color: #374151;
  } */
.select-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 14px;
    background: #ece8ff;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    font-weight: 600;
    color: #4c2aa6;
    min-width: 300px !important;
}

.select-btn2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 14px;
    background: #ece8ff;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    font-weight: 600;
    color: #4c2aa6;
    min-width: 200px !important;
}

.select-menu {
    position: absolute;
    top: 110%;
    left: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .12);
    padding: 6px;
    display: none;
    z-index: 10;
    min-width: 220px;
}

.select-menu.open {
    display: block
}

.select-item {
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    color: #5340b0;
}

.select-item:hover {
    background: #f3f4f6
}

/* Table */
.qtable {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 30px rgba(50, 50, 93, .06);
    overflow: hidden;
}

.qthead {
    display: grid;
    grid-template-columns: 120px 1fr 120px;
    background: #4C2AA6;
    color: #fff;
    font-weight: 700;
    padding: 14px 18px;
}

.qtbody {
    padding: 0;
    max-height: 70vh;
    overflow-y: scroll;
}

.sectionLabel {
    color: #5340b0;
    font-size: 16px;
    font-weight: 600;
}

.qrow {
    display: grid;
    grid-template-columns: 120px 1fr 120px;
    border-bottom: 1px solid #eef2f7;
    background: #fff;
}

.qrow:nth-child(even) {
    background: #fafbff
}

.col-remark,
.col-question,
.col-bookmark {
    padding: 18px;
    font-size: 12px;
}

.col-remark {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.bubble {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #f87171;
    color: #f87171;
    font-weight: 700;
}

.qtext {
    margin: 0 0 10px 0;
    font-weight: 700
}

.col-bookmark {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Go button */
.go {
    border-radius: 999px;
    border: 1px solid #4c2aa6;
    background: #4c2aa6;
    color: #fff;
    padding: 6px 11px;
    font-size: 14px;
    cursor: pointer;
}

/* Empty/error */
.no-data,
.loading,
.error {
    padding: 18px;
    text-align: center;
    color: #4b5563;
}

/* Pagination */
.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 14px 0;
}

.pg-btn {
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
}

.pg-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.pg-pills {
    display: flex;
    gap: 8px;
}

.pill {
    min-width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #fff;
    cursor: pointer;
}

.pill.active {
    background: #f6c74a;
    border-color: #f6c74a;
    font-weight: 700;
}

.dots {
    padding: 8px 4px;
    color: #6b7280;
}

#layout-menu {
    z-index: 1;
}

/* Modal */
.qp-overlay {
    position: fixed;
    inset: 0;
    background: rgba(34, 0, 66, .06);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1050;
}

.qp-dialog {
    width: min(1100px, 95vw);
    max-height: 90vh;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .18);
    padding: 28px 32px 24px;
    position: relative;
    overflow: auto;
}

.qp-close {
    position: absolute;
    top: 18px;
    right: 24px;
    border: 0;
    background: transparent;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.qp-header h2 {
    margin: 0 0 18px;
    font-size: 22px;
    font-weight: 700;
}

.qp-paragraph {
    font-size: 15px;
    color: #4b5563;
    margin-bottom: 10px;
}

.qp-question {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 18px;
}

/* options */
.qp-options {
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
}

.qp-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    margin-bottom: 10px;
}

.qp-option-label {
    font-weight: 500
}

.qp-radio {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid #e5e7eb;
    display: grid;
    place-items: center;
    font-size: 14px;
    color: transparent;
}

/* states */
.qp-option.correct {
    border-color: #16a34a;
    background: #ecfdf3;
}

.qp-option.correct .qp-radio {
    border-color: #16a34a;
    background: #16a34a;
    color: #fff;
}

.qp-option.user-wrong {
    border-color: #ef4444;
    background: #fef2f2;
}

.qp-option.user-wrong .qp-radio {
    border-color: #ef4444;
}

/* buttons inside modal */
.qp-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
}

.qp-btn {
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid #f97316;
    background: #f97316;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.qp-btn.outline {
    background: #fff;
    color: #f97316;
}

.qp-meta {
    font-size: 13px;
    color: #4b5563;
    margin-bottom: 6px;
}

.qp-expl {
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px dashed #e5e7eb;
    font-size: 14px;
}

.qp-expl h4 {
    margin: 0 0 6px;
    font-weight: 600;
}

@media (max-width:768px) {

    .qthead,
    .qrow {
        grid-template-columns: 70px 1fr 90px;
    }

    .qp-dialog {
        width: 96vw;
        padding: 18px 16px 18px;
    }
}