* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    user-select: none;
}

body, html {
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.theme-dark {
    --bg-main: #0b0e14;
    --bg-surface: #141824;
    --bg-card: #1a2030;
    --border-color: #1f2434;
    --text-main: #d1d4dc;
    --text-muted: #787b86;
    --accent: #00e676;
    --accent-blue: #2962ff;
    --danger: #ff3344;
}

.app-layout {
    display: flex;
    width: 100vw;
    height: 100vh;
    background: var(--bg-main);
    color: var(--text-main);
}

.workspace-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100vh;
    overflow: hidden;
}

/* ======================================= */
/* LEFT SIDEBAR (MAIN NAV BAR) */
/* ======================================= */
.main-nav-bar {
    width: 60px;
    background: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    z-index: 30;
}

.nav-top, .nav-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.nav-logo {
    font-size: 11px;
    font-weight: 900;
    color: var(--accent-blue);
    margin-bottom: 10px;
    text-align: center;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-shadow: 0 0 10px rgba(41, 98, 255, 0.6);
    cursor: default;
    user-select: none;
}

.nav-btn {
    width: 48px;
    height: 48px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.15s ease-in-out;
}

.nav-btn i { font-size: 16px; margin-bottom: 2px; }
.nav-btn span { font-size: 9px; font-weight: 600; }

.nav-btn:hover, .nav-btn.active {
    background: var(--bg-card);
    color: var(--accent-blue);
}

.nav-btn.active {
    border-left: 3px solid var(--accent-blue);
    border-radius: 0 8px 8px 0;
}

/* ======================================= */
/* TOP HEADER BAR */
/* ======================================= */
.top-header {
    height: 55px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 20;
    position: relative;
}

.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 2;
}

/* VIP GLOWING HEADER BRANDING */
.header-center-logo {
    position: absolute;
    left: 38%;
    transform: translateX(-50%);
    font-size: 18px;
    font-weight: 900;
    background: linear-gradient(90deg, #00e676, #2962ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 3px;
    text-transform: uppercase;
    pointer-events: none;
    white-space: nowrap;
    filter: drop-shadow(0 0 10px rgba(0, 230, 118, 0.3));
    z-index: 1;
}

.pair-selector-box {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    gap: 8px;
}

.pair-selector-box select {
    background: transparent;
    border: none;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    outline: none;
    cursor: pointer;
}

.pair-selector-box select option, .pair-selector-box select optgroup {
    background: #141824;
    color: #fff;
}

.payout-pill {
    background: var(--accent);
    color: #000;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
}

.ping-status {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.dot-online {
    width: 7px;
    height: 7px;
    background: var(--accent);
    border-radius: 50%;
}

/* ======================================= */
/* BALANCE & ACCOUNT SWITCHER */
/* ======================================= */
.balance-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    padding: 5px 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.balance-info {
    display: flex;
    flex-direction: column;
}

.balance-info small {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
}

.balance-info strong {
    font-size: 14px;
    color: var(--accent);
}

.acc-switch-dropdown {
    position: absolute;
    top: 48px;
    right: 0;
    background: #141824;
    border: 1px solid #1f2434;
    border-radius: 8px;
    width: 220px;
    display: none;
    flex-direction: column;
    z-index: 50;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
    overflow: hidden;
}

.acc-switch-dropdown.open {
    display: flex;
}

.acc-option {
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border-bottom: 1px solid #1f2434;
    transition: 0.15s;
}

.acc-option:hover {
    background: #1a2030;
}

.acc-option.active {
    border-left: 3px solid #00e676;
    background: #1a2030;
}

.acc-option strong {
    display: block;
    font-size: 12px;
    color: #fff;
}

.acc-option small {
    font-size: 10px;
    color: #787b86;
}

.acc-option span {
    font-size: 13px;
    font-weight: bold;
    color: #00e676;
}

.btn-deposit-header {
    background: var(--accent);
    color: #000;
    border: none;
    padding: 7px 14px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-withdraw-header {
    background: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 7px 12px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ======================================= */
/* VIP MULTI-POSITION WATERMARK BACKGROUND */
/* ======================================= */
.chart-watermark-bg {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    pointer-events: none;
    z-index: 0;
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
    transform: rotate(-22deg);
    opacity: 0.045;
}

.chart-watermark-bg span {
    font-size: 40px;
    font-weight: 900;
    background: linear-gradient(90deg, #00e676, #2962ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 40px 60px;
    text-transform: uppercase;
    letter-spacing: 5px;
    white-space: nowrap;
}

/* ======================================= */
/* VIEW PANES */
/* ======================================= */
.view-content {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.view-pane {
    display: none;
    width: 100%;
    height: 100%;
}

.view-pane.active {
    display: flex;
}

/* ======================================= */
/* ADMIN CONTROL PANEL STYLES */
/* ======================================= */
.admin-panel-layout {
    padding: 24px;
    width: 100%;
    overflow-y: auto;
}

.admin-header-box {
    margin-bottom: 20px;
}

.admin-header-box h3 {
    color: #ff9800;
    font-size: 18px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-table {
    width: 100%;
    max-width: 900px;
    border-collapse: collapse;
    background: var(--bg-surface);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.admin-table th, .admin-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
}

.admin-table th {
    background: var(--bg-card);
    color: var(--text-muted);
}

.admin-input-payout {
    width: 60px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    text-align: center;
    font-weight: bold;
    outline: none;
}

.admin-select-type {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    outline: none;
    font-weight: bold;
}

.btn-admin-save {
    background: var(--accent-blue);
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-admin-save:hover {
    background: #1e54e4;
}

.btn-admin-toggle {
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
}

.btn-status-open {
    background: rgba(0, 230, 118, 0.2);
    color: #00e676;
}

.btn-status-closed {
    background: rgba(255, 51, 68, 0.2);
    color: #ff3344;
}
