:root {
      --bg-main: #1c1f2d;
      --bg-card: #242838;
      --bg-card-hover: #2b3044;
      --bg-input: #171a26;
      --border: #2f354a;
      --border-light: #3b425c;
      --text-primary: #ffffff;
      --text-secondary: #8e97b0;
      --text-muted: #636c87;
      --green: #0faf59;
      --green-hover: #13c766;
      --green-soft: rgba(15, 175, 89, 0.16);
      --red: #ff6251;
      --red-hover: #ff796b;
      --red-soft: rgba(255, 98, 81, 0.16);
      --blue: #2d7ff9;
      --amber: #f59e0b;
      --header-h: 58px;
      --sidebar-w: 68px;
      --trade-panel-w: 248px;
      --history-panel-w: 272px;
      --radius: 10px;
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    html, body {
      height: 100%;
      width: 100%;
      background-color: var(--bg-main);
      color: var(--text-primary);
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
      font-size: 13px;
      overflow-x: hidden;
      -webkit-font-smoothing: antialiased;
    }

    button, input {
      font-family: inherit;
      color: inherit;
    }

    button {
      cursor: pointer;
      border: none;
      background: none;
    }

    /* Scrollbar */
    ::-webkit-scrollbar {
      width: 5px;
      height: 5px;
    }
    ::-webkit-scrollbar-track {
      background: transparent;
    }
    ::-webkit-scrollbar-thumb {
      background: var(--border-light);
      border-radius: 99px;
    }

    /* App Shell */
    .app-shell {
      display: flex;
      flex-direction: column;
      height: 100vh;
      min-height: 600px;
      width: 100%;
    }

    /* Top Header */
    .top-header {
      height: var(--header-h);
      background: var(--bg-card);
      border-bottom: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 14px;
      gap: 12px;
      flex-shrink: 0;
      z-index: 30;
    }

    .header-left {
      display: flex;
      align-items: center;
      gap: 14px;
      min-width: 0;
      flex: 1;
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 9px;
      flex-shrink: 0;
      text-decoration: none;
    }

    .brand-logo {
      width: 30px;
      height: 30px;
      border-radius: 8px;
      background: linear-gradient(135deg, #2d7ff9 0%, #0faf59 100%);
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 2px 10px rgba(15, 175, 89, 0.25);
    }

    .brand-text {
      font-size: 16px;
      font-weight: 800;
      letter-spacing: 0.6px;
      color: var(--text-primary);
    }

    .brand-badge {
      font-size: 9px;
      font-weight: 700;
      padding: 2px 5px;
      border-radius: 4px;
      background: rgba(45, 127, 249, 0.18);
      color: #6ea8ff;
      letter-spacing: 0.5px;
      text-transform: uppercase;
    }

    .asset-tabs-wrap {
      display: flex;
      align-items: center;
      gap: 6px;
      overflow-x: auto;
      scrollbar-width: none;
      padding: 2px 0;
    }
    .asset-tabs-wrap::-webkit-scrollbar {
      display: none;
    }

    .asset-tab {
      display: flex;
      align-items: center;
      gap: 8px;
      background: var(--bg-main);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 6px 11px;
      white-space: nowrap;
      transition: all 0.15s ease;
      position: relative;
    }

    .asset-tab:hover {
      background: var(--bg-card-hover);
      border-color: var(--border-light);
    }

    .asset-tab.active {
      background: #2b3146;
      border-color: var(--blue);
      box-shadow: 0 0 0 1px rgba(45, 127, 249, 0.25);
    }

    .asset-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      flex-shrink: 0;
    }

    .asset-name {
      font-weight: 600;
      font-size: 12.5px;
      color: var(--text-primary);
    }

    .asset-payout {
      font-size: 11px;
      font-weight: 700;
      color: var(--amber);
      background: rgba(245, 158, 11, 0.12);
      padding: 1px 6px;
      border-radius: 4px;
    }

    .asset-close {
      color: var(--text-muted);
      font-size: 14px;
      line-height: 1;
      padding: 0 2px;
      border-radius: 4px;
    }
    .asset-close:hover {
      color: var(--text-primary);
      background: rgba(255, 255, 255, 0.08);
    }

    .add-asset-btn {
      width: 34px;
      height: 34px;
      border-radius: 8px;
      background: var(--bg-main);
      border: 1px solid var(--border);
      color: var(--text-primary);
      font-size: 18px;
      font-weight: 600;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      transition: all 0.15s ease;
    }
    .add-asset-btn:hover {
      background: var(--blue);
      border-color: var(--blue);
    }

    /* Header Right */
    .header-right {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-shrink: 0;
    }

    .account-dropdown-wrap {
      position: relative;
    }

    .account-btn {
      display: flex;
      align-items: center;
      gap: 10px;
      background: var(--bg-main);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 5px 12px;
      transition: border-color 0.15s ease;
    }
    .account-btn:hover {
      border-color: var(--border-light);
    }

    .account-meta {
      text-align: left;
    }

    .account-type-label {
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      display: flex;
      align-items: center;
      gap: 5px;
    }
    .account-type-label.demo { color: var(--amber); }
    .account-type-label.live { color: var(--green); }

    .account-balance {
      font-size: 14px;
      font-weight: 700;
      color: var(--text-primary);
      font-variant-numeric: tabular-nums;
    }

    .dropdown-menu {
      position: absolute;
      top: calc(100% + 8px);
      right: 0;
      width: 245px;
      background: var(--bg-card);
      border: 1px solid var(--border-light);
      border-radius: var(--radius);
      box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
      padding: 8px;
      display: none;
      z-index: 60;
    }
    .dropdown-menu.open {
      display: block;
    }

    .acct-option {
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px;
      border-radius: 8px;
      text-align: left;
      transition: background 0.15s ease;
    }
    .acct-option:hover {
      background: var(--bg-card-hover);
    }
    .acct-option.selected {
      background: rgba(45, 127, 249, 0.14);
      border: 1px solid rgba(45, 127, 249, 0.35);
    }

    .refill-btn {
      width: 100%;
      margin-top: 6px;
      padding: 8px 10px;
      border-radius: 7px;
      background: rgba(245, 158, 11, 0.14);
      color: var(--amber);
      font-weight: 600;
      font-size: 12px;
      transition: background 0.15s ease;
    }
    .refill-btn:hover {
      background: rgba(245, 158, 11, 0.24);
    }

    .deposit-btn {
      background: var(--green);
      color: #fff;
      font-weight: 700;
      font-size: 13px;
      padding: 9px 16px;
      border-radius: 8px;
      display: flex;
      align-items: center;
      gap: 6px;
      transition: background 0.15s ease, transform 0.1s ease;
      box-shadow: 0 3px 12px rgba(15, 175, 89, 0.28);
    }
    .deposit-btn:hover {
      background: var(--green-hover);
    }
    .deposit-btn:active {
      transform: scale(0.98);
    }

    .profile-btn {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      background: var(--bg-main);
      border: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--text-secondary);
      transition: all 0.15s ease;
    }
    .profile-btn:hover {
      color: var(--text-primary);
      border-color: var(--border-light);
    }

    /* Main Workspace Grid */
    .workspace {
      flex: 1;
      display: flex;
      min-height: 0;
      overflow: hidden;
    }

    /* Left Icon Sidebar */
    .left-sidebar {
      width: var(--sidebar-w);
      background: var(--bg-card);
      border-right: 1px solid var(--border);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: space-between;
      padding: 10px 6px;
      flex-shrink: 0;
      z-index: 20;
    }

    .sidebar-group {
      display: flex;
      flex-direction: column;
      gap: 6px;
      width: 100%;
    }

    .nav-item {
      width: 100%;
      padding: 9px 4px;
      border-radius: 8px;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 4px;
      color: var(--text-secondary);
      font-size: 10px;
      font-weight: 600;
      transition: all 0.15s ease;
    }
    .nav-item:hover {
      background: var(--bg-card-hover);
      color: var(--text-primary);
    }
    .nav-item.active {
      background: rgba(45, 127, 249, 0.15);
      color: #6ea8ff;
    }
    .nav-item svg {
      width: 19px;
      height: 19px;
    }

    /* Center Chart Area */
    .chart-section {
      flex: 1;
      min-width: 0;
      display: flex;
      flex-direction: column;
      background: var(--bg-main);
      position: relative;
    }

    .chart-toolbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 10px;
      padding: 10px 14px;
      border-bottom: 1px solid var(--border);
      background: rgba(36, 40, 56, 0.45);
      z-index: 15;
    }

    .chart-info-left {
      display: flex;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
    }

    .pair-title {
      font-size: 15px;
      font-weight: 700;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .live-price-pill {
      font-size: 14px;
      font-weight: 700;
      font-variant-numeric: tabular-nums;
      padding: 3px 9px;
      border-radius: 6px;
      background: var(--bg-card);
      border: 1px solid var(--border);
    }
    .live-price-pill.up { color: var(--green); }
    .live-price-pill.down { color: var(--red); }

    .chart-controls-right {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }

    .tf-group {
      display: flex;
      align-items: center;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 2px;
      gap: 2px;
    }

    .tf-btn {
      padding: 5px 10px;
      border-radius: 6px;
      font-size: 12px;
      font-weight: 600;
      color: var(--text-secondary);
      transition: all 0.15s ease;
    }
    .tf-btn:hover {
      color: var(--text-primary);
    }
    .tf-btn.active {
      background: var(--blue);
      color: #fff;
    }

    .tool-dropdown-wrap {
      position: relative;
    }

    .tool-btn {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 6px 11px;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 8px;
      font-size: 12px;
      font-weight: 600;
      color: var(--text-primary);
      transition: all 0.15s ease;
    }
    .tool-btn:hover {
      background: var(--bg-card-hover);
      border-color: var(--border-light);
    }

    .tool-popover {
      position: absolute;
      top: calc(100% + 6px);
      right: 0;
      min-width: 195px;
      background: var(--bg-card);
      border: 1px solid var(--border-light);
      border-radius: 10px;
      padding: 6px;
      box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
      display: none;
      z-index: 50;
    }
    .tool-popover.open {
      display: block;
    }
    @media (max-width: 960px) {
      #indicatorPopover {
        left: 0;
        right: auto;
      }
    }
    @media (max-width: 640px) {
      .top-header .brand svg { height: 34px !important; }
      .auth-navbar .brand svg { height: 36px !important; }
    }

    .popover-item {
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 8px 10px;
      border-radius: 7px;
      font-size: 12.5px;
      font-weight: 500;
      color: var(--text-primary);
      text-align: left;
    }
    .popover-item:hover {
      background: var(--bg-card-hover);
    }
    .popover-item.active {
      color: #6ea8ff;
      background: rgba(45, 127, 249, 0.14);
    }

    .chart-canvas-wrap {
      flex: 1;
      position: relative;
      min-height: 300px;
      width: 100%;
    }

    #tv-chart {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
    }

    .chart-legend-overlay {
      position: absolute;
      top: 10px;
      left: 14px;
      z-index: 10;
      pointer-events: none;
      display: flex;
      gap: 12px;
      flex-wrap: wrap;
      font-size: 11.5px;
      color: var(--text-secondary);
      background: rgba(28, 31, 45, 0.72);
      padding: 4px 10px;
      border-radius: 6px;
      backdrop-filter: blur(4px);
    }
    .chart-legend-overlay span strong {
      color: var(--text-primary);
      font-variant-numeric: tabular-nums;
    }

    /* Live Entry Badges & Vertical Expiration Line */
    .chart-overlays {
      position: absolute;
      inset: 0;
      pointer-events: none;
      z-index: 11;
      overflow: hidden;
    }

    .entry-badge {
      position: absolute;
      left: 14px;
      transform: translateY(-50%);
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 3px 9px;
      border-radius: 6px;
      font-size: 11.5px;
      font-weight: 700;
      color: #fff;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.38);
      font-variant-numeric: tabular-nums;
    }
    .entry-badge.UP { background: var(--green); }
    .entry-badge.DOWN { background: var(--red); }

    .expiration-line {
      position: absolute;
      top: 0;
      bottom: 26px;
      width: 0;
      border-left: 2px dashed #f59e0b;
      display: none;
    }
    .expiration-line.visible {
      display: block;
    }

    .expiration-pill {
      position: absolute;
      top: 10px;
      left: 6px;
      background: rgba(28, 31, 45, 0.92);
      border: 1px solid #f59e0b;
      color: #fbbf24;
      padding: 4px 9px;
      border-radius: 7px;
      font-size: 11.5px;
      font-weight: 700;
      white-space: nowrap;
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
      font-variant-numeric: tabular-nums;
    }

    /* ProTreading-style Trade Result Pop-up Notification */
    .trade-result-popup {
      position: fixed;
      top: 74px;
      left: 50%;
      transform: translateX(-50%) translateY(-16px);
      z-index: 130;
      min-width: 300px;
      max-width: 380px;
      background: #242838;
      border: 1px solid var(--border-light);
      border-radius: 12px;
      padding: 14px 16px;
      box-shadow: 0 18px 40px rgba(0, 0, 0, 0.58);
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.22s ease, transform 0.22s ease;
    }
    .trade-result-popup.show {
      opacity: 1;
      pointer-events: auto;
      transform: translateX(-50%) translateY(0);
    }
    .trade-result-popup.win {
      border-top: 3px solid var(--green);
    }
    .trade-result-popup.loss {
      border-top: 3px solid var(--red);
    }
    .tr-pop-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 8px;
    }
    .tr-pop-badge {
      font-size: 11px;
      font-weight: 800;
      letter-spacing: 0.5px;
      padding: 3px 8px;
      border-radius: 5px;
      text-transform: uppercase;
    }
    .tr-pop-badge.win {
      background: var(--green-soft);
      color: var(--green);
    }
    .tr-pop-badge.loss {
      background: var(--red-soft);
      color: var(--red);
    }
    .tr-pop-main {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 6px;
    }
    .tr-pop-asset {
      font-size: 14px;
      font-weight: 700;
      color: var(--text-primary);
    }
    .tr-pop-amount {
      font-size: 18px;
      font-weight: 800;
      font-variant-numeric: tabular-nums;
    }
    .tr-pop-amount.win { color: var(--green); }
    .tr-pop-amount.loss { color: var(--red); }
    .tr-pop-prices {
      display: flex;
      justify-content: space-between;
      font-size: 11.5px;
      color: var(--text-secondary);
      font-variant-numeric: tabular-nums;
    }

    /* Right Trade Control Panel */
    .trade-panel {
      width: var(--trade-panel-w);
      background: var(--bg-card);
      border-left: 1px solid var(--border);
      padding: 14px 12px;
      display: flex;
      flex-direction: column;
      gap: 14px;
      flex-shrink: 0;
      overflow-y: auto;
    }

    .control-card {
      background: var(--bg-main);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 10px;
    }

    .control-label {
      font-size: 11px;
      font-weight: 600;
      color: var(--text-secondary);
      margin-bottom: 8px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .stepper-row {
      display: flex;
      align-items: center;
      background: var(--bg-input);
      border: 1px solid var(--border);
      border-radius: 8px;
      overflow: hidden;
    }

    .step-btn {
      width: 34px;
      height: 36px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 17px;
      font-weight: 600;
      color: var(--text-secondary);
      background: rgba(255, 255, 255, 0.03);
      transition: all 0.15s ease;
    }
    .step-btn:hover {
      background: var(--bg-card-hover);
      color: var(--text-primary);
    }

    .step-input {
      flex: 1;
      min-width: 0;
      background: transparent;
      border: none;
      outline: none;
      text-align: center;
      font-size: 14px;
      font-weight: 700;
      font-variant-numeric: tabular-nums;
      color: var(--text-primary);
    }

    .quick-chips {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 4px;
      margin-top: 8px;
    }

    .chip-btn {
      padding: 4px 2px;
      border-radius: 5px;
      font-size: 11px;
      font-weight: 600;
      background: var(--bg-card);
      color: var(--text-secondary);
      border: 1px solid var(--border);
      transition: all 0.15s ease;
    }
    .chip-btn:hover, .chip-btn.active {
      color: var(--text-primary);
      border-color: var(--blue);
      background: rgba(45, 127, 249, 0.16);
    }

    .payout-box {
      background: rgba(15, 175, 89, 0.08);
      border: 1px dashed rgba(15, 175, 89, 0.35);
      border-radius: var(--radius);
      padding: 10px 12px;
      text-align: center;
    }

    .payout-title {
      font-size: 11px;
      color: var(--text-secondary);
      margin-bottom: 3px;
    }

    .payout-value {
      font-size: 16px;
      font-weight: 800;
      color: var(--green);
      font-variant-numeric: tabular-nums;
    }

    .trade-actions {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .trade-btn {
      width: 100%;
      padding: 15px 14px;
      border-radius: 10px;
      font-size: 15px;
      font-weight: 800;
      letter-spacing: 0.4px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      color: #fff;
      transition: transform 0.1s ease, filter 0.15s ease;
    }
    .trade-btn:active {
      transform: scale(0.98);
    }
    .trade-btn.up {
      background: var(--green);
      box-shadow: 0 5px 18px rgba(15, 175, 89, 0.32);
    }
    .trade-btn.up:hover {
      background: var(--green-hover);
    }
    .trade-btn.down {
      background: var(--red);
      box-shadow: 0 5px 18px rgba(255, 98, 81, 0.3);
    }
    .trade-btn.down:hover {
      background: var(--red-hover);
    }

    .sentiment-bar-wrap {
      margin-top: auto;
      padding-top: 6px;
    }
    .sentiment-labels {
      display: flex;
      justify-content: space-between;
      font-size: 11px;
      font-weight: 700;
      margin-bottom: 5px;
    }
    .sentiment-track {
      height: 6px;
      border-radius: 99px;
      background: var(--red);
      overflow: hidden;
    }
    .sentiment-fill {
      height: 100%;
      background: var(--green);
      transition: width 0.5s ease;
    }

    /* Far-Right Trade History Panel */
    .history-panel {
      width: var(--history-panel-w);
      background: var(--bg-card);
      border-left: 1px solid var(--border);
      display: flex;
      flex-direction: column;
      flex-shrink: 0;
      min-height: 0;
    }

    .history-header {
      padding: 12px 12px 0;
      border-bottom: 1px solid var(--border);
    }

    .history-title-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 10px;
    }

    .history-title {
      font-size: 13.5px;
      font-weight: 700;
    }

    .history-tabs {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 4px;
    }

    .hist-tab {
      padding: 8px 6px;
      font-size: 12px;
      font-weight: 600;
      color: var(--text-secondary);
      border-bottom: 2px solid transparent;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      transition: all 0.15s ease;
    }
    .hist-tab.active {
      color: var(--text-primary);
      border-bottom-color: var(--blue);
    }

    .badge-count {
      background: var(--blue);
      color: #fff;
      font-size: 10px;
      font-weight: 700;
      padding: 1px 6px;
      border-radius: 99px;
    }

    .history-list {
      flex: 1;
      overflow-y: auto;
      padding: 10px;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .empty-history {
      text-align: center;
      color: var(--text-muted);
      padding: 32px 12px;
      font-size: 12px;
      line-height: 1.5;
    }

    .trade-card {
      background: var(--bg-main);
      border: 1px solid var(--border);
      border-radius: 9px;
      padding: 10px;
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .trade-card-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .trade-asset-dir {
      display: flex;
      align-items: center;
      gap: 6px;
      font-weight: 700;
      font-size: 12.5px;
    }

    .dir-pill {
      font-size: 10px;
      font-weight: 800;
      padding: 2px 6px;
      border-radius: 4px;
    }
    .dir-pill.UP {
      background: var(--green-soft);
      color: var(--green);
    }
    .dir-pill.DOWN {
      background: var(--red-soft);
      color: var(--red);
    }

    .trade-timer {
      font-size: 11.5px;
      font-weight: 700;
      font-variant-numeric: tabular-nums;
      color: var(--amber);
      background: rgba(245, 158, 11, 0.12);
      padding: 2px 7px;
      border-radius: 5px;
    }

    .trade-card-mid {
      display: flex;
      justify-content: space-between;
      font-size: 11.5px;
      color: var(--text-secondary);
      font-variant-numeric: tabular-nums;
    }

    .trade-card-bot {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding-top: 5px;
      border-top: 1px solid rgba(255, 255, 255, 0.05);
      font-size: 12px;
      font-weight: 700;
      font-variant-numeric: tabular-nums;
    }

    .status-win { color: var(--green); }
    .status-loss { color: var(--red); }

    /* Modals */
    .modal-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(10, 12, 18, 0.72);
      backdrop-filter: blur(4px);
      display: none;
      align-items: center;
      justify-content: center;
      padding: 16px;
      z-index: 100;
    }
    .modal-backdrop.open {
      display: flex;
    }

    .modal-box {
      width: 100%;
      max-width: 440px;
      background: var(--bg-card);
      border: 1px solid var(--border-light);
      border-radius: 14px;
      box-shadow: 0 20px 45px rgba(0, 0, 0, 0.55);
      overflow: hidden;
    }

    .modal-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 14px 18px;
      border-bottom: 1px solid var(--border);
    }

    .modal-title {
      font-size: 15px;
      font-weight: 700;
    }

    .modal-close {
      font-size: 20px;
      color: var(--text-secondary);
      line-height: 1;
      padding: 2px 6px;
      border-radius: 6px;
    }
    .modal-close:hover {
      background: var(--bg-card-hover);
      color: var(--text-primary);
    }

    .modal-body {
      padding: 16px 18px;
      max-height: 70vh;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .modal-list-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px 12px;
      background: var(--bg-main);
      border: 1px solid var(--border);
      border-radius: 9px;
      transition: border-color 0.15s ease;
    }
    .modal-list-item:hover {
      border-color: var(--blue);
    }

    .primary-btn {
      background: var(--green);
      color: #fff;
      font-weight: 700;
      padding: 10px 14px;
      border-radius: 8px;
      font-size: 13px;
      transition: background 0.15s ease;
    }
    .primary-btn:hover {
      background: var(--green-hover);
    }

    /* Theme Variants (Full Night, Twilight, Light Mode) */
    body.theme-twilight {
      --bg-main: #22273a;
      --bg-card: #2a3047;
      --bg-card-hover: #333a55;
      --bg-input: #1b2030;
    }
    body.theme-light .pt-logo-white { fill: #0f172a; }
    body.theme-light {
      --bg-main: #f1f5f9;
      --bg-card: #ffffff;
      --bg-card-hover: #f8fafc;
      --bg-input: #e2e8f0;
      --border: #cbd5e1;
      --border-light: #94a3b8;
      --text-primary: #0f172a;
      --text-secondary: #475569;
      --text-muted: #64748b;
    }

    /* Landing Page inside Auth Overlay */
    .landing-wrap {
      position: relative;
      z-index: 2;
      width: 100%;
      max-width: 1080px;
      margin: 0 auto;
      padding: 20px 18px 48px;
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
    }
    .landing-hero-title {
      font-size: 36px;
      font-weight: 800;
      line-height: 1.2;
      max-width: 620px;
      margin-bottom: 12px;
      color: #fff;
    }
    .landing-hero-sub {
      font-size: 14.5px;
      color: #a6b0cc;
      max-width: 480px;
      margin-bottom: 20px;
      line-height: 1.5;
    }
    .landing-cta-btn {
      background: var(--green);
      color: #fff;
      font-size: 15px;
      font-weight: 700;
      padding: 13px 28px;
      border-radius: 8px;
      box-shadow: 0 6px 20px rgba(15, 175, 89, 0.35);
    }
    .landing-cta-btn:hover { background: var(--green-hover); }
    .features-grid {
      width: 100%;
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
      gap: 14px;
      margin-top: 28px;
      text-align: left;
    }
    .feature-card {
      background: #242838;
      border: 1px solid #323850;
      border-radius: 12px;
      padding: 18px;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .feature-card h4 { font-size: 15px; color: #fff; }
    .feature-card p { font-size: 12.5px; color: #9ba3bc; line-height: 1.5; }
    .feature-link { color: #2589ff; font-size: 12.5px; font-weight: 700; margin-top: auto; text-align: left; }

    /* Expanded Timeframes & More Menu */
    .tf-select {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 6px 10px;
      font-size: 12px;
      font-weight: 700;
      color: var(--text-primary);
      outline: none;
    }
    .more-grid {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }
    .more-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 11px 13px;
      background: var(--bg-main);
      border: 1px solid var(--border);
      border-radius: 9px;
      font-weight: 600;
      font-size: 13px;
      color: var(--text-primary);
      text-align: left;
    }
    .more-row:hover { border-color: var(--blue); }
    .tourn-card {
      background: var(--bg-main);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 12px 14px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 10px;
    }

    /* ProTreading Full-Page Auth Overlay */
    .auth-overlay {
      position: fixed;
      inset: 0;
      background: #1c1f2d;
      display: none;
      flex-direction: column;
      overflow-y: auto;
      z-index: 200;
    }
    .auth-overlay.open {
      display: flex;
    }
    .auth-bg-svg {
      position: fixed;
      inset: 0;
      width: 100%;
      height: 100%;
      pointer-events: none;
      z-index: 0;
      opacity: 0.55;
    }
    .auth-navbar {
      position: relative;
      z-index: 2;
      width: 100%;
      max-width: 1240px;
      margin: 0 auto;
      padding: 18px 24px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
    }
    .auth-nav-links {
      display: flex;
      align-items: center;
      gap: 28px;
    }
    .auth-nav-link {
      font-size: 13.5px;
      font-weight: 600;
      color: #d1d6e6;
      transition: color 0.15s ease;
    }
    .auth-nav-link:hover {
      color: #fff;
    }
    .auth-nav-actions {
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .auth-top-login {
      background: #2b3044;
      color: #fff;
      font-weight: 600;
      font-size: 13px;
      padding: 9px 18px;
      border-radius: 6px;
    }
    .auth-top-login:hover {
      background: #353b52;
    }
    .auth-top-signup {
      background: var(--green);
      color: #fff;
      font-weight: 700;
      font-size: 13px;
      padding: 9px 18px;
      border-radius: 6px;
    }
    .auth-top-signup:hover {
      background: var(--green-hover);
    }
    .auth-lang {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      font-size: 12.5px;
      font-weight: 600;
      color: #d1d6e6;
      padding: 6px 8px;
    }
    .auth-center {
      position: relative;
      z-index: 2;
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 12px 16px 36px;
    }
    .auth-heading {
      font-size: 32px;
      font-weight: 800;
      color: #fff;
      margin-bottom: 22px;
      text-align: center;
      letter-spacing: -0.3px;
    }
    .auth-card {
      width: 100%;
      max-width: 440px;
      background: #282d3f;
      border: 1px solid #353b52;
      border-radius: 10px;
      padding: 24px 28px 26px;
      box-shadow: 0 24px 55px rgba(0, 0, 0, 0.45);
    }
    .auth-tabs-wrap {
      display: flex;
      justify-content: center;
      margin-bottom: 22px;
      padding-bottom: 16px;
      border-bottom: 1px solid #353b52;
    }
    .auth-tabs {
      display: inline-grid;
      grid-template-columns: 1fr 1fr;
      background: #202434;
      border: 1px solid #353b52;
      border-radius: 7px;
      padding: 3px;
    }
    .auth-tab {
      padding: 8px 20px;
      border-radius: 5px;
      font-size: 13px;
      font-weight: 700;
      color: #9ba3bc;
    }
    .auth-tab.active {
      background: #353b52;
      color: #fff;
    }
    .notched-field {
      position: relative;
      margin-bottom: 16px;
    }
    .notched-field label {
      position: absolute;
      top: -8px;
      left: 12px;
      background: #282d3f;
      padding: 0 6px;
      font-size: 11px;
      font-weight: 500;
      color: #8e97b0;
      z-index: 2;
    }
    .notched-field input,
    .notched-field select {
      width: 100%;
      background: #282d3f;
      border: 1px solid #404762;
      border-radius: 6px;
      padding: 12px 38px 11px 14px;
      font-size: 13.5px;
      color: #fff;
      outline: none;
    }
    .notched-field input:focus,
    .notched-field select:focus {
      border-color: #2589ff;
    }
    .field-eye-btn {
      position: absolute;
      right: 10px;
      top: 50%;
      transform: translateY(-50%);
      color: #8e97b0;
      padding: 4px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .field-eye-btn:hover {
      color: #fff;
    }
    .promo-apply-btn {
      position: absolute;
      right: 12px;
      top: 50%;
      transform: translateY(-50%);
      color: #2589ff;
      font-size: 12px;
      font-weight: 600;
    }
    .auth-row-between {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin: 4px 0 18px;
      font-size: 12.5px;
    }
    .auth-check {
      display: flex;
      align-items: flex-start;
      gap: 9px;
      font-size: 12px;
      color: #d1d6e6;
      line-height: 1.45;
      margin-bottom: 12px;
      cursor: pointer;
    }
    .auth-check input {
      width: 16px;
      height: 16px;
      margin-top: 1px;
      accent-color: #2589ff;
      cursor: pointer;
      flex-shrink: 0;
    }
    .auth-error {
      background: var(--red-soft);
      color: var(--red);
      border: 1px solid rgba(255, 98, 81, 0.35);
      border-radius: 7px;
      padding: 8px 11px;
      font-size: 12px;
      margin-bottom: 14px;
      display: none;
    }
    .auth-error.show {
      display: block;
    }
    .auth-submit {
      width: 100%;
      padding: 12px 16px;
      border-radius: 6px;
      background: #2589ff;
      color: #fff;
      font-size: 14px;
      font-weight: 700;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      transition: background 0.15s ease;
    }
    .auth-submit:hover {
      background: #3a96ff;
    }
    .auth-divider {
      display: flex;
      align-items: center;
      gap: 12px;
      margin: 18px 0 14px;
      color: #8e97b0;
      font-size: 12px;
    }
    .auth-divider::before,
    .auth-divider::after {
      content: "";
      flex: 1;
      height: 1px;
      background: #353b52;
    }
    .google-auth-btn {
      width: 52px;
      height: 38px;
      margin: 0 auto;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 7px;
      background: #2b3044;
      border: 1px solid #404762;
      transition: border-color 0.15s ease, background 0.15s ease;
    }
    .google-auth-btn:hover {
      background: #353b52;
      border-color: #5b6487;
    }
    .auth-link-btn {
      color: #2589ff;
      font-weight: 600;
    }
    .auth-link-btn:hover {
      text-decoration: underline;
    }
    @media (max-width: 720px) {
      .auth-nav-links { display: none; }
      .auth-heading { font-size: 25px; }
      .auth-card { padding: 20px 18px; }
    }

    /* PRO AI Floating Button & Signal Popup */
    .pro-ai-fab {
      position: fixed;
      bottom: 82px;
      left: 84px;
      z-index: 95;
      width: 54px;
      height: 54px;
      border-radius: 50%;
      background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
      color: #e11d48;
      font-weight: 900;
      font-size: 11.5px;
      line-height: 1.1;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55), 0 0 0 2px rgba(245, 158, 11, 0.6);
      transition: transform 0.15s ease;
    }
    .pro-ai-fab:hover { transform: scale(1.06); }
    @media (max-width: 820px) {
      .pro-ai-fab { left: 14px; bottom: 72px; width: 48px; height: 48px; font-size: 10.5px; }
    }

    .pro-ai-fab {
      touch-action: none;
      user-select: none;
      cursor: grab;
    }
    .pro-ai-popup {
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      z-index: 160;
      width: 137px;
      min-height: 100px;
      background: #141824;
      border: 1.5px solid #c9972c;
      border-radius: 9px;
      padding: 5px 6px;
      box-shadow: 0 12px 30px rgba(0, 0, 0, 0.75);
      display: none;
      flex-direction: column;
      gap: 3px;
      text-align: center;
    }
    .pro-ai-popup.open { display: flex; }
    .ai-brand-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding-bottom: 3px;
      border-bottom: 1px solid #2b3248;
      cursor: move;
      user-select: none;
      touch-action: none;
    }
    .ai-brand-bar svg {
      height: 12px !important;
    }
    .ai-max-box {
      background: #0d111c;
      border: 1px solid #c9972c;
      border-radius: 7px;
      padding: 4px 5px;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 1px;
    }
    .ai-max-title {
      color: #f5b932;
      font-weight: 800;
      font-size: 9px;
      letter-spacing: 0.5px;
    }
    .ai-signal-word {
      font-size: 17px;
      font-weight: 900;
      letter-spacing: 1px;
      margin: 1px 0;
      line-height: 1.1;
    }
    .ai-signal-word.UP {
      color: #10e87a;
      text-shadow: 0 0 18px rgba(16, 232, 122, 0.55);
    }
    .ai-signal-word.DOWN {
      color: #ff5247;
      text-shadow: 0 0 18px rgba(255, 82, 71, 0.55);
    }
    .ai-prob-pill {
      background: #1d2335;
      border: 1px solid #353d56;
      border-radius: 5px;
      padding: 3px 4px;
      font-size: 8.5px;
      font-weight: 700;
      color: #e2e8f0;
      width: 100%;
    }
    .copy-mini-btn {
      background: #2589ff;
      color: #fff;
      font-size: 10.5px;
      font-weight: 700;
      padding: 3px 8px;
      border-radius: 5px;
      margin-left: 6px;
      flex-shrink: 0;
    }
    .copy-mini-btn:hover { background: #3b96ff; }

    /* Deposit & Withdrawal Modal */
    .dw-tabs {
      display: grid;
      grid-template-columns: 1fr 1fr;
      background: var(--bg-main);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 3px;
      gap: 4px;
    }
    .dw-tab {
      padding: 8px;
      border-radius: 6px;
      font-size: 12.5px;
      font-weight: 700;
      color: var(--text-secondary);
    }
    .dw-tab.active {
      background: var(--blue);
      color: #fff;
    }
    .pm-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 6px;
    }
    @media (max-width: 520px) {
      .pm-grid {
        grid-template-columns: repeat(3, 1fr);
      }
      .landing-hero-title {
        font-size: 26px;
      }
    }
    .pm-btn {
      padding: 8px 4px;
      border-radius: 7px;
      background: var(--bg-main);
      border: 1px solid var(--border);
      font-size: 11.5px;
      font-weight: 700;
      color: var(--text-secondary);
      text-align: center;
    }
    .pm-btn.active {
      border-color: var(--green);
      background: var(--green-soft);
      color: #fff;
    }
    .dw-field {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }
    .dw-field label {
      font-size: 11px;
      font-weight: 600;
      color: var(--text-secondary);
    }
    .dw-field input {
      background: var(--bg-input);
      border: 1px solid var(--border);
      border-radius: 7px;
      padding: 9px 11px;
      font-size: 12.5px;
      outline: none;
    }
    .dw-field input:focus {
      border-color: var(--blue);
    }
    .tx-status {
      font-size: 10.5px;
      font-weight: 700;
      padding: 2px 7px;
      border-radius: 5px;
      text-transform: uppercase;
    }
    .tx-status.Pending { background: rgba(245, 158, 11, 0.16); color: var(--amber); }
    .tx-status.Approved { background: var(--green-soft); color: var(--green); }
    .tx-status.Rejected { background: var(--red-soft); color: var(--red); }

    /* Personal Data Profile Modal */
    .profile-top-card {
      display: flex;
      align-items: center;
      gap: 14px;
      padding-bottom: 12px;
      border-bottom: 1px solid var(--border);
    }
    .profile-avatar {
      width: 56px;
      height: 56px;
      border-radius: 50%;
      background: #171a26;
      border: 2px solid var(--border-light);
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      color: #2589ff;
    }
    .verify-badge {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      font-size: 11px;
      font-weight: 700;
      padding: 3px 9px;
      border-radius: 5px;
      margin-top: 5px;
    }
    .verify-badge.unverified { background: #8f1d1d; color: #ffd7d7; }
    .verify-badge.verified { background: var(--green-soft); color: var(--green); }
    .prof-notched {
      position: relative;
      margin-top: 4px;
    }
    .prof-notched label {
      position: absolute;
      top: -8px;
      left: 10px;
      background: var(--bg-card);
      padding: 0 5px;
      font-size: 11px;
      color: var(--text-secondary);
      z-index: 2;
    }
    .prof-notched input,
    .prof-notched select {
      width: 100%;
      background: var(--bg-card);
      border: 1px solid var(--border-light);
      border-radius: 7px;
      padding: 10px 12px;
      font-size: 13px;
      color: #fff;
      outline: none;
    }
    .prof-notched input:focus,
    .prof-notched select:focus {
      border-color: #2589ff;
    }
    .email-status-inline {
      position: absolute;
      right: 10px;
      top: 50%;
      transform: translateY(-50%);
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 11px;
    }

    /* Toast Notifications */
    .toast-stack {
      position: fixed;
      bottom: 18px;
      left: 84px;
      z-index: 120;
      display: flex;
      flex-direction: column;
      gap: 8px;
      pointer-events: none;
    }

    .toast {
      background: var(--bg-card);
      border: 1px solid var(--border-light);
      border-left: 4px solid var(--blue);
      padding: 10px 14px;
      border-radius: 9px;
      box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
      font-size: 12.5px;
      font-weight: 600;
      min-width: 230px;
      animation: slideIn 0.2s ease;
    }
    .toast.win { border-left-color: var(--green); }
    .toast.loss { border-left-color: var(--red); }

    @keyframes slideIn {
      from { opacity: 0; transform: translateY(8px); }
      to { opacity: 1; transform: translateY(0); }
    }

    .profile-avatar {
      position: relative;
      cursor: pointer;
      overflow: hidden;
    }
    .profile-avatar img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }
    .avatar-cam-badge {
      position: absolute;
      bottom: 0;
      right: 0;
      width: 20px;
      height: 20px;
      border-radius: 50%;
      background: #2589ff;
      color: #fff;
      font-size: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      border: 2px solid var(--bg-card);
    }

    @media (max-width: 960px) {
      .top-header {
        height: auto;
        flex-wrap: wrap;
        padding: 8px 10px;
        gap: 8px;
      }
      .header-left {
        display: contents;
      }
      .top-header .brand {
        order: 1;
        margin-right: auto;
        justify-content: flex-start;
      }
      .brand svg {
        height: 22px !important;
      }
      .auth-navbar {
        padding: 12px 12px;
        gap: 8px;
      }
      .auth-navbar .brand {
        order: 0;
        margin-right: auto;
      }
      .auth-nav-actions {
        order: 2;
        gap: 6px;
        flex-shrink: 0;
      }
      .auth-top-login, .auth-top-signup {
        padding: 7px 10px;
        font-size: 11.5px;
        white-space: nowrap;
      }
      .auth-lang {
        padding: 4px;
        font-size: 11.5px;
      }
      .header-right {
        order: 2;
        margin-left: auto;
        gap: 6px;
      }
      .asset-tabs-wrap {
        order: 3;
        width: calc(100% - 42px);
        flex: 0 0 calc(100% - 42px);
      }
      .add-asset-btn {
        order: 4;
      }
      .account-btn {
        padding: 4px 8px;
      }
      .account-balance {
        font-size: 12.5px;
      }
      .deposit-btn {
        padding: 7px 11px;
        font-size: 12px;
      }
    }

    /* Responsive Breakpoints */
    @media (max-width: 1180px) {
      .workspace {
        flex-wrap: wrap;
        overflow-y: auto;
      }
      .left-sidebar {
        height: calc(100vh - var(--header-h));
      }
      .chart-section {
        min-height: 440px;
        flex: 1 1 calc(100% - var(--sidebar-w) - var(--trade-panel-w));
      }
      .history-panel {
        width: 100%;
        height: 250px;
        border-left: none;
        border-top: 1px solid var(--border);
      }
    }

    @media (max-width: 820px) {
      .app-shell {
        height: auto;
        min-height: 100vh;
      }
      .workspace {
        flex-direction: column;
        overflow: visible;
      }
      .left-sidebar {
        width: 100%;
        height: auto;
        flex-direction: row;
        border-right: none;
        border-top: 1px solid var(--border);
        order: 4;
        padding: 6px;
        position: sticky;
        bottom: 0;
      }
      .sidebar-group {
        flex-direction: row;
        justify-content: space-around;
      }
      .chart-section {
        order: 1;
        width: 100%;
        min-height: 380px;
      }
      .trade-panel {
        order: 2;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        border-left: none;
        border-top: 1px solid var(--border);
        padding: 10px;
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 8px;
      }
      .trade-panel .control-card,
      .trade-panel .stepper-row {
        min-width: 0;
        max-width: 100%;
      }
      .trade-panel .step-input {
        width: 100%;
        min-width: 0;
      }
      .pro-ai-popup {
        width: 137px;
        min-height: 100px;
        padding: 5px 6px;
        gap: 3px;
      }
      .trade-panel .control-card {
        padding: 7px 8px;
      }
      .trade-panel .control-label {
        margin-bottom: 5px;
        font-size: 10.5px;
      }
      .trade-panel .step-btn {
        width: 28px;
        height: 32px;
        font-size: 15px;
      }
      .trade-panel .step-input {
        font-size: 13px;
      }
      .trade-panel .quick-chips {
        display: none;
      }
      .trade-panel .payout-box {
        grid-column: 1 / -1;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 6px 10px;
        text-align: left;
      }
      .trade-panel .payout-title {
        margin-bottom: 0;
        font-size: 12px;
      }
      .trade-panel .payout-value {
        font-size: 13.5px;
      }
      .trade-actions {
        grid-column: 1 / -1;
        flex-direction: row;
        gap: 8px;
      }
      .trade-actions .trade-btn {
        padding: 12px 14px;
        font-size: 14px;
      }
      .sentiment-bar-wrap {
        grid-column: 1 / -1;
        padding-top: 2px;
      }
      .history-panel {
        order: 3;
        width: 100%;
        height: 270px;
      }
      .brand-text, .brand-badge {
        display: none;
      }
      .deposit-btn span {
        display: none;
      }
      .toast-stack {
        left: 14px;
        bottom: 72px;
      }
    }
