/* Editor Styles */

/* Nav Actions */
.nav-actions {
    display: flex;
    gap: 12px;
}

.nav-actions .btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-actions .btn-primary {
    background: var(--text-primary);
    color: var(--white);
    border: none;
}

.nav-actions .btn-primary:hover {
    background: #1a1a1a;
}

.nav-actions .btn-secondary {
    background: var(--white);
    color: var(--text-primary);
    border: 1.5px solid var(--border);
}

.nav-actions .btn-secondary:hover {
    background: var(--card-bg);
}

/* Editor Container */
.editor-container {
    display: flex;
    min-height: calc(100vh - 80px);
    margin-top: 80px;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--white);
    border-right: 1px solid var(--border);
    padding: 24px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar-header {
    margin-bottom: 24px;
}

.sidebar-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.sidebar-header .btn {
    width: 100%;
}

.form-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-item {
    padding: 14px 16px;
    background: var(--card-bg);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.form-item:hover {
    background: var(--border);
}

.form-item.active {
    border-color: var(--text-primary);
    background: var(--white);
}

.form-item-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.form-item-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Editor Panel */
.editor-panel {
    flex: 1;
    padding: 32px 40px;
    overflow-y: auto;
    background: var(--bg);
}

.editor-section {
    background: var(--white);
    border-radius: 16px;
    padding: 24px 28px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--white);
    transition: all 0.2s ease;
    line-height: 1.5;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(45, 45, 45, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group textarea {
    resize: vertical;
    height: auto;
    min-height: 60px;
    overflow: auto;
}

#formDescription,
#welcomeSubtitle {
    resize: vertical !important;
    overflow: auto !important;
    height: 72px !important;
    min-height: 72px !important;
}

/* Questions List */
.questions-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.question-item {
    background: var(--card-bg);
    border-radius: 14px;
    padding: 20px;
    border: 1.5px solid transparent;
    transition: all 0.2s ease;
}

.question-item:hover {
    border-color: var(--border);
}

.question-item.active {
    border-color: var(--text-primary);
}

/* Drag and Drop */
.drag-handle {
    cursor: grab;
    font-size: 1.1rem;
    color: var(--text-muted);
    padding: 0 4px;
    user-select: none;
    transition: color 0.2s;
}

.drag-handle:hover {
    color: var(--text-primary);
}

.drag-handle:active {
    cursor: grabbing;
}

.question-item.dragging {
    opacity: 0.4;
    border: 2px dashed var(--text-secondary);
}

.question-item.drag-over-top {
    border-top: 3px solid #1e88e5;
}

.question-item.drag-over-bottom {
    border-bottom: 3px solid #1e88e5;
}

/* Image Upload */
.question-image-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.image-upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px;
    border: 2px dashed var(--border);
    border-radius: 12px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.image-upload-area:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
    background: var(--white);
}

.image-preview-frame {
    position: relative;
    width: 100%;
    height: 180px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg);
    cursor: grab;
    border: 1px solid var(--border);
}

.image-preview-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform-origin: center center;
    transition: transform 0.05s linear;
    pointer-events: none;
    user-select: none;
}

.image-remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    z-index: 2;
}

.image-remove-btn:hover {
    background: #c62828;
}

.image-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    padding: 8px 12px;
    background: var(--white);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.image-controls-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.image-zoom-slider {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border);
    border-radius: 2px;
    outline: none;
}

.image-zoom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--text-primary);
    cursor: pointer;
}

.image-zoom-value {
    font-size: 0.75rem;
    color: var(--text-secondary);
    min-width: 36px;
    text-align: right;
}

.question-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.question-number {
    display: flex;
    align-items: center;
    gap: 12px;
}

.question-badge {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--text-primary);
    color: var(--white);
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 600;
}

.question-type-select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.8rem;
    background: var(--white);
    color: var(--text-secondary);
    cursor: pointer;
}

.question-actions {
    display: flex;
    gap: 8px;
}

.question-actions button {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.question-actions button:hover {
    background: var(--card-bg);
    color: var(--text-primary);
}

.question-actions button.delete:hover {
    background: #ffebee;
    color: #c62828;
    border-color: #c62828;
}

.question-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.question-fields input,
.question-fields textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--white);
    transition: all 0.2s ease;
}

.question-fields input:focus,
.question-fields textarea:focus {
    outline: none;
    border-color: var(--text-primary);
}

.question-fields textarea {
    resize: none;
    min-height: 80px;
}

/* Options Editor */
.options-editor {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.options-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.option-key {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.option-item input {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    background: var(--white);
}

.option-item input:focus {
    outline: none;
    border-color: var(--text-primary);
}

.option-delete-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.2s ease;
}

.option-delete-btn:hover {
    color: #c62828;
}

.add-option-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: transparent;
    border: 1px dashed var(--border);
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.add-option-btn:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

/* Add Question Button */
.add-question-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px;
    background: transparent;
    border: 2px dashed var(--border);
    border-radius: 14px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-question-btn:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
    background: var(--white);
}

/* Buttons */
.btn {
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--text-primary);
    color: var(--white);
    border: none;
}

.btn-primary:hover {
    background: #1a1a1a;
}

.btn-secondary {
    background: var(--white);
    color: var(--text-primary);
    border: 1.5px solid var(--border);
}

.btn-secondary:hover {
    background: var(--card-bg);
}

.btn-danger {
    background: #c62828;
    color: var(--white);
    border: none;
}

.btn-danger:hover {
    background: #b71c1c;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: 20px;
    padding: 32px;
    max-width: 480px;
    width: 90%;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.modal-message {
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    background: none;
    border: none;
}

/* Preview Modal */
.preview-modal-content {
    width: 95%;
    max-width: 900px;
    height: 90vh;
    padding: 0;
    position: relative;
    background: var(--bg);
}

.preview-modal-content iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 20px;
}

/* Placeholder message */
.placeholder-message {
    text-align: center;
    padding: 60px 40px;
    color: var(--text-muted);
}

.placeholder-message h3 {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* Responsive */
@media (max-width: 900px) {
    .editor-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        max-height: 200px;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .form-list {
        flex-direction: row;
        overflow-x: auto;
        gap: 12px;
    }

    .form-item {
        min-width: 200px;
    }
}

/* Form Item with Actions */
.form-item {
    padding: 0;
    overflow: hidden;
}

.form-item-main {
    padding: 14px 16px;
    cursor: pointer;
}

.form-item.active .form-item-main {
    background: var(--white);
}

.form-item-actions {
    display: flex;
    padding: 8px 12px;
    gap: 8px;
    border-top: 1px solid var(--border);
    background: var(--card-bg);
}

.icon-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    position: relative;
    z-index: 1;
}

.icon-btn svg {
    pointer-events: none;
}

.icon-btn:hover {
    background: var(--text-primary);
    color: var(--white);
    border-color: var(--text-primary);
}

.icon-btn.export-btn:hover {
    background: #2e7d32;
    border-color: #2e7d32;
    color: #fff;
}

.icon-btn.delete-btn:hover {
    background: #c62828;
    border-color: #c62828;
    color: #fff;
}

/* Respondents Modal */
.respondents-modal-content {
    max-width: 700px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.respondents-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}

.respondents-header .modal-title {
    margin-bottom: 0;
}

.respondents-body {
    flex: 1;
    overflow-y: auto;
}

.respondents-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.respondent-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: var(--card-bg);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.respondent-item:hover {
    background: var(--border);
}

.respondent-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.respondent-number {
    font-weight: 600;
    color: var(--text-primary);
}

.respondent-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.respondent-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.time-badge {
    font-size: 0.75rem;
    padding: 4px 8px;
    background: var(--white);
    border-radius: 6px;
    color: var(--text-secondary);
}

.empty-respondents {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

/* Respondent Detail */
.respondent-detail {
    padding-top: 16px;
}

.detail-header {
    margin-bottom: 16px;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.back-btn:hover {
    background: var(--border);
    color: var(--text-primary);
}

.detail-charts {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.chart-card {
    flex: 1;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.chart-card h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.chart-card canvas {
    max-width: 100%;
}

.time-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
}

.time-stat {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--white);
    border-radius: 8px;
}

.time-stat.slow .time-value { color: #c62828; }
.time-stat.fast .time-value { color: #2e7d32; }

.time-stat .time-value {
    font-weight: 600;
    color: var(--text-primary);
}

.time-stat .time-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.detail-answers {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.answer-item {
    padding: 16px;
    background: var(--card-bg);
    border-radius: 12px;
}

.answer-question {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.answer-value {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* Share Modal */
.share-description {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.share-link-container {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.share-link-container input {
    flex: 1;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 0.9rem;
    background: var(--card-bg);
    color: var(--text-primary);
}

.copy-btn {
    white-space: nowrap;
}

/* Section Item in Editor */
.question-item.section-item {
    background: #f0f4ff;
}

.section-badge {
    background: #1e88e5 !important;
}

/* Color Picker */
.color-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid var(--border);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.color-dot:hover {
    transform: scale(1.15);
}

.color-dot-empty {
    background: var(--white) !important;
    position: relative;
}

.color-dot-empty::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    transform: translate(-50%, -50%);
}

.color-picker-popover {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    width: 140px;
    z-index: 100;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.color-swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.15s ease;
}

.color-swatch:hover {
    transform: scale(1.2);
}

.color-swatch.active {
    border-color: var(--text-primary);
    box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px var(--text-primary);
}

.color-swatch-remove {
    background: var(--card-bg);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

/* Add Question Modal */
.add-question-modal-content {
    max-width: 520px;
}

.add-question-cards {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.add-question-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 28px 16px;
    background: var(--card-bg);
    border: 2px solid transparent;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.add-question-card:hover {
    border-color: var(--text-primary);
    background: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.add-question-card svg {
    color: var(--text-secondary);
}

.add-question-card:hover svg {
    color: var(--text-primary);
}

.add-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.add-card-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

@media (max-width: 520px) {
    .add-question-cards {
        flex-direction: column;
    }
}

/* ─── Auth Gate ─────────────────────────────────────────────── */
.auth-gate {
    position: fixed;
    inset: 0;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 100;
}

.auth-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px 32px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 8px 0 4px;
    color: var(--text-primary);
}

.auth-subtitle {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.auth-form {
    text-align: left;
}

.auth-form .form-group {
    margin-bottom: 16px;
}

.auth-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.auth-form input {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    background: var(--bg);
    box-sizing: border-box;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--text-primary);
}

.auth-error {
    color: #c0392b;
    background: #fdecea;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.auth-submit {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    background: var(--text-primary);
    color: var(--white);
    margin-top: 4px;
}

.auth-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-switch {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 16px;
}

.auth-switch a {
    color: var(--text-primary);
    font-weight: 600;
    text-decoration: none;
    margin-left: 4px;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.nav-user {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-right: 8px;
}

.nav-actions .btn-ghost {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.85rem;
    cursor: pointer;
}

.nav-actions .btn-ghost:hover {
    background: var(--card-bg);
    color: var(--text-primary);
}
/* ── Responses full page (was modal) ─────────────────────────────── */
.responses-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 96px 28px 48px;
    width: 100%;
    animation: cardFadeIn 0.35s ease;
}

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

.responses-title h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0;
}

.responses-meta {
    color: var(--text-muted, #8a8a8a);
    font-size: 0.85rem;
}

.responses-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}

.stat-card {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border, #e8e8e8);
    border-radius: 14px;
    padding: 14px 18px;
}

.stat-value {
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 0.78rem;
    color: var(--text-muted, #8a8a8a);
    margin-top: 2px;
}

.responses-page .respondents-body {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 20px;
    align-items: start;
    overflow: visible;
}

.responses-page .respondents-list {
    max-height: calc(100vh - 300px);
    overflow-y: auto;
    padding-right: 4px;
}

.responses-page .respondent-item {
    cursor: pointer;
    border: 1.5px solid transparent;
}

.responses-page .respondent-item.active {
    border-color: var(--text-primary, #2d2d2d);
    background: var(--card-bg, #fff);
}

.responses-page .respondent-detail {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border, #e8e8e8);
    border-radius: 16px;
    padding: 22px 24px;
}

.detail-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
    display: inline;
}

.detail-sub {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted, #8a8a8a);
    margin-top: 2px;
    word-break: break-all;
}

@media (max-width: 860px) {
    .responses-page {
        padding: 16px 14px 40px;
    }
    .responses-page .respondents-body {
        grid-template-columns: 1fr;
    }
    .responses-page .respondents-list {
        max-height: 280px;
    }
}
