:root {
  --primary-color: #4361EE;
  --primary-light: #4895EF;
  --primary-dark: #3F37C9;
  --secondary-color: #4CC9F0;
  --accent-color: #F72585;
  --success-color: #0ACF83;
  --warning-color: #FFBE0B;
  --danger-color: #F72585;
  --dark-color: #0b132b;
  --light-color: #f8f9fa;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-400: #ced4da;
  --gray-500: #adb5bd;
  --gray-600: #6c757d;
  --gray-700: #495057;
  --gray-800: #343a40;
  --gray-900: #212529;
  --sidebar-width: 280px;
  --sidebar-collapsed-width: 70px;
  --header-height: 60px;
  --border-radius: 10px;
  --card-box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  --transition-speed: 0.3s;
  --trader-bg: #0f1421;
  --trader-panel-bg: #171c2c;
  --trader-header-bg: #131829;
  --trader-sidebar-bg: #121726;
  --trader-accent: #3d5af1;
  --trader-accent-hover: #3651e2;
  --trader-border: #1e2642;
  --trader-text: #e2e4e9;
  --trader-text-muted: #8b92a5;
  --trader-green: #00c076;
  --trader-red: #ff3a33;
  --trader-yellow: #ffc107;
  --trader-card-bg: #1a2033;
  --trader-input-bg: #FFFFFF;
}

body {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: var(--gray-700);
  background-color: #f5f7ff;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* Dashboard Layout */
.dashboard-container {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: 100vh;
  position: relative;
  transition: all var(--transition-speed) ease;
}

.dashboard-container.sidebar-collapsed {
  grid-template-columns: var(--sidebar-collapsed-width) 1fr;
}

/* Sidebar */
.sidebar {
  background: linear-gradient(180deg, var(--dark-color) 0%, #1a202c 100%);
  color: white;
  height: 100vh;
  overflow-y: auto;
  position: sticky;
  top: 0;
  z-index: 999;
  transition: all var(--transition-speed) ease;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background-color: rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.brand-logo {
  color: white;
  font-weight: 700;
  font-size: 1.5rem;
  text-decoration: none;
  -webkit-text-fill-color: white;
  text-fill-color: white;
}

.sidebar-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 20px 0;
}

.user-profile {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.user-avatar {
  width: 50px;
  height: 50px;
  overflow: hidden;
  border-radius: 50%;
  border: 2px solid var(--primary-light);
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.user-info {
  margin-left: 15px;
}

.user-name {
  margin: 0;
  font-weight: 600;
  color: white !important;
  font-size: 0.95rem;
}

.user-role {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7) !important;
}

.nav-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-item {
  position: relative;
  margin: 5px 0;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  color: white !important;
  text-decoration: none;
  transition: all var(--transition-speed) ease;
  border-left: 3px solid transparent;
}

.nav-link i, .nav-link svg {
  min-width: 18px;
  margin-right: 10px;
  color: white !important;
}

.nav-link span {
  transition: all var(--transition-speed) ease;
}

.nav-link:hover {
  color: white;
  background-color: rgba(255, 255, 255, 0.1);
  border-left: 3px solid var(--primary-light);
}

.nav-link:hover i, .nav-link:hover svg {
  color: white;
}

.nav-link.active {
  color: white;
  background-color: rgba(67, 97, 238, 0.3);
  border-left: 3px solid var(--primary-color);
}

.nav-link.active i, .nav-link.active svg {
  color: white;
}

.sidebar-section {
  padding: 15px 20px;
  margin-top: 20px;
}

.section-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 15px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-section.mt-auto {
  margin-top: auto !important;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.text-danger {
  color: #dc3545 !important;
}

/* Highlight the logout button on hover */
.nav-link.text-danger:hover {
  background-color: rgba(220, 53, 69, 0.1);
  color: #ff6b6b !important;
}

/* Main Content */
.main-content {
  flex: 1;
  min-height: 100vh;
  padding: 0;
  transition: all var(--transition-speed) ease;
  position: relative;
  width: calc(100vw - var(--sidebar-width));
  max-width: 100%;
  overflow-x: hidden;
}

.dashboard-container.sidebar-collapsed .main-content {
  width: calc(100vw - var(--sidebar-collapsed-width));
}

/* Top Navbar */
.top-navbar {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  background-color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 990;
}

.navbar-left, .navbar-right {
  display: flex;
  align-items: center;
}

.btn-toggle-sidebar {
  background: none;
  border: none;
  color: var(--gray-600);
  cursor: pointer;
  margin-right: 20px;
}

.search-container {
  position: relative;
  display: flex;
  align-items: center;
}

.search-container i, .search-container svg {
  position: absolute;
  left: 15px;
  color: var(--gray-400);
}

.search-input {
  padding: 8px 15px 8px 45px;
  border: none;
  background-color: var(--gray-100);
  border-radius: 20px;
  min-width: 300px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--primary-light);
  background-color: white;
}

.navbar-notification {
  position: relative;
}

.btn-notification {
  background: none;
  border: none;
  color: #495057;
  padding: 0.5rem;
  border-radius: 50%;
  transition: background-color 0.2s;
  position: relative;
}

.btn-notification:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.notification-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: #dc3545;
  color: white;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.notification-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  width: 320px;
  background-color: #fff;
  border-radius: 4px;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  z-index: 1000;
  overflow: hidden;
}

.notification-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.btn-close-notification {
  background: none;
  border: none;
  color: #6c757d;
  cursor: pointer;
}

.notification-body {
  max-height: 350px;
  overflow-y: auto;
}

.notification-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: background-color 0.2s;
  position: relative;
  z-index: 100;
}

.notification-item:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.notification-item.unread {
  background-color: rgba(13, 110, 253, 0.05);
}

.notification-item .notification-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.notification-item .notification-description {
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.notification-item .notification-time {
  font-size: 0.75rem;
  color: #6c757d;
}

.notification-footer {
  padding: 0.75rem 1rem;
  text-align: center;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.view-all-link {
  color: #007bff;
  text-decoration: none;
  font-size: 0.875rem;
}

/* Task priority colors */
.priority-high {
  color: #dc3545;
}

.priority-medium {
  color: #ffc107;
}

.priority-low {
  color: #28a745;
}

.navbar-user .btn-user {
  background: none;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid var(--gray-200);
  padding: 0;
}

.navbar-user .btn-user img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dropdown-menu {
  border: none;
  border-radius: 10px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
  padding: 10px 0;
}

.dropdown-item {
  padding: 8px 15px;
  display: flex;
  align-items: center;
}

.dropdown-item i, .dropdown-item svg {
  margin-right: 10px;
  color: var(--gray-600);
}

.dropdown-item:hover {
  background-color: var(--gray-100);
}

/* Content Area */
.content {
  padding: 20px;
  width: 100%;
  box-sizing: border-box;
}

/* Cards */
.card {
  background-color: white;
  border-radius: var(--border-radius);
  border: none;
  box-shadow: var(--card-box-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-bottom: 25px;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.card-header {
  background-color: transparent;
  border-bottom: 1px solid var(--gray-200);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h5 {
  margin: 0;
  font-weight: 600;
  color: var(--gray-800);
}

.card-body {
  padding: 20px;
}

/* Buttons */
.btn {
  border-radius: 8px;
  font-weight: 500;
  padding: 8px 16px;
  transition: all 0.3s ease;
}

.btn-primary {
  background: linear-gradient(45deg, var(--primary-color), var(--primary-light));
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(45deg, var(--primary-dark), var(--primary-color));
  box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

.btn-success {
  background: linear-gradient(45deg, #0ACF83, #20E3B2);
  border: none;
}

.btn-success:hover {
  background: linear-gradient(45deg, #08B471, #0ACF83);
  box-shadow: 0 5px 15px rgba(10, 207, 131, 0.3);
}

.btn-danger {
  background: linear-gradient(45deg, #F72585, #FF5678);
  border: none;
}

.btn-danger:hover {
  background: linear-gradient(45deg, #E91E63, #F72585);
  box-shadow: 0 5px 15px rgba(247, 37, 133, 0.3);
}

.btn-rounded {
  border-radius: 50px;
}

.btn-floating {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Alerts */
.alert {
  border: none;
  border-radius: var(--border-radius);
  padding: 15px 20px;
}

.alert-success {
  background-color: rgba(10, 207, 131, 0.1);
  color: #08B471;
}

.alert-danger {
  background-color: rgba(247, 37, 133, 0.1);
  color: #E91E63;
}

.alert-warning {
  background-color: rgba(255, 190, 11, 0.1);
  color: #E09800;
}

.alert-info {
  background-color: rgba(76, 201, 240, 0.1);
  color: #3DACCE;
}

/* Forms */
.form-control {
  border-radius: 8px;
  padding: 10px 15px;
  border: 1px solid var(--gray-300);
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
}

.form-control.required {
  border-left: 3px solid var(--primary-color);
}

.form-label {
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--gray-700);
}

/* Tables */
.table {
  width: 100%;
  margin-bottom: 0;
}

.table th {
  font-weight: 600;
  color: var(--gray-700);
  border-top: none;
  border-bottom: 2px solid var(--gray-200);
  padding: 15px;
}

.table td {
  padding: 15px;
  vertical-align: middle;
  border-top: 1px solid var(--gray-200);
}

.table-hover tbody tr:hover {
  background-color: rgba(67, 97, 238, 0.05);
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(0, 0, 0, 0.01);
}

/* Kanban Board */
.kanban-container {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 20px;
}

.kanban-column {
  min-width: 300px;
  background-color: var(--gray-100);
  border-radius: var(--border-radius);
  padding: 15px;
}

.kanban-column-header {
  padding: 10px;
  margin-bottom: 15px;
  font-weight: 600;
  color: var(--gray-700);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kanban-column-header .count {
  background-color: var(--gray-200);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 0.8rem;
}

.kanban-card {
  background-color: white;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: all 0.3s ease;
}

.kanban-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.kanban-card-title {
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--gray-800);
}

/* Charts */
.chart-container {
  position: relative;
  height: 300px;
  margin: 20px 0;
}

/* Badges */
.badge {
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 20px;
}

.badge-primary {
  background-color: var(--primary-color);
  color: white;
}

.badge-success {
  background-color: var(--success-color);
  color: white;
}

.badge-warning {
  background-color: var(--warning-color);
  color: var(--gray-900);
}

.badge-danger {
  background-color: var(--danger-color);
  color: white;
}

/* Stats Cards */
.stats-card {
  background-color: white;
  border-radius: var(--border-radius);
  padding: 20px;
  display: flex;
  align-items: center;
  box-shadow: var(--card-box-shadow);
  transition: transform 0.3s ease;
}

.stats-card:hover {
  transform: translateY(-5px);
}

.stats-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 20px;
  font-size: 1.5rem;
}

.stats-icon.primary {
  background-color: rgba(67, 97, 238, 0.1);
  color: var(--primary-color);
}

.stats-icon.success {
  background-color: rgba(10, 207, 131, 0.1);
  color: var(--success-color);
}

.stats-icon.warning {
  background-color: rgba(255, 190, 11, 0.1);
  color: var(--warning-color);
}

.stats-icon.danger {
  background-color: rgba(247, 37, 133, 0.1);
  color: var(--danger-color);
}

.stats-info h3 {
  font-size: 1.5rem;
  margin: 0;
  font-weight: 700;
  color: var(--gray-800);
}

.stats-info p {
  color: var(--gray-600);
  margin: 0;
  font-size: 0.9rem;
}

.stats-progress {
  margin-top: 10px;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
}

.stats-progress .progress {
  height: 6px;
  width: 100px;
  margin-right: 10px;
  border-radius: 10px;
  background-color: var(--gray-200);
}

.stats-progress .progress-bar {
  border-radius: 10px;
}

/* Responsive */
@media (max-width: 992px) {
  .search-input {
    min-width: 200px;
  }
}

@media (max-width: 768px) {
  :root {
    --sidebar-width: 0;
  }
  
  .dashboard-container {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    position: fixed;
    width: 280px;
    left: -280px;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
  }
  
  .dashboard-container.sidebar-collapsed .sidebar {
    left: 0;
  }
  
  .search-input {
    min-width: 150px;
  }
  
  .page-content {
    padding: 20px;
  }
}

/* Animation Effects */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes slideInLeft {
  from { transform: translateX(-20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.slide-in-left {
  animation: slideInLeft 0.5s ease-in-out;
}

@keyframes slideInRight {
  from { transform: translateX(20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.slide-in-right {
  animation: slideInRight 0.5s ease-in-out;
}

/* Utilities */
.cursor-pointer {
  cursor: pointer;
}

/* Ajax indicator */
.ajax_indicator {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: transparent;
  z-index: 9999;
  transition: all 0.3s ease;
}

.ajax_indicator.processing {
  background-color: var(--primary-color);
  animation: progress-bar 1.5s infinite ease-in-out;
}

@keyframes progress-bar {
  0% { width: 0%; }
  50% { width: 50%; }
  100% { width: 100%; }
}

/* Custom Bootstrap Select */
.bootstrap-select .dropdown-toggle {
  background-color: white;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  padding: 10px 15px;
  color: var(--gray-700);
}

.bootstrap-select .dropdown-toggle:focus,
.bootstrap-select .dropdown-toggle:active {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
  outline: none !important;
}

.bootstrap-select .dropdown-menu {
  border: none;
  border-radius: 10px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
}

.bootstrap-select .dropdown-item.active,
.bootstrap-select .dropdown-item:active {
  background-color: var(--primary-color);
}

.feather {
  width: 16px;
  height: 16px;
  vertical-align: text-bottom;
}

/*
 * Sidebar
 */

.sidebar-sticky {
  position: relative;
  top: 0;
  height: calc(100vh - 48px);
  padding-top: .5rem;
  overflow-x: hidden;
  overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
}

@supports ((position: -webkit-sticky) or (position: sticky)) {
  .sidebar-sticky {
    position: -webkit-sticky;
    position: sticky;
  }
}

.sidebar-sticky .nav-link, 
.sidebar .nav-links .nav-link, 
.sidebar .nav-link {
  color: white !important;
  font-weight: 500;
}

.sidebar-sticky .nav-link span, 
.sidebar .nav-links .nav-link span, 
.sidebar .nav-link span {
  color: white !important;
}

.sidebar-sticky .nav-link svg, 
.sidebar .nav-links .nav-link svg, 
.sidebar .nav-link svg,
.sidebar-sticky .nav-link i, 
.sidebar .nav-links .nav-link i, 
.sidebar .nav-link i,
.sidebar-sticky .nav-link .feather, 
.sidebar .nav-links .nav-link .feather, 
.sidebar .nav-link .feather {
  color: white !important;
}

.sidebar-heading {
  font-size: .75rem;
  text-transform: uppercase;
}

/*
 * Content
 */

[role="main"] {
  padding-top: 133px; /* Space for fixed navbar */
}

@media (min-width: 768px) {
  [role="main"] {
    padding-top: 48px; /* Space for fixed navbar */
  }
}

/*
 * Navbar
 */

.navbar-brand {
  padding-top: .75rem;
  padding-bottom: .75rem;
  font-size: 1rem;
  background-color: rgba(0, 0, 0, .25);
  box-shadow: inset -1px 0 0 rgba(0, 0, 0, .25);
}

.navbar .form-control {
  padding: .75rem 1rem;
  border-width: 0;
  border-radius: 0;
}

.form-control-dark {
  color: #fff;
  background-color: rgba(255, 255, 255, .1);
  border-color: rgba(255, 255, 255, .1);
}

.form-control-dark:focus {
  border-color: transparent;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .25);
}

.invalid-feedback {
  font-size: 100% !important;
}

.user_profile_pic {
    padding: 20px 0;
    padding-bottom: 15px;
}

.user_profile_pic h4 {
    padding-top: 10px;
}

.form-check-inline.noborder .input-label-simple {
    border-width: 0;
    margin-left: 8px;
    width: 100px;
}

.label-simple.heading {
    font-size: 16px;
    font-weight: 500;
    padding-bottom: 8px;
    text-transform: uppercase;
    border-width: 0;
}

.label-simple.heading:focus {
    outline: 0;
    box-shadow: none;
    -moz-box-shadow: none;
    -webkit-box-shadow: none;
}

.form-control.required {
    border-left: 3px solid #dc3545;
}

.g_field .label {
   font-weight: 600;
   font-size: 13px;
   text-transform: uppercase;
}

.g_field .text {
    font-size: 16px;
    color: #656565;
}

.table.fixed-layout-table {
    table-layout: fixed;
}

.table td, .table th {
    word-wrap: break-word;
}

.form-control.is-invalid, .was-validated .form-control:invalid {
    font-size: 1rem;
    height: calc(1.3em + 1rem + 2px)
}

.kanban-container {
    display: flex;
    justify-content: flex-start;
    flex-wrap: nowrap;
    min-height: 550px;
    overflow-x: auto;
}

.kanban-container > .card.outer-card {
    border-top: 3px solid #e2e2e2;
    min-width: 18em;
    max-width: 18em;
    margin-right: 15px;
}

.kanban-container .card.outer-card:hover {
    border-top: 3px solid #007bff;
}

.kanban-container .card.inner-card {
    color: #616161;
}

.kanban-container .card.inner-card .card-title {
    display: flex;
    font-size: 16px;
    border-bottom: 1px solid #ccc;
}

.kanban-container .card.inner-card .card-title .text {
    flex: 1;
    color: #444;
    font-weight: 300;
    padding-bottom: 10px;
}

.kanban-container .card.inner-card:hover {
    box-shadow: 1px 6px 6px #e1e1e1;
    -moz-box-shadow: 1px 6px 6px #e1e1e1;
    -webkit-box-shadow: 1px 6px 6px #e1e1e1;
}

.card-text .price {
    font-size: 18px;
}

.kanban-container .card.inner-card {
    position: relative;
}

.kanban-container .card.inner-card > .card-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 100;
    background: #e1e1e1;
    border: 3px dashed #fff;
    border-radius: 3px;
    -moz-border-radius: 3px;
    -webkit-border-radius: 3px;
    display: none;
}

.kanban-container .card.inner-card .card-content {
    background: green;
    margin-bottom: 15px;
}

.card-actions {
    display: flex;
    margin-top: 20px;
    justify-content: center;
    align-items: center;
}

.card-actions .ca_item {
    flex: 1;
}

.ajax_indicator {
    position: fixed;
    display: none;
    top: 0;
    left: 50%;
    margin-left: -75px; /* negative half of width. */
    z-index: 10000;
    text-align: center;
    padding: 5px 15px 8px;
    width: 150px;
}

.ajax_indicator.processing {
    background-color: #FFFF00;
}

.ajax_indicator.done {
    background-color: green;
}

.icon-warning {
    color: red;
}

.reports-heading {
    font-weight: 400;
    font-size: 16px;
    margin-bottom: 10px;
}

.dd-sm .dropdown-item {
    font-size: 14px;
}

/* Dashboard specific styling */
.dashboard-header {
  padding-bottom: 25px;
  margin-bottom: 25px;
}

.dashboard-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 10px;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.dashboard-subtitle {
  color: var(--gray-600);
  font-size: 1.1rem;
  font-weight: 300;
}

/* Additional dashboard card styling */
.card {
  border-radius: var(--border-radius);
  border: none;
  box-shadow: var(--card-box-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: white;
  overflow: hidden;
}

/* Dashboard list group styling */
.list-group-item {
  padding: 15px 20px;
  border-left: none;
  border-right: none;
}

.list-group-item:first-child {
  border-top: none;
}

.list-group-item:last-child {
  border-bottom: none;
}

/* Form check styling for tasks */
.form-check-input {
  width: 1.2rem;
  height: 1.2rem;
  margin-top: 0.3rem;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid var(--gray-300);
}

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

.form-check-label h6 {
  color: var(--gray-800);
  transition: all 0.3s ease;
}

.form-check-input:checked + .form-check-label h6 {
  text-decoration: line-through;
  color: var(--gray-500);
}

/* Glass morphism effects for special cards */
.glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Animations for elements */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
}

/* Progress animations */
@keyframes progressAnimation {
  0% {
    width: 0%;
  }
}

.animated-progress .progress-bar {
  animation: progressAnimation 1.5s ease-in-out forwards;
}

/* Hover effects for action buttons */
.btn-action {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: var(--gray-100);
  color: var(--gray-700);
  transition: all 0.3s ease;
}

.btn-action:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

/* Dashboard chart container */
.chart-container {
  position: relative;
  margin: 0 auto;
  height: 300px;
}

/* Table styling improvements */
.table td .badge {
  font-weight: 500;
  padding: 6px 12px;
}

/* Stats card additional styling */
.stats-card {
  overflow: hidden;
  position: relative;
}

.stats-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to bottom right,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.05) 50%,
    transparent 50%,
    transparent 100%
  );
  transform: rotate(-45deg);
  pointer-events: none;
}

.sidebar .dropdown-toggle {
  color: white !important;
}

.sidebar .dropdown-menu {
  background-color: #1a202c;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar .dropdown-item {
  color: white;
}

.sidebar .dropdown-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
}

.sidebar .dropdown-item i, 
.sidebar .dropdown-item svg {
  color: rgba(255, 255, 255, 0.7);
}

.sidebar .dropdown-divider {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Improve table action buttons */
.btn-outline-secondary {
  border-color: #6c757d;
  color: #495057;
}

.btn-outline-secondary .feather {
  color: #495057;
}

.btn-outline-secondary:hover {
  background-color: #495057;
  color: white;
}

.btn-outline-secondary:hover .feather {
  color: white;
}

/* Trading view and instrument list */
.content-wrapper {
    /* display: flex; */ /* Moved to webtrader.html */
    /* flex: 1; */
    /* overflow: hidden; */
    /* height: calc(100vh - var(--header-height) - 20px); */
    /* position: relative; */
}

.instruments-list {
    width: 260px; /* Slightly adjust width */
    background-color: var(--dark-bg-primary);
    border-right: 1px solid var(--dark-border-color);
    overflow-y: auto;
    flex-shrink: 0; /* Prevent shrinking */
}

/* Chart Area (Middle Column) */
.chart-area {
    flex-grow: 1; /* Takes up remaining space */
    display: flex;
    flex-direction: column;
    height: 100%; /* Fill the content-wrapper height */
    overflow: hidden; /* Prevent internal scrolling */
    background-color: var(--dark-bg); /* Background for this column */
}

.chart-header {
    flex-shrink: 0; /* Prevent shrinking */
    /* styles already defined */
}

.chart-container {
    flex-grow: 1; /* Allow chart to fill space */
    position: relative;
    min-height: 300px; /* Minimum height for chart visibility */
}

/* Trades Section Styling (Below Chart) */
.trades-section {
    flex-shrink: 0; /* Prevent shrinking */
    overflow-y: auto; /* Allow scrolling within trades section */
    max-height: 40%; /* Limit height, adjust as needed */
    background-color: var(--dark-bg-primary);
    padding: 15px;
    border-top: 1px solid var(--dark-border-color);
}

.section-title {
    margin-bottom: 15px;
    font-size: 1.1rem; /* Adjust size */
    font-weight: 600;
    color: var(--light-text-primary);
}

.trades-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.trades-table th,
.trades-table td {
    padding: 8px 10px; /* Adjust padding */
    text-align: left;
    border-bottom: 1px solid var(--dark-border-color);
}

.trades-table th {
    color: var(--light-text-muted);
    font-weight: 500;
    position: sticky; /* Make headers sticky if needed */
    top: 0;
    background-color: var(--dark-bg-primary); /* Match background */
}

.trades-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.trades-table .badge {
    font-size: 0.75rem;
    padding: 4px 8px;
}

.trades-table .text-center {
     color: var(--light-text-muted);
}


/* Trading Panel (Right Column) */
.trading-panel-pro {
    width: 300px; /* Adjust width */
    background-color: var(--dark-bg-primary);
    border-left: 1px solid var(--dark-border-color);
    padding: 15px; /* Adjust padding */
    display: flex;
    flex-direction: column;
    height: 100%; /* Fill the content-wrapper height */
    overflow-y: auto; /* Allow scrolling if content overflows */
    flex-shrink: 0; /* Prevent shrinking */
}

.trade-header {
    text-align: center;
    font-size: 1.1rem; /* Adjust size */
    font-weight: bold;
    margin-bottom: 15px; /* Adjust margin */
    padding-bottom: 10px;
    border-bottom: 1px solid var(--dark-border-color);
}

/* ... (rest of the trading panel styles remain mostly the same, minor adjustments possible) ... */


/* Ensure the container holding the 3 columns uses flex */
.content-wrapper {
     display: flex;
}


/* Hide old panel */
.trading-panel {
    display: none;
}

/* Responsive adjustments - Simplified */
@media (max-width: 1200px) {
     .instruments-list { width: 220px; }
     .trading-panel-pro { width: 260px; }
}

@media (max-width: 992px) {
    .content-wrapper {
        flex-direction: column;
        height: auto; /* Allow content to determine height */
        overflow-y: auto; /* Allow scrolling for the whole wrapper */
    }
    .instruments-list,
    .trading-panel-pro {
        width: 100%;
        height: auto;
        max-height: none; /* Remove max-height */
        border-right: none;
        border-left: none;
        border-bottom: 1px solid var(--dark-border-color);
        overflow-y: visible; /* Disable internal scroll */
    }
    .chart-area {
         height: auto; /* Allow content to determine height */
         overflow: visible; /* Disable internal scroll */
    }
    .trades-section {
         max-height: none; /* Remove max-height */
         overflow-y: visible; /* Disable internal scroll */
    }
    .trading-panel-pro {
        order: 3; /* Move trade panel below chart/trades on small screens */
    }
}


/* Ensure main content fills remaining space */
.app-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow: hidden; /* Prevent double scrollbars */
}

/* Ensure content wrapper takes up space within app-content */
.app-content > .content-wrapper {
     flex-grow: 1;
     height: auto; /* Override fixed height */
}


/* Fix potential height issues */
/* MOVED TO webtrader.html TO AVOID AFFECTING OTHER PAGES */
/*
html, body, .app-container, .app-content {
    height: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

body {
   overflow: hidden; 
}

.app-container {
     flex-direction: row; 
}

.app-content {
    flex-grow: 1;
    height: 100vh; 
}
*/

/* Market Data Ticker Styles */
.market-data {
    background-color: var(--trader-header-bg);
    padding: 12px 0;
    overflow: hidden;
    white-space: nowrap;
    border-bottom: 1px solid var(--trader-border);
    position: relative;
}

.market-data::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100px;
    height: 100%;
    background: linear-gradient(90deg, var(--trader-header-bg), transparent);
    z-index: 2;
}

.market-data::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 100px;
    height: 100%;
    background: linear-gradient(270deg, var(--trader-header-bg), transparent);
    z-index: 2;
}

.market-data-wrapper {
    display: inline-block;
    animation: ticker 30s linear infinite;
    padding-left: 100%;
}

@keyframes ticker {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

.market-item {
    display: inline-flex;
    align-items: center;
    margin: 0 20px;
    padding: 5px 10px;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.05);
}

.market-item .symbol {
    font-weight: 600;
    margin-right: 8px;
}

.price-up {
    color: var(--trader-green);
    display: flex;
    align-items: center;
}

.price-up::after {
    content: '▲';
    font-size: 10px;
    margin-left: 4px;
}

.price-down {
    color: var(--trader-red);
    display: flex;
    align-items: center;
}

.price-down::after {
    content: '▼';
    font-size: 10px;
    margin-left: 4px;
}

/* Instruments List Enhancement */
.instruments-list {
    width: 280px;
    background-color: var(--trader-panel-bg);
    border-right: 1px solid var(--trader-border);
    overflow-y: auto;
}

.instruments-header {
    padding: 15px;
    background-color: var(--trader-header-bg);
    border-bottom: 1px solid var(--trader-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.instruments-header h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--trader-text);
}

.instruments-table {
    width: 100%;
}

.instruments-table th {
    position: sticky;
    top: 0;
    background-color: var(--trader-header-bg);
    color: var(--trader-text-muted);
    font-weight: 500;
    font-size: 0.8rem;
    padding: 10px 15px;
    text-align: left;
    border-bottom: 1px solid var(--trader-border);
}

.instruments-table td {
    padding: 12px 15px;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--trader-border);
}

.instruments-table tr {
    cursor: pointer;
    transition: background-color 0.2s;
}

.instruments-table tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.instruments-table tr.selected {
    background-color: rgba(61, 90, 241, 0.1);
    border-left: 3px solid var(--trader-accent);
}

/* Chart area enhancement */
.chart-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: var(--trader-bg);
    border-right: 1px solid var(--trader-border);
}

.chart-header {
    padding: 15px;
    background-color: var(--trader-header-bg);
    border-bottom: 1px solid var(--trader-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.timeframe-selector {
    display: flex;
    gap: 5px;
}

.timeframe-selector button {
    background-color: var(--trader-panel-bg);
    color: var(--trader-text-muted);
    border: 1px solid var(--trader-border);
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.timeframe-selector button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.timeframe-selector button.active {
    background-color: var(--trader-accent);
    color: white;
    border-color: var(--trader-accent);
}

.chart-container {
    flex: 1;
    overflow: hidden;
}

/* Trades section enhancement */
.trades-section {
    border-top: 1px solid var(--trader-border);
    background-color: var(--trader-panel-bg);
    max-height: 30%;
    overflow-y: auto;
}

.trades-header {
    padding: 12px 15px;
    background-color: var(--trader-header-bg);
    border-bottom: 1px solid var(--trader-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.trades-header h5 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
}

.trades-tabs {
    display: flex;
    gap: 2px;
}

.trades-tabs button {
    background: none;
    border: none;
    color: var(--trader-text-muted);
    padding: 5px 15px;
    font-size: 0.85rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.trades-tabs button.active {
    color: var(--trader-text);
    border-bottom: 2px solid var(--trader-accent);
}

.trades-table {
    width: 100%;
}

.trades-table th {
    position: sticky;
    top: 0;
    background-color: var(--trader-header-bg);
    color: var(--trader-text-muted);
    font-weight: 500;
    font-size: 0.8rem;
    padding: 10px 15px;
    text-align: left;
    border-bottom: 1px solid var(--trader-border);
}

.trades-table td {
    padding: 10px 15px;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--trader-border);
}

.trades-table tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Trading panel enhancement */
.trading-panel-pro {
    width: 320px;
    background-color: var(--trader-panel-bg);
    border-left: 1px solid var(--trader-border);
    overflow-y: auto;
}

.trade-header {
    padding: 15px;
    background-color: var(--trader-header-bg);
    border-bottom: 1px solid var(--trader-border);
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
}

.trade-form {
    padding: 15px;
}

.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.85rem;
    color: var(--trader-text-muted);
}

.form-control {
    width: 100%;
    background-color: var(--trader-input-bg);
    border: 1px solid var(--trader-border);
    color: var(--gray-800);
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--trader-accent);
    box-shadow: 0 0 0 2px rgba(61, 90, 241, 0.2);
}

.buy-sell-tabs {
    display: flex;
    margin-bottom: 15px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--trader-border);
}

.buy-sell-tabs button {
    flex: 1;
    background-color: var(--gray-100);
    color: var(--gray-800);
    border: none;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
}

.buy-sell-tabs button.buy.active {
    background-color: var(--trader-green);
    color: white;
}

.buy-sell-tabs button.sell.active {
    background-color: var(--trader-red);
    color: white;
}

.amount-container {
    position: relative;
}

.amount-container .form-control {
    padding-right: 50px;
}

.amount-container .currency {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--trader-text-muted);
}

.price-info {
    display: flex;
    margin-bottom: 15px;
    gap: 10px;
}

.price-info .price-box {
    flex: 1;
    padding: 10px;
    background-color: var(--gray-100);
    border-radius: 4px;
    border: 1px solid var(--gray-300);
}

.price-info .label {
    display: block;
    font-size: 0.7rem;
    color: var(--gray-600);
    margin-bottom: 5px;
}

.price-info .value {
    font-size: 1rem;
    font-weight: 600;
}

.price-info .bid {
    color: var(--trader-red);
}

.price-info .ask {
    color: var(--trader-green);
}

.btn-trade {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 10px;
}

.btn-trade.buy {
    background-color: var(--trader-green);
    color: white;
}

.btn-trade.buy:hover {
    background-color: #00a865;
}

.btn-trade.sell {
    background-color: var(--trader-red);
    color: white;
}

.btn-trade.sell:hover {
    background-color: #e62e29;
}

.trading-summary {
    margin-top: 20px;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.summary-row .label {
    color: var(--trader-text-muted);
}

.summary-row .value {
    font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .instruments-list {
        width: 250px;
    }
    .trading-panel-pro {
        width: 280px;
    }
}

@media (max-width: 992px) {
    .webtrader-page .content-wrapper {
        flex-direction: column;
        height: auto;
        overflow-y: auto;
    }
    
    .instruments-list,
    .trading-panel-pro,
    .chart-area {
        width: 100%;
        height: auto;
        border: none;
        border-bottom: 1px solid var(--trader-border);
    }
    
    .chart-container {
        height: 400px;
    }
    
    .trades-section {
        max-height: none;
    }
}

/* Add styles for trading analytics charts */
.trading-chart {
  height: 300px;
  width: 100%;
  min-height: 300px;
  background-color: #f8f9fa;
  border-radius: 4px;
  margin-bottom: 15px;
}

/* Fix plotly rendering issues */
.js-plotly-plot .plotly .main-svg {
  width: 100%;
  height: 100%;
}

/* Clean header style */
.analytics-header {
  background-color: #f8f9fa;
  border-radius: 4px;
  padding: 15px;
  margin-bottom: 20px;
}

/* Metrics card styles */
.metric-card {
  transition: all 0.3s ease;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Empty state styling for consistent design between leads and clients views */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  text-align: center;
  background-color: white;
  border-radius: var(--border-radius);
  border: 1px solid var(--gray-200);
  margin: 1rem 0;
}

.empty-state svg,
.empty-state span[data-feather] {
  width: 48px;
  height: 48px;
  color: var(--gray-400);
  margin-bottom: 1rem;
}

.empty-state p {
  color: var(--gray-600);
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

/* Icon styling for table cells */
.icon-sm {
  width: 16px;
  height: 16px;
  vertical-align: text-bottom;
}

/* Country flag styling */
.country-flag {
  margin-right: 0.5rem;
  vertical-align: middle;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
}

/* ========== LAST COMMENT BADGE - BABY GREEN ========== */
.last-comment-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #b8f5d8 !important;
  color: #1a6b3c !important;
  border: 1px solid #7fe0ab;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.last-comment-badge:hover {
  background: #98eec4 !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 200, 100, 0.3);
}

/* ========== DRAG & DROP COLUMNS ========== */
.table thead th.draggable-col {
  cursor: grab;
  user-select: none;
}

.table thead th.draggable-col:active {
  cursor: grabbing;
}

.table thead th.draggable-col:hover {
  background: #e9ecef;
}

.table thead th.draggable-col .drag-handle {
  display: inline-block;
  opacity: 0.3;
  margin-right: 4px;
  font-size: 0.7rem;
}

.table thead th.draggable-col:hover .drag-handle {
  opacity: 0.7;
}

th.sortable-ghost {
  background: #d4edda !important;
  opacity: 0.6;
}

th.sortable-chosen {
  background: #c3e6cb !important;
}


