/* AI Cancer Diagnosis Research - Main Stylesheet */
/* Color Palette: Teal (#2EC4D6), Purple (#7B4DFF), Deep Blue (#1F3A8A) */

:root {
    /* Primary Colors */
    --primary-teal: #2EC4D6;
    --primary-purple: #7B4DFF;
    --deep-blue: #1F3A8A;
    
    /* Supporting Colors */
    --light-bg: #F6F9FC;
    --card-bg: #FFFFFF;
    --text-dark: #1F2937;
    --text-muted: #6B7280;
    --soft-glow: #8BE9FD;
    
    /* Gradients */
    --hero-gradient: linear-gradient(135deg, #1F3A8A 0%, #3B82F6 50%, #7B4DFF 100%);
    --btn-gradient: linear-gradient(135deg, #2EC4D6, #3B82F6, #7B4DFF);
    --accent-gradient: linear-gradient(135deg, #2EC4D6, #7B4DFF);
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --shadow-glow: 0 0 20px rgba(46, 196, 214, 0.3);
}

/* Typography */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=Inter:wght@300;400;500;600&family=Roboto+Mono:wght@400;500&display=swap');

body {
    font-family: 'Inter', sans-serif;
    background: var(--light-bg);
    color: var(--text-dark);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

.mono {
    font-family: 'Roboto Mono', monospace;
}

/* Likert Scale */
.likert-scale {
    display: flex;
    gap: 8px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.likert-options {
    display: flex;
    gap: 8px;
    flex: 1;
    min-width: 100%;
}

.likert-option {
    flex: 1;
    min-width: 80px;
    padding: 12px 8px;
    text-align: center;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
}

.likert-option:hover {
    border-color: var(--primary-teal);
    background: rgba(46, 196, 214, 0.05);
}

.likert-option.selected {
    border-color: var(--primary-teal);
    background: var(--primary-teal);
    color: white;
    box-shadow: var(--shadow-glow);
}

.likert-option.selected .likert-number {
    color: white;
}

.likert-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-teal);
    margin-bottom: 4px;
}

.likert-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.2;
}

.likert-option.selected .likert-label {
    color: rgba(255, 255, 255, 0.9);
}

/* Validation states for likert scale */
.likert-scale.needs-selection {
    border: 2px dashed #dc3545;
    border-radius: 8px;
    padding: 10px;
}

.likert-scale.needs-selection .likert-option {
    border-color: #dc3545;
}

/* Navigation */
.navbar-custom {
    background: var(--deep-blue) !important;
    padding: 1rem 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    margin-top: 0 !important;
    top: 0 !important;
    position: fixed !important;
    z-index: 1000 !important;
}

html, body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    overflow-x: hidden;
}

/* Remove any top margin from navbar */
.navbar-custom {
    margin-top: 0 !important;
}

* {
    max-width: 100%;
}

/* Make navbar truly full width */
.navbar-custom {
    width: 100%;
}

/* Add padding for fixed navbar */
#dashboardSection {
    padding-top: 80px !important;
}

.container-fluid {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.navbar-custom .navbar-brand {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-gradient {
    background: linear-gradient(135deg, #8BE9FD, #2EC4D6, #3B82F6, #7B4DFF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.navbar-custom .nav-link {
    color: rgba(255,255,255,0.9);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.navbar-custom .nav-link:hover {
    background: rgba(46, 196, 214, 0.2);
    color: var(--primary-teal);
}

/* Buttons */
.btn-primary-custom {
    background: var(--btn-gradient);
    border: none;
    color: white;
    font-weight: 600;
    padding: 14px 32px;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
    color: white;
}

.btn-secondary-custom {
    background: transparent;
    border: 2px solid var(--primary-teal);
    color: var(--primary-teal);
    font-weight: 600;
    padding: 12px 28px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.btn-secondary-custom:hover {
    background: var(--primary-teal);
    color: white;
}

/* Cards */
.card-custom {
    background: var(--card-bg);
    border: 1px solid rgba(46, 196, 214, 0.2);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.card-custom:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

/* Hero Section */
.hero-section {
    background: var(--hero-gradient);
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

/* Animated Background Particles */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: float 15s infinite;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { left: 20%; animation-delay: 2s; }
.particle:nth-child(3) { left: 30%; animation-delay: 4s; }
.particle:nth-child(4) { left: 40%; animation-delay: 6s; }
.particle:nth-child(5) { left: 50%; animation-delay: 8s; }
.particle:nth-child(6) { left: 60%; animation-delay: 10s; }
.particle:nth-child(7) { left: 70%; animation-delay: 12s; }
.particle:nth-child(8) { left: 80%; animation-delay: 14s; }
.particle:nth-child(9) { left: 90%; animation-delay: 1s; }
.particle:nth-child(10) { left: 15%; animation-delay: 3s; }

@keyframes float {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) scale(1);
        opacity: 0;
    }
}

/* Glowing Orb Animation */
.glowing-orb {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(46, 196, 214, 0.3) 0%, rgba(123, 77, 255, 0.2) 50%, transparent 70%);
    border-radius: 50%;
    position: relative;
    animation: pulse-glow 3s ease-in-out infinite;
}

.glowing-orb::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, var(--primary-teal) 0%, var(--primary-purple) 100%);
    border-radius: 50%;
    opacity: 0.8;
}

.glowing-orb::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    opacity: 0.9;
}

@keyframes pulse-glow {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 30px rgba(46, 196, 214, 0.3);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 60px rgba(46, 196, 214, 0.5);
    }
}

/* Orbiting Nodes */
.orbiting-node {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--soft-glow);
    border-radius: 50%;
    animation: orbit 8s linear infinite;
}

.orbiting-node:nth-child(1) { animation-delay: 0s; }
.orbiting-node:nth-child(2) { animation-delay: -2s; }
.orbiting-node:nth-child(3) { animation-delay: -4s; }
.orbiting-node:nth-child(4) { animation-delay: -6s; }

@keyframes orbit {
    0% { transform: rotate(0deg) translateX(100px) rotate(0deg); }
    100% { transform: rotate(360deg) translateX(100px) rotate(-360deg); }
}

/* Progress Bar */
.progress-custom {
    height: 10px;
    background: rgba(46, 196, 214, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-custom {
    height: 100%;
    background: var(--btn-gradient);
    border-radius: 10px;
    transition: width 0.5s ease;
}

/* Form Styles */
.form-control-custom {
    background: var(--card-bg);
    border: 2px solid rgba(46, 196, 214, 0.3);
    border-radius: 12px;
    padding: 14px 18px;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.form-control-custom:focus {
    border-color: var(--primary-teal);
    box-shadow: 0 0 0 4px rgba(46, 196, 214, 0.15);
    outline: none;
}

.form-label-custom {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

/* Option Cards */
.option-card {
    background: var(--card-bg);
    border: 2px solid rgba(46, 196, 214, 0.2);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.option-card:hover {
    border-color: var(--primary-teal);
    background: rgba(46, 196, 214, 0.05);
    transform: translateX(4px);
}

.option-card.selected {
    background: linear-gradient(135deg, rgba(46, 196, 214, 0.15), rgba(123, 77, 255, 0.1));
    border-color: var(--primary-teal);
}

.option-indicator {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(46, 196, 214, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.option-card.selected .option-indicator {
    background: var(--primary-teal);
    border-color: var(--primary-teal);
}

.option-card.selected .option-indicator::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Likert Scale */
.likert-scale {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin: 20px 0;
}

.likert-option {
    flex: 1;
    text-align: center;
    padding: 12px 8px;
    background: var(--card-bg);
    border: 2px solid rgba(46, 196, 214, 0.2);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.likert-option:hover {
    border-color: var(--primary-teal);
}

.likert-option.selected {
    background: var(--primary-teal);
    border-color: var(--primary-teal);
    color: white;
}

/* Stats Cards */
.stat-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid rgba(46, 196, 214, 0.15);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-number {
    font-family: 'Roboto Mono', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 8px;
}

/* Charts */
.chart-container {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
    border: 1px solid rgba(46, 196, 214, 0.15);
}

.chart-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--deep-blue);
    margin-bottom: 16px;
}

/* Bar Chart */
.bar-chart {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bar-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bar-label {
    min-width: 120px;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.bar-container {
    flex: 1;
    height: 32px;
    background: rgba(46, 196, 214, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: var(--btn-gradient);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 12px;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    transition: width 1s ease;
}

.bar-fill.teal { background: var(--primary-teal); }
.bar-fill.purple { background: var(--primary-purple); }
.bar-fill.blue { background: #3B82F6; }

/* Pie/Donut Chart */
.donut-chart {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    position: relative;
}

.donut-chart::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: var(--card-bg);
    border-radius: 50%;
}

/* Footer */
.footer-custom {
    background: var(--deep-blue);
    color: white;
    padding: 40px 0 20px;
}

.footer-custom a {
    color: var(--primary-teal);
    text-decoration: none;
}

.footer-custom a:hover {
    text-decoration: underline;
}

/* Section Headers */
.section-header {
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

/* Question Badge */
.question-badge {
    background: var(--btn-gradient);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    margin-right: 12px;
}

/* Checkbox Cards */
.checkbox-group {
    display: block;
    padding: 10px 0;
}

.checkbox-card {
    background: var(--card-bg);
    border: 2px solid rgba(46, 196, 214, 0.2);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    font-size: 0.95rem;
    font-weight: 500;
}

.checkbox-card:hover {
    border-color: var(--primary-teal);
    background: rgba(46, 196, 214, 0.05);
    transform: translateX(4px);
}

.checkbox-card.selected {
    background: linear-gradient(135deg, rgba(46, 196, 214, 0.15), rgba(123, 77, 255, 0.1));
    border-color: var(--primary-teal);
}

.checkbox-indicator {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(46, 196, 214, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-card.selected .checkbox-indicator {
    background: var(--primary-teal);
    border-color: var(--primary-teal);
}

.checkbox-card.selected .checkbox-indicator::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-card span {
    font-weight: 600;
}

/* CAPTCHA */
.captcha-box {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
}

.captcha-question {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* Mobile Burger Menu */
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.5) !important;
}

/* Mobile Hero Text Padding */
@media (max-width: 991px) {
    .hero-section {
        padding-top: 60px !important;
    }
    .hero-section .col-lg-6 {
        padding-top: 20px !important;
    }
}

/* Range Slider */
.range-container {
    padding: 20px 0;
}

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

.range-value {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-teal);
    font-family: 'Roboto Mono', monospace;
}

input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 10px;
    background: rgba(46, 196, 214, 0.2);
    border-radius: 10px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 28px;
    height: 28px;
    background: var(--btn-gradient);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(46, 196, 214, 0.4);
}

/* Tables */
.table-custom {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.table-custom th {
    background: var(--deep-blue);
    color: white;
    font-weight: 600;
    padding: 16px;
    text-align: left;
}

.table-custom td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(46, 196, 214, 0.1);
}

.table-custom tr:hover {
    background: rgba(46, 196, 214, 0.05);
}

/* Badges */
.badge-custom {
    background: rgba(46, 196, 214, 0.15);
    color: var(--primary-teal);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease;
}

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

.slide-up {
    animation: slideUp 0.6s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
    .stat-number {
        font-size: 2rem;
    }
    
    .likert-scale {
        flex-wrap: wrap;
        overflow-x: hidden;
    }
    
    .likert-options {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .likert-option {
        flex: 1 1 45%;
        min-width: calc(50% - 6px);
        padding: 10px 4px;
    }
    
    .likert-number {
        font-size: 0.9rem;
    }
    
    .likert-label {
        font-size: 0.7rem;
    }
}

/* Consent Section */
.consent-box {
    background: rgba(46, 196, 214, 0.05);
    border: 2px solid rgba(46, 196, 214, 0.3);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.consent-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.consent-icon {
    color: var(--primary-teal);
    font-size: 1.2rem;
    margin-top: 2px;
}

/* Tabs for Results */
.nav-tabs-custom {
    border-bottom: 2px solid rgba(46, 196, 214, 0.2);
    margin-bottom: 24px;
}

.nav-tabs-custom .nav-link {
    border: none;
    color: var(--text-muted);
    font-weight: 500;
    padding: 12px 24px;
    border-radius: 8px 8px 0 0;
    transition: all 0.3s ease;
}

.nav-tabs-custom .nav-link:hover {
    color: var(--primary-teal);
    background: rgba(46, 196, 214, 0.1);
}

.nav-tabs-custom .nav-link.active {
    background: var(--primary-teal);
    color: white;
}

/* Filters */
.filter-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.filter-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.filter-select {
    border: 2px solid rgba(46, 196, 214, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    width: 100%;
}

/* Live Counter */
.live-counter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(46, 196, 214, 0.1);
    padding: 8px 16px;
    border-radius: 30px;
    font-weight: 500;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #10B981;
    border-radius: 50%;
    animation: blink 1.5s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* === STANDARDIZED ADMIN DASHBOARD STYLES === */

/* Dashboard Card */
.dashboard-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

/* Chart Card */
.chart-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 16px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
}

.chart-card .chart-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

/* Response Card */
.response-card {
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--primary-teal);
    transition: box-shadow 0.2s;
}

.response-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.response-card:nth-child(odd) {
    border-left-color: var(--primary-purple);
}

.response-card:nth-child(even) {
    border-left-color: var(--primary-teal);
}

/* Meta Line (for response cards) */
.meta-line {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 8px;
}

.meta-date {
    font-weight: 600;
}

.meta-sep {
    margin: 0 6px;
}

.meta-uni, .meta-field {
    color: #495057;
}

/* Response Text */
.response-text {
    font-size: 14px;
    line-height: 1.6;
    color: #212529;
    font-weight: 500;
}

/* Stacked Bar Chart */
.chart-stacked .stacked-row {
    margin-bottom: 12px;
}

.chart-stacked .stacked-label {
    font-size: 12px;
    font-weight: 500;
    color: #495057;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chart-stacked .stacked-bars {
    display: flex;
    height: 24px;
    border-radius: 4px;
    overflow: hidden;
    background: #e9ecef;
}

.chart-stacked .stacked-segment {
    transition: opacity 0.2s;
}

.chart-stacked .stacked-segment:hover {
    opacity: 0.8;
}

.chart-stacked .stacked-total {
    font-size: 11px;
    color: #6c757d;
    text-align: right;
    margin-top: 2px;
}

/* Chart Legend */
.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid rgba(0,0,0,0.08);
}

.chart-legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #495057;
}

.chart-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

/* Donut Chart */
.donut-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.donut-chart {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    position: relative;
}

.donut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: var(--card-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
}

.donut-legend {
    flex: 1;
}

.donut-legend-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 12px;
}

.donut-legend-label {
    display: flex;
    align-items: center;
    gap: 6px;
}

.donut-legend-color {
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

.donut-legend-value {
    font-weight: 600;
}

/* Likert Bar (for comfort scores) */
.likert-bar {
    margin-bottom: 8px;
}

.likert-label {
    font-size: 12px;
    color: #495057;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
}

.likert-track {
    height: 20px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
}

.likert-segment {
    height: 100%;
    transition: width 0.3s;
}

/* Open Responses Column */
.open-responses-col {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 8px;
}

.open-responses-col::-webkit-scrollbar {
    width: 6px;
}

.open-responses-col::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.open-responses-col::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

/* ============================================
   UNIFIED ADMIN DASHBOARD DESIGN SYSTEM
   ============================================ */

/* Admin Section Wrapper */
#dashboardSection {
    padding: 20px;
    background: var(--light-bg);
    min-height: calc(100vh - 60px);
}

/* Tab Panel Sections */
.tab-panel-section {
    margin-bottom: 24px;
}

/* Summary Cards - Unified Family */
.summary-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid rgba(46, 196, 214, 0.15);
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    border-color: rgba(46, 196, 214, 0.3);
}

.summary-card .stat-number {
    font-size: 32px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    margin-bottom: 4px;
}

.summary-card .stat-label {
    font-size: 13px;
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Chart Card - Unified Style */
.chart-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    height: 100%;
    border: 1px solid rgba(46, 196, 214, 0.15);
}

.chart-card .chart-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--deep-blue);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(46, 196, 214, 0.2);
}

/* Dashboard Card - Generic */
.dashboard-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid rgba(46, 196, 214, 0.15);
}

/* Table Card */
.table-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    border: 1px solid rgba(46, 196, 214, 0.15);
}

.table-card .table {
    margin-bottom: 0;
}

.table-card .table thead th {
    background: var(--deep-blue);
    border-bottom: 2px solid rgba(46, 196, 214, 0.3);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
    padding: 14px 12px;
}

.table-card .table tbody td {
    padding: 12px;
    vertical-align: middle;
    font-size: 13px;
    border-bottom: 1px solid rgba(46, 196, 214, 0.1);
}

.table-card .table tbody tr:hover {
    background: rgba(46, 196, 214, 0.05);
}

/* Response Card */
.response-card {
    background: #fff;
    border: 1px solid rgba(46, 196, 214, 0.2);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.response-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-color: var(--primary-teal);
}

.response-card:nth-child(odd) {
    border-left-color: var(--primary-purple);
}

.response-card:nth-child(even) {
    border-left-color: var(--primary-teal);
}

.response-meta {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.response-meta .meta-item {
    display: inline-flex;
    align-items: center;
}

.response-meta .meta-sep {
    margin: 0 6px;
    color: #adb5bd;
}

.response-text {
    font-size: 14px;
    line-height: 1.6;
    color: #212529;
    font-weight: 500;
}

/* Admin chart colors - using public palette family: teal (#2EC4D6), purple (#7B4DFF), blue (#3B82F6), deep-blue (#1F3A8A) */
.chart-bar-fill.alt { background: var(--primary-purple); }

.chart-bar-fill.alt2 { background: #3B82F6; }

.chart-bar-fill.alt3 { background: var(--primary-teal); }

.chart-bar-fill.alt4 { background: var(--deep-blue); }

/* Admin Dashboard Bar Charts - matching public results style */
.chart-wrapper {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 25px;
}

.chart-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.chart-label {
    min-width: 160px;
    max-width: 160px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #2d3748;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-left: 10px;
    text-align: right;
}

.chart-bar-container {
    flex: 1;
    height: 40px;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    min-width: 150px;
    border: 1px solid #dee2e6;
}

.chart-bar {
    height: 100%;
    border-radius: 7px;
    transition: width 1s ease;
    min-width: 2px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 15px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    /* Use gradient colors matching public results */
}

.chart-bar.color-0 { background: linear-gradient(90deg, #2EC4D6, #3B82F6); }
.chart-bar.color-1 { background: linear-gradient(90deg, #7B4DFF, #9B59B6); }
.chart-bar.color-2 { background: linear-gradient(90deg, #3B82F6, #1F3A8A); }
.chart-bar.color-3 { background: linear-gradient(90deg, #FF6B6B, #E74C3C); }
.chart-bar.color-4 { background: linear-gradient(90deg, #4ECDC4, #1ABC9C); }
.chart-bar.color-5 { background: linear-gradient(90deg, #45B7D1, #3498DB); }
.chart-bar.color-6 { background: linear-gradient(90deg, #96CEB4, #27AE60); }
.chart-bar.color-7 { background: linear-gradient(90deg, #FFEAA7, #F39C12); }
.chart-bar.color-8 { background: linear-gradient(90deg, #DDA0DD, #8E44AD); }
.chart-bar.color-9 { background: linear-gradient(90deg, #98D8C8, #20BF6B); }

/* Hide separate chart-value when using inline style */
.chart-value {
    display: none;
}

/* Donut Chart Styles */
.donut-chart-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.donut-svg-container {
    position: relative;
    flex-shrink: 0;
}

.donut-chart {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}

.donut-center, .donut-center-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.donut-total {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark, #212529);
}

.donut-label {
    font-size: 0.7rem;
    color: #6c757d;
}

.donut-legend {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.donut-legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    padding: 5px 10px;
    border-radius: 6px;
}

.donut-legend-item:hover {
    background: #f8f9fa;
}

.donut-legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    flex-shrink: 0;
}

.donut-legend-label {
    flex: 1;
    color: #2d3748;
    font-weight: 500;
}

.donut-legend-value {
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Vertical Bar Chart Styles */
.vertical-bar-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 180px;
    padding: 20px 15px 20px 15px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.vertical-bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
    max-width: 60px;
}

.vertical-bar-container {
    width: 100%;
    height: 120px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.vertical-bar {
    width: 85%;
    border-radius: 4px 4px 0 0;
    min-height: 4px;
    transition: height 0.5s ease;
}

.vertical-bar-value {
    font-size: 0.75rem;
    font-weight: 600;
    color: #2d3748;
    margin: 2px 0;
}

.vertical-bar-label {
    font-size: 0.7rem;
    color: #6c757d;
    text-align: center;
    white-space: nowrap;
}

.vertical-bar.color-0 { background: linear-gradient(180deg, #2EC4D6, #3B82F6); }
.vertical-bar.color-1 { background: linear-gradient(180deg, #7B4DFF, #9B59B6); }
.vertical-bar.color-2 { background: linear-gradient(180deg, #3B82F6, #1F3A8A); }
.vertical-bar.color-3 { background: linear-gradient(180deg, #FF6B6B, #E74C3C); }
.vertical-bar.color-4 { background: linear-gradient(180deg, #4ECDC4, #1ABC9C); }
.vertical-bar.color-5 { background: linear-gradient(180deg, #45B7D1, #3498DB); }
.vertical-bar.color-6 { background: linear-gradient(180deg, #96CEB4, #27AE60); }
.vertical-bar.color-7 { background: linear-gradient(180deg, #FFEAA7, #F39C12); }
.vertical-bar.color-8 { background: linear-gradient(180deg, #DDA0DD, #8E44AD); }
.vertical-bar.color-9 { background: linear-gradient(180deg, #98D8C8, #20BF6B); }

.vertical-bar-label {
    font-size: 0.7rem;
    color: #6c757d;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Donut/Segment display improvement */
.donut-segment-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f1f3f5;
}

.donut-segment-item:last-child {
    border-bottom: none;
}

.donut-segment-color {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    margin-right: 10px;
    flex-shrink: 0;
}

/* Segment colors aligned with public palette */
.donut-segment-color.teal { background: var(--primary-teal); }
.donut-segment-color.purple { background: var(--primary-purple); }
.donut-segment-color.blue { background: #3B82F6; }
.donut-segment-color.deep-blue { background: var(--deep-blue); }

.donut-segment-label {
    flex: 1;
    font-size: 13px;
    color: #495057;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.donut-segment-value {
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
    margin-left: 12px;
}

/* Tab styling */
.nav-tabs.admin-tabs {
    border-bottom: 2px solid rgba(46, 196, 214, 0.2);
    margin-bottom: 24px;
}

.nav-tabs.admin-tabs .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    color: #6c757d;
    font-weight: 500;
    padding: 12px 20px;
    transition: all 0.2s;
    border-radius: 8px 8px 0 0;
}

.nav-tabs.admin-tabs .nav-link:hover {
    color: var(--primary-teal);
    background: rgba(46, 196, 214, 0.1);
    border-color: transparent;
}

.nav-tabs.admin-tabs .nav-link.active {
    background: var(--primary-teal);
    color: white;
    border-bottom-color: var(--primary-teal);
}

/* Section headings */
.section-heading {
    font-size: 18px;
    font-weight: 600;
    color: var(--deep-blue);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(46, 196, 214, 0.2);
}

.section-subheading {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 20px;
}

/* Filter section */
.filter-section {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid rgba(46, 196, 214, 0.15);
}

/* Insight text */
.insight-text {
    font-size: 12px;
    color: #6c757d;
    font-style: italic;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f1f3f5;
}

/* Open Responses Tab - Admin Dashboard */
.open-responses-col {
    max-height: 500px;
    overflow-y: auto;
    padding: 10px;
}

.response-card {
    background: #fff;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    border-left: 3px solid var(--primary-teal);
}

.response-card:nth-child(odd) {
    border-left-color: var(--primary-purple);
}

.response-card:nth-child(even) {
    border-left-color: var(--primary-teal);
}

.response-meta {
    font-size: 0.75rem;
    color: #6c757d;
    margin-bottom: 8px;
}

.meta-item {
    display: inline-block;
}

.meta-sep {
    margin: 0 6px;
    color: #adb5bd;
}

.response-text {
    font-size: 0.9rem;
    color: #212529;
    line-height: 1.5;
}
