:root {
    --clr-card-hover: #161c2a;
    --clr-border-focus: rgba(99,102,241,0.45);
    --clr-red: #f43f5e;
}
body { min-height: 100vh; }
/* ── PROGRESS BAR ── */
/* Sticky + backdrop-filter created a WebKit stacking/compositing layer that could paint
   above the profile dropdown. Solid background + no backdrop avoids that; z-index stays
   above .container (z-index: 1) but below .navbar-custom (1050). */
.measurement-progress-wrap {
    position: sticky;
    top: 57px;
    z-index: 20;
    background: var(--clr-surface);
    border-bottom: 1px solid var(--clr-border);
    padding: 12px 0;
    transform: none;
    filter: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}
.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.progress-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--clr-muted);
}
.progress-count {
    font-size: 0.78rem;
    color: var(--clr-muted);
}
.progress-count span {
    color: var(--clr-primary-2);
    font-weight: 700;
}
.progress-bar-track {
    height: 6px;
    background: var(--clr-border);
    border-radius: 99px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--clr-primary), var(--clr-accent));
    border-radius: 99px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── QUIZ HERO ── */
.measurement-hero {
    padding: 60px 0 40px;
    position: relative;
    overflow: hidden;
}
.measurement-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #34d399;
    border-radius: 50px;
    padding: 5px 14px;
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.measurement-title {
    font-size: clamp(1.5rem, 3.5vw, 2.2rem);
    font-weight: 900;
    color: var(--clr-text);
    margin-bottom: 0.6rem;
}
.measurement-title .gradient-text {
    background: linear-gradient(135deg, var(--clr-primary-2), var(--clr-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.measurement-desc {
    color: var(--clr-muted);
    font-size: 0.9rem;
    line-height: 1.7;
    max-width: 600px;
}
.measurement-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 1.2rem;
}
.measurement-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--clr-muted);
}
.measurement-meta-item i {
    color: var(--clr-primary-2);
}

/* ── QUESTION CARD ── */
.q-card {
    background: var(--clr-card);
    border: 1px solid var(--clr-border);
    border-radius: 20px;
    padding: 28px 32px;
    margin-bottom: 16px;
    transition:
        border-color 0.25s,
        box-shadow 0.25s;
    position: relative;
}
.q-card:hover {
    border-color: rgba(99, 102, 241, 0.15);
}
.q-card.answered {
    border-color: rgba(16, 185, 129, 0.25);
}
.q-card.answered::after {
    content: "\F26B";
    font-family: "bootstrap-icons";
    position: absolute;
    top: 18px;
    inset-inline-end: 24px;
    font-size: 1rem;
    color: #34d399;
    opacity: 0.7;
}
.q-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
}
.q-number {
    min-width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--clr-primary-2);
    flex-shrink: 0;
}
.q-text {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--clr-text);
    line-height: 1.55;
    flex: 1;
}
.q-required {
    color: var(--clr-red);
    margin-right: 4px;
    font-size: 0.85rem;
}
.q-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    margin-top: 6px;
}
.q-hint {
    font-size: 0.78rem;
    color: var(--clr-muted);
    margin-top: 4px;
}

/* ── CONTENT BLOCK ── */
.content-block {
    background: var(--primary-12);
    border: 1px solid var(--clr-border);
    border-radius: 14px;
    padding: 20px 24px;
}
.content-block p {
    font-size: 0.875rem;
    color: var(--clr-muted);
    line-height: 1.8;
    margin: 0;
}
.content-block strong {
    color: var(--clr-text);
}
.content-block .highlight-box {
    background: rgba(99, 102, 241, 0.08);
    border-right: 3px solid var(--clr-primary);
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 12px;
    font-size: 0.82rem;
    color: var(--clr-muted);
}

/* ── RADIO / CHECKBOX ── */
.option-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.option-item {
    position: relative;
}
.option-item input[type="radio"],
.option-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.option-label {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--primary-12);
    border: 1px solid var(--clr-border);
    border-radius: 14px;
    padding: 14px 18px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--clr-muted);
}
.option-label:hover {
    background: rgba(99, 102, 241, 0.07);
    border-color: rgba(99, 102, 241, 0.25);
    color: var(--clr-text);
}
.option-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--clr-border);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.option-item input[type="checkbox"] ~ .option-label .option-indicator {
    border-radius: 6px;
}
.option-item input:checked ~ .option-label {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.4);
    color: var(--clr-text);
}
.option-item input:checked ~ .option-label .option-indicator {
    background: var(--clr-primary);
    border-color: var(--clr-primary);
}
.option-item input:checked ~ .option-label .option-indicator::after {
    content: "";
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
}
.option-item input[type="checkbox"]:checked ~ .option-label .option-indicator::after {
    content: "\F26B";
    font-family: "bootstrap-icons";
    font-size: 0.7rem;
    border-radius: 0;
    width: auto;
    height: auto;
    color: #fff;
}
.option-letter {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: var(--clr-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--clr-muted);
    flex-shrink: 0;
    transition: all 0.2s;
}
.option-item input:checked ~ .option-label .option-letter {
    background: rgba(99, 102, 241, 0.2);
    color: var(--clr-primary-2);
}

/* ── IMAGE OPTIONS ── */
.image-options {
    display: grid;
    justify-content: center;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}
.image-option-item {
    position: relative;
}
.image-option-item input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.image-option-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--primary-12);
    border: 2px solid var(--clr-border);
    border-radius: 16px;
    padding: 16px 12px 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}
.image-option-label:hover {
    background: rgba(99, 102, 241, 0.07);
    border-color: rgba(99, 102, 241, 0.3);
}
.image-option-label .img-placeholder {
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(6, 182, 212, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 10px;
    overflow: hidden;
}
.image-option-label .img-text {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--clr-muted);
    transition: color 0.2s;
}
.image-option-item input:checked ~ .image-option-label {
    background: rgba(99, 102, 241, 0.12);
    border-color: var(--clr-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.image-option-item input:checked ~ .image-option-label .img-text {
    color: var(--clr-text);
}
.image-option-item input:checked ~ .image-option-label .img-placeholder {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(6, 182, 212, 0.2));
}
.img-check-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--clr-primary);
    display: none;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.7rem;
}
.image-option-item input:checked ~ .image-option-label .img-check-badge {
    display: flex;
}

/* ── LIKERT SCALE ── */
.likert-wrap {
}
.likert-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}
.likert-label-text {
    font-size: 0.72rem;
    color: var(--clr-muted);
    font-weight: 600;
}
.likert-options {
    display: flex;
    gap: 8px;
}
.likert-item {
    flex: 1;
    position: relative;
}
.likert-item input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.likert-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: var(--primary-12);
    border: 1px solid var(--clr-border);
    border-radius: 12px;
    padding: 12px 6px;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}
.likert-btn:hover {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.25);
}
.likert-num {
    font-size: 1rem;
    font-weight: 800;
    color: var(--clr-muted);
    transition: color 0.2s;
}
.likert-item input:checked ~ .likert-btn {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.45);
}
.likert-item input:checked ~ .likert-btn .likert-num {
    color: var(--clr-primary-2);
}

/* ── EMOJI SCALE ── */
.emoji-options {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}
.emoji-item {
    position: relative;
}
.emoji-item input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.emoji-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: var(--primary-12);
    border: 2px solid var(--clr-border);
    border-radius: 16px;
    padding: 14px 20px;
    cursor: pointer;
    transition: all 0.25s;
    min-width: 80px;
}
.emoji-btn:hover {
    background: rgba(99, 102, 241, 0.08);
    transform: translateY(-3px);
}
.emoji-face {
    font-size: 2rem;
    line-height: 1;
    transition: transform 0.2s;
}
.emoji-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--clr-muted);
}
.emoji-item input:checked ~ .emoji-btn {
    border-color: var(--clr-primary);
    background: rgba(99, 102, 241, 0.12);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.2);
}
.emoji-item input:checked ~ .emoji-btn .emoji-face {
    transform: scale(1.2);
}
.emoji-item input:checked ~ .emoji-btn .emoji-label {
    color: var(--clr-primary-2);
}

/* ── STAR RATING ── */
.star-options {
    display: flex;
    gap: 6px;
    flex-direction: row-reverse;
    justify-content: flex-end;
}
.star-item {
    position: relative;
}
.star-item input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.star-btn {
    font-size: 2rem;
    cursor: pointer;
    color: var(--clr-border);
    transition:
        color 0.15s,
        transform 0.15s;
    display: block;
    line-height: 1;
}
.star-btn:hover {
    transform: scale(1.15);
}
.star-options:hover .star-btn {
    color: var(--clr-amber);
}
.star-item:hover ~ .star-item .star-btn {
    color: var(--clr-border);
}
.star-item input:checked ~ .star-btn {
    color: var(--clr-amber);
}
.star-item input:checked + .star-btn,
.star-item input:checked ~ .star-item .star-btn {
    color: var(--clr-amber);
}

/* ── NPS SCALE ── */
.nps-wrap {
}
.nps-options {
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
}
.nps-item {
    position: relative;
}
.nps-item input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.nps-btn {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--primary-12);
    border: 1px solid var(--clr-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--clr-muted);
    cursor: pointer;
    transition: all 0.2s;
}
.nps-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
    color: var(--clr-text);
}
.nps-item input:checked ~ .nps-btn {
    background: var(--clr-primary);
    border-color: var(--clr-primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}
.nps-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
}
.nps-label {
    font-size: 0.7rem;
    color: var(--clr-muted);
}

/* ── DROPDOWN SELECT ── */
.select-custom {
    background: var(--primary-12);
    border: 1px solid var(--clr-border);
    border-radius: 14px;
    color: var(--clr-text);
    font-family: "Cairo", sans-serif;
    font-size: 0.88rem;
    padding: 13px 18px;
    width: 100%;
    transition: all 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16'%3E%3Cpath fill='%2364748b' d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 16px center;
}
.select-custom:focus {
    background-color: rgba(99, 102, 241, 0.07);
    border-color: var(--clr-border-focus);
    color: var(--clr-text);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    outline: none;
}
.select-custom option {
    background: var(--clr-surface);
    color: var(--clr-text);
}

/* ── SEARCHABLE JOB COMBO (measurement variant) ── */
.job-combo-measurement{position:relative;width:100%;font-family:'Cairo',sans-serif}
.job-combo-measurement .job-combo-trigger{width:100%;background:var(--primary-12);border:1px solid var(--clr-border);border-radius:14px;color:var(--clr-text);font-size:0.88rem;padding:13px 18px;cursor:pointer;transition:all 0.2s;display:flex;align-items:center;justify-content:space-between;user-select:none;gap:8px}
.job-combo-measurement .job-combo-trigger:hover{border-color:rgba(99,102,241,0.4)}
.job-combo-measurement.open .job-combo-trigger{background:rgba(99,102,241,0.07);border-color:var(--clr-border-focus);box-shadow:0 0 0 4px rgba(99,102,241,0.1);outline:none}
.job-combo-measurement .job-combo-trigger>span{color:var(--clr-muted);flex:1;text-align:start;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.job-combo-measurement.has-value .job-combo-trigger>span{color:var(--clr-text)}
.job-combo-measurement .job-combo-chevron{transition:transform 0.2s;color:var(--clr-muted);font-size:0.75rem;flex-shrink:0}
.job-combo-measurement.open .job-combo-chevron{transform:rotate(180deg)}
.job-combo-measurement .job-combo-drop{display:none;position:absolute;top:calc(100% + 6px);left:0;right:0;background:var(--clr-surface);border:1px solid var(--clr-border);border-radius:14px;z-index:9999;box-shadow:0 8px 32px rgba(0,0,0,0.35);overflow:hidden}
.job-combo-measurement.open .job-combo-drop{display:block}
.job-combo-measurement .job-combo-search{display:flex;align-items:center;gap:8px;padding:11px 14px;border-bottom:1px solid var(--clr-border)}
.job-combo-measurement .job-combo-search i{color:var(--clr-muted);font-size:0.85rem;flex-shrink:0}
.job-combo-measurement .job-combo-search input{flex:1;background:transparent;border:none;outline:none;color:var(--clr-text);font-family:inherit;font-size:0.88rem}
.job-combo-measurement .job-combo-search input::placeholder{color:var(--clr-muted)}
.job-combo-measurement .job-combo-list{max-height:240px;overflow-y:auto;padding:6px}
.job-combo-measurement .job-combo-list::-webkit-scrollbar{width:4px}
.job-combo-measurement .job-combo-list::-webkit-scrollbar-thumb{background:var(--clr-border);border-radius:2px}
.job-combo-measurement .job-combo-option{padding:10px 14px;border-radius:10px;cursor:pointer;font-size:0.88rem;color:var(--clr-text);transition:background 0.15s}
.job-combo-measurement .job-combo-option:hover{background:rgba(99,102,241,0.1);color:var(--clr-primary-2)}
.job-combo-measurement .job-combo-option.selected{background:rgba(99,102,241,0.15);color:var(--clr-primary-2);font-weight:600}
.job-combo-measurement .job-combo-empty{padding:18px 14px;text-align:center;color:var(--clr-muted);font-size:0.86rem}
.job-combo-measurement .job-combo-add{display:flex;align-items:center;gap:8px;padding:11px 16px;border-top:1px solid var(--clr-border);color:var(--clr-primary-2);font-size:0.86rem;text-decoration:none;font-weight:600;transition:background 0.15s}
.job-combo-measurement .job-combo-add:hover{background:rgba(99,102,241,0.08);color:var(--clr-primary-2)}

/* ── TEXT INPUTS ── */
.input-custom {
    background: var(--primary-12);
    border: 1px solid var(--clr-border);
    border-radius: 14px;
    color: var(--clr-text);
    font-family: "Cairo", sans-serif;
    font-size: 0.88rem;
    padding: 13px 18px;
    width: 100%;
    transition: all 0.2s;
}
.input-custom::placeholder {
    color: var(--clr-muted);
}
.input-custom:focus {
    background: rgba(99, 102, 241, 0.07);
    border-color: var(--clr-border-focus);
    color: var(--clr-text);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    outline: none;
}
textarea.input-custom {
    resize: vertical;
    min-height: 120px;
    line-height: 1.7;
}

/* ── NUMBER INPUT ── */
.number-wrap {
    position: relative;
    max-width: 200px;
}
.number-wrap .input-custom {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    padding-left: 48px;
    padding-right: 48px;
}
.number-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--clr-primary-2);
    font-size: 1rem;
    transition: all 0.2s;
    user-select: none;
}
.number-btn:hover {
    background: rgba(99, 102, 241, 0.2);
}
.number-btn.minus {
    left: 8px;
}
.number-btn.plus {
    right: 8px;
}

/* ── DATE / TIME ── */
.date-wrap {
    position: relative;
}
.date-wrap .input-custom {
    padding-left: 48px;
}
.date-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 16px;
    color: var(--clr-muted);
    pointer-events: none;
}
input[type="date"].input-custom,
input[type="time"].input-custom {
    color-scheme: dark;
}
html[data-theme="light"] input[type="date"].input-custom,
html[data-theme="light"] input[type="time"].input-custom {
    color-scheme: light;
}

/* ── RANGE SLIDER ── */
.range-wrap {
    padding: 8px 0;
}
.range-value-display {
    text-align: center;
    margin-bottom: 12px;
}
.range-value-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 10px;
    padding: 6px 18px;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--clr-primary-2);
    min-width: 60px;
}
input[type="range"].range-custom {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: var(--clr-border);
    border-radius: 99px;
    outline: none;
}
input[type="range"].range-custom::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--clr-primary);
    cursor: pointer;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
    transition: box-shadow 0.2s;
}
input[type="range"].range-custom::-webkit-slider-thumb:hover {
    box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.3);
}
.range-ticks {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
}
.range-tick {
    font-size: 0.7rem;
    color: var(--clr-muted);
}

/* ── FILE UPLOAD ── */
.file-upload-area {
    border: 2px dashed rgba(99, 102, 241, 0.25);
    border-radius: 16px;
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s;
    background: rgba(99, 102, 241, 0.03);
    position: relative;
}
.file-upload-area:hover {
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(99, 102, 241, 0.06);
}
.file-upload-area.dragover {
    border-color: var(--clr-primary);
    background: rgba(99, 102, 241, 0.1);
}
.file-upload-area input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}
.file-upload-icon {
    font-size: 2.5rem;
    color: var(--clr-primary-2);
    margin-bottom: 10px;
    display: block;
}
.file-upload-text {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--clr-muted);
    margin-bottom: 4px;
}
.file-upload-hint {
    font-size: 0.75rem;
    color: var(--clr-muted);
}
.file-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: var(--clr-primary-2);
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 7px 16px;
    margin-top: 10px;
    transition: all 0.2s;
}
.file-upload-btn:hover {
    background: rgba(99, 102, 241, 0.2);
}
.file-preview {
    display: none;
    margin-top: 12px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 10px;
    padding: 10px 14px;
}
.file-preview.show {
    display: flex;
    align-items: center;
    gap: 10px;
}
.file-preview i {
    color: #34d399;
    font-size: 1.2rem;
}
.file-preview-name {
    font-size: 0.82rem;
    color: var(--clr-muted);
    flex: 1;
}
.file-preview-remove {
    color: var(--clr-muted);
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.2s;
}
.file-preview-remove:hover {
    color: var(--clr-red);
}

/* ── MATRIX QUESTION ── */
.matrix-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 6px;
}
.matrix-table th {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--clr-muted);
    text-align: center;
    padding: 6px 8px;
}
.matrix-table th:first-child {
    text-align: right;
}
.matrix-table td {
    padding: 4px 8px;
}
.matrix-table td:first-child {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--clr-muted);
    padding-right: 0;
}
.matrix-row td {
    background: var(--primary-12);
}
.matrix-row td:first-child {
    background: transparent;
}
.matrix-row td:first-child {
    border-radius: 10px 0 0 10px;
}
.matrix-row td:last-child {
    border-radius: 0 10px 10px 0;
}
.matrix-radio {
    display: flex;
    align-items: center;
    justify-content: center;
}
.matrix-radio input {
    position: absolute;
    opacity: 0;
}
.matrix-radio-btn {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--clr-border);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.matrix-radio-btn:hover {
    border-color: var(--clr-primary);
    background: rgba(99, 102, 241, 0.1);
}
.matrix-radio input:checked ~ .matrix-radio-btn {
    background: var(--clr-primary);
    border-color: var(--clr-primary);
}
.matrix-radio input:checked ~ .matrix-radio-btn::after {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
}

/* ── TOGGLE / YES-NO ── */
.yesno-options {
    display: flex;
    gap: 12px;
}
.yesno-item {
    position: relative;
    flex: 1;
}
.yesno-item input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.yesno-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--primary-12);
    border: 2px solid var(--clr-border);
    border-radius: 14px;
    padding: 14px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--clr-muted);
    transition: all 0.2s;
}
.yesno-label:hover {
    background: rgba(99, 102, 241, 0.08);
}
.yesno-item.yes input:checked ~ .yesno-label {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.4);
    color: #34d399;
}
.yesno-item.no input:checked ~ .yesno-label {
    background: rgba(244, 63, 94, 0.1);
    border-color: rgba(244, 63, 94, 0.35);
    color: #fb7185;
}
.yesno-item.male input:checked ~ .yesno-label {
    background: rgba(59,130,246,0.12); /* أزرق فاتح */
    border-color: rgba(59,130,246,0.4);
    color: #60a5fa;
}

/* أنثى (بمبي) */
.yesno-item.female input:checked ~ .yesno-label {
    background: rgba(236,72,153,0.12); /* بمبي فاتح */
    border-color: rgba(236,72,153,0.4);
    color: #f472b6;
}
/* ── PHONE / EMAIL ── */
.input-group-custom {
    display: flex;
    gap: 0;
}
.input-prefix {
    background: var(--primary-12);
    border: 1px solid var(--clr-border);
    border-left: none;
    border-radius: 14px 0 0 14px;
    padding: 13px 14px;
    font-size: 0.85rem;
    color: var(--clr-muted);
    white-space: nowrap;
    display: flex;
    align-items: center;
}
.input-group-custom .input-custom {
    border-radius: 0 14px 14px 0;
    border-right: none;
}

/* ── VALIDATION ── */
.field-error {
    font-size: 0.75rem;
    color: var(--clr-red);
    margin-top: 6px;
    display: none;
    align-items: center;
    gap: 5px;
}
.field-error.show {
    display: flex;
}
.q-card.has-error {
    border-color: rgba(244, 63, 94, 0.35) !important;
}

/* ── SUBMIT AREA ── */
.submit-area {
    background: var(--clr-card);
    border: 1px solid var(--clr-border);
    border-radius: 20px;
    padding: 28px 32px;
    margin-top: 8px;
}
.submit-note {
    font-size: 0.8rem;
    color: var(--clr-muted);
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.submit-note i {
    color: var(--clr-primary-2);
    margin-top: 2px;
    flex-shrink: 0;
}
.btn-submit {
    background: linear-gradient(135deg, var(--clr-primary), #4f46e5);
    border: none;
    color: #fff;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 8px 30px;
    box-shadow: 0 8px 28px rgba(99, 102, 241, 0.4);
    transition: all 0.25s;
    display: inline-flex;
    align-items: center;
    gap: 9px;
}
.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(99, 102, 241, 0.5);
    color: #fff;
}
.btn-draft {
    background: var(--primary-12);
    border: none;
    color: var(--clr-text);
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 8px 30px;
    transition: all 0.25s;
    display: inline-flex;
    align-items: center;
    gap: 9px;
}
.btn-draft:hover {
    transform: translateY(-2px);
}

/* ── SUCCESS MODAL ── */
.success-overlay {
    position: fixed;
    inset: 0;
    background: var(--clr-surface);
    backdrop-filter: blur(12px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}
.success-overlay.show {
    display: flex;
}
.success-card {
    background: var(--clr-card);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 28px;
    padding: 48px 40px;
    text-align: center;
    max-width: 460px;
    width: 90%;
    box-shadow: 0 0 80px rgba(16, 185, 129, 0.15);
    animation: successPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes successPop {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}
.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.15);
    border: 2px solid rgba(16, 185, 129, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #34d399;
    margin: 0 auto 20px;
}
.success-title {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--clr-text);
    margin-bottom: 8px;
}
.success-desc {
    font-size: 0.88rem;
    color: var(--clr-muted);
    line-height: 1.7;
    margin-bottom: 24px;
}
.score-display {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
}
.score-number {
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--clr-primary-2), var(--clr-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}
.score-label {
    font-size: 0.82rem;
    color: var(--clr-muted);
    margin-top: 4px;
}
.btn-view-result {
    background: linear-gradient(135deg, var(--clr-primary), #4f46e5);
    border: none;
    color: #fff;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 13px 28px;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s;
}
.btn-view-result:hover {
    transform: translateY(-2px);
    color: #fff;
}

/* ── LIGHT MODE OVERRIDES ── */
html[data-theme="light"] .measurement-progress-wrap { box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
html[data-theme="light"] .q-card { box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
html[data-theme="light"] .q-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
html[data-theme="light"] .submit-area { box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
html[data-theme="light"] .success-card { box-shadow: 0 8px 32px rgba(0,0,0,0.12); }
html[data-theme="light"] .success-overlay { background: rgba(255,255,255,0.85); }
html[data-theme="light"] .btn-submit { box-shadow: 0 8px 28px rgba(99,102,241,0.25); }
html[data-theme="light"] .btn-submit:hover { box-shadow: 0 14px 36px rgba(99,102,241,0.35); }
html[data-theme="light"] .option-label:hover { background: rgba(99,102,241,0.06); }
html[data-theme="light"] .option-item input:checked ~ .option-label { background: rgba(99,102,241,0.08); }
html[data-theme="light"] .image-option-label:hover { background: rgba(99,102,241,0.06); }
html[data-theme="light"] .likert-btn:hover { background: rgba(99,102,241,0.06); }
html[data-theme="light"] .emoji-btn:hover { background: rgba(99,102,241,0.06); }
html[data-theme="light"] .nps-btn:hover { background: rgba(99,102,241,0.06); }
html[data-theme="light"] .file-upload-area { background: rgba(99,102,241,0.02); }
html[data-theme="light"] .file-upload-area:hover { background: rgba(99,102,241,0.04); }
html[data-theme="light"] .option-label { background: rgba(99,102,241,0.05); }
html[data-theme="light"] .likert-btn { background: rgba(99,102,241,0.05); }
html[data-theme="light"] .emoji-btn { background: rgba(99,102,241,0.05); }
html[data-theme="light"] .nps-btn { background: rgba(99,102,241,0.05); }
html[data-theme="light"] .content-block { background: rgba(99,102,241,0.05); }
html[data-theme="light"] .input-custom { background: rgba(0,0,0,0.02); }
html[data-theme="light"] .input-custom:focus { background: rgba(99,102,241,0.04); }
html[data-theme="light"] .select-custom { background: rgba(0,0,0,0.02); }
html[data-theme="light"] .select-custom:focus { background: rgba(99,102,241,0.04); }
html[data-theme="light"] .image-option-label { background: rgba(99,102,241,0.04); }
html[data-theme="light"] .yesno-label { background: rgba(99,102,241,0.04); }
html[data-theme="light"] .matrix-row td { background: rgba(99,102,241,0.04); }

