:root {
    --bg: #090c12;
    --card: rgba(18, 24, 38, 0.72);
    --border: rgba(255, 255, 255, 0.08);
    --text: #f1f5f9;
    --green: #2ebd85;
    --red: #f6465d;
    --accent: #3773f5;
}

img {
    max-width: 100%;
}

.ex-icon, img.ex-icon, img[src*="ondo"], img[src*="lighter"], img[src*="variational"], img[src*="extended"] {
    width: 18px !important;
    height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    border-radius: 4px !important;
    object-fit: cover !important;
    flex-shrink: 0 !important;
    display: inline-block !important;
    vertical-align: middle !important;
}

html, body {
    height: 100vh;
    max-width: 100vw;
    overflow: hidden;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a, a:visited {
    color: inherit;
    text-decoration: none;
}

html.funding-html, body.funding-body {
    height: auto !important;
    min-height: 100vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

body {
    background: #080b10;
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(55, 115, 245, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(46, 189, 133, 0.08) 0%, transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.8) 0%, transparent 100%);
    background-attachment: fixed;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    height: 100vh;
}

.topbar {
    display: flex;
    align-items: center;
    padding: 0 15px;
    height: 60px;
    background: rgba(13, 17, 26, 0.82);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    gap: 15px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
    position: relative;
    z-index: 50;
}

.logo-brand {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-right: 14px;
    text-decoration: none;
    user-select: none;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-brand:hover {
    transform: scale(1.04);
}

.logo-dex {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0.5px;
    background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.logo-arb {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 50%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 12px rgba(59, 130, 246, 0.6));
    margin-right: 5px;
}

.logo-pro-badge {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: #ffffff;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    padding: 2px 7px;
    border-radius: 6px;
    border: 1px solid rgba(52, 211, 153, 0.6);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    line-height: 1.3;
    display: inline-block;
    transition: all 0.3s ease;
}

.logo-brand:hover .logo-pro-badge {
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.8), inset 0 1px 1px rgba(255, 255, 255, 0.5);
    border-color: #34d399;
}

.controls {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-grow: 1;
}

.ex-group {
    display: flex;
    align-items: center;
}

.btn-swap {
    background: linear-gradient(135deg, #1e232d 0%, #252a36 100%);
    border: 1.5px solid var(--accent);
    color: #60a5fa;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 15px;
    font-weight: bold;
    align-self: center;
    margin: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.btn-swap:hover {
    background: var(--accent) !important;
    color: #ffffff !important;
    border-color: #60a5fa !important;
    transform: rotate(180deg) scale(1.15);
    box-shadow: 0 0 14px rgba(55, 115, 245, 0.7);
}

select,
input,
button {
    background: #2b2f36;
    border: 1px solid var(--border);
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
}

.btn-primary {
    background: var(--accent);
    cursor: pointer;
    border: none;
    font-weight: bold;
}

.btn-secondary {
    background: #474d57;
    cursor: pointer;
    border: none;
}

.btn-mini {
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
}

/* Іконка дзвіночка */
.btn-icon {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    padding: 5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: top center;
}

#openAlerts:hover {
    animation: bellRing 0.5s ease-in-out infinite alternate;
    filter: drop-shadow(0 0 10px rgba(234, 179, 8, 0.85));
}

@keyframes bellRing {
    0% { transform: rotate(0deg) scale(1.18); }
    25% { transform: rotate(18deg) scale(1.22); }
    50% { transform: rotate(-16deg) scale(1.22); }
    75% { transform: rotate(10deg) scale(1.22); }
    100% { transform: rotate(-8deg) scale(1.22); }
}

#openSettings {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#openSettings:hover {
    transform: rotate(180deg) scale(1.18) !important;
    background: rgba(55, 115, 245, 0.35) !important;
    border-color: var(--accent) !important;
    box-shadow: 0 0 14px rgba(55, 115, 245, 0.7) !important;
}

.main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 400px;
    gap: 15px;
    padding: 15px;
    height: calc(100vh - 60px);
    overflow: hidden;
    transition: grid-template-columns 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

.main-grid:has(.sidebar.collapsed) {
    grid-template-columns: 1fr 40px;
}

.left-col {
    min-width: 0;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    box-sizing: border-box;
    z-index: 1;
}

.right-col {
    min-width: 0;
    height: 100%;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding-right: 4px;
    box-sizing: border-box;
    z-index: 10;
}

.sidebar-content {
    overflow-x: hidden !important;
    overflow-y: visible;
}

.sidebar-content table {
    width: 100% !important;
    table-layout: fixed !important;
}

.sidebar-content th, .sidebar-content td {
    padding: 6px 2px !important;
    font-size: 11px !important;
    box-sizing: border-box;
    vertical-align: middle;
}

/* Explicit column widths so headers & sort buttons never overlap */
.sidebar-content th:nth-child(1),
.sidebar-content td:nth-child(1) {
    width: 25% !important;
    overflow: visible !important;
}

.sidebar-content th:nth-child(2),
.sidebar-content td:nth-child(2) {
    width: 19% !important;
    text-align: center;
    overflow: visible !important;
}

.sidebar-content th:nth-child(3),
.sidebar-content td:nth-child(3) {
    width: 32% !important;
    text-align: center;
    overflow: visible !important;
    white-space: nowrap !important;
}

.sidebar-content th:nth-child(4),
.sidebar-content td:nth-child(4) {
    width: 24% !important;
    text-align: right;
    overflow: hidden !important;
    padding-right: 4px !important;
}

/* Custom sleek scrollbars for independent column & drawer scrolling */
.left-col::-webkit-scrollbar,
.right-col::-webkit-scrollbar,
.sidebar-content::-webkit-scrollbar,
.settings-drawer::-webkit-scrollbar,
.drawer-body::-webkit-scrollbar,
.drawer-grid-2col::-webkit-scrollbar,
.active-alerts-list::-webkit-scrollbar {
    width: 10px !important;
    height: 6px !important;
}

.left-col::-webkit-scrollbar-track,
.right-col::-webkit-scrollbar-track {
    background: rgba(13, 17, 26, 0.4) !important;
    border-radius: 10px !important;
    margin-top: 18px !important;
    margin-bottom: 18px !important;
}

.sidebar-content::-webkit-scrollbar-track,
.settings-drawer::-webkit-scrollbar-track,
.drawer-body::-webkit-scrollbar-track,
.drawer-grid-2col::-webkit-scrollbar-track,
.active-alerts-list::-webkit-scrollbar-track {
    background: rgba(13, 17, 26, 0.4) !important;
    border-radius: 10px !important;
    margin-top: 6px !important;
    margin-bottom: 6px !important;
}

.left-col::-webkit-scrollbar-thumb,
.right-col::-webkit-scrollbar-thumb,
.sidebar-content::-webkit-scrollbar-thumb,
.settings-drawer::-webkit-scrollbar-thumb,
.drawer-body::-webkit-scrollbar-thumb,
.drawer-grid-2col::-webkit-scrollbar-thumb,
.active-alerts-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(55, 115, 245, 0.55), rgba(37, 99, 235, 0.45)) !important;
    border-radius: 10px !important;
    border: 2px solid rgba(13, 17, 26, 0.8) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transition: all 0.2s ease;
}

.left-col::-webkit-scrollbar-thumb:hover,
.right-col::-webkit-scrollbar-thumb:hover,
.sidebar-content::-webkit-scrollbar-thumb:hover,
.settings-drawer::-webkit-scrollbar-thumb:hover,
.drawer-body::-webkit-scrollbar-thumb:hover,
.drawer-grid-2col::-webkit-scrollbar-thumb:hover,
.active-alerts-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(96, 165, 250, 0.95), rgba(55, 115, 245, 0.85)) !important;
    border-color: rgba(13, 17, 26, 0.4) !important;
    box-shadow: 0 0 14px rgba(55, 115, 245, 0.8) !important;
}

.left-col::-webkit-scrollbar-button,
.right-col::-webkit-scrollbar-button,
.sidebar-content::-webkit-scrollbar-button,
.settings-drawer::-webkit-scrollbar-button,
.drawer-body::-webkit-scrollbar-button,
.drawer-grid-2col::-webkit-scrollbar-button,
.active-alerts-list::-webkit-scrollbar-button {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.chart-layout-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.layout-toggle-group {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(13, 17, 26, 0.85);
    backdrop-filter: blur(16px);
    padding: 3px 8px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.layout-label {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    margin-right: 4px;
}

.btn-layout {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: #94a3b8;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-layout:hover {
    color: #f1f5f9;
    background: rgba(255, 255, 255, 0.08);
}

.btn-layout.active {
    background: #3773f5 !important;
    border-color: #3773f5 !important;
    color: #ffffff !important;
    box-shadow: 0 0 10px rgba(55, 115, 245, 0.5);
}

.slot-container {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#chart {
    width: 100%;
    height: 400px;
    overflow: hidden;
    position: relative;
    border-radius: 12px;
}

.card {
    background: rgba(18, 24, 38, 0.72) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    border-radius: 20px !important;
    padding: 18px;
    box-shadow: 
        inset 0 1px 1px rgba(255, 255, 255, 0.1),
        0 20px 40px rgba(0, 0, 0, 0.5);
}

.metrics-row {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.metric-box {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.03) !important;
    backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 16px !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 8px 24px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.metric-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.trade-btns-container {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.ex-trade-card-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    padding: 8px 14px;
    min-width: 90px;
    color: #ffffff;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 4px 14px rgba(0, 0, 0, 0.25);
    position: relative;
}

.ex-trade-card-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.ex-trade-card-btn:active {
    transform: translateY(0) scale(0.98);
}

.ex-trade-card-btn img.big-ex-icon, img.big-ex-icon {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    max-width: 32px !important;
    max-height: 32px !important;
    border-radius: 6px !important;
    object-fit: cover !important;
    flex-shrink: 0 !important;
}

.ex-trade-card-btn .ex-card-title {
    font-size: 11px;
    font-weight: 700;
    color: #f1f5f9;
    white-space: nowrap;
}

.ex-trade-card-btn .badge-card-side {
    font-size: 9px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.badge-card-long {
    background: rgba(46, 189, 133, 0.25);
    color: #2ebd85;
    border: 1px solid rgba(46, 189, 133, 0.45);
}

.badge-card-short {
    background: rgba(246, 70, 93, 0.25);
    color: #f6465d;
    border: 1px solid rgba(246, 70, 93, 0.45);
}

.btn-expand {
    background: none;
    border: none;
    color: #64748b;
    font-size: 11px;
    cursor: pointer;
    padding: 1px 4px;
    border-radius: 4px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-left: 2px;
    margin-right: 4px;
    vertical-align: middle;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.75;
}

.btn-expand:hover {
    color: #3773f5;
    background: rgba(55, 115, 245, 0.2);
    transform: scale(1.15);
    opacity: 1;
}

.btn-expand.expanded {
    color: #3773f5;
    background: rgba(55, 115, 245, 0.25);
    transform: rotate(180deg);
    opacity: 1;
}

/* Interactive Glass Sort Buttons */
.sort-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #94a3b8;
    font-size: 10.5px;
    font-weight: 600;
    padding: 3px 7px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    user-select: none;
    letter-spacing: 0.2px;
    font-family: inherit;
    white-space: nowrap;
    max-width: 100%;
    box-sizing: border-box;
}

.sort-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.sort-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.sort-btn.active {
    background: linear-gradient(135deg, rgba(55, 115, 245, 0.35) 0%, rgba(37, 99, 235, 0.25) 100%) !important;
    border: 1px solid rgba(55, 115, 245, 0.6) !important;
    color: #60a5fa !important;
    font-weight: 700;
    box-shadow: 0 0 12px rgba(55, 115, 245, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

.variations-row td {
    padding: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    background: rgba(10, 14, 22, 0.75) !important;
}

.variations-box {
    padding: 8px 10px;
    margin: 4px 6px 10px 6px;
    background: rgba(18, 24, 38, 0.92);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.08), 0 8px 20px rgba(0, 0, 0, 0.4);
}

.variations-title {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.var-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    font-size: 11px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    transition: background 0.2s;
}

.var-item:last-child {
    border-bottom: none;
}

.var-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.var-pair {
    font-weight: 600;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.var-metrics {
    display: flex;
    align-items: center;
    gap: 12px;
}

.var-action-btn {
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 600;
    background: rgba(55, 115, 245, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(55, 115, 245, 0.4);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.var-action-btn:hover {
    background: rgba(55, 115, 245, 0.4);
    color: #ffffff;
}

.value {
    font-size: 26px;
    font-weight: bold;
}

.green {
    color: var(--green);
}

.red {
    color: var(--red);
}

#chart {
    height: 400px;
}

/* Premium Cyberpunk Header Info (Шапка Графіка) */
.header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    padding: 12px 18px;
    background: linear-gradient(180deg, rgba(24, 30, 46, 0.9) 0%, rgba(15, 20, 31, 0.8) 100%);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

#mainTitle {
    font-size: 16px;
    margin: 0;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.chart-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.chart-symbol-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 18px;
    background: linear-gradient(135deg, rgba(55, 115, 245, 0.22) 0%, rgba(26, 32, 48, 0.85) 100%);
    border: 1.5px solid rgba(55, 115, 245, 0.45);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 0 12px rgba(55, 115, 245, 0.3);
    user-select: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chart-symbol-badge:hover {
    transform: translateY(-1px) scale(1.03);
    border-color: rgba(55, 115, 245, 0.8);
    box-shadow: 0 6px 20px rgba(55, 115, 245, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.chart-symbol-badge:active {
    transform: translateY(0) scale(0.97);
}

.symbol-badge-text {
    font-size: 22px !important;
    font-weight: 900 !important;
    letter-spacing: 1.2px !important;
    color: #ffffff !important;
    text-transform: uppercase;
    text-shadow: 0 0 12px rgba(96, 165, 250, 0.8), 0 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1;
}

.header-badges-container {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

.header-ex-badge {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px 5px 10px;
    border-radius: 8px;
    letter-spacing: 0.3px;
    min-width: 145px;
    box-sizing: border-box;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    user-select: none;
}

.badge-ex-icon {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.green-badge {
    background: rgba(46, 189, 133, 0.15);
    color: #2ebd85;
    border: 1.5px solid rgba(46, 189, 133, 0.4);
}

.green-badge:hover {
    background: rgba(46, 189, 133, 0.28);
    border-color: rgba(46, 189, 133, 0.7);
    box-shadow: 0 0 12px rgba(46, 189, 133, 0.45);
    transform: translateY(-1px);
}

.red-badge {
    background: rgba(246, 70, 93, 0.15);
    color: #f6465d;
    border: 1.5px solid rgba(246, 70, 93, 0.4);
}

.red-badge:hover {
    background: rgba(246, 70, 93, 0.28);
    border-color: rgba(246, 70, 93, 0.7);
    box-shadow: 0 0 12px rgba(246, 70, 93, 0.45);
    transform: translateY(-1px);
}

.funding-rates-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 11.5px;
    background: rgba(13, 17, 26, 0.85) !important;
    backdrop-filter: blur(12px);
    padding: 6px 14px !important;
    border-radius: 10px !important;
    border: 1px solid rgba(55, 115, 245, 0.25) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 4px 14px rgba(0, 0, 0, 0.3);
    max-width: 100%;
    box-sizing: border-box;
}

.funding-rates-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.funding-label-tag {
    font-size: 10px;
    font-weight: 800;
    color: #64748b;
    letter-spacing: 0.8px;
}

.funding-stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ex-stat-name {
    font-weight: 600;
    color: #94a3b8;
}

.ex-stat-name.long-name { color: #2ebd85; }
.ex-stat-name.short-name { color: #f6465d; }

.ex-stat-val {
    font-weight: 700;
}

.funding-divider {
    color: rgba(255, 255, 255, 0.15);
    font-weight: 300;
}

.funding-net-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(55, 115, 245, 0.15);
    border: 1px solid rgba(55, 115, 245, 0.3);
    padding: 2px 6px;
    border-radius: 6px;
    white-space: nowrap;
}

.net-lbl {
    font-size: 10px;
    font-weight: 700;
    color: #94a3b8;
}

.net-val {
    font-size: 12px;
    font-weight: 800;
}

.btn-alerts-bell {
    background: rgba(234, 179, 8, 0.15) !important;
    border: 1px solid rgba(234, 179, 8, 0.35) !important;
    color: #eab308 !important;
    width: 36px;
    height: 36px;
    font-size: 16px;
}

.btn-alerts-bell:hover {
    background: rgba(234, 179, 8, 0.35) !important;
    border-color: #eab308 !important;
    transform: scale(1.12) rotate(12deg) !important;
    box-shadow: 0 0 16px rgba(234, 179, 8, 0.7) !important;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

td,
th {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.sort-header {
    cursor: pointer;
    user-select: none;
    transition: color 0.15s ease, background 0.15s ease;
    border-radius: 4px;
    padding: 6px 4px;
}

.sort-header:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.sort-header.active {
    color: #eab308;
    font-weight: bold;
}

.dot {
    height: 8px;
    width: 8px;
    border-radius: 50%;
    display: inline-block;
    background: gray;
}

.dot.ok {
    background: var(--green);
    box-shadow: 0 0 5px var(--green);
}

.dot.err {
    background: var(--red);
}

.label-mini {
    font-size: 10px;
    color: #848e9c;
}

/* Modal & Sliding Drawer Settings Panel */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

/* Sliding Drawer Settings Panel (Шторка налаштувань) */
.drawer-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    background: rgba(0, 0, 0, 0.65) !important;
    backdrop-filter: blur(12px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(180%) !important;
    z-index: 9999 !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex !important;
    justify-content: flex-end !important;
    align-items: stretch !important;
}

.drawer-modal.open {
    opacity: 1 !important;
    visibility: visible !important;
}

.settings-drawer {
    width: 650px !important;
    max-width: 95vw !important;
    height: 100% !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    border-radius: 20px 0 0 20px !important;
    background: linear-gradient(180deg, #141a29 0%, #0d111a 100%) !important;
    border-left: 1px solid rgba(55, 115, 245, 0.4) !important;
    border-top: none !important;
    border-right: none !important;
    border-bottom: none !important;
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.85), 0 0 40px rgba(55, 115, 245, 0.25) !important;
    padding: 24px 24px 12px 24px !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
    overflow: hidden !important;
}

.drawer-grid-2col {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 20px !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding-right: 6px;
}

.drawer-footer {
    display: flex !important;
    gap: 12px !important;
    padding-top: 14px !important;
    padding-bottom: max(14px, env(safe-area-inset-bottom)) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    margin-top: 12px !important;
    flex-shrink: 0 !important;
    background: #0d111a !important;
    z-index: 10 !important;
}

.drawer-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Exchanges Cards Grid with Icons */
.exchanges-cards-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ex-checkbox-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 13px;
    font-weight: 600;
    color: #e2e8f0;
    user-select: none;
}

.ex-checkbox-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(55, 115, 245, 0.45);
    transform: translateX(2px);
}

.ex-checkbox-card input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #3773f5;
    cursor: pointer;
    flex-shrink: 0;
}

.ex-card-icon {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.ex-card-name {
    flex: 1;
}

.drawer-modal.open .settings-drawer {
    transform: translateX(0) !important;
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 20px;
}

.drawer-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Custom Stylish Number Inputs with Steppers */
.custom-number-input {
    display: flex;
    align-items: center;
    background: linear-gradient(180deg, #181d28 0%, #121620 100%);
    border: 1.5px solid rgba(55, 115, 245, 0.4);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    margin-top: 4px;
}

.custom-number-input:hover, .custom-number-input:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 12px rgba(55, 115, 245, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.custom-number-input input[type="number"] {
    flex: 1;
    width: 100%;
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    padding: 8px 4px !important;
    outline: none !important;
    box-shadow: none !important;
    -moz-appearance: textfield;
}

.custom-number-input input[type="number"]::-webkit-outer-spin-button,
.custom-number-input input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.btn-step-input {
    background: rgba(255, 255, 255, 0.06);
    border: none;
    color: #60a5fa;
    width: 36px;
    height: 36px;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    user-select: none;
}

.btn-step-input:hover {
    background: rgba(55, 115, 245, 0.35);
    color: #ffffff;
    box-shadow: inset 0 0 8px rgba(55, 115, 245, 0.6);
}

.btn-step-input:active {
    transform: scale(0.92);
}

/* Red Hover Glow Animations for Close Buttons */
.btn-drawer-close {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #94a3b8;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-drawer-close:hover {
    background: rgba(246, 70, 93, 0.25) !important;
    color: #f6465d !important;
    border-color: rgba(246, 70, 93, 0.7) !important;
    box-shadow: 0 0 16px rgba(246, 70, 93, 0.7) !important;
    transform: scale(1.15) rotate(90deg) !important;
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
}

.drawer-footer {
    display: flex;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 20px;
}

.drawer-footer .btn-primary {
    flex: 1;
    padding: 10px 16px;
    font-size: 13px;
    border-radius: 10px;
    background: linear-gradient(135deg, #3773f5 0%, #2563eb 100%);
    box-shadow: 0 4px 14px rgba(55, 115, 245, 0.4);
    transition: all 0.2s ease;
}

.drawer-footer .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(55, 115, 245, 0.7);
}

.drawer-footer .btn-secondary, #closeSettings, #closeHistory, #closeAlerts {
    flex: 1;
    padding: 10px 16px;
    font-size: 13px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.drawer-footer .btn-secondary:hover, #closeSettings:hover, #closeHistory:hover, #closeAlerts:hover {
    background: rgba(246, 70, 93, 0.25) !important;
    color: #f6465d !important;
    border-color: rgba(246, 70, 93, 0.7) !important;
    box-shadow: 0 0 16px rgba(246, 70, 93, 0.7) !important;
    transform: translateY(-2px) scale(1.02) !important;
}

/* Settings Drawer Sections & Toggles */
.settings-section-title {
    font-size: 12px;
    font-weight: 700;
    color: #60a5fa;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.settings-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 16px 0;
}

.field-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.field-toggle-row:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(55, 115, 245, 0.4);
}

.toggle-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.toggle-title {
    font-size: 12px;
    font-weight: 600;
    color: #f1f5f9;
}

.toggle-desc {
    font-size: 10px;
    color: #94a3b8;
}

/* iOS / Cyberpunk Switch Toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255, 255, 255, 0.15);
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

input:checked + .slider {
    background: linear-gradient(135deg, #3773f5 0%, #2563eb 100%);
    border-color: #60a5fa;
    box-shadow: 0 0 10px rgba(55, 115, 245, 0.5);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}

.modal-content {
    width: 300px;
}

.field {
    margin: 15px 0;
}

.field label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    color: #848e9c;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 6px;
    background: #141822;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #e2e8f0;
    cursor: pointer;
    margin: 0;
}

.checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
    cursor: pointer;
}

.sym-link {
    font-weight: 700;
    font-size: 12px;
    color: #ffffff;
    background: rgba(55, 115, 245, 0.22);
    border: 1px solid rgba(55, 115, 245, 0.4);
    padding: 2px 6px;
    border-radius: 5px;
    cursor: pointer;
    display: inline-block;
    max-width: none !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    transition: all 0.2s ease;
}

.sym-link:hover {
    background: #3773f5;
    color: #ffffff;
    box-shadow: 0 0 8px rgba(55, 115, 245, 0.6);
}

.ex-pair-tag {
    font-size: 9px;
    font-weight: 600;
    color: #94a3b8;
    background: #1e2538;
    padding: 1px 4px;
    border-radius: 4px;
    display: block;
    margin-top: 2px;
    white-space: nowrap;
    width: fit-content;
}

.header-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: nowrap;
}

.header-info h1 {
    font-size: 15px;
    margin: 0;
    white-space: nowrap;
}


/* Symbol Search - Professional Design */
.symbol-search-wrapper {
    position: relative;
    display: inline-block;
}

#symbolSearch {
    height: 38px;
    box-sizing: border-box;
    min-width: 150px;
    max-width: 180px;
    font-size: 14px;
    font-weight: 500;
    background: linear-gradient(180deg, #1e232d 0%, #181c24 100%);
    border: 1.5px solid var(--accent);
    color: var(--text);
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.3px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

#symbolSearch:hover {
    border-color: #4a5568;
    background: linear-gradient(135deg, #323842 0%, #252a35 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#symbolSearch:focus {
    outline: none;
    border-color: var(--accent);
    background: linear-gradient(135deg, #2b2f36 0%, #1e232d 100%);
    box-shadow: 0 0 0 3px rgba(55, 115, 245, 0.15), 0 6px 20px rgba(0, 0, 0, 0.4);
    transform: translateY(-1px);
}

#symbolSearch::placeholder {
    color: #6b7280;
    font-size: 13px;
    font-weight: 400;
}

.symbol-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    width: 100%;
    background: linear-gradient(180deg, #1e232d 0%, #181c24 100%);
    border: 1.5px solid var(--accent);
    border-radius: 8px;
    max-height: 280px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(55, 115, 245, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: dropdownSlide 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes dropdownSlide {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.symbol-dropdown.show {
    display: block;
}

.symbol-option {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: #e5e7eb;
    position: relative;
    letter-spacing: 0.3px;
}

.symbol-option:last-child {
    border-bottom: none;
}

.symbol-option::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent);
    transform: scaleY(0);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.symbol-option:hover,
.symbol-option.selected {
    background: linear-gradient(90deg, rgba(55, 115, 245, 0.15) 0%, rgba(55, 115, 245, 0.05) 100%);
    color: #ffffff;
    padding-left: 20px;
    transform: translateX(2px);
}

.symbol-option:hover::before,
.symbol-option.selected::before {
    transform: scaleY(1);
}

.symbol-option .symbol-name {
    font-weight: 600;
    color: inherit;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Scrollbar - Premium Design */
.symbol-dropdown::-webkit-scrollbar {
    width: 8px;
}

.symbol-dropdown::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    margin: 4px 0;
}

.symbol-dropdown::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #4a5568 0%, #3a3f4a 100%);
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.symbol-dropdown::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #5a6578 0%, #4a4f5a 100%);
    background-clip: padding-box;
}

.symbol-search-wrapper {
    position: relative;
    width: 130px;
    min-width: 130px;
}

#symbolSearch {
    width: 100%;
    height: 36px;
    background: #181d28;
    color: #e0e6ed;
    border: 1.5px solid rgba(55, 115, 245, 0.4);
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    outline: none;
    box-sizing: border-box;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

#symbolSearch:hover, #symbolSearch:focus {
    border-color: var(--accent);
    background: #1e2433;
    box-shadow: 0 0 10px rgba(55, 115, 245, 0.4);
}

/* Custom Select Dropdowns */
.custom-select-wrapper {
    position: relative;
    user-select: none;
}

.custom-select-trigger {
    background: #181d28;
    color: #e0e6ed;
    border: 1.5px solid rgba(55, 115, 245, 0.4);
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    width: 145px;
    min-width: 145px;
    box-sizing: border-box;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.custom-select-trigger * {
    pointer-events: none !important;
}

.ex-trigger-content {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: visible !important;
    white-space: nowrap;
    min-width: 0;
}

.ex-icon, img.ex-icon, .custom-dropdown-option img, .custom-select-trigger img, .ex-trigger-content img {
    width: 18px !important;
    height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    border-radius: 4px !important;
    object-fit: cover !important;
    flex-shrink: 0 !important;
}

.custom-select-trigger:hover {
    border-color: var(--accent);
    background: #1e2433;
    box-shadow: 0 0 10px rgba(55, 115, 245, 0.35);
}

.custom-select-wrapper.open .custom-select-trigger {
    border-color: var(--accent);
    box-shadow: 0 0 14px rgba(55, 115, 245, 0.5);
    background: #1e2433;
}

.custom-select-trigger .arrow-icon {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    stroke: #8899ac;
}

.custom-select-wrapper.open .arrow-icon {
    transform: rotate(180deg);
    stroke: var(--accent);
}

/* Custom Dropdown Menu */
.custom-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    box-sizing: border-box;
    background: linear-gradient(180deg, #181d28 0%, #121620 100%);
    border: 1.5px solid rgba(55, 115, 245, 0.5);
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(55, 115, 245, 0.25);
    z-index: 1000;
    overflow: hidden;
    padding: 4px 0;
}

.custom-select-wrapper.open .custom-dropdown-menu {
    display: block !important;
}

.custom-dropdown-option {
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #c0cbdb;
    cursor: pointer;
    position: relative;
    transition: all 0.15s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

.custom-dropdown-option::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent);
    transform: scaleY(0);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-dropdown-option:hover {
    background: linear-gradient(90deg, rgba(55, 115, 245, 0.25) 0%, rgba(55, 115, 245, 0.08) 100%);
    color: #ffffff;
    padding-left: 18px;
    transform: scale(1.02) translateX(2px);
    box-shadow: inset 3px 0 0 var(--accent);
}

.custom-dropdown-option:active {
    transform: scale(0.97) translateX(1px);
}

.custom-dropdown-option.active {
    background: linear-gradient(90deg, rgba(55, 115, 245, 0.2) 0%, rgba(55, 115, 245, 0.05) 100%);
    color: var(--accent);
    font-weight: 700;
    padding-left: 18px;
}

.custom-dropdown-option:hover::before,
.custom-dropdown-option.active::before {
    transform: scaleY(1);
}

/* Collapsible Sidebar */
.sidebar {
    width: 100%;
    background: linear-gradient(180deg, #1a1f2e 0%, #151921 100%);
    border-left: 1px solid var(--border);
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.sidebar.collapsed {
    width: 40px;
    min-width: 40px;
}

/* Premium Cyberpunk Sidebar Header */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(26, 32, 48, 0.95) 0%, rgba(18, 24, 38, 0.85) 100%);
    backdrop-filter: blur(12px);
    border-radius: 16px 16px 0 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.sidebar.collapsed .sidebar-header {
    padding: 12px 4px;
    justify-content: flex-start;
    align-items: center;
    flex-direction: column;
    border-bottom: none;
    background: transparent;
}

.sidebar-title-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.live-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2ebd85;
    box-shadow: 0 0 10px #2ebd85, 0 0 16px rgba(46, 189, 133, 0.8);
    animation: pulseDotGlow 1.8s infinite ease-in-out;
}

@keyframes pulseDotGlow {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.35); opacity: 0.6; }
}

.sidebar-title-text {
    font-size: 15px !important;
    font-weight: 800 !important;
    letter-spacing: 0.6px !important;
    margin: 0 !important;
    white-space: nowrap;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 40%, #60a5fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar.collapsed .sidebar-title-wrapper {
    display: none;
}

.sidebar-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 3px 4px;
    border-radius: 10px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.sidebar.collapsed .sidebar-header-actions {
    background: transparent;
    border: none;
    padding: 0;
    flex-direction: column-reverse !important;
    gap: 10px;
}

.btn-sidebar-action {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.btn-sidebar-action:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-settings-icon, .btn-calc-icon {
    background: rgba(55, 115, 245, 0.15) !important;
    border: 1px solid rgba(55, 115, 245, 0.35) !important;
    color: #60a5fa !important;
}

.btn-settings-icon:hover, .btn-calc-icon:hover {
    background: linear-gradient(135deg, #3773f5 0%, #2563eb 100%) !important;
    color: #ffffff !important;
    border-color: #60a5fa !important;
    box-shadow: 0 0 16px rgba(55, 115, 245, 0.8) !important;
}

.btn-settings-icon:hover {
    transform: rotate(180deg) scale(1.1) !important;
}

.btn-calc-icon:hover {
    transform: scale(1.1) !important;
}

.btn-calc-icon:hover .calc-icon-svg {
    transform: rotate(10deg) scale(1.1);
    stroke: #ffffff;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.9));
    transition: transform 0.25s ease;
}

.btn-alerts-icon {
    background: rgba(234, 179, 8, 0.15) !important;
    border: 1px solid rgba(234, 179, 8, 0.35) !important;
    color: #eab308 !important;
    font-size: 15px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

.btn-alerts-icon:hover {
    background: rgba(234, 179, 8, 0.35) !important;
    border-color: #eab308 !important;
    box-shadow: 0 0 18px rgba(234, 179, 8, 0.8) !important;
    animation: bellChimeRing 0.65s cubic-bezier(0.36, 0.07, 0.19, 0.97) infinite alternate;
}

@keyframes bellChimeRing {
    0% { transform: scale(1.15) rotate(0deg); }
    20% { transform: scale(1.15) rotate(22deg); }
    40% { transform: scale(1.15) rotate(-18deg); }
    60% { transform: scale(1.15) rotate(14deg); }
    80% { transform: scale(1.15) rotate(-10deg); }
    100% { transform: scale(1.15) rotate(0deg); }
}

/* Modern Animated Toggle Arrow Button */
.btn-toggle-arrow {
    background: rgba(96, 165, 250, 0.12) !important;
    border: 1px solid rgba(96, 165, 250, 0.3) !important;
    color: #60a5fa !important;
}

.toggle-arrow-svg {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-toggle-arrow:hover {
    background: linear-gradient(135deg, #3773f5 0%, #2563eb 100%) !important;
    color: #ffffff !important;
    border-color: #60a5fa !important;
    box-shadow: 0 0 16px rgba(55, 115, 245, 0.8) !important;
    transform: scale(1.08) !important;
}

.btn-toggle-arrow:hover .toggle-arrow-svg {
    animation: arrowPulseNudge 0.6s infinite ease-in-out alternate;
}

@keyframes arrowPulseNudge {
    0% { transform: translateX(0); }
    100% { transform: translateX(4px); }
}

.sidebar.collapsed #sidebarToggle .toggle-arrow-svg {
    transform: rotate(180deg);
}

.sidebar.collapsed #sidebarToggle:hover .toggle-arrow-svg {
    animation: arrowPulseNudgeBack 0.6s infinite ease-in-out alternate;
}

@keyframes arrowPulseNudgeBack {
    0% { transform: rotate(180deg) translateX(0); }
    100% { transform: rotate(180deg) translateX(4px); }
}

.sidebar.collapsed .sidebar-header h3 {
    display: none !important;
    pointer-events: none !important;
}

.sidebar-toggle {
    background: rgba(55, 115, 245, 0.2);
    border: 1px solid rgba(55, 115, 245, 0.5);
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.sidebar-toggle:hover {
    background: rgba(55, 115, 245, 0.35);
    border-color: var(--accent);
    transform: scale(1.1);
    box-shadow: 0 0 8px rgba(55, 115, 245, 0.4);
}

.sidebar-toggle svg {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed .sidebar-toggle svg {
    transform: rotate(180deg);
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
    transition: opacity 0.3s;
    padding: 10px 8px;
}

.sidebar table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    table-layout: fixed;
}

.sidebar th, .sidebar td {
    padding: 8px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    white-space: nowrap;
}

.sidebar th {
    color: #888;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
}

.sidebar th:nth-child(1), .sidebar td:nth-child(1) { width: 27% !important; text-align: left; padding-left: 2px; }
.sidebar th:nth-child(2), .sidebar td:nth-child(2) { width: 17% !important; text-align: center; }
.sidebar th:nth-child(3), .sidebar td:nth-child(3) { width: 36% !important; text-align: center; padding-left: 2px; font-size: 11px; white-space: nowrap !important; }
.sidebar th:nth-child(4), .sidebar td:nth-child(4) { width: 20% !important; text-align: right; padding-left: 2px; font-weight: bold; }

tr.pinned-row {
    background: rgba(234, 179, 8, 0.07) !important;
}

tr.pinned-row td:first-child {
    border-left: 3px solid #eab308;
}

.pin-separator-td {
    border-bottom: 2px dashed rgba(234, 179, 8, 0.55) !important;
}

.sym-link {
    color: #60a5fa;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    background: #14223d;
    padding: 2px 5px;
    font-size: 11px;
    border-radius: 5px;
    display: inline-block;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #2563eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.sym-link:hover {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #60a5fa !important;
    transform: translateY(-1px) scale(1.06);
    box-shadow: 0 0 12px rgba(37, 99, 235, 0.7);
}

.sidebar.collapsed .sidebar-content {
    opacity: 0;
    pointer-events: none;
}

.sidebar.collapsed .btn-mini {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-toggle {
    background: rgba(55, 115, 245, 0.3);
}

.btn-pin {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 13px;
    padding: 2px 4px;
    opacity: 0.4;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease, filter 0.2s ease;
    border-radius: 4px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    transform-origin: center center;
}

.btn-pin:hover {
    opacity: 1;
    transform: scale(1.18);
}

.btn-pin:active {
    transform: scale(0.92);
}

.btn-pin.pinned {
    opacity: 1;
    filter: drop-shadow(0 0 6px rgba(234, 179, 8, 0.9));
    transform: scale(1.08);
}

.btn-pin.pinned:hover {
    transform: scale(1.22);
    filter: drop-shadow(0 0 8px rgba(234, 179, 8, 1));
}

/* Header Pin / Favorite Button */
.btn-header-pin {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(30, 41, 59, 0.7);
    border: 1.5px solid rgba(148, 163, 184, 0.25);
    border-radius: 12px;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.btn-header-pin:hover {
    background: rgba(55, 115, 245, 0.2);
    border-color: rgba(55, 115, 245, 0.6);
    color: #ffffff;
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 6px 16px rgba(55, 115, 245, 0.3);
}

.btn-header-pin:active {
    transform: translateY(0) scale(0.97);
}

.btn-header-pin.pinned {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.25) 0%, rgba(30, 41, 59, 0.9) 100%);
    border-color: rgba(234, 179, 8, 0.7);
    color: #fef08a;
    box-shadow: 0 0 14px rgba(234, 179, 8, 0.35);
}

.btn-header-pin.pinned:hover {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.35) 0%, rgba(30, 41, 59, 0.95) 100%);
    border-color: rgba(234, 179, 8, 0.9);
    color: #ffffff;
    box-shadow: 0 0 18px rgba(234, 179, 8, 0.5);
}

.btn-header-pin .pin-icon {
    font-size: 14px;
    transition: transform 0.2s ease;
}

.btn-header-pin:hover .pin-icon {
    transform: rotate(-15deg) scale(1.15);
}

/* Professional Select Dropdowns for Exchanges - Matching Symbol Search */
select {
    height: 38px;
    box-sizing: border-box;
    min-width: 120px;
    font-size: 14px;
    font-weight: 500;
    background: linear-gradient(180deg, #1e232d 0%, #181c24 100%);
    border: 1.5px solid var(--accent);
    color: var(--text);
    padding: 8px 32px 8px 14px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.3px;
    cursor: pointer;
    appearance: none;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(55, 115, 245, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%233773f5' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

select:hover {
    border-color: var(--accent);
    background: linear-gradient(180deg, #252a35 0%, #1e232d 100%);
    transform: translateY(-1px);
    box-shadow:
        0 6px 16px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(55, 115, 245, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

select:focus {
    outline: none;
    border-color: var(--accent);
    background: linear-gradient(180deg, #1e232d 0%, #181c24 100%);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.6),
        0 0 0 3px rgba(55, 115, 245, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
}

/* Dropdown options styling - Clean and Simple */
select option {
    background: #1e232d;
    color: #e5e7eb;
    padding: 10px 14px;
    font-weight: 400;
    font-size: 14px;
}

/* Glowing Exchange Status LED Dots */
.ex-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-left: 4px;
    margin-right: 4px;
    flex-shrink: 0;
    overflow: visible !important;
    transition: all 0.3s ease;
}

.dot-green {
    background-color: #2ebd85;
    box-shadow: 0 0 6px #2ebd85, 0 0 2px #2ebd85;
}

.dot-yellow {
    background-color: #f0b90b;
    box-shadow: 0 0 6px #f0b90b, 0 0 2px #f0b90b;
}

.dot-red {
    background-color: #f6465d;
    box-shadow: 0 0 6px #f6465d, 0 0 2px #f6465d;
}

.custom-dropdown-option {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
}

.ex-trigger-content {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}

/* Telegram Auth Button & User Profile Badge */
.tg-auth-container {
    display: flex;
    align-items: center;
    margin-left: 6px;
}

.btn-tg-login {
    background: linear-gradient(135deg, #0088cc 0%, #2AABEE 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(42, 171, 238, 0.35);
}

.btn-tg-login:hover {
    transform: translateY(-1px) scale(1.04);
    box-shadow: 0 0 16px rgba(42, 171, 238, 0.7);
}

.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(42, 171, 238, 0.12);
    border: 1px solid rgba(42, 171, 238, 0.4);
    border-radius: 20px;
    padding: 3px 10px 3px 4px;
}

.user-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #2AABEE;
}

.user-avatar-fallback {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #2AABEE;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.user-name {
    font-size: 12px;
    font-weight: 700;
    color: #60a5fa;
    max-width: 110px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-logout {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 13px;
    padding: 2px 4px;
    margin-left: 2px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.btn-logout:hover {
    color: #f6465d;
    transform: scale(1.2);
}

@keyframes signalSmoothBreathing {
    0% {
        background-color: rgba(16, 185, 129, 0.22) !important;
        border-left-color: #10b981 !important;
    }
    50% {
        background-color: rgba(16, 185, 129, 0.06) !important;
        border-left-color: rgba(16, 185, 129, 0.35) !important;
    }
    100% {
        background-color: rgba(16, 185, 129, 0.22) !important;
        border-left-color: #10b981 !important;
    }
}

.active-signal-pulse {
    animation: signalSmoothBreathing 5.0s ease-in-out infinite !important;
    border-left: 4px solid #10b981 !important;
    position: relative;
    z-index: 10;
    border-radius: 6px;
}

.alert-capsule-nav {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(15, 23, 42, 0.6);
    padding: 3px 5px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-mute-signal {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    height: 28px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-pause-signal {
    background: rgba(217, 119, 6, 0.2) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(251, 191, 36, 0.4) !important;
}
.btn-pause-signal:hover {
    background: rgba(217, 119, 6, 0.35) !important;
    color: #ffffff !important;
    border-color: rgba(251, 191, 36, 0.7) !important;
    box-shadow: 0 0 10px rgba(217, 119, 6, 0.5);
}

.btn-stop-signal {
    background: rgba(220, 38, 38, 0.2) !important;
    color: #f87171 !important;
    border: 1px solid rgba(248, 113, 113, 0.4) !important;
}
.btn-stop-signal:hover {
    background: rgba(220, 38, 38, 0.35) !important;
    color: #ffffff !important;
    border-color: rgba(248, 113, 113, 0.7) !important;
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
}

.btn-resume-signal {
    background: rgba(16, 185, 129, 0.25) !important;
    color: #34d399 !important;
    border: 1px solid rgba(52, 211, 153, 0.5) !important;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.4) !important;
}
.btn-resume-signal:hover {
    background: rgba(16, 185, 129, 0.4) !important;
    color: #ffffff !important;
    border-color: rgba(52, 211, 153, 0.8) !important;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.7) !important;
}

/* User Cabinet Tab Styling */
.cab-tab-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cab-tab-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.cab-tab-btn.active {
    background: #3773f5 !important;
    color: #ffffff !important;
    border-color: #3773f5 !important;
    box-shadow: 0 0 10px rgba(55, 115, 245, 0.5);
}

/* Responsive Mobile Layout (<= 768px) */
@media (max-width: 768px) {
    html, body {
        height: auto !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
    }

    .topbar {
        height: auto !important;
        padding: 8px 10px !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }

    .topbar .controls {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: flex-end !important;
        justify-content: space-between !important;
        gap: 8px 4px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .ex-group.long-group, .ex-group.short-group {
        flex: 1 1 0% !important;
        min-width: 0 !important;
        width: 0 !important;
    }

    .custom-select-wrapper {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .custom-select-trigger {
        padding: 6px 6px !important;
        font-size: 11px !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 3px !important;
    }

    .ex-trigger-content {
        display: flex !important;
        align-items: center !important;
        gap: 5px !important;
        min-width: 0 !important;
        flex: 1 1 auto !important;
        overflow: hidden !important;
    }

    .ex-trigger-content span {
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .custom-select-trigger .arrow-icon {
        flex: 0 0 auto !important;
        margin-left: 2px !important;
    }

    .btn-swap {
        flex: 0 0 32px !important;
        align-self: flex-end !important;
        margin: 0 2px 2px 2px !important;
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        padding: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 50% !important;
    }

    .ex-group.search-group {
        flex: 1 0 100% !important;
        width: 100% !important;
        min-width: 100% !important;
        margin-top: 4px !important;
    }

    .symbol-search-wrapper {
        width: 100% !important;
    }

    .topbar-right-group {
        width: 100% !important;
        margin-left: 0 !important;
        justify-content: space-between !important;
        box-sizing: border-box !important;
    }

    .topbar-nav {
        display: flex !important;
        flex: 1 1 auto !important;
        height: 34px !important;
        padding: 2px !important;
        gap: 3px !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    .nav-tab, .nav-tab:visited {
        flex: 1 1 0% !important;
        min-width: 0 !important;
        padding: 0 6px !important;
        height: 28px !important;
        font-size: 11.5px !important;
        gap: 3px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        justify-content: center !important;
    }

    .nav-tab-disabled {
        flex: 1 1 0% !important;
        min-width: 0 !important;
        padding: 0 6px !important;
        height: 28px !important;
        font-size: 11.5px !important;
        gap: 3px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        justify-content: center !important;
    }

    .badge-soon {
        font-size: 8px !important;
        padding: 1px 3px !important;
    }

    .latency {
        flex-shrink: 0 !important;
        white-space: nowrap !important;
        font-size: 11px !important;
    }


    .main-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        padding: 8px !important;
        height: auto !important;
        overflow: visible !important;
    }

    .left-col {
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
        padding: 12px 10px !important;
        box-sizing: border-box !important;
    }

    .right-col {
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
        padding: 12px 10px !important;
        box-sizing: border-box !important;
    }

    .header-info {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }

    .funding-rates-box {
        width: 100% !important;
        padding: 8px 10px !important;
        box-sizing: border-box !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 6px !important;
        font-size: 11px !important;
    }

    .funding-rates-left {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        font-size: 11px !important;
    }

    .funding-stat-item {
        font-size: 11px !important;
    }

    .funding-net-badge {
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 4px 10px !important;
        box-sizing: border-box !important;
        font-size: 11.5px !important;
        margin: 0 !important;
    }

    .metrics-row {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .metric-box {
        padding: 8px 6px !important;
        gap: 6px !important;
        border-radius: 14px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .ex-trade-card-btn {
        padding: 4px 6px !important;
        min-width: 0 !important;
        width: auto !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .ex-trade-card-btn img.big-ex-icon {
        width: 20px !important;
        height: 20px !important;
        min-width: 20px !important;
        min-height: 20px !important;
    }

    .ex-trade-card-btn .ex-card-title {
        font-size: 8.5px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .metric-box .value {
        font-size: clamp(13px, 4.2vw, 17px) !important;
    }

    #chart {
        height: 280px !important;
    }

    .sidebar-header {
        gap: 6px !important;
    }

    .sidebar-title-text {
        font-size: 14px !important;
    }

    .sidebar-header-actions {
        gap: 4px !important;
    }

    .btn-sidebar-action {
        width: 32px !important;
        height: 32px !important;
        padding: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 12px !important;
    }

    /* Clean Touch-Friendly Table Scroll */
    .sidebar-content {
        width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .sidebar-content table {
        width: 100% !important;
        min-width: 340px !important;
        font-size: 11px !important;
    }

/* Mobile Navigation Bottom Bar (Default hidden on desktop) */
.mobile-nav-bar {
    display: none !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(13, 18, 30, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    z-index: 9999;
    padding: 6px 16px;
    box-sizing: border-box;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.6);
}

@media (max-width: 768px) {
    .mobile-nav-bar {
        display: flex !important;
    }
    body {
        padding-bottom: 70px !important;
    }
}

.mobile-tab-btn {
    flex: 1;
    max-width: 170px;
    height: 44px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-tab-btn.active {
    background: rgba(55, 115, 245, 0.28) !important;
    border-color: rgba(55, 115, 245, 0.65) !important;
    color: #ffffff !important;
    box-shadow: 0 0 14px rgba(55, 115, 245, 0.4);
}

.mobile-tab-icon {
    font-size: 16px;
}

    .drawer-modal {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 16px !important;
        box-sizing: border-box !important;
    }

    .settings-drawer {
        width: 100% !important;
        max-width: 520px !important;
        height: auto !important;
        max-height: 85dvh !important;
        border-radius: 24px !important;
        padding: 20px 20px 16px 20px !important;
        border: 1.5px solid rgba(55, 115, 245, 0.45) !important;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 35px rgba(55, 115, 245, 0.3) !important;
    }

    .drawer-grid-2col {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
        flex: 1 1 auto !important;
        min-height: 0 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding-right: 4px !important;
    }

    .drawer-footer {
        padding: 14px 0 0 0 !important;
        margin-top: 12px !important;
        position: relative !important;
        background: transparent !important;
        z-index: 10 !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    }
}

/* Ticker Button Hover & Dropdown Arrow */
.btn-ticker-trigger {
    cursor: pointer !important;
    gap: 8px !important;
}

.ticker-dropdown-arrow {
    transition: transform 0.25s ease;
    stroke: #60a5fa;
}

.btn-ticker-trigger:hover .ticker-dropdown-arrow {
    transform: translateY(2px);
    stroke: #ffffff;
}

/* Single Coin Selector Drawer Modal */
.coin-selector-drawer {
    width: 520px !important;
    max-width: 92vw !important;
}

.coin-search-container {
    position: relative;
    margin-bottom: 16px;
}

.search-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    stroke: #60a5fa;
    pointer-events: none;
}

.coin-search-container .coin-search-input {
    width: 100%;
    background: rgba(13, 17, 26, 0.8);
    border: 1.5px solid rgba(55, 115, 245, 0.4);
    border-radius: 12px;
    padding: 12px 14px 12px 42px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    outline: none;
    box-sizing: border-box;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.coin-search-container .coin-search-input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 16px rgba(55, 115, 245, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.coin-grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 4px;
}

.coin-grid-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.coin-grid-card:hover {
    background: rgba(55, 115, 245, 0.18);
    border-color: rgba(55, 115, 245, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(55, 115, 245, 0.3);
}

.coin-grid-card.active-ticker {
    background: linear-gradient(135deg, rgba(55, 115, 245, 0.35) 0%, rgba(37, 99, 235, 0.25) 100%) !important;
    border-color: #60a5fa !important;
    box-shadow: 0 0 16px rgba(55, 115, 245, 0.5);
}

.coin-ticker-name {
    font-size: 14px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.coin-active-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #60a5fa;
    box-shadow: 0 0 8px #60a5fa;
}

/* Eye Icon Hide Coin Button */
.btn-hide-coin {
    background: transparent !important;
    border: none !important;
    color: #64748b !important;
    font-size: 11px !important;
    cursor: pointer !important;
    padding: 1px 3px !important;
    border-radius: 4px !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    margin-left: 2px !important;
    margin-right: 2px !important;
    vertical-align: middle !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 0.65 !important;
    box-shadow: none !important;
    outline: none !important;
}

.btn-hide-coin:hover {
    color: #f59e0b !important;
    background: rgba(245, 158, 11, 0.18) !important;
    transform: scale(1.15) !important;
    opacity: 1 !important;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.4) !important;
}

/* Hidden Coins Section in Settings Modal */
.hidden-coins-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(13, 17, 26, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    min-height: 42px;
    max-height: 120px;
    overflow-y: auto;
    align-items: center;
}

.hidden-coin-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(55, 115, 245, 0.18);
    border: 1px solid rgba(55, 115, 245, 0.4);
    color: #60a5fa;
    padding: 3px 8px 3px 10px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.hidden-coin-chip b {
    color: #ffffff;
}

.btn-chip-remove {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    padding: 0 2px;
    line-height: 1;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.btn-chip-remove:hover {
    color: #f6465d;
    transform: scale(1.2);
}

.no-hidden-txt {
    font-size: 12px;
    color: #64748b;
    font-style: italic;
}

/* Share Pair Button & Toast Notification */
.btn-share-pair {
    background: rgba(55, 115, 245, 0.15) !important;
    border: 1px solid rgba(55, 115, 245, 0.35) !important;
    color: #60a5fa !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    padding: 6px 12px !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    user-select: none;
}

.btn-share-pair:hover {
    background: #3773f5 !important;
    color: #ffffff !important;
    border-color: #60a5fa !important;
    transform: translateY(-1px) scale(1.04) !important;
    box-shadow: 0 0 14px rgba(55, 115, 245, 0.6) !important;
}

.share-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(135deg, #1e2538 0%, #121724 100%);
    border: 1.5px solid #3773f5;
    color: #ffffff;
    padding: 12px 22px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(55, 115, 245, 0.5);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.share-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.badge-txflow {
    background: rgba(74, 222, 128, 0.15) !important;
    color: #4ade80 !important;
    border: 1px solid rgba(74, 222, 128, 0.3) !important;
}

.badge-pacifica {
    background: rgba(56, 189, 248, 0.15) !important;
    color: #38bdf8 !important;
    border: 1px solid rgba(56, 189, 248, 0.3) !important;
}

.metrics-row {
    position: relative;
    z-index: 100;
}

.metric-box {
    position: relative;
    z-index: 100;
}

.custom-ticker-wrapper {
    position: relative;
    display: inline-block;
    user-select: none;
    z-index: 99999 !important;
}

.custom-ticker-wrapper.open {
    z-index: 99999 !important;
}

.custom-ticker-trigger {
    background: rgba(15, 23, 42, 0.9);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.4);
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-ticker-trigger:hover {
    background: rgba(56, 189, 248, 0.15);
    border-color: #38bdf8;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}

.custom-ticker-arrow {
    font-size: 9px;
    color: #38bdf8;
    transition: transform 0.2s ease;
}

.custom-ticker-wrapper.open .custom-ticker-arrow {
    transform: rotate(180deg);
}

.custom-ticker-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 105px;
    background: rgba(15, 23, 42, 0.98) !important;
    border: 1px solid rgba(56, 189, 248, 0.5);
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.85);
    z-index: 999999 !important;
    padding: 4px;
    backdrop-filter: blur(16px);
    animation: fadeInScale 0.15s ease-out;
    pointer-events: auto !important;
}

.custom-ticker-menu.show {
    display: block;
}

.custom-ticker-option {
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 700;
    color: #e2e8f0;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.15s ease;
}

.custom-ticker-option:hover {
    background: rgba(56, 189, 248, 0.18);
    color: #38bdf8;
}

.custom-ticker-option.active {
    background: rgba(56, 189, 248, 0.25);
    color: #38bdf8;
    border-left: 2px solid #38bdf8;
}

/* Active Alerts List Cards inside Alert Drawer */
.alert-settings-drawer {
    width: 720px;
    max-width: 95vw;
}

.active-alerts-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 6px;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 4px;
}

.no-alerts-msg {
    grid-column: 1 / -1;
    text-align: center;
    color: #64748b;
    font-size: 13px;
    padding: 16px;
    background: rgba(30, 41, 59, 0.3);
    border: 1px dashed rgba(148, 163, 184, 0.2);
    border-radius: 10px;
}

.active-alert-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.active-alert-card:hover {
    border-color: rgba(96, 165, 250, 0.5);
    background: rgba(30, 41, 59, 0.9);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.active-alert-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.active-alert-symbol {
    font-size: 14px;
    font-weight: 800;
    color: #ffffff;
    background: linear-gradient(135deg, rgba(55, 115, 245, 0.3) 0%, rgba(30, 41, 59, 0.9) 100%);
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid rgba(55, 115, 245, 0.4);
}

.active-alert-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.active-alert-exchanges {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 500;
}

.active-alert-thresholds {
    display: flex;
    gap: 8px;
    font-size: 12px;
}

.alert-thresh-in {
    color: #4ade80;
    font-weight: 600;
}

.alert-thresh-out {
    color: #f87171;
    font-weight: 600;
}

.active-alert-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-alert-edit {
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(55, 115, 245, 0.2);
    border: 1px solid rgba(55, 115, 245, 0.4);
    color: #60a5fa;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-alert-edit:hover {
    background: rgba(55, 115, 245, 0.4);
    color: #ffffff;
}

.btn-alert-delete {
    padding: 4px 8px;
    font-size: 13px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-alert-delete:hover {
    background: rgba(239, 68, 68, 0.35);
    color: #ffffff;
}

/* Calculator Drawer & Button */
.calc-settings-drawer {
    width: 440px;
    max-width: 95vw;
}

.btn-calc-icon {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn-calc-icon:hover {
    background: rgba(55, 115, 245, 0.25) !important;
    color: var(--accent) !important;
    border-color: rgba(55, 115, 245, 0.5) !important;
    transform: translateY(-1px) scale(1.08);
    box-shadow: 0 0 12px rgba(55, 115, 245, 0.4);
}

.btn-calc-icon:hover .calc-icon-svg {
    transform: rotate(10deg) scale(1.15);
    stroke: #60a5fa;
    filter: drop-shadow(0 0 5px rgba(96, 165, 250, 0.8));
    transition: transform 0.25s ease;
}

/* Premium Skeleton Loading Glow for Chart */
#chart.skeleton-loading {
    position: relative;
    overflow: hidden;
}

#chart.skeleton-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(55, 115, 245, 0.12) 0%, rgba(13, 18, 30, 0.6) 100%);
    z-index: 10;
    pointer-events: none;
    border-radius: 12px;
}

#chart.skeleton-loading::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -150%;
    width: 300%;
    height: 200%;
    background: linear-gradient(
        115deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(55, 115, 245, 0.04) 30%,
        rgba(96, 165, 250, 0.18) 50%,
        rgba(55, 115, 245, 0.04) 70%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: chartSkeletonPulse 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    z-index: 11;
    pointer-events: none;
}

@keyframes chartSkeletonPulse {
    0% {
        transform: translateX(-60%) rotate(0deg);
    }
    100% {
        transform: translateX(60%) rotate(0deg);
    }
}

.chart-skeleton-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 15;
    background: rgba(13, 18, 30, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(96, 165, 250, 0.35);
    padding: 8px 18px;
    border-radius: 20px;
    color: #93c5fd;
    font-size: 12.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(55, 115, 245, 0.35);
    pointer-events: none;
    animation: badgePulse 1.5s ease-in-out infinite alternate;
}

.skeleton-glow-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #60a5fa;
    box-shadow: 0 0 10px #60a5fa, 0 0 20px #3b82f6;
    animation: dotGlow 0.9s ease-in-out infinite alternate;
}

@keyframes dotGlow {
    from { opacity: 0.4; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1.25); }
}

@keyframes badgePulse {
    from { transform: translate(-50%, -50%) scale(0.98); }
    to { transform: translate(-50%, -50%) scale(1.02); }
}

/* Funding & Strategy Backtester Page Layout & Component Styles */
.topbar-right-group {
    width: 400px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-left: auto;
    flex-shrink: 0;
}

.topbar-nav {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(15, 23, 42, 0.6);
    padding: 3px;
    height: 36px;
    box-sizing: border-box;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-tab, .nav-tab:visited {
    padding: 0 12px;
    height: 28px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8 !important;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-tab:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.05) !important;
    text-decoration: none !important;
}

.nav-tab.active, .nav-tab.active:visited {
    background: rgba(55, 115, 245, 0.25) !important;
    color: #ffffff !important;
    border: 1px solid rgba(55, 115, 245, 0.5) !important;
    box-shadow: 0 0 12px rgba(55, 115, 245, 0.3) !important;
    text-decoration: none !important;
}

.nav-tab-disabled {
    cursor: not-allowed !important;
    opacity: 0.85;
    background: rgba(30, 41, 59, 0.4) !important;
    border: 1px dashed rgba(148, 163, 184, 0.3) !important;
    color: #94a3b8 !important;
    user-select: none;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0 10px;
    height: 28px;
    border-radius: 7px;
    font-size: 12.5px;
    font-weight: 600;
}

.nav-tab-disabled:hover {
    border-color: rgba(245, 158, 11, 0.5) !important;
    background: rgba(30, 41, 59, 0.75) !important;
}

.badge-soon {
    background: linear-gradient(135deg, #f59e0b 0%, #ec4899 100%);
    color: #ffffff;
    font-size: 9px;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 4px;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    line-height: 1.3;
}

.btn-top-funding {
    background: linear-gradient(135deg, rgba(55, 115, 245, 0.2) 0%, rgba(96, 165, 250, 0.1) 100%);
    border: 1px solid rgba(55, 115, 245, 0.4);
    color: #93c5fd;
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.25s ease;
}

.btn-top-funding:hover {
    background: rgba(55, 115, 245, 0.35);
    color: #ffffff;
    box-shadow: 0 0 14px rgba(55, 115, 245, 0.4);
}

.funding-page-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 16px;
    padding: 16px;
    max-width: 1600px;
    margin: 0 auto;
    box-sizing: border-box;
}

@media (max-width: 1024px) {
    .funding-page-grid {
        grid-template-columns: 1fr;
    }
}

.funding-controls-card, .chart-card {
    background: rgba(18, 24, 38, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    box-sizing: border-box;
}

.funding-controls-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.funding-card-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 12px;
}

.funding-card-title h2 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: #ffffff;
}

.beta-tag {
    font-size: 10px;
    font-weight: 800;
    background: rgba(55, 115, 245, 0.2);
    border: 1px solid rgba(55, 115, 245, 0.4);
    color: #60a5fa;
    padding: 2px 8px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.backtest-mode-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    background: rgba(13, 18, 28, 0.8);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.mode-btn {
    padding: 8px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mode-btn.active {
    background: rgba(55, 115, 245, 0.25);
    color: #ffffff;
    border: 1px solid rgba(55, 115, 245, 0.5);
}

.backtest-pickers-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.picker-box.full-width {
    grid-column: 1 / -1;
}

.bt-select {
    width: 100%;
    background: #181d28;
    border: 1px solid rgba(55, 115, 245, 0.35);
    color: #ffffff;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    outline: none;
    box-sizing: border-box;
}

.range-btn-group {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}

.range-btn {
    flex: 1;
    padding: 7px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.range-btn.active {
    background: rgba(55, 115, 245, 0.25);
    color: #ffffff;
    border-color: rgba(55, 115, 245, 0.5);
}

.backtest-inputs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.input-box input {
    width: 100%;
    background: #181d28;
    border: 1px solid rgba(55, 115, 245, 0.35);
    color: #ffffff;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 4px;
    box-sizing: border-box;
}

.run-bt-btn {
    width: 100%;
    padding: 11px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 12px;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
    margin-top: 4px;
}

.bt-summary-panel {
    background: rgba(13, 18, 28, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bt-summary-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.bt-metric {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bt-lbl {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.5px;
}

.bt-val {
    font-size: 14px;
    font-weight: 700;
}

.bt-val.green { color: #2ebd85; }
.bt-val.red { color: #f6465d; }
.bt-val.white { color: #ffffff; }
.bt-val.accent { color: #60a5fa; }

.bt-pnl-card {
    background: rgba(15, 23, 42, 0.7);
    border: 1.5px solid rgba(55, 115, 245, 0.35);
    padding: 10px 14px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bt-pnl-values {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bt-big-val {
    font-size: 20px;
    font-weight: 800;
}

.bt-badge-val {
    font-size: 13px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(46, 189, 133, 0.15);
    border: 1px solid rgba(46, 189, 133, 0.3);
}

.funding-charts-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chart-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}

.chart-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-title h3 {
    font-size: 14px;
    font-weight: 700;
    margin: 0;
    color: #e2e8f0;
}

.chart-legend {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #94a3b8;
}

.legend-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.legend-dot.green { background: #2ebd85; }
.legend-dot.red { background: #f6465d; }
.legend-dot.white { background: #ffffff; }
.legend-dot.blue { background: #38bdf8; }

.btn-coin-funding {
    background: rgba(55, 115, 245, 0.18);
    border: 1px solid rgba(55, 115, 245, 0.4);
    color: #60a5fa;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.btn-coin-funding:hover {
    background: rgba(55, 115, 245, 0.35);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(55, 115, 245, 0.4);
}

.bt-chart-container {
    width: 100%;
    height: 280px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

/* Custom Select Dropdowns in Backtester Grid */
.backtest-pickers-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

.backtest-pickers-grid .picker-box {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.backtest-pickers-grid .custom-select-wrapper {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.backtest-pickers-grid .custom-select-trigger {
    background: #181d28;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.backtest-pickers-grid .custom-select-trigger .ex-trigger-content {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.backtest-pickers-grid .custom-select-trigger .ex-trigger-content span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.backtest-pickers-grid .custom-select-trigger:hover {
    border-color: rgba(55, 115, 245, 0.5);
    background: #1e2433;
}

.backtest-pickers-grid .custom-dropdown-menu {
    top: calc(100% + 4px);
    z-index: 100;
}

/* Symbol Search Input Styling */
.symbol-search-wrapper {
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.symbol-search-wrapper input {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    height: 40px;
    background: #181d28;
    border: 1.5px solid rgba(55, 115, 245, 0.4);
    border-radius: 8px;
    padding: 8px 14px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    outline: none;
    transition: all 0.2s ease;
}

.symbol-search-wrapper input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.35);
    background: #1c2230;
}

.symbol-search-wrapper .symbol-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #181d28;
    border: 1px solid rgba(55, 115, 245, 0.3);
    border-radius: 8px;
    max-height: 220px;
    overflow-y: auto;
    z-index: 999;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
    display: none;
}

.symbol-search-wrapper .symbol-dropdown.show {
    display: block;
}

.symbol-search-wrapper .symbol-item {
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.15s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.symbol-search-wrapper .symbol-item:hover,
.symbol-search-wrapper .symbol-item.active {
    background: rgba(55, 115, 245, 0.22);
    color: #60a5fa;
    padding-left: 18px;
}

/* Hide ugly native number spinner arrows */
input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { 
    -webkit-appearance: none; 
    margin: 0; 
}
input[type=number] {
    -moz-appearance: textfield;
}