:root {
    --bg-page: #060913;
    --bg-sidebar: #090e1c;
    --bg-card: #0d1527;
    --bg-card-sub: #111a30;
    --border-color: #162238;
    --border-subtle: #1e2d4a;
    --teal-primary: #00e5a3;
    --teal-hover: #00c78e;
    --teal-glow: rgba(0, 229, 163, 0.15);
    --text-white: #ffffff;
    --text-muted: #e0f2fe;
    --text-dim: #93c5fd;
    --color-gold: #f59e0b;
    --color-red: #ef4444;
    --font-family: 'Cairo', system-ui, -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-page);
    color: var(--text-white);
    font-family: var(--font-family);
    direction: rtl;
    text-align: right;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Master Layout: Sidebar Right, Content Left */
.layout-wrapper {
    display: flex;
    flex-direction: row-reverse; /* Right sidebar in RTL */
    min-height: 100vh;
    width: 100vw;
}

/* Sidebar */
.sidebar {
    width: 270px;
    background-color: var(--bg-sidebar);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 16px 12px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    box-sizing: border-box;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 10px;
    flex-shrink: 0;
}

.brand-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-text {
    font-size: 20px;
    font-weight: 800;
    color: var(--teal-primary);
    letter-spacing: -0.5px;
}

.brand-logo-icon {
    font-size: 24px;
    color: var(--teal-primary);
    font-weight: bold;
}

.sidebar-close-btn {
    display: none;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
    align-items: center;
    justify-content: center;
}

.sidebar-close-btn:hover {
    color: #fff;
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
}

.mobile-menu-btn {
    display: none;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--teal-primary);
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mobile-menu-btn:hover {
    background: rgba(0, 229, 163, 0.15);
    border-color: var(--teal-primary);
}

.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(4, 7, 14, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99990;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-backdrop.active {
    display: block;
    opacity: 1;
}

.mobile-bottom-nav {
    display: none;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-left: 2px;
    padding-right: 2px;
    padding-bottom: 6px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE / Edge */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.sidebar-nav::-webkit-scrollbar {
    display: none;
    width: 0px;
    background: transparent;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 9px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: right;
    width: 100%;
    flex-shrink: 0;
}

.nav-item:hover {
    background: var(--bg-card);
    color: var(--text-white);
}

.nav-item.active {
    background: var(--teal-primary);
    color: #060913;
    font-weight: 800;
    box-shadow: 0 4px 15px rgba(0, 229, 163, 0.3);
}

.nav-icon {
    font-size: 17px;
    line-height: 1;
}

.sidebar-footer {
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
    margin-top: auto;
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 9px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.18);
    color: var(--color-red);
    border-color: rgba(239, 68, 68, 0.4);
}

.logout-icon {
    font-size: 15px;
}

.user-info-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.badge-pro {
    background: rgba(0, 229, 163, 0.15);
    color: var(--teal-primary);
    font-size: 11px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid rgba(0, 229, 163, 0.3);
}

.user-name {
    font-size: 13px;
    font-weight: 700;
}

.server-ip-label {
    display: none !important;
}

/* Main Area */
.main-wrapper {
    flex: 1;
    padding: 24px 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: calc(100vw - 270px);
}

/* Top bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-badge-top {
    background: #111a30;
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: var(--teal-primary);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 800;
}

.pulse-dot {
    width: 10px;
    height: 10px;
    background: var(--teal-primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--teal-primary);
}

/* Modern Bot Status & Control Switch */
.btn-top-action {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 6px 14px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    user-select: none;
    text-decoration: none;
}

/* 1. Bot is Running (Active) - Emerald Green Theme */
.btn-top-action.bot-status-running,
.btn-top-action:not(.is-paused):not(.bot-status-paused) {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.16) 0%, rgba(5, 150, 105, 0.22) 100%);
    border-color: rgba(16, 185, 129, 0.5);
    color: #10b981;
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.2);
}

.btn-top-action.bot-status-running:hover,
.btn-top-action:not(.is-paused):not(.bot-status-paused):hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(239, 68, 68, 0.2) 100%);
    border-color: rgba(239, 68, 68, 0.6);
    color: #f8fafc;
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.3);
}

/* 2. Bot is Paused (Stopped) - Coral Red / Warning Theme */
.btn-top-action.bot-status-paused,
.btn-top-action.is-paused {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.18) 0%, rgba(185, 28, 28, 0.26) 100%);
    border-color: rgba(239, 68, 68, 0.55);
    color: #f87171;
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.25);
}

.btn-top-action.bot-status-paused:hover,
.btn-top-action.is-paused:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.25) 0%, rgba(16, 185, 129, 0.25) 100%);
    border-color: rgba(16, 185, 129, 0.65);
    color: #f8fafc;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.35);
}

/* Status Indicator Group */
.bot-status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.bot-pulse-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
    position: relative;
    transition: all 0.3s ease;
}

/* Green Pulsing Dot when Running */
.btn-top-action.bot-status-running .bot-pulse-dot,
.btn-top-action:not(.is-paused):not(.bot-status-paused) .bot-pulse-dot {
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: botPulseGreen 1.8s infinite;
}

@keyframes botPulseGreen {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1.15); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Red Pulsing Dot when Paused */
.btn-top-action.bot-status-paused .bot-pulse-dot,
.btn-top-action.is-paused .bot-pulse-dot {
    background: #ef4444;
    box-shadow: 0 0 8px #ef4444;
    animation: botPulseRed 2s infinite;
}

@keyframes botPulseRed {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1.15); box-shadow: 0 0 0 7px rgba(239, 68, 68, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.bot-status-label {
    opacity: 0.85;
    font-size: 12px;
    font-weight: 600;
}

.bot-status-val {
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.3px;
}

.btn-top-action.bot-status-running .bot-status-val,
.btn-top-action:not(.is-paused):not(.bot-status-paused) .bot-status-val {
    color: #34d399;
}

.btn-top-action.bot-status-paused .bot-status-val,
.btn-top-action.is-paused .bot-status-val {
    color: #fca5a5;
}

/* Vertical Divider */
.bot-status-divider {
    width: 1px;
    height: 15px;
    background: rgba(255, 255, 255, 0.2);
    display: inline-block;
    margin: 0 1px;
}

/* Action Trigger Group */
.bot-action-trigger {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.25);
    font-size: 12px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.btn-top-action:hover .bot-action-trigger {
    background: rgba(255, 255, 255, 0.2);
}

.bot-action-icon {
    font-size: 12px;
    display: inline-flex;
    align-items: center;
}

/* Mode Switcher Pills */
.mode-pills {
    display: flex;
    gap: 10px;
    background: var(--bg-card);
    padding: 6px;
    border-radius: 14px;
    width: fit-content;
    border: 1px solid var(--border-color);
}

.pill-btn {
    padding: 8px 24px;
    border-radius: 10px;
    border: none;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    background: transparent;
    color: var(--text-muted);
    transition: all 0.2s;
}

.pill-btn.active {
    background: var(--teal-primary);
    color: #060913;
    font-weight: 800;
}

.pill-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Tabs */
.tab-pane {
    display: none;
    flex-direction: column;
    gap: 20px;
}

.tab-pane.active {
    display: flex;
}

/* Dashboard Sections Container & Spacing */
#dashboardCustomizableArea {
    display: flex !important;
    flex-direction: column !important;
    gap: 24px !important;
    width: 100% !important;
    margin-bottom: 28px !important;
}

.custom-section-item {
    width: 100% !important;
    margin-bottom: 24px !important;
}

.custom-section-item.user-hidden-element,
.custom-section-item[style*="display: none"] {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Metrics Row (KPIs identical to screenshot) */
.metrics-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px !important;
}

.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: transform 0.2s;
}

.kpi-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-subtle);
}

.kpi-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 800;
}

.kpi-value {
    font-size: 26px;
    font-weight: 900;
    color: var(--text-white);
}

.text-teal {
    color: var(--teal-primary) !important;
}

.kpi-sub {
    font-size: 12px;
    color: var(--text-dim);
    font-weight: 600;
}

/* Two-column Grid (Services vs Activity) */
.two-col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 28px !important;
    margin-bottom: 28px !important;
}

.dash-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.full-card {
    grid-column: 1 / -1;
}

.card-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-white);
}

.section-desc {
    font-size: 13.5px;
    color: var(--text-muted);
    font-weight: 600;
    line-height: 1.6;
}

/* Services Status List */
.services-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.service-item {
    background: var(--bg-card-sub);
    border: 1px solid var(--border-color);
    padding: 14px 18px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.service-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.service-name {
    font-size: 14px;
    font-weight: 700;
}

.service-url {
    font-size: 11px;
    color: var(--text-dim);
    font-family: monospace;
}

.badge-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
}

.badge-status.online {
    background: rgba(0, 229, 163, 0.15);
    color: var(--teal-primary);
    border: 1px solid rgba(0, 229, 163, 0.3);
}

.badge-status.offline {
    background: rgba(239, 68, 68, 0.15);
    color: var(--color-red);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 280px;
    overflow-y: auto;
}

.activity-row {
    background: var(--bg-card-sub);
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
}

.activity-symbol {
    font-weight: 800;
    color: #fff;
    width: 90px;
}

.activity-badge {
    padding: 2px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
}

.activity-badge.BUY, .activity-badge.LONG {
    background: rgba(0, 229, 163, 0.15);
    color: var(--teal-primary);
    border: 1px solid rgba(0, 229, 163, 0.3);
}

.activity-badge.SELL, .activity-badge.SHORT {
    background: rgba(245, 158, 11, 0.15);
    color: var(--color-gold);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.activity-time {
    color: var(--text-dim);
    font-size: 11px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-dim);
    font-size: 13px;
}

/* Forms & Inputs */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
}

input[type="text"],
input[type="password"],
input[type="number"] {
    background: var(--bg-card-sub);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    padding: 12px 16px;
    outline: none;
    transition: border-color 0.2s;
}

input:focus {
    border-color: var(--teal-primary);
    box-shadow: 0 0 0 2px var(--teal-glow);
}

.password-wrapper {
    position: relative;
    display: flex;
}

.password-wrapper input {
    width: 100%;
    padding-left: 45px;
}

.btn-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #93c5fd;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    color: var(--teal-primary);
    background: rgba(0, 229, 163, 0.1);
}

.icon-eye {
    display: block;
    stroke: currentColor;
    transition: stroke 0.2s ease, transform 0.2s ease;
}

.btn-icon:hover .icon-eye,
.an-tool-btn:hover .icon-eye,
.btn-eye:hover .icon-eye {
    stroke: var(--teal-primary);
    transform: scale(1.08);
}

.form-row.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.field-hint {
    font-size: 11px;
    color: var(--text-dim);
}

/* Toggle Control */
.toggle-control {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.toggle-control input {
    display: none;
}

.toggle-slider {
    width: 44px;
    height: 24px;
    background: var(--border-color);
    border-radius: 20px;
    position: relative;
    transition: background 0.3s;
    flex-shrink: 0;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    top: 3px;
    right: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s;
}

.toggle-control input:checked + .toggle-slider {
    background: var(--teal-primary);
}

.toggle-control input:checked + .toggle-slider::after {
    transform: translateX(-20px);
}

.toggle-label {
    font-size: 13px;
    font-weight: 600;
}

/* Action Buttons */
.action-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 10px;
}

.btn-action {
    padding: 12px 24px;
    border-radius: 10px;
    border: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-action.primary {
    background: var(--teal-primary);
    color: #060913;
}

.btn-action.primary:hover {
    background: var(--teal-hover);
    box-shadow: 0 4px 15px rgba(0, 229, 163, 0.3);
}

.btn-secondary,
.btn-action.secondary {
    background: var(--bg-card-sub);
    border: 1px solid var(--border-subtle);
    color: var(--text-white);
    padding: 12px 24px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    text-decoration: none;
    box-sizing: border-box;
}

.btn-secondary:hover,
.btn-action.secondary:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.btn-refresh {
    background: var(--bg-card-sub);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
}

.btn-refresh:hover {
    color: #fff;
    border-color: var(--border-subtle);
}

.btn-clear-log {
    background: rgba(239, 68, 68, 0.1);
    color: #ff6b6b;
    border: 1px solid rgba(239, 68, 68, 0.35);
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-clear-log:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: #ef4444;
    color: #fff;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

/* Webhook URL Box */
.webhook-url-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.copy-field {
    display: flex;
    gap: 10px;
}

.copy-field input {
    flex: 1;
    background: var(--bg-card-sub);
    border: 1px solid var(--teal-primary);
    color: var(--teal-primary);
    font-weight: 700;
}

.btn-copy {
    padding: 0 20px;
    background: var(--teal-primary);
    color: #060913;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.btn-copy:hover {
    background: var(--teal-hover);
}

.btn-test-webhook {
    background: #111a30;
    color: var(--teal-primary);
    border: 1px solid rgba(0, 229, 163, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 16px;
    transition: all 0.2s ease;
}

.btn-test-webhook:hover {
    background: rgba(0, 229, 163, 0.15);
    border-color: var(--teal-primary);
    color: #fff;
    box-shadow: 0 0 12px rgba(0, 229, 163, 0.25);
}

.webhook-test-result {
    margin-top: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.6;
    animation: fadeIn 0.3s ease;
}

.webhook-test-result.success {
    background: rgba(0, 229, 163, 0.12);
    border: 1px solid rgba(0, 229, 163, 0.35);
    color: var(--teal-primary);
}

.webhook-test-result.error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #ff6b6b;
}

.code-block-wrapper {
    background: #04070e;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px;
    margin-top: 10px;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.btn-copy-code {
    background: var(--bg-card-sub);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 6px;
    cursor: pointer;
}

.btn-copy-code:hover {
    color: #fff;
}

pre {
    direction: ltr;
    text-align: left;
    font-family: monospace;
    font-size: 12px;
    color: #38bdf8;
    overflow-x: auto;
}

.mt-2 { margin-top: 12px; }
.mt-3 { margin-top: 16px; }

/* Full Logs */
.full-logs-container {
    max-height: 550px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.log-entry {
    background: var(--bg-card-sub);
    border-right: 4px solid var(--teal-primary);
    padding: 12px 16px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
}

.log-entry.SELL {
    border-right-color: var(--color-gold);
}

.log-entry.FAILED, .log-entry.REJECTED {
    border-right-color: var(--color-red);
}

.log-top {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-dim);
}

.log-msg {
    color: #fff;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    left: 24px;
    background: var(--bg-card);
    color: #fff;
    padding: 14px 22px;
    border-radius: 12px;
    border: 1px solid var(--teal-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    display: none;
    z-index: 999999;
    font-size: 14px;
    font-weight: 700;
}

/* Users Management Table */
.users-table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-card-sub);
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: right;
}

.users-table th {
    background: #090e1c;
    color: #ffffff;
    font-weight: 700;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
}

.users-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    color: #ffffff;
    vertical-align: middle;
}

.order-id-badge {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 6px;
    padding: 4px 10px;
    color: #ffffff !important;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    user-select: all;
}

.order-id-badge:hover {
    background: rgba(0, 229, 163, 0.18);
    border-color: var(--teal-primary);
    color: var(--teal-primary) !important;
    box-shadow: 0 0 10px rgba(0, 229, 163, 0.25);
}

.signal-val-white {
    color: #ffffff !important;
    font-weight: 700;
    font-size: 13px;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.3px;
}

.users-table tr:last-child td {
    border-bottom: none;
}

.users-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.users-table td::before {
    display: none;
}

.pass-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: monospace;
}

.payload-snippet {
    background: #04070e;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 10px;
    font-family: monospace;
    font-size: 11px;
    color: #38bdf8;
    cursor: pointer;
    display: inline-block;
    max-width: 100%;
    word-break: break-all;
    transition: all 0.2s;
    line-height: 1.4;
}

.payload-snippet:hover {
    border-color: var(--teal-primary);
    color: var(--teal-primary);
}

.badge-source-tradingview {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(41, 98, 255, 0.12);
    border: 1px solid rgba(41, 98, 255, 0.35);
    color: #60a5fa;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    user-select: none;
}

.badge-source-tradingview:hover {
    background: rgba(41, 98, 255, 0.25);
    border-color: #3b82f6;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.35);
}

.badge-source-tradingview svg {
    flex-shrink: 0;
}

.btn-tbl {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: #162238;
    color: #fff;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-tbl:hover {
    background: #1f304f;
}

.btn-tbl.danger {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--color-red);
}

.btn-tbl.danger:hover {
    background: rgba(239, 68, 68, 0.25);
}

.btn-tbl.warning {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.3);
    color: var(--color-gold);
}

.tbl-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

/* Modal Overlay for Index */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.modal-card {
    background: #0d1527;
    border: 1px solid #1e2d4a;
    border-radius: 18px;
    width: 100%;
    max-width: 440px;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

.modal-actions .btn-action,
.modal-actions .btn-secondary {
    flex-shrink: 0;
    min-width: 110px;
    height: 44px;
}

/* ==========================================================================
   RESPONSIVE DESIGN (iPad, Tablets & Mobile Devices)
   ========================================================================== */

/* Tablet & iPad (<= 1024px) */
@media (max-width: 1024px) {
    .layout-wrapper {
        display: block;
        width: 100%;
        min-height: 100vh;
        overflow-x: hidden;
    }

    .sidebar {
        position: fixed;
        top: 0;
        right: -310px;
        width: 290px;
        height: 100vh;
        height: 100dvh;
        z-index: 99999;
        background-color: var(--bg-sidebar);
        border-left: 1px solid var(--border-subtle);
        box-shadow: -10px 0 35px rgba(0, 0, 0, 0.85);
        transition: right 0.32s cubic-bezier(0.16, 1, 0.3, 1);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .sidebar.open {
        right: 0;
    }

    .sidebar-close-btn {
        display: inline-flex;
    }

    .mobile-menu-btn {
        display: inline-flex;
    }

    .main-wrapper {
        max-width: 100%;
        width: 100%;
        padding: 20px 24px 85px 24px;
        margin: 0;
    }

    .metrics-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .two-col-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .real-trading-card {
        padding: 18px;
    }

    .rtc-row-1 {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .rtc-row-2 {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .rtc-row-3 {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }

    .trade-details-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .form-row.grid-2 {
        grid-template-columns: 1fr 1fr;
    }
}

/* Mobile & Small Tablets (<= 768px) */
@media (max-width: 768px) {
    .main-wrapper {
        padding: 14px 12px 85px 12px;
        gap: 14px;
    }

    .top-bar {
        gap: 10px;
    }

    .top-bar-left {
        gap: 10px;
    }

    .user-badge-top {
        display: none;
    }

    .status-indicator {
        font-size: 15px;
    }

    .btn-top-action {
        padding: 6px 12px;
        font-size: 12px;
    }

    .mode-pills {
        width: 100%;
        display: flex;
        justify-content: stretch;
    }

    .pill-btn {
        flex: 1;
        padding: 8px 10px;
        text-align: center;
        font-size: 12px;
    }

    .metrics-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .kpi-card {
        padding: 12px 14px;
        gap: 4px;
        border-radius: 12px;
    }

    .kpi-label {
        font-size: 11px;
    }

    .kpi-value {
        font-size: 18px;
    }

    .kpi-sub {
        font-size: 10px;
    }

    .dash-card {
        padding: 16px;
        border-radius: 14px;
    }

    .card-title {
        font-size: 15px;
    }

    .card-title-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .card-title-bar > div:last-child {
        width: 100%;
        display: flex;
        gap: 8px;
    }

    .card-title-bar .btn-refresh,
    .card-title-bar .btn-clear-log {
        flex: 1;
        justify-content: center;
        text-align: center;
        padding: 8px 10px;
    }

    .form-row.grid-2 {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .action-bar {
        flex-direction: column;
        width: 100%;
    }

    .btn-action {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .copy-field {
        flex-direction: column;
        gap: 8px;
    }

    .btn-copy {
        height: 42px;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .trades-view-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .trades-view-actions {
        width: 100%;
        display: flex;
        justify-content: space-between;
    }

    .rtc-row-1 {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .rtc-row-2 {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .rtc-row-3 {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .trade-details-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
        margin-bottom: 10px !important;
    }

    .trade-detail-cell {
        padding: 8px 4px !important;
        border-radius: 8px !important;
    }

    .trade-detail-label {
        font-size: 10px !important;
    }

    .trade-detail-val {
        font-size: 12px !important;
    }

    .trade-timestamps-row {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 6px !important;
        padding: 10px 12px !important;
    }

    .trade-timestamps-row > div {
        width: 100% !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        font-size: 11px !important;
    }

    .trade-reason-row {
        width: 100% !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        font-size: 11px !important;
        padding: 4px 12px !important;
    }

    .service-item {
        padding: 10px 14px;
    }

    .service-name {
        font-size: 13px;
    }

    .service-url {
        font-size: 10px;
        word-break: break-all;
    }

    .activity-row {
        padding: 10px 12px;
        font-size: 12px;
    }

    .activity-symbol {
        width: 75px;
        font-size: 12px;
    }

    /* Users Table: Transform from horizontal table to vertical cards */
    .users-table-wrapper {
        background: transparent !important;
        border: none !important;
        overflow: visible !important;
    }

    .users-table thead {
        display: none !important;
    }

    .users-table, 
    .users-table tbody {
        display: flex !important;
        flex-direction: column !important;
        gap: 14px !important;
        width: 100% !important;
    }

    .users-table tr {
        display: flex !important;
        flex-direction: column !important;
        background: var(--bg-card-sub) !important;
        border: 1px solid var(--border-color) !important;
        border-radius: 14px !important;
        padding: 16px !important;
        width: 100% !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25) !important;
    }

    .users-table td {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 10px 0 !important;
        border-bottom: 1px dashed rgba(255, 255, 255, 0.08) !important;
        width: 100% !important;
        font-size: 13px !important;
    }

    .users-table td:last-child {
        border-bottom: none !important;
        padding-bottom: 0 !important;
        padding-top: 12px !important;
    }

    .users-table td::before {
        content: attr(data-label) !important;
        display: inline-block !important;
        font-size: 12px !important;
        font-weight: 700 !important;
        color: var(--text-muted) !important;
        flex-shrink: 0 !important;
    }

    .users-table td.empty-state {
        display: block !important;
        text-align: center !important;
        border-bottom: none !important;
        padding: 24px !important;
    }

    .users-table td.empty-state::before {
        display: none !important;
    }

    .users-table .tbl-actions {
        width: 100% !important;
        display: flex !important;
        gap: 8px !important;
    }

    .users-table .tbl-actions .btn-tbl {
        flex: 1 !important;
        justify-content: center !important;
        text-align: center !important;
        padding: 9px 4px !important;
        font-size: 12px !important;
    }

    .users-table td.signal-payload-cell {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 6px !important;
    }

    .users-table td.signal-payload-cell .payload-snippet {
        width: 100% !important;
        display: block !important;
    }

    /* Mobile Bottom Navigation Bar */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 60px;
        background: rgba(9, 14, 28, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-top: 1px solid var(--border-color);
        z-index: 9990;
        padding: 4px 6px env(safe-area-inset-bottom, 4px) 6px;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.55);
        justify-content: space-around;
        align-items: center;
    }

    .bnav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        background: none;
        border: none;
        color: var(--text-dim);
        font-family: inherit;
        font-size: 11px;
        font-weight: 700;
        cursor: pointer;
        padding: 6px 0;
        transition: all 0.15s ease;
        border-radius: 8px;
    }

    .bnav-icon {
        font-size: 18px;
        line-height: 1;
    }

    .bnav-item.active {
        color: var(--teal-primary);
    }

    .bnav-item:active {
        transform: scale(0.94);
    }
}

/* Extra Small Phones (<= 480px) */
@media (max-width: 480px) {
    .rtc-row-3 {
        grid-template-columns: 1fr;
    }

    .trade-details-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 6px !important;
    }

    .trade-detail-label {
        font-size: 9.5px !important;
    }

    .trade-detail-val {
        font-size: 11.5px !important;
    }

    .modal-card {
        padding: 20px 16px;
        max-width: 95%;
    }
}

/* Trades Section Specific Styling */
.badge-trade {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
}

.badge-trade.BUY {
    background: rgba(0, 229, 163, 0.15);
    color: var(--teal-primary);
    border: 1px solid rgba(0, 229, 163, 0.3);
}

.badge-trade.SELL {
    background: rgba(239, 68, 68, 0.15);
    color: var(--color-red);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-close-trade {
    padding: 6px 14px;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ff6b6b;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-close-trade:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.6);
    color: #fff;
    transform: translateY(-1px);
}

/* Signal Specific Styles */
.badge-status.executed {
    background: rgba(0, 229, 163, 0.15);
    color: var(--teal-primary);
    border: 1px solid rgba(0, 229, 163, 0.3);
}

.badge-status.ignored {
    background: rgba(245, 158, 11, 0.15);
    color: var(--color-gold);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-status.rejected, .badge-status.failed {
    background: rgba(239, 68, 68, 0.15);
    color: var(--color-red);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.payload-snippet {
    display: inline-block;
    max-width: 260px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    padding: 3px 8px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 11px;
    color: #a5b4fc;
    direction: ltr;
    text-align: left;
    cursor: pointer;
}

.payload-snippet:hover {
    border-color: var(--teal-primary);
    color: #fff;
}

/* ===================================================
   صفقاتي (My Trades) - Real Trading Log Layout
   =================================================== */

.trades-view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 4px;
}

.trades-view-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.trades-glow-dot {
    width: 10px;
    height: 10px;
    background: #00e5a3;
    border-radius: 50%;
    box-shadow: 0 0 10px #00e5a3;
    display: inline-block;
}

.trades-view-title {
    font-size: 22px;
    font-weight: 900;
    color: #fff;
    margin: 0;
}

.trades-view-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.badge-pro-barwazi {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.35));
    border: 1px solid rgba(16, 185, 129, 0.6);
    color: #00e5a3;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.btn-refresh-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-refresh-pill:hover {
    background: rgba(0, 229, 163, 0.15);
    border-color: #00e5a3;
    color: #fff;
}

/* Real Trading Log Card */
.real-trading-card {
    background: #080c14;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.rtc-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 15px;
    font-weight: 800;
    color: #f1f5f9;
}

.rtc-yellow-badge {
    font-size: 14px;
}

.rtc-row-1 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}

.rtc-metric-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 12px 14px;
    text-align: center;
}

.rtc-metric-label {
    font-size: 12px;
    color: #93c5fd;
    margin-bottom: 4px;
    font-weight: 600;
}

.rtc-metric-val {
    font-size: 16px;
    font-weight: 800;
    color: #fff;
}

.rtc-sub-val {
    font-size: 12px;
    color: #e0f2fe;
    font-weight: 600;
}

.rtc-row-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}

.rtc-win-box, .rtc-loss-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
}

.rtc-winloss-label {
    font-size: 12px;
    color: #93c5fd;
    font-weight: 600;
}

.rtc-winloss-val {
    font-size: 15px;
    font-weight: 800;
}

.rtc-row-3 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}

.rtc-stat-col {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 8px 10px;
    text-align: center;
}

.rtc-col-label {
    font-size: 11px;
    color: #93c5fd;
    display: block;
    margin-bottom: 3px;
    font-weight: 600;
}

.rtc-col-val {
    font-size: 13px;
    font-weight: 800;
}

.rtc-row-4 {
    text-align: center;
    padding: 12px 0 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.rtc-net-center {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.rtc-net-label {
    font-size: 12px;
    color: #93c5fd;
    font-weight: 600;
}

.rtc-net-val {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0.5px;
}

.rtc-net-val.negative {
    color: #ff4d6d;
}

.rtc-net-val.positive {
    color: #00e5a3;
}

/* Sub-Navigation Pills */
.trades-subtabs-wrapper {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.trades-subtab-btn {
    flex: 1;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 800;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #090e18;
    color: #e0f2fe;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.trades-subtab-btn.active {
    border-color: #00e5a3;
    background: rgba(0, 229, 163, 0.09);
    color: #fff;
    box-shadow: 0 0 15px rgba(0, 229, 163, 0.15);
}

.trades-subtab-btn:hover:not(.active) {
    background: #111827;
    color: #f1f5f9;
}

/* Trade Cards Stack */
.trades-cards-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.trade-card-item {
    background: #0c121d;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.trade-card-item:hover {
    background: #0f1624;
    border-color: rgba(255, 255, 255, 0.12);
}

.trade-card-item.is-win {
    border-right: 4px solid #00e5a3;
}

.trade-card-item.is-loss {
    border-right: 4px solid #ff4d6d;
}

.trade-card-item.is-test {
    border-right: 4px solid #60a5fa;
}

/* Trades Pagination & Load More Controls */
.trades-load-more-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 8px;
    width: 100%;
    margin-top: 4px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.btn-load-more-trades {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(16, 24, 40, 0.95), rgba(12, 18, 30, 0.98));
    border: 1px solid rgba(0, 229, 163, 0.4);
    color: #00e5a3;
    padding: 12px 26px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 18px rgba(0, 229, 163, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.btn-load-more-trades:hover {
    background: linear-gradient(135deg, rgba(0, 229, 163, 0.18), rgba(16, 24, 40, 0.98));
    border-color: #00e5a3;
    color: #ffffff;
    box-shadow: 0 6px 24px rgba(0, 229, 163, 0.25);
    transform: translateY(-2px);
}

.btn-load-more-trades:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(0, 229, 163, 0.15);
}

.btn-load-more-trades .btn-load-icon {
    font-size: 16px;
    display: inline-block;
    transition: transform 0.25s ease;
}

.btn-load-more-trades:hover .btn-load-icon {
    transform: translateY(2px);
}

.btn-load-more-trades .btn-load-badge {
    background: rgba(0, 229, 163, 0.16);
    color: #5eead4;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(0, 229, 163, 0.3);
    margin-right: 4px;
}

.btn-load-all-trades {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #94a3b8;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-load-all-trades:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    color: #f8fafc;
    transform: translateY(-1px);
}

.trades-all-loaded-card {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 20px;
    margin: 8px 0;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
}

.signal-row-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
}

.signal-row-item .trade-card-item {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}

.signal-seq-outside {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 44px;
    padding: 0 4px;
    margin-top: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    color: #94a3b8;
    font-size: 15px;
    font-weight: 800;
    font-family: 'Cairo', 'Consolas', sans-serif;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease, transform 0.15s ease;
    flex-shrink: 0;
}

.signal-row-item:hover .signal-seq-outside,
.signal-seq-outside:hover {
    color: #00e5a3;
    transform: scale(1.08);
}

.signals-details-grid {
    grid-template-columns: repeat(6, 1fr) !important;
}

.signal-type-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
    line-height: 1.2;
}

.signal-type-badge.BUY {
    background: rgba(0, 229, 163, 0.15);
    color: var(--teal-primary);
    border: 1px solid rgba(0, 229, 163, 0.3);
}

.signal-type-badge.SELL {
    background: rgba(239, 68, 68, 0.15);
    color: var(--color-red);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.signal-type-badge.TEST {
    background: rgba(96, 165, 250, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(96, 165, 250, 0.3);
}

.signal-mini-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10.5px;
    font-weight: 700;
    white-space: nowrap;
    line-height: 1.2;
}

.signal-mini-status.success {
    background: rgba(0, 229, 163, 0.12);
    color: #00e5a3;
    border: 1px solid rgba(0, 229, 163, 0.25);
}

.signal-mini-status.warning {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.signal-mini-status.danger {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.signal-card-left-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    white-space: nowrap;
}

.signal-card-amount {
    color: var(--teal-primary);
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.signal-card-time {
    color: #93c5fd;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.signal-card-chevron {
    transition: transform 0.2s ease;
    display: inline-block;
    color: #64748b;
    font-size: 10px;
}

.trade-card-item.expanded .signal-card-chevron {
    transform: rotate(180deg);
}

@media (max-width: 768px) {
    .signals-details-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
}

.trade-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    user-select: none;
}

.trade-card-right-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.trade-card-symbol {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
}

.trade-card-side-long {
    font-size: 12px;
    font-weight: 800;
    color: #00e5a3;
}

.trade-card-badge-spot {
    font-size: 11px;
    color: #93c5fd;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.04);
    padding: 2px 6px;
    border-radius: 4px;
}

.trade-card-pnl {
    font-size: 14px;
    font-weight: 800;
    direction: ltr;
    text-align: left;
}

.trade-card-pnl.win {
    color: #00e5a3;
}

.trade-card-pnl.loss {
    color: #ff4d6d;
}

.trade-card-body {
    display: none;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.35);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.trade-card-item.expanded .trade-card-body {
    display: block;
    animation: fadeIn 0.2s ease;
}

.trade-details-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    text-align: center;
    margin-bottom: 12px;
}

.trade-detail-cell {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 8px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-align: center;
}

.trade-detail-label {
    font-size: 12px;
    color: #93c5fd;
    font-weight: 700;
}

.trade-detail-val {
    font-size: 13.5px;
    font-weight: 800;
    color: #ffffff;
    direction: ltr;
    word-break: break-all;
}

.trade-timestamps-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #e0f2fe;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 8px 12px;
    margin-top: 10px;
    margin-bottom: 6px;
    font-weight: 600;
}

.trade-reason-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #93c5fd;
    padding: 2px 4px;
    font-weight: 600;
}

.empty-trades-state {
    text-align: center;
    padding: 40px 20px;
    color: #93c5fd;
    font-size: 14px;
    background: #090e18;
    border-radius: 10px;
    border: 1px dashed rgba(255, 255, 255, 0.08);
}

/* ========================================================
   Analytics Hub Styles (مركز التحليلات)
   ======================================================== */
.analytics-master-bar {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(10, 15, 29, 0.92));
    border: 1px solid rgba(0, 229, 163, 0.25);
    border-radius: 14px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(10px);
}

.an-master-right {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.an-nav-label {
    font-size: 13px;
    color: #e0f2fe;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.an-nav-values {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.an-money-val {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -0.5px;
}

.an-btc-val {
    font-size: 13px;
    color: #f59e0b;
    font-weight: 700;
    background: rgba(245, 158, 11, 0.1);
    padding: 2px 8px;
    border-radius: 6px;
}

.an-badge-pill {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
}

.an-badge-pill.positive {
    background: rgba(0, 229, 163, 0.15);
    color: #00e5a3;
    border: 1px solid rgba(0, 229, 163, 0.3);
}

.an-badge-pill.negative {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.an-master-center {
    flex: 1;
    min-width: 220px;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.an-alloc-head {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #e0f2fe;
    font-weight: 700;
}

.an-exposure-tag {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 800;
}

.an-exposure-tag.safe {
    background: rgba(0, 229, 163, 0.15);
    color: #00e5a3;
}

.an-exposure-tag.moderate {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.an-exposure-tag.high {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.an-segmented-bar {
    display: flex;
    gap: 4px;
    width: 100%;
    height: 14px;
    align-items: center;
    background: transparent;
    padding: 2px 0;
}

.an-bar-seg {
    flex: 1;
    height: 100%;
    border-radius: 3px;
    background-color: #64748b;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    transition: background 0.3s ease, transform 0.15s ease;
}

.an-bar-seg:hover {
    transform: scaleY(1.2);
    filter: brightness(1.15);
}

.an-alloc-sub {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #93c5fd;
    font-weight: 600;
    margin-top: 3px;
}

.an-ratio-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.an-color-square {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    flex-shrink: 0;
}

.an-color-square.orange {
    background-color: #ea580c;
    box-shadow: 0 0 6px rgba(234, 88, 12, 0.5);
}

.an-color-square.grey {
    background-color: #64748b;
    box-shadow: 0 0 6px rgba(100, 116, 139, 0.4);
}

.an-ratio-item .ratio-label {
    color: #e0f2fe;
    font-weight: 600;
}

.an-ratio-item.invested .ratio-pct {
    color: #f97316;
    font-weight: 800;
    font-size: 13px;
}

.an-ratio-item.cash .ratio-pct {
    color: #94a3b8;
    font-weight: 800;
    font-size: 13px;
}

.an-ratio-item .ratio-amt {
    color: #93c5fd;
    font-size: 11px;
    opacity: 0.85;
}

.an-master-left {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.an-tools-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.an-circuit-shield {
    background: rgba(0, 229, 163, 0.12);
    color: #00e5a3;
    border: 1px solid rgba(0, 229, 163, 0.3);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
}

.an-circuit-shield.tripped {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.5);
    animation: pulse 1.5s infinite;
}

.an-tool-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.an-tool-btn:hover {
    background: rgba(0, 229, 163, 0.15);
    border-color: #00e5a3;
    color: #00e5a3;
}

.an-tool-btn.primary {
    background: rgba(0, 229, 163, 0.12);
    border-color: rgba(0, 229, 163, 0.35);
    color: #00e5a3;
}

.an-tool-btn.primary:hover {
    background: #00e5a3;
    color: #060913;
}

.an-cache-timer {
    font-size: 12px;
    color: #5eead4;
    font-weight: 700;
    background: rgba(0, 229, 163, 0.08);
    border: 1px solid rgba(0, 229, 163, 0.25);
    padding: 3px 10px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Subtabs Segmented Bar */
.analytics-subtabs-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.analytics-subtabs-nav::-webkit-scrollbar {
    display: none;
}

.an-subtab-btn {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e0f2fe;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.an-subtab-btn:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.25);
}

.an-subtab-btn.active {
    background: rgba(0, 229, 163, 0.15);
    border-color: #00e5a3;
    color: #00e5a3;
    box-shadow: 0 0 15px rgba(0, 229, 163, 0.2);
}

.an-subpane {
    display: none;
}

.an-subpane.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Charts Grid */
.an-charts-grid {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 18px;
    margin-bottom: 20px;
}

.an-chart-card {
    min-height: 320px;
    display: flex;
    flex-direction: column;
}

.an-chart-container {
    flex: 1;
    position: relative;
    width: 100%;
    min-height: 250px;
    margin-top: 10px;
}

.an-chart-container.donut-box {
    min-height: 330px;
}

.an-card-hint {
    font-size: 12.5px;
    color: #93c5fd;
    font-weight: 600;
}

.an-period-pills {
    display: flex;
    gap: 6px;
}

.an-period-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #e0f2fe;
    padding: 4px 11px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.an-period-btn:hover {
    color: #ffffff;
    border-color: rgba(0, 229, 163, 0.4);
}

.an-period-btn.active {
    background: #00e5a3;
    color: #060913;
    border-color: #00e5a3;
}

/* Quant KPI Grid */
.an-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

/* Daily PnL Calendar Heatmap */
.an-calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
    gap: 6px;
    margin-top: 15px;
}

.an-cal-cell {
    aspect-ratio: 1;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    position: relative;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.an-cal-cell:hover {
    transform: scale(1.1);
    z-index: 2;
}

.an-cal-cell.win {
    background: rgba(0, 229, 163, 0.18);
    color: #00e5a3;
    border: 1px solid rgba(0, 229, 163, 0.4);
}

.an-cal-cell.loss {
    background: rgba(239, 68, 68, 0.18);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.an-cal-cell.empty {
    background: rgba(255, 255, 255, 0.03);
    color: #475569;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Fear and Greed Meter */
.an-meter-wrapper {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.an-meter-score {
    font-size: 48px;
    font-weight: 900;
    color: #00e5a3;
    line-height: 1;
}

.an-meter-label {
    font-size: 15px;
    font-weight: 800;
    color: #e2e8f0;
    margin-top: 6px;
}

.an-meter-track {
    height: 14px;
    background: linear-gradient(90deg, #ef4444 0%, #f59e0b 50%, #00e5a3 100%);
    border-radius: 10px;
    position: relative;
    max-width: 280px;
    margin: 15px auto 0 auto;
}

.an-meter-fill {
    position: absolute;
    height: 22px;
    width: 6px;
    background: #ffffff;
    border: 1px solid #000;
    border-radius: 3px;
    top: -4px;
    transform: translateX(-50%);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    transition: left 0.6s ease;
}

.an-meter-scale {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #93c5fd;
    font-weight: 600;
    max-width: 280px;
    margin: 8px auto 0 auto;
}

/* Privacy Mode */
.privacy-masked {
    filter: blur(6px) !important;
    user-select: none !important;
    transition: filter 0.2s ease;
}

/* Mobile responsive for Analytics */
@media (max-width: 768px) {
    .analytics-master-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        padding: 14px;
    }
    .an-master-center {
        max-width: 100%;
        min-width: 100%;
    }
    .an-master-left {
        align-items: stretch;
    }
    .an-tools-row {
        justify-content: space-between;
    }
    .an-charts-grid {
        grid-template-columns: 1fr;
    }
    .an-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========================================================
/* Holdings Notification & Table Styles (عرض تفاصيل العملات بنمط الإشعارات والجدول) */
.holdings-container-box {
    margin-top: 15px;
}

.holdings-view-toggle {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 3px;
    gap: 3px;
}

.h-view-btn {
    background: none;
    border: none;
    color: #93c5fd;
    padding: 4px 11px;
    font-size: 11.5px;
    font-weight: 700;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.h-view-btn.active {
    background: #00e5a3;
    color: #060913;
    box-shadow: 0 0 10px rgba(0, 229, 163, 0.35);
}

.h-view-btn:hover:not(.active) {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

/* Holdings Notification Style Feed */
.holdings-notify-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Holdings Notification Style Feed (نمط الإشعارات والدرج التفاعلي) */
.holdings-notify-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.holding-notify-item {
    background: #0d1527;
    border: 1px solid var(--border-color);
    border-right: 4px solid var(--teal-primary);
    border-radius: 10px;
    padding: 0;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.holding-notify-item:hover {
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.holding-notify-item.positive {
    border-right-color: var(--teal-primary);
}

.holding-notify-item.negative {
    border-right-color: var(--color-red);
}

.notify-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 13px 16px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
    gap: 12px;
}

.notify-head:hover {
    background: rgba(255, 255, 255, 0.03);
}

.notify-head-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notify-symbol-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notify-names {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.notify-symbol {
    font-size: 15px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.3px;
}

.notify-sub {
    font-size: 11px;
    color: #93c5fd;
    font-weight: 600;
}

.notify-head-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notify-pnl-group {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 4px 10px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.notify-pnl-group:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(0, 229, 163, 0.3);
}

.notify-pnl-title {
    font-size: 11.5px;
    color: #93c5fd;
    font-weight: 700;
    white-space: nowrap;
}

.notify-pnl-values {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.notify-pnl-usdt {
    font-size: 13.5px;
    font-weight: 800;
    white-space: nowrap;
}

.notify-pnl-info-icon {
    font-size: 11px;
    opacity: 0.75;
    margin-right: 2px;
}

.notify-drawer-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #93c5fd;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s ease;
    flex-shrink: 0;
}

.holding-notify-item.expanded .notify-drawer-chevron {
    transform: rotate(180deg);
    color: var(--teal-primary);
}

/* Accordion Drawer Engine */
.notify-drawer-content {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
    overflow: hidden;
}

.holding-notify-item.expanded .notify-drawer-content {
    grid-template-rows: 1fr;
    opacity: 1;
}

.notify-drawer-inner {
    overflow: hidden;
    padding: 12px 16px 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.16);
}

.notify-body-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    background: rgba(6, 9, 19, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 12px 14px;
}

.notify-metric {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.metric-label {
    font-size: 11.5px;
    color: #93c5fd;
    font-weight: 600;
}

.notify-metric strong {
    font-size: 13.5px;
    font-weight: 800;
    color: #ffffff;
}

.metric-val-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.notify-weight-bar {
    flex: 1;
    height: 5px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    max-width: 60px;
}

.notify-weight-fill {
    height: 100%;
    background: linear-gradient(90deg, #00e5a3, #3b82f6);
    border-radius: 4px;
}

.metric-unit {
    font-size: 11px;
    color: #93c5fd;
    font-weight: 600;
}

.notify-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 4px;
}

.notify-footer-label {
    font-size: 11.5px;
    color: #93c5fd;
    font-weight: 700;
}

/* Mobile Responsive Optimization for Holdings Notification Cards */
@media (max-width: 580px) {
    .notify-head {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 12px 14px;
    }

    .notify-head-top {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .notify-head-left {
        width: 100%;
        justify-content: space-between;
    }

    .notify-pnl-group {
        width: 100%;
        justify-content: space-between;
        padding: 6px 12px;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.09);
        border-radius: 8px;
        box-sizing: border-box;
    }

    .notify-drawer-inner {
        padding: 10px 12px 12px 12px;
    }

    .notify-body-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 10px 10px;
    }

    .notify-metric:last-child:nth-child(odd) {
        grid-column: span 2;
    }

    .notify-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .notify-footer .h-actions-row {
        width: 100%;
        display: flex;
        gap: 6px;
    }

    .notify-footer .h-action-btn {
        flex: 1;
        text-align: center;
        padding: 7px 4px;
        font-size: 11px;
        display: flex;
        justify-content: center;
        align-items: center;
    }
}

.holdings-table-wrapper {
    background: rgba(13, 21, 39, 0.7);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.holdings-table-responsive {
    overflow-x: auto;
    width: 100%;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 229, 163, 0.3) rgba(255, 255, 255, 0.02);
}

.holdings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: right;
    min-width: 780px;
}

.holdings-table th {
    background: #090e1c;
    color: #e0f2fe;
    font-weight: 700;
    font-size: 12.5px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.holdings-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: #ffffff;
    vertical-align: middle;
    font-weight: 600;
    white-space: nowrap;
}

.holdings-table tbody tr {
    transition: background 0.15s ease;
}

.holdings-table tbody tr:hover {
    background: rgba(0, 229, 163, 0.04);
}

.holdings-table tbody tr:last-child td {
    border-bottom: none;
}

/* Holdings Cell Elements */
.h-symbol-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.h-symbol-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(0, 229, 163, 0.15), rgba(59, 130, 246, 0.15));
    border: 1px solid rgba(0, 229, 163, 0.3);
    color: #00e5a3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 12px;
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

.h-symbol-name {
    font-size: 14px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.3px;
}

.h-asset-name {
    font-size: 11px;
    color: #93c5fd;
    font-weight: 600;
}

.h-weight-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 90px;
}

.h-weight-val {
    font-size: 13px;
    font-weight: 800;
    color: #00e5a3;
}

.h-weight-track {
    height: 5px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    width: 100%;
}

.h-weight-fill {
    height: 100%;
    background: linear-gradient(90deg, #00e5a3, #3b82f6);
    border-radius: 4px;
}

.h-qty-val {
    font-size: 13.5px;
    font-weight: 800;
    color: #f8fafc;
    direction: ltr;
    display: inline-block;
}

.h-qty-asset {
    font-size: 11px;
    color: #93c5fd;
    margin-right: 4px;
    font-weight: 700;
}

.h-value-val {
    font-size: 14px;
    font-weight: 800;
    color: #ffffff;
    direction: ltr;
    display: inline-block;
}

.h-price-val {
    font-size: 13px;
    font-weight: 700;
    color: #e0f2fe;
    direction: ltr;
    display: inline-block;
}

.h-pnl-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.h-pnl-usdt {
    font-size: 13.5px;
    font-weight: 800;
    direction: ltr;
    display: inline-block;
}

.h-actions-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
}

.h-action-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e0f2fe;
    padding: 5px 9px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.h-action-btn:hover {
    background: rgba(0, 229, 163, 0.15);
    border-color: #00e5a3;
    color: #00e5a3;
}

.h-action-btn.danger {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.h-action-btn.danger:hover {
    background: #ef4444;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

/* Circuit Breaker Interactive Controls */
.cb-config-item {
    flex-wrap: wrap;
    gap: 12px;
}

.cb-controls-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.cb-number-box {
    display: inline-flex;
    align-items: center;
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.45);
    border-radius: 8px;
    padding: 4px 10px;
    gap: 6px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4), 0 0 8px rgba(239, 68, 68, 0.1);
    transition: all 0.2s ease;
}

.cb-number-box:focus-within,
.cb-number-box:hover {
    border-color: var(--color-red);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.35);
}

.cb-number-box input {
    width: 65px;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
    text-align: center;
    outline: none;
    font-family: inherit;
}

.cb-number-box .cb-unit {
    color: var(--color-red);
    font-weight: 800;
    font-size: 15px;
    text-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ========================================================
   سجل الأرباح والخسائر (PnL Journal) Modern System
   ======================================================== */
.pnl-journal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, rgba(13, 21, 39, 0.95), rgba(17, 26, 48, 0.85));
    border: 1px solid var(--border-color);
    padding: 18px 24px;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.pnl-header-title-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.pnl-glow-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #00e5a3;
    box-shadow: 0 0 16px #00e5a3, 0 0 32px rgba(0, 229, 163, 0.4);
    display: inline-block;
    flex-shrink: 0;
}

.pnl-journal-title {
    font-size: 22px;
    font-weight: 900;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.5px;
}

.pnl-subtitle {
    font-size: 13px;
    color: #94a3b8;
    margin-top: 3px;
    font-weight: 500;
}

.pnl-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-pnl-export {
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #38bdf8;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s ease;
}

.btn-pnl-export:hover {
    background: rgba(56, 189, 248, 0.22);
    border-color: #38bdf8;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.25);
}

/* Timeframe Navigation Tabs */
.pnl-timeframe-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    background: rgba(13, 21, 39, 0.6);
    padding: 8px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
}

.pnl-tf-btn {
    background: transparent;
    border: 1px solid transparent;
    color: #94a3b8;
    font-size: 14px;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    user-select: none;
}

.pnl-tf-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.04);
}

.pnl-tf-btn.active {
    background: linear-gradient(135deg, rgba(0, 229, 163, 0.18), rgba(0, 229, 163, 0.08));
    border-color: rgba(0, 229, 163, 0.5);
    color: #00e5a3;
    box-shadow: 0 4px 18px rgba(0, 229, 163, 0.15);
}

.pnl-tf-btn .tf-badge {
    background: rgba(0, 0, 0, 0.35);
    color: #cbd5e1;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 6px;
    font-weight: 800;
}

.pnl-tf-btn.active .tf-badge {
    background: rgba(0, 229, 163, 0.25);
    color: #00e5a3;
}

/* 4 KPI Summary Cards */
.pnl-summary-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 22px;
}

.pnl-kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.pnl-kpi-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.15);
}

.pnl-kpi-card.win-card { border-top: 3px solid #00e5a3; }
.pnl-kpi-card.loss-card { border-top: 3px solid #ef4444; }
.pnl-kpi-card.fee-card { border-top: 3px solid #f59e0b; }
.pnl-kpi-card.net-card { border-top: 3px solid #38bdf8; }

.pnl-kpi-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.pnl-kpi-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.pnl-kpi-dot.green { background: #00e5a3; box-shadow: 0 0 8px #00e5a3; }
.pnl-kpi-dot.red { background: #ef4444; box-shadow: 0 0 8px #ef4444; }
.pnl-kpi-dot.gold { background: #f59e0b; box-shadow: 0 0 8px #f59e0b; }
.pnl-kpi-dot.cyan { background: #38bdf8; box-shadow: 0 0 8px #38bdf8; }

.pnl-kpi-title {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 700;
}

.pnl-kpi-body {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.pnl-kpi-main-val {
    font-size: 22px;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.pnl-kpi-sub-val {
    font-size: 12px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
}

.pnl-kpi-amount {
    font-size: 15px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 8px;
    letter-spacing: -0.3px;
    display: inline-flex;
    align-items: center;
}
.pnl-kpi-amount.text-green {
    background: rgba(0, 229, 163, 0.12);
    color: #00e5a3;
    border: 1px solid rgba(0, 229, 163, 0.3);
    box-shadow: 0 0 10px rgba(0, 229, 163, 0.1);
}
.pnl-kpi-amount.text-red {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.1);
}

.badge-win { background: rgba(0, 229, 163, 0.15); color: #00e5a3; border: 1px solid rgba(0, 229, 163, 0.3); }
.badge-loss { background: rgba(239, 68, 68, 0.15); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-fee { background: rgba(245, 158, 11, 0.15); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.3); }

.pnl-kpi-footer {
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
}

/* Toolbar & Search */
.pnl-table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.pnl-search-wrapper {
    position: relative;
    flex: 1;
    max-width: 380px;
}

.pnl-search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #64748b;
    pointer-events: none;
}

.pnl-search-wrapper input {
    width: 100%;
    background: #090e1c;
    border: 1px solid var(--border-color);
    padding: 10px 40px 10px 14px;
    border-radius: 10px;
    color: #ffffff;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;
}

.pnl-search-wrapper input:focus {
    border-color: #00e5a3;
    box-shadow: 0 0 12px rgba(0, 229, 163, 0.2);
}

.pnl-count-pill {
    font-size: 12px;
    color: #94a3b8;
    background: #0d1527;
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

/* Accordion Table */
.pnl-accordion-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    width: 100%;
}

.pnl-table-head {
    display: grid;
    grid-template-columns: 55px minmax(130px, 1.8fr) minmax(80px, 1fr) minmax(100px, 1.2fr) minmax(100px, 1.2fr) minmax(80px, 1fr) minmax(110px, 1.3fr) minmax(90px, 1.1fr) 60px;
    width: 100%;
    min-width: 860px;
    box-sizing: border-box;
    background: #090e1c;
    border-bottom: 1px solid var(--border-color);
    padding: 14px 20px;
    font-size: 12.5px;
    font-weight: 800;
    color: #94a3b8;
    text-align: center;
}

.pnl-th.th-sym, .pnl-th.th-num {
    text-align: right;
}

.pnl-accordion-stack {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.pnl-accordion-item {
    border-bottom: 1px solid rgba(22, 34, 56, 0.8);
    transition: background 0.2s ease;
    width: 100%;
}

.pnl-accordion-item:last-child {
    border-bottom: none;
}

.pnl-accordion-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.pnl-accordion-item.pnl-row-win {
    border-right: 3px solid #00e5a3;
}

.pnl-accordion-item.pnl-row-loss {
    border-right: 3px solid #ef4444;
}

.pnl-row-main {
    display: grid;
    grid-template-columns: 55px minmax(130px, 1.8fr) minmax(80px, 1fr) minmax(100px, 1.2fr) minmax(100px, 1.2fr) minmax(80px, 1fr) minmax(110px, 1.3fr) minmax(90px, 1.1fr) 60px;
    width: 100%;
    min-width: 860px;
    box-sizing: border-box;
    padding: 14px 20px;
    align-items: center;
    cursor: pointer;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
}

/* Hide mobile-specific card elements on desktop by default */
.pnl-mobile-top,
.pnl-mobile-grid,
.pnl-mobile-action {
    display: none !important;
}

.pnl-td.td-num, .pnl-td.td-sym {
    text-align: right;
}

.pnl-seq-pill {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 6px;
}
.pnl-seq-pill.win { background: rgba(0, 229, 163, 0.12); color: #00e5a3; }
.pnl-seq-pill.loss { background: rgba(239, 68, 68, 0.12); color: #ef4444; }

.coin-symbol-bold {
    font-weight: 800;
    color: #ffffff;
    font-size: 14px;
    margin-left: 6px;
}

.pnl-status-tag {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
}
.tag-win { background: rgba(0, 229, 163, 0.15); color: #00e5a3; border: 1px solid rgba(0, 229, 163, 0.3); }
.tag-loss { background: rgba(239, 68, 68, 0.15); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }

.pnl-win-arrow {
    display: inline-block;
    color: #00e5a3;
    font-size: 10px;
    margin-right: 2px;
    vertical-align: middle;
}

.btn-pnl-load-more {
    background: #985eff;
    border: 1px solid #985eff;
    color: #ffffff !important;
    font-size: 13.5px;
    font-weight: 700;
    padding: 10px 28px;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s ease;
    box-shadow: 0 4px 16px rgba(152, 94, 255, 0.38);
}

.btn-pnl-load-more span {
    color: #ffffff !important;
}

.btn-pnl-load-more:hover {
    background: #8544f0;
    border-color: #8544f0;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(152, 94, 255, 0.58);
}

.pnl-pct-pill {
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
}
.pnl-pct-pill.win { background: rgba(0, 229, 163, 0.15); color: #00e5a3; }
.pnl-pct-pill.loss { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

.pnl-chevron {
    font-size: 11px;
    color: #64748b;
    transition: transform 0.25s ease;
}

.pnl-accordion-item.expanded .pnl-chevron {
    color: #00e5a3;
}

/* ========================================================
   Expanded Details: Modern & Professional Layout
   ======================================================== */
.pnl-row-details {
    background: #080d19;
    border-top: 1px solid var(--border-color);
    padding: 18px 22px;
    animation: fadeInSlide 0.25s ease forwards;
}

@keyframes fadeInSlide {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.pnl-exp-section-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 800;
    color: #94a3b8;
    margin-bottom: 10px;
}

.pnl-exp-icon {
    font-size: 15px;
}

/* Merged Trade Details Layout (Prices + Timestamps + Metrics) */
.pnl-trade-pairs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.pnl-pair-card {
    background: rgba(13, 21, 39, 0.85);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.pnl-pair-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.pnl-pair-card.entry-card {
    border-right: 3px solid rgba(0, 229, 163, 0.7);
}
.pnl-pair-card.exit-card {
    border-right: 3px solid rgba(239, 68, 68, 0.7);
}
.pnl-pair-card.qty-card {
    border-right: 3px solid rgba(56, 189, 248, 0.7);
}
.pnl-pair-card.fee-card {
    border-right: 3px solid rgba(245, 158, 11, 0.7);
}

.pnl-pair-lbl-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 2px;
}

.pnl-pair-val-row {
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    padding: 2px 0 4px 0;
}

.pnl-pair-price {
    font-size: 16.5px;
    line-height: 1.25;
}

.pnl-pair-timestamp {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    color: #94a3b8;
    border-top: 1px dashed rgba(255, 255, 255, 0.07);
    padding-top: 6px;
    margin-top: auto;
}

.pnl-time-icon {
    font-size: 12px;
    flex-shrink: 0;
}

.pnl-time-val {
    font-weight: 600;
}

.pnl-metric-lbl {
    font-size: 11.5px;
    color: #94a3b8;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pnl-mini-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.pnl-mini-dot.green { background: #00e5a3; box-shadow: 0 0 6px #00e5a3; }
.pnl-mini-dot.red { background: #ef4444; box-shadow: 0 0 6px #ef4444; }
.pnl-mini-dot.cyan { background: #38bdf8; box-shadow: 0 0 6px #38bdf8; }
.pnl-mini-dot.gold { background: #f59e0b; box-shadow: 0 0 6px #f59e0b; }

/* Standalone Duration Box directly under Quantity & Fees */
.pnl-duration-standalone-box {
    margin-top: 8px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(13, 21, 39, 0.95));
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-right: 4px solid #f59e0b;
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.pnl-dur-left {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.pnl-dur-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 800;
    color: #cbd5e1;
}

.pnl-dur-icon {
    font-size: 14px;
}

.pnl-dur-lbl {
    font-weight: 700;
}

.pnl-dur-date {
    font-size: 11px;
    color: #94a3b8;
}

.pnl-dur-date strong {
    color: #cbd5e1;
}

.pnl-dur-val-side {
    display: flex;
    align-items: center;
}

.pnl-dur-value {
    font-size: 15px;
    letter-spacing: -0.3px;
    color: #f59e0b !important;
}

/* Highlight Net PnL Outcome Banner */
.pnl-highlight-net-box {
    background: rgba(13, 21, 39, 0.95);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.pnl-highlight-net-box.is-win {
    border-right: 4px solid #00e5a3;
    background: linear-gradient(135deg, rgba(0, 229, 163, 0.08), rgba(13, 21, 39, 0.95));
}

.pnl-highlight-net-box.is-loss {
    border-right: 4px solid #ef4444;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(13, 21, 39, 0.95));
}

.pnl-hl-text-side {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.pnl-hl-tag {
    font-size: 12px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 6px;
}

.pnl-hl-formula {
    font-size: 13px;
    color: #cbd5e1;
    font-weight: 600;
}

.pnl-hl-amount-side {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pnl-hl-amount {
    font-size: 17px;
    font-weight: 900;
    letter-spacing: -0.3px;
}

.pnl-hl-pct-badge {
    font-size: 12px;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 6px;
}

/* Empty State */
.pnl-empty-box {
    text-align: center;
    padding: 50px 20px;
    color: #94a3b8;
}

.pnl-empty-icon {
    font-size: 38px;
    display: block;
    margin-bottom: 12px;
}

.pnl-empty-text {
    font-size: 15px;
    font-weight: 700;
    color: #cbd5e1;
    margin-bottom: 6px;
}

.pnl-empty-hint {
    font-size: 12px;
    color: #64748b;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .pnl-summary-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .pnl-main-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .pnl-financial-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .pnl-timeline-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ========================================================
   Mobile Mode (Smartphone Screens <= 768px)
   ======================================================== */
@media (max-width: 768px) {
    .pnl-table-head {
        display: none !important;
    }

    .pnl-accordion-wrapper {
        background: transparent;
        border: none;
        box-shadow: none;
        overflow: visible;
    }

    .pnl-accordion-stack {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    /* Transform each row into a compact, ultra-sleek slim card */
    .pnl-accordion-item {
        background: rgba(13, 21, 39, 0.95);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        overflow: hidden;
        margin-bottom: 6px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
        transition: transform 0.2s ease, border-color 0.2s ease;
    }

    .pnl-accordion-item.pnl-row-win {
        border-right: 4px solid #00e5a3;
    }

    .pnl-accordion-item.pnl-row-loss {
        border-right: 4px solid #ef4444;
    }

    /* Hide desktop table cells on mobile */
    .pnl-row-main .pnl-td {
        display: none !important;
    }

    /* Mobile Card Body: Sleek Compact Slim Bar */
    .pnl-row-main {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 11px 13px !important;
        min-height: 48px;
        cursor: pointer;
        text-align: right;
    }

    /* Mobile Top Row: Seq + Symbol + Status | Net PnL + % + Chevron */
    .pnl-mobile-top {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 8px;
    }

    .pnl-m-sym-group {
        display: flex;
        align-items: center;
        gap: 7px;
        flex-wrap: nowrap;
        min-width: 0;
    }

    .pnl-m-sym-group .coin-symbol-bold {
        font-size: 14.5px;
        margin-left: 0;
        white-space: nowrap;
    }

    .pnl-m-pnl-group {
        display: flex;
        align-items: center;
        gap: 6px;
        flex-shrink: 0;
    }

    .pnl-m-pnl-val {
        font-size: 15px;
        font-weight: 900;
        letter-spacing: -0.3px;
        direction: ltr;
        white-space: nowrap;
    }

    .pnl-m-action-chevron {
        font-size: 11px;
        color: #94a3b8;
        transition: transform 0.25s ease, color 0.25s ease;
        margin-right: 3px;
        display: inline-block;
    }

    .pnl-accordion-item.expanded .pnl-m-action-chevron {
        transform: rotate(180deg);
        color: #00e5a3;
    }

    /* Merged Trade Details on Mobile */
    .pnl-trade-pairs-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px;
    }

    .pnl-pair-card {
        padding: 9px 11px;
        gap: 2px;
    }

    .pnl-metric-lbl {
        font-size: 11px;
    }

    .pnl-pair-val-row {
        padding: 1px 0 3px 0;
    }

    .pnl-pair-price {
        font-size: 14.5px;
    }

    .pnl-pair-timestamp {
        font-size: 10px;
        padding-top: 5px;
        margin-top: 2px;
    }

    .pnl-duration-standalone-box {
        padding: 10px 12px;
    }

    .pnl-dur-title {
        font-size: 11.5px;
    }

    .pnl-dur-value {
        font-size: 14px;
    }

    /* Expanded Details on Mobile */
    .pnl-row-details {
        padding: 13px 14px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    .pnl-highlight-net-box {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 12px 14px;
    }

    .pnl-hl-amount-side {
        width: 100%;
        justify-content: space-between;
        border-top: 1px dashed rgba(255, 255, 255, 0.08);
        padding-top: 8px;
    }

    /* Summary cards & tabs on mobile */
    .pnl-summary-cards {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .pnl-timeframe-nav {
        overflow-x: auto;
        white-space: nowrap;
        flex-wrap: nowrap;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
        padding: 6px;
    }

    .pnl-tf-btn {
        padding: 8px 14px;
        font-size: 13px;
        flex-shrink: 0;
    }

    .pnl-header-title-group {
        width: 100%;
    }
}

/* ==========================================================================
   GLOBAL CHART BUTTON & RESIZABLE MODAL
   ========================================================================== */

/* --- Vibrant Lively Signal Chart Button --- */
.btn-signal-chart {
    position: relative;
    background: linear-gradient(135deg, rgba(0, 229, 163, 0.15) 0%, rgba(56, 189, 248, 0.22) 50%, rgba(139, 92, 246, 0.15) 100%) !important;
    border: 1px solid rgba(56, 189, 248, 0.5) !important;
    padding: 3px 10px !important;
    border-radius: 8px !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;
    outline: none !important;
    user-select: none !important;
    line-height: 1 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.2) !important;
}

.chart-btn-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 5px rgba(0, 229, 163, 0.6));
    transition: transform 0.25s ease, filter 0.25s ease;
}

.chart-btn-text {
    font-size: 12px !important;
    font-weight: 800 !important;
    background: linear-gradient(90deg, #00e5a3, #38bdf8) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    letter-spacing: 0.3px;
}

.btn-signal-chart:hover {
    background: linear-gradient(135deg, rgba(0, 229, 163, 0.3) 0%, rgba(56, 189, 248, 0.35) 50%, rgba(139, 92, 246, 0.3) 100%) !important;
    border-color: #38bdf8 !important;
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.6), 0 0 10px rgba(0, 229, 163, 0.5) !important;
    transform: translateY(-1.5px) scale(1.05) !important;
}

.btn-signal-chart:hover .chart-btn-icon-wrapper {
    transform: scale(1.18);
    filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.9));
}

.btn-signal-chart:active {
    transform: translateY(0) scale(0.98) !important;
}

/* Modal Overlay & Resizable Card */
.chart-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10005;
    padding: 16px;
    box-sizing: border-box;
}

.chart-modal-overlay.has-fullscreen {
    padding: 0 !important;
}

.chart-modal-card {
    position: relative;
    width: 94vw !important;
    max-width: 1550px !important;
    height: 88vh !important;
    max-height: 94vh !important;
    min-width: 360px !important;
    min-height: 380px !important;
    padding: 14px 18px 16px 18px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    background: #090e1a !important;
    border: 1px solid rgba(56, 189, 248, 0.4) !important;
    box-shadow: 0 25px 65px -10px rgba(0, 0, 0, 0.95), 0 0 35px rgba(56, 189, 248, 0.15) !important;
    border-radius: 16px !important;
    resize: both !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    animation: fadeIn 0.25s ease;
}

/* Fullscreen Mode (100% of display) */
.chart-modal-card.is-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    border: none !important;
    resize: none !important;
    padding: 10px 14px !important;
    margin: 0 !important;
    z-index: 10010 !important;
}

.chart-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
    gap: 8px;
    user-select: none;
    cursor: default;
}

.chart-modal-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.chart-modal-icon {
    font-size: 20px;
}

.chart-modal-title {
    font-size: 15px;
    font-weight: 700;
    color: #e2e8f0;
}

.chart-symbol-badge {
    background: rgba(0, 229, 163, 0.15);
    border: 1px solid rgba(0, 229, 163, 0.4);
    color: #00e5a3;
    padding: 3px 10px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

/* Quick Timeframe Switcher */
.chart-tf-picker {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 4px;
    border-radius: 7px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chart-tf-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 9px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.chart-tf-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.chart-tf-btn.active {
    background: #00e5a3;
    color: #060913;
    font-weight: 800;
    box-shadow: 0 0 10px rgba(0, 229, 163, 0.45);
}

.chart-modal-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-external-btn {
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 5px 11px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.chart-external-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
}

.chart-external-btn.binance-btn:hover {
    color: #f0b90b;
    border-color: rgba(240, 185, 11, 0.5);
    background: rgba(240, 185, 11, 0.1);
}

.btn-modal-ctrl {
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #38bdf8;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.btn-modal-ctrl:hover {
    background: #38bdf8;
    color: #060913;
    transform: scale(1.08);
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.6);
}

.btn-close-modal {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.btn-close-modal:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
    transform: scale(1.08);
}

.chart-modal-body {
    flex: 1;
    width: 100%;
    height: 100%;
    min-height: 350px;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #131722;
}

.tradingview-container {
    width: 100%;
    height: 100%;
}

/* Visual Drag Resize Handle */
.chart-resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    cursor: nwse-resize;
    z-index: 100;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 3px;
    box-sizing: border-box;
}

.chart-resize-handle::after {
    content: '';
    width: 10px;
    height: 10px;
    border-right: 2.5px solid #38bdf8;
    border-bottom: 2.5px solid #38bdf8;
    border-radius: 1px;
    opacity: 0.8;
    transition: all 0.2s ease;
}

.chart-resize-handle:hover::after {
    border-color: #00e5a3;
    opacity: 1;
    box-shadow: 2px 2px 8px rgba(0, 229, 163, 0.7);
    transform: scale(1.15);
}

@media (max-width: 768px) {
    .chart-modal-card {
        width: 98vw !important;
        height: 94vh !important;
        max-height: 94vh !important;
        padding: 10px 8px !important;
        gap: 6px !important;
    }

    .chart-external-btn {
        display: none !important;
    }

    .chart-tf-btn {
        padding: 3px 6px !important;
        font-size: 11px !important;
    }
}

/* ==========================================================================
   MARKET RADAR (رادار السوق) STYLES
   ========================================================================== */

.radar-hero-card {
    background: linear-gradient(135deg, rgba(13, 21, 39, 0.95) 0%, rgba(9, 14, 26, 0.98) 100%) !important;
    border: 1px solid rgba(56, 189, 248, 0.25) !important;
    padding: 20px 24px !important;
    margin-bottom: 16px;
    border-radius: 16px;
}

.radar-hero-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 18px;
}

.radar-live-badge {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #ef4444;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    animation: pulseGlow 1.8s infinite;
}

.radar-hero-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.radar-refresh-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: #94a3b8;
    font-weight: 600;
}

/* Stats Ribbon */
.radar-stats-ribbon {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.radar-stat-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.radar-stat-box:hover {
    transform: translateY(-2px);
}

.radar-stat-box.green {
    border-color: rgba(0, 229, 163, 0.25);
    background: linear-gradient(135deg, rgba(0, 229, 163, 0.04) 0%, transparent 100%);
}

.radar-stat-box.red {
    border-color: rgba(239, 68, 68, 0.25);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.04) 0%, transparent 100%);
}

.radar-stat-box.cyan {
    border-color: rgba(56, 189, 248, 0.25);
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.04) 0%, transparent 100%);
}

.radar-stat-box.gold {
    border-color: rgba(240, 185, 11, 0.25);
    background: linear-gradient(135deg, rgba(240, 185, 11, 0.04) 0%, transparent 100%);
}

.radar-stat-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.radar-stat-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.radar-stat-label {
    font-size: 11px;
    color: #64748b;
    font-weight: 700;
}

.radar-stat-val {
    font-size: 16px;
    font-weight: 800;
    font-family: monospace;
}

/* Radar Toolbar & Mode Controls */
.radar-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

/* Radar Chart Button Pill */
.btn-radar-chart-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: #38bdf8;
    padding: 7px 15px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.22s ease;
}

.btn-radar-chart-pill:hover {
    background: rgba(56, 189, 248, 0.16);
    border-color: rgba(56, 189, 248, 0.45);
    color: #fff;
    transform: translateY(-1px);
}

.btn-radar-chart-pill.active {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.18) 0%, rgba(0, 229, 163, 0.1) 100%);
    border-color: #38bdf8;
    color: #38bdf8;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.radar-active-sym-tag {
    background: rgba(56, 189, 248, 0.2);
    color: #fff;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    font-family: monospace;
}

/* Embedded Currency Chart Card (شارت العملات) */
.radar-embedded-chart-card {
    background: #0d1527 !important;
    border-radius: 16px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-top: 3px solid #38bdf8 !important;
    padding: 0 !important;
    overflow: hidden;
    margin-bottom: 20px !important;
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.35);
    transition: all 0.3s ease;
}

.radar-chart-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
    flex-wrap: wrap;
    gap: 12px;
}

.radar-chart-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.radar-chart-icon {
    font-size: 18px;
}

.radar-chart-tf-picker {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 2px;
    gap: 2px;
}

.radar-tf-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.18s ease;
}

.radar-tf-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.radar-tf-btn.active {
    background: #1e293b;
    color: #38bdf8;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.radar-chart-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-radar-chart-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    padding: 5px 12px;
    border-radius: 7px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    transition: all 0.2s ease;
}

.btn-radar-chart-action:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff;
    transform: translateY(-1px);
}

.btn-radar-chart-action.binance {
    background: rgba(240, 185, 11, 0.08);
    border-color: rgba(240, 185, 11, 0.25);
    color: #f0b90b;
}

.btn-radar-chart-action.binance:hover {
    background: #f0b90b;
    color: #000;
}

.btn-radar-chart-toggle-body {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 7px;
    color: #94a3b8;
    cursor: pointer;
    font-size: 10px;
    transition: all 0.2s ease;
}

.btn-radar-chart-toggle-body:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.radar-chart-card-body {
    position: relative;
    width: 100%;
    height: 440px;
    background: #090e1a;
}

.radar-tv-container {
    width: 100%;
    height: 100%;
}

/* Radar Chart Size Presets in Header */
.radar-chart-size-presets {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 7px;
    padding: 2px;
    gap: 2px;
}

.radar-preset-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.18s ease;
}

.radar-preset-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.radar-preset-btn.active {
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
}

/* Radar Chart Drag Resize Handle */
.radar-chart-resize-handle {
    width: 100%;
    height: 26px;
    background: linear-gradient(180deg, #090e1a 0%, #0d1527 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: ns-resize;
    user-select: none;
    transition: background 0.2s ease, border-color 0.2s ease;
    padding: 0 16px;
}

.radar-chart-resize-handle:hover,
.radar-chart-resize-handle.is-dragging {
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.08) 0%, rgba(56, 189, 248, 0.16) 100%);
    border-top-color: #38bdf8;
}

.resize-handle-line {
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.2s ease;
}

.radar-chart-resize-handle:hover .resize-handle-line,
.radar-chart-resize-handle.is-dragging .resize-handle-line {
    background: rgba(56, 189, 248, 0.4);
}

.resize-handle-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 2px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 11px;
    color: #94a3b8;
    font-weight: 700;
    transition: all 0.2s ease;
}

.radar-chart-resize-handle:hover .resize-handle-pill,
.radar-chart-resize-handle.is-dragging .resize-handle-pill {
    background: rgba(56, 189, 248, 0.15);
    border-color: #38bdf8;
    color: #fff;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}

.resize-icon {
    font-size: 13px;
    color: #38bdf8;
}

.resize-text {
    letter-spacing: 0.2px;
}

.resize-height-badge {
    background: rgba(0, 0, 0, 0.45);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-family: monospace;
    color: #38bdf8;
    direction: ltr;
}

@media (max-width: 768px) {
    .radar-chart-card-body {
        height: 350px;
    }
    .radar-chart-card-header {
        padding: 10px 12px;
    }
    .resize-text {
        display: none;
    }
}

.radar-acc-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-acc-ctrl {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.btn-acc-ctrl:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.16);
    color: #fff;
    transform: translateY(-1px);
}

/* Radar Columns Grid Layout (Default View) */
.radar-accordion-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 20px;
    align-items: start;
}

#radarAccGainers { grid-column: 1; grid-row: 1; }
#radarAccVolCap { grid-column: 1; grid-row: 2; }
#radarAccLosers { grid-column: 2; grid-row: 1; }
#radarAccVolume { grid-column: 2; grid-row: 2; }

@media (max-width: 992px) {
    .radar-accordion-wrapper {
        grid-template-columns: 1fr;
    }
    #radarAccGainers, #radarAccVolCap, #radarAccLosers, #radarAccVolume {
        grid-column: auto;
        grid-row: auto;
    }
}

/* Fallback Rows Mode (If user switches to Rows) */
.radar-accordion-wrapper.view-rows {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.radar-acc-card {
    background: #0d1527 !important;
    border-radius: 16px !important;
    padding: 0 !important;
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
    border-top: 3px solid transparent !important;
    overflow: hidden;
    transition: all 0.25s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.radar-acc-card.gainers-theme {
    border-top-color: #00e5a3 !important;
}

.radar-acc-card.volcap-theme {
    border-top-color: #a855f7 !important;
}

.radar-acc-card.losers-theme {
    border-top-color: #ef4444 !important;
}

.radar-acc-card.volume-theme {
    border-top-color: #38bdf8 !important;
}

.radar-acc-card.expanded {
    border-color: rgba(255, 255, 255, 0.14) !important;
}

.radar-acc-card.gainers-theme.expanded {
    box-shadow: 0 6px 24px rgba(0, 229, 163, 0.09);
}

.radar-acc-card.volcap-theme.expanded {
    box-shadow: 0 6px 24px rgba(168, 85, 247, 0.12);
}

.radar-acc-card.losers-theme.expanded {
    box-shadow: 0 6px 24px rgba(239, 68, 68, 0.09);
}

.radar-acc-card.volume-theme.expanded {
    box-shadow: 0 6px 24px rgba(56, 189, 248, 0.09);
}

.radar-acc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 13px 16px;
    cursor: pointer;
    user-select: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
    transition: background 0.2s ease;
}

.radar-acc-header:hover {
    background: rgba(255, 255, 255, 0.04);
}

.radar-acc-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.radar-acc-chevron {
    font-size: 11px;
    color: #64748b;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s ease;
    display: inline-block;
    padding: 3px;
}

.radar-acc-card.expanded .radar-acc-chevron {
    transform: rotate(180deg);
    color: #38bdf8;
}

.radar-acc-icon-box {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.radar-acc-icon-box.green {
    background: rgba(0, 229, 163, 0.12);
    border: 1px solid rgba(0, 229, 163, 0.25);
}

.radar-acc-icon-box.red {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.radar-acc-icon-box.cyan {
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.25);
}

.radar-acc-icon-box.purple {
    background: rgba(168, 85, 247, 0.12);
    border: 1px solid rgba(168, 85, 247, 0.25);
    color: #c084fc;
}

.radar-acc-headings {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.radar-acc-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.radar-acc-title {
    font-size: 14.5px;
    font-weight: 800;
    color: #ffffff;
}

.radar-acc-subtext {
    font-size: 11px;
    color: #64748b;
}

.radar-acc-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.radar-acc-stat-pill {
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    font-family: monospace;
    letter-spacing: 0.2px;
}

.radar-acc-stat-pill.green {
    background: rgba(0, 229, 163, 0.12);
    color: #00e5a3;
    border: 1px solid rgba(0, 229, 163, 0.25);
}

.radar-acc-stat-pill.red {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.radar-acc-stat-pill.cyan {
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.25);
}

.radar-acc-stat-pill.purple {
    background: rgba(168, 85, 247, 0.12);
    color: #d8b4fe;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.radar-acc-count-badge {
    padding: 2px 7px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    font-size: 11px;
    color: #94a3b8;
    font-weight: 700;
}

.radar-badge-tag {
    font-size: 10.5px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 5px;
}

.radar-badge-tag.green {
    background: rgba(0, 229, 163, 0.12);
    color: #00e5a3;
    border: 1px solid rgba(0, 229, 163, 0.3);
}

.radar-badge-tag.red {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.radar-badge-tag.cyan {
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.radar-badge-tag.purple {
    background: rgba(168, 85, 247, 0.12);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

/* Accordion Body & Animation */
.radar-acc-body {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0 14px;
    border-top: 1px solid transparent;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, padding 0.3s ease;
}

.radar-acc-card.expanded .radar-acc-body {
    max-height: 3500px;
    opacity: 1;
    padding: 12px 14px 16px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    overflow: visible;
}

/* In Columns Layout: 10 items stacked vertically */
.radar-cards-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* In Rows Layout: 2 columns of items inside section */
.radar-accordion-wrapper.view-rows .radar-cards-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

@media (max-width: 900px) {
    .radar-accordion-wrapper.view-rows .radar-cards-list {
        grid-template-columns: 1fr;
    }
}

/* Coin Accordion Card inside Column */
.radar-coin-accordion {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 11px;
    overflow: hidden;
    transition: all 0.22s ease;
}

.radar-coin-accordion:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

.radar-coin-accordion.expanded {
    background: rgba(255, 255, 255, 0.035);
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.radar-coin-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 11px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
}

.radar-coin-head:hover {
    background: rgba(255, 255, 255, 0.03);
}

.radar-row-right {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.radar-rank-num {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.05);
    color: #94a3b8;
    flex-shrink: 0;
}

.radar-rank-num.rank-1 {
    background: linear-gradient(135deg, #ffd700, #b8860b);
    color: #000;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

.radar-rank-num.rank-2 {
    background: linear-gradient(135deg, #e0e0e0, #9e9e9e);
    color: #000;
}

.radar-rank-num.rank-3 {
    background: linear-gradient(135deg, #cd7f32, #8b4513);
    color: #fff;
}

.radar-coin-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.radar-coin-sym-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    line-height: 1.2;
}

.radar-coin-sym {
    font-size: 13.5px;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.radar-mcap-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 9.5px;
    font-family: monospace;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(192, 132, 252, 0.12);
    color: #c084fc;
    border: 1px solid rgba(192, 132, 252, 0.28);
    white-space: nowrap;
    direction: ltr;
    line-height: 1.2;
    transition: background 0.2s ease, transform 0.2s ease;
}

.radar-mcap-chip:hover {
    background: rgba(192, 132, 252, 0.22);
    transform: translateY(-1px);
}

.radar-mcap-chip .radar-rank-sub {
    color: #fbbf24;
    font-weight: 800;
    font-size: 9px;
    background: rgba(251, 191, 36, 0.16);
    padding: 0 3px;
    border-radius: 3px;
}

.radar-pair-sub {
    font-size: 10px;
    color: #64748b;
    margin-right: 2px;
}

.text-purple {
    color: #c084fc !important;
}

.text-gold {
    color: #fbbf24 !important;
}

.text-cyan {
    color: #38bdf8 !important;
}

.radar-coin-price {
    font-size: 11.5px;
    color: #94a3b8;
    font-family: monospace;
    direction: ltr;
    text-align: right;
}

.radar-row-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.radar-change-pill {
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    direction: ltr;
    text-align: center;
    font-family: monospace;
}

.radar-change-pill.pos {
    background: rgba(0, 229, 163, 0.12);
    color: #00e5a3;
    border: 1px solid rgba(0, 229, 163, 0.25);
}

.radar-change-pill.neg {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.radar-item-chevron {
    font-size: 10px;
    color: #64748b;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s ease;
    display: inline-block;
    padding: 2px;
}

.radar-coin-accordion.expanded .radar-item-chevron {
    transform: rotate(180deg);
    color: #38bdf8;
}

/* Accordion Drawer inside Coin Card */
.radar-coin-drawer {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0 11px;
    border-top: 1px solid transparent;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease, padding 0.25s ease;
}

.radar-coin-accordion.expanded .radar-coin-drawer {
    max-height: 580px;
    opacity: 1;
    padding: 10px 11px 12px 11px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.22);
}

.radar-coin-sr-inline {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 3px;
    direction: ltr;
}

.radar-sr-chip {
    font-size: 9.5px;
    font-family: monospace;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 4px;
    line-height: 1.1;
    white-space: nowrap;
}

.radar-sr-chip.sup {
    color: #00e5a3;
    background: rgba(0, 229, 163, 0.08);
    border: 1px solid rgba(0, 229, 163, 0.22);
}

.radar-sr-chip.res {
    color: #ff4d6d;
    background: rgba(255, 77, 109, 0.08);
    border: 1px solid rgba(255, 77, 109, 0.22);
}

.radar-volcap-pill {
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    direction: ltr;
    text-align: center;
    font-family: monospace;
    background: rgba(168, 85, 247, 0.16);
    color: #e9d5ff;
    border: 1px solid rgba(168, 85, 247, 0.35);
    box-shadow: 0 0 8px rgba(168, 85, 247, 0.2);
}

.radar-coin-price-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
    flex-wrap: wrap;
}

.radar-coin-hl-inline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    direction: ltr;
}

.radar-hl-chip {
    font-size: 9.5px;
    font-family: monospace;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    line-height: 1.1;
    white-space: nowrap;
}

.radar-hl-chip.high {
    color: #2dd4bf;
    background: rgba(45, 212, 191, 0.08);
    border: 1px solid rgba(45, 212, 191, 0.25);
}

.radar-hl-chip.low {
    color: #fb7185;
    background: rgba(251, 113, 133, 0.08);
    border: 1px solid rgba(251, 113, 133, 0.25);
}

.radar-dist-sub {
    font-size: 10px;
    color: #94a3b8;
    font-weight: 600;
    margin-right: 2px;
}

.radar-smart-signal {
    border-radius: 8px;
    padding: 7px 10px;
    font-size: 11px;
    line-height: 1.5;
    margin-bottom: 10px;
    border: 1px solid transparent;
    direction: rtl;
    text-align: right;
}

.radar-smart-signal.breakout {
    background: rgba(0, 229, 163, 0.08);
    border-color: rgba(0, 229, 163, 0.25);
    color: #a7f3d0;
}

.radar-smart-signal.near-res {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.25);
    color: #fde68a;
}

.radar-smart-signal.breakdown {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}

.radar-smart-signal.near-sup {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.35);
    color: #6ee7b7;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.1);
}

.radar-smart-signal.in-range {
    background: rgba(56, 189, 248, 0.06);
    border-color: rgba(56, 189, 248, 0.18);
    color: #bae6fd;
}

.radar-drawer-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    margin-bottom: 10px;
}

.radar-metric-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 7px;
    padding: 5px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.radar-m-lbl {
    font-size: 10px;
    color: #64748b;
    font-weight: 700;
}

.radar-m-val {
    font-size: 12px;
    font-weight: 800;
    font-family: monospace;
    direction: ltr;
    text-align: right;
}

.radar-drawer-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.btn-drawer-chart {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: #38bdf8;
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.btn-drawer-chart:hover {
    background: #38bdf8;
    color: #000;
}

.btn-drawer-binance {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: rgba(240, 185, 11, 0.08);
    border: 1px solid rgba(240, 185, 11, 0.25);
    color: #f0b90b;
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-drawer-binance:hover {
    background: #f0b90b;
    color: #000;
}

/* Tip Banner */
.radar-tip-card {
    background: rgba(240, 185, 11, 0.04) !important;
    border: 1px solid rgba(240, 185, 11, 0.18) !important;
    padding: 14px 18px !important;
}

.radar-tip-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.radar-tip-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.radar-tip-desc {
    font-size: 12.5px;
    color: #cbd5e1;
    line-height: 1.6;
}

/* Responsive Radar */
@media (max-width: 1024px) {
    .radar-stats-ribbon {
        grid-template-columns: repeat(2, 1fr);
    }
    .radar-accordion-wrapper.view-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .radar-stats-ribbon {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .radar-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .radar-mode-switcher {
        width: 100%;
        display: flex;
    }
    .radar-mode-btn {
        flex: 1;
        justify-content: center;
    }
    .radar-acc-actions {
        width: 100%;
        justify-content: flex-end;
    }
    .radar-hero-card {
        padding: 14px !important;
    }
    .radar-acc-header {
        padding: 12px 14px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .radar-acc-header-left {
        width: 100%;
        justify-content: space-between;
    }
    .radar-row-item {
        padding: 8px 6px;
    }
}

/* Multi-Exchange Selector & Source Badges (النظام الهجين) */
.chart-exchange-source-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.chart-exchange-source-badge.binance {
    background: rgba(240, 185, 11, 0.15);
    color: #f0b90b;
    border: 1px solid rgba(240, 185, 11, 0.35);
}
.chart-exchange-source-badge.kucoin {
    background: rgba(36, 174, 143, 0.18);
    color: #24ae8f;
    border: 1px solid rgba(36, 174, 143, 0.38);
}
.chart-exchange-source-badge.okx {
    background: rgba(56, 189, 248, 0.18);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.38);
}
.chart-exchange-source-badge.bybit {
    background: rgba(251, 146, 60, 0.18);
    color: #fb923c;
    border: 1px solid rgba(251, 146, 60, 0.38);
}

.radar-exchange-selector, .modal-exchange-selector {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: rgba(255, 255, 255, 0.04);
    padding: 2px 4px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.radar-ex-btn, .modal-ex-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.radar-ex-btn:hover, .modal-ex-btn:hover {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.08);
}
.radar-ex-btn.active, .modal-ex-btn.active {
    background: #00e5a3;
    color: #060913;
    font-weight: 800;
    box-shadow: 0 0 10px rgba(0, 229, 163, 0.3);
}

/* ==========================================================================
   ENTERPRISE RBAC & USER ACCORDION STYLES
   ========================================================================== */

.users-accordion-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 10px;
}

.user-accordion-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.user-accordion-card:hover {
    border-color: rgba(0, 229, 163, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

.user-accordion-card.expanded {
    border-color: var(--teal-primary);
    box-shadow: 0 6px 24px rgba(0, 229, 163, 0.12);
}

.user-accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    user-select: none;
    background: rgba(255, 255, 255, 0.015);
    transition: background 0.2s ease;
    gap: 15px;
}

.user-accordion-header:hover {
    background: rgba(255, 255, 255, 0.035);
}

.user-head-main {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.user-avatar-badge {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: var(--bg-card-sub);
    border: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.user-info-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.user-name-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.user-title {
    font-size: 16px;
    font-weight: 800;
    color: #fff;
}

.user-title.admin-title,
.user-title.is-admin {
    color: #ef4444 !important;
    text-shadow: 0 0 12px rgba(239, 68, 68, 0.45);
}

.role-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.role-badge.role-1, .role-badge.super-admin {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.3));
    color: #fbbf24;
    border: 1px solid #f59e0b;
}

.role-badge.role-2, .role-badge.trader {
    background: linear-gradient(135deg, rgba(0, 229, 163, 0.15), rgba(16, 185, 129, 0.25));
    color: #00e5a3;
    border: 1px solid #00e5a3;
}

.role-badge.role-3, .role-badge.analyst {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.25));
    color: #60a5fa;
    border: 1px solid #3b82f6;
}

.role-badge.role-4, .role-badge.viewer {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(147, 51, 234, 0.25));
    color: #c084fc;
    border: 1px solid #a855f7;
}

.role-badge.custom-role {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(6, 182, 212, 0.25));
    color: #38bdf8;
    border: 1px solid #0ea5e9;
}

.user-meta-row {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 12px;
    color: var(--text-dim);
    flex-wrap: wrap;
}

.user-pass-inline {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, 0.04);
    padding: 2px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-subtle);
    vertical-align: middle;
}

.pass-value-text {
    font-family: monospace;
    letter-spacing: 1.5px;
    font-size: 13px;
    color: var(--text-muted);
}

.btn-inline-eye {
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;
    color: #93c5fd;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px;
    border-radius: 5px;
    position: static !important;
    transform: none !important;
    transition: all 0.2s ease;
    line-height: 1;
}

.btn-inline-eye:hover {
    color: var(--teal-primary);
    background: rgba(0, 229, 163, 0.15);
    transform: scale(1.1) !important;
}

.btn-inline-eye .icon-eye {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    display: block;
}

.user-head-stats {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.pill-override {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.pill-override.granted {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.35);
}

.pill-override.revoked {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.35);
}

.pill-override.default {
    background: rgba(255, 255, 255, 0.05);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.accordion-arrow {
    font-size: 14px;
    color: var(--text-dim);
    transition: transform 0.25s ease;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
}

.user-accordion-card.expanded .accordion-arrow {
    transform: rotate(180deg);
    color: var(--teal-primary);
    background: var(--teal-glow);
}

/* Accordion Drawer */
.user-accordion-drawer {
    border-top: 1px solid var(--border-color);
    background: #090e1c;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: fadeInDrawer 0.2s ease-out;
}

@keyframes fadeInDrawer {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.drawer-toolbar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    background: var(--bg-card);
    padding: 16px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
}

.drawer-toolbar-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.drawer-toolbar-item label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dim);
}

.drawer-toolbar-item select,
.drawer-toolbar-item input[type="number"],
.drawer-toolbar-item input[type="text"] {
    padding: 8px 12px;
    background: var(--bg-card-sub);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: #fff;
    font-family: inherit;
    font-size: 13px;
}

.drawer-toolbar-item select:focus,
.drawer-toolbar-item input:focus {
    border-color: var(--teal-primary);
    outline: none;
}

/* Super Admin Banner */
.super-admin-banner {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.05));
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
    padding: 14px 18px;
    color: #fbbf24;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 13px;
}

/* Permissions Tree Container */
.perm-tree-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.perm-category-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.perm-category-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.perm-category-card.expanded {
    border-color: rgba(0, 229, 163, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.perm-cat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid transparent;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.perm-category-card.expanded .perm-cat-header {
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.04);
}

.perm-cat-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.perm-cat-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.perm-cat-arrow:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.perm-category-card.expanded .perm-cat-arrow {
    color: var(--teal-primary);
    background: rgba(0, 229, 163, 0.1);
}

.perm-cat-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 14px;
    color: #fff;
}

.perm-cat-counter {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 12px;
    background: var(--bg-card-sub);
    color: var(--text-dim);
    border: 1px solid var(--border-subtle);
    font-weight: 700;
    letter-spacing: 0.3px;
    transition: all 0.2s ease;
}

.perm-cat-counter.is-locked {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

.perm-cat-counter.is-active {
    background: rgba(0, 229, 163, 0.1);
    color: var(--teal-primary);
    border-color: rgba(0, 229, 163, 0.25);
}

.perm-cat-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.perm-cat-master-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.perm-cat-master-label:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 229, 163, 0.4);
}

.perm-cat-master-label.is-active {
    background: rgba(0, 229, 163, 0.08);
    border-color: rgba(0, 229, 163, 0.3);
}

.perm-cat-master-label.is-inactive {
    background: rgba(239, 68, 68, 0.06);
    border-color: rgba(239, 68, 68, 0.25);
}

.perm-cat-master-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--teal-primary);
    cursor: pointer;
    margin: 0;
    flex-shrink: 0;
}

.perm-cat-master-text {
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.perm-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
    padding: 14px;
}

.perm-item-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-card-sub);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    transition: all 0.15s ease;
    position: relative;
    cursor: pointer;
}

.perm-item-card:hover {
    border-color: rgba(0, 229, 163, 0.4);
    background: rgba(255, 255, 255, 0.03);
}

.perm-item-card input[type="checkbox"] {
    width: 17px;
    height: 17px;
    margin-top: 3px;
    accent-color: var(--teal-primary);
    cursor: pointer;
    flex-shrink: 0;
}

.perm-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.perm-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.perm-item-badges {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 2px;
    margin-bottom: 2px;
}

.perm-widget-seq-num {
    display: none;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 4px;
    background: rgba(249, 115, 22, 0.12);
    border: 1px solid rgba(249, 115, 22, 0.4);
    color: #f97316 !important;
    font-size: 11px;
    font-weight: 800;
    font-family: monospace, -apple-system, sans-serif;
    line-height: 1;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    flex-shrink: 0;
}

/* Display sequence badges in permissions matrix and edit mode */
.perm-item-header .perm-widget-seq-num,
.perm-item-card .perm-widget-seq-num,
.perm-tree-wrapper .perm-widget-seq-num,
.role-tree-section-header .perm-widget-seq-num {
    display: inline-flex !important;
}

.dashboard-edit-active .custom-item-ctrls .perm-widget-seq-num,
.dashboard-edit-mode .custom-item-ctrls .perm-widget-seq-num {
    display: inline-flex !important;
}

.tab-pane > .perm-widget-seq-num,
.dynamic-widgets-slot > .perm-widget-seq-num,
.dash-card > .perm-widget-seq-num {
    display: none !important;
}

.perm-widget-seq-num:hover {
    background: rgba(249, 115, 22, 0.25);
    border-color: #f97316;
    color: #ffedd5 !important;
    box-shadow: 0 0 8px rgba(249, 115, 22, 0.4);
    transform: scale(1.08);
}

.custom-item-ctrls .perm-widget-seq-num {
    height: 22px;
    min-width: 22px;
    padding: 0 6px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
}

.perm-item-name {
    font-size: 13px;
    font-weight: 700;
    color: #f1f5f9;
}

.perm-item-code {
    font-size: 10px;
    font-family: monospace;
    color: #64748b;
    direction: ltr;
}

/* Red Trash Icon for Removing Element from Section Workspace (Exact Bottom-Left Corner) */
.btn-remove-widget-from-sec {
    position: absolute;
    bottom: 8px;
    left: 8px;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.45);
    color: #ef4444;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 5;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
}

.btn-remove-widget-from-sec svg {
    display: block;
    stroke: #ef4444;
    transition: stroke 0.2s ease, transform 0.2s ease;
}

.btn-remove-widget-from-sec:hover {
    background: #ef4444;
    border-color: #ef4444;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.55);
    transform: scale(1.14);
}

.btn-remove-widget-from-sec:hover svg {
    stroke: #ffffff;
}

.btn-remove-widget-from-sec:active {
    transform: scale(0.92);
}

.perm-item-desc {
    font-size: 11px;
    color: var(--text-dim);
    line-height: 1.4;
    padding-left: 24px; /* Ensure description leaves room for red trash icon in bottom-left */
}

/* Exception Highlights */
.perm-item-card.is-granted {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.08);
}

.perm-item-card.is-granted .perm-item-name {
    color: #34d399;
}

.perm-item-card.is-revoked {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}

.perm-item-card.is-revoked .perm-item-name {
    color: #f87171;
    text-decoration: line-through;
}

.perm-status-tag {
    font-size: 9px;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 6px;
    flex-shrink: 0;
}

.perm-status-tag.granted {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.perm-status-tag.revoked {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

/* Dynamic Drag & Drop Library Styles */
.perm-item-card[draggable="true"] {
    cursor: grab;
    user-select: none;
}

.perm-item-card[draggable="true"]:active {
    cursor: grabbing;
}

.perm-item-card.is-dragging {
    opacity: 0.35 !important;
    transform: scale(0.96);
    border: 1px dashed var(--teal-primary) !important;
    background: rgba(0, 229, 163, 0.05) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.perm-drag-handle {
    cursor: grab;
    color: #64748b;
    font-size: 14px;
    line-height: 1;
    padding: 2px 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.perm-drag-handle:hover {
    color: var(--teal-primary);
    background: rgba(0, 229, 163, 0.1);
}

.perm-items-grid.drag-over-active {
    outline: 2px dashed var(--teal-primary) !important;
    outline-offset: -3px;
    background: rgba(0, 229, 163, 0.04) !important;
    border-radius: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}


/* Drawer Footer */
.drawer-footer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 14px;
    border-top: 1px solid var(--border-subtle);
    flex-wrap: wrap;
    gap: 12px;
}

@media (max-width: 768px) {
    .user-accordion-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .user-head-stats {
        width: 100%;
        justify-content: space-between;
    }
    .perm-items-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   ROLE MODAL ACCORDION PERMISSIONS TREE
   ========================================================================== */
.role-perm-cat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.role-perm-cat-card:hover {
    border-color: rgba(0, 229, 163, 0.3);
}

.role-perm-cat-card.expanded {
    border-color: var(--teal-primary);
    box-shadow: 0 4px 18px rgba(0, 229, 163, 0.1);
}

.role-cat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.025);
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
    border-right: 4px solid var(--teal-primary);
    gap: 12px;
}

.role-cat-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.role-cat-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 14px;
    color: #fff;
    flex: 1;
    min-width: 0;
}

.role-cat-icon {
    font-size: 18px;
    line-height: 1;
}

.role-cat-name {
    color: #fff;
}

.role-cat-badge {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-dim);
    background: var(--bg-card-sub);
    padding: 2px 10px;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    white-space: nowrap;
}

.role-cat-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-cat-toggle {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    color: var(--text-dim);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
}

.btn-cat-toggle:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
}

.role-cat-arrow {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--text-dim);
    transition: transform 0.25s ease;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
}

.role-perm-cat-card.expanded .role-cat-arrow {
    transform: rotate(180deg);
    color: var(--teal-primary);
    background: var(--teal-glow);
}

.role-cat-body {
    padding: 14px;
    background: #090e1c;
    border-top: 1px solid var(--border-subtle);
    animation: fadeInDrawer 0.2s ease-out;
}

/* ==========================================================================
   Multi-Exchange Wallet Connection System & Drawer Subtabs
   ========================================================================== */

/* Wallet Badge in User Accordion Header */
.pill-wallet {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.pill-wallet.active {
    background: rgba(0, 229, 163, 0.12);
    color: var(--teal-primary);
    border: 1px solid rgba(0, 229, 163, 0.3);
}

.pill-wallet.inactive {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.pill-wallet.none {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-dim);
    border: 1px solid var(--border-subtle);
}

/* Drawer Sub-tabs Navigation */
.drawer-subtabs-nav {
    display: flex;
    gap: 10px;
    background: rgba(13, 19, 36, 0.95);
    padding: 6px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    margin-bottom: 16px;
    width: 100%;
}

.drawer-subtab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: right;
}

.drawer-subtab-btn:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
}

.drawer-subtab-btn.active {
    background: rgba(0, 229, 163, 0.1);
    border-color: rgba(0, 229, 163, 0.35);
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 229, 163, 0.1);
}

.drawer-subtab-btn .subtab-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.drawer-subtab-btn .subtab-text {
    display: flex;
    flex-direction: column;
}

.drawer-subtab-btn .subtab-title {
    font-size: 13px;
    font-weight: 700;
}

.drawer-subtab-btn .subtab-hint {
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 2px;
}

.drawer-subtab-btn.active .subtab-hint {
    color: var(--teal-primary);
}

/* Multi-Exchange Wallet Container */
.wallet-section-container {
    display: flex;
    flex-direction: column;
    gap: 18px;
    background: rgba(10, 15, 29, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 18px;
    animation: fadeInDrawer 0.25s ease-out;
}

.wallet-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 14px;
}

.wallet-section-title {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px 0;
}

.wallet-section-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

.wallet-verified-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 229, 163, 0.08);
    border: 1px solid rgba(0, 229, 163, 0.25);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
}

.wallet-balance-chip {
    font-weight: 700;
    color: var(--teal-primary);
    background: rgba(0, 229, 163, 0.15);
    padding: 2px 8px;
    border-radius: 5px;
}

/* Exchange Selector Grid */
.exchange-pills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.ex-pill-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row;
    gap: 12px;
    background: #0a0f1d;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    direction: rtl;
}

.ex-pill-card:hover {
    background: rgba(26, 36, 62, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.ex-pill-card.selected {
    background: rgba(26, 40, 75, 0.95);
    border-color: var(--teal-primary);
    box-shadow: 0 0 16px rgba(0, 229, 163, 0.15);
}

.ex-pill-card.selected.binance {
    border: 2px solid #eab308;
    background: #0c1427;
    box-shadow: 0 0 16px rgba(234, 179, 8, 0.25);
}

.ex-pill-card.selected.bybit {
    border: 2px solid #f7a600;
    box-shadow: 0 0 16px rgba(247, 166, 0, 0.2);
}

.ex-pill-card.selected.okx {
    border: 2px solid #38bdf8;
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.2);
}

.ex-pill-card.selected.kucoin {
    border: 2px solid #10b981;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.2);
}

.ex-pill-icon {
    font-size: 22px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ex-pill-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
}

.ex-pill-name {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}

.ex-pill-badge {
    font-size: 11px;
    color: #64748b;
    margin-top: 3px;
}

.ex-pill-badge.req-pass {
    color: #f59e0b;
    font-weight: 600;
}

/* Form Inputs Grid */
.wallet-form-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: rgba(14, 20, 37, 0.85);
    padding: 16px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
}

.wallet-field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wallet-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.wallet-input {
    width: 100%;
    background: #090e1c;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 9px 12px;
    color: #fff;
    font-size: 13px;
    font-family: inherit;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.wallet-input:focus {
    outline: none;
    border-color: var(--teal-primary);
    box-shadow: 0 0 10px rgba(0, 229, 163, 0.2);
}

.wallet-input.sm {
    width: 160px;
    padding: 6px 10px;
    font-size: 12px;
}

/* Password & Eye toggle wrapper */
.wallet-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.wallet-input.with-eye {
    padding-left: 42px; /* Eye button is on left in RTL */
    font-family: monospace;
    letter-spacing: 1px;
}

.btn-wallet-eye {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;
    color: #93c5fd;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s ease;
    z-index: 2;
}

.btn-wallet-eye:hover {
    color: var(--teal-primary);
    background: rgba(255, 255, 255, 0.08);
}

/* Settings Row in Wallet */
.wallet-settings-row {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.wallet-switch-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 12px;
    color: #fff;
    user-select: none;
}

.wallet-budget-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: auto;
}

/* Test Feedback Container */
.wallet-test-result {
    border-radius: 10px;
    padding: 14px 16px;
    animation: fadeInDrawer 0.2s ease-out;
}

.wallet-test-result.testing {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #93c5fd;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}

.test-loading-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(147, 197, 253, 0.3);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}

.wallet-test-result.success {
    background: rgba(0, 229, 163, 0.07);
    border: 1px solid rgba(0, 229, 163, 0.3);
    color: #fff;
}

.wallet-test-result.error {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fff;
}

.test-res-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 700;
}

.test-res-header .test-res-ping {
    font-size: 11px;
    color: var(--teal-primary);
    background: rgba(0, 229, 163, 0.12);
    padding: 2px 8px;
    border-radius: 5px;
}

.wallet-test-result.error .test-res-ping {
    color: #f87171;
    background: rgba(239, 68, 68, 0.12);
}

.test-res-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.test-detail-card {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: rgba(0, 0, 0, 0.25);
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.test-detail-card .detail-label {
    font-size: 10px;
    color: var(--text-dim);
}

.test-detail-card .detail-value {
    font-size: 13px;
    font-weight: 700;
}

.test-res-msg {
    font-size: 12px;
    color: #fca5a5;
    line-height: 1.5;
}

/* Actions Bar */
.wallet-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 4px;
}

.btn-wallet-test {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(59, 130, 246, 0.12);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.35);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-wallet-test:hover:not(:disabled) {
    background: rgba(59, 130, 246, 0.22);
    border-color: #60a5fa;
    color: #fff;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.2);
}

.btn-wallet-test:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .drawer-subtabs-nav {
        flex-direction: column;
    }
    .exchange-pills-grid {
        grid-template-columns: 1fr;
    }
    .wallet-settings-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .wallet-budget-wrap {
        margin-right: 0;
        width: 100%;
        justify-content: space-between;
    }
    .wallet-actions-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .wallet-actions-bar > div {
        flex-direction: column;
    }
}

/* Badges for Multi-Exchange Trades */
.badge-exchange-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
}

.badge-exchange-tag.binance {
    background: rgba(240, 185, 11, 0.12);
    border-color: rgba(240, 185, 11, 0.35);
    color: #fde047;
}

.badge-exchange-tag.bybit {
    background: rgba(247, 166, 0, 0.12);
    border-color: rgba(247, 166, 0, 0.35);
    color: #f59e0b;
}

.badge-exchange-tag.okx {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.35);
    color: #38bdf8;
}

.badge-exchange-tag.kucoin {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.35);
    color: #34d399;
}

.badge-user-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(168, 85, 247, 0.12);
    border: 1px solid rgba(168, 85, 247, 0.35);
    color: #c084fc;
}

/* ==========================================================================
   Phase 3: Live Dynamic Widgets & Custom Sections Styles
   ========================================================================== */
.dynamic-widgets-slot {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
    width: 100%;
}

.dynamic-widgets-slot:empty {
    display: none;
}

.dynamic-widget-card {
    background: linear-gradient(135deg, rgba(26, 32, 44, 0.98), rgba(18, 22, 31, 0.98));
    border: 1px solid rgba(240, 185, 11, 0.3);
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    animation: widgetFadeIn 0.4s ease-out;
}

@keyframes widgetFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dynamic-widget-card:hover {
    border-color: rgba(240, 185, 11, 0.6);
    box-shadow: 0 12px 35px rgba(240, 185, 11, 0.12);
}

.dynamic-widget-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #f0b90b, #10b981, #3b82f6);
}

.widget-location-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    background: rgba(240, 185, 11, 0.12);
    border: 1px solid rgba(240, 185, 11, 0.35);
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700;
    color: #f0b90b;
}

.widget-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #34d399;
}

.fng-widget-body {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 24px;
    align-items: center;
    padding: 15px 0 5px 0;
}

@media (max-width: 768px) {
    .fng-widget-body {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

.fng-widget-score-box {
    text-align: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
}

.fng-score-num {
    font-size: 48px;
    font-weight: 900;
    line-height: 1;
    font-family: 'Space Grotesk', -apple-system, sans-serif;
    color: #f0b90b;
    transition: color 0.4s ease;
}

.fng-score-label {
    margin-top: 8px;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-white);
}

.fng-meter-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fng-meter-track {
    height: 14px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.fng-meter-fill {
    height: 100%;
    width: 50%;
    background: linear-gradient(90deg, #ef4444 0%, #f59e0b 50%, #10b981 100%);
    border-radius: 10px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.fng-meter-fill::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: #ffffff;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.9);
}

.fng-meter-ticks {
    display: flex;
    justify-content: space-between;
    font-size: 11.5px;
    color: #848e9c;
    font-weight: 600;
}

.tick-extreme-fear { color: #f87171; }
.tick-neutral { color: #fbbf24; }
.tick-extreme-greed { color: #34d399; }

.btn-refresh-icon {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-white);
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.25s ease;
}

.btn-refresh-icon:hover {
    background: rgba(240, 185, 11, 0.2);
    border-color: #f0b90b;
    transform: rotate(180deg);
}

/* Custom Tab Header */
.custom-section-hero {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 16px;
    padding: 22px;
    margin-bottom: 20px;
}

/* ==========================================================================
   Phase 4: Personal Dashboard Customizer & Smart Responsive Grid
   ========================================================================== */
.dashboard-customizer-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 18px;
    background: linear-gradient(135deg, rgba(30, 35, 45, 0.8), rgba(20, 24, 33, 0.9));
    border: 1px solid rgba(240, 185, 11, 0.25);
    border-radius: 14px;
    margin-bottom: 18px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
}

.customizer-status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.btn-dashboard-customize {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    background: rgba(240, 185, 11, 0.12);
    border: 1px solid rgba(240, 185, 11, 0.35);
    border-radius: 8px;
    color: #f0b90b;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-dashboard-customize:hover {
    background: rgba(240, 185, 11, 0.22);
    border-color: #f0b90b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(240, 185, 11, 0.2);
}

.btn-customizer-save {
    background: #10b981;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-customizer-save:hover {
    background: #059669;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.btn-customizer-reset {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-white);
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-customizer-reset:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: #ef4444;
    color: #ef4444;
}

.btn-customizer-cancel {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-muted);
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-customizer-cancel:hover {
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.06);
}

/* Edit Mode Styling */
.dashboard-edit-mode .custom-section-item {
    border: 2px dashed rgba(240, 185, 11, 0.55) !important;
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 20px;
    background: rgba(240, 185, 11, 0.025);
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-item-ctrls {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background: rgba(26, 32, 44, 0.95);
    border: 1px solid rgba(240, 185, 11, 0.4);
    border-radius: 10px;
    margin-bottom: 12px;
    font-size: 12.5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    width: 100% !important;
    flex-basis: 100% !important;
    grid-column: 1 / -1 !important;
    box-sizing: border-box !important;
}

.dashboard-edit-active .custom-item-ctrls,
.dashboard-edit-mode .custom-item-ctrls {
    display: flex !important;
}

.custom-item-ctrls .ctrl-title {
    font-weight: 700;
    color: #f0b90b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.custom-item-ctrls .ctrl-btns {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-order-arrow {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: 6px;
    padding: 3px 8px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s;
}

.btn-order-arrow:hover {
    background: rgba(240, 185, 11, 0.3);
    border-color: #f0b90b;
}

.btn-toggle-eye {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: 6px;
    padding: 3px 10px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-toggle-eye.hidden-state {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #ef4444;
}

/* User Hidden Element state */
.user-hidden-element {
    display: none !important;
}

.dashboard-edit-mode .user-hidden-element {
    display: block !important;
    opacity: 0.35;
    filter: grayscale(1);
}

/* ==============================================================================
   Universal Responsive Dynamic Slots & Widgets Grid Fix (Root Solution)
   ============================================================================== */
.dynamic-widgets-slot {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
    margin-bottom: 24px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    align-items: stretch !important;
}

.dynamic-widgets-slot:empty {
    display: none !important;
}

.dynamic-widgets-slot > * {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: 1 1 100% !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.dynamic-widgets-slot > .dynamic-widget-card,
.dynamic-widgets-slot > .dash-card,
.dynamic-widgets-slot > .custom-section-item,
.dynamic-widgets-slot > .real-trading-card,
.dynamic-widgets-slot > .pnl-timeframe-nav,
.dynamic-widgets-slot > .pnl-accordion-wrapper,
.dynamic-widgets-slot > .trades-cards-stack,
.dynamic-widgets-slot > .trades-subtabs-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: 1 1 100% !important;
    box-sizing: border-box !important;
}

/* Guard against multi-col grid breaking widgets into strips */
.dynamic-widgets-slot.multi-col {
    display: flex !important;
    flex-direction: column !important;
}
.dynamic-widgets-slot.multi-col > * {
    width: 100% !important;
    max-width: 100% !important;
}

/* Ensure child elements inside teleported widgets scale beautifully */
.pnl-timeframe-nav {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
}

.pnl-accordion-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: auto !important;
}

.real-trading-card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.trades-cards-stack {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* ==============================================================================
   Two-Way Synced Sidebar Navigation Customizer (Option 1 + Option 2)
   ============================================================================== */

.sidebar-customizer-toolbar {
    margin: 4px 0 10px 0;
    padding: 6px 8px;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(0, 229, 163, 0.2);
    border-radius: 9px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.sidebar-customizer-toolbar.editing {
    background: rgba(0, 229, 163, 0.08);
    border-color: var(--teal-primary);
    box-shadow: 0 0 14px rgba(0, 229, 163, 0.18);
}

.btn-sidebar-edit-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 7px 12px;
    border-radius: 8px;
    background: rgba(0, 229, 163, 0.12);
    border: 1px dashed rgba(0, 229, 163, 0.4);
    color: var(--teal-primary);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-sidebar-edit-toggle:hover {
    background: var(--teal-primary);
    color: #060913;
    border-style: solid;
}

.sidebar-edit-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    animation: fadeIn 0.2s ease;
}

.btn-sidebar-act {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-sidebar-act.save {
    background: var(--teal-primary);
    color: #060913;
    border-color: var(--teal-primary);
}

.btn-sidebar-act.save:hover {
    box-shadow: 0 0 10px rgba(0, 229, 163, 0.4);
}

.btn-sidebar-act.global {
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.4);
}

.btn-sidebar-act.global:hover {
    background: #38bdf8;
    color: #060913;
}

.btn-sidebar-act.reset {
    flex: 0 0 28px;
    background: rgba(148, 163, 184, 0.15);
    color: #cbd5e1;
    border-color: rgba(148, 163, 184, 0.3);
}

.btn-sidebar-act.reset:hover {
    background: rgba(148, 163, 184, 0.3);
}

.btn-sidebar-act.cancel {
    flex: 0 0 28px;
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

.btn-sidebar-act.cancel:hover {
    background: #ef4444;
    color: #fff;
}

/* Sidebar expansion during edit mode */
.sidebar.is-editing {
    width: 290px;
    transition: width 0.25s ease;
}

/* Nav items when sidebar is in editing mode */
.sidebar-nav.is-editing {
    gap: 10px;
}

.sidebar-nav.is-editing .nav-item {
    cursor: default;
    border: 1px dashed rgba(148, 163, 184, 0.28);
    padding: 10px 12px;
    position: relative;
    user-select: none;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    background: rgba(15, 23, 42, 0.55);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.sidebar-nav.is-editing .nav-item:hover {
    border-color: var(--teal-primary);
    background: rgba(0, 229, 163, 0.06);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.sidebar-nav.is-editing .nav-item.item-hidden {
    opacity: 0.5;
    filter: grayscale(0.85);
    border-style: dotted;
    border-color: rgba(239, 68, 68, 0.35);
    background: rgba(15, 23, 42, 0.35);
}

.snav-item-top {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.snav-item-top .nav-text {
    flex: 1;
    text-align: right;
    font-size: 13.5px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-white);
}

.snav-edit-ctrls {
    display: none;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    padding-top: 6px;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
    width: 100%;
}

.sidebar-nav.is-editing .snav-edit-ctrls {
    display: flex;
}

.btn-snav-ctrl {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px 8px;
    height: 25px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.btn-snav-ctrl:hover {
    background: rgba(0, 229, 163, 0.2);
    color: var(--teal-primary);
    border-color: var(--teal-primary);
}

.btn-snav-ctrl.is-off {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

.btn-snav-ctrl.danger:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #ef4444;
    border-color: #ef4444;
}

.snav-drag-handle {
    cursor: grab;
    color: #64748b;
    font-size: 13px;
    padding: 0 4px;
    user-select: none;
}

.snav-drag-handle:hover {
    color: var(--teal-primary);
}

/* Sidebar Matrix Manager Modal (Option 2) */
.sidebar-matrix-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 480px;
    overflow-y: auto;
    padding: 10px;
    background: var(--bg-card-sub);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
}

.sidebar-matrix-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.sidebar-matrix-item:hover {
    border-color: rgba(0, 229, 163, 0.35);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.sidebar-matrix-item.is-hidden {
    opacity: 0.5;
    background: rgba(15, 23, 42, 0.4);
    border-style: dashed;
}

.matrix-item-idx {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    min-width: 22px;
    text-align: center;
}

.matrix-item-icon-input {
    width: 36px;
    height: 36px;
    text-align: center;
    font-size: 16px;
    border-radius: 6px;
    background: var(--bg-card-sub);
    border: 1px solid var(--border-subtle);
    color: #fff;
    cursor: pointer;
}

.matrix-item-title-input {
    flex: 1;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 6px;
    background: var(--bg-card-sub);
    border: 1px solid var(--border-subtle);
    color: #fff;
    font-family: inherit;
}

.matrix-item-title-input:focus {
    border-color: var(--teal-primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 229, 163, 0.2);
}

.matrix-item-id-badge {
    font-size: 11px;
    font-family: monospace;
    color: #64748b;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 8px;
    border-radius: 4px;
}

.matrix-item-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-matrix-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-matrix-action:hover {
    background: rgba(0, 229, 163, 0.2);
    color: var(--teal-primary);
    border-color: var(--teal-primary);
}

.btn-matrix-action.danger:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border-color: #ef4444;
}

/* ==========================================================================
   Central Widgets Library & Catalog Styles (Hybrid System)
   ========================================================================== */
.library-header-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(10, 15, 30, 0.95));
    border: 1px solid rgba(0, 229, 163, 0.25);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.library-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.library-title-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.library-icon {
    font-size: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: rgba(0, 229, 163, 0.1);
    border: 1px solid rgba(0, 229, 163, 0.3);
    border-radius: 12px;
}

.library-title {
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 4px 0;
}

.library-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.library-filters-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.library-filter-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.library-filter-pills .filter-pill {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s ease;
}

.library-filter-pills .filter-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.library-filter-pills .filter-pill.active {
    background: rgba(0, 229, 163, 0.2);
    border-color: var(--teal-primary);
    color: var(--teal-primary);
    box-shadow: 0 0 10px rgba(0, 229, 163, 0.2);
}

.library-search-box input {
    width: 250px;
    padding: 8px 14px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 13px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.library-search-box input:focus {
    border-color: var(--teal-primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 229, 163, 0.2);
}

/* Catalog Accordion Grid */
.widgets-catalog-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.catalog-widget-card.catalog-accordion {
    background: #090e1a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0;
    transition: all 0.25s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.catalog-widget-card.catalog-accordion:hover {
    border-color: rgba(0, 229, 163, 0.4);
    box-shadow: 0 4px 20px rgba(0, 229, 163, 0.08);
}

.catalog-widget-card.catalog-accordion.accordion-open {
    border-color: rgba(245, 158, 11, 0.6);
    box-shadow: 0 6px 24px rgba(245, 158, 11, 0.12);
}

.catalog-widget-card.catalog-accordion.hidden-state {
    opacity: 0.65;
    border-style: dashed;
    border-color: rgba(148, 163, 184, 0.35);
}

/* Accordion Header */
.catalog-accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #0f172a;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease, border-color 0.2s ease;
    flex-wrap: wrap;
    gap: 12px;
    border-bottom: 1px solid transparent;
}

.catalog-accordion-header:hover {
    background: #131d35;
    border-color: rgba(0, 229, 163, 0.25);
}

.catalog-widget-card.catalog-accordion.accordion-open .catalog-accordion-header {
    background: #131d35;
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.catalog-accordion-main-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    flex: 1;
    min-width: 280px;
}

.btn-catalog-chevron {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-catalog-chevron:hover {
    background: rgba(0, 229, 163, 0.2);
    border-color: var(--teal-primary);
}

.catalog-widget-seq-badge {
    min-width: 34px;
    height: 28px;
    padding: 0 8px;
    border-radius: 6px;
    background: rgba(0, 229, 163, 0.12);
    border: 1px solid rgba(0, 229, 163, 0.35);
    color: var(--teal-primary);
    font-family: monospace, -apple-system, sans-serif;
    font-size: 13px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 10px rgba(0, 229, 163, 0.1);
}

.chevron-icon {
    display: inline-block;
    color: #94a3b8;
    font-size: 11px;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.catalog-widget-card.catalog-accordion.accordion-open .chevron-icon {
    transform: rotate(180deg);
    color: var(--teal-primary);
}

.catalog-widget-title-area {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.catalog-widget-title {
    font-size: 14.5px;
    font-weight: 800;
    color: #f8fafc;
}

.catalog-widget-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    text-transform: uppercase;
}

.catalog-widget-badge.core {
    background: rgba(0, 229, 163, 0.15);
    color: var(--teal-primary);
    border: 1px solid rgba(0, 229, 163, 0.3);
}

.catalog-widget-badge.custom_code {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.catalog-widget-badge.template {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.catalog-current-placement-badge {
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 6px;
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Accordion Controls */
.catalog-accordion-ctrls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.catalog-widget-placement-box {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.widget-placement-label {
    font-size: 12px;
    font-weight: 700;
    color: #94a3b8;
}

.widget-section-select, .widget-subtab-select {
    padding: 6px 12px;
    border-radius: 6px;
    background: #070b14;
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #38bdf8;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.widget-section-select:focus, .widget-subtab-select:focus {
    border-color: var(--teal-primary);
    outline: none;
    color: var(--teal-primary);
    box-shadow: 0 0 0 2px rgba(0, 229, 163, 0.25);
}

.catalog-widget-buttons {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-catalog-order {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: #1e3a8a;
    border: 1px solid #3b82f6;
    color: #93c5fd;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-catalog-order:hover {
    background: #2563eb;
    color: #ffffff;
}

.btn-catalog-eye {
    padding: 6px 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-catalog-eye:hover {
    background: rgba(255, 255, 255, 0.16);
}

.btn-catalog-eye.hidden {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #ef4444;
}

.btn-catalog-action {
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s ease;
}

.btn-catalog-action.edit {
    background: rgba(56, 189, 248, 0.15);
    border-color: #38bdf8;
    color: #38bdf8;
}

.btn-catalog-action.edit:hover {
    background: rgba(56, 189, 248, 0.3);
}

.btn-catalog-action.delete {
    background: rgba(239, 68, 68, 0.15);
    border-color: #ef4444;
    color: #ef4444;
}

.btn-catalog-action.delete:hover {
    background: rgba(239, 68, 68, 0.3);
}

.btn-preview-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 6px;
    background: rgba(0, 229, 163, 0.1);
    border: 1px solid rgba(0, 229, 163, 0.35);
    color: var(--teal-primary);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-preview-toggle:hover {
    background: rgba(0, 229, 163, 0.22);
    box-shadow: 0 0 10px rgba(0, 229, 163, 0.2);
}

.btn-preview-toggle.active {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.4);
    color: #f59e0b;
}

/* Accordion Body */
.catalog-accordion-body {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
    background: #070b14;
}

.catalog-widget-card.catalog-accordion.accordion-open .catalog-accordion-body {
    max-height: 3500px;
    opacity: 1;
}

.catalog-accordion-body-inner {
    padding: 16px;
}

.catalog-preview-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    margin-bottom: 14px;
    border-right: 3px solid var(--teal-primary);
}

.catalog-preview-desc {
    font-size: 12.5px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pulse-dot {
    font-size: 10px;
    display: inline-block;
}

.library-accordion-bulk-btns .bulk-btn {
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #38bdf8;
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s ease;
}

.library-accordion-bulk-btns .bulk-btn:hover {
    background: rgba(56, 189, 248, 0.25);
    color: #ffffff;
}

/* Leaderboard Widget Styling */
.leaderboard-container {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(9, 14, 26, 0.9));
    border: 1px solid rgba(0, 229, 163, 0.2);
    border-radius: 12px;
    padding: 16px;
}

.leaderboard-header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.leaderboard-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 6px;
}

.leaderboard-table th {
    font-size: 12px;
    font-weight: 700;
    color: #94a3b8;
    padding: 8px 12px;
    text-align: right;
    border: none;
}

.leaderboard-table td {
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.02);
    font-size: 13px;
    font-weight: 600;
    color: #f1f5f9;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.leaderboard-table td:first-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    border-right: 1px solid rgba(255, 255, 255, 0.04);
}

.leaderboard-table td:last-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    border-left: 1px solid rgba(255, 255, 255, 0.04);
}

.leaderboard-table tr:hover td {
    background: rgba(0, 229, 163, 0.05);
    border-color: rgba(0, 229, 163, 0.2);
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-weight: 800;
    font-size: 13px;
}

.rank-badge.rank-1 { background: linear-gradient(135deg, #ffd700, #b8860b); color: #000; box-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
.rank-badge.rank-2 { background: linear-gradient(135deg, #e0e0e0, #9e9e9e); color: #000; box-shadow: 0 0 8px rgba(224, 224, 224, 0.4); }
.rank-badge.rank-3 { background: linear-gradient(135deg, #cd7f32, #8b4513); color: #fff; box-shadow: 0 0 8px rgba(205, 127, 50, 0.4); }
.rank-badge.rank-other { background: rgba(255, 255, 255, 0.06); color: #94a3b8; }

.trader-name-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.trader-avatar {
    font-size: 18px;
}

.profit-green {
    color: #10b981;
    font-weight: 800;
    font-family: monospace;
}

.win-rate-pill {
    padding: 3px 8px;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    font-size: 11px;
    font-weight: 700;
}

/* ==========================================================================
   Live Crypto Ticker Tape & Cards Widget (Smart Template)
   ========================================================================== */
.live-crypto-ticker-wrapper {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(7, 11, 20, 0.98));
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 12px;
    padding: 12px 14px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.ticker-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 12px;
}

.ticker-live-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
}

.ticker-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 10px #10b981;
    display: inline-block;
    animation: tickerPulseGlow 1.8s infinite;
}

@keyframes tickerPulseGlow {
    0% { transform: scale(0.85); opacity: 0.7; }
    50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 14px #10b981; }
    100% { transform: scale(0.85); opacity: 0.7; }
}

.ticker-status-label {
    font-weight: 600;
    color: #e2e8f0;
    font-size: 12px;
}

.ticker-pairs-count {
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.25);
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
}

.ticker-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ticker-btn-mode {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    padding: 3px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.ticker-btn-mode:hover, .ticker-btn-mode.active {
    background: rgba(0, 229, 163, 0.15);
    border-color: rgba(0, 229, 163, 0.45);
    color: #00e5a3;
}

.ticker-btn-refresh {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    cursor: pointer;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 6px;
    transition: all 0.25s ease;
}

.ticker-btn-refresh:hover {
    color: #fff;
    background: rgba(56, 189, 248, 0.2);
    border-color: #38bdf8;
    transform: rotate(180deg);
}

/* Continuous Marquee Tape */
.ticker-marquee-viewport {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 6px 0;
    direction: ltr; /* Keeps translation direction uniform across RTL pages */
    mask-image: linear-gradient(to right, transparent 0%, black 2.5%, black 97.5%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 2.5%, black 97.5%, transparent 100%);
}

.ticker-track {
    display: flex;
    gap: 12px;
    width: max-content;
    animation: tickerTapeScroll 45s linear infinite;
    will-change: transform;
}

.ticker-track:hover {
    animation-play-state: paused;
}

@keyframes tickerTapeScroll {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-50%, 0, 0);
    }
}

/* Coin Pills */
.ticker-coin-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(18, 24, 38, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 7px 12px;
    white-space: nowrap;
    transition: all 0.2s ease;
    cursor: pointer;
    user-select: none;
    min-width: 170px;
    direction: ltr;
}

.ticker-coin-pill:hover {
    transform: translateY(-2px);
    background: rgba(28, 38, 58, 0.98);
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.ticker-coin-pill.bullish {
    border-left: 3px solid #10b981;
}

.ticker-coin-pill.bearish {
    border-left: 3px solid #ef4444;
}

.coin-pill-left {
    display: flex;
    align-items: center;
    gap: 7px;
}

.coin-pill-icon {
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
}

.coin-pill-names {
    display: flex;
    flex-direction: column;
}

.coin-pill-symbol {
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.3px;
}

.coin-pill-pair {
    font-size: 9px;
    color: #64748b;
    line-height: 1;
}

.coin-pill-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-left: auto;
}

.coin-pill-price {
    font-size: 12px;
    font-weight: 700;
    font-family: 'Courier New', monospace, sans-serif;
    color: #f8fafc;
}

.coin-pill-change {
    font-size: 10px;
    font-weight: 700;
    border-radius: 4px;
    padding: 1px 4px;
    line-height: 1.2;
}

.coin-pill-change.pos {
    color: #10b981;
    background: rgba(16, 185, 129, 0.12);
}

.coin-pill-change.neg {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
}

/* Grid Cards View */
.ticker-grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 10px;
    padding: 4px 0;
    direction: rtl;
}

.ticker-grid-card {
    background: rgba(18, 24, 38, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 10px 12px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.ticker-grid-card:hover {
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.ticker-grid-card.bullish {
    border-top: 2px solid #10b981;
}

.ticker-grid-card.bearish {
    border-top: 2px solid #ef4444;
}

.grid-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.grid-card-symbol-box {
    display: flex;
    align-items: center;
    gap: 6px;
}

.grid-card-icon {
    font-size: 15px;
}

.grid-card-symbol {
    font-size: 12px;
    color: #fff;
}

.grid-card-sub {
    font-size: 9px;
    color: #64748b;
}

.grid-card-change {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
}

.grid-card-change.pos {
    color: #10b981;
    background: rgba(16, 185, 129, 0.12);
}

.grid-card-change.neg {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
}

.grid-card-price {
    font-size: 14px;
    font-weight: 800;
    font-family: 'Courier New', monospace;
    color: #f8fafc;
    margin-bottom: 5px;
}

.grid-card-details {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #64748b;
}

/* ==============================================================================
   Unified Sections & 3D Icons Styling (Permissions Matrix & Sidebar)
   ============================================================================== */
.btn-perm-cat-action {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.btn-perm-cat-action:hover {
    background: rgba(56, 189, 248, 0.2);
    border-color: #38bdf8;
    color: #38bdf8;
    transform: translateY(-1px);
}

.btn-perm-cat-action.edit:hover {
    background: rgba(245, 158, 11, 0.2);
    border-color: #f59e0b;
    color: #f59e0b;
}

.btn-perm-cat-action.transfer {
    background: rgba(14, 165, 233, 0.12);
    border-color: rgba(56, 189, 248, 0.35);
    color: #38bdf8;
}

.btn-perm-cat-action.transfer:hover {
    background: rgba(14, 165, 233, 0.28);
    border-color: #38bdf8;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.btn-matrix-action.transfer {
    background: rgba(14, 165, 233, 0.12);
    border-color: rgba(56, 189, 248, 0.35);
    color: #38bdf8;
}

.btn-matrix-action.transfer:hover {
    background: rgba(14, 165, 233, 0.28);
    border-color: #38bdf8;
    color: #fff;
}

.btn-snav-ctrl.transfer {
    background: rgba(14, 165, 233, 0.12);
    border-color: rgba(56, 189, 248, 0.35);
    color: #38bdf8;
}

.btn-snav-ctrl.transfer:hover {
    background: rgba(14, 165, 233, 0.28);
    border-color: #38bdf8;
    color: #fff;
}

.btn-perm-cat-action.danger:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #ef4444;
}

.btn-3d-icon-choice {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    cursor: pointer;
    transition: all 0.2s ease;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.btn-3d-icon-choice:hover, .btn-3d-icon-choice.selected {
    background: rgba(0, 229, 163, 0.2);
    border-color: var(--teal-primary);
    transform: scale(1.15);
    box-shadow: 0 0 10px rgba(0, 229, 163, 0.3);
}

.sidebar-3d-img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    vertical-align: middle;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.6));
    border-radius: 4px;
}

.sidebar-3d-emoji {
    display: inline-block;
    font-size: 19px;
    vertical-align: middle;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.45));
    transition: transform 0.2s ease;
}

.nav-item:hover .sidebar-3d-emoji,
.nav-item:hover .sidebar-3d-img {
    transform: scale(1.14) translateY(-1px);
}

.perm-cat-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.sec-upload-dropzone:hover {
    border-color: #38bdf8 !important;
    background: rgba(56, 189, 248, 0.08) !important;
    transform: translateY(-1px);
}

.sec-upload-dropzone.drag-over {
    border-color: #10b981 !important;
    background: rgba(16, 185, 129, 0.12) !important;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.25);
}

.btn-matrix-icon-display {
    transition: all 0.2s ease;
}

.btn-matrix-icon-display:hover {
    border-color: #38bdf8 !important;
    transform: scale(1.1);
    background: rgba(56, 189, 248, 0.15) !important;
}

.btn-user-reorder {
    padding: 3px 8px !important;
    font-size: 11px !important;
    line-height: 1 !important;
    font-weight: 800 !important;
    border-radius: 6px !important;
    background: rgba(56, 189, 248, 0.08) !important;
    border: 1px solid rgba(56, 189, 248, 0.25) !important;
    color: #38bdf8 !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
}

.btn-user-reorder:hover:not(:disabled) {
    background: rgba(56, 189, 248, 0.25) !important;
    border-color: #38bdf8 !important;
    color: #fff !important;
    transform: translateY(-1px) scale(1.05) !important;
}

.btn-user-reorder:disabled {
    opacity: 0.3 !important;
    cursor: not-allowed !important;
}

/* =========================================================================
   Add Widget Card inside Permissions Grid & Widget Picker Modal
   ========================================================================= */
.perm-item-add-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 14px 12px;
    background: rgba(56, 189, 248, 0.03);
    border: 2px dashed rgba(56, 189, 248, 0.35);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 82px;
}
.perm-item-add-card:hover {
    background: rgba(56, 189, 248, 0.09);
    border-color: #38bdf8;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(56, 189, 248, 0.18);
}
.perm-add-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    pointer-events: none;
}
.perm-add-card-icon {
    font-size: 22px;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(56, 189, 248, 0.3));
}
.perm-add-card-title {
    font-size: 13px;
    font-weight: 800;
    color: #38bdf8;
}
.perm-add-card-subtitle {
    font-size: 10.5px;
    color: var(--text-muted, #94a3b8);
}

/* Widget Picker Modal Styles */
.widget-picker-modal-content {
    max-width: 960px;
    width: 94vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-card, #0f172a);
    border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}
.widget-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: var(--bg-card-sub, #131b26);
    border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
}
.widget-picker-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-main, #f8fafc);
    display: flex;
    align-items: center;
    gap: 8px;
}
.widget-picker-alert-banner {
    margin: 12px 20px 0 20px;
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    direction: rtl;
    animation: slideDownPickerAlert 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}
.widget-picker-alert-banner.success {
    background: rgba(16, 185, 129, 0.16);
    border: 1px solid rgba(16, 185, 129, 0.5);
    color: #10b981;
}
.widget-picker-alert-banner.info {
    background: rgba(56, 189, 248, 0.16);
    border: 1px solid rgba(56, 189, 248, 0.5);
    color: #38bdf8;
}
.widget-picker-alert-banner.warning {
    background: rgba(245, 158, 11, 0.16);
    border: 1px solid rgba(245, 158, 11, 0.5);
    color: #f59e0b;
}
.widget-picker-alert-banner.error {
    background: rgba(239, 68, 68, 0.16);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #ef4444;
}
@keyframes slideDownPickerAlert {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
.widget-picker-search-bar {
    display: flex;
    gap: 12px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.06));
    align-items: center;
}
.widget-picker-search-bar input {
    flex: 1;
    background: var(--bg-card, #0b1118);
    border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.12));
    border-radius: 6px;
    padding: 9px 14px;
    color: var(--text-main, #f8fafc);
    font-size: 13px;
    outline: none;
}
.widget-picker-search-bar input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}
.widget-picker-tabs {
    display: flex;
    gap: 6px;
}
.btn-picker-tab {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted, #94a3b8);
    cursor: pointer;
    transition: all 0.15s ease;
}
.btn-picker-tab.active {
    background: rgba(56, 189, 248, 0.18);
    border-color: #38bdf8;
    color: #38bdf8;
}
.widget-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    padding: 18px 20px;
    overflow-y: auto;
    max-height: 58vh;
}
.widget-picker-card {
    background: var(--bg-card-sub, #131b26);
    border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
    transition: all 0.18s ease;
}
.widget-picker-card:hover {
    border-color: rgba(56, 189, 248, 0.4);
    background: rgba(255, 255, 255, 0.02);
}
.widget-picker-card.is-in-section {
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(16, 185, 129, 0.04);
}
.widget-picker-card.just-updated {
    border-color: #10b981 !important;
    background: rgba(16, 185, 129, 0.08) !important;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4) !important;
    animation: pulseUpdatedCard 1.2s ease-in-out infinite alternate;
}
@keyframes pulseUpdatedCard {
    from { box-shadow: 0 0 10px rgba(16, 185, 129, 0.2); }
    to { box-shadow: 0 0 25px rgba(16, 185, 129, 0.6); }
}
#toastContainer {
    position: fixed !important;
    bottom: 24px !important;
    left: 24px !important;
    z-index: 9999999 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    pointer-events: none !important;
}
.widget-picker-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}
.btn-picker-action {
    flex: 1;
    padding: 7px 10px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
}
.btn-picker-action.link {
    background: rgba(56, 189, 248, 0.16);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.35);
}
.btn-picker-action.link:hover {
    background: #38bdf8;
    color: #0b1118;
}
.btn-picker-action.move {
    background: rgba(245, 158, 11, 0.16);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.35);
}
.btn-picker-action.move:hover {
    background: #f59e0b;
    color: #0b1118;
}
.btn-picker-action.clone {
    background: rgba(168, 85, 247, 0.16);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.35);
}
.btn-picker-action.clone:hover {
    background: #c084fc;
    color: #0b1118;
}
.btn-picker-action.remove {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.35);
}
.btn-picker-action.remove:hover {
    background: #ef4444;
    color: #fff;
}

/* ==============================================================================
   V3 STRATEGIES & PAPER TRADING STYLES
   ============================================================================== */

.strategies-subnav-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
}

.strat-subtab-btn {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}

.strat-subtab-btn:hover {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(56, 189, 248, 0.4);
    color: #f1f5f9;
}

.strat-subtab-btn.active {
    background: linear-gradient(135deg, rgba(0, 229, 163, 0.2), rgba(16, 185, 129, 0.25));
    border-color: #00e5a3;
    color: #00e5a3;
    box-shadow: 0 0 15px rgba(0, 229, 163, 0.25);
}

.strat-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.strat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 0 15px rgba(56, 189, 248, 0.15);
}

.strat-subpane {
    animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   TRIAL PERIOD & LIVE REAL-TIME COUNTDOWN SYSTEM (النسخة V3.3)
   ========================================================================== */
.trial-countdown-banner {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.95));
    border: 1px solid rgba(234, 179, 8, 0.35);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6), 0 0 15px rgba(234, 179, 8, 0.15);
    backdrop-filter: blur(12px);
    border-radius: 12px;
    padding: 12px 20px;
    margin-bottom: 20px;
    position: relative;
    transition: all 0.3s ease;
    z-index: 99;
}

.trial-countdown-banner.active {
    border-color: rgba(0, 229, 163, 0.4);
    box-shadow: 0 0 20px rgba(0, 229, 163, 0.15);
}

.trial-countdown-banner.warning {
    border-color: rgba(234, 179, 8, 0.6);
    box-shadow: 0 0 20px rgba(234, 179, 8, 0.25);
}

.trial-countdown-banner.danger {
    border-color: rgba(239, 68, 68, 0.8);
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.35);
    animation: trialPulseDanger 2s infinite ease-in-out;
}

.trial-countdown-banner.expired {
    background: linear-gradient(135deg, rgba(69, 10, 10, 0.95), rgba(30, 41, 59, 0.95));
    border-color: #ef4444;
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.4);
}

@keyframes trialPulseDanger {
    0%, 100% { box-shadow: 0 0 15px rgba(239, 68, 68, 0.3); }
    50% { box-shadow: 0 0 30px rgba(239, 68, 68, 0.6); }
}

.trial-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.trial-banner-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.trial-pulse-icon {
    font-size: 24px;
    display: inline-block;
    animation: trialRotateHourglass 4s infinite ease-in-out;
}

@keyframes trialRotateHourglass {
    0%, 40% { transform: rotate(0deg); }
    50%, 90% { transform: rotate(180deg); }
    100% { transform: rotate(360deg); }
}

.trial-banner-title {
    font-size: 14.5px;
    font-weight: 700;
    color: #f8fafc;
}

.trial-status-pill {
    font-size: 11px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(0, 229, 163, 0.15);
    color: var(--teal-primary);
    border: 1px solid rgba(0, 229, 163, 0.4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    gap: 4px;
}

.trial-status-pill.none {
    background: rgba(255, 255, 255, 0.05);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.trial-status-pill.warning {
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
    border-color: rgba(234, 179, 8, 0.4);
}

.trial-status-pill.danger {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.4);
}

.trial-status-pill.expired {
    background: #ef4444;
    color: #fff;
    border-color: #ef4444;
}

.trial-countdown-clock {
    display: flex;
    align-items: center;
    gap: 6px;
    direction: ltr;
}

.trial-countdown-clock .clock-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 4px 10px;
    min-width: 48px;
}

.trial-countdown-clock .unit-num {
    font-family: 'Courier New', Courier, monospace, sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: #38bdf8;
    line-height: 1.1;
}

.trial-countdown-clock .unit-lbl {
    font-size: 9.5px;
    font-weight: 600;
    color: #94a3b8;
    margin-top: 2px;
}

.trial-countdown-clock .clock-sep {
    font-size: 18px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.4);
    user-select: none;
}

.trial-banner-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.trial-notice {
    font-size: 12px;
    font-weight: 600;
    color: #cbd5e1;
}

/* Quick Action Buttons for Admin Trial Widget */
.btn-trial-action {
    padding: 4px 9px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-trial-action.extend {
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.3);
}

.btn-trial-action.extend:hover {
    background: #38bdf8;
    color: #0f172a;
}

.btn-trial-action.vip {
    background: rgba(234, 179, 8, 0.12);
    color: #eab308;
    border-color: rgba(234, 179, 8, 0.3);
}

.btn-trial-action.vip:hover {
    background: #eab308;
    color: #0f172a;
}

.btn-trial-action.expire {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

.btn-trial-action.expire:hover {
    background: #ef4444;
    color: #fff;
}

/* ==========================================================================
   Roles Management Table (Modal Fix & Sticky Header)
   ========================================================================== */
.roles-table-wrapper {
    overflow-x: auto !important;
    overflow-y: auto !important;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: #090e1c !important;
    position: relative;
}

.roles-table-wrapper .roles-table {
    display: table !important;
    width: 100% !important;
    min-width: 860px !important;
    border-collapse: collapse !important;
    font-size: 13px !important;
}

.roles-table-wrapper .roles-table thead {
    display: table-header-group !important;
}

.roles-table-wrapper .roles-table tbody {
    display: table-row-group !important;
}

.roles-table-wrapper .roles-table tr {
    display: table-row !important;
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.roles-table-wrapper .roles-table tr:hover {
    background: rgba(255, 255, 255, 0.03) !important;
}

.roles-table-wrapper .roles-table th {
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
    background: #0c1427 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    padding: 13px 16px !important;
    border-bottom: 2px solid rgba(0, 229, 163, 0.4) !important;
    white-space: nowrap !important;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4) !important;
}

.roles-table-wrapper .roles-table td {
    display: table-cell !important;
    padding: 13px 16px !important;
    vertical-align: middle !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    color: #ffffff !important;
    font-size: 13px !important;
}

.roles-table-wrapper .roles-table td::before {
    display: none !important;
}

.role-desc-text {
    color: var(--text-dim);
    font-size: 12px;
    line-height: 1.55;
    display: block;
    max-width: 280px;
    word-break: break-word;
    white-space: normal;
}

/* Dynamic Roles Color Customizer Styles */
.btn-color-preset {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-color-preset:hover {
    transform: scale(1.25);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
}
.role-color-live-preview {
    transition: all 0.25s ease;
}

/* ==========================================================================
   SIGNALS-ONLY MODE STICKY WARNING BANNER (وضع فحص واختبار الإشارات)
   ========================================================================== */
.signals-only-warning-banner {
    background: linear-gradient(135deg, rgba(30, 20, 5, 0.95), rgba(45, 27, 8, 0.95));
    border: 1px solid rgba(245, 158, 11, 0.6);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6), 0 0 20px rgba(245, 158, 11, 0.2);
    backdrop-filter: blur(12px);
    border-radius: 12px;
    padding: 12px 20px;
    margin-bottom: 20px;
    position: relative;
    z-index: 99;
    animation: signalsOnlyPulse 3s infinite ease-in-out;
}

@keyframes signalsOnlyPulse {
    0%, 100% { box-shadow: 0 0 15px rgba(245, 158, 11, 0.2); border-color: rgba(245, 158, 11, 0.6); }
    50% { box-shadow: 0 0 28px rgba(245, 158, 11, 0.45); border-color: rgba(251, 191, 36, 0.9); }
}

.signals-only-warning-banner .banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.signals-only-warning-banner .banner-text-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.signals-only-warning-banner .banner-icon {
    font-size: 26px;
    display: inline-block;
    filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.6));
}

.signals-only-warning-banner .banner-title {
    color: #fbbf24;
    font-size: 14px;
    font-weight: 800;
    display: block;
    margin-bottom: 2px;
}

.signals-only-warning-banner .banner-desc {
    color: #cbd5e1;
    font-size: 12px;
    line-height: 1.4;
}

.signals-only-warning-banner .banner-action-btn {
    background: linear-gradient(135deg, #059669, #10b981);
    color: #ffffff;
    border: 1px solid rgba(16, 185, 129, 0.5);
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    white-space: nowrap;
}

.signals-only-warning-banner .banner-action-btn:hover {
    background: linear-gradient(135deg, #10b981, #34d399);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.45);
}

/* ==========================================================================
   PAPER TRADING & INDICATOR EVALUATOR WIDGET (ACCORDION SYSTEM)
   ========================================================================== */

.paper-evaluator-card {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.85) 0%, rgba(10, 15, 30, 0.95) 100%);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 16px;
    padding: 22px;
    margin-bottom: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    position: relative;
    overflow: hidden;
}

.paper-evaluator-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 250px;
    height: 120px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.paper-evaluator-header-ctrls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

/* 3-Way Mode Switcher */
.paper-mode-toggle-group {
    display: inline-flex;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 3px;
    gap: 4px;
}

.btn-paper-mode {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-paper-mode:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.btn-paper-mode.active[data-mode="real"] {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(5, 150, 105, 0.4));
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.4);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}

.btn-paper-mode.active[data-mode="paper"] {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(124, 58, 237, 0.4));
    color: #c084fc;
    border: 1px solid rgba(192, 132, 252, 0.4);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.25);
}

.btn-paper-mode.active[data-mode="parallel"] {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.4));
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.4);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
}

/* Timer Badge */
.paper-timer-badge {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 11px;
    font-family: 'Courier New', Courier, monospace;
    font-weight: 700;
    color: #38bdf8;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Mini Reset Button */
.btn-paper-reset {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-paper-reset:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #ffffff;
    border-color: #ef4444;
}

/* Horizontal KPI Grid for Paper Evaluator */
.paper-kpi-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 16px !important;
    margin-bottom: 20px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.paper-kpi-grid .kpi-card {
    background: rgba(15, 23, 42, 0.75) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 14px !important;
    padding: 16px 18px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    transition: transform 0.2s ease, border-color 0.2s ease !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
}

.paper-kpi-grid .kpi-card:hover {
    transform: translateY(-2px) !important;
    border-color: rgba(56, 189, 248, 0.3) !important;
}

.paper-kpi-grid .kpi-label {
    font-size: 13px !important;
    color: #94a3b8 !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.paper-kpi-grid .kpi-value {
    font-size: 24px !important;
    font-weight: 900 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.paper-kpi-grid .kpi-sub {
    font-size: 11px !important;
    color: #64748b !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

@media (max-width: 1200px) {
    .paper-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 640px) {
    .paper-kpi-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Paper Accordion Stack */
.paper-accordion-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 18px;
}

.paper-acc-item {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.25s ease;
}

.paper-acc-item:hover {
    border-color: rgba(56, 189, 248, 0.2);
}

.paper-acc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: rgba(30, 41, 59, 0.4);
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
}

.paper-acc-header:hover {
    background: rgba(30, 41, 59, 0.7);
}

.paper-acc-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
    color: #e2e8f0;
}

.paper-acc-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.paper-acc-chevron {
    color: #94a3b8;
    font-size: 12px;
    transition: transform 0.25s ease;
}

.paper-acc-item.expanded .paper-acc-chevron {
    transform: rotate(180deg);
}

.paper-acc-body {
    display: none;
    padding: 16px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(10, 15, 30, 0.4);
}

.paper-acc-item.expanded .paper-acc-body {
    display: block;
}

/* Positions Table Rows inside Accordion */
.paper-pos-table-wrap {
    overflow-x: auto;
    width: 100%;
}

.paper-pos-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 680px;
}

.paper-pos-table th {
    background: rgba(30, 41, 59, 0.6);
    color: #94a3b8;
    padding: 10px 14px;
    text-align: right;
    font-weight: 700;
    font-size: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    white-space: nowrap;
}

.paper-pos-table td {
    padding: 11px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    vertical-align: middle;
    white-space: nowrap;
}

.paper-pos-table tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

.btn-paper-close-row {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #f87171;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-paper-close-row:hover {
    background: rgba(239, 68, 68, 0.28);
    color: #ffffff;
    border-color: #ef4444;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.paper-pnl-pill {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 12px;
}

.paper-pnl-pill.win {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.3);
}

.paper-pnl-pill.loss {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.btn-paper-close-pos {
    width: 100%;
    margin-top: 10px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    font-size: 12px;
    font-weight: 700;
    padding: 7px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-paper-close-pos:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #ffffff;
    border-color: #ef4444;
}

/* Closed Trades Table / Stack */
.paper-closed-table-wrap {
    overflow-x: auto;
}

.paper-closed-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.paper-closed-table th {
    background: rgba(30, 41, 59, 0.6);
    color: #94a3b8;
    padding: 10px 12px;
    text-align: right;
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.paper-closed-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: #cbd5e1;
}

.paper-closed-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Scorecard Section */
.paper-scorecard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.paper-score-item {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 12px 14px;
    text-align: center;
}

.paper-score-label {
    font-size: 11px;
    color: #94a3b8;
    margin-bottom: 4px;
}

.paper-score-val {
    font-size: 16px;
    font-weight: 800;
    color: #ffffff;
}

.paper-promote-banner {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
    border: 1px dashed rgba(52, 211, 153, 0.4);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
}

.paper-promote-text {
    font-size: 13px;
    color: #cbd5e1;
    line-height: 1.5;
}

.paper-promote-text strong {
    color: #34d399;
}

.btn-paper-promote {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: #ffffff;
    border: 1px solid rgba(52, 211, 153, 0.5);
    font-size: 13px;
    font-weight: 800;
    padding: 10px 22px;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
    transition: all 0.25s ease;
    white-space: nowrap;
}

.btn-paper-promote:hover {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}


