.modal-title-lg {
  font-size: 25px !important;
}



.scroll-sm::-webkit-scrollbar {
  width: 12px;
  /* Increase scrollbar width */
}

.scroll-sm::-webkit-scrollbar-track {
  background: #f1f1f1;
  /* Optional: light gray background */
  border-radius: 6px;
}

.scroll-sm::-webkit-scrollbar-thumb {
  background: #888;
  /* Scrollbar thumb color */
  border-radius: 6px;
}

.scroll-sm::-webkit-scrollbar-thumb:hover {
  background: #555;
  /* Darker on hover */
}


.scroll-sm {
  scrollbar-width: auto;
  scrollbar-color: #888 #f1f1f1;
}


/* Width of scrollbar */
::-webkit-scrollbar {
  width: 5px !important;
  height: 5px !important;
}


/* Scroll thumb */
::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 10px;
}


::placeholder {
  color: #dadfe4;
  /* Light gray, adjust as needed */
  opacity: 1;
  /* Ensures the color shows correctly */
}

.background-gray-100 {
  background-color: #f1f1f1;
  color: #888;
}

button {
  position: relative;
}

.tooltip-text {
  visibility: hidden;
  width: 80px;
  background-color: gray;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px 0;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  /* Position the tooltip above the button */
  left: 50%;
  margin-left: -30px;
  /* Use half of the width (60px) to center the tooltip */
  opacity: 0;
  transition: opacity 0.3s;
}

button:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* ================================
   ProTrade compact theme overrides
   (Loaded after style.css)
   ================================ */

:root {
  /* Compact typography & spacing */
  --app-font-size: 0.875rem;
  /* 14px */
  --app-line-height: 1.45;
  --app-radius: 10px;
  --app-radius-lg: 12px;
  --app-gap: 0.5rem;
  --app-gap-lg: 0.75rem;
  --app-control-height: 36px;

  /* Surfaces (light) – keep clean + readable */
  --app-surface-0: #f8fafc;
  --app-surface-1: #ffffff;
  --app-surface-2: #f1f5f9;
  --app-border: rgba(148, 163, 184, 0.45);

  /* Sidebar – ProTrade reference (dark rail in both themes) */
  --app-sidebar-bg: #0a1931;
  --app-sidebar-border: rgba(255, 255, 255, 0.06);
  --app-sidebar-separator: rgba(255, 255, 255, 0.1);
  --app-sidebar-text: #ffffff;
  --app-sidebar-text-muted: rgba(255, 255, 255, 0.68);
  --app-sidebar-active-bg: #2563eb;
  --app-sidebar-expanded-bg: #3b82f6;
}

/* Dark mode palette closer to screenshot */
html[data-theme="dark"] {
  --bg-color: #0b1220;
  --white: #0f172a;
  --black: #e2e8f0;
  --text-primary-light: #e5e7eb;
  --text-secondary-light: rgba(226, 232, 240, 0.72);
  --border-color: rgba(148, 163, 184, 0.22);
  --input-bg: #111b2e;
  --input-stroke: rgba(148, 163, 184, 0.28);

  --app-surface-0: #0b1220;
  --app-surface-1: #0f172a;
  --app-surface-2: #111b2e;
  --app-border: rgba(148, 163, 184, 0.22);

  --app-sidebar-bg: #0a1931;
  --app-sidebar-border: rgba(255, 255, 255, 0.06);
  --app-sidebar-separator: rgba(255, 255, 255, 0.1);
  --app-sidebar-text: #ffffff;
  --app-sidebar-text-muted: rgba(255, 255, 255, 0.68);
  --app-sidebar-active-bg: #2563eb;
  --app-sidebar-expanded-bg: #3b82f6;
}

body {
  font-size: var(--app-font-size);
  line-height: var(--app-line-height);
}

/* Bootstrap 5 variables (applies broadly) */
body {
  --bs-body-font-size: var(--app-font-size);
  --bs-body-line-height: var(--app-line-height);
  --bs-border-radius: var(--app-radius);
  --bs-border-radius-lg: var(--app-radius-lg);
  --bs-border-color: var(--border-color);
}

/* Make general paddings more compact */
.dashboard-main-body {
  padding: 0.75rem !important;
  width: 100%;
  max-width: 100%;
}

/* Responsive header/layout spacing */
@media (max-width: 991.98px) {
  .navbar-header {
    height: auto !important;
    min-height: 3.5rem;
    padding: 0.5rem 0.75rem !important;
  }

  .navbar-header .row {
    row-gap: 0.5rem;
  }

  .navbar-header .sidebar-toggle,
  .navbar-header .sidebar-mobile-toggle {
    line-height: 1;
  }

  .dashboard-main-body {
    padding: 0.75rem !important;
  }

  .d-footer {
    padding: 0.85rem 0.75rem !important;
  }
}

@media (max-width: 575.98px) {
  .navbar-header {
    padding: 0.45rem 0.6rem !important;
  }

  /* Keep header content in one line: hide long panel badge */
  .navbar-header .panel-badge {
    display: none !important;
  }

  .navbar-header .row {
    flex-wrap: nowrap;
  }

  .dashboard-main-body {
    padding: 0.65rem !important;
  }

  /* Breadcrumb/title row should wrap nicely on mobile */
  .dashboard-main-body .d-flex.flex-wrap.align-items-center.justify-content-between.gap-3.mb-24 {
    gap: 0.5rem !important;
    margin-bottom: 0.75rem !important;
  }

  .dashboard-main-body h6.fw-semibold.mb-0 {
    font-size: 0.95rem;
  }
}

@media (min-width: 992px) {
  .dashboard-main-body {
    padding: 1rem !important;
  }
}

/* Make inner content wrappers full width */
.dashboard-main-body>* {
  max-width: 100%;
}

.container--xl {
  max-width: 100% !important;
  width: 100% !important;
}

.card {
  max-width: 100%;
}

/* If any screen uses Bootstrap containers, let them fill available width */
.dashboard-main-body .container,
.dashboard-main-body .container-sm,
.dashboard-main-body .container-md,
.dashboard-main-body .container-lg,
.dashboard-main-body .container-xl,
.dashboard-main-body .container-xxl {
  max-width: none !important;
  width: 100% !important;
}

.dashboard-main-body .container-fluid {
  width: 100% !important;
}

/* Inputs / selects – compact height */
.form-control,
.form-select,
.btn {
  min-height: var(--app-control-height);
}

.form-control,
.form-select {
  background-color: var(--input-bg);
  border-color: var(--input-stroke);
  color: var(--text-primary-light);
}

html:not([data-theme="dark"]) .form-control,
html:not([data-theme="dark"]) .form-select {
  background-color: var(--app-surface-1);
  border-color: var(--app-border);
  color: #0f172a;
}

.form-select.form-select-sm,
.form-control.form-control-sm {
  height: 40px !important;
  padding-top: 0.42rem !important;
  padding-bottom: 0.42rem !important;
  line-height: 1.2 !important;
}

.form-select.form-select-sm {
  padding-left: 0.75rem !important;
  padding-right: 2rem !important;
  background-position: right 0.65rem center !important;
}

.form-control.form-control-sm {
  padding-left: 0.75rem !important;
  padding-right: 0.75rem !important;
}

.form-control:focus,
.form-select:focus {
  box-shadow: none !important;
  border-color: rgba(37, 99, 235, 0.55) !important;
}

/* Cards – align to surfaces */
.card,
.bg-base,
.bg-white {
  background-color: var(--app-surface-1) !important;
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .bg-base,
html[data-theme="dark"] .bg-white {
  background-color: var(--app-surface-1) !important;
}

/* Sidebar – layout, borders, typography (fixes template white edges + huge fonts) */
.sidebar {
  background-color: var(--app-sidebar-bg) !important;
  border-right: 1px solid var(--app-sidebar-border) !important;
}

/* Remove harsh light borders from style.css (.sidebar-logo / .sidebar-menu-area use neutral-200) */
.sidebar .sidebar-logo {
  height: auto !important;
  min-height: 3.25rem;
  padding: 0.6rem 0.875rem !important;
  border-inline-end: none !important;
  border-block-end: 1px solid var(--app-sidebar-separator) !important;
}

.sidebar .sidebar-logo img {
  max-width: 200px !important;
  max-height: 52px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain;
}

.sidebar .sidebar-menu-area {
  border-inline-end: none !important;
  padding: 0.5rem 0.75rem 0.75rem !important;
  height: calc(100vh - 72px) !important;
}

.sidebar .sidebar-menu-area::-webkit-scrollbar {
  width: 5px;
  background: transparent;
}

.sidebar .sidebar-menu-area::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

.sidebar,
.sidebar a,
.sidebar .sidebar-menu li a,
.sidebar .sidebar-menu li button {
  color: var(--app-sidebar-text) !important;
}

.sidebar .sidebar-menu li a span,
.sidebar .sidebar-menu li.dropdown>a::after,
.sidebar .sidebar-menu li a .menu-icon {
  color: inherit !important;
}

/* Space between top-level items (e.g. Watchlist ↔ Trading Management) */
.sidebar .sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar .sidebar-menu>li {
  margin: 0;
}

/* Readable type + spacing – ignore 1650px template bump */
.sidebar .sidebar-menu li a {
  font-size: 0.875rem !important;
  line-height: 1.45 !important;
  font-weight: 500 !important;
  padding: 0.5rem 0.75rem !important;
  border-radius: 8px !important;
  gap: 0.45rem;
  letter-spacing: 0.02em;
}

.sidebar .sidebar-menu li a span {
  letter-spacing: 0.025em;
}

@media (min-width: 1650px) {
  .sidebar .sidebar-menu li a {
    font-size: 0.875rem !important;
    padding: 0.5rem 0.75rem !important;
  }
}

.sidebar .sidebar-menu li a .menu-icon {
  font-size: 1rem !important;
  width: 1.2rem !important;
  height: 1.2rem !important;
  margin-inline-end: 0.55rem !important;
  flex-shrink: 0;
}

@media (min-width: 1650px) {
  .sidebar .sidebar-menu li a .menu-icon {
    font-size: 1.05rem !important;
    margin-inline-end: 0.55rem !important;
  }
}

.sidebar .sidebar-menu li.dropdown>a::after {
  font-size: 0.95rem !important;
  inset-inline-end: 0.55rem !important;
  opacity: 0.85;
}

@media (min-width: 1650px) {
  .sidebar .sidebar-menu li.dropdown>a::after {
    font-size: 0.95rem !important;
  }
}

.sidebar .sidebar-menu li>a:hover {
  background-color: rgba(255, 255, 255, 0.06) !important;
  color: #fff !important;
}

.sidebar .sidebar-menu li>a.active-page:hover {
  background-color: var(--app-sidebar-active-bg) !important;
  color: #fff !important;
}

.sidebar .sidebar-menu li.dropdown.open>a:hover,
.sidebar .sidebar-menu li.dropdown.dropdown-open>a:hover {
  background-color: var(--app-sidebar-expanded-bg) !important;
  color: #fff !important;
}

.sidebar .sidebar-menu li>a.active-page {
  background-color: var(--app-sidebar-active-bg) !important;
  color: #fff !important;
  font-weight: 600 !important;
}

.sidebar .sidebar-menu li>a.active-page:hover {
  color: #fff !important;
}

/* Expanded section parent – lighter blue than single active link */
.sidebar .sidebar-menu li.dropdown.open>a,
.sidebar .sidebar-menu li.dropdown.dropdown-open>a {
  background-color: var(--app-sidebar-expanded-bg) !important;
  color: #fff !important;
  font-weight: 600 !important;
}

.sidebar .sidebar-menu li.dropdown.open>a:hover,
.sidebar .sidebar-menu li.dropdown.dropdown-open>a:hover {
  color: #fff !important;
}

.sidebar .sidebar-menu .sidebar-submenu {
  padding-block-start: 0.35rem !important;
  padding-inline-start: 1.1rem !important;
  margin: 0.2rem 0 0 !important;
}

@media (min-width: 1650px) {
  .sidebar .sidebar-menu .sidebar-submenu {
    padding-inline-start: 1.1rem !important;
  }
}

.sidebar .sidebar-menu .sidebar-submenu li a {
  font-size: 0.8125rem !important;
  padding: 0.4rem 0.55rem !important;
  border-radius: 6px !important;
  color: var(--app-sidebar-text-muted) !important;
  letter-spacing: 0.02em;
  line-height: 1.4 !important;
}

.sidebar .sidebar-menu .sidebar-submenu li a .menu-icon {
  font-size: 0.9rem !important;
}

.sidebar .sidebar-menu .sidebar-submenu li a:hover {
  background-color: rgba(255, 255, 255, 0.05) !important;
  color: #fff !important;
}

.sidebar .sidebar-menu .sidebar-submenu li.active-page a {
  background-color: transparent !important;
  color: #fff !important;
  font-weight: 700 !important;
}

/* Tables (Bootstrap/DataTables) – consistent in light/dark */
.table {
  color: var(--text-primary-light);
  font-size: 0.8125rem;
}

html:not([data-theme="dark"]) .table {
  color: #0f172a;
}

.table> :not(caption)>*>* {
  border-color: var(--border-color);
}

.table thead th {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary-light);
  background-color: var(--app-surface-2);
  padding-top: 0.55rem !important;
  padding-bottom: 0.55rem !important;
}

/* Compact table paddings across template tables */
.table> :not(caption)>*>* {
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}

.basic-table thead th,
.basic-table tbody td,
.bordered-table thead tr th,
.bordered-table tbody tr td,
.striped-table thead tr th,
.striped-table tbody tr td {
  font-size: 0.8125rem !important;
  padding: 10px 12px !important;
}

.bordered-table thead tr th,
.basic-table thead th {
  font-size: 0.75rem !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* DataTables (jQuery) – fix white table in dark mode */
html[data-theme="dark"] .dataTables_wrapper,
html[data-theme="dark"] div.dt-container,
html[data-theme="dark"] div.dt-container .dt-layout-row div,
html[data-theme="dark"] div.dt-container .dt-layout-row label {
  color: rgba(226, 232, 240, 0.8) !important;
}

html[data-theme="dark"] table.dataTable {
  color: #e5e7eb !important;
  background-color: transparent !important;
}

html[data-theme="dark"] table.dataTable thead th,
html[data-theme="dark"] table.dataTable thead td {
  background-color: rgba(17, 27, 46, 0.65) !important;
  color: #94a3b8 !important;
  border-bottom-color: rgba(148, 163, 184, 0.18) !important;
}

html[data-theme="dark"] table.dataTable tbody td,
html[data-theme="dark"] table.dataTable tbody th {
  background-color: transparent !important;
  color: rgba(226, 232, 240, 0.82) !important;
  border-top-color: rgba(148, 163, 184, 0.12) !important;
}

html[data-theme="dark"] table.dataTable tbody tr {
  background-color: transparent !important;
}

html[data-theme="dark"] table.dataTable tbody tr:hover>* {
  background-color: rgba(37, 99, 235, 0.08) !important;
}

html[data-theme="dark"] .dataTables_filter input,
html[data-theme="dark"] .dataTables_wrapper .dataTables_filter input,
html[data-theme="dark"] div.dt-container input,
html[data-theme="dark"] div.dt-container select {
  background-color: var(--input-bg) !important;
  color: var(--text-primary-light) !important;
  border: 1px solid rgba(148, 163, 184, 0.28) !important;
}

html[data-theme="dark"] div.dt-container .dt-paging .dt-paging-button:not(.first, .previous, .next, .last) {
  background: rgba(148, 163, 184, 0.15) !important;
  color: rgba(226, 232, 240, 0.8) !important;
}

/* Bootstrap utility background tokens used in tables (fix light rows in dark mode) */
html[data-theme="dark"] .bg-neutral-100 {
  background-color: rgba(17, 27, 46, 0.65) !important;
}

html[data-theme="dark"] .bg-neutral-200 {
  background-color: rgba(148, 163, 184, 0.16) !important;
}

html[data-theme="dark"] .bg-primary-50 {
  background-color: rgba(37, 99, 235, 0.10) !important;
}

html[data-theme="dark"] .bg-danger-50 {
  background-color: rgba(239, 68, 68, 0.10) !important;
}

html[data-theme="dark"] .bg-success-focus {
  background-color: rgba(34, 197, 94, 0.14) !important;
}

html[data-theme="dark"] .bg-info-focus {
  background-color: rgba(59, 130, 246, 0.14) !important;
}

/* Ensure table cells don't stay white in dark mode */
html[data-theme="dark"] .table> :not(caption)>*>* {
  background-color: transparent !important;
  color: rgba(226, 232, 240, 0.82) !important;
}

html[data-theme="dark"] .table thead th {
  color: #94a3b8 !important;
}


html:not([data-theme="dark"]) .table thead th {
  color: #64748b !important;
}

html[data-theme="dark"] .table thead th {
  background-color: rgba(17, 27, 46, 0.85);
  color: #94a3b8 !important;
}

/* Global text contrast (many screens use Bootstrap utilities) */
html:not([data-theme="dark"]) .text-secondary {
  color: #64748b !important;
}

html[data-theme="dark"] .text-black,
html[data-theme="dark"] .text-dark {
  color: var(--text-primary-light) !important;
}

html[data-theme="dark"] .dropdown-item.text-black {
  color: var(--text-primary-light) !important;
}

/* =========================
   Modal sizing & compact UI
   ========================= */
.modal-content {
  border-radius: var(--app-radius-lg) !important;
  border: 1px solid var(--border-color) !important;
}

.modal-title-lg {
  font-size: 1.05rem !important;
}

.modal-title,
.modal-header .modal-title,
.modal-header h1,
.modal-header h2,
.modal-header h3,
.modal-header h4,
.modal-header h5,
.modal-header h6 {
  font-size: 1.05rem !important;
  line-height: 1.25 !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em;
  margin: 0;
}

.modal-header {
  gap: 0.75rem;
  align-items: center;
}

.modal-header .btn-close {
  margin-inline-start: auto !important;
  margin-inline-end: 0 !important;
  margin-block: 0 !important;
  padding: 0.5rem !important;
  opacity: 0.8;
}

.modal-header .btn-close:hover {
  opacity: 1;
}

.modal-header,
.modal-footer {
  padding: 0.75rem 1rem !important;
}

.modal-body {
  padding: 0.9rem 1rem !important;
}

.modal-body .form-label {
  font-size: 0.8125rem !important;
  margin-bottom: 0.35rem !important;
}

.modal-body .form-control,
.modal-body .form-select,
.modal-body textarea {
  min-height: 38px;
}

/* Select spacing (all screens) */
.form-select {
  min-height: 38px;
  padding-top: 0.45rem !important;
  padding-bottom: 0.45rem !important;
  padding-left: 0.75rem !important;
  padding-right: 2.1rem !important;
  line-height: 1.25 !important;
  background-position: right 0.7rem center !important;
}

html[data-theme="dark"] .form-select {
  background-color: var(--input-bg) !important;
  border-color: rgba(148, 163, 184, 0.28) !important;
  color: var(--text-primary-light) !important;
}

html:not([data-theme="dark"]) .form-select {
  background-color: var(--app-surface-1) !important;
  border-color: var(--app-border) !important;
  color: #0f172a !important;
}

/* Action icon buttons – make icons slightly larger */
.w-40-px.h-40-px .icon,
.w-40-px.h-40-px .menu-icon,
.rounded-circle.w-40-px.h-40-px .icon,
.rounded-circle.w-40-px.h-40-px .menu-icon,
.ledger-action-btn.w-40-px.h-40-px .icon,
.ledger-action-btn.w-40-px.h-40-px .menu-icon {
  font-size: 1.2rem !important;
  width: 1.2rem !important;
  height: 1.2rem !important;
}

/* If Icon components render as svg without font-size, ensure svg scales */
.w-40-px.h-40-px svg,
.ledger-action-btn.w-40-px.h-40-px svg {
  width: 1.2rem !important;
  height: 1.2rem !important;
}

.modal-footer {
  gap: 0.5rem;
}

.modal-footer .btn {
  padding: 0.45rem 0.85rem !important;
  font-size: 0.875rem !important;
}

/* Reduce default dialog width a bit and prevent "too wide" modals */
.modal-dialog {
  --bs-modal-margin: 0.75rem;
}

.modal-dialog.modal-lg {
  max-width: 760px !important;
}

.modal-dialog.modal-xl {
  max-width: 980px !important;
}

.modal-dialog.modal-dialog-scrollable .modal-body {
  max-height: calc(100vh - 180px);
}

/* Theme toggle button – use existing style.css toggle visuals */
[data-theme-toggle] {
  background: transparent !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-primary-light) !important;
}

/* =========================
   SweetAlert2 (Swal.fire)
   ========================= */
/* Light mode defaults (keep clean) */
html:not([data-theme="dark"]) .swal2-popup {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid rgba(148, 163, 184, 0.35) !important;
  border-radius: 14px !important;
}

html:not([data-theme="dark"]) .swal2-title {
  color: #0f172a !important;
}

html:not([data-theme="dark"]) .swal2-html-container {
  color: #475569 !important;
}

/* Dark mode */
html[data-theme="dark"] .swal2-popup {
  background: #0f172a !important;
  color: #e5e7eb !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  border-radius: 14px !important;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.55) !important;
}

html[data-theme="dark"] .swal2-title {
  color: #f1f5f9 !important;
}

html[data-theme="dark"] .swal2-html-container {
  color: rgba(226, 232, 240, 0.78) !important;
}

/* Icon ring */
html[data-theme="dark"] .swal2-icon.swal2-question,
html[data-theme="dark"] .swal2-icon.swal2-info,
html[data-theme="dark"] .swal2-icon.swal2-warning {
  border-color: rgba(148, 163, 184, 0.55) !important;
  color: #93c5fd !important;
}

/* Buttons – compact + consistent */
.swal2-actions {
  gap: 0.5rem !important;
}

.swal2-styled {
  font-weight: 700 !important;
  border-radius: 10px !important;
  padding: 0.5rem 0.9rem !important;
  line-height: 1.1 !important;
}

html[data-theme="dark"] .swal2-styled.swal2-cancel {
  background: rgba(148, 163, 184, 0.16) !important;
  color: rgba(226, 232, 240, 0.9) !important;
}

html[data-theme="dark"] .swal2-styled.swal2-cancel:hover {
  background: rgba(148, 163, 184, 0.22) !important;
}