/* GLOBAL THEME VARIABLES */
:root {
    --color-purple: #64438d;
    --color-yellow: #F3A642;
    --color-green: #26c000;
    --color-light-green: #5afa32;
    --color-red: #ff0000;

    --color-white: #fff;
    --color-gray-0: #f9f9f9;
    --color-gray-1: #f2f2f2;
    --color-gray-2: #e6e6e6;
    --color-gray-3: #d9d9d9;
    --color-gray-4: #ccc;
    --color-gray-5: #aaa;
    --color-gray-6: #888;
    --color-gray-7: #666;
    --color-gray-8: #444;
    --color-gray-9: #222;
    --color-black: #000;

    --color-bg: #ffffff;
    --color-bg-dark: #1f1f2d;

    --color-primary: #64438d;
    --color-primary-hover: #523574;
    --color-primary-active: #3f2757;

    --color-text: #111;
    --color-text-light: #ccc;

    --modal-bg: #fff;

    --border-radius: 10px;
    --shadow-strong: 0 10px 30px rgba(0,0,0,0.3);
}label {
    font-weight: 500;
}/* Font */
body, html {
    font-family: "Helvetica Neue", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    background-color: #f4f4f4;
    padding-bottom: 60px; /* space for feedback bubble */
}

/* Content */
#content {
    background-color: #f4f4f4;
    min-height: 100vh;
    min-height: 100dvh;
}

/* @media (min-width: 768px) {
    #content {
        padding: 30px 50px 30px 50px;
    }
} */
#navigation-sidebar {
    height: 100vh;
    height: 100dvh;
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1050;
    background: #fff;
    border-right: 1px solid #ddd;
    overflow-y: auto;
}
#navigation-sidebar.show {
    transform: translateX(0);
}
@media (min-width: 768px) {
    /* #navigation-sidebar {
        transform: translateX(0);
        position: static;
        height: 100vh;
        height: 100dvh;
    } */
    #navigation-sidebar {
        transform: none;
    }
    #content {
        margin-left: 280px;
    }
    #toggle-btn {
        display: none;
    }
}

/* Navigation over helpdesk/feedback bubble on mobile */
@media (max-width: 767px) {
    #navigation-sidebar {
        z-index: 9999999999;
    }
}

/* Horizontal divider */
#navigation-sidebar .horizontal-divider {
    border-bottom: 1px solid #ddd;
    margin: 1rem -1rem;
    width: auto;
}

/* Add a left border to each collapse nav-link (fold out menu style) */
#navigation-sidebar .primary-link {
    color: #333;
    font-size: 1.1rem;
    font-weight: 500;
    /* margin: 0; */
    padding: 0.5rem 0.5rem;
}
#sidebarMenu .nav-item:not(:first-of-type) .primary-link, #sidebarFooter .primary-link:not(:first-of-type) {
    /* padding: 0.5rem 0; */
}
#navigation-sidebar .primary-link--static {
    cursor: pointer;
    margin: 0;
    padding: 0.5rem 0.5rem;
}
#navigation-sidebar .primary-link--static * {
    cursor: pointer;
}
#navigation-sidebar .primary-link--static .form-check.form-switch {
    padding-left: 1.5em;
}
#navigation-sidebar .primary-link--static .form-check.form-switch .form-check-input {
    margin-left: -1.5em;
    margin-top: 0.27rem;
    transform: scale(0.85);
    transform-origin: left center;
}
#navigation-sidebar .primary-link i.fa {
    margin-right: 0.5rem;
}

/* Add a left border to each collapse nav-link (fold out menu style) */
#sidebarMenu .secondary-link {
    border-left: 3px solid #bbb;
    color: #bbb;
    font-size: 1.0rem;
    font-weight: 500;
    padding-left: 1rem;
}
#sidebarMenu .secondary-link.active {
    border-left: 3px solid #64438d;
    color: #64438d;
}

/* Collapse margins */
#sidebarMenu .nav {
    margin-left: 18px;
    /* margin-top: 0.5rem; */
}

#sidebarMenu .nav.flex-column {
    margin-bottom: 1rem;
}

/* No menu animation */
/*#sidebarMenu .collapsing {
    transition: none !important;
}*/

/* Submenu chevron arrow styles */
.nav-chevron {
    transition: transform 0.3s ease;
    font-size: 0.75rem;
    opacity: 0.6;
}

.nav-chevron.rotated {
    transform: rotate(180deg);
}

/* Hovers */
#navigation-sidebar .primary-link:hover {
    background-color: rgba(100, 67, 141, 0.04);
    border-radius: 4px;
}
#navigation-sidebar .secondary-link:hover {
    background-color: rgba(100, 67, 141, 0.04);
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

/* Active */
#navigation-sidebar .primary-link.active/*,
#navigation-sidebar .primary-link.text-purple*/ {
    background-color: rgba(100, 67, 141, 0.08);
    border-radius: 4px;
    font-weight: 600;
}
#navigation-sidebar .secondary-link.active {
    background-color: rgba(100, 67, 141, 0.08);
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    font-weight: 600;
}
.bg-primary {
    background-color: #64438d !important;
    color: #fff !important;
}.btn {
    border-radius: 5px;
    font-weight: 500;
    text-decoration: none;
}

/* Primary button */
.btn-primary {
    background-color: var(--color-purple) !important;
    border-color: var(--color-purple) !important;
    color: #fff !important;
}
.btn-primary:hover,
.btn-primary:focus {
    background-color: #fff !important;
    color: var(--color-purple) !important;
    border-color: var(--color-purple) !important;
}
.btn-primary:active,
.btn-primary.active {
    background-color: color-mix(in srgb, #fff 100%, var(--color-purple)) !important;
    color: var(--color-purple) !important;
    border-color: var(--color-purple) !important;
}
.btn-primary:disabled,
.btn-primary.disabled {
    background-color: color-mix(in srgb, var(--color-purple) 20%, white) !important;
    border-color: color-mix(in srgb, var(--color-purple) 20%, white) !important;
    color: #aaa !important;
    cursor: not-allowed;
    opacity: 0.9;
}

/* Green button */
.btn-green {
    background-color: var(--color-green) !important;
    border-color: var(--color-green) !important;
    color: #fff !important;
}
.btn-green:hover,
.btn-green:focus {
    background-color: #fff !important;
    color: var(--color-green) !important;
    border-color: var(--color-green) !important;
}
.btn-green:active,
.btn-green.active {
    background-color: color-mix(in srgb, #fff 100%, var(--color-green)) !important;
    color: var(--color-green) !important;
    border-color: var(--color-green) !important;
}
.btn-green:disabled,
.btn-green.disabled {
    background-color: color-mix(in srgb, var(--color-green) 20%, white) !important;
    border-color: color-mix(in srgb, var(--color-green) 20%, white) !important;
    color: #aaa !important;
    cursor: not-allowed;
    opacity: 0.9;
}
/* Default state */
.pagination .page-link {
    color: #64438d;
    background-color: #fff;
}

/* Hover state */
.pagination .page-link:hover {
    color: #fff;
    background-color: #bba6d6;
}

/* Active state */
.pagination .active .page-link {
    background-color: #64438d;
    /* border-color: #7b3fe4; */
    color: #fff;
}.content-panel {
    position: relative;
    margin-top: 15px;
    padding: 15px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 0px;
}
/* Panels */
#top-panel {
  position: relative;
  width:100%;
  margin: 0;
  padding: 20px 40px;
  background-color: #fff;
  border-bottom: 1px solid #ddd;
}


@media (max-width: 767px) {
    #top-panel {
        margin-top: 1rem;
    }
}

/* Top Panel - Actions */
.top-panel-actions {
    /* margin-top: 10px; */
}
.top-panel-actions button:not(:last-child) {
    margin-right: 0.5rem;
}
.top-panel-actions i {
    margin-right: 0.25rem;
}

/* Top Panel - Navigation */
#top-panel-navigation {
    margin-top: 10px;
    margin-bottom: -20px;
}
#top-panel-navigation .item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 500;
    padding: 12px 15px;
    text-decoration: none;
    color: #bbb;
}
#top-panel-navigation .item.active {
    color: #333;
    border-bottom: 3px solid #64438d;
    padding-bottom: 9px; /* 12px - 3px */
}


#toop-panel-navigation .item.active span.underline::after {
    content: "";
    display: block;
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
    background-color: #64438d;
}
html.theme-dark,
body.theme-dark {
    background-color: #2c2c2c;
    color: #ffffff;
    --color-purple: #64438d;
}

html.theme-dark #content,
body.theme-dark #content {
    background-color: #252525;
    color: #ffffff;
}

html.theme-dark .content-panel,
body.theme-dark .content-panel {
    background-color: #3a3a3a;
    border-color: #444;
    color: #ffffff;
}

html.theme-dark #top-panel,
body.theme-dark #top-panel {
    background-color: #3a3a3a;
    border-bottom-color: #444;
    color: #ffffff;
}

html.theme-dark #top-panel-navigation .item {
    color: #aaa;
}

html.theme-dark #top-panel-navigation .item.active {
    color: #fff;
}

/* Navigation sidebar */
html.theme-dark #navigation-sidebar,
body.theme-dark #navigation-sidebar {
    background: #3a3a3a;
    border-right-color: #444;
    color: #fff;
}

html.theme-dark #navigation-sidebar .horizontal-divider,
body.theme-dark #navigation-sidebar .horizontal-divider {
    border-bottom-color: #444;
}

html.theme-dark #navigation-sidebar .primary-link,
body.theme-dark #navigation-sidebar .primary-link {
    color: #eee;
}

html.theme-dark #sidebarMenu .secondary-link,
body.theme-dark #sidebarMenu .secondary-link {
    border-left-color: #666;
    color: #aaa;
}

html.theme-dark #sidebarMenu .secondary-link.active,
body.theme-dark #sidebarMenu .secondary-link.active {
    border-left-color: #9c7bc7;
    color: #fff;
}

html.theme-dark #navigation-sidebar .primary-link:hover,
body.theme-dark #navigation-sidebar .primary-link:hover {
    background-color: rgba(156, 123, 199, 0.12);
}

html.theme-dark #navigation-sidebar .secondary-link:hover,
body.theme-dark #navigation-sidebar .secondary-link:hover {
    background-color: rgba(156, 123, 199, 0.12);
}

html.theme-dark #navigation-sidebar .primary-link.active,
body.theme-dark #navigation-sidebar .primary-link.active,
html.theme-dark #navigation-sidebar .secondary-link.active,
body.theme-dark #navigation-sidebar .secondary-link.active {
    background-color: rgba(156, 123, 199, 0.2);
}

/* Brighter purple accents in dark mode */
html.theme-dark .purple,
body.theme-dark .purple,
html.theme-dark .text-purple,
body.theme-dark .text-purple {
    color: #c18cff !important;
}

/* Tables */
html.theme-dark table,
body.theme-dark table,
html.theme-dark .table,
body.theme-dark .table {
    color: #eaeaea;
    background-color: #3a3a3a;
    border-color: #444;
}

html.theme-dark .table > :not(caption) > * > *,
body.theme-dark .table > :not(caption) > * > * {
    color: #eaeaea;
    background-color: #3a3a3a;
    border-color: #444;
}

html.theme-dark .table-light,
body.theme-dark .table-light {
    background-color: #3a3a3a;
    color: #eaeaea;
}

html.theme-dark .table thead,
body.theme-dark .table thead {
    background-color: #444;
    color: #fff;
}

html.theme-dark .table-striped tbody tr:nth-of-type(odd) > *,
body.theme-dark .table-striped tbody tr:nth-of-type(odd) > * {
    background-color: #353535;
}

/* Ensure light tables render dark in theme-dark */
html.theme-dark .content-panel .table.table-light,
body.theme-dark .content-panel .table.table-light {
    --bs-table-color: #eaeaea;
    --bs-table-bg: #3a3a3a;
    --bs-table-border-color: #444;
    --bs-table-striped-bg: #353535;
    --bs-table-striped-color: #eaeaea;
    --bs-table-hover-bg: #404040;
    --bs-table-hover-color: #ffffff;
    color: #eaeaea !important;
}

html.theme-dark .content-panel .table.table-light > :not(caption) > * > *,
body.theme-dark .content-panel .table.table-light > :not(caption) > * > * {
    background-color: var(--bs-table-bg) !important;
    color: var(--bs-table-color) !important;
    border-color: var(--bs-table-border-color) !important;
}

html.theme-dark .content-panel .table.table-light.table-striped tbody tr:nth-of-type(odd) > *,
body.theme-dark .content-panel .table.table-light.table-striped tbody tr:nth-of-type(odd) > * {
    background-color: var(--bs-table-striped-bg) !important;
}

/* Forms */
html.theme-dark .form-control,
body.theme-dark .form-control,
html.theme-dark .form-select,
body.theme-dark .form-select,
html.theme-dark textarea,
body.theme-dark textarea,
html.theme-dark input,
body.theme-dark input {
    background-color: #2f2f2f;
    color: #fff;
    border-color: #555;
}

html.theme-dark .form-select,
body.theme-dark .form-select {
    /* Lighter caret for dark backgrounds */
    background-image:
        url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba(255,255,255,0.8)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

html.theme-dark .form-control:focus,
body.theme-dark .form-control:focus,
html.theme-dark .form-select:focus,
body.theme-dark .form-select:focus,
html.theme-dark textarea:focus,
body.theme-dark textarea:focus,
html.theme-dark input:focus,
body.theme-dark input:focus {
    border-color: var(--color-purple);
    box-shadow: 0 0 0 0.2rem rgba(100, 67, 141, 0.2);
}

html.theme-dark ::placeholder,
body.theme-dark ::placeholder {
    color: #bdbdbd;
}

/* Course cards */
html.theme-dark .course-card,
body.theme-dark .course-card {
    background-color: #3a3a3a;
    border-color: #444;
    color: #fff;
}

/* Deals page */
html.theme-dark .tradingview-logo,
body.theme-dark .tradingview-logo {
    filter: invert(1);
}

/* Calendar (shared) */
html.theme-dark #calendar,
body.theme-dark #calendar {
    --cal-bg: #2b2e33;
    --cal-cell: #31343a;
    --cal-cell-muted: #2a2c30;
    --cal-border: #3d4047;
    --cal-header: #26292f;
    --cal-header-text: #e4e6eb;
    --cal-title: #f0e1a3;
    --cal-text: #e6e7ea;
    --cal-text-muted: #9aa0a6;
    --cal-today: #3a3224;
    --cal-today-ring: #c9a85a;
    --cal-event-hover: #3a3f46;
    --cal-list: #2f3238;
    --cal-btn: #5c3b8c;
    --cal-btn-hover: #6b47a0;
    --fc-border-color: #3d4047;
}

html.theme-dark #calendar .fc-toolbar-title,
body.theme-dark #calendar .fc-toolbar-title {
    color: var(--cal-title);
}

html.theme-dark #calendar .fc-scrollgrid,
html.theme-dark #calendar .fc-scrollgrid th,
html.theme-dark #calendar .fc-scrollgrid td,
body.theme-dark #calendar .fc-scrollgrid,
body.theme-dark #calendar .fc-scrollgrid th,
body.theme-dark #calendar .fc-scrollgrid td {
    border-color: var(--cal-border);
}

html.theme-dark #calendar .fc-col-header-cell,
body.theme-dark #calendar .fc-col-header-cell {
    background-color: var(--cal-header);
}

html.theme-dark #calendar .fc-col-header-cell-cushion,
body.theme-dark #calendar .fc-col-header-cell-cushion {
    color: var(--cal-header-text);
}

html.theme-dark #calendar .fc-daygrid-day-frame,
body.theme-dark #calendar .fc-daygrid-day-frame {
    background-color: var(--cal-cell);
    color: var(--cal-text);
}

html.theme-dark #calendar .fc-daygrid-day.fc-day-other .fc-daygrid-day-frame,
body.theme-dark #calendar .fc-daygrid-day.fc-day-other .fc-daygrid-day-frame {
    background-color: var(--cal-cell-muted);
}

html.theme-dark #calendar .fc-daygrid-day-number,
body.theme-dark #calendar .fc-daygrid-day-number {
    color: var(--cal-text);
}

html.theme-dark #calendar .fc-daygrid-day.fc-day-other .fc-daygrid-day-number,
body.theme-dark #calendar .fc-daygrid-day.fc-day-other .fc-daygrid-day-number {
    color: var(--cal-text-muted);
}

html.theme-dark #calendar .fc-daygrid-day.fc-day-today .fc-daygrid-day-frame,
body.theme-dark #calendar .fc-daygrid-day.fc-day-today .fc-daygrid-day-frame {
    background-color: var(--cal-today);
    box-shadow: inset 0 0 0 1px var(--cal-today-ring);
}

html.theme-dark #calendar .fc-day-sat .fc-daygrid-day-frame,
html.theme-dark #calendar .fc-day-sun .fc-daygrid-day-frame,
body.theme-dark #calendar .fc-day-sat .fc-daygrid-day-frame,
body.theme-dark #calendar .fc-day-sun .fc-daygrid-day-frame {
    background-color: #2e3036;
}

html.theme-dark #calendar .fc-theme-bootstrap5-shaded,
body.theme-dark #calendar .fc-theme-bootstrap5-shaded {
    color: var(--cal-text);
    background-color: var(--cal-list);
}

html.theme-dark #calendar .fc-list-table,
body.theme-dark #calendar .fc-list-table {
    border-color: var(--cal-border) !important;
    border-style: solid !important;
}

html.theme-dark #calendar .fc-list-day-cushion,
body.theme-dark #calendar .fc-list-day-cushion {
    background-color: var(--cal-header);
    color: var(--cal-header-text);
    border-color: var(--cal-border) !important;
}

html.theme-dark #calendar .fc-list-event,
body.theme-dark #calendar .fc-list-event {
    background-color: var(--cal-cell);
}

html.theme-dark #calendar .fc-list-event:nth-child(odd),
body.theme-dark #calendar .fc-list-event:nth-child(odd) {
    background-color: #2e3036;
}

html.theme-dark #calendar .fc-list-event:nth-child(even),
body.theme-dark #calendar .fc-list-event:nth-child(even) {
    background-color: #33363d;
}

html.theme-dark #calendar .fc-list-event td,
body.theme-dark #calendar .fc-list-event td {
    border-color: var(--cal-border) !important;
    color: var(--cal-text);
}

html.theme-dark #calendar .fc-list-day,
html.theme-dark #calendar .fc-list-event,
body.theme-dark #calendar .fc-list-day,
body.theme-dark #calendar .fc-list-event {
    border-color: var(--cal-border) !important;
}

html.theme-dark #calendar .fc-list-table th,
html.theme-dark #calendar .fc-list-table td,
body.theme-dark #calendar .fc-list-table th,
body.theme-dark #calendar .fc-list-table td {
    border-color: var(--cal-border) !important;
}

html.theme-dark #calendar .fc-list,
body.theme-dark #calendar .fc-list {
    border-color: var(--cal-border) !important;
}

html.theme-dark #calendar .fc-list-sticky,
body.theme-dark #calendar .fc-list-sticky {
    border-color: var(--cal-border) !important;
}

html.theme-dark #calendar .fc-list-event:hover td,
body.theme-dark #calendar .fc-list-event:hover td {
    background-color: var(--cal-event-hover);
}

html.theme-dark #calendar .fc-event:hover,
body.theme-dark #calendar .fc-event:hover {
    color: var(--cal-text);
    background-color: var(--cal-event-hover);
}

html.theme-dark #calendar .fc-button,
html.theme-dark #calendar .fc-button:focus,
body.theme-dark #calendar .fc-button,
body.theme-dark #calendar .fc-button:focus {
    color: var(--cal-text) !important;
    background-color: var(--cal-btn) !important;
    border-color: var(--cal-btn) !important;
}

html.theme-dark #calendar .fc-button:hover,
html.theme-dark #calendar .fc-button:active,
html.theme-dark #calendar .fc-button:disabled,
body.theme-dark #calendar .fc-button:hover,
body.theme-dark #calendar .fc-button:active,
body.theme-dark #calendar .fc-button:disabled {
    color: var(--cal-text) !important;
    background-color: var(--cal-btn-hover) !important;
    border-color: var(--cal-btn-hover) !important;
}

html.theme-dark #calendar .fc-button-active,
body.theme-dark #calendar .fc-button-active {
    box-shadow: inset 0 0 0 1px var(--cal-header-text);
}
/* Billing/order dark mode overrides (spectator flow) */
html.theme-dark .order .plan-panel,
body.theme-dark .order .plan-panel {
    background-color: #3a3a3a;
    border: 1px solid #444;
}

html.theme-dark .order .plan-panel.selected,
body.theme-dark .order .plan-panel.selected {
    background-color: #3a3a3a;
}

html.theme-dark .order ul li:nth-child(odd),
body.theme-dark .order ul li:nth-child(odd) {
    background-color: #353535;
}

html.theme-dark .order .panel,
body.theme-dark .order .panel,
html.theme-dark .order .billing-legal,
body.theme-dark .order .billing-legal,
html.theme-dark .order .billing_legal,
body.theme-dark .order .billing_legal {
    background-color: #3a3a3a;
    border-color: #444;
}

html.theme-dark .order .panel .color-1,
body.theme-dark .order .panel .color-1 {
    color: var(--color-purple);
}

html.theme-dark .order .panel .color-2,
body.theme-dark .order .panel .color-2 {
    color: var(--color-light-gray);
}
/* html.theme-dark .feedback-bubble,
body.theme-dark .feedback-bubble {
    background-color: #9d7bd6;
    color: #1b1b1b;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.7);
} */

html.theme-dark .app-modal-dialog,
body.theme-dark .app-modal-dialog {
    background-color: #2b2b2b;
    border: 1px solid #3b3b3b;
    color: #eeeeee;
}

html.theme-dark .app-modal-header,
body.theme-dark .app-modal-header {
    border-bottom-color: #3b3b3b;
}

html.theme-dark .app-modal-title,
body.theme-dark .app-modal-title {
    color: #c18cff;
}

html.theme-dark .app-modal-close,
body.theme-dark .app-modal-close {
    color: #eeeeee;
}

html.theme-dark .app-modal-close:hover,
body.theme-dark .app-modal-close:hover {
    color: #ffffff;
}

html.theme-dark .app-modal-body,
body.theme-dark .app-modal-body {
    color: #e5e5e5;
}
html.theme-dark .help-bubble,
body.theme-dark .help-bubble {
    background-color: #f0b34f;
    color: #1b1b1b;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.7);
}
.text-purple {
    color: var(--color-purple) !important;
}
.text-yellow {
    color: var(--color-yellow) !important;
}
.text-green {
    color: var(--color-green) !important;
}
.text-light-green {
    color: var(--color-light-green) !important;
}
.text-red {
    color: var(--color-red) !important;
}

.text-gray {
    color: var(--color-gray-7) !important;
}
.text-light-gray {
    color: var(--color-gray-5) !important;
}


/* Grayscale Colors */
.text-white {
    color: var(--color-white) !important;
}
.text-gray-0 {
    color: var(--color-gray-0) !important;
}
.text-gray-1 {
    color: var(--color-gray-1) !important;
}
.text-gray-2 {
    color: var(--color-gray-2) !important;
}
.text-gray-3 {
    color: var(--color-gray-3) !important;
}
.text-gray-4 {
    color: var(--color-gray-4) !important;
}
.text-gray-5 {
    color: var(--color-gray-5) !important;
}
.text-gray-6 {
    color: var(--color-gray-6) !important;
}
.text-gray-7 {
    color: var(--color-gray-7) !important;
}
.text-gray-8 {
    color: var(--color-gray-8) !important;
}
.text-gray-9 {
    color: var(--color-gray-9) !important;
}
.text-black {
    color: var(--color-black) !important;
}