/* surveyNexQ Survey Platform Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Poppins:wght@600;700&display=swap');

:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --primary: #C4956A;
    --primary-hover: #A67C52;
    --primary-light: #f5e6d3;
    --secondary: #64748b;
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --text: #0f172a;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --radius: 12px;
    --radius-sm: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ── UTILITIES ── */
.hidden { display: none !important; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-mono { font-family: 'Courier New', monospace; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: fadeIn 0.4s ease-out forwards; }
.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }

@keyframes spin {
    to { transform: rotate(360deg); }
}
.spinner {
    width: 20px; height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ── BUTTONS ── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    text-decoration: none;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: white; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg); border-color: var(--primary); color: var(--primary); }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #059669; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; }
.btn-warning { background: var(--warning); color: white; }
.btn-ghost { background: transparent; color: var(--secondary); }
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.75rem; }
.btn-duplicate { background: #8B5CF6; color: white; }
.btn-duplicate:hover { background: #7C3AED; }

/* ── CARDS ── */
.card {
    background: var(--surface);
    border-radius: 14px;
    border: 1px solid var(--border);
    overflow: hidden;
}
.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
}
.card-body { padding: 1.5rem; }
.card-title { font-size: 1.0625rem; font-weight: 700; color: var(--text); }
.card-sub { font-size: 0.8125rem; color: var(--secondary); margin-top: 0.25rem; }

/* ── FORMS ── */
.form-group { margin-bottom: 1.25rem; }
.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}
.form-description {
    font-size: 0.8125rem;
    color: var(--secondary);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}
.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1.1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    transition: all 0.2s;
    background: var(--surface);
    color: var(--text);
    font-family: inherit;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}
.form-textarea { resize: vertical; min-height: 100px; }

/* ── BADGES ── */
.badge {
    display: inline-flex; align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}
.badge-success { background: var(--success-light); color: #065f46; }
.badge-warning { background: var(--warning-light); color: #92400e; }
.badge-danger { background: var(--danger-light); color: #991b1b; }
.badge-primary { background: var(--primary-light); color: var(--primary); }

/* ── TAGS ── */
.tag {
    display: inline-flex; align-items: center;
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 600;
    background: var(--bg);
    color: var(--secondary);
    border: 1px solid var(--border);
}

/* ── PROGRESS ── */
.progress-bg {
    height: 0.625rem;
    background: var(--bg);
    border-radius: 999px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--primary);
}
.progress-fill.success { background: var(--success); }
.progress-fill.warning { background: var(--warning); }
.progress-fill.danger { background: var(--danger); }

/* ── TABLES ── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; background: var(--surface); }
th, td { padding: 0.875rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
th {
    background: var(--bg);
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    white-space: nowrap;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafafa; }

/* ── ICON BUTTON ── */
.icon-btn {
    width: 2.25rem; height: 2.25rem;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: white;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}
.icon-btn:hover { background: var(--bg); transform: scale(1.05); }
.icon-btn.delete:hover { background: var(--danger); color: white; border-color: var(--danger); }

/* ── EMPTY STATE ── */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--secondary);
}
.empty-state .icon { font-size: 3.5rem; margin-bottom: 1rem; opacity: 0.4; }

/* ── MODAL ── */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    z-index: 100;
    opacity: 0; visibility: hidden;
    transition: all 0.3s;
    padding: 1rem;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal {
    background: var(--surface);
    border-radius: var(--radius);
    width: 100%; max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: scale(0.95);
    transition: transform 0.3s;
}
.modal-overlay.active .modal { transform: scale(1); }
.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
}
.modal-title { font-size: 1.25rem; font-weight: 800; }
.modal-body { padding: 1.5rem; }
.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex; justify-content: flex-end; gap: 0.75rem;
}
.close-btn {
    background: none; border: none;
    font-size: 1.5rem; cursor: pointer;
    color: var(--text-muted); width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}
.close-btn:hover { background: var(--bg); color: var(--danger); }

/* ── TOAST ── */
.toast-container {
    position: fixed; bottom: 2rem; right: 2rem;
    z-index: 2000;
    display: flex; flex-direction: column; gap: 0.75rem;
}
.toast {
    background: var(--text);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    font-weight: 600;
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideInRight 0.3s ease-out;
    max-width: 400px;
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

/* ── TOGGLE ── */
.toggle { position: relative; width: 44px; height: 24px; background: var(--border); border-radius: 999px; cursor: pointer; transition: background 0.3s; flex-shrink: 0; }
.toggle.active { background: var(--success); }
.toggle::after { content: ''; position: absolute; width: 20px; height: 20px; background: white; border-radius: 50%; top: 2px; left: 2px; transition: transform 0.3s; box-shadow: var(--shadow-sm); }
.toggle.active::after { transform: translateX(20px); }

/* ── OPTIONS LIST ── */
.options-list { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.5rem; }
.option-row { display: flex; gap: 0.5rem; align-items: center; }
.option-row input { flex: 1; }

/* ── ADMIN LAYOUT ── */
.admin-layout { display: flex; min-height: 100vh; background: var(--bg); }
.sidebar {
    width: 264px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 1.5rem 1.25rem;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 50;
    display: flex;
    flex-direction: column;
}
.logo {
    display: flex; align-items: center; gap: 0.625rem;
    font-family: 'Poppins', sans-serif;
    font-size: 1.0625rem; font-weight: 600;
    color: var(--text);
    margin-bottom: 1.75rem;
    letter-spacing: -0.01em;
}
.logo em { font-style: normal; color: var(--primary); }
.logo-icon {
    width: 34px; height: 34px;
    background: transparent;
    color: var(--text);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.0625rem;
    flex-shrink: 0;
}
.logo-icon img { width: 100%; height: 100%; object-fit: contain; }
.nav-section {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin: 1.25rem 0 0.5rem;
    padding-left: 0.625rem;
}
.nav-item {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    margin-bottom: 0.125rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--secondary);
    transition: all 0.15s;
    position: relative;
}
.nav-item:hover { background: #f8fafc; color: var(--text); }
.nav-item.active {
    background: var(--primary-light);
    color: var(--primary-hover);
    font-weight: 600;
}
.nav-item .badge-count {
    margin-left: auto;
    background: var(--danger);
    color: white;
    font-size: 0.65rem;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
}
.main-content {
    margin-left: 264px;
    flex: 1;
    padding: 2rem;
    max-width: calc(100% - 264px);
}
.topbar {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 1.75rem;
}
.topbar h1 { font-size: 1.625rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text); }

/* ── STATS GRID ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.75rem;
}
.stat-card {
    background: var(--surface);
    border-radius: 14px;
    padding: 1.25rem 1.375rem;
    border: 1px solid var(--border);
    transition: transform 0.15s, box-shadow 0.15s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.stat-card-icon {
    width: 34px; height: 34px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.0625rem;
    margin-bottom: 0.75rem;
    background: var(--primary-light); color: var(--primary-hover);
}
.stat-card.success .stat-card-icon { background: var(--success-light); color: #059669; }
.stat-card.warning .stat-card-icon { background: var(--warning-light); color: #b45309; }
.stat-card.danger .stat-card-icon { background: var(--danger-light); color: #b91c1c; }
.stat-label { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.stat-value { font-size: 1.875rem; font-weight: 700; margin-top: 0.25rem; letter-spacing: -0.02em; color: var(--text); }
.stat-sub { font-size: 0.8125rem; color: var(--secondary); margin-top: 0.25rem; }

/* ── QUESTION LIST ── */
.question-list { display: flex; flex-direction: column; gap: 0.875rem; }
.question-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    display: flex; justify-content: space-between; align-items: flex-start;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
    will-change: transform;
}
.question-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
    transform: translateX(4px);
}
.q-info { flex: 1; }
.q-title { font-weight: 700; font-size: 1rem; margin-bottom: 0.375rem; }
.q-description { font-size: 0.8125rem; color: var(--secondary); margin-bottom: 0.5rem; line-height: 1.4; }
.q-meta { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.q-type { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); background: var(--bg); padding: 0.25rem 0.625rem; border-radius: 6px; }
.q-type.camera { background: #dbeafe; color: #1e40af; }

/* ── TARGET GRID ── */
.target-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.25rem;
}
.target-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: all 0.2s;
}
.target-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.target-region { font-size: 1.125rem; font-weight: 700; }
.target-meta { font-size: 0.875rem; color: var(--secondary); margin-top: 0.25rem; }
.target-numbers {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 1rem; margin-top: 1.25rem; padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    text-align: center;
}
.target-num { font-size: 1.5rem; font-weight: 800; }
.target-num-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; font-weight: 700; margin-top: 0.25rem; }

/* ── GEO STATUS ── */
.geo-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    font-weight: 600;
}
.geo-status.pending { background: #fef3c7; color: #92400e; }
.geo-status.resolved { background: #d1fae5; color: #065f46; }
.geo-status.error { background: #fee2e2; color: #991b1b; }

/* ── CLIENT PAGES ── */
.client-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f4ff 0%, #f8fafc 100%);
    padding: 2rem 1rem;
}
.client-dashboard {
    min-height: 100vh;
    background: var(--bg);
}
.client-topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 40;
}
.client-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}
.client-name {
    font-weight: 700;
    font-size: 1.125rem;
}

/* ── LOGIN CARD ── */
.login-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
}
.login-card .sub {
    text-align: center;
    color: var(--secondary);
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
}

/* ── CONFIRMATION CARD ── */
.confirmation-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    padding: 3rem 2rem;
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}
.big-icon {
    font-size: 4rem;
    color: var(--success);
    margin-bottom: 1rem;
}
.ref-display {
    display: inline-block;
    background: var(--bg);
    border: 2px dashed var(--primary);
    color: var(--primary);
    padding: 1rem 2rem;
    border-radius: var(--radius);
    font-family: monospace;
    font-size: 1.5rem;
    font-weight: 800;
    margin: 1rem 0;
}

/* ── FOOTER ── */
.footer-bar {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ── RADIO / CHECKBOX GROUPS ── */
.radio-group, .checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}
.choice-label {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.875rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9375rem;
}
.choice-label:hover {
    background: var(--bg);
    border-color: var(--primary);
}
.choice-label input {
    width: auto;
    margin: 0;
    flex-shrink: 0;
}

/* ── RATING STARS ── */
.rating-stars {
    display: flex;
    gap: 0.5rem;
    font-size: 2rem;
    color: var(--border);
    cursor: pointer;
}
.rating-stars .star {
    transition: all 0.2s;
}
.rating-stars .star:hover,
.rating-stars .star.active {
    color: #fbbf24;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
}

/* ── SCALE RATING 1-10 ── */
.rating10-wrap {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    justify-content: center;
}
.rating10-num {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
    background: var(--surface);
}
.rating10-num input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}
.rating10-num .rating10-label {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-muted);
    pointer-events: none;
    transition: all 0.15s;
}
.rating10-num:hover {
    border-color: var(--primary);
    transform: scale(1.1);
}
.rating10-num:hover .rating10-label {
    color: var(--primary);
}
.rating10-num:has(input:checked),
.rating10-num.active {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(196, 149, 106, 0.35);
}
.rating10-num:has(input:checked) .rating10-label,
.rating10-num.active .rating10-label {
    color: white;
}
.rating10-num input:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 50%;
}

/* ── CAMERA ── */
.camera-container {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    background: var(--bg);
}
.camera-preview {
    aspect-ratio: 4/3;
    background: #0f172a;
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}
.camera-placeholder {
    font-size: 3rem;
    opacity: 0.5;
}
.camera-controls {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}
.captured-photo {
    width: 100%;
    border-radius: var(--radius-sm);
    display: block;
}
.photo-meta {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: var(--surface);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.geo-stamp {
    font-size: 0.875rem;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.geo-caption {
    position: absolute;
    bottom: 0.75rem;
    left: 0.75rem;
    right: 0.75rem;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.geo-dot {
    width: 8px;
    height: 8px;
    background: #fbbf24;
    border-radius: 50%;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ── QUESTION BLOCK ── */
.question-block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    transition: all 0.2s;
}
.question-block h3 {
    font-size: 1.0625rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text);
}
.q-desc {
    font-size: 0.875rem;
    color: var(--secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}
.required {
    color: var(--danger);
}

/* ── VERIFY ── */
.verify-box {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    max-width: 600px;
    margin-bottom: 2rem;
}
.verify-result {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    border-left: 4px solid var(--success);
}

/* ── OFFLINE NOTICE ── */
#offlineNotice {
    background: var(--warning-light);
    color: #92400e;
    padding: 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    font-weight: 600;
}

/* ── REGION SELECT ── */
#regionSelectContainer {
    margin-bottom: 1.5rem;
}

/* ── RESPONDENT PAGE ── */
.respondent-page {
    min-height: 100vh;
    background: linear-gradient(180deg, #f0f4ff 0%, var(--bg) 100%);
    padding: 2rem 1rem;
}
.respondent-container { max-width: 720px; margin: 0 auto; }
.respondent-header { text-align: center; margin-bottom: 2rem; }
.respondent-header h1 { font-size: 2rem; font-weight: 800; color: var(--text); margin-bottom: 0.5rem; }
.respondent-header p { color: var(--secondary); font-size: 1.0625rem; max-width: 500px; margin: 0 auto; }
.ref-id-box {
    display: inline-flex; align-items: center; gap: 0.75rem;
    background: var(--surface);
    border: 1.5px dashed var(--primary);
    color: var(--primary);
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 1rem;
    margin: 1.5rem auto;
    box-shadow: var(--shadow-sm);
}
.ref-id-box .label { font-size: 0.875rem; font-weight: 600; color: var(--secondary); }

/* ── SUBMIT OVERLAY ── */
.submit-overlay-bg {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    flex-direction: column;
    gap: 1.5rem;
}
.submit-overlay {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 3rem 4rem;
    box-shadow: var(--shadow-lg);
    text-align: center;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    animation: fadeIn 0.3s ease-out;
}
.submit-spinner {
    width: 56px;
    height: 56px;
    border: 4px solid var(--primary-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}
.submit-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
}
.submit-sub {
    font-size: 0.9375rem;
    color: var(--secondary);
}

/* ── WATERMARK PREVIEW ── */
.watermark-preview {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.75) !important;
    color: #fff !important;
    padding: 10px 14px !important;
    font-size: 12px !important;
    font-family: 'Courier New', monospace !important;
    border-radius: 0 0 8px 8px !important;
    pointer-events: none;
    line-height: 1.6;
    border-top: 2px solid var(--warning);
}

/* ── FORM SELECTOR ── */
.form-selector { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 1rem; }
.form-selector select { min-width: 200px; }
.form-badge { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.25rem 0.5rem; border-radius: 6px; font-size: 0.75rem; font-weight: 700; }
.form-badge.published { background: var(--success-light); color: #065f46; }
.form-badge.draft { background: var(--warning-light); color: #92400e; }

/* ── SECTION CARD ── */
.section-card { background: var(--bg); border: 1px dashed var(--border); border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.section-title { font-weight: 700; font-size: 1rem; }
.section-desc { font-size: 0.875rem; color: var(--secondary); }

/* ── DRAG & DROP ── */
.drag-handle { cursor: grab; padding: 0.25rem; color: var(--text-muted); font-size: 1.25rem; }
.drag-handle:active { cursor: grabbing; }
.question-card.dragging {
    opacity: 0.4;
    border: 2px dashed var(--primary);
    box-shadow: none;
    transform: scale(0.98);
    cursor: grabbing;
}
.section-card.drag-target { background: var(--primary-light); transition: background 0.15s ease; }
.drop-zone { border: 2px dashed var(--primary); background: var(--primary-light); min-height: 60px; border-radius: var(--radius); margin: 0.5rem 0; }

/* ── STEP INDICATOR ── */
.step-indicator { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; justify-content: center; }
.step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--border);
    color: var(--text-muted);
    transition: all 0.3s;
}
.step-dot.active { background: var(--primary); color: white; transform: scale(1.1); }
.step-dot.completed { background: var(--success); color: white; }
.step-line { flex: 1; height: 2px; background: var(--border); align-self: center; max-width: 30px; transition: all 0.3s; }
.step-line.completed { background: var(--success); }
.question-slide { display: none; animation: slideIn 0.4s ease-out; }
.question-slide.active { display: block; }
@keyframes slideIn {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}
.nav-buttons { display: flex; justify-content: space-between; margin-top: 2rem; gap: 1rem; }

/* ── SECTION BANNER ── */
.section-banner {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--bg) 100%);
    border: 1px solid var(--primary-light);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}
.section-banner h2 { color: var(--primary); font-size: 1.25rem; margin-bottom: 0.5rem; }
.section-banner p { color: var(--secondary); font-size: 0.9375rem; }
.progress-text { text-align: center; margin-bottom: 1rem; color: var(--secondary); font-size: 0.875rem; font-weight: 600; }
.form-not-found { text-align: center; padding: 4rem 2rem; }
.form-not-found .icon { font-size: 4rem; margin-bottom: 1rem; }

/* ── PREVIEW ── */
.preview-question { display: none; }
.preview-question.active { display: block; animation: fadeIn 0.3s ease-out; }
.preview-nav { display: flex; justify-content: space-between; margin-top: 1.5rem; }
.section-divider { text-align: center; margin: 2rem 0; position: relative; }
.section-divider::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--border); }
.section-divider span { background: var(--surface); padding: 0 1rem; position: relative; font-weight: 700; color: var(--primary); }

/* ── RANKING PREVIEW ── */
.ranking-preview-list { display: flex; flex-direction: column; gap: 0.5rem; }
.ranking-preview-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
}
.ranking-preview-num {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--border);
    color: var(--text-muted);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 700;
    flex-shrink: 0;
}
.ranking-preview-label {
    flex: 1;
    font-size: 0.9375rem;
    font-weight: 500;
}

/* ── OTHER TEXT PREVIEW ── */
.other-text-preview {
    margin-left: 2rem;
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg);
    border: 1.5px dashed var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    color: var(--text-muted);
    max-width: 300px;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    .main-content {
        margin-left: 0;
        max-width: 100%;
    }
    .admin-layout {
        flex-direction: column;
    }
    .client-main {
        padding: 1rem;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .target-grid {
        grid-template-columns: 1fr;
    }
    .login-card {
        padding: 1.5rem;
    }
    .submit-overlay {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    .nav-buttons {
        flex-direction: column;
    }
    .step-indicator {
        gap: 0.25rem;
    }
    .step-dot {
        width: 28px;
        height: 28px;
        font-size: 0.65rem;
    }
    .step-line {
        max-width: 15px;
    }
}