/* Reset & Design System */
:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #0f172a;
    --dark-card: #1e293b;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-600: #475569;
    --gray-800: #1e293b;
    
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.1);

    --font-family: 'Inter', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
}

[data-theme="dark"] {
    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --primary-light: #312e81;
    --gray-50: #1e293b;
    --gray-100: #334155;
    --gray-200: #475569;
    --gray-800: #f8fafc;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Helper Utilities */
.hidden { display: none !important; }
.text-center { text-align: center; }
.py-4 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.text-primary { color: var(--primary); }
.text-emerald { color: var(--success); }
.text-purple { color: #8b5cf6; }

/* Theme Switcher Button */
.top-controls-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16px;
}

.theme-btn, .theme-btn-sm {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.theme-btn-sm {
    padding: 6px 12px;
}

.theme-btn:hover, .theme-btn-sm:hover {
    border-color: var(--primary);
    color: var(--primary);
}

[data-theme="dark"] .sun-icon { display: inline-block; color: #f59e0b; }
[data-theme="dark"] .moon-icon { display: none; }
[data-theme="light"] .sun-icon { display: none; }
[data-theme="light"] .moon-icon { display: inline-block; color: #6366f1; }

/* Main Survey Container */
.survey-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.survey-header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #ffffff;
    padding: 40px 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    margin-bottom: 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.survey-header::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    pointer-events: none;
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

.survey-header h1 {
    font-size: 1.85rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
}

.survey-header .subtitle {
    font-size: 1rem;
    opacity: 0.92;
    font-weight: 400;
}

/* Question Card */
.question-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    display: flex;
    gap: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.question-card:hover {
    box-shadow: var(--shadow-lg);
}

.question-number {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.question-content {
    flex-grow: 1;
}

.question-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 12px;
}

.question-title .required {
    color: var(--danger);
}

.question-title .sub-label {
    font-size: 0.9rem;
    color: var(--gray-400);
    font-weight: 400;
}

.question-guide {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 14px;
}

/* Form Option Styling */
.options-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: var(--bg-card);
    transition: all 0.2s ease;
    user-select: none;
}

.option-item:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.option-item input {
    display: none;
}

.custom-radio, .custom-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-400);
    border-radius: 50%;
    display: inline-block;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.custom-checkbox {
    border-radius: 4px;
}

.option-item input[type="radio"]:checked + .custom-radio {
    border-color: var(--primary);
    background: var(--primary);
}

.option-item input[type="radio"]:checked + .custom-radio::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    width: 6px;
    height: 6px;
    background: #ffffff;
    border-radius: 50%;
}

.option-item input[type="checkbox"]:checked + .custom-checkbox {
    border-color: var(--primary);
    background: var(--primary);
}

.option-item input[type="checkbox"]:checked + .custom-checkbox::after {
    content: '';
    width: 5px;
    height: 9px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    position: absolute;
    top: 2px;
    left: 6px;
    transform: rotate(45deg);
}

.option-item input:checked ~ .option-text {
    color: var(--primary);
    font-weight: 600;
}

.option-text {
    font-size: 0.98rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.option-icon {
    color: var(--text-muted);
    width: 18px;
    height: 18px;
}

/* Option Chips Grid (Q2) */
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.option-chip {
    cursor: pointer;
    user-select: none;
}

.option-chip input {
    display: none;
}

.chip-content {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    font-size: 0.95rem;
    color: var(--text-main);
    transition: all 0.2s ease;
}

.chip-content i {
    color: var(--primary);
    font-size: 1.1rem;
    width: 20px;
    height: 20px;
}

.option-chip:hover .chip-content {
    border-color: var(--primary);
    background: var(--primary-light);
}

.option-chip input:checked + .chip-content {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

/* Text Inputs & Textarea */
.other-input-wrap {
    margin-top: 8px;
}

.text-input, .custom-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    background: var(--bg-card);
    color: var(--text-main);
    outline: none;
    transition: border-color 0.2s ease;
}

.text-input:focus, .custom-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

/* NPS Rating Control (Q7) */
.nps-rating-container {
    margin-top: 15px;
}

.nps-scale {
    display: flex;
    gap: 6px;
    justify-content: space-between;
    flex-wrap: wrap;
}

.nps-item {
    flex: 1;
    min-width: 40px;
    cursor: pointer;
}

.nps-item input {
    display: none;
}

.nps-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main);
    background: var(--bg-card);
    transition: all 0.2s ease;
}

.nps-item:hover .nps-btn {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

.nps-item input:checked + .nps-btn {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

.nps-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 10px;
}

/* Submit Card */
.submit-card {
    margin-top: 30px;
    text-align: center;
}

.btn-submit {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
}

/* Footer & Gratitude */
.survey-footer {
    margin-top: 40px;
    text-align: center;
}

.gratitude-box {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.gratitude-icon {
    font-size: 2.2rem;
    display: block;
    margin-bottom: 6px;
}

.gratitude-box h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}

.gratitude-box p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.admin-link-wrap {
    margin-top: 20px;
    margin-bottom: 40px;
}

.admin-link {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.admin-link:hover {
    color: var(--primary);
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 28px;
    max-width: 440px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: modalPop 0.3s ease;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-card.modal-lg {
    max-width: 820px;
    text-align: left;
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal-icon-wrap {
    font-size: 3.5rem;
    margin-bottom: 16px;
}

.text-success { color: var(--success); }

.modal-card h2 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--text-main);
}

.modal-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

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

.btn-primary {
    background: var(--primary);
    color: #ffffff;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary-sm {
    background: var(--primary);
    color: #ffffff;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    border: none;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

/* ==========================================================================
   ADMIN MANAGEMENT TOOL STYLES
   ========================================================================== */
.admin-body {
    background: var(--bg-body);
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
    padding: 36px;
    border: 1px solid var(--border-color);
}

.login-header {
    text-align: center;
    margin-bottom: 28px;
}

.admin-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 1.8rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.login-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
}

.login-header p {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.input-group {
    margin-bottom: 18px;
}

.input-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
}

.input-group input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    background: var(--bg-card);
    color: var(--text-main);
    outline: none;
}

.input-group input:focus {
    border-color: var(--primary);
}

.btn-block {
    width: 100%;
}

.alert-danger {
    background: #fef2f2;
    color: var(--danger);
    border: 1px solid #fecaca;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    margin-bottom: 16px;
}

.login-footer {
    margin-top: 24px;
    text-align: center;
}

.login-footer a {
    color: var(--text-muted);
    font-size: 0.88rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Dashboard Layout */
.dashboard-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.dash-navbar {
    background: var(--bg-card);
    height: 64px;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.dash-brand {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.dash-brand i { color: var(--primary); }

.dash-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-badge {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    background: var(--gray-100);
    padding: 6px 12px;
    border-radius: var(--radius-full);
}

.btn-outline-sm {
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-main);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-danger-sm {
    background: var(--danger);
    color: #ffffff;
    border: none;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    cursor: pointer;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-danger {
    background: var(--danger);
    color: #ffffff;
    border: none;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.dash-main {
    padding: 32px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.metric-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 18px;
}

.metric-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #ffffff;
    flex-shrink: 0;
}

.bg-blue { background: #3b82f6; }
.bg-emerald { background: #10b981; }
.bg-purple { background: #8b5cf6; }
.bg-amber { background: #f59e0b; }

.metric-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 4px;
}

.metric-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
}

/* Charts Top Section (Trend Line & Category Donut) */
.charts-grid-top {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 28px;
}

@media (max-width: 1024px) {
    .charts-grid-top {
        grid-template-columns: 1fr;
    }
}

/* Keywords Cloud Section */
.keywords-section {
    margin-bottom: 28px;
}

.keywords-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding: 24px;
}

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

.keywords-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.keywords-header .sub-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-left: 28px;
}

.keywords-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.keyword-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    transition: transform 0.2s;
}

.keyword-tag:hover {
    transform: scale(1.05);
}

.kw-word { font-weight: 700; }
.kw-count { font-size: 0.8rem; opacity: 0.85; background: rgba(0,0,0,0.08); padding: 2px 6px; border-radius: 10px; }

.bg-tag-blue { background: #dbeafe; color: #1e40af; }
.bg-tag-emerald { background: #d1fae5; color: #065f46; }
.bg-tag-purple { background: #f3e8ff; color: #6b21a8; }
.bg-tag-amber { background: #fef3c7; color: #92400e; }
.bg-tag-pink { background: #fce7f3; color: #9d174d; }

/* Section Title */
.section-title {
    margin-bottom: 16px;
}

.section-title h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-sub {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-top: 4px;
    display: block;
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.chart-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding: 24px;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chart-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.chart-header h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-type-select {
    padding: 4px 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    color: var(--text-main);
    outline: none;
    background: var(--bg-body);
}

.chart-body {
    position: relative;
    height: 270px;
    width: 100%;
}

/* Data Table Section */
.table-section {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding: 24px;
}

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

.table-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.table-title h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
}

.badge {
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

.badge-score {
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.85rem;
    background: var(--primary-light);
    color: var(--primary);
}

.table-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 16px;
    height: 16px;
}

.search-box input {
    padding: 8px 12px 8px 36px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    width: 220px;
    background: var(--bg-card);
    color: var(--text-main);
    outline: none;
}

.btn-success {
    background: var(--success);
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--text-main);
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.table-wrapper {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table th, .data-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: var(--gray-50);
    color: var(--text-muted);
    font-weight: 600;
}

.data-table tr:hover {
    background: var(--gray-50);
}

.btn-action-icon {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.88rem;
    padding: 6px 10px;
    border-radius: 6px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-action-icon.view {
    background: var(--primary-light);
    color: var(--primary);
}

.btn-action-icon.delete {
    color: var(--danger);
}

/* Pagination */
.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.pagination-buttons {
    display: flex;
    gap: 6px;
}

.page-btn {
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-main);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
}

.page-btn.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

/* Modal Inner Header & Navigation */
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.detail-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.detail-title-wrap h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.badge-accent {
    background: var(--primary-light);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.9rem;
}

.sub-badge {
    background: var(--gray-100);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
}

/* Detail Navigation Bar */
.detail-nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--gray-50);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    margin: 16px 0;
    gap: 12px;
}

.btn-nav {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-nav:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-nav:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.detail-jump-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.select-sm {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    background: var(--bg-card);
    color: var(--text-main);
    outline: none;
}

.modal-body {
    overflow-y: auto;
    padding-right: 6px;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    margin-top: 16px;
}

/* Response Card Viewer Inside Modal */
.response-card-viewer {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.response-meta-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #ffffff;
    padding: 16px 20px;
    border-radius: var(--radius-md);
}

.meta-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meta-item {
    font-size: 0.88rem;
    opacity: 0.9;
}

.nps-large-badge {
    padding: 10px 20px;
    border-radius: var(--radius-md);
    text-align: center;
    color: #ffffff;
    box-shadow: var(--shadow-sm);
}

.nps-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.nps-num {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.1;
}

.nps-num small {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Question Response Box */
.q-response-box {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.q-response-item {
    display: flex;
    gap: 14px;
    background: var(--gray-50);
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: var(--radius-sm);
}

.q-num {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 800;
    font-size: 0.95rem;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.q-body {
    flex-grow: 1;
}

.q-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
}

.val-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-main);
}

.other-val-box {
    margin-top: 8px;
    background: var(--bg-card);
    border: 1px dashed var(--border-color);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--text-main);
}

.chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip-badge {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 0.88rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: var(--radius-full);
}

.chip-badge.purple {
    border-color: #c084fc;
    color: #7e22ce;
    background: #faf5ff;
}

.feedback-quote-box {
    position: relative;
    background: var(--bg-card);
    border-left: 4px solid var(--primary);
    padding: 14px 18px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    box-shadow: var(--shadow-sm);
}

.quote-icon {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 20px;
    height: 20px;
    color: var(--text-muted);
}

.quote-text {
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.5;
    white-space: pre-wrap;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .question-card {
        flex-direction: column;
        padding: 20px;
    }
    
    .question-number {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .dash-navbar {
        padding: 0 16px;
    }
    
    .dash-main {
        padding: 16px;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }

    .detail-nav-bar {
        flex-direction: column;
        align-items: stretch;
    }
}
