/* Neon Dark Theme - Refactored with CSS custom properties
 *
 * All colors defined as CSS variables at the top — change the palette in one place.
 */

/* ============================================================
   Theme Palette
   To restyle: change values here only — everything below reads from these
   ============================================================ */
.theme-neon-dark {
    --theme-primary:       #00ffff;            /* neon cyan — buttons, headings, accents */
    --theme-primary-mid:   #00e0e0;            /* mid cyan — hover states */
    --theme-primary-light: #66ffff;            /* lighter cyan — gradient end */
    --theme-primary-pale:  rgba(0, 255, 255, 0.15); /* pale cyan — disabled backgrounds */
    --theme-accent:        #ff00ff;            /* neon magenta — borders, secondary highlights */
    --theme-accent-light:  #ff66ff;            /* lighter magenta — hover */
    --theme-bg:            rgba(20, 20, 30, 0.92); /* dark card background */
    --theme-text:          #e0e0e0;            /* light body text */
    --theme-text-muted:    #b0b0b0;            /* muted/secondary text */
    --theme-gradient:      linear-gradient(135deg, #0a0a0a 0%, #1a0a1a 50%, #0a1a1a 100%);
    --theme-btn-gradient:  linear-gradient(45deg, #ff00ff, #00ffff);
    --theme-radius-card:   20px;
    --theme-radius-btn:    15px;
    --theme-radius-input:  12px;

    /* Bridge to global utilities — makes .text-primary use theme color */
    --primary-color: #00ffff;
}

/* ---- Background ---- */
.theme-neon-dark,
body.theme-neon-dark,
.theme-neon-dark body,
.theme-neon-dark html,
html.theme-neon-dark,
body.theme-neon-dark main,
.form-preview.theme-neon-dark,
body.theme-neon-dark .form-preview {
    background: var(--theme-gradient) !important;
    background-attachment: fixed !important;
    color: var(--theme-text) !important;
    min-height: 100vh !important;
    position: relative;
}

@media (max-width: 768px) {
    .theme-neon-dark,
    body.theme-neon-dark,
    html.theme-neon-dark {
        background-attachment: scroll !important;
        background-size: cover !important;
    }
}

/* Subtle neon glow overlay */
.theme-neon-dark::before {
    content: '';
    position: fixed;
    top: -30%;
    left: -30%;
    width: 160%;
    height: 160%;
    background: radial-gradient(circle at 30% 20%,
        rgba(0, 255, 255, 0.06) 0%,
        rgba(255, 0, 255, 0.04) 40%,
        transparent 70%);
    pointer-events: none;
    z-index: -5;
    will-change: auto;
}

/* Transparent layout containers */
.theme-neon-dark .container,
.theme-neon-dark .container-narrow,
.theme-neon-dark main,
.theme-neon-dark .py-2,
.theme-neon-dark .py-md-5,
.theme-neon-dark .py-4 {
    background: transparent !important;
    position: relative;
    z-index: 10;
}

/* ---- Cards ---- */
.theme-neon-dark .card {
    background: var(--theme-bg) !important;
    border: 2px solid var(--theme-primary) !important;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.2), 0 8px 25px rgba(0, 0, 0, 0.5) !important;
    border-radius: var(--theme-radius-card) !important;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

/* Cyan glow bar at top of card */
.theme-neon-dark .card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--theme-accent), var(--theme-primary), var(--theme-accent));
    z-index: 1;
}

.theme-neon-dark .card-body {
    background: transparent !important;
    position: relative;
    z-index: 2;
}

/* ---- Form Inputs ---- */
/* Light background inputs for readability on dark theme */
.theme-neon-dark .form-control,
.theme-neon-dark .form-select,
.theme-neon-dark textarea {
    background: #f8f9fa !important;
    border: 2px solid var(--theme-accent) !important;
    color: #2d3748 !important;
    border-radius: var(--theme-radius-input) !important;
    box-shadow: 0 0 8px rgba(255, 0, 255, 0.15) !important;
    font-size: 16px !important; /* Prevents iOS zoom — do not remove */
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
}

/* Smaller font for date/time inputs and compact inline selects to prevent overflow */
.theme-neon-dark .date-row-input,
.theme-neon-dark .time-row-input,
.theme-neon-dark .timezone-row-select,
.theme-neon-dark .duration-row-select,
.theme-neon-dark input[type="date"],
.theme-neon-dark input[type="time"],
.theme-neon-dark #futurePeriodType,
.theme-neon-dark #hideOptionLeadHoursContainer {
    font-size: 14px !important;
}

/* Compact inline selects — smaller radius, thinner border, no glow, locked font size */
.theme-neon-dark #futurePeriodType,
.theme-neon-dark #hideOptionLeadHoursContainer {
    border-radius: 6px !important;
    border-width: 1px !important;
    box-shadow: none !important;
    font-size: 14px !important;
    height: 28px !important;
    padding: 0.25rem 0.5rem !important;
}

.theme-neon-dark .form-control:focus,
.theme-neon-dark .form-select:focus,
.theme-neon-dark textarea:focus {
    border-color: var(--theme-primary) !important;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.4) !important;
    background: #ffffff !important;
    color: #2d3748 !important;
    transform: translateY(-1px);
}

/* ---- Typography ---- */
.theme-neon-dark .form-label,
.theme-neon-dark .card-title,
.theme-neon-dark h1,
.theme-neon-dark h2,
.theme-neon-dark h3,
.theme-neon-dark h4,
.theme-neon-dark h5,
.theme-neon-dark h6 {
    color: var(--theme-primary) !important;
    font-weight: 600 !important;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.4);
    letter-spacing: 0.3px;
}

/* Main heading on gradient background */
.theme-neon-dark h1.text-gradient,
.theme-neon-dark h1.display-4 {
    color: var(--theme-primary) !important;
    text-shadow: 0 0 15px rgba(0, 255, 255, 0.7), 0 2px 4px rgba(0, 0, 0, 0.5) !important;
}

/* Card headings on dark card bg */
.theme-neon-dark .card h1,
.theme-neon-dark .card-body h1 {
    color: var(--theme-primary) !important;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.4) !important;
}

.theme-neon-dark p,
.theme-neon-dark .card-text,
.theme-neon-dark .ql-editor {
    color: var(--theme-text) !important;
    font-weight: 400 !important;
    line-height: 1.6;
}

.theme-neon-dark .text-muted,
.theme-neon-dark .small,
.theme-neon-dark small {
    color: var(--theme-text-muted) !important;
    font-weight: 400 !important;
}

.theme-neon-dark ::placeholder,
.theme-neon-dark .form-control::placeholder,
.theme-neon-dark textarea::placeholder {
    color: #6c757d !important;
    opacity: 0.8 !important;
}

.theme-neon-dark .required-asterisk {
    color: #ff6b6b !important;
    font-weight: bold !important;
}

/* ---- Primary Buttons ----
   Note: #submitBtn is included to handle specificity (global styles.css has
   #submitBtn:hover with high specificity — must include it to override). */
.theme-neon-dark .btn-primary,
.theme-neon-dark button[type="submit"],
.theme-neon-dark #submitBtn {
    background: var(--theme-btn-gradient) !important;
    border: none !important;
    color: #000000 !important;
    font-weight: 700 !important;
    padding: 12px 28px !important;
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.4) !important;
    border-radius: var(--theme-radius-btn) !important;
    text-shadow: none !important;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease !important;
}

/* Shimmer sweep on hover */
.theme-neon-dark .btn-primary::before,
.theme-neon-dark button[type="submit"]::before,
.theme-neon-dark #submitBtn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.theme-neon-dark .btn-primary:hover::before,
.theme-neon-dark button[type="submit"]:hover::before,
.theme-neon-dark #submitBtn:hover::before {
    left: 100%;
}

.theme-neon-dark .btn-primary:hover,
.theme-neon-dark button[type="submit"]:hover,
.theme-neon-dark #submitBtn:hover {
    background: linear-gradient(45deg, var(--theme-primary), var(--theme-accent)) !important;
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.6) !important;
    transform: translateY(-2px) scale(1.01);
    color: #000000 !important;
}

/* ---- Secondary Buttons ---- */
.theme-neon-dark .btn-secondary {
    background: linear-gradient(45deg, var(--theme-accent), var(--theme-accent-light)) !important;
    border: none !important;
    color: #000000 !important;
    font-weight: 700 !important;
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.3) !important;
    border-radius: var(--theme-radius-btn) !important;
    transition: all 0.3s ease !important;
}

.theme-neon-dark .btn-secondary:hover,
.theme-neon-dark .btn-secondary:active,
.theme-neon-dark .btn-secondary:focus {
    background: linear-gradient(45deg, var(--theme-accent-light), var(--theme-accent)) !important;
    box-shadow: 0 0 25px rgba(255, 0, 255, 0.5) !important;
    transform: translateY(-2px);
    color: #000000 !important;
}

/* ---- Outline Buttons ---- */
.theme-neon-dark .btn-outline-primary {
    color: var(--theme-primary) !important;
    border-color: var(--theme-primary) !important;
    border-width: 2px !important;
    border-radius: var(--theme-radius-btn) !important;
    font-weight: 600 !important;
    background: rgba(0, 0, 0, 0.5) !important;
    transition: all 0.3s ease !important;
}

.theme-neon-dark .btn-outline-primary:hover {
    background: rgba(0, 255, 255, 0.15) !important;
    border-color: var(--theme-primary-light) !important;
    color: var(--theme-primary-light) !important;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3) !important;
    transform: translateY(-1px);
}

/* Active/checked state — btn-group toggles */
.theme-neon-dark .btn-check:checked + .btn-outline-primary,
.theme-neon-dark .btn-outline-primary:active,
.theme-neon-dark .btn-outline-primary.active {
    background: var(--theme-primary) !important;
    border-color: var(--theme-primary) !important;
    color: #000000 !important;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.8), inset 0 0 10px rgba(0, 255, 255, 0.3) !important;
    font-weight: 700 !important;
}

.theme-neon-dark .btn-check:checked + .btn-outline-primary .bi,
.theme-neon-dark .btn-outline-primary:active .bi,
.theme-neon-dark .btn-outline-primary.active .bi {
    color: #000000 !important;
}

.theme-neon-dark .btn-outline-secondary {
    color: var(--theme-accent) !important;
    border-color: var(--theme-accent) !important;
    border-width: 2px !important;
    border-radius: var(--theme-radius-btn) !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
}

.theme-neon-dark .btn-outline-secondary:hover {
    background: var(--theme-accent) !important;
    color: #000000 !important;
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.4) !important;
    transform: translateY(-1px);
}

/* btn-outline-danger — used by Cancel buttons in modals (e.g. spreadsheet modal) */
.theme-neon-dark .btn-outline-danger {
    color: var(--theme-accent) !important;
    border-color: var(--theme-accent) !important;
    border-width: 2px !important;
    border-radius: var(--theme-radius-btn) !important;
    font-weight: 600 !important;
    background: transparent !important;
    transition: all 0.3s ease !important;
}

.theme-neon-dark .btn-outline-danger:hover {
    background: var(--theme-accent) !important;
    color: #000000 !important;
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.4) !important;
    transform: translateY(-1px);
}

/* ---- Segmented control (btn-group) ---- */
.theme-neon-dark .btn-group[aria-label="Title alignment"] {
    background: rgba(0, 255, 255, 0.08) !important;
    box-shadow: inset 0 1px 2px rgba(0, 255, 255, 0.15) !important;
}

.theme-neon-dark .btn-group[aria-label="Title alignment"] .btn {
    color: var(--theme-primary) !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
}

.theme-neon-dark .btn-group[aria-label="Title alignment"] .btn-check:checked + .btn,
.theme-neon-dark .btn-group[aria-label="Title alignment"] .btn-secondary {
    background: rgba(20, 20, 30, 0.95) !important;
    color: var(--theme-primary) !important;
    box-shadow: 0 1px 3px rgba(0, 255, 255, 0.3), 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

/* Other btn-groups — restore connected shape */
.theme-neon-dark .btn-group:not([aria-label="Title alignment"]) .btn {
    border-radius: 0 !important;
    transform: none !important;
}

.theme-neon-dark .btn-group:not([aria-label="Title alignment"]) > label.btn:first-of-type,
.theme-neon-dark .btn-group:not([aria-label="Title alignment"]) > button.btn:first-child {
    border-top-left-radius: 6px !important;
    border-bottom-left-radius: 6px !important;
}

.theme-neon-dark .btn-group:not([aria-label="Title alignment"]) > label.btn:last-child,
.theme-neon-dark .btn-group:not([aria-label="Title alignment"]) > button.btn:last-child {
    border-top-right-radius: 6px !important;
    border-bottom-right-radius: 6px !important;
}

/* Checked state for btn-check + btn-outline-secondary groups */
.theme-neon-dark .btn-check:checked + .btn-outline-secondary {
    background: var(--theme-primary) !important;
    border-color: var(--theme-primary) !important;
    color: #000000 !important;
}

/* Shared transition */
.theme-neon-dark .btn,
.theme-neon-dark .form-control,
.theme-neon-dark .list-group-item {
    transition: all 0.3s ease !important;
}

/* ---- List Items (option rows) ---- */
.theme-neon-dark .list-group-item {
    background: rgba(25, 25, 35, 0.9) !important;
    border: 2px solid var(--theme-accent) !important;
    color: var(--theme-text) !important;
    margin-bottom: 8px !important;
    border-radius: var(--theme-radius-btn) !important;
    font-weight: 500 !important;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.15) !important;
    transition: all 0.3s ease !important;
}

/* Cyan-to-magenta left accent bar */
.theme-neon-dark .list-group-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, var(--theme-primary), var(--theme-accent));
}

.theme-neon-dark .list-group-item:hover {
    background: rgba(35, 35, 45, 0.9) !important;
    box-shadow: 0 0 18px rgba(255, 0, 255, 0.3) !important;
    transform: translateY(-1px);
    border-color: var(--theme-primary) !important;
}

/* ---- Checkboxes & Radios ---- */
.theme-neon-dark .form-check-input {
    /* Use background-color (NOT background shorthand) — the shorthand resets
       background-repeat/size/position to initial values which breaks toggle switch thumbs */
    background-color: rgba(15, 15, 25, 0.9) !important;
    border: 2px solid var(--theme-accent) !important;
    transition: all 0.3s ease !important;
}

/* Exclude .form-switch — switches need border-radius: 2em, set below */
.theme-neon-dark .form-check:not(.form-switch) .form-check-input[type="checkbox"] {
    border-radius: 4px !important;
}

.theme-neon-dark .form-check-input[type="radio"] {
    border-radius: 50% !important;
}

.theme-neon-dark .form-check-input:checked {
    background-color: var(--theme-primary) !important;
    border-color: var(--theme-primary) !important;
    box-shadow: 0 0 12px rgba(0, 255, 255, 0.5) !important;
}

.theme-neon-dark .form-check-label {
    color: var(--theme-text) !important;
    font-weight: 500 !important;
}

.theme-neon-dark .form-check-label.header-title {
    color: var(--theme-primary) !important;
    font-weight: 600 !important;
    text-shadow: 0 0 6px rgba(0, 255, 255, 0.4) !important;
}

/* ---- Toggle Switches ----
   No background-image override — Bootstrap provides the white sliding thumb.
   Just set colors and let Bootstrap handle the rest. */
.theme-neon-dark .form-switch .form-check-input {
    --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23ffffff'/%3e%3c/svg%3e");
    background-color: #05050f !important;
    border: 2px solid var(--theme-accent) !important;
    border-radius: 2em !important;
    width: 2em !important;
    height: 1em !important;
    box-shadow: 0 0 6px rgba(255, 0, 255, 0.5), inset 0 0 4px rgba(0, 0, 0, 0.8) !important;
}

.theme-neon-dark .form-switch .form-check-input:checked {
    background-color: var(--theme-primary) !important;
    border-color: var(--theme-primary) !important;
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.7), inset 0 0 4px rgba(0, 0, 0, 0.3) !important;
}

/* ---- Alerts ---- */
.theme-neon-dark .alert {
    background: rgba(20, 20, 30, 0.9) !important;
    border: 2px solid var(--theme-accent) !important;
    color: var(--theme-text) !important;
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.2) !important;
    border-radius: var(--theme-radius-btn) !important;
}

/* ---- Form Sections ---- */
.theme-neon-dark .form-section-respondent,
.theme-neon-dark .form-section-main-options,
.theme-neon-dark .form-section-additional {
    border-color: var(--theme-primary) !important;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2) !important;
    border-radius: var(--theme-radius-card) !important;
}

.theme-neon-dark .form-section-header {
    background: rgba(0, 255, 255, 0.08) !important;
    color: var(--theme-primary) !important;
    border-bottom: 1px solid var(--theme-accent) !important;
    border-radius: 18px 18px 0 0 !important;
    font-weight: 600 !important;
    text-shadow: 0 0 6px rgba(0, 255, 255, 0.4) !important;
    padding: 1rem !important;
}

.theme-neon-dark .form-section h6,
.theme-neon-dark .card-header h6,
.theme-neon-dark .section-header h6 {
    color: var(--theme-primary) !important;
    text-shadow: 0 0 6px rgba(0, 255, 255, 0.4) !important;
}

/* ---- Option Items (form preview editor) ---- */
.theme-neon-dark .option-item {
    background: rgba(20, 20, 30, 0.85) !important;
    border: 2px solid var(--theme-accent) !important;
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.15) !important;
    border-radius: var(--theme-radius-btn) !important;
    transition: all 0.3s ease !important;
}

.theme-neon-dark .option-item:hover {
    box-shadow: 0 0 18px rgba(0, 255, 255, 0.3) !important;
    transform: translateY(-1px);
    border-color: var(--theme-primary) !important;
}

/* ---- Additional Questions ---- */
.theme-neon-dark .additional-question-section .card,
.theme-neon-dark .additional-question-item {
    background: rgba(20, 20, 30, 0.9) !important;
    border: 2px solid var(--theme-primary) !important;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2) !important;
    color: var(--theme-text) !important;
    border-radius: var(--theme-radius-card) !important;
}

.theme-neon-dark .additional-question-section .card-body {
    background: transparent !important;
    color: var(--theme-text) !important;
}

.theme-neon-dark .additional-question-section .form-label,
.theme-neon-dark .additional-question-section .additional-question-header h6,
.theme-neon-dark .additional-question-section .additional-question-title,
.theme-neon-dark .additional-question-section .additional-question-body .form-label,
.theme-neon-dark .additional-question-section .additional-question-body .fw-semibold {
    color: var(--theme-primary) !important;
    font-weight: 600 !important;
    text-shadow: 0 0 6px rgba(0, 255, 255, 0.4) !important;
}

.theme-neon-dark .additional-question-section .additional-question-body .form-check-label {
    color: var(--theme-text) !important;
    font-weight: 500 !important;
}

/* Fix vertical alignment of larger radio/checkbox inputs everywhere (excludes toggle switches) */
.theme-neon-dark .form-check:not(.form-switch) {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

.theme-neon-dark .form-check:not(.form-switch) .form-check-input {
    margin-top: 0 !important;
    flex-shrink: 0 !important;
}

.theme-neon-dark .form-check:not(.form-switch) .form-check-label {
    margin-bottom: 0 !important;
}
/* Preserve inline-block display when Bootstrap d-inline-block is used (e.g. Silent Save checkbox) */
.theme-neon-dark .form-check.d-inline-block:not(.form-switch) {
    display: inline-flex !important;
}

/* ---- Icons ---- */
.theme-neon-dark .bi-calendar-event-fill,
.theme-neon-dark .bi-clock-fill,
.theme-neon-dark .bi-geo-alt-fill,
.theme-neon-dark .max-signups-icon,
.theme-neon-dark .bi-people-fill,
.theme-neon-dark #maxSignupsHeader .bi-people-fill {
    color: var(--theme-primary) !important;
}

/* ---- Option description ---- */
.theme-neon-dark .option-description-display {
    background: rgba(0, 255, 255, 0.06) !important;
    border-radius: 4px !important;
    color: var(--theme-text-muted) !important;
    padding: 0.4rem 0.6rem !important;
}

/* ---- Max responses display ---- */
.theme-neon-dark .limit-number {
    color: var(--theme-primary) !important;
    font-weight: bold !important;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.6) !important;
}

.theme-neon-dark .limit-label {
    color: var(--theme-text) !important;
    font-weight: 500 !important;
}

.theme-neon-dark .response-limit-circle .limit-btn {
    background: rgba(20, 20, 30, 0.9) !important;
    border: 1px solid var(--theme-accent) !important;
    color: var(--theme-primary) !important;
}

.theme-neon-dark .response-limit-circle .limit-btn:hover {
    background: rgba(30, 30, 40, 0.9) !important;
    border-color: var(--theme-primary) !important;
    color: var(--theme-accent) !important;
}

/* ---- Quill Editor ---- */
.theme-neon-dark .ql-toolbar.ql-snow {
    background: rgba(20, 20, 30, 0.9) !important;
    border-color: var(--theme-accent) !important;
    border-radius: 12px 12px 0 0 !important;
}

.theme-neon-dark .ql-container.ql-snow {
    background: rgba(15, 15, 25, 0.9) !important;
    border-color: var(--theme-accent) !important;
    color: var(--theme-text) !important;
    border-radius: 0 0 12px 12px !important;
}

.theme-neon-dark .ql-editor {
    color: var(--theme-text) !important;
    font-weight: 400 !important;
}

/* Quill toolbar icons are SVGs with dark strokes — invert for dark background */
.theme-neon-dark .ql-toolbar .ql-stroke {
    stroke: var(--theme-text) !important;
}

.theme-neon-dark .ql-toolbar .ql-fill {
    fill: var(--theme-text) !important;
}

.theme-neon-dark .ql-toolbar button,
.theme-neon-dark .ql-toolbar .ql-picker-label {
    color: var(--theme-text) !important;
}

.theme-neon-dark .ql-toolbar button:hover .ql-stroke,
.theme-neon-dark .ql-toolbar button.ql-active .ql-stroke {
    stroke: var(--theme-primary) !important;
}

.theme-neon-dark .ql-toolbar button:hover .ql-fill,
.theme-neon-dark .ql-toolbar button.ql-active .ql-fill {
    fill: var(--theme-primary) !important;
}

.theme-neon-dark .ql-toolbar button:hover,
.theme-neon-dark .ql-toolbar button.ql-active,
.theme-neon-dark .ql-toolbar .ql-picker-label:hover {
    color: var(--theme-primary) !important;
}

/* ---- btn-link (help triggers, collapse buttons) ---- */
.theme-neon-dark .btn-link {
    color: var(--theme-primary) !important;
    text-decoration: none !important;
    background: rgba(20, 20, 30, 0.9) !important;
    border: 1px solid var(--theme-primary) !important;
    border-radius: 8px !important;
}

.theme-neon-dark .btn-link:hover {
    color: var(--theme-accent) !important;
    background: rgba(30, 30, 40, 0.9) !important;
    border-color: var(--theme-accent) !important;
}

/* Help/question circle icons — no extra glow ring */
.theme-neon-dark .help-question-trigger,
.theme-neon-dark .btn-link:has(.bi-question-circle-fill) {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* ---- Collapse toggle buttons ---- */
.theme-neon-dark button[data-bs-toggle="collapse"] {
    background: rgba(20, 20, 30, 0.9) !important;
    border: 1px solid var(--theme-primary) !important;
    border-radius: 8px !important;
    color: var(--theme-primary) !important;
}

.theme-neon-dark button[data-bs-toggle="collapse"]:hover {
    background: rgba(30, 30, 40, 0.9) !important;
    border-color: var(--theme-accent) !important;
    color: var(--theme-accent) !important;
}

/* ---- Navbar ---- */
.theme-neon-dark .navbar {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0a1a 50%, #0a1a1a 100%) !important;
    border-bottom: 2px solid var(--theme-primary) !important;
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.3), 0 0 20px rgba(0, 255, 255, 0.1) !important;
}

.theme-neon-dark .navbar-brand,
.theme-neon-dark .brand-text-primary {
    color: var(--theme-primary) !important;
    text-shadow: 0 0 10px #00ffff, 0 0 20px #00ffff !important;
    font-weight: 700 !important;
}

/* Tint the logo SVG to neon magenta — matches "signup" text color.
   Direct hue-rotate from teal (#01a2b4, ~188°) to magenta (300°) = +112°.
   Much simpler than brightness(0)+reconstruct, which produces inconsistent
   results on mobile due to different saturate() clipping behavior. */
.theme-neon-dark .navbar-brand img {
    filter: hue-rotate(112deg) brightness(1.4) saturate(1000%) drop-shadow(0 0 8px #ff00ff) drop-shadow(0 0 16px rgba(255, 0, 255, 0.5));
    transition: filter 0.3s ease !important;
}

/* Hover: brighten — no dark-on-dark */
.theme-neon-dark .navbar-brand:hover .brand-text-primary {
    color: var(--theme-primary) !important;
    text-shadow: 0 0 15px #00ffff, 0 0 30px #00ffff !important;
}

.theme-neon-dark .navbar-brand:hover .brand-text-white {
    color: var(--theme-accent) !important;
    text-shadow: 0 0 15px #ff00ff, 0 0 30px #ff00ff !important;
}

.theme-neon-dark .navbar-brand:hover img {
    filter: hue-rotate(112deg) brightness(1.8) saturate(1000%) drop-shadow(0 0 12px #ff00ff) drop-shadow(0 0 24px rgba(255, 0, 255, 0.7));
}

.theme-neon-dark .brand-text-white {
    color: var(--theme-accent) !important;
    text-shadow: 0 0 10px #ff00ff, 0 0 20px #ff00ff !important;
}

.theme-neon-dark .navbar-toggler {
    border-color: var(--theme-primary) !important;
    background: rgba(0, 255, 255, 0.1) !important;
}

.theme-neon-dark .navbar-toggler:focus {
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5) !important;
}

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

/* ---- Off-canvas (mobile nav) ---- */
.theme-neon-dark .offcanvas {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0a1a 50%, #0a1a1a 100%) !important;
    border-left: 2px solid var(--theme-primary) !important;
    box-shadow: -4px 0 15px rgba(0, 255, 255, 0.3) !important;
}

.theme-neon-dark .offcanvas-header {
    border-bottom: 1px solid var(--theme-primary) !important;
}

.theme-neon-dark .btn-close {
    filter: none !important;
    opacity: 1 !important;
    background: #ffffff !important;
    border: 2px solid var(--theme-primary) !important;
    border-radius: 6px !important;
    width: 1.5rem !important;
    height: 1.5rem !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000000'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 0.75rem !important;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.4) !important;
    transition: all 0.3s ease !important;
}

.theme-neon-dark .btn-close:hover {
    opacity: 1 !important;
    background-color: #f0f0f0 !important;
    border-color: var(--theme-accent) !important;
    transform: scale(1.05) !important;
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.5) !important;
}

.theme-neon-dark .mobile-nav-section .btn {
    background: var(--theme-btn-gradient) !important;
    border: 2px solid var(--theme-primary) !important;
    color: #000000 !important;
    font-weight: 700 !important;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3) !important;
    transition: all 0.3s ease !important;
}

.theme-neon-dark .mobile-nav-section .btn:hover {
    background: linear-gradient(45deg, var(--theme-primary), var(--theme-accent)) !important;
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.5) !important;
    transform: translateY(-1px) !important;
}

.theme-neon-dark .mobile-nav-header {
    color: var(--theme-primary) !important;
    font-weight: 700 !important;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.7) !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
}

.theme-neon-dark .mobile-nav-item {
    color: var(--theme-text) !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
}

.theme-neon-dark .mobile-nav-item:hover {
    color: var(--theme-primary) !important;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.7) !important;
}

.theme-neon-dark .mobile-nav-item i {
    color: var(--theme-accent) !important;
    text-shadow: 0 0 6px rgba(255, 0, 255, 0.6) !important;
}

/* ---- Footer ---- */
.theme-neon-dark .footer {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0a1a 50%, #0a1a1a 100%) !important;
    border-top: 2px solid var(--theme-primary) !important;
    box-shadow: 0 -4px 15px rgba(0, 255, 255, 0.2) !important;
}

.theme-neon-dark .footer p {
    color: var(--theme-text) !important;
    font-weight: 500 !important;
}

/* Footer link + icon: all cyan — overrides inline color styles */
.theme-neon-dark .footer a,
.theme-neon-dark .footer a * {
    color: var(--theme-primary) !important;
    text-shadow: 0 0 6px rgba(0, 255, 255, 0.5) !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
}

.theme-neon-dark .footer a:hover,
.theme-neon-dark .footer a:hover * {
    color: var(--theme-accent) !important;
    text-shadow: 0 0 10px rgba(255, 0, 255, 0.7) !important;
}

/* ---- Modals ---- */
.theme-neon-dark .modal-backdrop {
    display: none !important;
}

.theme-neon-dark .modal {
    z-index: 9999 !important;
}

.theme-neon-dark .modal-dialog {
    z-index: 10000 !important;
}

.theme-neon-dark .modal-content {
    background: rgba(20, 20, 30, 0.97) !important;
    border: 2px solid var(--theme-primary) !important;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.4) !important;
    border-radius: var(--theme-radius-card) !important;
    backdrop-filter: blur(10px);
}

.theme-neon-dark .modal-header {
    background: transparent !important;
    border-bottom: none !important;
    color: var(--theme-primary) !important;
    padding: 1.5rem 1.5rem 0.5rem !important;
}

.theme-neon-dark .modal-title {
    color: var(--theme-primary) !important;
    font-weight: 600 !important;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.4) !important;
}

.theme-neon-dark .modal-body {
    background: transparent !important;
    color: var(--theme-text) !important;
    padding: 1rem 1.5rem !important;
}

.theme-neon-dark .modal-footer {
    background: transparent !important;
    border-top: none !important;
    padding: 0.5rem 1.5rem 1.5rem !important;
}

.theme-neon-dark .modal .btn-secondary {
    background: rgba(30, 30, 40, 0.9) !important;
    border: 1px solid var(--theme-accent) !important;
    color: var(--theme-text) !important;
}

.theme-neon-dark .modal .btn-secondary:hover {
    background: rgba(40, 40, 50, 0.9) !important;
    border-color: var(--theme-primary) !important;
    color: var(--theme-primary) !important;
}

/* ---- Spreadsheet Modal — complete theme opt-out ----
   Explicitly restore Bootstrap defaults for every element — revert doesn't
   work reliably against !important rules. */

/* Reset text color on everything inside */
.theme-neon-dark #ssModal *,
.theme-neon-dark #ssModal h1,
.theme-neon-dark #ssModal h2,
.theme-neon-dark #ssModal h3,
.theme-neon-dark #ssModal h4,
.theme-neon-dark #ssModal h5,
.theme-neon-dark #ssModal h6,
.theme-neon-dark #ssModal p,
.theme-neon-dark #ssModal small,
.theme-neon-dark #ssModal .text-muted {
    color: #212529 !important;
    text-shadow: none !important;
    filter: none !important;
}

/* Icons inside buttons inherit the button's color (not the wildcard #212529) */
.theme-neon-dark #ssModal .btn i,
.theme-neon-dark #ssModal .btn .bi {
    color: inherit !important;
}

/* Restore danger red for .text-danger elements (X delete row buttons) */
.theme-neon-dark #ssModal .text-danger,
.theme-neon-dark #ssModal .text-danger i,
.theme-neon-dark #ssModal .text-danger .bi {
    color: #dc3545 !important;
}

/* X delete row buttons — strip all button chrome, just show a plain red X */
.theme-neon-dark #ssModal .spreadsheet-delete-row {
    background: transparent !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    width: auto !important;
    height: auto !important;
    opacity: 1 !important;
    transform: none !important;
}

/* Modal shell */
.theme-neon-dark #ssModal .modal-content {
    background-color: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.2) !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: none !important;
}

.theme-neon-dark #ssModal .modal-header {
    background-color: transparent !important;
    border-bottom: 1px solid #dee2e6 !important;
    padding: 1rem !important;
}

.theme-neon-dark #ssModal .modal-body {
    background-color: transparent !important;
    padding: 1rem !important;
}

.theme-neon-dark #ssModal .modal-footer {
    background-color: transparent !important;
    border-top: 1px solid #dee2e6 !important;
    padding: 0.75rem !important;
}

/* Buttons — neon themed */
.theme-neon-dark #ssModal .btn-primary {
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-primary-mid) 100%) !important;
    border: 1px solid var(--theme-primary) !important;
    color: #05050f !important;
    border-radius: var(--theme-radius-btn) !important;
    padding: 0.25rem 0.75rem !important;
    font-weight: 600 !important;
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.4) !important;
    transform: none !important;
}

.theme-neon-dark #ssModal .btn-primary:hover {
    background: linear-gradient(135deg, var(--theme-primary-light) 0%, var(--theme-primary) 100%) !important;
    box-shadow: 0 0 14px rgba(0, 255, 255, 0.7) !important;
    transform: none !important;
}

.theme-neon-dark #ssModal .btn-outline-secondary {
    color: var(--theme-primary) !important;
    border: 1px solid var(--theme-primary) !important;
    background: rgba(5, 5, 15, 0.85) !important;
    border-radius: var(--theme-radius-btn) !important;
    padding: 0.25rem 0.75rem !important;
    font-weight: 500 !important;
    box-shadow: 0 0 6px rgba(0, 255, 255, 0.25) !important;
    transform: none !important;
}

.theme-neon-dark #ssModal .btn-outline-secondary:hover {
    background: rgba(5, 5, 15, 0.95) !important;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5) !important;
    color: var(--theme-primary) !important;
    transform: none !important;
}

.theme-neon-dark #ssModal .btn-outline-danger {
    color: var(--theme-accent) !important;
    border: 1px solid var(--theme-accent) !important;
    background: transparent !important;
    border-radius: var(--theme-radius-btn) !important;
    padding: 0.25rem 0.75rem !important;
    font-weight: 500 !important;
    box-shadow: none !important;
    transform: none !important;
}

.theme-neon-dark #ssModal .btn-outline-danger:hover {
    background: rgba(255, 0, 255, 0.12) !important;
    box-shadow: 0 0 8px rgba(255, 0, 255, 0.3) !important;
    color: var(--theme-accent) !important;
    transform: none !important;
}

/* Alert inside modal */
.theme-neon-dark #ssModal .alert {
    background-color: #fff3cd !important;
    border-color: #ffecb5 !important;
    color: #664d03 !important;
    box-shadow: none !important;
}

/* Table inputs */
.theme-neon-dark #ssModal input,
.theme-neon-dark #ssModal .form-control {
    background-color: transparent !important;
    border-color: transparent !important;
    color: #212529 !important;
    box-shadow: none !important;
}

/* ---- Taken/Disabled Options ---- */
.theme-neon-dark .list-group-item input:disabled + label {
    color: var(--theme-accent) !important;
    cursor: not-allowed !important;
    opacity: 0.5 !important;
    text-decoration: line-through !important;
}

.theme-neon-dark .list-group-item input:disabled ~ small {
    color: var(--theme-primary) !important;
    font-weight: 600 !important;
}

.theme-neon-dark .list-group-item:has(input:disabled) {
    background: rgba(255, 0, 255, 0.12) !important;
    border-color: rgba(255, 0, 255, 0.4) !important;
    opacity: 0.7 !important;
}

.theme-neon-dark .list-group-item:has(input:disabled):hover {
    background: rgba(255, 0, 255, 0.12) !important;
    border-color: rgba(255, 0, 255, 0.4) !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: 0 0 12px rgba(255, 0, 255, 0.2) !important;
}

.theme-neon-dark .list-group-item:has(input:disabled)::before {
    background: linear-gradient(to bottom, rgba(255, 0, 255, 0.5), rgba(0, 255, 255, 0.5)) !important;
}

/* ---- Highlighted Options ---- */
.theme-neon-dark .list-group-item.option-highlighted {
    background: rgba(255, 176, 0, 0.12) !important;
    border: 2px solid #FFB000 !important;
    box-shadow: 0 0 14px rgba(255, 176, 0, 0.35), 0 0 4px rgba(255, 176, 0, 0.2) !important;
}

.theme-neon-dark .list-group-item.option-highlighted:hover {
    background: rgba(255, 176, 0, 0.18) !important;
    box-shadow: 0 0 20px rgba(255, 176, 0, 0.5), 0 0 6px rgba(255, 176, 0, 0.3) !important;
}

/* ---- Animations ---- */
@keyframes neonPulse {
    0%, 100% {
        text-shadow: 0 0 5px #00ffff, 0 0 10px #00ffff;
    }
    50% {
        text-shadow: 0 0 10px #00ffff, 0 0 20px #00ffff, 0 0 30px #00ffff;
    }
}
