/* ==========================================================================
   THEME TOKENS
   Bootstrap 5.3 color modes: data-bs-theme="light" | "dark" on <html>.
   Every custom color below is a variable so switching the attribute
   re-colors the whole dashboard without touching component rules.
   ========================================================================== */

:root, [data-bs-theme="light"] {
  --default-font: "Roboto", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --heading-font: "Raleway", sans-serif;
  --nav-font: "Poppins", sans-serif;

  --background-color: #F4F6FB;
  --default-color: #323b3b;
  --accent-color: #E65C00;
  --alt-accent: #ECEFFD;
  --border-color: #cb9dff;
  --shadow-color: rgba(15, 23, 42, 0.08);

  --light-color: #ffffff;
  --alt-light: #ECEFFD;
  --dark-color: #092f5b;   /* primary text/icon token — flips to a light value in dark mode */
  --alt-dark: #131a22;     /* secondary text/icon token */
  --brand-alt: #E65C00;
  --brand: #ECEFFD;

  --line: #e5e7eb;
  --muted: #6b7280;
  --muted-color: #6b7280;
  --heading-color: #0f172a;
  --ok: #16a34a;
  --bad: #dc2626;
  --success-color: #16a34a;
  --warning-color: #facc15;

  --gain-bg: #eaf7ef;
  --gain-br: #cbead5;
  --gain-text: #0f5132;
  --loss-bg: #fdecec;
  --loss-br: #f5c2c7;
  --loss-text: #842029;

  --surface: #f8fafc;
  --surface-2: #f1f5f9;
  --card-border: #dee2e6;

  --radius: 14px;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06);

  --green-gradient: linear-gradient(90deg, #111827 0, #054d26 100%);
}

[data-bs-theme="dark"] {
  --background-color: #070D1A;
  --default-color: #C9D1E0;
  --accent-color: #9D6BFF;
  --alt-accent: #1B1436;
  --border-color: #3A2E63;
  --shadow-color: rgba(0, 0, 0, 0.55);

  --light-color: #0B1220;
  --alt-light: #131A2E;
  --dark-color: #E9ECF5;   /* flipped: light text/icons on dark surfaces */
  --alt-dark: #C3C9D9;
  --brand-alt: #9D6BFF;
  --brand: #1B1436;

  --line: #1E2438;
  --muted: #8B96AD;
  --muted-color: #8B96AD;
  --heading-color: #F5F7FF;
  --ok: #22c55e;
  --bad: #f87171;
  --success-color: #22c55e;
  --warning-color: #facc15;

  --gain-bg: rgba(34, 197, 94, 0.12);
  --gain-br: rgba(34, 197, 94, 0.35);
  --gain-text: #4ADE80;
  --loss-bg: rgba(248, 113, 113, 0.12);
  --loss-br: rgba(248, 113, 113, 0.35);
  --loss-text: #F87171;

  --surface: #0F1C33;
  --surface-2: #101A30;
  --card-border: #1E2438;

  --shadow: 0 4px 14px rgba(0, 0, 0, 0.45);

  --green-gradient: linear-gradient(90deg, #0B1220 0, #063d1f 100%);
}

html {
  transition: background-color 0.25s ease, color 0.25s ease;
}

body {
  margin: 0;
  padding: 0;
  top: 0 !important;
  font-family: 'Poppins', sans-serif;
  background-color: var(--background-color);
  color: var(--default-color);
  transition: background-color 0.25s ease, color 0.25s ease;
}

a {
  transition: all 0.4s ease;
  font-weight: 500;
  text-decoration: none;
  color: var(--dark-color);
}

a:hover {
  color: var(--accent-color);
}

.bg-brand {
  background-color: var(--brand);
}

.text-justify {
  text-align: justify;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--heading-color);
}

.navbar-brand .dot {
  color: var(--accent-color);
}
.logo {
  height: 40px;
}
.btn-outline-secondary.btn-sm {
  font-weight: 500;
  border-radius: 20px;
  padding: 4px 12px;
}

@media (max-width: 991px) {
  .brand-name {
    display: none !important;
  }
  .navbar-collapse {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--surface);
    box-shadow: 0 4px 6px var(--shadow-color);
    z-index: 1050;
    display: none;
  }
  .navbar-collapse.show {
    display: block;
  }
}

.social-icons a {
  width: 28px;
  height: 28px;
  display: inline-flex;
  color: #fff;
  background-color: rgba(255, 255, 255, 0.25);
  text-decoration: none;
  align-items: center;
  justify-content: center;
  border-radius: 100px;
}

.profile-header {
  background: linear-gradient(to right, #00c6ff, #0072ff);
  border-radius: 15px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.profile-img {
  width: 100px;
  height: 100px;
  background-color: #ffffff;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.status-badge {
  background-color: #ffc107;
  color: #000;
  font-weight: bold;
  padding: 5px 10px;
  border-radius: 10px;
}
.course-card {
  background-color: var(--accent-color);
  padding: 35px;
  border-radius: 20px;
  border: none;
  color: #fff;
}
.btn-purple {
  background-color: var(--alt-accent);
  color: #ffff;
  border: none;
}
@media (max-width: 991.98px) {
  .course-card {
    padding: 5px;
  }
  .video-iframe {
    height: 260px;
  }
  .img-iframe {
    height: auto;
    margin-bottom: 20px;
  }
}
.card{
	background-color: var(--surface);
}
.table>:not(caption)>*>* {
	background-color: var(--surface);
}
.nav-tabs .nav-item.show .nav-link, .nav-tabs .nav-link.active {
	background-color: var(--surface-2);
}
.form-select:disabled {
	background-color: #fff;
}
/* ==========================================================================
   HEADER
   ========================================================================== */

.header {
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 1001;
  height: 60px;
  color: #f7f7fa;
}
.header .header-left {
  float: left;
  height: 60px;
  padding: 0 20px;
  position: relative;
  width: 320px;
  z-index: 1;
  transition: all 0.2s ease-in-out;
  background-color: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  align-items: center;
}
.mini-sidebar .header .header-left {
  justify-content: center;
}
.header .header-left .logo {
  display: inline-block;
  line-height: 60px;
}
.header .header-left .logo img {
  max-height: 40px;
  width: auto;
}
.header-left .logo.logo-small {
  display: none;
}
.header .dropdown-menu > li > a {
  position: relative;
}
.header .dropdown-toggle:after {
  display: none;
}
.mobile_btn {
  display: none;
  float: left;
}
.slide-nav .sidebar {
  margin-left: 0;
}

.navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.navbar .nav-link {
  color: var(--accent-color);
  font-weight: 500;
}
.navbar .nav-link.active {
  color: var(--accent-color);
}
.navbar .nav-link:hover {
  color: var(--accent-color);
}

#toggle_btn,
#mobile_btn {
  color: var(--dark-color);
  font-size: 22px;
  transition: color 0.2s ease;
}
#toggle_btn:hover,
#mobile_btn:hover {
  color: var(--accent-color);
}

/* Theme toggle switch */
.theme-toggle-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--accent-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.theme-toggle-btn:hover {
  border-color: var(--accent-color);
  transform: translateY(-1px);
}
.theme-toggle-btn:active {
  transform: scale(0.94);
}
.theme-toggle-btn .theme-icon-dark {
  display: none;
}
[data-bs-theme="dark"] .theme-toggle-btn .theme-icon-light {
  display: none;
}
[data-bs-theme="dark"] .theme-toggle-btn .theme-icon-dark {
  display: inline-block;
}


/* ==========================================================================
   SIDEBAR
   ========================================================================== */

.menu-title {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
  padding: 0 25px;
}
.sidebar-overlay {
  background-color: rgba(0, 0, 0, 0.6);
  display: none;
  height: 100%;
  left: 0;
  position: fixed;
  top: 60px;
  width: 100%;
  z-index: 1000;
}
.sidebar-overlay.opened {
  display: block;
}
html.menu-opened {
  overflow: hidden;
}
html.menu-opened body {
  overflow: hidden;
}

.sidebar {
  background-color: var(--surface);
  border-right: 1px solid var(--line);
  bottom: 0;
  left: 0;
  margin-top: 0;
  position: fixed;
  top: 60px;
  transition: all 0.2s ease-in-out 0s, background-color 0.25s ease, border-color 0.25s ease;
  width: 320px;
  z-index: 1001;
}
.sidebar.opened {
  transition: all 0.4s ease;
}
.sidebar-inner {
  height: 100%;
  min-height: 100%;
  transition: all 0.2s ease-in-out 0s;
}

.kpi-toggle .btn {
  color: var(--dark-color);
  background-color: var(--alt-accent);
  border-color: var(--brand);
}
.kpi-toggle .btn:hover {
  color: var(--dark-color);
}
.kpi-toggle .btn-check:checked + .btn {
  background-color: var(--accent-color);
  color: #fff;
  border-color: var(--accent-color);
}
.kpi-toggle .btn:focus {
  box-shadow: 0 0 0 0.15rem rgba(131, 71, 229, 0.25);
}
.kpi-toggle label.btn {
  color: var(--dark-color) !important;
  background-color: var(--alt-accent) !important;
  border-color: var(--alt-accent) !important;
}
.kpi-toggle input.btn-check + label.btn {
  color: var(--dark-color) !important;
}
.kpi-toggle input.btn-check:checked + label.btn {
  background-color: var(--accent-color) !important;
  color: #fff !important;
  border-color: var(--accent-color) !important;
}

.sidebar-menu {
  padding: 16px 12px;
}
.sidebar-menu ul {
  font-size: 15px;
  list-style-type: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.sidebar-menu li a {
  color: var(--dark-color);
  display: block;
  font-size: 15px;
  font-weight: 500;
  height: auto;
  padding: 0 20px;
  border-radius: 10px;
}
.sidebar-menu > ul > li > a {
  align-items: center;
  display: flex;
  justify-content: flex-start;
  gap: 12px;
  padding: 11px 15px;
  position: relative;
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease;
}
.sidebar-menu > ul > li > a:hover {
  background-color: var(--alt-accent);
  color: var(--accent-color);
}
.sidebar-menu li.active > a {
  background: linear-gradient(135deg, var(--accent-color), var(--brand-alt));
  color: #fff;
  position: relative;
  box-shadow: 0 6px 16px rgba(131, 71, 229, 0.28);
}
.sidebar-menu li.active > a i {
  color: #fff;
}
.sidebar-menu li.active > a::before {
  display: none;
}

.sidebar-menu li.menu-title a {
  color: #ff9b44;
  display: inline-block;
  margin-left: auto;
  padding: 0;
}
.sidebar-menu li.menu-title a.btn {
  color: #fff;
  display: block;
  float: none;
  font-size: 15px;
  margin-bottom: 15px;
  padding: 10px 15px;
}
.sidebar-menu ul ul a.active {
  color: var(--accent-color);
}

.sidebar .sidebar-menu > ul > li > a span {
  transition: all 0.2s ease-in-out 0s;
  display: inline-block;
  white-space: nowrap;
}
.sidebar .sidebar-menu > ul > li > a span.chat-user {
  margin-left: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar .sidebar-menu > ul > li > a span.badge {
  margin-left: auto;
  font-weight: 600;
  font-size: 11px;
}
.sidebar-menu ul ul a {
  display: block;
  font-size: 14px;
  padding: 7px 10px 7px 45px;
  position: relative;
  color: var(--muted);
}
.sidebar-menu ul ul {
  display: none;
}
.sidebar-menu ul ul ul a {
  padding-left: 65px;
}
.sidebar-menu ul ul ul ul a {
  padding-left: 85px;
}
.sidebar-menu > ul > li {
  margin-bottom: 4px;
  position: relative;
}
.sidebar-menu > ul > li:last-child {
  margin-bottom: 0;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.sidebar-menu > ul > li:last-child > a {
  color: #ef4444;
}
.sidebar-menu > ul > li:last-child > a:hover {
  background-color: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.sidebar-menu .menu-arrow {
  transition: transform 0.15s;
  position: absolute;
  right: 15px;
  display: inline-block;
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  line-height: 18px;
  font-size: 16px;
  top: 14px;
  transform: translate(0, 0);
}
.sidebar-menu .menu-arrow:before {
  content: "\f105";
}
.sidebar-menu li a.subdrop .menu-arrow {
  transform: rotate(90deg);
}
.submenu ul li.sub-active {
  background-color: var(--alt-accent);
  border-radius: 8px;
}
.submenu ul li a:hover {
  background-color: var(--alt-accent);
  color: var(--accent-color) !important;
  border-radius: 8px;
}
.sidebar-menu ul ul a .menu-arrow {
  top: 10px;
}

.sidebar-menu ul li a i {
  display: inline-block;
  font-size: 17px;
  line-height: 24px;
  text-align: center;
  vertical-align: middle;
  width: 22px;
  color: inherit;
  transition: all 0.2s ease-in-out 0s;
}
.sidebar-menu ul li.menu-title a i {
  font-size: 16px !important;
  margin-right: 0;
  text-align: right;
  width: auto;
}

/* Slim scrollbar for the sidebar, both themes */
.sidebar-inner::-webkit-scrollbar {
  width: 6px;
}
.sidebar-inner::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 10px;
}
.sidebar-inner::-webkit-scrollbar-track {
  background: transparent;
}


/* ==========================================================================
   CONTENT AREA
   ========================================================================== */

.main-wrapper {
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  background-color: var(--background-color);
}
.page-wrapper {
  margin-left: 320px;
  padding-top: 60px;
  position: relative;
  transition: all 0.4s ease;
}
.page-wrapper > .content {
  padding: 1.875rem 1.875rem 0;
}
.page-header {
  margin-bottom: 1.875rem;
}

@media (min-width: 992px) {
  #toggle_btn {
    align-items: center;
    display: inline-flex;
    float: left;
    font-size: 26px;
    height: 60px;
    justify-content: center;
  }
  .mini-sidebar .header-left .logo img {
    height: auto;
    max-height: 40px;
    width: auto;
  }
  .mini-sidebar .header .header-left .logo {
    display: none;
  }
  .mini-sidebar .header-left .logo.logo-small {
    display: block;
  }
  .mini-sidebar .header .header-left {
    padding: 0 5px;
    width: 78px;
  }
  .mini-sidebar .sidebar {
    width: 78px;
  }
  .mini-sidebar.expand-menu .sidebar {
    width: 240px;
  }
  .mini-sidebar .menu-title {
    visibility: hidden;
    white-space: nowrap;
  }
  .mini-sidebar.expand-menu .menu-title {
    visibility: visible;
  }
  .mini-sidebar .menu-title a {
    visibility: hidden;
  }
  .mini-sidebar.expand-menu .menu-title a {
    visibility: visible;
  }
  .modal-open.mini-sidebar .sidebar {
    z-index: 1051;
  }
  .mini-sidebar .sidebar .sidebar-menu ul > li > a span {
    display: none;
    transition: all 0.2s ease-in-out;
    opacity: 0;
  }
  .mini-sidebar.expand-menu .sidebar .sidebar-menu ul > li > a span {
    display: inline;
    opacity: 1;
  }
  .mini-sidebar.expand-menu .sidebar .sidebar-menu > ul > li > a i {
    width: 20px;
  }
  .mini-sidebar .page-wrapper {
    margin-left: 78px;
  }
}
@media (max-width: 991.98px) {
  .header .header-left {
    position: absolute;
    width: 100%;
    padding: 0px 50px;
  }
  .mobile_btn {
    color: var(--accent-color) !important;
    cursor: pointer;
    display: block;
    font-size: 24px;
    height: 60px;
    left: 0;
    line-height: 60px;
    padding: 0 15px;
    position: absolute;
    text-align: center;
    top: 0;
    z-index: 10;
  }
  #toggle_btn {
    display: none;
  }
  .sidebar {
    margin-left: -225px;
    width: 225px;
    transition: all 0.4s ease;
    z-index: 1041;
    box-shadow: 4px 0 24px var(--shadow-color);
  }
  .page-wrapper {
    margin-left: 0;
    padding-left: 0;
    padding-right: 0;
    transition: all 0.4s ease;
  }
}


/* ==========================================================================
   DASHBOARD COMPONENTS
   ========================================================================== */

.account-card {
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 1.5rem;
  background-color: var(--surface);
}
.account-balance {
  font-size: 2rem;
  font-weight: 700;
  color: var(--heading-color);
}
.account-subtitle {
  font-size: 0.9rem;
  color: var(--muted);
}
.account-info-table {
  background-color: var(--surface-2);
  border-radius: 10px;
  padding: 1rem;
  margin-top: 1rem;
  font-size: 0.95rem;
}
.badge-demo {
  background-color: #d4edda;
  color: #155724;
  font-weight: 500;
}
.btn-yellow {
  background-color: #f8b400;
  color: #000;
  border: none;
}
.btn-yellow:hover {
  background-color: #e5a700;
}
.info-label {
  color: var(--muted);
}
.info-value {
  font-weight: 500;
  color: var(--heading-color);
}

.page-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.kpi-note {
  color: var(--muted);
}

.graph-card {
  position: relative;
}
.graph-pill {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  box-shadow: var(--shadow);
}
.graph-pill .btn {
  border-radius: 999px;
  font-weight: 600;
}
.graph-pill .btn.active {
  background: var(--accent-color);
  color: #fff;
  border-color: var(--accent-color);
}

.hint-card {
  background: var(--surface-2);
  border: 1px dashed var(--line);
  color: var(--muted);
  border-radius: var(--radius);
}

.tabs-underline .nav-link {
  color: var(--alt-dark);
  font-weight: 600;
}
.tabs-underline .nav-link.active {
  color: var(--accent-color);
  border: none;
  border-bottom: 2px solid var(--accent-color);
}

.rounded-16 {
  border-radius: var(--radius);
}

/* PnL Calendar */
.pnl-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin-bottom: 14px;
}
.pnl-title {
  font-weight: 600;
  color: var(--heading-color);
}
.pnl-weekhead,
.pnl-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}
.pnl-weekhead div {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}
.pnl-cell {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px 8px;
  text-align: center;
  background: var(--surface-2);
  color: var(--muted);
  word-wrap: break-word;
}
.pnl-cell.gain {
  background: var(--gain-bg);
  border-color: var(--gain-br);
  color: var(--gain-text);
}
.pnl-cell.loss {
  background: var(--loss-bg);
  border-color: var(--loss-br);
  color: var(--loss-text);
}
.pnl-cell.today {
  outline: 2px solid var(--ok);
  outline-offset: 0;
}
.pnl-value {
  font-weight: 600;
  font-size: 0.7rem;
}
.pnl-trades {
  font-size: 12px;
  opacity: 0.9;
}
.pnl-daynum {
  position: absolute;
  margin-bottom: 4px;
  top: 8px;
  right: 10px;
  font-size: 11px;
  color: var(--muted);
  opacity: 0.7;
}
.pnl-daynum.muted {
  opacity: 0.45;
}

@media (max-width: 576px) {
  .container-xxl {
    padding-left: 10px;
    padding-right: 10px;
  }
  .pnl-weekhead {
    gap: 6px;
  }
  .pnl-grid {
    gap: 6px;
  }
  .pnl-cell {
    padding: 8px 2px;
    border-radius: 8px;
  }
  .pnl-value {
    display: none;
  }
  .pnl-trades {
    font-size: 9px;
  }
  .pnl-daynum {
    font-size: 9px;
    top: 6px;
    margin-bottom: 6px;
    right: 6px;
  }
}

.text-orange {
  color: #ff8a3d !important;
}
.avatar-sm {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #c4b5fd;
  color: #1f2937;
  font-weight: 700;
}
.badge-pct {
  background: var(--gain-bg);
  border: 1px solid var(--gain-br);
  color: var(--gain-text);
  border-radius: 999px;
  padding: 2px 8px;
  font-weight: 600;
  font-size: 12px;
}


/* ==========================================================================
   NOTIFICATION POPUP (theme-aware)
   ========================================================================== */

#notif-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 11000;
}
#notif-modal {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 18px 45px var(--shadow-color);
  padding: 1.5rem 1.75rem 1.25rem;
  position: relative;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
#notif-title {
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  color: var(--heading-color);
}
#notif-message {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1rem;
}
#notif-close-x {
  position: absolute;
  top: 0.6rem;
  right: 0.7rem;
  border: none;
  background: transparent;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--muted);
}
#notif-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}
#notif-read-btn {
  border: none;
  background: var(--accent-color);
  color: #fff;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}
#notif-later-btn {
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 0.4rem 0.9rem;
  background: var(--surface-2);
  color: var(--default-color);
  font-size: 0.85rem;
  cursor: pointer;
}