/* ============================================
   GLOBAL BASE STYLES
   ============================================ */

body {
    background-color: #1e1e1e;
    color: gainsboro;
    border-color: #000000;
    font-family: 'Chivo Mono', monospace;
}

a {
    color: #1e88e5;
}

a:active,
a:hover {
    color: #1e88e5;
}

p {
    overflow-wrap: break-word;
}

hr {
    border-top: 1px solid rgba(245, 245, 245, 0.5);
}

label {
    color: gainsboro;
}

canvas {
    width: 100% !important;
    max-width: 100%;
    height: auto !important;
}

/* ============================================
   NAVIGATION & HEADER
   ============================================ */

.navbar-brand {
    padding-top: 0px;
    padding-bottom: 7px;
    margin-right: 23px;
}

.navbar {
    padding-top: 14px;
    font-family: 'Chivo Mono', monospace;
    padding-right: 15px;
    padding-bottom: 8px;
    padding-left: 28px;
}

.navbar-light .navbar-nav .nav-link {
    background-color: #1e1e1e;
    color: gainsboro;
    font-family: 'Chivo Mono', monospace;
}

.navbar-toggler {
    background-color: #333;
    border-color: #777;
    color: gainsboro;
}

#navbarSupportedContent>ul.nav.navbar-nav.mr-auto>li>a {
    color: gainsboro;
}

.bg-light {
    background-color: #1e1e1e !important;
    color: #777;
}

.announcement-bar {
    background-color: #000;
    color: #555;
}

/* ============================================
   TABLES - GLOBAL STYLES
   ============================================ */

/* Base table styles - applies to all tables */
.table,
table {
    width: auto;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background-color: transparent;
    color: #e0e0e0;
    font-size: 13px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(68, 68, 68, 0.3);
}

.table:not(.filtered),
table:not(.filtered) {
    min-width: 100%;
}

.table.filtered,
table.filtered {
    width: auto !important;
    min-width: auto !important;
    max-width: none;
}

.table.columns-synced,
table.columns-synced {
    table-layout: fixed;
}

/* Table headers - Modern styling */
.table thead th,
table thead th {
    position: sticky;
    top: 0;
    background: linear-gradient(180deg, #252525 0%, #222 100%);
    color: #b0b0b0;
    border-color: rgba(68, 68, 68, 0.2);
    font-weight: 500;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 6px;
    border-bottom: 1px solid rgba(58, 58, 58, 0.5);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    z-index: 10;
}

.table thead th:first-child,
table thead th:first-child {
    text-align: left;
}

/* Table cells - Modern styling */
.table tbody td,
table tbody td {
    padding: 5px;
    border-color: rgba(68, 68, 68, 0.2);
    font-size: 13px;
    color: #c0c0c0;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    transition: background-color 0.15s ease;
}

.table tbody td:first-child,
table tbody td:first-child {
    text-align: left;
}

/* Striped rows - Modern styling */
.table-striped tbody tr:nth-of-type(odd) td:not(.alert-high):not(.alert-low) {
    background-color: #1d1d1d !important;
}

.table-striped tbody tr:nth-of-type(even) td:not(.alert-high):not(.alert-low) {
    background-color: #222222 !important;
}

/* Hover states */
.table-hover tbody tr:hover td:not(.alert-high):not(.alert-low) {
    background-color: #2a2a2a !important;
}

.table-hover tbody tr:hover,
.table-hover tbody tr:hover td,
.table-hover tbody tr:hover th {
    color: #e0e0e0 !important;
}

/* Bordered tables - Modern styling with thinner borders */
.table.table-bordered {
    border: 1px solid rgba(68, 68, 68, 0.3);
}

.table.table-bordered th,
.table.table-bordered td {
    border-top: 1px solid rgba(68, 68, 68, 0.2);
    border-bottom: 1px solid rgba(68, 68, 68, 0.2);
    border-left: none;
    border-right: none;
}

.table.table-bordered th:not(:last-child),
.table.table-bordered td:not(:last-child),
.table.table-bordered th.alert-high:not(:last-child),
.table.table-bordered td.alert-high:not(:last-child),
.table.table-bordered th.alert-low:not(:last-child),
.table.table-bordered td.alert-low:not(:last-child) {
    border-right: 1px solid rgba(68, 68, 68, 0.2);
}

.table.table-bordered th:first-child,
.table.table-bordered td:first-child {
    border-left: none;
}

.table.table-bordered th:last-child,
.table.table-bordered td:last-child {
    border-right: none;
}

/* Table responsive wrapper - Modern styling */
.table-responsive {
    background-color: #222222;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
    border: 1px solid #333333;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #444 #222222;
}

.table-responsive:last-of-type {
    margin-bottom: 0;
}

.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #222222;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.table-responsive-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #555 #333;
}

.table-responsive-wrapper::-webkit-scrollbar {
    height: 8px;
}

.table-responsive-wrapper::-webkit-scrollbar-track {
    background: #333;
}

.table-responsive-wrapper::-webkit-scrollbar-thumb {
    background-color: #555;
    border-radius: 4px;
}

.hidden-column {
    display: none !important;
}

/* ============================================
   TABLE SORTING INDICATORS
   ============================================ */

.table thead th.sortable::after,
table thead th.sortable::after {
    content: '↕';
    font-size: 10px;
    margin-left: 6px;
    color: #737373;
}

.table thead th.sort-asc::after,
table thead th.sort-asc::after {
    content: '↑';
    color: #1dd1a1;
}

.table thead th.sort-desc::after,
table thead th.sort-desc::after {
    content: '↓';
    color: #1dd1a1;
}

/* ============================================
   ALERT & HIGHLIGHT STYLES
   ============================================ */

/* CRITICAL: Alert-high background - highest priority */
td.alert-high,
th.alert-high,
.table td.alert-high,
.table th.alert-high,
.table-sm td.alert-high,
.table-sm th.alert-high,
table td.alert-high,
table th.alert-high,
tbody td.alert-high,
tbody th.alert-high,
.table-striped tbody tr:nth-of-type(odd) td.alert-high,
.table-striped tbody tr:nth-of-type(even) td.alert-high,
.table-striped tbody tr td.alert-high,
.table-hover tbody tr td.alert-high,
.table-bordered tbody tr td.alert-high,
tr td.alert-high,
tr.alert-high td,
.balance-total-cell.alert-high {
    background-color: rgba(220, 53, 69, 0.4) !important;
    color: #ff6b6b !important;
    font-weight: 600 !important;
    border-color: rgba(220, 53, 69, 0.5) !important;
}

/* CRITICAL: Alert-low background - highest priority */
td.alert-low,
th.alert-low,
.table td.alert-low,
.table th.alert-low,
.table-sm td.alert-low,
.table-sm th.alert-low,
table td.alert-low,
table th.alert-low,
tbody td.alert-low,
tbody th.alert-low,
.table-striped tbody tr:nth-of-type(odd) td.alert-low,
.table-striped tbody tr:nth-of-type(even) td.alert-low,
.table-striped tbody tr td.alert-low,
.table-hover tbody tr td.alert-low,
.table-bordered tbody tr td.alert-low,
tr td.alert-low,
tr.alert-low td,
.balance-total-cell.alert-low {
    background-color: rgba(255, 193, 7, 0.4) !important;
    color: #ffc107 !important;
    font-weight: 500 !important;
    border-color: rgba(255, 193, 7, 0.5) !important;
}

/* Prevent alert-high/alert-low styling on PnL columns in PnL trades list */
/* PnL columns (2nd and 3rd) should only use inline styles, never alert classes */
#pnlTableTradesList tbody tr td:nth-child(2).alert-high,
#pnlTableTradesList tbody tr td:nth-child(2).alert-low,
#pnlTableTradesList tbody tr td:nth-child(3).alert-high,
#pnlTableTradesList tbody tr td:nth-child(3).alert-low {
    background-color: transparent !important;
    color: inherit !important;
    font-weight: inherit !important;
    border-color: inherit !important;
    box-shadow: none !important;
}

.highlighted {
    background-color: #fcdd7e !important;
    color: #000 !important;
    font-weight: bold;
}

.table tr:hover .highlighted {
    background-color: #fcdd7e !important;
    color: #000 !important;
}

.latency-high {
    border: 1px solid rgba(255, 107, 107, 0.8) !important;
    background-color: transparent !important;
}

.latency-warning {
    border: 1px solid rgba(255, 217, 61, 0.6) !important;
    background-color: transparent !important;
}

.equity-highlight {
    border: 3px solid #1e88e5 !important;
    border-radius: 6px;
    background: linear-gradient(135deg, rgba(30, 136, 229, 0.15), rgba(30, 136, 229, 0.05)) !important;
    box-shadow: 0 0 0 2px rgba(30, 136, 229, 0.4), 0 0 12px rgba(30, 136, 229, 0.3) !important;
    font-weight: 700 !important;
    color: #6db3f2 !important;
}

/* Legacy DataTables class support - removed but keeping for compatibility */
table.dataTable {
    box-sizing: border-box;
}

/* Bootstrap table overrides - ensure no white backgrounds or borders */
.table,
.table-sm,
.table-striped,
.table-bordered,
.table-hover {
    background-color: transparent !important;
    color: #e0e0e0 !important;
    border-color: rgba(68, 68, 68, 0.2) !important;
}

.table thead th,
.table-sm thead th,
.table thead td,
.table-sm thead td {
    background: linear-gradient(180deg, #252525 0%, #222 100%) !important;
    color: #b0b0b0 !important;
    border-color: rgba(68, 68, 68, 0.2) !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: 1px solid rgba(58, 58, 58, 0.5) !important;
}

.table tbody td:not(.alert-high):not(.alert-low),
.table-sm tbody td:not(.alert-high):not(.alert-low),
.table tbody th:not(.alert-high):not(.alert-low),
.table-sm tbody th:not(.alert-high):not(.alert-low) {
    background-color: transparent !important;
    color: #c0c0c0 !important;
    border-color: rgba(68, 68, 68, 0.2) !important;
}

.table.table-bordered th:not(:last-child),
.table.table-bordered td:not(:last-child),
.table-sm.table-bordered th:not(:last-child),
.table-sm.table-bordered td:not(:last-child) {
    border-right: 1px solid rgba(68, 68, 68, 0.2) !important;
}

.table tfoot th,
.table-sm tfoot th,
.table tfoot td,
.table-sm tfoot td {
    border-color: rgba(68, 68, 68, 0.2) !important;
    border-top: 1px solid rgba(68, 68, 68, 0.2) !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: none !important;
}

/* Ensure container backgrounds are dark */
.container-fluid {
    background-color: #1a1a1a !important;
    color: #e0e0e0;
}

.container {
    background-color: #1a1a1a !important;
    color: #e0e0e0;
}

/* ============================================
   FORM CONTROLS
   ============================================ */

.form-control {
    background-color: #222;
    border-color: #000;
    color: #e6e6e6;
    padding: 6px 10px;
    height: auto;
}

.form-control:focus {
    background-color: #333;
    border-color: #666;
    color: #fff;
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.15);
}

.form-control:disabled,
.form-control[readonly] {
    background-color: #1a1a1a;
}

.input-group-text {
    background-color: #1b1b1b;
    color: gainsboro;
    border-color: black;
}

.input-group {
    border-radius: 0 !important;
}

.input-group-sm {
    height: 100%;
}

.input-group-sm .form-control,
.input-group-append .btn {
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 4px 8px !important;
}

.input-group-append {
    margin-left: 0 !important;
}

input[type="search"] {
    color: white;
}

#symbolSearch {
    background-color: #2c2c2c;
    border: 1px solid #444;
    border-radius: 4px;
    color: #e6e6e6;
    padding: 10px 15px;
    font-size: 0.95rem;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Prevent mobile zoom on search inputs - font-size must be at least 16px */
@media screen and (max-width: 768px) {

    input[type="text"][id*="Filter"],
    input[type="text"][id*="Search"],
    input[type="search"],
    .symbol-filter-input input,
    #symbolSearch,
    #globalSearch,
    .filter input {
        font-size: 16px !important;
    }
}

#symbolSearch:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    background-color: #333;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn-warning {
    background-color: #1a1a1a;
    border-color: #00c183;
    color: gainsboro;
}

.btn-logout {
    background-color: #1a1a1a;
    border-color: gainsboro;
    color: gainsboro;
}

.btn-outline-success {
    color: #28a745;
    border-color: #28a745;
    background-color: rgba(40, 167, 69, 0.1);
}

.btn-outline-success:hover {
    background-color: #28a745;
    color: #fff;
}

.btn-outline-danger {
    color: #dc3545;
    border-color: #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
}

.btn-outline-danger:hover {
    background-color: #dc3545;
    color: #fff;
}

.btn-outline-success,
.btn-outline-danger,
.btn-outline-secondary {
    border-radius: 0 !important;
}

.submit-btn {
    background: linear-gradient(135deg, #ff7e42, #ff5722);
    border: none;
    color: white;
    padding: 12px 24px;
    font-weight: 600;
    border-radius: 4px;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(255, 87, 34, 0.3);
}

.submit-btn:hover {
    background: linear-gradient(135deg, #ff5722, #ff7e42);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 87, 34, 0.4);
}

button.dt-button,
div.dt-button,
a.dt-button,
input.dt-button {
    color: gainsboro !important;
}

.btn-increment,
.btn-increment-fade,
.btn-increment-float,
.btn-set-value {
    color: gainsboro;
    border-color: black;
}

/* Editable increment buttons */
.btn-increment-editable {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    min-height: auto;
    cursor: pointer;
}

.btn-increment-editable .increment-sign {
    font-weight: bold;
    margin-right: 0.25rem;
    user-select: none;
    flex-shrink: 0;
}

.btn-increment-editable .editable-increment-input {
    background: transparent;
    border: none;
    outline: none;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    text-align: center;
    flex: 1;
    min-width: 0;
    padding: 0;
    margin: 0;
    cursor: text;
    pointer-events: auto;
}

.btn-increment-editable[data-locked="true"] .editable-increment-input {
    cursor: pointer;
    pointer-events: none;
}

.btn-increment-editable[data-locked="false"] .editable-increment-input {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    padding: 0.125rem 0.25rem;
    pointer-events: auto;
}

.btn-increment-editable[data-locked="false"]:focus-within {
    outline: 2px solid rgba(255, 255, 255, 0.3);
    outline-offset: 1px;
}

.btn-increment-editable .editable-increment-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
}

/* Bulk lock toggle button */
.bulk-lock-toggle {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
}

.bulk-lock-icon {
    font-size: 1rem;
    user-select: none;
}

/* Quick actions header styling */
.quick-actions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quick-actions-header-mobile {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ============================================
   DROPDOWNS & MENUS
   ============================================ */

.dropdown-menu {
    color: gainsboro;
    background: #2b2b2b;
}

.dropdown-item {
    color: gainsboro;
}

.dropdown-item:hover {
    background: #808080;
}

.dropdown-menu-wide {
    min-width: 320px;
    max-width: 400px;
    padding: 8px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid #444;
    border-radius: 6px;
}

.dropdown-header {
    padding: 10px 16px 8px 16px;
    margin: 8px 0 4px 0;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.dropdown-menu-wide .dropdown-item {
    padding: 10px 16px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    display: flex;
    align-items: center;
}

.dropdown-menu-wide .dropdown-item:hover {
    background: #3a3a3a;
    border-left-color: #1e88e5;
    padding-left: 20px;
}

.dropdown-menu-wide .dropdown-item .text-muted {
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.dropdown-menu-wide .dropdown-item:hover .text-muted {
    opacity: 1;
}

.dropdown-menu-wide .badge {
    font-size: 0.7rem;
    padding: 2px 6px;
    font-weight: 500;
}

.dropdown-divider {
    margin: 8px 0;
    border-color: #444;
}

.dropdown-header svg {
    vertical-align: text-top;
}

/* ============================================
   PARAMETERS PAGE SPECIFIC
   ============================================ */

.param-edge-tol,
#chart-days,
#dateRangePicker {
    background-color: #2d2d2d;
    color: gainsboro;
    border-color: black;
}

/* Only apply param-fade styles to inputs, not containers */
input.param-fade,
.form-control.param-fade {
    background-color: #2d2d2d;
    color: #e0e0e0;
    border-color: black;
    font-weight: 500;
    font-size: 1.05em;
}

.param-label {
    background-color: #1e1e1e;
    transform: rotate(-50deg);
    border: none;
    text-align: left;
}

.fade-label {
    background-color: #1e1e1e;
    transform: rotate(-50deg);
    border: none;
    text-align: left;
}

#params-table th,
#params-table td {
    font-size: 1rem;
}

.table-container {
    margin: 20px 0;
    overflow: hidden;
    background-color: #1a1a1a;
}

/* Parameters table specific column highlighting */
.table th:nth-child(3),
.table td:nth-child(3) {
    background-color: #252525 !important;
    border-left: 2px solid #444 !important;
    border-right: 2px solid #444 !important;
    min-width: 80px;
}

.table td .btn-group {
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.table td:contains("False") {
    color: #a3a3a3;
}

.table td:contains("True") {
    color: #fff;
    font-weight: 500;
}

.table td:first-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table td {
    padding: 0 !important;
}

.table td form {
    height: 100%;
}

/* Toggle buttons */
.toggle-btn-group {
    display: flex;
    width: 100%;
    height: 34px;
    margin: 0;
}

.toggle-btn {
    flex: 1;
    padding: 0;
    border: 1px solid #444;
    background-color: #222;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.toggle-btn-true {
    color: #28a745;
    border-right: none;
}

.toggle-btn-false {
    color: #dc3545;
}

.toggle-btn:hover {
    background-color: #333;
}

.global-controls {
    background-color: #1a1a1a;
    padding: 8px 12px;
    border: 1px solid #333;
}

.quick-toggle-container {
    margin-bottom: 10px;
    background-color: #171717;
    padding: 10px;
    border-radius: 4px;
    position: relative;
}

.quick-toggle-label {
    color: #aaa;
    margin-bottom: 5px;
    margin-left: 10px;
}

.quick-toggle-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.quick-toggle-buttons {
    display: inline-block;
    white-space: nowrap;
    position: relative;
    left: 345px;
}

.quick-toggle-row {
    background-color: #171717;
    border-bottom: 2px solid #333;
}

.quick-toggle-row td {
    padding: 0 !important;
    vertical-align: middle;
    text-align: center;
}

.quick-toggle-row td:nth-child(3) {
    background-color: #252525 !important;
    border-left: 2px solid #444 !important;
    border-right: 2px solid #444 !important;
}

/* ============================================
   TRADING/MARKET SPECIFIC STYLES
   ============================================ */

.side-bid-high {
    background-color: lightpink !important;
    border: 4px double red !important;
    color: maroon !important;
    padding: 5px !important;
    box-sizing: border-box !important;
}

.side-bid-med {
    background-color: lightpink !important;
    border: 1px solid red !important;
    color: maroon !important;
    padding: 5px !important;
    box-sizing: border-box !important;
}

.side-bid-low {
    border: 1px solid red !important;
    padding: 5px !important;
    box-sizing: border-box !important;
}

.side-ask-high {
    background-color: lightgreen !important;
    border: 4px double green !important;
    color: green !important;
    padding: 5px !important;
    box-sizing: border-box !important;
}

.side-ask-med {
    background-color: lightgreen !important;
    border: 1px solid green !important;
    color: green !important;
    padding: 5px !important;
    box-sizing: border-box !important;
}

.side-ask-low {
    border: 1px solid green !important;
    padding: 5px !important;
    box-sizing: border-box !important;
}

/* ============================================
   PnL TRADES LIST STYLES - Unified styling
   ============================================ */

/* PnL High Positive (>= 5.0) */
#pnlTableTradesList tbody tr td.pnl-high-positive {
    background-color: rgba(40, 167, 69, 0.1) !important;
    border: 3px double green !important;
    color: #90ee90 !important;
    font-weight: 600 !important;
    box-shadow: 0 0 3px rgba(40, 167, 69, 0.3) !important;
}

/* PnL Medium Positive (> 1.0, < 5.0) */
#pnlTableTradesList tbody tr td.pnl-med-positive {
    background-color: rgba(40, 167, 69, 0.05) !important;
    color: #98fb98 !important;
    font-weight: 500 !important;
    border: 2px solid #28a745 !important;
}

/* PnL Low Positive (> 0.5, <= 1.0) */
#pnlTableTradesList tbody tr td.pnl-low-positive {
    /* color: #a0ffa0 !important; */
    /* font-weight: 500 !important; */
    border: 1px solid #28a745 !important;
}

/* PnL High Negative (<= -5.0) */
#pnlTableTradesList tbody tr td.pnl-high-negative {
    background-color: rgba(220, 53, 69, 0.1) !important;
    border: 3px double red !important;
    color: #ff9999 !important;
    font-weight: 600 !important;
    box-shadow: 0 0 3px rgba(220, 53, 69, 0.3) !important;
}

/* PnL Medium Negative (< -1.0, > -5.0) */
#pnlTableTradesList tbody tr td.pnl-med-negative {
    background-color: rgba(220, 53, 69, 0.05) !important;
    color: #ffaaaa !important;
    font-weight: 500 !important;
    border: 2px solid #dc3545 !important;
}

/* PnL Low Negative (< -0.5, >= -1.0) */
#pnlTableTradesList tbody tr td.pnl-low-negative {
    /* color: #ffbbbb !important; */
    /* font-weight: 500 !important; */
    border: 1px solid #dc3545 !important;
}

/* Ensure PnL styles persist on hover - styles inherit from base classes above */

/* PnL Trades List - Table Title */
.pnl-trades-list .table-title {
    float: left;
    margin-right: 15px;
    font-weight: bold;
    padding-top: 5px;
}

/* PnL Trades List - Bottom spacing */
.pnl-trades-list .bottom {
    padding: 10px 0;
}

/* PnL Trades List - Filter inputs */
#pnlTableTradesList .filters input {
    width: 100%;
    padding: 3px;
    box-sizing: border-box;
    font-size: 0.9em;
}

/* Prevent mobile zoom on search inputs - font-size must be at least 16px */
@media screen and (max-width: 768px) {

    #pnlTableTradesList #globalSearch,
    #pnlTableTradesList #columnSearchInput,
    #pnlTableTradesList .filters input,
    #pnlTableTradesList .filter input {
        font-size: 16px !important;
    }
}

#pnlTableTradesList .filters th {
    padding: 5px 2px;
}

/* Ensure the filter row is visible */
#pnlTableTradesList tr.filters {
    display: table-row !important;
}

/* Make sure buttons are visible */
#pnlTableTradesList .dt-buttons {
    margin-bottom: 10px;
}

/* Row highlighting styles */
#pnlTableTradesList tr.highlighted {
    background-color: #e6f7ff !important;
}

#pnlTableTradesList tr.highlighted td {
    color: #000 !important;
}

/* Ensure text stays black on hover for high/medium PnL cells with color classes */
#pnlTableTradesList tbody tr:hover td.side-ask-high,
#pnlTableTradesList tbody tr:hover td.side-ask-med,
#pnlTableTradesList tbody tr:hover td.side-bid-high,
#pnlTableTradesList tbody tr:hover td.side-bid-med {
    color: #000 !important;
}

/* Make sure highlighted row does not lose formatting on hover */
#pnlTableTradesList tbody tr.highlighted:hover {
    background-color: #d1efff !important;
}

#pnlTableTradesList tbody tr.highlighted:hover td {
    color: #000 !important;
}

/* Enhanced highlighting for extreme PnL values - combined classes */
#pnlTableTradesList tbody tr td.side-ask-high.alert-high,
#pnlTableTradesList tbody tr:hover td.side-ask-high.alert-high {
    background-color: rgba(40, 167, 69, 0.6) !important;
    border: 3px double green !important;
    color: #00ff00 !important;
    font-weight: 700 !important;
    box-shadow: 0 0 5px rgba(40, 167, 69, 0.5);
}

#pnlTableTradesList tbody tr td.side-bid-high.alert-high,
#pnlTableTradesList tbody tr:hover td.side-bid-high.alert-high {
    background-color: rgba(220, 53, 69, 0.6) !important;
    border: 3px double red !important;
    color: #ff4444 !important;
    font-weight: 700 !important;
    box-shadow: 0 0 5px rgba(220, 53, 69, 0.5);
}

/* Ensure notional column highlights are visible - but exclude PnL columns */
#pnlTableTradesList tbody tr td.alert-high:not(:nth-child(2)):not(:nth-child(3)) {
    background-color: rgba(220, 53, 69, 0.4) !important;
    color: #ff6b6b !important;
    font-weight: 600 !important;
}

#pnlTableTradesList tbody tr td.alert-low:not(:nth-child(2)):not(:nth-child(3)) {
    background-color: rgba(255, 193, 7, 0.4) !important;
    color: #ffc107 !important;
    font-weight: 500 !important;
}

/* Ensure PnL columns (2nd and 3rd) never get alert styling - PnL classes always win */
#pnlTableTradesList tbody tr td:nth-child(2).alert-high,
#pnlTableTradesList tbody tr td:nth-child(2).alert-low,
#pnlTableTradesList tbody tr td:nth-child(3).alert-high,
#pnlTableTradesList tbody tr td:nth-child(3).alert-low {
    background-color: transparent !important;
    color: inherit !important;
    font-weight: inherit !important;
    border-color: inherit !important;
}

/* Frozen columns: timestamp through exch sell (columns 1-9, 0-indexed as 0-8) */
/* Headers need higher z-index to appear above body cells */
#pnlTableTradesList thead tr:first-child th:nth-child(1),
#pnlTableTradesList thead tr:first-child th:nth-child(2),
#pnlTableTradesList thead tr:first-child th:nth-child(3),
#pnlTableTradesList thead tr:first-child th:nth-child(4),
#pnlTableTradesList thead tr:first-child th:nth-child(5),
#pnlTableTradesList thead tr:first-child th:nth-child(6),
#pnlTableTradesList thead tr:first-child th:nth-child(7),
#pnlTableTradesList thead tr:first-child th:nth-child(8),
#pnlTableTradesList thead tr:first-child th:nth-child(9),
#pnlTableTradesList thead tr.filters th:nth-child(1),
#pnlTableTradesList thead tr.filters th:nth-child(2),
#pnlTableTradesList thead tr.filters th:nth-child(3),
#pnlTableTradesList thead tr.filters th:nth-child(4),
#pnlTableTradesList thead tr.filters th:nth-child(5),
#pnlTableTradesList thead tr.filters th:nth-child(6),
#pnlTableTradesList thead tr.filters th:nth-child(7),
#pnlTableTradesList thead tr.filters th:nth-child(8),
#pnlTableTradesList thead tr.filters th:nth-child(9) {
    position: -webkit-sticky;
    position: sticky;
    z-index: 100;
    background-color: inherit;
}

/* Body cells need lower z-index but still above non-frozen columns - apply to ALL rows */
#pnlTableTradesList tbody tr td:nth-child(1),
#pnlTableTradesList tbody tr td:nth-child(2),
#pnlTableTradesList tbody tr td:nth-child(3),
#pnlTableTradesList tbody tr td:nth-child(4),
#pnlTableTradesList tbody tr td:nth-child(5),
#pnlTableTradesList tbody tr td:nth-child(6),
#pnlTableTradesList tbody tr td:nth-child(7),
#pnlTableTradesList tbody tr td:nth-child(8),
#pnlTableTradesList tbody tr td:nth-child(9) {
    position: -webkit-sticky;
    position: sticky;
    z-index: 50;
    background-color: inherit;
}

/* Left positions for sticky columns are set dynamically via JavaScript */

.funding-interval-1 {
    border: 2px dashed red !important;
}

.funding-interval-2 {
    border: 2px dashed orange !important;
}

.funding-interval-4 {
    border: 2px dashed yellow !important;
}

.delay-bar {
    padding: 1px;
    font-size: 12px;
    text-align: center;
    width: 100%;
    color: orangered;
    border: 1px solid orangered;
    background-color: khaki;
}

.toolbarSpotBalances,
.toolbarMarketTable,
.toolbarOrdersTable {
    float: left;
}

.custom-control-box {
    padding: 10px;
}

td.highlight {
    background-color: gainsboro !important;
}

/* ============================================
   NAVBAR STYLING - Chivo Mono Font
   ============================================ */
.navbar,
.navbar *,
.navbar-brand,
.navbar-nav,
.navbar-nav .nav-link,
.navbar-nav .dropdown-toggle,
.navbar-nav .dropdown-item,
.navbar-nav .btn,
.navbar-nav .btn-logout,
.navbar-nav form,
.navbar-nav .dropdown-menu,
.navbar-nav .dropdown-header,
.navbar-nav .list-group,
.navbar-nav .list-group-item,
.navbar-nav .badge,
.navbar-toggler,
#navbarSupportedContent>ul.nav.navbar-nav.mr-auto>li>a,
#navbarSupportedContent .dropdown-menu .dropdown-item,
#navbarSupportedContent .btn,
#navbarSupportedContent form,
.logout-link,
.logout-link .btn {
    font-family: 'Chivo Mono', monospace !important;
}

/* ============================================
   BALANCES PAGE SPECIFIC
   ============================================ */

.balances-page {
    position: relative;
    padding: 20px;
    background-color: #1a1a1a;
    color: #e0e0e0;
}

.balances-page .filter-controls {
    position: fixed;
    top: 80px;
    right: 20px;
    display: inline-flex;
    align-items: stretch;
    background-color: #1f1f1f;
    border: 1px solid #333;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    overflow: hidden;
}

.balances-page .symbol-filter-input {
    position: relative;
    display: flex;
    align-items: center;
}

.balances-page .symbol-filter-input::before {
    content: '⌘K';
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 10px;
    opacity: 0.8;
    pointer-events: none;
    z-index: 1;
}

.balances-page .symbol-filter-input input {
    width: 280px;
    padding: 10px 14px 10px 38px;
    border: none;
    border-radius: 0;
    background-color: #262626;
    color: #e0e0e0;
    font-size: 13px;
    transition: background-color 0.2s ease;
}

/* Prevent mobile zoom on search inputs - font-size must be at least 16px */
@media screen and (max-width: 768px) {

    .balances-page .symbol-filter-input input,
    .funding-rates-page .symbol-filter-input input {
        font-size: 16px !important;
    }
}

.balances-page .symbol-filter-input input:focus {
    outline: none;
    background-color: #2a2a2a;
}

.balances-page .symbol-filter-input input::placeholder {
    color: #666;
}

.balances-page .row-filter-input {
    position: relative;
    display: flex;
    align-items: center;
    border-left: 1px solid #333;
}

.balances-page .row-filter-input::before {
    content: '⌘J';
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 10px;
    opacity: 0.8;
    pointer-events: none;
    z-index: 1;
}

.balances-page .row-filter-input input {
    width: 280px;
    padding: 10px 14px 10px 38px;
    border: none;
    border-radius: 0;
    background-color: #262626;
    color: #e0e0e0;
    font-size: 13px;
    transition: background-color 0.2s ease;
}

/* Mobile floating search button */
.mobile-search-toggle {
    display: none;
}

@media screen and (max-width: 768px) {

    /* Hide filter controls on mobile, show floating button instead */
    .balances-page .filter-controls,
    .balances-margin-page .filter-controls,
    .markouts-page .filter-controls {
        position: fixed !important;
        top: auto !important;
        bottom: 20px !important;
        right: 20px !important;
        left: auto !important;
        width: auto !important;
        flex-direction: column;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.3s ease, opacity 0.3s ease;
        border-radius: 12px;
        z-index: 1001;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    }

    .balances-page .filter-controls.expanded,
    .balances-margin-page .filter-controls.expanded,
    .markouts-page .filter-controls.expanded {
        max-height: 500px;
        opacity: 1;
        bottom: 80px !important;
    }

    /* Show floating magnifying glass button */
    .mobile-search-toggle {
        display: flex;
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background-color: #555;
        color: #fff;
        border: none;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 1002;
        transition: transform 0.2s ease, background-color 0.2s ease;
    }

    .mobile-search-toggle:hover {
        background-color: #666;
        transform: scale(1.05);
    }

    .mobile-search-toggle:active {
        transform: scale(0.95);
    }

    .mobile-search-toggle.active {
        background-color: #444;
    }

    .mobile-search-toggle svg {
        width: 24px;
        height: 24px;
        fill: currentColor;
    }

    /* Adjust filter controls layout for mobile */
    .balances-page .filter-controls .symbol-filter-input,
    .balances-page .filter-controls .row-filter-input,
    .balances-margin-page .filter-controls .row-filter-input,
    .markouts-page .filter-controls .symbol-filter-input {
        width: 100%;
        border-left: none;
        border-top: 1px solid #333;
    }

    .balances-page .filter-controls .symbol-filter-input:first-child,
    .balances-page .filter-controls .row-filter-input:first-child,
    .balances-margin-page .filter-controls .row-filter-input:first-child,
    .markouts-page .filter-controls .symbol-filter-input:first-child {
        border-top: none;
    }

    .balances-page .filter-controls .symbol-filter-input input,
    .balances-page .filter-controls .row-filter-input input,
    .balances-margin-page .filter-controls .row-filter-input input,
    .markouts-page .filter-controls .symbol-filter-input input {
        width: 100%;
        min-width: 280px;
        font-size: 16px !important;
    }

    .balances-page .filter-controls .csv-export-btn,
    .balances-margin-page .filter-controls .csv-export-btn,
    .markouts-page .filter-controls .csv-export-btn {
        border-left: none;
        border-top: 1px solid #333;
        width: 100%;
    }

    /* Prevent mobile zoom on search inputs - font-size must be at least 16px */
    .balances-page .symbol-filter-input input,
    .balances-page .row-filter-input input,
    .funding-rates-page .symbol-filter-input input {
        font-size: 16px !important;
    }
}

.balances-page .row-filter-input input:focus {
    outline: none;
    background-color: #2a2a2a;
}

.balances-page .row-filter-input input::placeholder {
    color: #666;
}

.balances-page .csv-export-btn {
    padding: 10px 18px;
    border: none;
    border-left: 1px solid #333;
    border-radius: 0;
    background-color: #262626;
    color: #e0e0e0;
    font-size: 13px;
    font-family: 'Chivo Mono', monospace;
    font-weight: 500;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.balances-page .csv-export-btn:hover {
    background-color: #2d2d2d;
    color: #fff;
}

.balances-page .csv-export-btn:active {
    background-color: #333;
}

.balances-page .exchange-cell {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 200px;
    max-width: 200px;
    overflow: hidden;
}

.balances-page .exchange-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.balances-page .alert-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: #ff6b6b;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    cursor: help;
    position: relative;
    z-index: 100000 !important;
    /* Higher than custom tooltips to ensure badge tooltip is always visible */
}

.balances-page .exchange-cell {
    position: relative;
    z-index: 100000 !important;
    /* Higher than custom tooltips */
}

.balances-page .alert-badge:hover::after {
    content: attr(title);
    position: absolute;
    top: 50%;
    left: calc(100% + 8px);
    transform: translateY(-50%);
    padding: 8px 12px;
    background-color: #1f1f1f;
    color: #e0e0e0;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    border: 1px solid #444;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 100001 !important;
    /* Highest z-index to ensure badge tooltip is always on top */
    pointer-events: none;
    opacity: 1;
    transition: none;
}

.balances-page .alert-badge:hover::before {
    content: '';
    position: absolute;
    top: 50%;
    left: calc(100% + 2px);
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-right: 6px solid #444;
    z-index: 10001;
    pointer-events: none;
}

.balances-page table tbody td {
    overflow: visible !important;
}

.balances-page table thead th {
    overflow: visible !important;
}

.balances-page table {
    overflow: visible !important;
}

.balances-page .table-responsive {
    overflow-x: auto !important;
    overflow-y: visible !important;
}

.balances-page .table-responsive>table {
    overflow: visible !important;
}

/* Modern table styling for balances page */
.balances-page .table-responsive {
    background-color: #222222;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
    border: 1px solid #333333;
    scrollbar-width: thin;
    scrollbar-color: #444 #222222;
}

.balances-page .table-responsive::-webkit-scrollbar {
    height: 8px;
}

.balances-page .table-responsive::-webkit-scrollbar-track {
    background: #222222;
    border-radius: 4px;
}

.balances-page .table-responsive::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

.balances-page .table-responsive::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.balances-page .table-responsive:last-of-type {
    margin-bottom: 0;
}

.balances-page table {
    background-color: transparent;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(68, 68, 68, 0.3);
}

.balances-page table thead th {
    background: linear-gradient(180deg, #252525 0%, #222 100%);
    color: #b0b0b0;
    border-color: rgba(68, 68, 68, 0.4);
    font-weight: 500;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 6px;
    border-bottom: 1px solid #3a3a3a;
    position: sticky;
    top: 0;
    z-index: 10;
    white-space: nowrap;
}

.balances-page table tbody td:not(.alert-high):not(.alert-low) {
    padding: 5px;
    border-color: rgba(68, 68, 68, 0.25);
    font-size: 13px;
    color: #c0c0c0;
    transition: background-color 0.15s ease;
    background-color: transparent;
}

.balances-page .table-striped tbody tr:nth-of-type(odd) td:not(.alert-high):not(.alert-low) {
    background-color: #1d1d1d !important;
}

.balances-page .table-striped tbody tr:nth-of-type(even) td:not(.alert-high):not(.alert-low) {
    background-color: #222222 !important;
}

/* CRITICAL: Alert styles must override striped rows - place immediately after striped rules */
.balances-page .table-striped tbody tr td.alert-high,
.balances-page table tbody tr td.alert-high,
.balances-page tbody tr td.alert-high,
.balances-page td.alert-high,
.balances-page tr td.alert-high {
    background-color: rgba(220, 53, 69, 0.4) !important;
    color: #ff6b6b !important;
    font-weight: 600 !important;
    border-color: rgba(220, 53, 69, 0.5) !important;
}

.balances-page .table-striped tbody tr td.alert-low,
.balances-page table tbody tr td.alert-low,
.balances-page tbody tr td.alert-low,
.balances-page td.alert-low,
.balances-page tr td.alert-low {
    background-color: rgba(255, 193, 7, 0.4) !important;
    color: #ffc107 !important;
    font-weight: 500 !important;
    border-color: rgba(255, 193, 7, 0.5) !important;
}

.balances-page .table-hover tbody tr:hover td:not(.alert-high):not(.alert-low) {
    background-color: #2a2a2a !important;
}

/* Balances page alert highlighting - ensure it overrides everything */
.balances-page td.alert-high,
.balances-page th.alert-high,
.balances-page .table td.alert-high,
.balances-page .table th.alert-high,
.balances-page table td.alert-high,
.balances-page table th.alert-high,
.balances-page tbody td.alert-high,
.balances-page tbody th.alert-high,
.balances-page #balancesTable td.alert-high,
.balances-page #totalsTable td.alert-high,
.balances-page .balance-total-cell.alert-high {
    background-color: rgba(220, 53, 69, 0.4) !important;
    color: #ff6b6b !important;
    font-weight: 600 !important;
    border-color: rgba(220, 53, 69, 0.5) !important;
}

.balances-page td.alert-low,
.balances-page th.alert-low,
.balances-page .table td.alert-low,
.balances-page .table th.alert-low,
.balances-page table td.alert-low,
.balances-page table th.alert-low,
.balances-page tbody td.alert-low,
.balances-page tbody th.alert-low,
.balances-page #balancesTable td.alert-low,
.balances-page #totalsTable td.alert-low,
.balances-page .balance-total-cell.alert-low {
    background-color: rgba(255, 193, 7, 0.4) !important;
    color: #ffc107 !important;
    font-weight: 500 !important;
    border-color: rgba(255, 193, 7, 0.5) !important;
}

.balances-page .table-striped tbody tr:nth-of-type(odd) td.alert-high,
.balances-page .table-striped tbody tr:nth-of-type(even) td.alert-high {
    background-color: rgba(220, 53, 69, 0.4) !important;
    color: #ff6b6b !important;
}

.balances-page .table-striped tbody tr:nth-of-type(odd) td.alert-low,
.balances-page .table-striped tbody tr:nth-of-type(even) td.alert-low {
    background-color: rgba(255, 193, 7, 0.4) !important;
    color: #ffc107 !important;
}

.balances-page .table-hover tbody tr:hover td.alert-high {
    background-color: rgba(220, 53, 69, 0.5) !important;
    color: #ff6b6b !important;
}

.balances-page .table-hover tbody tr:hover td.alert-low {
    background-color: rgba(255, 193, 7, 0.5) !important;
    color: #ffc107 !important;
}

/* Ultra-specific alert rules to ensure they work - must come last */
.balances-page #balancesTable.table-sm.table-bordered.table-striped tbody tr td.alert-high,
.balances-page #totalsTable.table-sm.table-bordered.table-striped tbody tr td.alert-high,
.balances-page #balancesTable.table.table-bordered.table-striped tbody tr td.alert-high,
.balances-page #totalsTable.table.table-bordered.table-striped tbody tr td.alert-high,
.balances-page #balancesTable.table-sm tbody tr td.alert-high,
.balances-page #totalsTable.table-sm tbody tr td.alert-high,
.balances-page #balancesTable tbody tr td.alert-high,
.balances-page #totalsTable tbody tr td.alert-high,
.balances-page table tbody td.alert-high {
    background-color: rgba(220, 53, 69, 0.4) !important;
    color: #ff6b6b !important;
    font-weight: 600 !important;
    border-color: rgba(220, 53, 69, 0.5) !important;
}

.balances-page #balancesTable.table-sm.table-bordered.table-striped tbody tr td.alert-low,
.balances-page #totalsTable.table-sm.table-bordered.table-striped tbody tr td.alert-low,
.balances-page #balancesTable.table.table-bordered.table-striped tbody tr td.alert-low,
.balances-page #totalsTable.table.table-bordered.table-striped tbody tr td.alert-low,
.balances-page #balancesTable.table-sm tbody tr td.alert-low,
.balances-page #totalsTable.table-sm tbody tr td.alert-low,
.balances-page #balancesTable tbody tr td.alert-low,
.balances-page #totalsTable tbody tr td.alert-low,
.balances-page table tbody td.alert-low {
    background-color: rgba(255, 193, 7, 0.4) !important;
    color: #ffc107 !important;
    font-weight: 500 !important;
    border-color: rgba(255, 193, 7, 0.5) !important;
}

.balances-page table.table-bordered {
    border: 1px solid rgba(68, 68, 68, 0.3);
}

.balances-page table.table-bordered th,
.balances-page table.table-bordered td {
    border-top: 1px solid rgba(68, 68, 68, 0.2);
    border-bottom: 1px solid rgba(68, 68, 68, 0.2);
}

.balances-page table.table-bordered th:not(:last-child),
.balances-page table.table-bordered td:not(:last-child),
.balances-page table.table-bordered th.alert-high:not(:last-child),
.balances-page table.table-bordered td.alert-high:not(:last-child),
.balances-page table.table-bordered th.alert-low:not(:last-child),
.balances-page table.table-bordered td.alert-low:not(:last-child) {
    border-right: 1px solid rgba(68, 68, 68, 0.2);
}

.balances-page table.table-bordered th:first-child,
.balances-page table.table-bordered td:first-child {
    border-left: none;
}

/* Frozen columns for balances page */
/* Totals table: freeze first column */
.balances-page #totalsTable thead th:first-child,
.balances-page #totalsTable tbody td:first-child {
    position: sticky;
    left: 0;
    z-index: 20;
    background-color: #222222 !important;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.3);
    background-clip: border-box;
}

.balances-page #totalsTable thead th:first-child::before,
.balances-page #totalsTable tbody td:first-child::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -2px;
    right: -1px;
    bottom: -1px;
    background-color: inherit;
    z-index: -1;
    pointer-events: none;
}

.balances-page #totalsTable thead th:first-child {
    background: linear-gradient(180deg, #252525 0%, #222 100%) !important;
    z-index: 21;
    background-clip: border-box;
}

.balances-page #totalsTable thead th:first-child::before {
    background: linear-gradient(180deg, #252525 0%, #222 100%) !important;
}

/* Handle striped rows for frozen column */
.balances-page #totalsTable.table-striped tbody tr:nth-of-type(odd) td:first-child {
    background-color: #1d1d1d !important;
    background-clip: border-box;
}

.balances-page #totalsTable.table-striped tbody tr:nth-of-type(odd) td:first-child::before {
    background-color: #1d1d1d !important;
}

.balances-page #totalsTable.table-striped tbody tr:nth-of-type(even) td:first-child {
    background-color: #222222 !important;
    background-clip: border-box;
}

.balances-page #totalsTable.table-striped tbody tr:nth-of-type(even) td:first-child::before {
    background-color: #222222 !important;
}

.balances-page #totalsTable.table-hover tbody tr:hover td:first-child {
    background-color: #2a2a2a !important;
    background-clip: border-box;
}

.balances-page #totalsTable.table-hover tbody tr:hover td:first-child::before {
    background-color: #2a2a2a !important;
}

/* Handle alert classes for frozen column */
.balances-page #totalsTable tbody tr td:first-child.alert-high {
    background-color: rgba(220, 53, 69, 0.4) !important;
    color: #ff6b6b !important;
    background-clip: border-box;
}

.balances-page #totalsTable tbody tr td:first-child.alert-high::before {
    background-color: rgba(220, 53, 69, 0.4) !important;
}

.balances-page #totalsTable tbody tr td:first-child.alert-low {
    background-color: rgba(255, 193, 7, 0.4) !important;
    color: #ffc107 !important;
    background-clip: border-box;
}

.balances-page #totalsTable tbody tr td:first-child.alert-low::before {
    background-color: rgba(255, 193, 7, 0.4) !important;
}

.balances-page #totalsTable thead th:first-child.alert-high {
    background: linear-gradient(180deg, rgba(220, 53, 69, 0.5) 0%, rgba(220, 53, 69, 0.4) 100%) !important;
    color: #ff6b6b !important;
    background-clip: border-box;
}

.balances-page #totalsTable thead th:first-child.alert-high::before {
    background: linear-gradient(180deg, rgba(220, 53, 69, 0.5) 0%, rgba(220, 53, 69, 0.4) 100%) !important;
}

/* Balances table: freeze first and second columns */
.balances-page #balancesTable thead th:nth-child(1),
.balances-page #balancesTable tbody td:nth-child(1),
.balances-page #balancesTable thead th:nth-child(2),
.balances-page #balancesTable tbody td:nth-child(2) {
    position: sticky;
    z-index: 20;
    background-color: #222222 !important;
    background-clip: border-box;
}

.balances-page #balancesTable thead th:nth-child(1)::before,
.balances-page #balancesTable tbody td:nth-child(1)::before,
.balances-page #balancesTable thead th:nth-child(2)::before,
.balances-page #balancesTable tbody td:nth-child(2)::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -2px;
    right: -1px;
    bottom: -1px;
    background-color: inherit;
    z-index: -1;
    pointer-events: none;
}

.balances-page #balancesTable thead th:nth-child(1),
.balances-page #balancesTable tbody td:nth-child(1) {
    left: 0;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.3);
}

.balances-page #balancesTable.table-striped tbody tr:nth-of-type(odd) td:nth-child(1).exchange-cell {
    background-color: #1d1d1d !important;
}

.balances-page #balancesTable.table-striped tbody tr:nth-of-type(odd) td:nth-child(1).exchange-cell::before {
    background-color: #1d1d1d !important;
}

.balances-page #balancesTable.table-striped tbody tr:nth-of-type(even) td:nth-child(1).exchange-cell {
    background-color: #222222 !important;
}

.balances-page #balancesTable.table-striped tbody tr:nth-of-type(even) td:nth-child(1).exchange-cell::before {
    background-color: #222222 !important;
}

.balances-page #balancesTable.table-hover tbody tr:hover td:nth-child(1).exchange-cell {
    background-color: #2a2a2a !important;
}

.balances-page #balancesTable.table-hover tbody tr:hover td:nth-child(1).exchange-cell::before {
    background-color: #2a2a2a !important;
}

.balances-page #balancesTable thead th:nth-child(2),
.balances-page #balancesTable tbody td:nth-child(2) {
    /* left will be set dynamically via JavaScript based on first column width */
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.3);
}

.balances-page #balancesTable thead th:nth-child(1),
.balances-page #balancesTable thead th:nth-child(2) {
    background: linear-gradient(180deg, #252525 0%, #222 100%) !important;
    z-index: 21;
    background-clip: border-box;
}

.balances-page #balancesTable thead th:nth-child(1)::before,
.balances-page #balancesTable thead th:nth-child(2)::before {
    background: linear-gradient(180deg, #252525 0%, #222 100%) !important;
}

/* Handle striped rows for frozen columns */
.balances-page #balancesTable.table-striped tbody tr:nth-of-type(odd) td:nth-child(1),
.balances-page #balancesTable.table-striped tbody tr:nth-of-type(odd) td:nth-child(2) {
    background-color: #1d1d1d !important;
    background-clip: border-box;
}

.balances-page #balancesTable.table-striped tbody tr:nth-of-type(odd) td:nth-child(1)::before,
.balances-page #balancesTable.table-striped tbody tr:nth-of-type(odd) td:nth-child(2)::before {
    background-color: #1d1d1d !important;
}

.balances-page #balancesTable.table-striped tbody tr:nth-of-type(even) td:nth-child(1),
.balances-page #balancesTable.table-striped tbody tr:nth-of-type(even) td:nth-child(2) {
    background-color: #222222 !important;
    background-clip: border-box;
}

.balances-page #balancesTable.table-striped tbody tr:nth-of-type(even) td:nth-child(1)::before,
.balances-page #balancesTable.table-striped tbody tr:nth-of-type(even) td:nth-child(2)::before {
    background-color: #222222 !important;
}

.balances-page #balancesTable.table-hover tbody tr:hover td:nth-child(1),
.balances-page #balancesTable.table-hover tbody tr:hover td:nth-child(2) {
    background-color: #2a2a2a !important;
    background-clip: border-box;
}

.balances-page #balancesTable.table-hover tbody tr:hover td:nth-child(1)::before,
.balances-page #balancesTable.table-hover tbody tr:hover td:nth-child(2)::before {
    background-color: #2a2a2a !important;
}

/* Handle alert classes for frozen columns */
.balances-page #balancesTable tbody tr td:nth-child(1).alert-high,
.balances-page #balancesTable tbody tr td:nth-child(2).alert-high {
    background-color: rgba(220, 53, 69, 0.4) !important;
    color: #ff6b6b !important;
    background-clip: border-box;
}

.balances-page #balancesTable tbody tr td:nth-child(1).alert-high::before,
.balances-page #balancesTable tbody tr td:nth-child(2).alert-high::before {
    background-color: rgba(220, 53, 69, 0.4) !important;
}

.balances-page #balancesTable tbody tr td:nth-child(1).alert-low,
.balances-page #balancesTable tbody tr td:nth-child(2).alert-low {
    background-color: rgba(255, 193, 7, 0.4) !important;
    color: #ffc107 !important;
    background-clip: border-box;
}

.balances-page #balancesTable tbody tr td:nth-child(1).alert-low::before,
.balances-page #balancesTable tbody tr td:nth-child(2).alert-low::before {
    background-color: rgba(255, 193, 7, 0.4) !important;
}

.balances-page #balancesTable tbody tr td:nth-child(1).latency-high,
.balances-page #balancesTable tbody tr td:nth-child(2).latency-high {
    background-color: rgba(220, 53, 69, 0.4) !important;
    background-clip: border-box;
}

.balances-page #balancesTable tbody tr td:nth-child(1).latency-high::before,
.balances-page #balancesTable tbody tr td:nth-child(2).latency-high::before {
    background-color: rgba(220, 53, 69, 0.4) !important;
}

.balances-page #balancesTable tbody tr td:nth-child(1).latency-warning,
.balances-page #balancesTable tbody tr td:nth-child(2).latency-warning {
    background-color: rgba(255, 193, 7, 0.4) !important;
    background-clip: border-box;
}

.balances-page #balancesTable tbody tr td:nth-child(1).latency-warning::before,
.balances-page #balancesTable tbody tr td:nth-child(2).latency-warning::before {
    background-color: rgba(255, 193, 7, 0.4) !important;
}

.balances-page table.table-bordered th:last-child,
.balances-page table.table-bordered td:last-child {
    border-right: none;
}

#totalsTable {
    margin-bottom: 0;
}

#balancesTable {
    margin-top: 0;
}

/* ============================================
   MARGIN BALANCES PAGE SPECIFIC
   ============================================ */

.balances-margin-page {
    position: relative;
    padding: 20px;
    background-color: #1a1a1a;
    color: #e0e0e0;
}

.balances-margin-page .filter-controls {
    position: fixed;
    top: 80px;
    right: 20px;
    display: inline-flex;
    align-items: stretch;
    background-color: #1f1f1f;
    border: 1px solid #333;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    overflow: hidden;
}

.balances-margin-page .row-filter-input {
    position: relative;
    display: flex;
    align-items: center;
}

.balances-margin-page .row-filter-input::before {
    content: '⌘J';
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 10px;
    opacity: 0.8;
    pointer-events: none;
    z-index: 1;
}

.balances-margin-page .row-filter-input input {
    width: 280px;
    padding: 10px 14px 10px 38px;
    border: none;
    border-radius: 0;
    background-color: #262626;
    color: #e0e0e0;
    font-size: 13px;
    transition: background-color 0.2s ease;
}

/* Prevent mobile zoom on search inputs - font-size must be at least 16px */
@media screen and (max-width: 768px) {
    .balances-margin-page .row-filter-input input {
        font-size: 16px !important;
    }
}

.balances-margin-page .row-filter-input input:focus {
    outline: none;
    background-color: #2a2a2a;
}

.balances-margin-page .row-filter-input input::placeholder {
    color: #666;
}

.balances-margin-page .csv-export-btn {
    padding: 10px 18px;
    border: none;
    border-left: 1px solid #333;
    border-radius: 0;
    background-color: #262626;
    color: #e0e0e0;
    font-size: 13px;
    font-family: 'Chivo Mono', monospace;
    font-weight: 500;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.balances-margin-page .csv-export-btn:hover {
    background-color: #2d2d2d;
    color: #fff;
}

.balances-margin-page .csv-export-btn:active {
    background-color: #333;
}

/* Margin balances page uses global modern table styling */

/* ============================================
   FUNDING PAGE STYLING
   ============================================ */

.container-fluid .filter-controls {
    position: fixed;
    top: 80px;
    right: 20px;
    display: inline-flex;
    align-items: stretch;
    background-color: #1f1f1f;
    border: 1px solid #333;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    overflow: hidden;
}

.container-fluid .csv-export-btn {
    padding: 10px 18px;
    border: none;
    border-radius: 0;
    background-color: #262626;
    color: #e0e0e0;
    font-size: 13px;
    font-family: 'Chivo Mono', monospace;
    font-weight: 500;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.container-fluid .csv-export-btn:hover {
    background-color: #2d2d2d;
    color: #fff;
}

.container-fluid .csv-export-btn:active {
    background-color: #333;
}

/* ============================================
   INDEX PAGE STYLING
   ============================================ */

.index-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 24px;
    font-family: 'Chivo Mono', monospace;
}

.hero-section {
    background-color: #2d2d2d;
    border-radius: 8px;
    padding: 32px 24px;
    margin-bottom: 40px;
    text-align: center;
    border: 1px solid rgba(68, 68, 68, 0.5);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Chivo Mono', monospace;
}

.hero-title svg {
    color: #1e88e5;
}

.hero-subtitle {
    font-size: 0.9375rem;
    color: #999;
    margin: 0;
    font-weight: 400;
    font-family: 'Chivo Mono', monospace;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.dashboard-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.section-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #e0e0e0;
    margin: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(68, 68, 68, 0.5);
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Chivo Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.8125rem;
}

.section-title svg {
    color: #1e88e5;
    width: 16px;
    height: 16px;
}

.dashboard-card {
    background-color: #2d2d2d;
    border-radius: 6px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: #e0e0e0;
    border: 1px solid rgba(68, 68, 68, 0.5);
    transition: background-color 0.2s ease, border-color 0.2s ease;
    position: relative;
}

.dashboard-card:hover {
    background-color: #333333;
    border-color: rgba(68, 68, 68, 0.8);
    text-decoration: none;
    color: #ffffff;
    box-shadow: none;
}

.card-icon {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: none;
}

.dashboard-card:hover .card-icon {
    transform: none;
}

.card-yellow .card-icon {
    background-color: #d68910;
    box-shadow: none;
}

.card-red .card-icon {
    background-color: #d94436;
    box-shadow: none;
}

.card-blue .card-icon {
    background-color: #2980b9;
    box-shadow: none;
}

.card-green .card-icon {
    background-color: #27ae60;
    box-shadow: none;
}

.card-icon svg {
    color: #ffffff;
}

.card-content {
    flex: 1;
}

.card-title {
    font-size: 0.9375rem;
    font-weight: 500;
    margin: 0 0 4px 0;
    color: #ffffff;
    font-family: 'Chivo Mono', monospace;
}

.card-description {
    font-size: 0.8125rem;
    color: #999;
    margin: 0;
    line-height: 1.5;
    font-family: 'Chivo Mono', monospace;
}

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 120px);
    padding: 40px 20px;
}

.login-card {
    background-color: #2d2d2d;
    border-radius: 8px;
    padding: 40px;
    border: 1px solid rgba(68, 68, 68, 0.5);
    max-width: 380px;
    width: 100%;
    font-family: 'Chivo Mono', monospace;
}

.login-form {
    text-align: left;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #e0e0e0;
    margin-bottom: 6px;
    font-family: 'Chivo Mono', monospace;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    font-size: 0.9375rem;
    background-color: #1e1e1e;
    border: 1px solid rgba(68, 68, 68, 0.6);
    border-radius: 4px;
    color: #ffffff;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
    font-family: 'Chivo Mono', monospace;
}

.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
    outline: none;
    border-color: #1e88e5;
    background-color: #1e1e1e;
}

.login-form input[type="text"]::placeholder,
.login-form input[type="password"]::placeholder {
    color: #666;
}

.login-form .alert {
    margin-bottom: 16px;
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 0.875rem;
    border: 1px solid rgba(220, 53, 69, 0.3);
    background-color: rgba(220, 53, 69, 0.1);
    color: #ff6b6b;
}

.btn-login {
    width: 100%;
    padding: 10px 16px;
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    background-color: #1e88e5;
    border: 1px solid #1e88e5;
    color: #ffffff;
    margin-top: 4px;
    font-family: 'Chivo Mono', monospace;
    box-shadow: none;
}

.btn-login:hover {
    background-color: #1976d2;
    border-color: #1976d2;
    box-shadow: none;
}

.btn-login:active {
    background-color: #1565c0;
    border-color: #1565c0;
    box-shadow: none;
}

.btn-login:focus {
    box-shadow: none;
    outline: none;
}

.login-card svg {
    color: #1e88e5;
    margin-bottom: 30px;
    filter: drop-shadow(0 0 10px rgba(30, 136, 229, 0.5));
}

.login-card .btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%);
    border: none;
    box-shadow: 0 5px 20px rgba(30, 136, 229, 0.4);
}

.login-card .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(30, 136, 229, 0.6);
}

/* Mobile responsiveness for login page */
@media (max-width: 768px) {
    .login-container {
        min-height: calc(100vh - 80px);
        padding: 20px 15px;
    }

    .login-card {
        padding: 30px 24px;
    }
}

.login-card .btn svg {
    margin: 0;
    filter: none;
}

/* ============================================
   MISC COMPONENTS
   ============================================ */

.list-group-item {
    background-color: #333 !important;
    color: gainsboro;
}

.jumbotron {
    background-color: #333 !important;
    color: gainsboro;
}

.logout-link {
    margin-top: 3px;
    margin-bottom: 3px;
}

.daterangepicker {
    background-color: gainsboro;
    color: #000;
}

.calendar-table table {
    background-color: gainsboro !important;
    color: #000 !important;
}

.scrollable-container {
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
}

.chart-row {
    height: 47vh;
    padding-right: 0;
    padding-left: 0;
}

.table-scroll-indicator {
    background-color: rgba(255, 255, 255, 0.05);
    color: #aaa;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 0.9rem;
    text-align: center;
    margin: 10px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    animation: pulse 2s infinite;
}

#card {
    background-color: #1e1e1e !important;
}

#pnlTableTradesList {
    border-collapse: separate;
    border-spacing: 0;
}

#pnlTableTradesList td {
    position: static;
}

.table-sm td,
.table-sm th {
    padding: 0.25rem;
    vertical-align: middle;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes glow {
    0% {
        box-shadow: 0 0 5px #ff00ff !important;
    }

    50% {
        box-shadow: 0 0 20px #ff00ff !important;
    }

    100% {
        box-shadow: 0 0 5px #ff00ff !important;
    }
}

.glow-effect {
    animation: glow 1.5s infinite !important;
    position: relative !important;
    z-index: 1 !important;
}

.glow-effect::after {
    content: '';
    position: absolute !important;
    top: -3px !important;
    left: -3px !important;
    right: -3px !important;
    bottom: -3px !important;
    border-radius: inherit !important;
    background: transparent !important;
    z-index: -1 !important;
    animation: glow 1.5s infinite !important;
}

@keyframes pulse {
    0% {
        opacity: 0.8;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.8;
    }
}

#submitAll {
    transition: all 0.3s ease;
}

/* ============================================
   RESPONSIVE / MEDIA QUERIES
   ============================================ */

@media only screen and (max-width: 600px) {
    .dataTables_paginate {
        display: none;
    }
}

@media (min-width: 993px) {

    .table th:first-child,
    .table td:first-child {
        width: 15%;
        max-width: 150px;
    }

    .table th:nth-child(2),
    .table td:nth-child(2) {
        width: 8%;
    }

    .table th:nth-child(3),
    .table td:nth-child(3) {
        width: 10%;
    }

    .table th:nth-child(n+4),
    .table td:nth-child(n+4) {
        width: 5%;
    }
}

@media (max-width: 768px) {
    .index-container {
        padding: 16px 12px;
    }

    .hero-section {
        display: none;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .dashboard-section {
        gap: 12px;
    }

    .section-title {
        display: none;
    }

    .dashboard-card {
        padding: 16px;
        gap: 14px;
        margin-bottom: 0;
    }

    .card-description {
        display: none;
    }

    .card-title {
        margin: 0;
        font-size: 0.95rem;
    }

    .card-icon {
        width: 40px;
        height: 40px;
    }

    .card-icon svg {
        width: 22px;
        height: 22px;
    }

    .login-card {
        padding: 40px 30px;
    }

    .table {
        width: auto;
        min-width: 100%;
    }

    .table th:first-child,
    .table td:first-child {
        min-width: 150px;
        max-width: 150px;
    }

    .table th:nth-child(2),
    .table td:nth-child(2) {
        min-width: 80px;
    }

    .table th:nth-child(3),
    .table td:nth-child(3) {
        min-width: 60px;
    }

    .table th:nth-child(n+4),
    .table td:nth-child(n+4) {
        min-width: 80px;
    }

    .input-group-sm .form-control,
    .input-group-sm .btn {
        height: 34px;
        font-size: 14px;
    }

    /* Disable sticky columns on mobile */
    .balances-page #totalsTable thead th:first-child,
    .balances-page #totalsTable tbody td:first-child {
        position: static !important;
        left: auto !important;
        box-shadow: none !important;
    }

    .balances-page #totalsTable thead th:first-child::before,
    .balances-page #totalsTable tbody td:first-child::before {
        display: none !important;
    }

    .balances-page #balancesTable thead th:nth-child(1),
    .balances-page #balancesTable tbody td:nth-child(1),
    .balances-page #balancesTable thead th:nth-child(2),
    .balances-page #balancesTable tbody td:nth-child(2) {
        position: static !important;
        left: auto !important;
        box-shadow: none !important;
    }

    .balances-page #balancesTable thead th:nth-child(1)::before,
    .balances-page #balancesTable tbody td:nth-child(1)::before,
    .balances-page #balancesTable thead th:nth-child(2)::before,
    .balances-page #balancesTable tbody td:nth-child(2)::before {
        display: none !important;
    }

    /* Hide all CSV export buttons on mobile */
    .csv-export-btn,
    .balances-page .csv-export-btn,
    .balances-margin-page .csv-export-btn,
    .markouts-page .csv-export-btn,
    .funding-rates-page .csv-export-btn,
    .container-fluid .csv-export-btn,
    #csvExportBtn,
    #exportAllBtn,
    #csvBtn {
        display: none !important;
    }

    /* Hide hotkey suggestions in search boxes on mobile */
    .balances-page .symbol-filter-input::before,
    .balances-page .row-filter-input::before,
    .balances-margin-page .row-filter-input::before,
    .markouts-page .symbol-filter-input::before,
    .funding-rates-page .symbol-filter-input::before {
        display: none !important;
        content: none !important;
    }

    /* Adjust input padding on mobile since hotkey suggestions are hidden */
    .balances-page .symbol-filter-input input,
    .balances-page .row-filter-input input,
    .balances-margin-page .row-filter-input input,
    .markouts-page .symbol-filter-input input,
    .funding-rates-page .symbol-filter-input input {
        padding-left: 14px !important;
    }
}

/* ============================================
   FINAL ALERT OVERRIDES - Highest Priority
   ============================================ */

/* Ensure alert highlighting works on balances page - these must be last */
/* Using attribute selector for maximum specificity */
.balances-page #balancesTable[class*="table-sm"][class*="table-bordered"][class*="table-striped"] tbody tr td[class*="alert-high"],
.balances-page #totalsTable[class*="table-sm"][class*="table-bordered"][class*="table-striped"] tbody tr td[class*="alert-high"],
.balances-page #balancesTable.table-sm.table-bordered.table-striped.table-hover tbody tr td.alert-high,
.balances-page #totalsTable.table-sm.table-bordered.table-striped.table-hover tbody tr td.alert-high {
    background-color: rgba(220, 53, 69, 0.4) !important;
    color: #ff6b6b !important;
    font-weight: 600 !important;
    border-color: rgba(220, 53, 69, 0.5) !important;
}

.balances-page #balancesTable[class*="table-sm"][class*="table-bordered"][class*="table-striped"] tbody tr td[class*="alert-low"],
.balances-page #totalsTable[class*="table-sm"][class*="table-bordered"][class*="table-striped"] tbody tr td[class*="alert-low"],
.balances-page #balancesTable.table-sm.table-bordered.table-striped.table-hover tbody tr td.alert-low,
.balances-page #totalsTable.table-sm.table-bordered.table-striped.table-hover tbody tr td.alert-low {
    background-color: rgba(255, 193, 7, 0.4) !important;
    color: #ffc107 !important;
    font-weight: 500 !important;
    border-color: rgba(255, 193, 7, 0.5) !important;
}

/* Override striped rows for alerts */
.balances-page #balancesTable.table-sm.table-striped tbody tr:nth-of-type(odd) td.alert-high,
.balances-page #balancesTable.table-sm.table-striped tbody tr:nth-of-type(even) td.alert-high,
.balances-page #totalsTable.table-sm.table-striped tbody tr:nth-of-type(odd) td.alert-high,
.balances-page #totalsTable.table-sm.table-striped tbody tr:nth-of-type(even) td.alert-high {
    background-color: rgba(220, 53, 69, 0.4) !important;
    color: #ff6b6b !important;
    border-color: rgba(220, 53, 69, 0.5) !important;
}

.balances-page #balancesTable.table-sm.table-striped tbody tr:nth-of-type(odd) td.alert-low,
.balances-page #balancesTable.table-sm.table-striped tbody tr:nth-of-type(even) td.alert-low,
.balances-page #totalsTable.table-sm.table-striped tbody tr:nth-of-type(odd) td.alert-low,
.balances-page #totalsTable.table-sm.table-striped tbody tr:nth-of-type(even) td.alert-low {
    background-color: rgba(255, 193, 7, 0.4) !important;
    color: #ffc107 !important;
    border-color: rgba(255, 193, 7, 0.5) !important;
}

/* ============================================
   PARAMETERS AMOUNT PAGE - MODERN RESPONSIVE
   ============================================ */

.parameters-amount-page {
    padding: 12px;
    max-width: 100%;
    overflow-x: hidden;
    width: 100%;
    box-sizing: border-box;
}

.parameters-header {
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(68, 68, 68, 0.3);
}

.parameters-header h4 {
    color: #e0e0e0;
    font-weight: 600;
    font-size: 1.25rem;
}

.parameters-header .text-muted {
    color: #888 !important;
}

/* Search Wrapper */
.search-wrapper {
    position: relative;
}

.search-wrapper input {
    border-radius: 8px;
    border: 1px solid #444;
    transition: all 0.2s ease;
}

.search-wrapper input:focus {
    border-color: #1e88e5;
    box-shadow: 0 0 0 0.2rem rgba(30, 136, 229, 0.25);
}

/* Submit All Button */
#submitAll {
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
}

#submitAll:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

/* Quick Actions Card - Mobile */
.quick-actions-card-mobile {
    background: linear-gradient(135deg, #222222 0%, #252525 100%);
    border-radius: 8px;
    padding: 10px;
    border: 1px solid #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    overflow-x: hidden;
    width: 100%;
    box-sizing: border-box;
}

.quick-actions-header-mobile {
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(68, 68, 68, 0.3);
}

.quick-actions-header-mobile h6 {
    color: #e0e0e0;
    font-weight: 600;
    font-size: 0.9rem;
    margin: 0;
}

.quick-actions-content-mobile {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

.quick-action-row-mobile {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 0;
    width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

.quick-action-group-mobile {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.quick-action-label-mobile {
    color: #aaa;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.btn-group-quick-mobile {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.btn-group-quick-mobile .btn {
    flex: 0 0 calc(50% - 2px);
    min-width: 0;
    max-width: calc(50% - 2px);
    border-radius: 4px;
    font-size: 0.85rem;
    padding: 8px 10px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.btn-group-quick-mobile .btn-increment-editable {
    flex: 0 0 calc(50% - 2px);
    min-width: 0;
    max-width: calc(50% - 2px);
    box-sizing: border-box;
}

/* Quick Actions Card - Desktop */
.quick-actions-card {
    background: linear-gradient(135deg, #222222 0%, #252525 100%);
    border-radius: 8px;
    padding: 10px 0;
    border: 1px solid #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.quick-actions-header {
    margin-bottom: 8px;
    padding: 0 12px 6px 12px;
    border-bottom: 1px solid rgba(68, 68, 68, 0.3);
}

.quick-actions-header h6 {
    color: #e0e0e0;
    font-weight: 600;
    font-size: 0.9rem;
    margin: 0;
}

.quick-actions-header small {
    font-size: 0.75rem;
}

.quick-actions-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0;
}

.quick-action-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

/* Aligned quick action row - matches table column widths exactly */
.quick-action-row-aligned {
    display: flex;
    padding: 6px 8px;
    gap: 0;
    align-items: flex-start;
    box-sizing: border-box;
}

.quick-action-spacer {
    padding: 0 8px;
}

.quick-action-spacer.param-symbol {
    flex: 0 0 15%;
    min-width: 100px;
}

.quick-action-spacer.param-level {
    flex: 0 0 12%;
    min-width: 80px;
}

.quick-action-spacer.param-override {
    flex: 1 1 auto;
    min-width: 120px;
}

.quick-action-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 8px;
    box-sizing: border-box;
    align-items: stretch;
}

.quick-action-group:not(:has(label)) {
    padding-top: 0;
    justify-content: center;
}

.quick-action-group.param-amount {
    flex: 0 0 18%;
    min-width: 140px;
}

.quick-action-group.param-balance {
    flex: 0 0 18%;
    min-width: 140px;
}

.quick-action-group.param-delta {
    flex: 0 0 18%;
    min-width: 140px;
}

.quick-action-group.param-edge {
    flex: 0 0 20%;
    min-width: 120px;
}

.quick-action-group.param-tolerance {
    flex: 0 0 20%;
    min-width: 120px;
}

.quick-action-group.param-arbitrage {
    flex: 0 0 20%;
    min-width: 140px;
}

.quick-action-group.param-paused {
    flex: 0 0 14%;
    min-width: 100px;
}

.quick-action-group.param-fade {
    flex: 0 0 18%;
    min-width: 140px;
}

.quick-action-group.param-auto-widen-edge {
    flex: 0 0 18%;
    min-width: 140px;
}

.quick-action-group.param-auto-widen-threshold {
    flex: 0 0 18%;
    min-width: 140px;
}

.quick-action-group.param-auto-widen-interval {
    flex: 0 0 18%;
    min-width: 140px;
}

.quick-action-label {
    color: #aaa;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.btn-group-quick {
    display: flex;
    gap: 3px;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
}

.btn-group-quick .btn {
    flex: 1;
    border-radius: 4px;
    font-size: 0.9rem;
    padding: 8px 12px;
    font-weight: 500;
    box-sizing: border-box;
    margin: 0;
}

.btn-group-quick .btn-increment-editable {
    flex: 0 0 calc(50% - 1.5px);
    min-width: 0;
    max-width: calc(50% - 1.5px);
    box-sizing: border-box;
    margin: 0;
    padding: 0.5rem 0.75rem !important;
    font-size: 0.9rem !important;
}

.btn-group-quick .btn:hover {
    transform: translateY(-1px);
}

/* Parameters Table Header (Desktop) */
.parameters-table-header {
    display: flex;
    background: linear-gradient(180deg, #252525 0%, #222 100%);
    border-radius: 8px 8px 0 0;
    border: 1px solid #333;
    border-bottom: none;
    padding: 8px 8px;
    margin-bottom: 0;
}

.param-header-cell {
    color: #b0b0b0;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 8px;
    display: flex;
    align-items: center;
}

.param-header-cell.param-symbol {
    flex: 0 0 15%;
    min-width: 100px;
}

.param-header-cell.param-level {
    flex: 0 0 12%;
    min-width: 80px;
}

.param-header-cell.param-amount {
    flex: 0 0 18%;
    min-width: 140px;
}

.param-header-cell.param-balance {
    flex: 0 0 18%;
    min-width: 140px;
}

.param-header-cell.param-delta {
    flex: 0 0 18%;
    min-width: 140px;
}

.param-header-cell.param-override {
    flex: 1 1 auto;
    min-width: 120px;
}

.param-header-cell.param-edge {
    flex: 0 0 20%;
    min-width: 120px;
}

.param-header-cell.param-tolerance {
    flex: 0 0 20%;
    min-width: 120px;
}

.param-header-cell.param-arbitrage {
    flex: 0 0 20%;
    min-width: 140px;
}

.param-header-cell.param-paused {
    flex: 0 0 14%;
    min-width: 100px;
}

.param-header-cell.param-fade {
    flex: 0 0 18%;
    min-width: 140px;
}

.param-header-cell.param-auto-widen-edge {
    flex: 0 0 18%;
    min-width: 140px;
}

.param-header-cell.param-auto-widen-threshold {
    flex: 0 0 18%;
    min-width: 140px;
}

.param-header-cell.param-auto-widen-interval {
    flex: 0 0 18%;
    min-width: 140px;
}

/* Parameters Forms Container */
.parameters-forms-container {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

/* Parameter Row (Desktop) */
.parameter-row-desktop {
    display: flex;
    background-color: #222;
    border: 1px solid #333;
    border-top: none;
    padding: 6px 8px;
    transition: background-color 0.15s ease;
    align-items: center;
}

.parameter-row-desktop:last-child {
    border-radius: 0 0 8px 8px;
}

.parameter-row-desktop:hover {
    background-color: #2a2a2a;
}

.parameter-row-desktop:nth-child(even) {
    background-color: #1d1d1d;
}

.parameter-row-desktop:nth-child(even):hover {
    background-color: #252525;
}

.param-cell {
    padding: 0 8px;
    display: flex;
    align-items: center;
}

.param-cell.param-symbol {
    flex: 0 0 15%;
    min-width: 100px;
}

.param-cell.param-level {
    flex: 0 0 12%;
    min-width: 80px;
}

.param-cell.param-amount {
    flex: 0 0 18%;
    min-width: 140px;
}

.param-cell.param-balance {
    flex: 0 0 18%;
    min-width: 140px;
}

.param-cell.param-delta {
    flex: 0 0 18%;
    min-width: 140px;
}

.param-cell.param-override {
    flex: 1 1 auto;
    min-width: 120px;
}

.param-cell.param-edge {
    flex: 0 0 20%;
    min-width: 120px;
}

.param-cell.param-tolerance {
    flex: 0 0 20%;
    min-width: 120px;
}

.param-cell.param-arbitrage {
    flex: 0 0 20%;
    min-width: 140px;
}

.param-cell.param-paused {
    flex: 0 0 14%;
    min-width: 100px;
}

.param-cell.param-fade {
    flex: 0 0 18%;
    min-width: 140px;
}

.param-cell.param-fade .form-control {
    background-color: #222 !important;
    color: gainsboro !important;
    border-color: #444 !important;
}

.param-cell.param-fade .input-group-param {
    background-color: transparent;
}

.param-cell.param-auto-widen-edge {
    flex: 0 0 18%;
    min-width: 140px;
}

.param-cell.param-auto-widen-threshold {
    flex: 0 0 18%;
    min-width: 140px;
}

.param-cell.param-auto-widen-interval {
    flex: 0 0 18%;
    min-width: 140px;
}

.param-readonly {
    background-color: transparent !important;
    border: none !important;
    color: #aaa !important;
    font-weight: 500;
    cursor: default;
}

.input-group-param {
    display: flex;
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #444;
}

.input-group-param .form-control {
    flex: 1;
    border: none;
    border-radius: 0;
    padding: 6px 10px;
}

.input-group-append-param {
    display: flex;
    border-left: 1px solid #444;
}

.input-group-append-param .btn {
    border: none;
    border-radius: 0;
    padding: 6px 12px;
    background-color: #2a2a2a;
    color: #e0e0e0;
    transition: all 0.2s ease;
}

.input-group-append-param .btn:hover {
    background-color: #333;
    color: #fff;
}

.input-group-append-param .btn:first-child {
    border-right: 1px solid #444;
}

/* Parameter Row (Mobile Card View) */
.parameter-row-mobile {
    background: linear-gradient(135deg, #222222 0%, #252525 100%);
    border-radius: 8px;
    border: 1px solid #333;
    margin-bottom: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.parameter-row-mobile:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.parameter-card-header {
    background: linear-gradient(180deg, #252525 0%, #222 100%);
    padding: 8px 12px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.parameter-symbol-mobile {
    font-weight: 600;
    font-size: 1rem;
    color: #e0e0e0;
}

.parameter-level-mobile {
    font-size: 0.85rem;
    color: #aaa;
    background-color: #333;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 500;
}

.parameter-card-body {
    padding: 12px;
    display: flex;
    flex-direction: row;
    gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #555 #333;
}

.parameter-card-body::-webkit-scrollbar {
    height: 6px;
}

.parameter-card-body::-webkit-scrollbar-track {
    background: #333;
    border-radius: 3px;
}

.parameter-card-body::-webkit-scrollbar-thumb {
    background-color: #555;
    border-radius: 3px;
}

.parameter-field-mobile {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
    min-width: 200px;
}

.parameter-field-mobile label {
    color: #aaa;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.input-group-mobile {
    display: flex;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #444;
    background-color: #1a1a1a;
}

.input-group-mobile .form-control {
    flex: 1;
    border: none;
    border-radius: 0;
    padding: 10px 12px;
    background-color: #2d2d2d;
    color: #e0e0e0;
}

.input-group-append-mobile {
    display: flex;
    border-left: 1px solid #444;
}

.input-group-append-mobile .btn {
    border: none;
    border-radius: 0;
    padding: 10px 16px;
    background-color: #333;
    color: #e0e0e0;
    transition: all 0.2s ease;
    min-width: 50px;
}

.input-group-append-mobile .btn:hover {
    background-color: #3a3a3a;
    color: #fff;
}

.input-group-append-mobile .btn:first-child {
    border-right: 1px solid #444;
}

.parameter-field-mobile input[type="text"]:not(.input-group-mobile input) {
    border-radius: 8px;
    border: 1px solid #444;
    padding: 10px 12px;
    background-color: #2d2d2d;
    color: #e0e0e0;
}

.parameter-field-mobile input[type="text"]:not(.input-group-mobile input):focus {
    border-color: #1e88e5;
    box-shadow: 0 0 0 0.2rem rgba(30, 136, 229, 0.25);
    background-color: #333;
}

/* Highlighted fields */
.parameter-row-mobile .highlighted,
.parameter-row-desktop .highlighted {
    background-color: #fcdd7e !important;
    color: #000 !important;
    font-weight: bold;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .parameters-amount-page {
        padding: 8px;
    }

    .parameters-header h4 {
        font-size: 1.1rem;
    }

    .parameter-card-body {
        padding: 10px;
        gap: 8px;
    }

    /* Paused params table mobile fixes */
    .paused-params-table {
        min-width: 100%;
        width: auto;
    }

    .paused-params-table .paused-symbol-col {
        min-width: 120px !important;
        max-width: 120px !important;
        width: 120px !important;
        position: static;
        background-color: #1a1a1a !important;
        border-right: 2px solid #444;
    }

    .paused-params-table thead .paused-symbol-col {
        background-color: #252525 !important;
    }

    .paused-params-table tbody tr:hover .paused-symbol-col {
        background-color: #2a2a2a !important;
    }

    .paused-params-table tbody tr:nth-child(even) .paused-symbol-col {
        background-color: #1d1d1d !important;
    }

    .paused-params-table tbody tr:nth-child(even):hover .paused-symbol-col {
        background-color: #252525 !important;
    }

    .paused-params-table .paused-level-col {
        min-width: 80px !important;
        max-width: 80px !important;
        width: 80px !important;
    }

    /* First exchange column (ALL) needs more space */
    .paused-params-table th:nth-child(3),
    .paused-params-table td:nth-child(3) {
        min-width: 120px !important;
    }

    /* Quick toggle row - first exchange column (second td due to colspan) */
    .paused-params-table .quick-toggle-row td:nth-child(2) {
        min-width: 120px !important;
    }

    /* Ensure toggle buttons in ALL column have enough space */
    .paused-params-table td:nth-child(3) .toggle-btn-group,
    .paused-params-table .quick-toggle-row td:nth-child(2) .toggle-btn-group {
        min-width: 100px;
    }

    .paused-params-table .paused-exchange-col {
        min-width: 100px !important;
    }

    /* Ensure input groups in exchange columns have proper width */
    .paused-params-table .paused-exchange-col .input-group-param {
        min-width: 100px;
    }

    .table-responsive-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .quick-action-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   PARAMETERS FADE PAGE - MODERN RESPONSIVE
   ============================================ */

/* Fade value styling */
.param-fade.fade-positive {
    background-color: rgba(76, 175, 80, 0.4) !important;
    color: #a5d6a7 !important;
    font-weight: 600;
    font-size: 1.05em;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

.param-fade.fade-negative {
    background-color: rgba(244, 67, 54, 0.4) !important;
    color: #ef9a9a !important;
    font-weight: 600;
    font-size: 1.05em;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

/* Exchange column widths - dynamic */
.param-header-cell.param-exchange {
    flex: 1 1 0;
    min-width: 100px;
}

.param-cell.param-exchange {
    flex: 1 1 0;
    min-width: 100px;
}

.quick-action-group.param-exchange {
    flex: 1 1 0;
    min-width: 100px;
}

/* Fade quick actions alignment */
.fade-quick-actions {
    display: flex;
    gap: 0;
}

.fade-table-header {
    display: flex;
}

/* Paused parameters horizontal scrolling */
.paused-parameters-scroll-wrapper {
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: thin;
    scrollbar-color: #555 #333;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

.paused-parameters-scroll-wrapper::-webkit-scrollbar {
    height: 8px;
}

.paused-parameters-scroll-wrapper::-webkit-scrollbar-track {
    background: #333;
    border-radius: 4px;
}

.paused-parameters-scroll-wrapper::-webkit-scrollbar-thumb {
    background-color: #555;
    border-radius: 4px;
}

.paused-parameters-scroll-wrapper::-webkit-scrollbar-thumb:hover {
    background-color: #666;
}

/* Ensure all sections have the same width calculation and alignment */
.paused-parameters-scroll-wrapper .quick-action-row-aligned.paused-quick-actions {
    display: flex;
    padding: 4px 0;
    gap: 0;
    box-sizing: border-box;
    min-width: max-content;
    width: max-content;
}

.paused-parameters-scroll-wrapper .parameters-table-header.paused-table-header {
    display: flex;
    padding: 8px 0;
    gap: 0;
    box-sizing: border-box;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid #333;
    background: linear-gradient(180deg, #252525 0%, #222 100%);
    min-width: max-content;
    width: max-content;
}

.paused-parameters-scroll-wrapper .parameter-row-desktop {
    display: flex;
    padding: 6px 0;
    gap: 0;
    box-sizing: border-box;
    border-left: none;
    border-right: none;
    min-width: max-content;
    width: max-content;
}

/* Override default padding to ensure exact alignment */
.paused-parameters-scroll-wrapper .quick-action-spacer {
    padding-left: 8px !important;
    padding-right: 8px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.paused-parameters-scroll-wrapper .quick-action-group {
    padding-left: 8px !important;
    padding-right: 8px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.paused-parameters-scroll-wrapper .param-header-cell {
    padding-left: 8px !important;
    padding-right: 8px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.paused-parameters-scroll-wrapper .param-cell {
    padding-left: 8px !important;
    padding-right: 8px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.paused-parameters-scroll-wrapper .quick-actions-content {
    padding: 0;
}

.paused-parameters-scroll-wrapper .quick-actions-card {
    margin-bottom: 0;
    border-radius: 0;
    border: none;
    background: transparent;
    padding: 0;
}

.paused-parameters-scroll-wrapper .quick-actions-card .quick-actions-header {
    margin-bottom: 8px;
    padding-left: 0;
    padding-right: 0;
}

.paused-table-header {
    display: flex;
}

.paused-forms-container {
    display: flex;
    flex-direction: column;
}

.paused-quick-actions {
    display: flex;
    gap: 0;
}

/* ============================================
   TABLE COPY BUTTON STYLES
   ============================================ */

/* Container for table with copy button */
.table-container {
    position: relative;
}

/* Copy button positioned at bottom right of table */
.table-copy-btn {
    position: absolute;
    bottom: 5px;
    right: 5px;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 12px;
    opacity: 0.7;
    transition: opacity 0.2s, background 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
    line-height: 1;
}

.table-copy-btn:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.4);
}

.table-copy-btn:active {
    background: rgba(0, 0, 0, 0.9);
}

.table-copy-btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.table-copy-btn.copied {
    background: rgba(40, 167, 69, 0.8);
    border-color: rgba(40, 167, 69, 1);
}

.table-copy-btn.copied::after {
    content: 'Copied!';
    margin-left: 4px;
}

/* Ensure table-responsive containers are positioned relative */
.table-responsive {
    position: relative;
}

/* Updated: Sat Nov 15 19:26:34 EST 2025 */