/* Video Survey Platform – Design System 2026 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #6D5DFC;
    --secondary: #8B7FFF;
    --success: #22C55E;
    --danger: #EF4444;
    --warning: #F59E0B;
    --bg: #F8FAFC;
    --surface: #FFFFFF;
    --text: #0F172A;
    --text-secondary: #64748B;
    --border: #E2E8F0;
    --radius-card: 20px;
    --radius-btn: 14px;
    --radius-input: 12px;
    --shadow-card: 0 10px 40px rgba(15,23,42,0.08);
    --shadow-hover: 0 20px 60px rgba(15,23,42,0.12);
}

.dark {
    --bg: #0F172A;
    --surface: #1E293B;
    --text: #F8FAFC;
    --text-secondary: #94A3B8;
    --border: #334155;
    --shadow-card: 0 10px 40px rgba(0,0,0,0.3);
    --shadow-hover: 0 20px 60px rgba(0,0,0,0.4);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, sans-serif; }

/* Animations */
@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: none; }
}
@keyframes slideLeft {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes slideRight {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(109,93,252,0.4); }
    50% { box-shadow: 0 0 0 8px rgba(109,93,252,0); }
}
@keyframes checkDraw {
    0% { stroke-dashoffset: 100; }
    100% { stroke-dashoffset: 0; }
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes scaleIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.animate-page { animation: fadeSlideUp 300ms ease both; }
.animate-slide-left { animation: slideLeft 350ms cubic-bezier(0.22,1,0.36,1) both; }
.animate-slide-right { animation: slideRight 350ms cubic-bezier(0.22,1,0.36,1) both; }
.animate-scale-in { animation: scaleIn 400ms cubic-bezier(0.22,1,0.36,1) both; }

/* Glassmorphism */
.glass {
    background: rgba(255,255,255,0.72);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.5);
}
.dark .glass {
    background: rgba(30,41,59,0.72);
    border-color: rgba(255,255,255,0.08);
}

/* Cards */
.card-surface {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    transition: transform 0.2s, box-shadow 0.2s;
}
.card-surface:hover { box-shadow: var(--shadow-hover); }

/* Buttons */
.btn-primary {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 48px; padding: 0 24px;
    background: linear-gradient(135deg, #6D5DFC, #8B7FFF);
    color: #fff; font-weight: 600; font-size: 15px;
    border: none; border-radius: var(--radius-btn);
    cursor: pointer; transition: transform 0.15s, opacity 0.15s, box-shadow 0.15s;
    text-decoration: none;
}
.btn-primary:hover { transform: scale(1.02); box-shadow: 0 8px 24px rgba(109,93,252,0.35); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-secondary {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 44px; padding: 0 20px;
    background: transparent; color: var(--text-secondary);
    font-weight: 600; font-size: 14px;
    border: 1.5px solid var(--border); border-radius: var(--radius-btn);
    cursor: pointer; transition: all 0.15s;
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); background: rgba(109,93,252,0.04); }
.btn-secondary:disabled { opacity: 0.4; cursor: not-allowed; }

/* Floating label inputs */
.field-group { position: relative; margin-bottom: 20px; }
.field-input {
    width: 100%; height: 52px;
    padding: 20px 16px 8px 44px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-input);
    font-size: 15px; color: var(--text);
    outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.field-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(109,93,252,0.12);
}
.field-label {
    position: absolute; left: 44px; top: 16px;
    font-size: 14px; color: var(--text-secondary);
    pointer-events: none; transition: all 0.2s;
}
.field-input:focus ~ .field-label,
.field-input:not(:placeholder-shown) ~ .field-label {
    top: 6px; font-size: 11px; font-weight: 500; color: var(--primary);
}
.field-icon {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: var(--text-secondary); width: 18px; height: 18px;
}
.field-textarea { height: 96px; padding-top: 24px; resize: none; line-height: 1.5; }
.field-error { color: var(--danger); font-size: 12px; margin-top: 4px; }

/* Gender pills */
.gender-pills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.gender-pill {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 14px 8px; border-radius: var(--radius-input);
    border: 1.5px solid var(--border); background: var(--surface);
    cursor: pointer; transition: all 0.2s; font-weight: 500; font-size: 13px;
    color: var(--text-secondary);
}
.gender-pill input { display: none; }
.gender-pill:hover { border-color: var(--primary); color: var(--primary); }
.gender-pill.active {
    border-color: var(--primary); color: var(--primary);
    background: rgba(109,93,252,0.06);
    box-shadow: 0 0 0 3px rgba(109,93,252,0.1);
    animation: pulseGlow 0.6s ease;
}

/* Choice cards (survey) */
.choice-card {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 18px; border-radius: var(--radius-input);
    border: 1.5px solid var(--border); background: var(--surface);
    cursor: pointer; transition: all 0.2s; font-size: 15px; font-weight: 500;
    color: var(--text);
}
.choice-card input { display: none; }
.choice-card:hover { border-color: var(--primary); transform: translateY(-1px); }
.choice-card.selected {
    border-color: var(--primary);
    background: rgba(109,93,252,0.06);
    box-shadow: 0 0 0 3px rgba(109,93,252,0.1);
    animation: pulseGlow 0.5s ease;
}
.choice-indicator {
    width: 20px; height: 20px; border-radius: 50%;
    border: 2px solid var(--border); flex-shrink: 0; transition: all 0.2s;
}
.choice-card.selected .choice-indicator {
    border-color: var(--primary); background: var(--primary);
    box-shadow: inset 0 0 0 3px var(--surface);
}
.choice-check {
    width: 20px; height: 20px; border-radius: 6px;
    border: 2px solid var(--border); flex-shrink: 0; transition: all 0.2s;
    display: flex; align-items: center; justify-content: center;
}
.choice-card.selected .choice-check {
    border-color: var(--primary); background: var(--primary); color: #fff;
}

/* Progress bar */
.progress-sticky {
    position: sticky; top: 0; z-index: 50;
    background: rgba(248,250,252,0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 12px 20px;
}
.dark .progress-sticky { background: rgba(15,23,42,0.85); }
.progress-track {
    height: 6px; background: var(--border); border-radius: 3px; overflow: hidden;
}
.progress-fill {
    height: 100%; border-radius: 3px;
    background: linear-gradient(90deg, #6D5DFC, #8B7FFF);
    transition: width 500ms cubic-bezier(0.22,1,0.36,1);
}

/* Skeleton */
.skeleton {
    background: linear-gradient(90deg, var(--border) 25%, rgba(109,93,252,0.08) 50%, var(--border) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

/* Video player */
.vp-container {
    position: relative; background: #000;
    border-radius: var(--radius-card); overflow: hidden;
    aspect-ratio: 16/9; cursor: pointer; user-select: none;
}
.vp-container video { width: 100%; height: 100%; object-fit: contain; display: block; }
.vp-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(transparent 50%, rgba(0,0,0,0.7));
    opacity: 0; transition: opacity 0.3s; pointer-events: none;
}
.vp-container:hover .vp-overlay,
.vp-container.paused .vp-overlay,
.vp-container.show-ui .vp-overlay { opacity: 1; }
.vp-big-play {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    transition: opacity 0.3s;
}
.vp-container.playing .vp-big-play { opacity: 0; pointer-events: none; }
.vp-play-btn {
    width: 68px; height: 68px; border-radius: 50%;
    background: rgba(109,93,252,0.9); border: none; color: #fff;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: transform 0.2s;
    box-shadow: 0 8px 32px rgba(109,93,252,0.4);
}
.vp-play-btn:hover { transform: scale(1.08); }
.vp-controls {
    position: absolute; bottom: 0; left: 0; right: 0;
    display: flex; align-items: center; gap: 8px; padding: 12px 16px;
    opacity: 0; transform: translateY(8px); transition: all 0.3s;
}
.vp-container:hover .vp-controls,
.vp-container.paused .vp-controls,
.vp-container.show-ui .vp-controls { opacity: 1; transform: translateY(0); }
.vp-ctrl-btn {
    background: none; border: none; color: #fff; width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px; cursor: pointer; transition: background 0.15s;
}
.vp-ctrl-btn:hover { background: rgba(255,255,255,0.15); }
.vp-scrubber {
    flex: 1; height: 4px; background: rgba(255,255,255,0.2);
    border-radius: 2px; position: relative; cursor: pointer;
}
.vp-scrubber:hover { height: 6px; }
.vp-scrubber-played {
    position: absolute; top: 0; left: 0; height: 100%;
    background: var(--primary); border-radius: 2px;
}
.vp-scrubber-handle {
    position: absolute; top: 50%; width: 12px; height: 12px;
    background: #fff; border-radius: 50%; transform: translate(-50%,-50%) scale(0);
    transition: transform 0.15s; box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.vp-scrubber:hover .vp-scrubber-handle { transform: translate(-50%,-50%) scale(1); }
.vp-time { font-size: 11px; color: rgba(255,255,255,0.85); font-variant-numeric: tabular-nums; min-width: 80px; text-align: center; }
.vp-speed {
    background: rgba(255,255,255,0.15); border: none; color: #fff;
    font-size: 11px; font-weight: 600; padding: 4px 8px; border-radius: 6px; cursor: pointer;
}

/* Toast */
#toast-container {
    position: fixed; top: 20px; right: 20px; z-index: 9999;
    display: flex; flex-direction: column; gap: 8px;
}
.toast {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 18px; border-radius: 12px;
    background: var(--surface); border: 1px solid var(--border);
    box-shadow: var(--shadow-card); font-size: 14px; font-weight: 500;
    color: var(--text); animation: fadeSlideUp 300ms ease;
    min-width: 280px;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--primary); }

/* Sticky survey footer */
.survey-footer {
    position: sticky; bottom: 0; z-index: 40;
    background: rgba(248,250,252,0.9);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    padding: 16px 20px;
}
.dark .survey-footer { background: rgba(15,23,42,0.9); }

/* Success checkmark */
.success-check {
    width: 80px; height: 80px; border-radius: 50%;
    background: rgba(34,197,94,0.1); border: 2px solid rgba(34,197,94,0.3);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 24px;
}
.success-check svg { width: 36px; height: 36px; }

/* Admin sidebar */
.admin-sidebar {
    width: 240px; transition: width 0.25s ease;
    background: var(--surface); border-right: 1px solid var(--border);
}
.admin-sidebar.collapsed { width: 68px; }
.admin-sidebar.collapsed .sidebar-text { display: none; }
.admin-sidebar.collapsed .sidebar-brand span { display: none; }

/* Admin tables */
.table-modern {
    width: 100%;
    font-size: 13px;
    border-collapse: collapse;
    margin-bottom: 0;
}
.table-modern thead th {
    background: var(--bg);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    text-align: left;
}
.table-modern tbody td {
    padding: 10px 14px;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.table-modern tbody tr:last-child td { border-bottom: none; }
.table-modern tbody tr:hover { background: rgba(109,93,252,0.04); }

.admin-table-card { overflow: hidden; }
.admin-table-card .admin-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}
.admin-table-card .admin-table-body { padding: 0; }

/* Admin form controls */
.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}
.form-control, .form-select {
    width: 100%;
    height: 36px;
    padding: 0 12px;
    font-size: 13px;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(109,93,252,0.12);
}
.form-control-sm, .form-select-sm { height: 34px; font-size: 12px; }
textarea.form-control { height: auto; padding: 8px 12px; }

/* DataTables */
.dataTables_wrapper { font-size: 13px; color: var(--text); }
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate { float: none; }

.dt-toolbar-top {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 12px 16px 8px;
    border-bottom: 1px solid var(--border);
}
.dt-toolbar-top .dataTables_filter { margin: 0; }
.dt-toolbar-top .dataTables_filter label {
    display: flex;
    align-items: center;
    gap: 0;
    margin: 0;
    font-size: 0;
    color: transparent;
}
.dt-toolbar-top .dataTables_filter input {
    width: 220px;
    height: 34px;
    padding: 0 12px 0 34px;
    font-size: 13px;
    color: var(--text);
    background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") 10px center no-repeat;
    border: 1px solid var(--border);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.dt-toolbar-top .dataTables_filter input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(109,93,252,0.12);
}

.dt-toolbar-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px 14px;
    border-top: 1px solid var(--border);
    background: var(--bg);
}
.dt-toolbar-bottom .dataTables_length label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}
.dt-toolbar-bottom .dataTables_length select {
    height: 32px;
    padding: 0 28px 0 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}
.dt-toolbar-bottom .dataTables_info {
    font-size: 12px;
    color: var(--text-secondary);
    padding: 0;
    margin: 0;
}
.dt-toolbar-bottom .dataTables_paginate {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
}
.dt-toolbar-bottom .dataTables_paginate .paginate_button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary) !important;
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
    cursor: pointer;
    transition: all 0.15s;
    margin: 0 !important;
}
.dt-toolbar-bottom .dataTables_paginate .paginate_button:hover {
    color: var(--primary) !important;
    border-color: var(--primary) !important;
    background: rgba(109,93,252,0.04) !important;
}
.dt-toolbar-bottom .dataTables_paginate .paginate_button.current,
.dt-toolbar-bottom .dataTables_paginate .paginate_button.current:hover {
    color: #fff !important;
    background: var(--primary) !important;
    border-color: var(--primary) !important;
}
.dt-toolbar-bottom .dataTables_paginate .paginate_button.disabled,
.dt-toolbar-bottom .dataTables_paginate .paginate_button.disabled:hover {
    opacity: 0.4;
    cursor: not-allowed;
    color: var(--text-secondary) !important;
    background: var(--surface) !important;
    border-color: var(--border) !important;
}

table.dataTable { font-size: 13px !important; width: 100% !important; margin: 0 !important; }
table.dataTable thead th {
    background: var(--bg) !important;
    color: var(--text-secondary) !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    padding: 10px 14px !important;
    border-bottom: 1px solid var(--border) !important;
    white-space: nowrap;
}
table.dataTable tbody td {
    padding: 10px 14px !important;
    color: var(--text) !important;
    border-bottom: 1px solid var(--border) !important;
    vertical-align: middle !important;
}
table.dataTable tbody tr { background: transparent !important; }
table.dataTable.hover tbody tr:hover,
table.dataTable.display tbody tr:hover { background: rgba(109,93,252,0.04) !important; }
table.dataTable.no-footer { border-bottom: none; }

/* Sortable question rows */
.sortable-item { cursor: grab; transition: background 0.15s; }
.sortable-item:active { cursor: grabbing; }
.sortable-item:hover { background: rgba(109,93,252,0.04); }
.sortable-ghost { opacity: 0.45; background: rgba(109,93,252,0.08) !important; }
.drag-handle { cursor: grab; }

/* Video table thumbs */
.video-thumb-btn {
    display: block; padding: 0; border: none; background: none;
    cursor: pointer; border-radius: 8px;
    transition: transform 0.15s;
}
.video-thumb-btn:hover { transform: scale(1.04); }
.video-thumb {
    position: relative; width: 80px; height: 45px;
    background: #1e293b; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: #94a3b8; overflow: hidden;
}
.video-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-thumb-fallback { opacity: 0.6; }
.video-thumb-play {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.25);
}
.video-thumb-play span {
    display: flex; align-items: center; justify-content: center;
    width: 22px; height: 22px;
    background: rgba(255,255,255,0.92); color: #1e293b;
    border-radius: 50%;
}
.video-thumb-btn:hover .video-thumb-play { background: rgba(0,0,0,0.45); }

.table-actions { display: flex; gap: 6px; align-items: center; }

/* Admin compact buttons */
.btn-admin-primary {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 38px; padding: 0 18px;
    background: linear-gradient(135deg, #6D5DFC, #8B7FFF);
    color: #fff; font-weight: 600; font-size: 13px;
    border: none; border-radius: 10px;
    cursor: pointer; transition: transform 0.15s, box-shadow 0.15s;
    white-space: nowrap; text-decoration: none;
}
.btn-admin-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(109,93,252,0.35); }
.btn-admin-secondary {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 36px; padding: 0 14px;
    background: var(--surface); color: var(--text-secondary);
    font-weight: 600; font-size: 13px;
    border: 1px solid var(--border); border-radius: 10px;
    cursor: pointer; transition: all 0.15s;
    text-decoration: none;
}
.btn-admin-secondary:hover { border-color: var(--primary); color: var(--primary); }

/* Table icon action buttons */
.icon-action-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    border: 1px solid var(--border); border-radius: 8px;
    background: var(--surface); color: var(--text-secondary);
    cursor: pointer; transition: all 0.15s;
}
.icon-action-btn:hover { transform: translateY(-1px); }
.icon-action-success { color: var(--success); border-color: rgba(34,197,94,0.25); background: rgba(34,197,94,0.06); }
.icon-action-success:hover { border-color: var(--success); background: rgba(34,197,94,0.12); }
.icon-action-primary { color: var(--primary); border-color: rgba(109,93,252,0.25); background: rgba(109,93,252,0.06); }
.icon-action-primary:hover { border-color: var(--primary); background: rgba(109,93,252,0.12); }
.icon-action-danger { color: var(--danger); border-color: rgba(239,68,68,0.25); background: rgba(239,68,68,0.06); }
.icon-action-danger:hover { border-color: var(--danger); background: rgba(239,68,68,0.12); }

/* Video upload form */
.video-upload-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}
@media (min-width: 768px) {
    .video-upload-grid {
        grid-template-columns: minmax(160px, 1fr) minmax(240px, 1.6fr) 172px;
        gap: 16px 20px;
        align-items: end;
    }
}
.video-upload-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.form-label-spacer {
    display: none;
}
@media (min-width: 768px) {
    .form-label-spacer {
        display: block;
        visibility: hidden;
        margin-bottom: 4px;
        font-size: 12px;
        line-height: 1.25;
        min-height: 15px;
    }
}
.video-upload-action-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.video-upload-field-actions .btn-admin-primary {
    width: 100%;
    justify-content: center;
}
.video-upload-notes {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.video-checkbox {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: var(--text-secondary); cursor: pointer;
    white-space: nowrap;
}
.video-checkbox input {
    width: 16px; height: 16px; flex-shrink: 0;
    accent-color: var(--primary); margin: 0;
}

/* Question form */
.question-form-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.question-form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
@media (min-width: 768px) {
    .question-form-row {
        grid-template-columns: repeat(3, 1fr);
    }
}
.question-form-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.form-textarea {
    height: auto;
    min-height: 88px;
    padding: 10px 12px;
    resize: vertical;
    line-height: 1.5;
}
.question-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    width: fit-content;
}
.question-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    margin: 0;
    flex-shrink: 0;
}
.options-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.options-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.option-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: center;
    animation: fadeSlideUp 0.2s ease both;
}
@media (min-width: 640px) {
    .option-row {
        grid-template-columns: 1fr 1fr auto;
    }
}
#optionsSection {
    padding: 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 14px;
}
.question-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}
.btn-admin-sm {
    height: 34px;
    padding: 0 12px;
    font-size: 12px;
}

/* Styled file input */
.file-input-label {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.15s;
    width: 100%;
    box-sizing: border-box;
}
.file-input-label-sm {
    height: 34px;
    padding: 0 10px;
}
.file-input-label:hover { border-color: var(--primary); }
.file-input-native {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); border: 0;
}
.file-input-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 12px; font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}
.file-input-name {
    font-size: 12px; color: var(--text-secondary);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    flex: 1; min-width: 0;
}

/* Bootstrap modal (minimal – admin layout has no bootstrap.css) */
body.modal-open { overflow: hidden; }
.modal {
    position: fixed; inset: 0; z-index: 1060;
    display: none; overflow-x: hidden; overflow-y: auto;
    padding: 1rem; outline: 0;
}
.modal.show { display: block; }
.modal.fade { opacity: 0; transition: opacity 0.15s linear; }
.modal.fade.show { opacity: 1; }
.modal.fade .modal-dialog { transition: transform 0.2s ease-out; transform: translateY(-24px) scale(0.98); }
.modal.show .modal-dialog { transform: none; }
.modal-dialog {
    position: relative; width: 100%; margin: 0 auto;
    max-width: 500px; pointer-events: none;
}
.modal-dialog-centered {
    display: flex; align-items: center;
    min-height: calc(100% - 2rem);
}
.modal-lg { max-width: 800px; }
.modal-sm { max-width: 400px; }
.modal-content {
    position: relative; display: flex; flex-direction: column; width: 100%;
    pointer-events: auto; background: var(--surface);
    border: 1px solid var(--border); border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(15,23,42,0.35); outline: 0;
}
.modal-backdrop {
    position: fixed; inset: 0; z-index: 1050;
    background: rgba(15,23,42,0.55); backdrop-filter: blur(4px);
}
.modal-backdrop.fade { opacity: 0; transition: opacity 0.15s linear; }
.modal-backdrop.show { opacity: 1; }
.admin-modal .modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px; border-bottom: 1px solid var(--border);
}
.admin-modal .modal-header-dark {
    background: #0f172a; color: #fff; border-bottom: none;
}
.admin-modal .modal-title { font-size: 14px; font-weight: 600; margin: 0; }
.admin-modal .modal-body { padding: 18px; }
.admin-modal .modal-footer {
    display: flex; align-items: center; justify-content: flex-end; gap: 8px;
    padding: 14px 18px; border-top: 1px solid var(--border);
}
/* Video preview modal – seamless dark player chrome */
#videoPlayModal .modal-lg {
    max-width: min(920px, calc(100vw - 2rem));
}
.modal-content.admin-modal-video {
    background: #0a0a0a;
    border: none;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.55);
}
.modal-content.admin-modal-video .modal-header-dark {
    background: #0f172a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px 16px;
    gap: 12px;
}
.modal-content.admin-modal-video .modal-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
    color: #f8fafc;
}
.modal-content.admin-modal-video .modal-body {
    padding: 0 !important;
    margin: 0;
    background: #0a0a0a;
    line-height: 0;
    overflow: hidden;
}
.modal-content.admin-modal-video .vimeo-player {
    display: block;
    width: 100%;
    margin: 0;
    border-radius: 0;
    background: #0a0a0a;
    aspect-ratio: 16 / 9;
    max-height: min(72vh, 720px);
}
.modal-content.admin-modal-video .vimeo-player video {
    display: block;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    object-fit: contain;
}
.modal-close {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    border: none; border-radius: 8px;
    background: var(--bg); color: var(--text-secondary);
    cursor: pointer; transition: background 0.15s;
}
.modal-close:hover { background: var(--border); }
.modal-close-light { background: rgba(255,255,255,0.1); color: #fff; }
.modal-close-light:hover { background: rgba(255,255,255,0.2); }

/* Bootstrap dropdown (export menu) */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
    position: absolute; right: 0; top: 100%; z-index: 1000;
    display: none; min-width: 140px; margin-top: 4px;
    padding: 6px; background: var(--surface);
    border: 1px solid var(--border); border-radius: 10px;
    box-shadow: var(--shadow-card); list-style: none;
}
.dropdown-menu.show { display: block; }
.dropdown-menu-end { right: 0; left: auto; }
.dropdown-item {
    display: block; padding: 8px 12px;
    font-size: 13px; color: var(--text);
    text-decoration: none; border-radius: 6px;
}
.dropdown-item:hover { background: rgba(109,93,252,0.06); color: var(--primary); }
.dropdown-toggle::after { display: none; }
.cell-truncate {
    max-width: 200px; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap;
    display: inline-block;
}
.cell-mono { font-variant-numeric: tabular-nums; font-size: 12px; }

@media (max-width: 640px) {
    .dt-toolbar-top { justify-content: stretch; }
    .dt-toolbar-top .dataTables_filter input { width: 100%; }
    .dt-toolbar-bottom { flex-direction: column; align-items: stretch; }
    .dt-toolbar-bottom .dataTables_paginate { justify-content: center; }
}

/* Badge */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 100px; font-size: 11px; font-weight: 600; }
.badge-success { background: rgba(34,197,94,0.1); color: var(--success); }
.badge-warning { background: rgba(245,158,11,0.1); color: var(--warning); }
.badge-muted { background: var(--bg); color: var(--text-secondary); }
.badge-primary { background: rgba(109,93,252,0.1); color: var(--primary); }

/* Empty state */
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-secondary); }
.empty-state svg { width: 48px; height: 48px; margin: 0 auto 16px; opacity: 0.4; }

/* Loading overlay */
.loading-overlay {
    position: fixed; inset: 0; z-index: 9998;
    background: rgba(248,250,252,0.7); backdrop-filter: blur(4px);
    display: none; align-items: center; justify-content: center;
}
.dark .loading-overlay { background: rgba(15,23,42,0.7); }
.loading-overlay.show { display: flex; }
.spinner {
    width: 36px; height: 36px;
    border: 3px solid var(--border); border-top-color: var(--primary);
    border-radius: 50%; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Question slides */
.question-slide { display: none; }
.question-slide.active { display: block; }

/* Responsive */
@media (max-width: 640px) {
    .gender-pills { grid-template-columns: 1fr; }
    .field-row { grid-template-columns: 1fr !important; }
    .vp-time { display: none; }
}

@media (max-width: 991px) {
    .admin-sidebar { transform: translateX(-100%); z-index: 50; }
    .admin-sidebar.show { transform: translateX(0); }
    #adminMain { margin-left: 0 !important; }
}
