/* Blik - Centralized CSS System
 * Shadcn-inspired design system with zero noise, maximum signal
 */

/* ==================== CSS Variables ==================== */
:root {
    /* Primary Color Scale */
    --primary-50: #eef2ff;
    --primary-100: #e0e7ff;
    --primary-200: #c7d2fe;
    --primary-300: #a5b4fc;
    --primary-400: #818cf8;
    --primary-500: #6366f1;
    --primary-600: #4f46e5;
    --primary-700: #4338ca;
    --primary-800: #3730a3;
    --primary-900: #312e81;
    --primary: #4f46e5;
    --primary-dark: #4338ca;

    /* Success Color Scale */
    --success-50: #ecfdf5;
    --success-100: #d1fae5;
    --success-200: #a7f3d0;
    --success-300: #6ee7b7;
    --success-400: #34d399;
    --success-500: #10b981;
    --success-600: #059669;
    --success-700: #047857;
    --success-800: #065f46;
    --success-900: #064e3b;
    --success: #10b981;

    /* Warning Color Scale */
    --warning-50: #fffbeb;
    --warning-100: #fef3c7;
    --warning-200: #fde68a;
    --warning-300: #fcd34d;
    --warning-400: #fbbf24;
    --warning-500: #f59e0b;
    --warning-600: #d97706;
    --warning-700: #b45309;
    --warning-800: #92400e;
    --warning-900: #78350f;
    --warning: #f59e0b;

    /* Danger Color Scale */
    --danger-50: #fef2f2;
    --danger-100: #fee2e2;
    --danger-200: #fecaca;
    --danger-300: #fca5a5;
    --danger-400: #f87171;
    --danger-500: #ef4444;
    --danger-600: #dc2626;
    --danger-700: #b91c1c;
    --danger-800: #991b1b;
    --danger-900: #7f1d1d;
    --danger: #ef4444;

    /* Neutral Colors */
    --secondary: #64748b;
    --border: #e2e8f0;
    --bg-light: #f8fafc;
    --bg-card: #ffffff;
    --bg-body: #f8fafc;
    --bg-secondary: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;

    /* Insight Colors */
    --insight-perception: #8b5cf6;
    --insight-skill: #3b82f6;
    --insight-strength: #10b981;
    --insight-development: #f59e0b;

    /* Spacing Scale (8px base) */
    --space-1: 0.25rem;  /* 4px */
    --space-2: 0.5rem;   /* 8px */
    --space-3: 0.75rem;  /* 12px */
    --space-4: 1rem;     /* 16px */
    --space-6: 1.5rem;   /* 24px */
    --space-8: 2rem;     /* 32px */
    --space-10: 2.5rem;  /* 40px */
    --space-12: 3rem;    /* 48px */
    --space-16: 4rem;    /* 64px */
    --space-20: 5rem;    /* 80px */
    --space-24: 6rem;    /* 96px */
    --space-32: 8rem;    /* 128px */

    /* Typography Scale */
    --text-xs: 0.75rem;   /* 12px */
    --text-sm: 0.875rem;  /* 14px */
    --text-base: 1rem;    /* 16px */
    --text-lg: 1.125rem;  /* 18px */
    --text-xl: 1.25rem;   /* 20px */
    --text-2xl: 1.5rem;   /* 24px */
    --text-3xl: 2rem;     /* 32px */
    --text-4xl: 2.5rem;   /* 40px */
    --text-5xl: 3rem;     /* 48px */
    --text-6xl: 4rem;     /* 64px */

    /* Border Radius Scale */
    --radius-sm: 0.25rem;  /* 4px */
    --radius-md: 0.5rem;   /* 8px */
    --radius-lg: 0.75rem;  /* 12px */
    --radius-xl: 1rem;     /* 16px */

    /* Shadow System - Premium Quality */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.16);
    --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.20);
}

[data-theme="dark"] {
    /* Primary Color Scale - Dark Theme */
    --primary-50: #1e1b4b;
    --primary-100: #312e81;
    --primary-500: #6366f1;
    --primary-600: #818cf8;
    --primary-900: #e0e7ff;
    --primary: #6366f1;
    --primary-dark: #4f46e5;

    /* Success Color Scale - Dark Theme */
    --success-50: #064e3b;
    --success-100: #065f46;
    --success-200: #047857;
    --success-300: #059669;
    --success-400: #10b981;
    --success-500: #10b981;
    --success-600: #34d399;
    --success-700: #6ee7b7;
    --success-800: #a7f3d0;
    --success-900: #d1fae5;
    --success: #10b981;

    /* Warning Color Scale - Dark Theme */
    --warning-50: #78350f;
    --warning-100: #92400e;
    --warning-200: #b45309;
    --warning-300: #d97706;
    --warning-400: #f59e0b;
    --warning-500: #fbbf24;
    --warning-600: #fcd34d;
    --warning-700: #fde68a;
    --warning-800: #fef3c7;
    --warning-900: #fffbeb;
    --warning: #fbbf24;

    /* Danger Color Scale - Dark Theme */
    --danger-50: #7f1d1d;
    --danger-100: #991b1b;
    --danger-200: #b91c1c;
    --danger-300: #dc2626;
    --danger-400: #ef4444;
    --danger-500: #f87171;
    --danger-600: #fca5a5;
    --danger-700: #fecaca;
    --danger-800: #fee2e2;
    --danger-900: #fef2f2;
    --danger: #f87171;

    /* Neutral Colors - Dark Theme */
    --secondary: #94a3b8;
    --border: #334155;
    --bg-light: #1e293b;
    --bg-card: #1e293b;
    --bg-body: #0f172a;
    --bg-secondary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;

    /* Insight Colors - Dark Theme */
    --insight-perception: #a78bfa;
    --insight-skill: #60a5fa;
    --insight-strength: #34d399;
    --insight-development: #fbbf24;

    /* Shadow System - Dark Theme */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.7);
    --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.8);
}

/* ==================== Base Styles ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-body);
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ==================== Layout: Setup Pages ==================== */
body.setup-page {
    background: var(--primary-600);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.setup-container {
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 60px 40px;
    max-width: 600px;
    width: 100%;
    text-align: center;
}

.setup-title {
    font-size: 3rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 20px;
}

.setup-subtitle {
    font-size: 1.25rem;
    color: #666;
    margin-bottom: 40px;
}

.setup-status {
    display: inline-block;
    background: var(--success);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 30px;
}

.setup-info {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    text-align: left;
}

.setup-info h2 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.setup-info ul {
    list-style: none;
}

.setup-info li {
    padding: 8px 0;
    color: var(--text-secondary);
    padding-left: 24px;
    position: relative;
}

.setup-info li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--success);
    border: 2px solid var(--success);
}

.setup-footer {
    margin-top: 30px;
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

/* ==================== Navigation ==================== */
.navbar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
}

.navbar-content {
    max-width: 1600px;
    margin: 0 auto;
}

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

.navbar-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.mobile-menu-toggle {
    display: block;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s;
}

.mobile-menu-toggle:hover {
    color: var(--primary);
}

.navbar-nav {
    display: none;
    flex-direction: column;
    gap: 0;
    list-style: none;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.navbar-nav.active {
    display: flex;
}

.navbar-nav li {
    width: 100%;
}

.navbar-nav a,
.nav-logout-btn,
.theme-toggle-btn {
    display: block;
    width: 100%;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    transition: all 0.2s;
    font-size: 0.9375rem;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.nav-logout-btn,
.theme-toggle-btn {
    color: var(--secondary);
}

.navbar-nav a:hover,
.navbar-nav a.active,
.nav-logout-btn:hover,
.theme-toggle-btn:hover {
    color: var(--primary);
    background: var(--bg-light);
}

/* Desktop navbar */
@media (min-width: 768px) {
    .navbar {
        padding: 0.75rem 2rem;
    }

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

    .navbar-brand {
        font-size: 1.5rem;
    }

    .mobile-menu-toggle {
        display: none;
    }

    .navbar-nav {
        display: flex;
        flex-direction: row;
        gap: 2rem;
        margin-top: 0;
        padding-top: 0;
        border-top: none;
        flex-wrap: wrap;
    }

    .navbar-nav li {
        width: auto;
    }

    .navbar-nav a,
    .nav-logout-btn,
    .theme-toggle-btn {
        width: auto;
        padding: 0.75rem 0;
        background: none;
        border-radius: 0;
        border-bottom: 2px solid transparent;
    }

    .navbar-nav a:hover,
    .navbar-nav a.active {
        background: none;
        border-bottom-color: var(--primary);
    }

    .nav-logout-btn:hover,
    .theme-toggle-btn:hover {
        background: none;
        color: var(--primary);
    }
}

/* Tablet and larger desktop - prevent wrapping */
@media (min-width: 1024px) {
    .navbar-nav {
        flex-wrap: nowrap;
    }
}

/* ==================== Container ==================== */
.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 1rem;
}

@media (min-width: 768px) {
    .container {
        padding: 2rem;
    }
}

@media (min-width: 1440px) {
    .container {
        padding: 2rem 3rem;
    }
}

/* ==================== Messages/Alerts ==================== */
.messages {
    margin-bottom: 2rem;
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border-left: 4px solid var(--success);
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--danger);
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-left: 4px solid var(--warning);
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}

[data-theme="dark"] .alert-success {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border-color: #10b981;
}

[data-theme="dark"] .alert-error {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border-color: #ef4444;
}

[data-theme="dark"] .alert-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border-color: #f59e0b;
}

[data-theme="dark"] .alert-info {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border-color: #3b82f6;
}

/* ==================== Buttons ==================== */
.btn {
    display: inline-block;
    padding: 0.625rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.8125rem;
    white-space: nowrap;
}

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

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

.btn-secondary {
    background: var(--bg-card);
    color: var(--secondary);
    border: 1px solid var(--border);
}

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

.btn-danger {
    background: var(--danger);
    color: white;
}

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

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn:disabled {
    background: var(--text-tertiary);
    cursor: not-allowed;
}

@media (min-width: 768px) {
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
}

/* Setup page buttons */
.setup-button {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 14px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: background 0.3s ease;
    margin: 10px;
    border: none;
    cursor: pointer;
}

.setup-button:hover {
    background: #5568d3;
}

.setup-button.secondary {
    background: #6b7280;
}

.setup-button.secondary:hover {
    background: #4b5563;
}

/* ==================== Cards ==================== */
.card {
    background: var(--bg-card);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    border: 1px solid var(--border);
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.card-body {
    padding: 1.5rem;
}

/* ==================== Tables ==================== */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.table th {
    text-align: left;
    padding: 0.75rem 0.5rem;
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--secondary);
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.table td {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}

.table tbody tr:hover {
    background: var(--bg-light);
}

@media (min-width: 768px) {
    .table th {
        padding: 0.75rem;
        font-size: 0.875rem;
    }

    .table td {
        padding: 1rem 0.75rem;
        font-size: 1rem;
    }
}

/* ==================== Forms ==================== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.875rem;
    background-color: var(--bg-card);
    color: var(--text-primary);
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* ==================== Badges ==================== */
.badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.badge-secondary {
    background: var(--bg-light);
    color: var(--secondary);
}

.badge-self {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(37, 99, 235, 0.06) 100%);
    color: #2563eb;
    border: 1.5px solid rgba(59, 130, 246, 0.2);
}

.badge-peer {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(5, 150, 105, 0.06) 100%);
    color: #059669;
    border: 1.5px solid rgba(16, 185, 129, 0.2);
}

.badge-manager {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(217, 119, 6, 0.06) 100%);
    color: #d97706;
    border: 1.5px solid rgba(245, 158, 11, 0.2);
}

.badge-direct_report {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(124, 58, 237, 0.06) 100%);
    color: #7c3aed;
    border: 1.5px solid rgba(139, 92, 246, 0.2);
}

/* Dark theme adjustments */
[data-theme="dark"] .badge-self {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.12) 100%);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.3);
}

[data-theme="dark"] .badge-peer {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.12) 100%);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.3);
}

[data-theme="dark"] .badge-manager {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.12) 100%);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.3);
}

[data-theme="dark"] .badge-direct_report {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(124, 58, 237, 0.12) 100%);
    color: #a78bfa;
    border-color: rgba(139, 92, 246, 0.3);
}

/* ==================== Progress Bars ==================== */
.progress {
    height: 8px;
    background: var(--bg-light);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s;
}

.progress-container {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.progress-container .progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: var(--primary-600);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary-600);
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ==================== Page Header ==================== */
.page-header {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.page-header p {
    color: var(--text-secondary);
    margin: 0;
}

.page-description {
    color: var(--text-secondary);
}

@media (min-width: 768px) {
    .page-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 2rem;
    }

    .page-header h1 {
        font-size: 2rem;
    }
}

/* ==================== Feedback Form ==================== */
.feedback-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

.feedback-header {
    margin-bottom: 40px;
    text-align: center;
}

.feedback-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.feedback-header .reviewee-name {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.feedback-header .category-badge {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 6px 16px;
    border-radius: 16px;
    font-size: 0.875rem;
    font-weight: 600;
}

.section {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    display: none;
}

.section.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

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

.section-header {
    margin-bottom: 32px;
    text-align: center;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.section-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.question {
    margin-bottom: 40px;
}

.question:last-child {
    margin-bottom: 0;
}

.question-text {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.question-text .required {
    color: var(--danger);
    margin-left: 4px;
}

.rating-group {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    align-items: stretch;
}

.rating-option {
    position: relative;
    flex: 0 0 auto;
    display: flex;
}

.rating-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.rating-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-card);
    min-width: 100px;
    justify-content: center;
    flex: 1;
}

.rating-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.rating-description {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.3;
    max-width: 90px;
}

.rating-option input[type="radio"]:checked + .rating-label {
    border-color: var(--primary);
    background: var(--bg-light);
    box-shadow: 0 4px 6px rgba(79, 70, 229, 0.2);
}

.rating-option input[type="radio"]:focus + .rating-label {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.rating-label:hover {
    border-color: var(--primary);
    background: var(--bg-light);
}

/* Likert Scale Styling */
.likert-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
}

.likert-option {
    position: relative;
}

.likert-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.likert-label {
    display: block;
    padding: 16px 20px;
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-card);
    font-size: 1rem;
    text-align: center;
}

.likert-option input[type="radio"]:checked + .likert-label {
    border-color: var(--primary);
    background: var(--bg-light);
    box-shadow: 0 4px 6px rgba(79, 70, 229, 0.2);
    font-weight: 500;
}

.likert-option input[type="radio"]:focus + .likert-label {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.likert-label:hover {
    border-color: var(--primary);
    background: var(--bg-light);
}

@media (min-width: 768px) {
    .likert-group {
        max-width: 700px;
    }
}

/* Multiple Choice (Checkbox) Styling */
.multiple-choice-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
}

.multiple-choice-option {
    position: relative;
}

.multiple-choice-checkbox {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.multiple-choice-label {
    display: block;
    padding: 16px 20px 16px 48px;
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-card);
    font-size: 1rem;
    text-align: left;
    position: relative;
}

/* Custom checkbox indicator */
.multiple-choice-label::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 4px;
    background: var(--bg-card);
    transition: all 0.2s;
}

/* Checkmark */
.multiple-choice-label::after {
    content: '';
    position: absolute;
    left: 22px;
    top: 50%;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: translateY(-65%) rotate(45deg) scale(0);
    transition: transform 0.2s;
}

.multiple-choice-checkbox:checked + .multiple-choice-label {
    border-color: var(--primary);
    background: var(--bg-light);
    box-shadow: 0 4px 6px rgba(79, 70, 229, 0.2);
    font-weight: 500;
}

.multiple-choice-checkbox:checked + .multiple-choice-label::before {
    background: var(--primary);
    border-color: var(--primary);
}

.multiple-choice-checkbox:checked + .multiple-choice-label::after {
    transform: translateY(-65%) rotate(45deg) scale(1);
}

.multiple-choice-checkbox:focus + .multiple-choice-label {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.multiple-choice-label:hover {
    border-color: var(--primary);
    background: var(--bg-light);
}

@media (min-width: 768px) {
    .multiple-choice-group {
        max-width: 700px;
    }
}

.text-input {
    width: 100%;
    min-height: 120px;
    padding: 16px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--bg-card);
    resize: vertical;
    transition: border-color 0.2s;
}

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

/* Scale Question Styling */
.scale-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
    padding: 16px;
}

.scale-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.scale-label-min,
.scale-label-max {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.scale-value-display {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    padding: 8px 16px;
    background: var(--bg-light);
    border-radius: 8px;
    min-width: 60px;
    text-align: center;
}

.scale-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--bg-light);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

/* Webkit (Chrome, Safari, Edge) */
.scale-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
    margin-top: -8px; /* Center thumb on 8px track: (24px - 8px) / 2 */
}

.scale-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(79, 70, 229, 0.3);
}

.scale-slider::-webkit-slider-thumb:active {
    transform: scale(1.2);
}

/* Firefox */
.scale-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
}

.scale-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(79, 70, 229, 0.3);
}

.scale-slider::-moz-range-thumb:active {
    transform: scale(1.2);
}

/* Track styling */
.scale-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    background: linear-gradient(to right, #e0e7ff 0%, var(--primary) 100%);
    border-radius: 4px;
}

.scale-slider::-moz-range-track {
    width: 100%;
    height: 8px;
    background: linear-gradient(to right, #e0e7ff 0%, var(--primary) 100%);
    border-radius: 4px;
}

.scale-range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

@media (min-width: 768px) {
    .scale-group {
        max-width: 700px;
    }
}

.form-actions {
    position: sticky;
    bottom: 0;
    background: var(--bg-card);
    padding: 24px;
    margin: 40px -20px -20px;
    border-top: 2px solid var(--border);
    box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.form-actions .btn {
    padding: 14px 32px;
    font-size: 1rem;
}

.form-actions .btn-primary {
    flex: 1;
    max-width: none;
}

.error-message {
    background: #fef2f2;
    border: 2px solid #fecaca;
    color: #991b1b;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.error-list {
    margin: 8px 0 0 20px;
}

.complete-container {
    max-width: 600px;
    margin: 80px auto;
    text-align: center;
    padding: 40px 20px;
}

.complete-icon {
    width: 80px;
    height: 80px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.complete-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.complete-message {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ==================== Report Views ==================== */
.report-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.report-header {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm);
}

.report-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

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

.report-meta {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    flex-direction: column;
}

.meta-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.meta-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.summary-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.summary-card-title {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    font-weight: 600;
}

.summary-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.section-report {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.question-report {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid #e5e7eb;
}

.question-report:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.question-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.category-results {
    display: grid;
    gap: 16px;
}

.category-result {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 16px;
}

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

.category-name {
    font-weight: 600;
    color: var(--text-primary);
    text-transform: capitalize;
}

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

.rating-score {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.rating-bar-container {
    flex: 1;
    background: var(--border);
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
}

.rating-bar-fill {
    height: 100%;
    background: var(--primary-600);
    border-radius: 6px;
    transition: width 0.3s ease;
}

.response-count {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.text-responses {
    margin-top: 12px;
}

.text-response {
    background: var(--bg-card);
    border-left: 3px solid var(--primary);
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 4px;
    color: var(--text-primary);
    line-height: 1.6;
}

.insufficient-data {
    color: var(--text-tertiary);
    font-style: italic;
    padding: 12px;
}

.actions {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 12px;
}

/* ==================== Grid Layouts ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
}

@media (min-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
        margin-bottom: 2rem;
    }
}

.action-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .action-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (min-width: 1024px) {
    .action-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 1280px) {
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

/* ==================== Utility Classes ==================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.font-mono { font-family: monospace; }

.gap-1 { gap: 1rem; }
.gap-2 { gap: 2rem; }
.gap-sm { gap: 0.75rem; }
.gap-md { gap: 1rem; }
.gap-lg { gap: 1.5rem; }

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }

.p-1 { padding: 1rem; }
.p-2 { padding: 2rem; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

.grid { display: grid; }

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

@media (max-width: 767px) {
    .stat-number {
        font-size: 2rem;
    }
}

.stat-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-card-content {
    text-align: center;
}

.stat-card-content .stat-number.primary {
    color: var(--primary);
}

.stat-card-content .stat-number.warning {
    color: var(--warning);
}

.stat-card-content .stat-number.success {
    color: var(--success);
}

.stat-card-content .stat-number.secondary {
    color: var(--secondary);
}

/* ==================== Misc Components ==================== */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-tertiary);
}

.help-text {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.form-check-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    border: 1px solid var(--border);
    border-radius: 3px;
}

.copy-feedback {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--success);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(1rem);
    transition: all 0.3s;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.copy-feedback.show {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Setup Wizard Styles
   ============================================ */

.setup-page .header {
    background: var(--primary-color);
    color: white;
    padding: 30px;
    text-align: center;
}

.setup-page .header h1 {
    font-size: 28px;
    margin-bottom: 8px;
    color: white;
}

.setup-page .header p {
    font-size: 14px;
    opacity: 0.9;
    color: white;
}

.setup-page .progress-bar {
    background: rgba(255, 255, 255, 0.2);
    height: 4px;
    margin-top: 20px;
    border-radius: 2px;
    overflow: hidden;
}

.setup-page .progress-fill {
    background: white;
    height: 100%;
    transition: width 0.3s ease;
}

.setup-page .content {
    padding: 40px;
    background: var(--bg-primary);
}

.setup-page .help-text {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 5px;
}

.setup-page .form-check {
    display: flex;
    align-items: center;
    gap: 10px;
}

.setup-page .form-check-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.setup-page .button-group {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.setup-page .errorlist {
    list-style: none;
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
}

[data-theme="dark"] .setup-page .errorlist {
    color: #f87171;
}

.setup-page .errorlist li {
    margin-bottom: 3px;
}

.setup-page .step-indicator {
    text-align: center;
    font-size: 14px;
    color: white;
    opacity: 0.9;
    margin-top: 10px;
}

.setup-page .next-steps {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.setup-page .next-steps h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.setup-page .next-steps ul {
    list-style: none;
}

.setup-page .next-steps li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.setup-page .next-steps li:last-child {
    border-bottom: none;
}

.setup-page .next-steps a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.setup-page .next-steps a:hover {
    text-decoration: underline;
}

.setup-page .setup-container {
    background: var(--bg-primary);
}

.setup-page .page-title {
    margin-bottom: 20px;
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 600;
}

.setup-page .page-description {
    margin-bottom: 25px;
    color: var(--text-secondary);
    font-size: 14px;
}

.setup-page .info-card {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: 8px;
    border-left: 4px solid var(--primary);
    box-shadow: var(--shadow-sm);
}

.setup-page .info-card h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
    color: var(--text-primary);
}

.setup-page .info-card p {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.setup-page .separator {
    margin-bottom: 20px;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 14px;
}

.setup-page .config-summary {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.setup-page .config-summary h3 {
    margin-bottom: 15px;
    color: var(--text-primary);
}

.setup-page .config-summary table {
    width: 100%;
}

.setup-page .config-summary td {
    padding: 8px 0;
}

.setup-page .config-summary td:first-child {
    color: var(--text-secondary);
}

.setup-page .config-summary td:last-child {
    font-weight: 600;
    color: var(--text-primary);
}

.setup-page .success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--success);
    margin: 0 auto 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==================== Mobile Utilities ==================== */
@media (max-width: 767px) {
    .d-md-none {
        display: block !important;
    }

    .d-none {
        display: none !important;
    }

    .d-md-block {
        display: none !important;
    }
}

@media (min-width: 768px) {
    .d-md-none {
        display: none !important;
    }

    .d-md-block {
        display: block !important;
    }
}

/* ==================== Mobile Card Components ==================== */
.mobile-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.mobile-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border);
    gap: 0.5rem;
}

.mobile-card-header > div:first-child {
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
}

.mobile-card-body {
    padding: 1rem;
}

.mobile-card-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.5rem 0;
    gap: 1rem;
}

.mobile-card-row:not(:last-child) {
    border-bottom: 1px solid var(--border);
}

.mobile-card-label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.875rem;
    min-width: 90px;
    flex-shrink: 0;
}

.mobile-card-row > span:last-child {
    text-align: right;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ==================== Responsive Spacing ==================== */
@media (max-width: 767px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 1rem;
    }

    .page-header button {
        width: 100%;
    }

    .card {
        margin-bottom: 1rem;
    }

    .card-body {
        padding: 1rem;
    }

    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .btn {
        font-size: 0.9375rem;
        padding: 0.625rem 1rem;
    }

    .btn-sm {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
}

/* ==================== Modal ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.2s ease-out;
}

[data-theme="dark"] .modal-overlay {
    background: rgba(0, 0, 0, 0.8);
}

.modal-content {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@media (max-width: 640px) {
    .modal-content {
        padding: 1.5rem;
        max-height: 95vh;
    }
}

/* ==================== Pagination ==================== */
.pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.pagination-link {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
}

.pagination-link:hover {
    background: var(--bg-light);
    border-color: var(--primary);
    color: var(--primary);
}

.pagination-info {
    padding: 0 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.card-footer {
    padding: 1rem 1.5rem;
    background: var(--bg-light);
    border-top: 1px solid var(--border);
}

@media (max-width: 640px) {
    .card-footer {
        flex-direction: column;
        align-items: flex-start !important;
    }

    .pagination {
        width: 100%;
        justify-content: center;
    }
}

