html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  background-color: #121212;
  color: #e0e0e0;
  overflow-x: hidden;
}

/* Ensure the container fills at least the viewport */
.container-fluid {
  min-height: 100%;
}

/* Main content */
.main-wrapper,
.tab-content {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Sidebar Styling */
.sidebar {
    /* Sticky positioning for desktop */
    position: -webkit-sticky; /* Safari */
    position: sticky;
    top: 0;
    height: 100vh; /* Full viewport height */
    overflow-y: auto; /* Enable scrolling for long content within sidebar */
    z-index: 100; /* Ensure it stays above other content */
    /* Hide scrollbar for cleaner look */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE 10+ */
}
.sidebar::-webkit-scrollbar {
    width: 0;
    height: 0;
}

/* Mobile Offcanvas Overrides */
@media (max-width: 767.98px) {
    .sidebar {
        position: fixed; /* Fixed for offcanvas behavior on mobile */
        height: 100%;
        z-index: 1045; /* Bootstrap offcanvas z-index */
    }
}

.sidebar-heading {
  color: #888;
  font-size: 0.9rem;
  text-transform: uppercase;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  padding-left: 15px;
}
 .sidebar-logo-svg {
    filter: drop-shadow(0 0 5px rgba(0, 191, 165, 0.4));
    transition: transform 0.3s ease;
  }

  .logo-wrapper:hover .sidebar-logo-svg {
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px rgba(0, 191, 165, 0.7));
  }

  .algo-line {
    animation: dashScroll 2s linear infinite;
  }

  @keyframes dashScroll {
    from { stroke-dashoffset: 20; }
    to { stroke-dashoffset: 0; }
  }

  /* Styling for Nav Pills to match the high-end console look */
  .sidebar .nav-link {
    color: #8b949e;
    font-size: 0.9rem;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: all 0.2s ease;
  }

  .sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
  }

  .sidebar .nav-link.active {
    background: rgba(0, 191, 165, 0.15) !important;
    color: #00bfa5 !important;
    font-weight: 600;
  }



/* Signal coloring */
.bullish { background: green; color: white; }
.bearish { background: red; color: white; }
.neutral { background: grey; color: white; }

/* Loading overlay */
.overlay {
  position: fixed;
  width: 100%;
  height: 100%;
  z-index: 1000;
  top: 40%;
  left: 0;
  opacity: 0.5;
}
/*.btn-teal {*/
/*  background-color: #00b894;*/
/*  color: #fff;*/
/*}*/
/*.btn-teal:hover {*/
/*  background-color: #019170;*/
/*}*/
  /* Professional Teal Theme & Logo Styling */
  .btn-teal {
    background-color: #00bfa5;
    border: none;
    color: white;
    font-weight: 600;
  }
  .btn-teal:hover {
    background-color: #009688;
    color: white;
  }
/* Dark background for the calendar */
.ui-datepicker {
  background: #1e1e1e !important;
  border: 1px solid #333 !important;
  color: #e0e0e0 !important;
  padding: 0.5rem;
}

/* Calendar header */
.ui-datepicker-header {
  background: #2c2c2c !important;
  border-bottom: 1px solid #444 !important;
  color: #e0e0e0 !important;
}

/* Day cells */
.ui-datepicker td a {
  background: #1e1e1e !important;
  color: #e0e0e0 !important;
  border: none !important;
  padding: 0.4rem;
}

/* Hover and active states */
.ui-datepicker td a:hover {
  background: #00b894 !important;
  color: #fff !important;
}
.ui-datepicker .ui-state-active {
  background: #00b894 !important;
  color: #fff !important;
}

  .logo-svg {
    width: 100px;
    height: auto;
    filter: drop-shadow(0 0 8px rgba(0, 191, 165, 0.3));
  }

  /* Animation for 'Scanning' lines - adds an "Algo" feel */
  .scan-line {
    stroke-dasharray: 20;
    animation: scanMove 2s linear infinite;
  }

  @keyframes scanMove {
    from { stroke-dashoffset: 40; }
    to { stroke-dashoffset: 0; }
  }

  .card {
    border: 1px solid #333;
    border-radius: 12px;
  }

  .punchline {
    color: #8b949e; /* Muted gray */
    font-size: 11px;
    letter-spacing: 3px; /* This makes it look very professional */
    font-weight: 500;
    text-transform: uppercase;
    margin-top: -10px; /* Pull it closer to the title */
    margin-bottom: 25px;
    opacity: 0.8;
  }

/* Warm button style */
.btn-warm {
  background-color: #e67e22;   /* warm orange */
  color: #fff;
  border: none;
}
.btn-warm:hover {
  background-color: #d35400;   /* deeper burnt orange */
  color: #fff;
}

/* Warm badge style */
.bg-warm {
  background-color: #f39c12;   /* amber yellow */
  color: #fff;
}


.badge.rounded-pill {
  font-size: 0.9rem;
  font-weight: 500;
}

section {
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
/* Custom Dark Theme for Subscription Cards */
.sub-card {
    background: #161b22 !important; /* Slightly lighter than the main background */
    border: 1px solid #30363d !important;
    border-radius: 8px !important;
    overflow: hidden;
}

.sub-header {
    background: rgba(255, 255, 255, 0.03) !important;
    border-bottom: 1px solid #30363d !important;
    padding: 0.5rem 1rem !important;
    transition: background 0.3s ease;
}

.sub-header:hover {
    background: rgba(0, 191, 165, 0.05) !important;
}

.sub-header button {
    font-weight: 600 !important;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.85rem;
    color: #f0f6fc !important;
    text-decoration: none !important;
    width: 100%;
    text-align: left;
}

/* Subtle accent border to distinguish categories without being "too bright" */
.border-accent-teal { border-left: 4px solid #00bfa5 !important; }
.border-accent-blue { border-left: 4px solid #58a6ff !important; }
.border-accent-purple { border-left: 4px solid #bc8cff !important; }
.border-accent-orange { border-left: 4px solid #ffa657 !important; }

/* Custom Badges */
.badge-sub {
    background: rgba(48, 54, 61, 0.5) !important;
    border: 1px solid #444c56 !important;
    color: #c9d1d9 !important;
    font-weight: 500;
}
/* Simple Outline Button */
.btn-teal-outline {
    color: #00bfa5;
    border: 1px solid rgba(0, 191, 165, 0.5);
    background: transparent;
    transition: all 0.3s ease;
}

.btn-teal-outline:hover {
    background: rgba(0, 191, 165, 0.1);
    color: #00f0d1;
    box-shadow: 0 0 10px rgba(0, 191, 165, 0.2);
}

/* Optional: Keep the punchline very subtle below it */
.brand-footer {
    font-size: 10px;
    letter-spacing: 2px;
    color: #444c56;
    text-transform: uppercase;
    margin-top: 15px;
    margin-bottom: 0;
}
/* Fix for the Sync Button visibility */
.btn-sync-header {
    background-color: transparent;
    color: #00bfa5;
    border: 1px solid #00bfa5;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-sync-header:hover {
    background-color: rgba(0, 191, 165, 0.1);
    color: #00f0d1;
    box-shadow: 0 0 10px rgba(0, 191, 165, 0.2);
}

/* Ensure Font Awesome Icons are visible and colored */
.fas, .fa {
    display: inline-block;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Add a subtle glow to your brand teal */
.text-teal {
    color: #00bfa5 !important;
    text-shadow: 0 0 5px rgba(0, 191, 165, 0.3);
}
/* Sleek Dark Console Inputs */
.console-input:focus {
    background-color: #0d1117 !important;
    border-color: #00bfa5 !important;
    box-shadow: 0 0 0 3px rgba(0, 191, 165, 0.15) !important;
    outline: none;
}

.console-input::placeholder {
    color: #484f58;
}


/* Saving the "Dance" vibe for the button */
.btn-teal {
    background-color: #00bfa5;
    border: none;
    color: #0d1117; /* Dark text on light button for high contrast */
    transition: transform 0.2s ease, background-color 0.3s ease;
}

.btn-teal:hover {
    background-color: #00f0d1;
    transform: translateY(-1px);
    color: #0d1117;
}
/* High visibility labels for dark mode */
.text-label-visible {
    color: #e6edf3 !important; /* Brighter off-white for better readability */
    opacity: 1 !important;
    display: block;
    margin-bottom: 8px;
}

/* Updated Console Input for better focus visibility */
.console-input {
    background-color: #0d1117 !important;
    border: 1px solid #444c56 !important; /* Slightly brighter border */
    color: #f0f6fc !important;
    border-radius: 6px;
    padding: 10px 12px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.95rem;
}

.console-input:focus {
    border-color: #00bfa5 !important;
    background-color: #161b22 !important;
}
/* Console Style Tabs */
.console-tab {
    color: #8b949e !important;
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    padding: 10px 25px !important;
    transition: all 0.3s ease;
}

.console-tab:hover {
    color: #f0f6fc !important;
}

.console-tab.active {
    color: #00bfa5 !important;
    border-bottom: 2px solid #00bfa5 !important;
}

/* Ensure the tab content has a smooth transition */
.tab-pane {
    transition: opacity 0.15s linear;
}

/* Footer branding */
.brand-footer {
    font-size: 11px;
    letter-spacing: 3px;
    color: #484f58;
    opacity: 0.7;
}

/* Custom Console Table */
.table-dark-console {
    width: 100%;
    border-collapse: separate !important;
    border-spacing: 0 12px !important; /* This creates the "floating card" look */
    background-color: transparent !important;
    table-layout: fixed; /* Fix layout to prevent dancing */
}

.table-dark-console thead th {
    color: #8b949e !important;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    border: none !important;
    padding: 10px 15px;
}

/* ROW STYLING - Forces the dark background from your image */
.table-dark-console tbody tr {
    background-color: #161b22 !important; /* Same as your section card */
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    transition: transform 0.2s ease;
}

.table-dark-console tbody tr:hover {
    background-color: #1c2128 !important;
    transform: scale(1.005);
}

.table-dark-console td {
    color: #f0f6fc !important;
    padding: 16px 15px !important;
    border-top: 1px solid #30363d !important;
    border-bottom: 1px solid #30363d !important;
    background-clip: padding-box; /* Fixes background bleeding */
    white-space: normal; /* Allow wrapping to prevent overflow */
    overflow: hidden;
    text-overflow: ellipsis;
}

/* BORDER RADIUS FIX */
.table-dark-console td:first-child {
    border-left: 1px solid #30363d !important;
    border-top-left-radius: 10px !important;
    border-bottom-left-radius: 10px !important;
}

.table-dark-console td:last-child {
    border-right: 1px solid #30363d !important;
    border-top-right-radius: 10px !important;
    border-bottom-right-radius: 10px !important;
}

/* Fix for specific table IDs to ensure dark theme */
#livePositionsTable, #tradeLogsTable {
    background-color: transparent !important;
    color: #f0f6fc !important;
}

#livePositionsTable tr, #tradeLogsTable tr {
    background-color: #161b22 !important;
    color: #f0f6fc !important;
}

#livePositionsTable td, #tradeLogsTable td {
    background-color: #161b22 !important;
    color: #f0f6fc !important;
    border-color: #30363d !important;
}

/* Override for text-success and text-danger to ensure visibility */
#livePositionsTable td.text-success, #tradeLogsTable td.text-success {
    color: #28a745 !important;
}

#livePositionsTable td.text-danger, #tradeLogsTable td.text-danger {
    color: #dc3545 !important;
}

/* Override Bootstrap striped/hover if they interfere */
.table-hover > tbody > tr:hover > * {
    color: #fff !important;
    background-color: #1c2128 !important;
}

/* Column Widths for Live Positions */
#livePositionsTable th:nth-child(1) { width: 20%; } /* Symbol */
#livePositionsTable th:nth-child(2) { width: 20%; } /* Strategy */
#livePositionsTable th:nth-child(3) { width: 10%; } /* Side */
#livePositionsTable th:nth-child(4) { width: 10%; } /* Qty */
#livePositionsTable th:nth-child(5) { width: 15%; } /* Entry */
#livePositionsTable th:nth-child(6) { width: 15%; } /* LTP */
#livePositionsTable th:nth-child(7) { width: 10%; } /* PnL */

/* Column Widths for Trade Logs */
#tradeLogsTable th:nth-child(1) { width: 15%; } /* Time */
#tradeLogsTable th:nth-child(2) { width: 15%; } /* Symbol */
#tradeLogsTable th:nth-child(3) { width: 20%; } /* Strategy */
#tradeLogsTable th:nth-child(4) { width: 10%; } /* Signal */
#tradeLogsTable th:nth-child(5) { width: 10%; } /* Price */
#tradeLogsTable th:nth-child(6) { width: 15%; } /* Status */
#tradeLogsTable th:nth-child(7) { width: 15%; } /* PnL */

/* Hide scrollbar for table responsive container if not needed */
.table-responsive::-webkit-scrollbar {
    height: 6px;
    width: 6px;
}
.table-responsive::-webkit-scrollbar-track {
    background: #0d1117;
}
.table-responsive::-webkit-scrollbar-thumb {
    background: #30363d;
    border-radius: 3px;
}
.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #00bfa5;
}

/* Data load Section */
.text-orange { color: #ff8c00 !important; }
.border-accent-orange { border: 1px solid #ff8c0055 !important; border-left: 4px solid #ff8c00 !important; }
.btn-outline-orange {
    color: #ff8c00;
    border-color: #ff8c00;
    transition: 0.3s;
}
.btn-outline-orange:hover {
    background-color: #ff8c00;
    color: #161b22;
}
.btn-orange {
    background-color: #ff8c00;
    color: #161b22;
    font-weight: bold;
}
/* Ensure the log looks like a console */
#dataLoaderLog {
    background-color: #0d1117;
    max-height: 150px;
    overflow-y: auto;
}

/*candle-scanner */
/* Fix the Accordion Arrow color for Dark Theme */
.accordion-button::after {
    filter: invert(1);
}

/* Ensure the button doesn't turn white/blue when clicked */
.accordion-button:not(.collapsed) {
    background-color: #1c2128 !important;
    color: #00bfa5 !important;
    box-shadow: none !important;
}

.bg-black-2 { background-color: #0d1117; }
.text-teal { color: #00bfa5; }
.btn-teal { background-color: #00bfa5; color: #000; border: none; }
.btn-teal:hover { background-color: #009688; color: #fff; }

/* Chart Container Styling */
#chartContainer {
    height: 100%; /* Fill parent height */
    display: flex;
    flex-direction: column;
}

/* Lightweight Charts Canvas */
#chartContainer > div { /* Target the div that Lightweight Charts creates */
    flex-grow: 1; /* Allow it to grow */
}

/* Scroll to Top Button */
#scrollToTopBtn {
    display: none; /* Hidden by default */
    position: fixed; /* Fixed/sticky position */
    bottom: 20px; /* Place the button at the bottom of the page */
    right: 30px; /* Place the button 30px from the right */
    z-index: 9999; /* Increased Z-Index to ensure visibility */
    border: none; /* Remove borders */
    outline: none; /* Remove outline */
    background-color: #00bfa5; /* Set a background color */
    color: white; /* Text color */
    cursor: pointer; /* Add a mouse pointer on hover */
    padding: 15px; /* Some padding */
    border-radius: 50%; /* Rounded corners */
    font-size: 18px; /* Increase font size */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Add a subtle shadow */
    transition: background-color 0.3s, transform 0.3s;
}

#scrollToTopBtn:hover {
    background-color: #009688; /* Darker teal on hover */
    transform: scale(1.1); /* Slightly enlarge on hover */
}
.btn-outline-teal {
    color: #00bfa5 !important;
    border-color: #00bfa5 !important;
}

.btn-outline-teal:hover {
    color: #fff !important;
    background-color: #00bfa5 !important;
    border-color: #00bfa5 !important;
}

/* Custom Broker Tabs */
#brokerTabs .nav-link {
    color: #8b949e;
    background-color: transparent;
    border: none;
    transition: all 0.3s ease;
}

#brokerTabs .nav-link:hover {
    color: #fff;
}

#brokerTabs .nav-link.active {
    color: #000;
    background-color: #00bfa5;
    font-weight: bold;
}

/* Broker Card Prominence */
.card.broker-card {
    box-shadow: 0 0 15px rgba(0, 191, 165, 0.1);
}

/* Signal Table Styling */
.signal-table-console {
    font-family: 'Monaco', 'Consolas', monospace;
}

.signal-row-buy {
    background-color: rgba(38, 166, 154, 0.1) !important; /* Subtle Green */
    border-left: 3px solid #26a69a;
}

.signal-row-sell {
    background-color: rgba(239, 83, 80, 0.1) !important; /* Subtle Red */
    border-left: 3px solid #ef5350;
}

.signal-row-exit {
    background-color: rgba(255, 152, 0, 0.1) !important; /* Subtle Orange */
    border-left: 3px solid #ff9800;
}
