@import url('https://fonts.googleapis.com/css2?family=Chivo:wght@300;400;700;900&family=Manrope:wght@400;500;600;700&family=Inter:wght@400;500;600;700;800&display=swap');

/* Custom Variables */
:root {
  --bybit-gold: #F0A500;
  --bybit-dark: #0B0B0B;
  --bybit-card: #121212;
  --bybit-border: #2E2E2E;
  --bybit-gray: #888888;
  --bybit-red: #E53E3E;
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Manrope', sans-serif;
  background-color: var(--bybit-dark);
  color: #FAFAFA;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Chivo', sans-serif;
}

.font-chivo {
  font-family: 'Chivo', sans-serif;
}

.font-mono {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bybit-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--bybit-border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #404040;
}

/* Chat Groups */
.chat-group {
  border: 1px solid var(--bybit-border);
  border-radius: 4px;
  overflow: hidden;
}

.chat-group-header {
  background-color: var(--bybit-card);
  padding: 0.75rem 1rem;
  transition: background-color 0.2s;
}

.chat-group-header:hover {
  background-color: rgba(240, 165, 0, 0.1);
}

.chat-group-chevron {
  display: inline-flex;
  align-items: center;
  transition: transform 0.2s;
}

.chat-group-chats {
  background-color: var(--bybit-dark);
}

.chat-group-chats .chat-item {
  border-left: 2px solid var(--bybit-gold);
  margin-left: 0.5rem;
  margin-right: 0.5rem;
  margin-bottom: 0.25rem;
}

/* Bybit Grid Background */
.bybit-grid-bg {
  background-color: var(--bybit-dark) !important;
  background-image: 
    linear-gradient(rgba(240, 165, 0, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240, 165, 0, 0.15) 1px, transparent 1px),
    linear-gradient(rgba(240, 165, 0, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240, 165, 0, 0.08) 1px, transparent 1px) !important;
  background-size: 
    100px 100px,
    100px 100px,
    25px 25px,
    25px 25px !important;
  position: relative;
  min-height: 100vh;
}

.bybit-grid-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  width: 100%;
  background: 
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(240, 165, 0, 0.3) 0%, transparent 70%),
    repeating-linear-gradient(
      -30deg,
      transparent,
      transparent 150px,
      rgba(240, 165, 0, 0.08) 150px,
      rgba(240, 165, 0, 0.08) 151px
    ),
    repeating-linear-gradient(
      30deg,
      transparent,
      transparent 150px,
      rgba(240, 165, 0, 0.08) 150px,
      rgba(240, 165, 0, 0.08) 151px
    ) !important;
  pointer-events: none;
  z-index: 0;
}

.bybit-grid-bg::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: 
    linear-gradient(to top, rgba(11, 11, 11, 0.9) 0%, transparent 30%),
    linear-gradient(to bottom, rgba(11, 11, 11, 0.9) 0%, transparent 30%),
    linear-gradient(to right, rgba(11, 11, 11, 0.7) 0%, transparent 20%),
    linear-gradient(to left, rgba(11, 11, 11, 0.7) 0%, transparent 20%) !important;
  pointer-events: none;
  z-index: 0;
}

/* Bootstrap Overrides */
.bg-dark {
  background-color: var(--bybit-card) !important;
}

.border-secondary {
  border-color: var(--bybit-border) !important;
}

.text-secondary {
  color: var(--bybit-gray) !important;
}

.text-warning {
  color: var(--bybit-gold) !important;
}

.btn-primary {
  background-color: var(--bybit-gold) !important;
  color: var(--bybit-dark) !important;
  border: none !important;
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  transition: all 0.2s;
}

.btn-primary svg {
  color: var(--bybit-dark) !important;
}

.btn-primary:hover {
  background-color: #D49400 !important;
  color: var(--bybit-dark) !important;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
  transform: scale(1.02);
}

.btn-primary:hover svg {
  color: var(--bybit-dark) !important;
}

.btn-warning {
  background-color: var(--bybit-gold) !important;
  color: var(--bybit-dark) !important;
  border: none !important;
}

.btn-warning svg {
  color: var(--bybit-dark) !important;
}

.btn-warning:hover {
  background-color: #D49400 !important;
  color: var(--bybit-dark) !important;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
  transform: scale(1.05);
}

.btn-warning:hover svg {
  color: var(--bybit-dark) !important;
}

.btn-outline-secondary {
  border-color: var(--bybit-border);
  color: white;
}

.btn-outline-secondary:hover {
  background-color: var(--bybit-card);
  border-color: var(--bybit-border);
  color: white;
}

/* Form Controls */
.form-control {
  color: white !important;
  background-color: var(--bybit-dark) !important;
  border-color: var(--bybit-border) !important;
}

.form-control::placeholder {
  color: var(--bybit-gray) !important;
  opacity: 1;
}

.form-control:focus {
  color: white !important;
  background-color: var(--bybit-dark) !important;
  
}

input.form-control,
input[type="email"],
input[type="password"],
input[type="text"] {
  color: white !important;
}

input.form-control::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder,
input[type="text"]::placeholder {
  color: var(--bybit-gray) !important;
  opacity: 1;
}

/* Carousel Fade Animation */
.carousel-fade .carousel-item {
  opacity: 0;
  transition-property: opacity;
  transform: none !important;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  display: block;
}

.carousel-fade .carousel-item:not(.active) {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  display: block;
}

.carousel-fade .carousel-item.active,
.carousel-fade .carousel-item-next.carousel-item-start,
.carousel-fade .carousel-item-prev.carousel-item-end {
  opacity: 1;
  position: relative;
}

.carousel-fade .active.carousel-item-start,
.carousel-fade .active.carousel-item-end {
  opacity: 0;
}

.carousel-fade .carousel-item-next:not(.carousel-item-start),
.carousel-fade .active.carousel-item-end {
  transform: none;
}

.carousel-fade .carousel-item-prev:not(.carousel-item-end),
.carousel-fade .active.carousel-item-start {
  transform: none;
}

/* Carousel Custom Styles */
.carousel-control-prev {
  left: 4rem !important;
}

.carousel-control-next {
  right: 4rem !important;
}

.carousel-control-prev,
.carousel-control-next {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s;
  z-index: 20 !important;
  pointer-events: auto !important;
  cursor: pointer !important;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  filter: brightness(0) invert(1);
}

/* Carousel Indicators */
.carousel-indicator {
  cursor: pointer;
  border: none !important;
  padding: 0 !important;
}

.carousel-indicator.active {
  width: 40px !important;
  background: #F0A500 !important;
}

.carousel-indicator:not(.active) {
  width: 12px !important;
  background: rgba(255, 255, 255, 0.3) !important;
}

.carousel-indicator:hover {
  background: rgba(255, 255, 255, 0.5) !important;
}

.carousel-indicator.active:hover {
  background: #D49400 !important;
}

/* Accordion Custom Styles */
.accordion-button {
  background-color: var(--bybit-card);
  color: white;
}

.accordion-button:not(.collapsed) {
  background-color: var(--bybit-card);
  color: white;
  box-shadow: none;
}

.accordion-button:focus {
  box-shadow: none;
  border-color: var(--bybit-border);
}

.accordion-button::after {
  display: none;
}

.accordion-body {
  background-color: var(--bybit-card);
  color: var(--bybit-gray);
}

/* Card Hover Effects */
.bg-dark.bg-opacity-80 {
  transition: all 0.3s;
}

.bg-dark.bg-opacity-80:hover {
  border-color: rgba(229, 62, 62, 0.3) !important;
}

/* Header - убираем красную линию при наведении */
header.bg-dark.bg-opacity-80:hover {
  border-color: var(--bybit-border) !important;
}

/* Selection */
::selection {
  background-color: rgba(255, 215, 0, 0.3);
  color: #FAFAFA;
}

/* Links */
a {
  transition: color 0.2s;
}

a:hover {
  color: var(--bybit-gold) !important;
}

/* Carousel Indicators Container Position */
#carouselExample .position-absolute.bottom-0.start-50 {
  bottom: 4rem !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #carouselExample {
    height: 350px !important;
  }
  
  .carousel-item img {
    object-fit: cover;
  }
  
  .carousel-control-prev {
    left: 1.5rem !important;
  }
  
  .carousel-control-next {
    right: 1.5rem !important;
  }
  
  #carouselExample .position-absolute.bottom-0.start-50 {
    bottom: 2.5rem !important;
  }
}

@media (min-width: 768px) {
  #carouselExample {
    height: 400px !important;
  }
}

@media (min-width: 1024px) {
  #carouselExample {
    height: 480px !important;
  }
}

/* Dashboard Background - только квадратная сетка без дополнительных эффектов */
.bybit-grid-bg.dashboard-page::before,
.bybit-grid-bg.dashboard-page::after {
  display: none !important;
}

/* Dashboard - тусклый белый фон с квадратами (только большие квадраты) */
.bybit-grid-bg.dashboard-page {
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px) !important;
  background-size: 
    100px 100px,
    100px 100px !important;
}

/* Dashboard Cards - полупрозрачные для видимости сетки */
.dashboard-card {
  background-color: rgba(18, 18, 18) !important;
  backdrop-filter: blur(10px);
}

/* Dashboard Sidebar */
.sidebar {
  background-color: var(--bybit-dark) !important;
}

@media (min-width: 992px) {
  .sidebar {
    transform: translateX(0px) !important;
    position: fixed !important;
  }
  
  .main-content {
    margin-left: 224px !important;
  }
}

@media (max-width: 991.98px) {
  .sidebar {
    position: fixed !important;
  }
  
  .main-content {
    margin-left: 0 !important;
  }
}

/* Dashboard Header and Main Padding */
@media (min-width: 1024px) {
  header .px-lg-5 {
    padding-left: 2rem !important;
    padding-right: 2rem !important;
  }
  
  main.px-lg-5 {
    padding-left: 2rem !important;
    padding-right: 2rem !important;
  }
  
  main.py-4 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
}

/* Dashboard Cards Padding - только для dashboard */
.dashboard-card.bg-dark.p-4,
.dashboard-card .bg-dark.p-4 {
  padding: 1.5rem !important;
}

/* Dashboard Stats Gap */
@media (min-width: 992px) {
  .row.g-4 {
    gap: 2rem !important;
  }
}

.menu-item {
  transition: all 0.2s;
}

.menu-item:hover {
  background-color: var(--bybit-card) !important;
  color: white !important;
}

.logout-btn:hover {
  color: var(--bybit-red) !important;
}

/* Mobile Responsive Styles */
@media (max-width: 991.98px) {
  /* Sidebar mobile styles */
  .sidebar {
    width: 280px !important;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
  }

  /* Main content adjustments */
  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
  }

  /* Header adjustments */
  header {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  /* Card responsive */
  .card {
    margin-bottom: 1rem;
  }

  /* Table responsive */
  .table-responsive {
    font-size: 0.875rem;
  }

  /* Stats cards stack on mobile */
  .row > [class*="col-"] {
    margin-bottom: 1rem;
  }

  /* Form adjustments */
  .form-control,
  .form-select {
    font-size: 16px; /* Prevents zoom on iOS */
  }

  /* Button adjustments */
  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }

  /* Spacing adjustments */
  .page-header {
    margin-bottom: 1.5rem !important;
  }

  .page-header-title {
    font-size: 1.5rem;
  }

  /* Modal adjustments */
  .modal-dialog {
    margin: 0.5rem;
  }

  /* Hide some elements on mobile */
  .d-none-mobile {
    display: none !important;
  }
}

@media (max-width: 575.98px) {
  /* Extra small devices */
  .page-header-title {
    font-size: 1.25rem;
  }

  .card-body {
    padding: 1rem;
  }

  .table {
    font-size: 0.8rem;
  }

  .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }

  /* Stack elements vertically */
  .d-flex.gap-2,
  .d-flex.gap-3,
  .d-flex.gap-4 {
    flex-direction: column;
    gap: 0.5rem !important;
  }
}

/* Desktop styles */
@media (min-width: 992px) {
  .sidebar {
    transform: translateX(0px) !important;
  }

  .main-content {
    margin-left: 224px !important;
  }

  .sidebar-overlay {
    display: none !important;
  }
}

/* Table Styles */
.table-dark {
  background-color: transparent !important;
  color: white !important;
}

.table-dark thead th {
  border-color: var(--bybit-border) !important;
  background-color: transparent !important;
}

.table-dark tbody tr {
  border-color: rgba(46, 46, 46, 0.5) !important;
  background-color: transparent !important;
}

.table-dark tbody tr:hover {
  background-color: transparent !important;
}

.table-dark td,
.table-dark th {
  background-color: transparent !important;
}

/* Table container should have the same background as other cards */
.dashboard-card .table-dark {
  background-color: transparent !important;
}

.dashboard-card .table-dark td,
.dashboard-card .table-dark th {
  background-color: transparent !important;
}

/* Smooth transitions */
* {
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}

/* Admin Panel Card Styles */
.card {
  background-color: var(--bybit-card) !important;
  border: 1px solid var(--bybit-border) !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
  transition: all 0.3s ease !important;
}

.card:hover {
  border-color: rgba(240, 165, 0, 0.3) !important;
  box-shadow: 0 4px 12px rgba(240, 165, 0, 0.2) !important;
}

.card-header {
  background-color: rgba(18, 18, 18, 0.8) !important;
  border-bottom: 1px solid var(--bybit-border) !important;
  padding: 1rem 1.5rem !important;
}

.card-header-title {
  color: #FAFAFA !important;
  font-weight: 600 !important;
  font-size: 1.1rem !important;
  margin: 0 !important;
}

.card-body {
  padding: 1.5rem !important;
  color: #FAFAFA !important;
}

/* Page Header Styles */
.page-header {
  margin-bottom: 2rem !important;
  padding-bottom: 1rem !important;
  border-bottom: 1px solid var(--bybit-border) !important;
}

.page-header-title {
  color: #FAFAFA !important;
  font-weight: 700 !important;
  font-size: 1.75rem !important;
  margin-bottom: 0.5rem !important;
}

.page-header-text {
  color: var(--bybit-gray) !important;
  font-size: 0.95rem !important;
  margin: 0 !important;
}

/* Form Select Styles */
.form-select {
  color: white !important;
  background-color: var(--bybit-dark) !important;
  border-color: var(--bybit-border) !important;
  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='%23F0A500' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") !important;
}

.form-select:focus {
  color: white !important;
  background-color: var(--bybit-dark) !important;
  border-color: #F0A500 !important;
  box-shadow: 0 0 0 1px rgba(240, 165, 0, 0.3) !important;
}

.form-select option {
  background-color: var(--bybit-card) !important;
  color: #FAFAFA !important;
}

/* Button Secondary Styles */
.btn-secondary {
  background-color: var(--bybit-card) !important;
  border-color: var(--bybit-border) !important;
  color: #FAFAFA !important;
  font-weight: 500 !important;
  transition: all 0.2s !important;
}

.btn-secondary:hover {
  background-color: rgba(240, 165, 0, 0.1) !important;
  border-color: rgba(240, 165, 0, 0.5) !important;
  color: var(--bybit-gold) !important;
  transform: translateY(-1px);
}

.btn-secondary:active {
  transform: translateY(0);
}

/* Button Danger Styles */
.btn-danger {
  background-color: var(--bybit-red) !important;
  border-color: var(--bybit-red) !important;
  color: white !important;
  font-weight: 500 !important;
  transition: all 0.2s !important;
}

.btn-danger:hover {
  background-color: #C53030 !important;
  border-color: #C53030 !important;
  box-shadow: 0 0 10px rgba(229, 62, 62, 0.3) !important;
  transform: translateY(-1px);
}

.btn-danger:active {
  transform: translateY(0);
}

/* Button Small Styles */
.btn-sm {
  padding: 0.375rem 0.75rem !important;
  font-size: 0.875rem !important;
  border-radius: 4px !important;
}

/* Nav Tabs Styles */
.nav-tabs {
  border-bottom: 1px solid var(--bybit-border) !important;
  margin-bottom: 1.5rem !important;
}

.nav-tabs .nav-link {
  color: var(--bybit-gray) !important;
  border: none !important;
  border-bottom: 2px solid transparent !important;
  padding: 0.75rem 1.5rem !important;
  transition: all 0.2s !important;
  background-color: transparent !important;
}

.nav-tabs .nav-link:hover {
  color: #FAFAFA !important;
  border-bottom-color: rgba(240, 165, 0, 0.5) !important;
}

.nav-tabs .nav-link.active {
  color: var(--bybit-gold) !important;
  border-bottom-color: var(--bybit-gold) !important;
  background-color: transparent !important;
  font-weight: 600 !important;
}

/* Tab Content */
.tab-content {
  padding-top: 0 !important;
}

.tab-pane {
  animation: fadeIn 0.3s ease-in !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Badge Styles */
.badge {
  padding: 0.35em 0.65em !important;
  font-weight: 500 !important;
  border-radius: 4px !important;
  font-size: 0.75rem !important;
}

.badge.bg-success {
  background-color: #10B981 !important;
}

.badge.bg-danger {
  background-color: var(--bybit-red) !important;
}

.badge.bg-secondary {
  background-color: var(--bybit-gray) !important;
}

.badge.bg-dark {
  background-color: var(--bybit-card) !important;
  color: #FAFAFA !important;
}

/* Table Hover Styles - Disabled for history table */
/* Disable table hover effects */
.table-hover tbody tr {
  transition: none !important;
  cursor: default !important;
}

.table-hover tbody tr:hover {
  background-color: transparent !important;
  transform: none !important;
}

/* Dashboard trades table specific styles */
[data-testid="trades-table"] {
  table-layout: fixed;
  width: 100%;
}

[data-testid="trades-table"] thead th {
  border-bottom: 1px solid var(--bybit-border);
  white-space: nowrap;
}

[data-testid="trades-table"] tbody td {
  border-top: 1px solid rgba(46, 46, 46, 0.5);
  vertical-align: middle;
  white-space: nowrap;
}

[data-testid="trades-table"] tbody tr {
  transition: none !important;
}

[data-testid="trades-table"] tbody tr:hover {
  background-color: transparent !important;
}

/* Modal Styles */
.modal-content {
  background-color: var(--bybit-card) !important;
  border: 1px solid var(--bybit-border) !important;
  border-radius: 8px !important;
}

.modal-header {
  border-bottom: 1px solid var(--bybit-border) !important;
  padding: 1.5rem !important;
}

.modal-title {
  color: #FAFAFA !important;
  font-weight: 600 !important;
}

.modal-body {
  padding: 1.5rem !important;
  color: #FAFAFA !important;
}

.modal-footer {
  border-top: 1px solid var(--bybit-border) !important;
  padding: 1rem 1.5rem !important;
}

.btn-close {
  filter: invert(1) !important;
  opacity: 0.7 !important;
}

.btn-close:hover {
  opacity: 1 !important;
}

/* Input Group Styles */
.input-group-text {
  background-color: var(--bybit-dark) !important;
  border-color: var(--bybit-border) !important;
  color: #FAFAFA !important;
}

/* Empty State Styles */
.text-center.text-muted {
  color: var(--bybit-gray) !important;
  padding: 3rem 1rem !important;
}

/* Spinner Styles */
.spinner-border {
  border-color: var(--bybit-gold) !important;
  border-right-color: transparent !important;
}

/* Filter Section Styles */
.filter-section {
  background-color: rgba(18, 18, 18, 0.5) !important;
  border-radius: 6px !important;
  padding: 1rem !important;
  margin-bottom: 1rem !important;
}

/* Action Buttons Group */
.btn-group-actions {
  display: flex !important;
  gap: 0.5rem !important;
  flex-wrap: wrap !important;
}

/* Status Badge Colors */
.status-active {
  color: #10B981 !important;
}

.status-inactive {
  color: var(--bybit-gray) !important;
}

.status-closed {
  color: var(--bybit-red) !important;
}

/* Responsive Card Padding */
@media (max-width: 768px) {
  .card-body {
    padding: 1rem !important;
  }
  
  .card-header {
    padding: 0.75rem 1rem !important;
  }
  
  .page-header-title {
    font-size: 1.5rem !important;
  }
}

/* Loading States */
.loading-overlay {
  position: relative;
  min-height: 200px;
}

.loading-overlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(11, 11, 11, 0.7);
  backdrop-filter: blur(2px);
  z-index: 10;
  border-radius: 8px;
}

/* Search Input with Icon */
.search-input-wrapper {
  position: relative;
}

.search-input-wrapper .form-control {
  padding-left: 2.5rem;
}

.search-input-wrapper .search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--bybit-gray);
  z-index: 1;
}

/* Disabled Button Styles */
.btn:disabled,
.btn.disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}

/* Focus Visible Styles */
.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible {
  outline: 2px solid var(--bybit-gold) !important;
  outline-offset: 2px !important;
}

/* Admin Panel Content Container */
.content.container-fluid {
  padding: 1.5rem !important;
}

@media (min-width: 992px) {
  .content.container-fluid {
    padding: 2rem !important;
  }
}

/* Card Header Icons */
.card-header-title i {
  color: var(--bybit-gold) !important;
  opacity: 0.8;
}

/* Form Label Styles */
.form-label {
  color: #FAFAFA !important;
  font-weight: 500 !important;
  margin-bottom: 0.5rem !important;
  font-size: 0.9rem !important;
}

.form-label.fw-semibold {
  font-weight: 600 !important;
}

/* Table Cell Styles */
.table td,
.table th {
  vertical-align: middle !important;
  padding: 0.75rem !important;
  border-color: var(--bybit-border) !important;
}

.table thead th {
  font-weight: 600 !important;
  text-transform: uppercase !important;
  font-size: 0.75rem !important;
  letter-spacing: 0.5px !important;
  background-color: var(--bybit-card) !important;
  color: #FAFAFA !important;
  border-bottom: 2px solid var(--bybit-border) !important;
  border-color: var(--bybit-border) !important;
}

/* History table specific styles */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-responsive table {
  width: 100%;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0;
}

.table-responsive .table tbody td {
  vertical-align: middle;
  word-wrap: break-word;
}

.table-responsive .table tbody td code {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  word-break: break-all;
}

/* Empty State Improvements */
.text-center.text-muted i {
  display: block;
  margin-bottom: 0.5rem;
}

/* Button Icon Spacing */
.btn i {
  margin-right: 0.25rem;
}

.btn i:only-child {
  margin-right: 0;
}

/* Modal Form Labels */
.modal-body .form-label {
  font-size: 0.875rem !important;
  color: var(--bybit-gray) !important;
}

.modal-body .form-label:first-child {
  margin-top: 0;
}

/* Small Text in Forms */
.form-text.text-muted {
  color: var(--bybit-gray) !important;
  font-size: 0.75rem !important;
  margin-top: 0.25rem !important;
}

/* Profit/Loss Display */
.text-success {
  color: #10B981 !important;
}

.text-danger {
  color: var(--bybit-red) !important;
}

/* Number Formatting */
.font-mono {
  font-family: 'Inter', monospace !important;
  font-variant-numeric: tabular-nums !important;
}

/* Loading Spinner in Tables */
.table-responsive .spinner-border {
  width: 2rem;
  height: 2rem;
  border-width: 0.2em;
}

/* Action Buttons Hover Effects */
.btn-group-actions .btn {
  transition: all 0.2s !important;
}

.btn-group-actions .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Card Empty State */
.card-body .text-center.text-muted {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Search Input Focus */
.search-input-wrapper .form-control:focus {
  padding-left: 2.5rem;
}

/* Tab Content Animation */
.tab-pane {
  min-height: 200px;
}

/* Responsive Table Improvements */
@media (max-width: 768px) {
  .table {
    font-size: 0.8rem;
  }
  
  .table td,
  .table th {
    padding: 0.5rem !important;
  }
  
  .btn-group-actions {
    flex-direction: column;
  }
  
  .btn-group-actions .btn {
    width: 100%;
    margin-bottom: 0.25rem;
  }
}

/* Card Header Button Alignment */
.card-header.d-flex {
  align-items: center;
}

.card-header .btn {
  white-space: nowrap;
}

/* Disabled State Visual */
.btn:disabled {
  opacity: 0.4 !important;
  cursor: not-allowed !important;
}

/* Input Number Styles */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  opacity: 0.5;
}

input[type="number"]:hover::-webkit-inner-spin-button,
input[type="number"]:hover::-webkit-outer-spin-button {
  opacity: 1;
}

/* Date Input Styles */
input[type="date"],
input[type="datetime-local"] {
  color-scheme: dark;
}

/* Select Arrow Color */
.form-select {
  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='%23F0A500' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") !important;
}

/* Improved Badge Visibility */
.badge {
  padding: 0.4em 0.7em !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
}

/* Table Row Selection Effect - Disabled for history table */
.table-hover tbody tr {
  position: relative;
}

.table-hover tbody tr::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background-color: transparent;
  transition: none;
}

.table-hover tbody tr:hover::before {
  background-color: transparent;
}

/* Toast Notifications */
.toast-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: var(--bybit-card);
  border: 1px solid var(--bybit-border);
  border-left: 4px solid var(--bybit-gold);
  color: #FAFAFA;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  z-index: 9999;
  min-width: 300px;
  max-width: 500px;
  opacity: 0;
  transform: translateX(400px);
  transition: all 0.3s ease;
}

.toast-notification.show {
  opacity: 1;
  transform: translateX(0);
}

.toast-notification.toast-success {
  border-left-color: #10B981;
}

.toast-notification.toast-error {
  border-left-color: var(--bybit-red);
}

@media (max-width: 768px) {
  .toast-notification {
    right: 10px;
    left: 10px;
    min-width: auto;
    max-width: none;
    transform: translateY(-100px);
  }
  
  .toast-notification.show {
    transform: translateY(0);
  }
}
