/* ===== ChangeAccelerators Survey Platform - Brand Design System ===== */

/*
   Design Philosophy: Professional transformation consulting with sophisticated elegance
   - Distinctive serif typography (Garamond) for headlines
   - Clean sans-serif (Freight Sans) for body
   - Intentional use of brand blue (#066199) and light blue (#84c8da)
   - Dash pattern motif as decorative element
   - Generous white space with purposeful asymmetry
*/

/* ===== CSS Custom Properties (Design Tokens) ===== */
:root {
    /* Brand Colors - Primary */
    --color-primary-blue: #066199;
    --color-primary-light-blue: #84c8da;
    --color-primary-charcoal: #494949;

    /* Brand Colors - Secondary */
    --color-secondary-cream: #FAF4EB;
    --color-secondary-pale-blue: #CEE1E9;

    /* Semantic Colors */
    --color-surface: #ffffff;
    --color-background: var(--color-secondary-cream);
    --color-text-primary: #1a1a1a;
    --color-text-secondary: #4a4a4a;
    --color-text-muted: #737373;

    /* Typography Scale */
    --font-display: 'Garamond Premier Pro', 'Baskerville', 'Libre Baskerville', Georgia, serif;
    --font-body: 'Freight Sans Pro', 'Avenir', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --font-size-xs: 0.8125rem;   /* 13px */
    --font-size-sm: 0.875rem;    /* 14px */
    --font-size-base: 1rem;      /* 16px */
    --font-size-lg: 1.125rem;    /* 18px */
    --font-size-xl: 1.375rem;    /* 22px */
    --font-size-2xl: 1.75rem;    /* 28px */
    --font-size-3xl: 2.25rem;    /* 36px */
    --font-size-4xl: 3rem;       /* 48px */

    /* Spacing System */
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Effects */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(6, 97, 153, 0.12);
    --shadow-lg: 0 12px 40px rgba(6, 97, 153, 0.18);
    --shadow-xl: 0 20px 60px rgba(6, 97, 153, 0.25);

    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
    --border-radius-xl: 16px;

    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--color-text-primary);
    background: var(--color-background);
}

/* ===== Typography System ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.2;
    color: var(--color-text-primary);
    margin-bottom: var(--space-md);
}

h1 {
    font-size: var(--font-size-4xl);
    letter-spacing: -0.02em;
}

h2 {
    font-size: var(--font-size-3xl);
    letter-spacing: -0.01em;
}

h3 {
    font-size: var(--font-size-2xl);
}

h4 {
    font-size: var(--font-size-xl);
}

p {
    margin-bottom: var(--space-md);
}

strong {
    font-weight: 600;
}

/* ===== Decorative Dash Pattern ===== */
.dash-pattern {
    display: inline-block;
    height: 2px;
    background: linear-gradient(90deg,
        var(--color-primary-light-blue) 0%,
        var(--color-primary-light-blue) 20%,
        transparent 20%,
        transparent 30%,
        var(--color-primary-blue) 30%,
        var(--color-primary-blue) 50%,
        transparent 50%,
        transparent 60%,
        var(--color-primary-light-blue) 60%,
        var(--color-primary-light-blue) 80%,
        transparent 80%
    );
    background-size: 60px 2px;
    margin: var(--space-lg) 0;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    font-weight: 400;
    text-decoration: none;
    border: none;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    right: var(--space-md);
    width: 20px;
    height: 20px;
    background: url('/static/images/arrow.png') no-repeat center;
    background-size: contain;
    opacity: 0;
    transform: translateX(-10px);
    transition: all var(--transition-base);
}

.btn:hover::after {
    opacity: 0.8;
    transform: translateX(0);
}

.btn-primary {
    background: var(--color-primary-blue);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: #055080;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
    padding-right: var(--space-3xl);
}

.btn-secondary {
    background: white;
    color: var(--color-primary-blue);
    border: 2px solid var(--color-primary-blue);
    text-align: center;
    justify-content: center;
}

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

.btn-danger {
    background: #dc2626;
    color: white;
    border: none;
}

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

.btn-large {
    padding: 0.875rem 1.5rem;
    font-size: var(--font-size-base);
    width: 100%;
}

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

.btn:disabled:hover {
    box-shadow: var(--shadow-sm);
    transform: none;
    padding: var(--space-md) var(--space-xl);
}

.btn:disabled::after {
    display: none;
}

/* ===== Login Page ===== */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: var(--space-xl);
    background: linear-gradient(135deg, var(--color-secondary-cream) 0%, var(--color-secondary-pale-blue) 100%);
}

.login-card {
    background: white;
    padding: var(--space-3xl);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-xl);
    max-width: 440px;
    width: 100%;
    position: relative;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--color-primary-light-blue), var(--color-primary-blue));
    border-radius: var(--border-radius-xl) var(--border-radius-xl) 0 0;
}

.login-card h1 {
    font-size: var(--font-size-3xl);
    margin-bottom: var(--space-sm);
    color: var(--color-primary-blue);
}

.login-card h2 {
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    font-weight: 300;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-2xl);
}

/* ===== Forms ===== */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: 500;
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: var(--space-md);
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    color: var(--color-text-primary);
    background: white;
    border: 1px solid #d4d4d4;
    border-radius: var(--border-radius-md);
    transition: all var(--transition-base);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-primary-blue);
    box-shadow: 0 0 0 3px rgba(6, 97, 153, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.help-text {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-top: var(--space-xs);
}

/* ===== Admin Layout ===== */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 280px;
    background: var(--color-primary-charcoal);
    color: white;
    padding: var(--space-2xl) 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.admin-sidebar h2 {
    padding: 0 var(--space-xl);
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-2xl);
    color: white;
}

.admin-sidebar ul {
    list-style: none;
}

.admin-sidebar li {
    margin-bottom: var(--space-xs);
}

.admin-sidebar a {
    display: flex;
    align-items: center;
    padding: var(--space-md) var(--space-xl);
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: var(--font-size-base);
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
}

.admin-sidebar a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border-left-color: var(--color-primary-light-blue);
}

.admin-sidebar a.active {
    background: rgba(6, 97, 153, 0.2);
    color: white;
    font-weight: 500;
    border-left-color: var(--color-primary-light-blue);
}

.admin-content {
    margin-left: 280px;
    padding: var(--space-3xl);
    flex: 1;
    background: var(--color-background);
}

.page-header {
    margin-bottom: var(--space-3xl);
}

.page-header h1 {
    font-size: var(--font-size-4xl);
    color: var(--color-primary-blue);
    margin-bottom: var(--space-sm);
}

.page-header p {
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
    font-weight: 300;
}

/* ===== Stats Grid ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-3xl);
}

.stat-card {
    background: white;
    padding: var(--space-xl);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--color-primary-blue);
    transition: all var(--transition-base);
}

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

.stat-card h3 {
    font-family: var(--font-body);
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--space-sm);
}

.stat-number {
    font-family: var(--font-display);
    font-size: var(--font-size-4xl);
    font-weight: 400;
    color: var(--color-primary-blue);
    line-height: 1;
    margin-bottom: var(--space-xs);
}

.stat-detail {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

/* ===== Sections ===== */
.section {
    background: white;
    padding: var(--space-2xl);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-xl);
}

.section h2 {
    font-size: var(--font-size-2xl);
    color: var(--color-primary-blue);
    margin-bottom: var(--space-lg);
}

/* ===== Tables ===== */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.data-table thead {
    background: var(--color-secondary-cream);
}

.data-table th {
    padding: var(--space-md) var(--space-lg);
    text-align: left;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: var(--space-lg);
    border-top: 1px solid #f0f0f0;
    font-size: var(--font-size-base);
    color: var(--color-text-primary);
}

.data-table tbody tr {
    transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
    background: var(--color-secondary-cream);
}

/* ===== Badges ===== */
.badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    border-radius: 20px;
    font-size: var(--font-size-xs);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-blue {
    background: rgba(6, 97, 153, 0.1);
    color: var(--color-primary-blue);
}

.badge-green {
    background: rgba(72, 187, 120, 0.1);
    color: #2f855a;
}

.badge-red {
    background: rgba(229, 62, 62, 0.1);
    color: #c53030;
}

.badge-yellow {
    background: rgba(237, 137, 54, 0.1);
    color: #c05621;
}

.badge-success {
    background: rgba(72, 187, 120, 0.1);
    color: #2f855a;
}

/* ===== Alerts ===== */
.alert {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--border-radius-md);
    margin-bottom: var(--space-lg);
    font-size: var(--font-size-base);
    border-left: 4px solid;
}

.alert-success {
    background: rgba(72, 187, 120, 0.1);
    color: #2f855a;
    border-left-color: #48bb78;
}

.alert-error {
    background: rgba(245, 101, 101, 0.1);
    color: #c53030;
    border-left-color: #f56565;
}

/* ===== SURVEY INTERFACE - Distinctive Transformation Theme ===== */

.survey-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, var(--color-primary-blue) 0%, #044a7a 100%);
    position: relative;
    overflow: hidden;
}

/* Animated dash pattern background */
.survey-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/static/images/dashes%20white.png');
    background-repeat: repeat;
    background-size: 120px auto;
    opacity: 0.03;
    animation: dashSlide 60s linear infinite;
}

@keyframes dashSlide {
    from { background-position: 0 0; }
    to { background-position: 120px 0; }
}

.survey-card {
    background: white;
    border-radius: var(--border-radius-xl);
    padding: 2.5rem 3rem;
    max-width: 900px;
    width: 100%;
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 1;
}

.survey-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(90deg, var(--color-primary-light-blue), var(--color-primary-blue));
    border-radius: var(--border-radius-xl) var(--border-radius-xl) 0 0;
}

/* Progress Bar */
.progress-bar-container {
    width: 100%;
    max-width: 900px;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    margin-bottom: 0.75rem;
    overflow: hidden;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, white, var(--color-primary-light-blue));
    transition: width var(--transition-slow);
    width: 0%;
    border-radius: 3px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

/* Question Display */
.question-number {
    font-family: var(--font-body);
    font-size: var(--font-size-xs);
    font-weight: 700;
    color: var(--color-primary-blue);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.question-number::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary-light-blue), transparent);
}

.question-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--color-text-primary);
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.answers-container {
    margin-bottom: 1.5rem;
}

/* Answer Options - Refined Interaction */
.answer-option {
    width: 100%;
    padding: 1.25rem 1.75rem;
    margin-bottom: 0.75rem;
    background: var(--color-secondary-cream);
    border: 2px solid transparent;
    border-radius: var(--border-radius-lg);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    font-weight: 400;
    color: var(--color-text-primary);
    cursor: pointer;
    transition: all var(--transition-base);
    text-align: left;
    position: relative;
}

.answer-option::before {
    content: '';
    position: absolute;
    left: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--color-primary-light-blue);
    border-radius: 50%;
    opacity: 0;
    transition: all var(--transition-base);
}

.answer-option:hover {
    border-color: var(--color-primary-light-blue);
    background: white;
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
    padding-left: var(--space-2xl);
}

.answer-option:hover::before {
    opacity: 1;
}

.answer-option.selected {
    background: var(--color-primary-blue);
    color: white;
    border-color: var(--color-primary-blue);
    box-shadow: var(--shadow-md);
    padding-left: var(--space-2xl);
}

.answer-option.selected::before {
    display: none; /* Remove bullet on selected option */
}

/* Text Answer Input */
.text-answer {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius-lg);
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    color: var(--color-text-primary);
    resize: vertical;
    min-height: 100px;
    transition: all var(--transition-base);
}

.text-answer:focus {
    outline: none;
    border-color: var(--color-primary-blue);
    box-shadow: 0 0 0 4px rgba(6, 97, 153, 0.1);
}

.text-answer::placeholder {
    color: var(--color-text-muted);
    font-style: italic;
}

.custom-input {
    width: 100%;
    padding: var(--space-md);
    border: 1px solid #d4d4d4;
    border-radius: var(--border-radius-md);
    font-size: var(--font-size-base);
    transition: all var(--transition-base);
}

.custom-input:focus {
    outline: none;
    border-color: var(--color-primary-blue);
    box-shadow: 0 0 0 3px rgba(6, 97, 153, 0.1);
}

.custom-answer-wrapper {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px dashed #d4d4d4;
}

.custom-answer-label {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.custom-input:not(:placeholder-shown) {
    border-color: var(--color-primary-blue);
    background: #f0f9ff;
}

/* Likert Scale - Horizontal Rating Scale Design */
.likert-scale {
    padding: 1rem 0;
}

/* Scale labels at top */
.likert-scale-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding: 0 var(--space-xs);
}

.likert-scale-label {
    font-size: var(--font-size-xs);
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.likert-scale-label.left {
    color: #c53030;
}

.likert-scale-label.right {
    color: #2f855a;
}

/* Horizontal options container */
.likert-options-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-sm);
    position: relative;
    padding: 0.75rem 0;
}

/* Visual scale line connecting the options with color gradient */
.likert-options-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 8%;
    right: 8%;
    height: 4px;
    background: linear-gradient(90deg,
        rgba(229, 62, 62, 0.25) 0%,
        rgba(237, 137, 54, 0.25) 25%,
        rgba(214, 158, 46, 0.25) 50%,
        rgba(72, 187, 120, 0.25) 75%,
        rgba(47, 133, 90, 0.25) 100%
    );
    transform: translateY(-50%);
    border-radius: 3px;
    z-index: 0;
}

.likert-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    position: relative;
    z-index: 1;
    transition: all var(--transition-base);
}

/* Hide default radio button */
.likert-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Custom radio button circle */
.likert-radio-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    border: 3px solid #d4d4d4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--color-text-muted);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
    position: relative;
    user-select: none;
}

/* Hover state */
.likert-option:hover .likert-radio-button {
    border-color: var(--color-primary-light-blue);
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(6, 97, 153, 0.2);
}

/* Selected state */
.likert-option input:checked ~ .likert-radio-button {
    border-color: var(--color-primary-blue);
    border-width: 4px;
    background: var(--color-primary-blue);
    color: white;
    transform: scale(1.2);
    box-shadow: 0 6px 24px rgba(6, 97, 153, 0.4);
}

/* Checkmark removed - just use highlight color on selected state */

/* Label text below button */
.likert-label {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    text-align: center;
    line-height: 1.2;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    transition: all var(--transition-base);
    max-width: 90px;
}

.likert-option:hover .likert-label {
    color: var(--color-primary-blue);
    font-weight: 600;
}

.likert-option input:checked ~ .likert-label {
    color: var(--color-primary-blue);
    font-weight: 700;
    font-size: var(--font-size-sm);
}

/* Ranking Questions - Improved Drag & Drop */
.ranking-instructions {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-primary-blue);
    margin-bottom: 0.5rem;
    text-align: center;
    padding: 0.5rem 0.75rem;
    background: var(--color-secondary-pale-blue);
    border-radius: var(--border-radius-md);
    border-left: 4px solid var(--color-primary-blue);
}

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--color-secondary-cream);
    border: 2px solid transparent;
    border-radius: var(--border-radius-lg);
    cursor: grab;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

/* Subtle gradient background on hover */
.ranking-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
        rgba(6, 97, 153, 0.03) 0%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity var(--transition-base);
}

.ranking-item:hover::before {
    opacity: 1;
}

.ranking-item:hover {
    border-color: var(--color-primary-light-blue);
    background: white;
    box-shadow: var(--shadow-md);
    transform: translateX(8px);
}

.ranking-item:active {
    cursor: grabbing;
}

/* Enhanced dragging state */
.ranking-item.dragging {
    opacity: 0.6;
    border-color: var(--color-primary-blue);
    border-width: 3px;
    transform: scale(1.03) rotate(2deg);
    box-shadow: 0 12px 40px rgba(6, 97, 153, 0.25);
    cursor: grabbing;
    z-index: 1000;
}

/* Ranking number badge with gradient for #1 */
.ranking-number {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    background: var(--color-primary-blue);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: var(--font-size-sm);
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(6, 97, 153, 0.2);
    transition: all var(--transition-base);
    position: relative;
}

/* Special styling for #1 */
.ranking-item:first-child .ranking-number {
    background: linear-gradient(135deg, #d69e2e 0%, #ed8936 100%);
    box-shadow: 0 4px 16px rgba(214, 158, 46, 0.4);
    transform: scale(1.1);
}

/* Pulsing animation for #1 */
.ranking-item:first-child .ranking-number::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    border: 2px solid rgba(214, 158, 46, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.5;
    }
}

/* Hover effect on number */
.ranking-item:hover .ranking-number {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(6, 97, 153, 0.3);
}

.ranking-item:first-child:hover .ranking-number {
    transform: scale(1.2);
}

/* Drag handle with better visual */
.ranking-drag-handle {
    font-size: 24px;
    color: var(--color-text-muted);
    cursor: grab;
    line-height: 1;
    user-select: none;
    padding: var(--space-xs);
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
    opacity: 0.4;
}

.ranking-item:hover .ranking-drag-handle {
    color: var(--color-primary-blue);
    background: rgba(6, 97, 153, 0.08);
    opacity: 1;
}

.ranking-item.dragging .ranking-drag-handle {
    cursor: grabbing;
}

/* Ranking item text */
.ranking-text {
    flex: 1;
    font-family: var(--font-body);
    font-size: var(--font-size-sm);
    font-weight: 400;
    color: var(--color-text-primary);
    line-height: 1.4;
    transition: all var(--transition-base);
}

.ranking-item:hover .ranking-text {
    font-weight: 500;
    color: var(--color-primary-blue);
}

/* First item gets bolder text */
.ranking-item:first-child .ranking-text {
    font-weight: 600;
    font-size: var(--font-size-base);
}

.survey-actions {
    display: flex;
    justify-content: flex-end;
}

/* ===== Survey Intro Page ===== */
.intro-content {
    margin: var(--space-2xl) 0;
}

.intro-content h1 {
    color: var(--color-primary-blue);
    margin-bottom: var(--space-lg);
}

.intro-content p {
    margin-bottom: var(--space-lg);
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
    line-height: 1.7;
}

.intro-content ul {
    list-style: none;
    margin: var(--space-xl) 0;
    padding-left: 0;
}

.intro-content li {
    padding-left: var(--space-2xl);
    margin-bottom: var(--space-md);
    color: var(--color-text-primary);
    position: relative;
    font-size: var(--font-size-base);
}

.intro-content li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 16px;
    height: 16px;
    background: url('/static/images/arrow.png') no-repeat center;
    background-size: contain;
    opacity: 0.6;
}

.privacy-note {
    background: var(--color-secondary-pale-blue);
    padding: var(--space-lg);
    border-radius: var(--border-radius-md);
    border-left: 4px solid var(--color-primary-blue);
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin-top: var(--space-2xl);
    line-height: 1.6;
}

/* ===== Report Page ===== */
.report-card {
    max-width: 900px;
    padding: var(--space-4xl);
}

.report-section {
    margin-bottom: var(--space-3xl);
}

.report-section h1 {
    color: var(--color-primary-blue);
    margin-bottom: var(--space-lg);
}

.report-section h2 {
    font-size: var(--font-size-2xl);
    color: var(--color-primary-blue);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 2px solid var(--color-secondary-pale-blue);
}

/* HBDI Chart */
.hbdi-chart {
    margin-top: var(--space-xl);
}

.hbdi-bar {
    margin-bottom: var(--space-lg);
}

.hbdi-label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hbdi-bar-fill {
    height: 48px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    padding-left: var(--space-lg);
    color: white;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: var(--font-size-xl);
    min-width: 60px;
    transition: all var(--transition-slow);
    box-shadow: var(--shadow-sm);
}

.hbdi-bar-fill.blue {
    background: linear-gradient(90deg, var(--color-primary-blue), var(--color-primary-light-blue));
}

.hbdi-bar-fill.green {
    background: linear-gradient(90deg, #38a169, #48bb78);
}

.hbdi-bar-fill.red {
    background: linear-gradient(90deg, #e53e3e, #f56565);
}

.hbdi-bar-fill.yellow {
    background: linear-gradient(90deg, #dd6b20, #ed8936);
}

.primary-type-badge {
    display: inline-block;
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--border-radius-lg);
    font-size: var(--font-size-base);
    font-weight: 500;
    margin-bottom: var(--space-xl);
}

.primary-type-badge.blue {
    background: rgba(6, 97, 153, 0.1);
    color: var(--color-primary-blue);
    border: 2px solid var(--color-primary-blue);
}

.insights-text {
    background: var(--color-secondary-cream);
    padding: var(--space-xl);
    border-radius: var(--border-radius-lg);
    color: var(--color-text-primary);
    font-size: var(--font-size-base);
    line-height: 1.8;
    white-space: pre-line;
    border-left: 4px solid var(--color-primary-light-blue);
}

/* Blog Recommendation Card */
.blog-recommendation {
    background: var(--color-primary-blue);
    padding: var(--space-2xl);
    border-radius: var(--border-radius-lg);
    color: white;
    position: relative;
    overflow: hidden;
}

.blog-recommendation::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: url('/static/images/dashes%20white.png') no-repeat center;
    background-size: contain;
    opacity: 0.1;
}

.blog-recommendation h3 {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-md);
    color: white;
    position: relative;
    z-index: 1;
}

.blog-recommendation .btn {
    margin-top: var(--space-md);
    position: relative;
    z-index: 1;
}

/* ===== AI Loading State ===== */
.ai-loading {
    text-align: center;
    padding: var(--space-3xl) var(--space-xl);
    font-family: var(--font-body);
    font-size: var(--font-size-lg);
    color: var(--color-primary-blue);
    font-weight: 400;
    animation: fadeInOut 2s ease-in-out infinite;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ===== Form Actions ===== */
.form-actions {
    margin-top: var(--space-2xl);
    display: flex;
    gap: var(--space-md);
    align-items: center;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    :root {
        --font-size-4xl: 2.25rem;
        --font-size-3xl: 1.875rem;
        --font-size-2xl: 1.5rem;
    }

    html, body {
        overflow-x: hidden;
        overflow-y: auto;
        width: 100%;
        min-height: 100%;
    }

    .admin-sidebar {
        display: none;
    }

    .admin-content {
        margin-left: 0;
        padding: var(--space-xl);
    }

    /* MOBILE SURVEY - Allow scrolling when content exceeds viewport */
    .survey-container {
        min-height: 100vh;
        padding: 1vh 3vw 2vh !important;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        overflow-y: auto;
        overflow-x: hidden;
        width: 100%;
    }

    .survey-card {
        padding: 2.5vh 4vw;
        margin: 0;
        display: flex;
        flex-direction: column;
        overflow: visible;
    }

    .survey-card::before {
        height: 4px;
    }

    .progress-bar-container {
        height: 4px;
        margin-bottom: 0.5vh;
        flex-shrink: 0;
    }

    .question-number {
        font-size: clamp(0.65rem, 2.2vmin, 0.8rem);
        margin-bottom: 1.5vh;
        letter-spacing: 0.5px;
        flex-shrink: 0;
    }

    .question-number::after {
        display: none;
    }

    .question-text {
        font-size: clamp(1.1rem, 4.2vmin, 1.4rem);
        line-height: 1.3;
        margin-bottom: 2.5vh;
        flex-shrink: 0;
    }

    .answers-container {
        margin-bottom: 2.5vh;
        overflow: visible;
        max-height: none;
        flex-shrink: 0;
    }

    /* Mobile answer options - LARGE TO FILL SCREEN */
    .answer-option {
        padding: 2vh 3vw;
        margin-bottom: 1.5vh;
        font-size: clamp(1rem, 4vmin, 1.25rem);
        line-height: 1.4;
        border-width: 2px;
    }

    .answer-option::before {
        width: 8px;
        height: 8px;
        left: 0.75rem;
    }

    .answer-option:hover {
        padding-left: 3.5vw;
        transform: translateX(2px);
    }

    .answer-option.selected {
        padding-left: 3.5vw;
    }

    .text-answer {
        padding: 2vh;
        min-height: 20vh;
        font-size: clamp(1rem, 4vmin, 1.25rem);
    }

    .custom-answer {
        margin-top: 1.5vh;
    }

    .custom-input {
        padding: 2vh 3vw;
        font-size: clamp(1rem, 4vmin, 1.25rem);
    }

    /* Mobile buttons - LARGE */
    .btn-large {
        padding: 2.5vh 4vw;
        font-size: clamp(1rem, 4vmin, 1.25rem);
    }

    .survey-actions {
        gap: 1.5rem !important;
        margin-top: auto;
        flex-shrink: 0;
    }

    .report-card {
        padding: var(--space-xl);
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
        width: 100%;
    }

    .form-actions .btn {
        width: 100%;
    }

    /* Mobile-friendly likert scale - LARGE */
    .likert-scale {
        padding: 1.5vh 0;
    }

    .likert-scale-labels {
        margin-bottom: 1.5vh;
    }

    .likert-scale-label {
        font-size: clamp(0.7rem, 2.5vmin, 0.9rem);
    }

    .likert-options-container {
        gap: 1vw;
        padding: 1.5vh 0;
    }

    .likert-options-container::before {
        left: 10%;
        right: 10%;
        height: 4px;
    }

    .likert-radio-button {
        width: clamp(40px, 9vw, 48px);
        height: clamp(40px, 9vw, 48px);
        font-size: clamp(0.9rem, 3.5vmin, 1.1rem);
        border-width: 3px;
    }

    .likert-option input:checked ~ .likert-radio-button {
        border-width: 4px;
        transform: scale(1.15);
    }

    .likert-label {
        font-size: clamp(0.65rem, 2.4vmin, 0.8rem);
        min-height: 4vh;
        line-height: 1.15;
        max-width: 16vw;
        padding: 0 0.5vw;
    }

    /* Mobile-friendly ranking - LARGE */
    .ranking-instructions {
        font-size: clamp(0.9rem, 3.5vmin, 1.1rem);
        padding: 1.5vh 3vw;
        margin-bottom: 1.5vh;
    }

    .ranking-list {
        gap: 1.5vh;
    }

    .ranking-item {
        gap: 2.5vw;
        padding: 1.5vh 3vw;
    }

    .ranking-item::before {
        display: none;
    }

    .ranking-number {
        min-width: clamp(32px, 7vw, 38px);
        height: clamp(32px, 7vw, 38px);
        font-size: clamp(0.9rem, 3.5vmin, 1.1rem);
    }

    .ranking-item:first-child .ranking-number {
        transform: scale(1.12);
    }

    .ranking-item:first-child .ranking-number::after {
        display: none;
    }

    .ranking-drag-handle {
        font-size: 26px;
        padding: 0.75vh;
    }

    .ranking-text {
        font-size: clamp(0.95rem, 3.8vmin, 1.15rem);
        line-height: 1.3;
    }

    .ranking-item:first-child .ranking-text {
        font-size: clamp(1rem, 4vmin, 1.25rem);
        font-weight: 600;
    }
}


/* Extra small mobile devices (iPhone SE - 375x667) */
@media (max-width: 400px) {
    .answer-option {
        padding: 1.5vh 2.5vw;
        margin-bottom: 1.2vh;
        font-size: clamp(0.9rem, 3.5vmin, 1.05rem) !important;
        line-height: 1.3 !important;
    }

    .question-text {
        font-size: clamp(1rem, 4vmin, 1.2rem) !important;
        margin-bottom: 2vh !important;
    }

    .btn-large {
        padding: 2vh 3vw !important;
        font-size: clamp(0.95rem, 3.8vmin, 1.1rem) !important;
    }

    .survey-actions {
        margin-top: 1.5vh !important;
    }
}

/* ===== Print Styles ===== */
@media print {
    .admin-sidebar,
    .btn,
    .survey-actions {
        display: none;
    }

    body {
        background: white;
    }

    .survey-container {
        background: white;
        min-height: auto;
    }

    .survey-card,
    .report-card {
        box-shadow: none;
        max-width: 100%;
    }
}
