/* Shelby Report styling */
:root {
    --shelby-blue: #1e4d72;
    --shelby-light-blue: #2980b9;
    --shelby-accent: #3498db;
    --shelby-green: #27ae60;
    --shelby-red: #e74c3c;
    --shelby-orange: #f39c12;
    --shelby-gray: #34495e;
    --light-bg: #f8f9fa;
    --dark-text: #2c3e50;
    --gradient-bg: linear-gradient(135deg, #1e4d72 0%, #2980b9 100%);
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--dark-text);
    line-height: 1.6;
    font-weight: 400;
}

.btn-primary {
    background: var(--gradient-bg);
    border: none;
    padding: 14px 35px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(30, 77, 114, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9 0%, #3498db 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(30, 77, 114, 0.4);
}

.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
}

/* Header Styling */
.shelby-header {
    background: var(--gradient-bg);
    color: white;
    padding: 20px 0;
    box-shadow: 0 4px 20px rgba(30, 77, 114, 0.3);
    margin-bottom: 30px;
}

.shelby-logo {
    max-height: 60px;
    width: auto;
}

.header-title {
    color: white;
    margin: 0;
    font-weight: 300;
    font-size: 1.8rem;
}

.header-subtitle {
    color: rgba(255, 255, 255, 0.9);
    margin: 5px 0 0 0;
    font-weight: 300;
    font-size: 1rem;
}

/* Enhanced Card Styling */
.card {
    border: none;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.card-body {
    padding: 2.5rem;
}

.landing-card .card-body {
    padding: 3.5rem;
}

/* Welcome Page Enhancements */
.welcome-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
    padding: 3rem;
    margin-bottom: 2rem;
}

.hero-title {
    color: var(--shelby-blue);
    font-weight: 700;
    font-size: 3rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.hero-subtitle {
    color: var(--shelby-gray);
    font-size: 1.3rem;
    text-align: center;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Incentive Box */
.incentive-box {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border: 2px solid var(--shelby-accent);
    border-radius: 15px;
    padding: 2rem;
    margin-top: 2rem;
    position: relative;
    overflow: hidden;
}

.incentive-box::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(52, 152, 219, 0.05) 0%, transparent 70%);
    z-index: 0;
}

.incentive-content {
    position: relative;
    z-index: 1;
}

.incentive-title {
    color: var(--shelby-blue);
    font-weight: 600;
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.incentive-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.incentive-icon {
    color: var(--shelby-green);
    font-size: 2.3rem;
    margin-right: 15px;
    flex-shrink: 0;
}

.progress {
    height: 8px;
    border-radius: 4px;
    background-color: #e9ecef;
}

.progress-bar {
    background-color: var(--success-color);
    border-radius: 4px;
}

.form-control, .form-select {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.form-check-input {
    border: 2px solid #dee2e6;
    margin-top: 0.25em;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.question-container {
    min-height: 400px;
    padding: 30px;
}

.question-title {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 25px;
    line-height: 1.4;
}

.matrix-table {
    width: 100%;
    margin: 20px 0;
    display: block; /* Show by default on desktop */
    position: relative;
}


.matrix-table th {
    background-color: var(--light-bg);
    color: var(--dark-text);
    font-weight: 600;
    padding: 12px 8px;
    text-align: center;
    border: 1px solid #dee2e6;
}

.matrix-table td {
    padding: 15px 8px;
    text-align: center;
    border: 1px solid #dee2e6;
    vertical-align: middle;
}

.matrix-table .row-label {
    text-align: left;
    font-weight: 500;
    background-color: #f8f9fa;
}

.navigation-controls {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.completion-incentive {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
}

.welcome-text {
    font-size: 18px;
    line-height: 1.7;
    color: #555;
}

.alert {
    border: none;
    border-radius: 10px;
    padding: 20px;
    font-weight: 500;
}

.display-6 {
    font-weight: 700;
    color: var(--primary-color);
}

.section-divider {
    margin: 40px 0 30px;
    text-align: center;
    position: relative;
}

.section-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(to right, transparent, #dee2e6 20%, #dee2e6 80%, transparent);
    z-index: -2;
}

.section-divider span {
    background: white;
    padding: 0 30px;
    color: var(--shelby-blue);
    font-weight: 600;
    font-size: 1.2rem;
    position: relative;
    z-index: 1;
    display: inline-block;
    box-shadow: 0 0 0 5px white;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-body {
        padding: 1.5rem;
    }

    .question-container {
        min-height: 300px;
        padding: 20px;
    }

    /* Enhanced matrix table for mobile with better horizontal scrolling */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        position: relative;
        /* Add scroll hint shadow */
        background: linear-gradient(90deg, white 30%, transparent),
                    linear-gradient(-90deg, white 30%, transparent),
                    linear-gradient(90deg, rgba(0,0,0,0.1), transparent 5%),
                    linear-gradient(-90deg, rgba(0,0,0,0.1), transparent 5%);
        background-repeat: no-repeat;
        background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%;
        background-position: 0 0, 100% 0, 0 0, 100% 0;
        background-attachment: local, local, scroll, scroll;
    }

    .matrix-table {
        font-size: 14px;
        min-width: 600px; /* Ensure minimum width for proper spacing */
        margin-bottom: 0;
    }

    /* Sticky first column (row labels) */
    .matrix-table .row-label {
        position: sticky;
        left: 0;
        background-color: #f8f9fa;
        font-size: 13px;
        font-weight: 500;
        min-width: 140px;
        max-width: 140px;
        word-wrap: break-word;
        hyphens: auto;
        z-index: 2;
        border-right: 2px solid #dee2e6;
        box-shadow: 2px 0 4px rgba(0,0,0,0.05);
    }

    /* Enhanced column headers */
    .matrix-table thead th {
        font-size: 11px;
        line-height: 1.2;
        vertical-align: bottom;
        padding: 8px 4px;
        min-width: 80px;
        background-color: var(--light-bg);
        border-bottom: 2px solid #dee2e6;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Sticky header for first column */
    .matrix-table thead th:first-child {
        position: sticky;
        left: 0;
        background-color: var(--light-bg);
        z-index: 3;
        border-right: 2px solid #dee2e6;
        box-shadow: 2px 0 4px rgba(0,0,0,0.05);
        min-width: 140px;
    }

    .matrix-table th,
    .matrix-table td {
        padding: 10px 8px;
        font-size: 12px;
        border: 1px solid #dee2e6;
    }

    /* Enhanced radio buttons for mobile */
    .matrix-radio {
        width: 20px;
        height: 20px;
        transform: scale(1.1);
        margin: 0;
        cursor: pointer;
    }

    /* Better spacing for table cells */
    .matrix-table td {
        text-align: center;
        vertical-align: middle;
        min-width: 80px;
    }

    /* Add scroll hint text */
    .table-responsive::after {
        content: "← Swipe to see more columns →";
        position: absolute;
        bottom: -25px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 11px;
        color: #6c757d;
        font-style: italic;
        white-space: nowrap;
    }

}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Custom radio buttons for matrix */
.matrix-radio {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #dee2e6;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0;
    transform: scale(1.2);
    position: relative;
    outline: none;
}

.matrix-radio:checked {
    background-color: var(--shelby-blue);
    border-color: var(--shelby-blue);
}

.matrix-radio:checked::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

.matrix-radio:focus {
    outline: 2px solid var(--shelby-accent);
    outline-offset: 2px;
}


/* Admin panel styles */
.admin-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 20px 0;
    margin-bottom: 30px;
}

.stats-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--secondary-color);
}

.stats-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.table {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.table thead th {
    background-color: var(--primary-color);
    color: #252323;
    border: none;
    font-weight: 600;
    padding: 15px;
}

.table tbody tr:hover {
    background-color: rgba(52, 152, 219, 0.05);
}

/* Footer Styling */
.shelby-footer {
    background: var(--shelby-gray);
    color: white;
    padding: 30px 0;
    margin-top: 50px;
}

.footer-links {
    text-align: center;
    margin-bottom: 20px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    margin: 0 15px;
    font-weight: 400;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--shelby-accent);
}

.footer-contact {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin: 10px 0 0 0;
}

.footer-contact a {
    color: white;
    text-decoration: none;
    font-weight: 500;
}

.footer-contact a:hover {
    color: white;
    text-decoration: underline;
}

.footer-copyright {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin: 5px 0 0 0;
}

/* Enhanced Progress Bar */
.progress {
    height: 12px;
    border-radius: 25px;
    background: linear-gradient(90deg, #e9ecef 0%, #f8f9fa 100%);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    background: var(--gradient-bg);
    border-radius: 25px;
    box-shadow: 0 2px 8px rgba(30, 77, 114, 0.3);
    transition: width 0.6s ease;
}

/* Enhanced Question Styling */
.question-container {
    min-height: 450px;
    padding: 40px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.question-title {
    color: var(--shelby-blue);
    font-weight: 600;
    margin-bottom: 30px;
    line-height: 1.4;
    font-size: 1.3rem;
}

/* Multiple Choice Two-Column Layout */
.multiple-choice-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
}

.multiple-choice-options .form-check {
    margin-bottom: 0 !important;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: white;
    position: relative;
    cursor: pointer;
}

.multiple-choice-options .form-check:hover {
    border-color: var(--shelby-accent);
    background: rgba(52, 152, 219, 0.02);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.multiple-choice-options .form-check-input:checked + .form-check-label {
    color: var(--shelby-blue);
    font-weight: 600;
}

.multiple-choice-options .form-check:has(.form-check-input:checked) {
    border-color: var(--shelby-blue);
    background: rgba(30, 77, 114, 0.05);
}

.multiple-choice-options .form-check-input {
    display: none;
}

.multiple-choice-options .form-check-label {
    flex: 1;
    margin-bottom: 0;
    cursor: pointer;
    width: 100%;
    position: relative;
    padding-left: 30px;
}

.multiple-choice-options .form-check-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    width: 18px;
    height: 18px;
    border: 2px solid #dee2e6;
    border-radius: 3px;
    background: white;
    transition: all 0.2s ease;
}

.multiple-choice-options .form-check-input:checked + .form-check-label::before {
    background: var(--shelby-blue) !important;
    border-color: var(--shelby-blue) !important;
}

.multiple-choice-options .form-check-input:checked + .form-check-label::after {
    content: '✓';
    position: absolute;
    left: 4px;
    top: 0px;
    color: white;
    font-size: 14px;
    font-weight: bold;
    z-index: 1;
}

/* Single choice options styling */
.single-choice-options .form-check {
    margin-bottom: 20px;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: white;
}

.single-choice-options .form-check:hover {
    border-color: var(--shelby-accent);
    background: rgba(52, 152, 219, 0.02);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.single-choice-options .form-check-input:checked + .form-check-label {
    color: var(--shelby-blue);
    font-weight: 600;
}

.single-choice-options .form-check:has(.form-check-input:checked) {
    border-color: var(--shelby-blue);
    background: rgba(30, 77, 114, 0.05);
}

.single-choice-options .form-check-input {
    display: none;
}

.single-choice-options .form-check-label {
    cursor: pointer;
    width: 100%;
    position: relative;
    padding-left: 30px;
    margin-bottom: 0;
}

.single-choice-options .form-check-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    width: 18px;
    height: 18px;
    border: 2px solid #dee2e6;
    border-radius: 50%;
    background: white;
    transition: all 0.2s ease;
}

.single-choice-options .form-check-input:checked + .form-check-label::before {
    background: var(--shelby-blue);
    border-color: var(--shelby-blue);
}

.single-choice-options .form-check-input:checked + .form-check-label::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 8px;
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
}

/* Other text field styling */
.form-check .form-control {
    margin-top: 10px;
    border: 1px solid #dee2e6;
    font-size: 0.95rem;
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .multiple-choice-options {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .multiple-choice-options .form-check,
    .single-choice-options .form-check {
        padding: 12px;
    }
}

/* Auto-save indicator */
.autosave-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    background: var(--shelby-green);
    color: white;
    border-radius: 30px;
    font-size: 14px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.autosave-indicator.show {
    opacity: 1;
    transform: translateY(10px);
}

/* Complete Page Styling */
.rewards-section {
    margin-bottom: 2rem;
}

.reward-option {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    height: 100%;
}

.reward-option:hover {
    border-color: var(--shelby-accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 77, 114, 0.1);
}

.reward-icon {
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--shelby-blue) 0%, var(--shelby-accent) 100%);
    border-radius: 50%;
    color: white;
    flex-shrink: 0;
}

.contact-form-section {
    margin-top: 2rem;
}

/* Enhanced Checkbox Styling for Complete Page */
.reward-checkbox {
    margin-bottom: 1rem;
}

.form-check-container {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.form-check-container:hover {
    border-color: var(--shelby-accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 77, 114, 0.1);
}

.form-check-container:hover .form-check-input {
    border-color: var(--shelby-accent);
    transform: scale(1.1);
}

.form-check-container .form-check-input {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 24px;
    height: 24px;
    appearance: none;
    -webkit-appearance: none;
    background: white;
    border: 3px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    /* Override Bootstrap default checkmark */
    background-image: none !important;
}

.form-check-container .form-check-input:checked {
    background: #27ae60 !important;
    border-color: #27ae60 !important;
    position: relative;
    background-image: none !important;
}

.form-check-container .form-check-input:checked::after {
    content: '✓';
    position: absolute;
    top: 1px;
    left: 6px;
    color: #ffffff !important;
    font-weight: bold;
    font-size: 16px;
    line-height: 1;
    animation: checkmarkAppear 0.3s ease-out;
    z-index: 10;
}

@keyframes checkmarkAppear {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(180deg);
    }
    100% {
        transform: scale(1) rotate(360deg);
        opacity: 1;
    }
}

.form-check-container .form-check-label {
    cursor: pointer;
    margin-bottom: 0;
    width: 100%;
    padding-right: 50px;
}

.checkbox-icon {
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 50%;
    flex-shrink: 0;
}

/* Success Alert Styling */
.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 2px solid #27ae60;
    color: #155724;
}

/* Removed duplicate checkmark to prevent double checkmarks */

/* Responsive adjustments */
@media (max-width: 768px) {
    .reward-option,
    .form-check-container {
        margin-bottom: 1rem;
    }

    .checkbox-icon,
    .reward-icon {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .form-check-container .form-check-label {
        padding-right: 40px;
    }
}