*,
    *::before,
    *::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0
    }

    :root {
      --bg: #0B0E14;
      --bg-card: #12151E;
      --bg-side: #0A0C13;
      --bg-input: #161A24;
      --border: #232838;
      --border-hover: rgba(255, 255, 255, 0.12);
      --bhi: rgba(212, 169, 62, 0.3);
      --text: #E6E9EF;
      --muted: #7B8496;
      --dim: #4B5266;
      --accent: #D4A93E;
      --accent2: #3ec6c6;
      --green: #3FC98E;
      --red: #F0546B;
      --gold: #D4A93E;
      --silver: #B9C2D0;
      --bronze: #C97A42;
      --display: 'Space Grotesk', sans-serif;
      --body: 'Inter', sans-serif;
      --font: 'Inter', sans-serif;
      --mono: 'JetBrains Mono', monospace;
      --r: 10px;
      --sw: 76px;
      --ease: .25s cubic-bezier(0.4, 0, 0.2, 1);
    }

    [data-theme="light"] {
      --bg: #f8fafc;
      --bg-card: #ffffff;
      --bg-side: #f1f5f9;
      --bg-input: #e2e8f0;
      --border: rgba(0, 0, 0, 0.1);
      --border-hover: rgba(0, 0, 0, 0.2);
      --bhi: rgba(232, 168, 56, 0.1);
      --text: #0f172a;
      --muted: #64748b;
      --dim: #94a3b8;
    }

    html,
    body {
      background: var(--bg);
      background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
      background-size: 30px 30px;
      color: var(--text);
      font-family: var(--font);
      min-height: 100vh;
      font-size: 15px;
      line-height: 1.6
    }

    #app {
      display: flex;
      min-height: 100vh
    }

    /* ── SIDEBAR ── */
    #sidebar {
      width: var(--sw);
      background: #080A10;
      border-right: 1px solid rgba(255,255,255,0.05);
      display: flex;
      flex-direction: column;
      position: fixed;
      top: 0;
      left: 0;
      bottom: 0;
      overflow: hidden;
      z-index: 100;
      transition: transform var(--ease);
    }

    #main {
      margin-left: var(--sw);
      flex: 1;
      min-height: 100vh;
      overflow-x: hidden;
      transition: margin var(--ease);
    }

    #app.sidebar-closed #sidebar {
      transform: translateX(-100%);
    }

    #app.sidebar-closed #main {
      margin-left: 0;
    }

    #content {
      padding: 24px;
      max-width: 1600px
    }

    /* TOPBAR */
    #topbar {
      height: 56px;
      background: rgba(12, 15, 26, 0.92);
      border-bottom: 1px solid var(--border);
      display: flex;
      align-items: center;
      padding: 0 24px;
      gap: 12px;
      backdrop-filter: blur(12px);
      position: sticky;
      top: 0;
      z-index: 90;
      justify-content: space-between
    }

    .topbar-l,
    .topbar-r {
      display: flex;
      align-items: center;
      gap: 12px
    }

    #burger {
      display: none;
      background: none;
      border: none;
      color: var(--text);
      font-size: 1.3rem;
      cursor: pointer;
      padding: 4px
    }

    /* MARKET BADGE */
    .mkt-badge {
      display: flex;
      align-items: center;
      gap: 7px;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 20px;
      padding: 5px 14px;
      font-size: .8rem;
      font-weight: 600
    }

    .mkt-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      animation: pulse 2.5s ease-in-out infinite
    }

    .mkt-dot.open {
      background: var(--green);
      box-shadow: 0 0 8px rgba(52, 211, 153, 0.5)
    }

    .mkt-dot.close {
      background: var(--red);
      box-shadow: 0 0 8px rgba(251, 113, 133, 0.5);
      animation-duration: 3s
    }

    @keyframes pulse {

      0%,
      100% {
        opacity: 1;
        transform: scale(1)
      }

      50% {
        opacity: .5;
        transform: scale(1.3)
      }
    }

    .sb-logo {
      height: 56px;
      padding: 0 16px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      border-bottom: 1px solid var(--border);
    }

    .sb-logo h2 {
      font-family: var(--display);
      font-size: 1.3rem;
      color: var(--accent);
      letter-spacing: 2px
    }

    .sb-logo small {
      color: var(--muted);
      font-size: .72rem
    }

    .sb-sec {
      padding: 8px 16px 4px
    }

    .sb-sec label {
      font-size: .72rem;
      text-transform: uppercase;
      letter-spacing: 1px;
      color: var(--dim)
    }

    .sb-time {
      padding: 12px 16px;
      font-size: .78rem;
      color: var(--muted)
    }

    .sb-div {
      border: none;
      border-top: 1px solid var(--border);
      margin: 8px 16px
    }

    .sb-user {
      padding: 12px 16px;
      background: rgba(255, 255, 255, 0.03);
      margin: 8px 12px;
      border-radius: var(--r);
      border: 1px solid var(--border)
    }

    .sb-user small {
      color: var(--muted);
      font-size: .75rem;
      display: block
    }

    .sb-user .role {
      font-size: .7rem;
      color: var(--accent);
      font-family: var(--mono)
    }

    /* BUTTONS */
    .btn {
      display: block;
      width: calc(100% - 24px);
      margin: 6px 12px;
      padding: 10px 16px;
      border-radius: 8px;
      border: 1px solid var(--border-hover);
      background: rgba(255, 255, 255, 0.04);
      color: var(--text);
      cursor: pointer;
      font-family: var(--font);
      font-size: .85rem;
      font-weight: 600;
      transition: all var(--ease);
      text-align: center
    }

    .btn:hover {
      background: rgba(255, 255, 255, 0.08);
      border-color: var(--accent);
      color: var(--accent)
    }

    .btn.danger {
      border-color: rgba(251, 113, 133, .25);
      background: rgba(251, 113, 133, 0.06)
    }

    .btn.danger:hover {
      background: rgba(251, 113, 133, .12);
      border-color: var(--red)
    }

    .btn-sm {
      display: inline-block;
      width: auto;
      padding: 8px 18px;
      border-radius: 8px;
      border: 1px solid var(--border-hover);
      background: rgba(255, 255, 255, 0.04);
      color: var(--text);
      cursor: pointer;
      font-family: var(--font);
      font-size: .82rem;
      font-weight: 600;
      transition: all var(--ease)
    }

    .btn-sm:hover {
      background: rgba(255, 255, 255, 0.08);
      border-color: var(--accent)
    }

    .btn-sm.green {
      border-color: rgba(52, 211, 153, .25);
      background: rgba(52, 211, 153, 0.06)
    }

    .btn-sm.green:hover {
      background: rgba(52, 211, 153, 0.12);
      border-color: var(--green)
    }

    /* POSITION SIZER */
    .sz-box {
      padding: 12px 16px
    }

    .sz-box h5 {
      font-family: var(--display);
      font-size: .85rem;
      color: var(--accent);
      margin-bottom: 10px
    }

    .sz-row {
      margin-bottom: 10px
    }

    .sz-row label {
      font-size: .75rem;
      color: var(--muted);
      display: block;
      margin-bottom: 4px
    }

    .sz-row input[type=number],
    .sz-row input[type=range] {
      width: 100%;
      background: var(--bg-input);
      border: 1px solid var(--border);
      border-radius: 6px;
      color: var(--text);
      padding: 6px 10px;
      font-family: var(--font);
      font-size: .85rem
    }

    .sz-row input[type=range] {
      padding: 4px 0;
      cursor: pointer
    }

    .sz-result {
      background: var(--bg-input);
      border-radius: 8px;
      padding: 10px;
      margin-top: 8px;
      text-align: center
    }

    .sz-result .lots {
      font-size: 1.4rem;
      font-weight: 700;
      color: var(--accent)
    }

    .sz-result small {
      color: var(--muted);
      font-size: .75rem
    }

    /* ALERTS */
    .alert-gold {
      background: rgba(232, 168, 56, 0.08);
      border: 1px solid rgba(232, 168, 56, 0.25);
      border-radius: var(--r);
      padding: 14px 20px;
      margin-bottom: 16px;
    }

    .alert-bear {
      background: rgba(251, 113, 133, 0.08);
      border: 1px solid rgba(251, 113, 133, 0.25);
      border-radius: var(--r);
      padding: 14px 20px;
      margin-bottom: 16px;
    }

    @keyframes gGold {

      0%,
      100% {
        box-shadow: 0 0 8px rgba(232, 168, 56, 0.2)
      }

      50% {
        box-shadow: 0 0 16px rgba(232, 168, 56, 0.35)
      }
    }

    @keyframes gRed {

      0%,
      100% {
        box-shadow: 0 0 8px rgba(251, 113, 133, 0.2)
      }

      50% {
        box-shadow: 0 0 16px rgba(251, 113, 133, 0.35)
      }
    }

    .alert-title {
      font-size: 1rem;
      font-weight: 700;
      margin-bottom: 4px
    }

    .alert-sub {
      font-size: .82rem;
      opacity: .85
    }

    /* AI BRIEF */
    .ai-brief {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-left: 3px solid var(--accent2);
      border-radius: var(--r);
      padding: 20px 24px;
      margin-bottom: 24px;
    }

    .ai-brief h4 {
      font-family: var(--display);
      color: var(--accent2);
      font-size: 1rem;
      margin-bottom: 10px
    }

    .ai-brief p {
      color: var(--muted);
      font-size: .88rem;
      line-height: 1.7
    }

    /* METRIC GRID */
    .metric-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
      gap: 10px;
      margin-bottom: 20px
    }

    .mc {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--r);
      padding: 14px 16px;
      transition: all var(--ease)
    }

    .mc:hover {
      transform: translateY(-2px);
      border-color: var(--border-hover);
      background: rgba(25, 30, 53, 0.9)
    }

    .mc .lbl {
      font-size: .72rem;
      color: var(--dim);
      text-transform: uppercase;
      letter-spacing: .5px;
      margin-bottom: 4px
    }

    .mc .val {
      font-size: 1rem;
      font-weight: 700;
      color: var(--text)
    }

    .mc .dlt {
      font-size: .78rem;
      font-weight: 600;
      margin-top: 2px
    }

    .up {
      color: var(--green)
    }

    .down {
      color: var(--red)
    }

    /* PODIUM */
    .pod-wrap {
      background: rgba(19, 22, 42, 0.6);
      border: 1px solid var(--border);
      border-radius: 16px;
      padding: 24px;
      margin-bottom: 24px;
      text-align: center;
    }

    .pod-title {
      font-size: .9rem;
      color: var(--accent);
      letter-spacing: 3px;
      text-transform: uppercase;
      margin-bottom: 20px;
      font-weight: 600
    }

    .pod-flex {
      display: flex;
      justify-content: center;
      align-items: flex-end;
      gap: 16px
    }

    .pod-card {
      background: var(--bg-card);
      border-radius: 12px;
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      padding: 20px 14px;
      border: 1px solid var(--border);
      transition: all var(--ease)
    }

    .pod-card:hover {
      transform: translateY(-6px);
      border-color: var(--border-hover)
    }

    .pod-1 {
      height: 380px;
      border-top: 2px solid var(--gold);
      min-width: 180px
    }

    .pod-2 {
      height: 330px;
      border-top: 2px solid var(--silver);
      min-width: 150px
    }

    .pod-3 {
      height: 300px;
      border-top: 2px solid var(--bronze);
      min-width: 150px
    }

    .pod-icon {
      font-size: 2.2rem;
      margin-bottom: 8px
    }

    .pod-1 .pod-icon {
      font-size: 3rem
    }

    .pod-name {
      font-size: 1.2rem;
      font-weight: 700;
      color: var(--text);
      margin-bottom: 6px
    }

    .pod-1 .pod-name {
      font-size: 1.5rem;
      color: var(--gold)
    }

    .pod-score {
      background: rgba(255, 255, 255, 0.05);
      border-radius: 20px;
      padding: 3px 12px;
      font-size: .8rem;
      color: var(--muted);
      font-weight: 600
    }

    .pod-tag {
      font-size: .68rem;
      color: var(--dim);
      text-transform: uppercase;
      letter-spacing: .8px;
      margin-top: 6px
    }

    /* CHART GRID */
    .chart-row {
      display: grid;
      grid-template-columns: 3fr 1fr;
      gap: 16px;
      margin-bottom: 20px
    }

    .card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--r);
      padding: 16px;
    }

    .card h4 {
      font-family: var(--display);
      font-size: .85rem;
      color: var(--accent);
      margin-bottom: 12px;
      text-transform: uppercase;
      letter-spacing: 1.5px;
      font-weight: 600
    }

    /* SECTOR */
    .sec-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
      gap: 8px;
      margin-bottom: 20px
    }

    .sec-card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--r);
      padding: 10px 6px;
      text-align: center;
      transition: all var(--ease);
      cursor: default
    }

    .sec-card:hover {
      transform: scale(1.04);
      border-color: var(--border-hover);
      background: var(--bg-input)
    }

    .sec-name {
      font-size: .68rem;
      color: var(--dim);
      margin-bottom: 3px
    }

    .sec-price {
      font-size: .88rem;
      font-weight: 700
    }

    .sec-chg {
      font-size: .75rem;
      font-weight: 600
    }

    /* CUSTOM SECTOR GRID */
    .sec-grid-custom {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
      gap: 12px;
    }

    .sec-card-new {
      padding: 14px 10px;
      border-radius: 12px;
      border: 1px solid var(--border);
      text-align: center;
      transition: all var(--ease);
      background: var(--bg-card);
      position: relative;
      overflow: hidden;
    }

    .sec-card-new:hover {
      transform: translateY(-3px);
      box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
      border-color: var(--border-hover);
    }

    .sec-card-new .sec-name {
      font-size: 0.72rem;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 0.5px;
      margin-bottom: 6px;
    }

    .sec-card-new .sec-pct {
      font-size: 1.4rem;
      font-weight: 700;
      letter-spacing: -0.5px;
    }

    .sec-card-btn {
      cursor: pointer;
      border: 1px dashed var(--accent);
      background: rgba(232, 168, 56, 0.05);
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
    }

    .sec-card-btn:hover {
      background: rgba(232, 168, 56, 0.15);
      border-style: solid;
    }

    .sec-card-btn .sec-icon {
      font-size: 1.8rem;
    }

    /* HEATMAP MODAL */
    #heatmap-modal {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(12, 15, 26, 0.95);
      backdrop-filter: blur(8px);
      z-index: 999;
      justify-content: center;
      align-items: center;
      flex-direction: column;
    }

    .heatmap-modal-content {
      width: 90%;
      height: 90%;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 16px;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    }

    .heatmap-modal-header {
      padding: 16px 24px;
      border-bottom: 1px solid var(--border);
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .heatmap-modal-header h3 {
      font-family: var(--display);
      color: var(--accent);
      font-size: 1.1rem;
      text-transform: uppercase;
      letter-spacing: 1px;
    }

    .heatmap-modal-close {
      background: none;
      border: none;
      color: var(--text);
      font-size: 1.5rem;
      cursor: pointer;
      transition: color var(--ease);
    }

    .heatmap-modal-close:hover {
      color: var(--red);
    }

    .heatmap-modal-body {
      flex: 1;
      width: 100%;
    }

    /* TABS */
    .tabs {
      display: flex;
      border-bottom: 1px solid var(--border);
      margin-bottom: 20px;
      overflow-x: auto;
      gap: 4px
    }

    .tab {
      padding: 10px 20px;
      font-size: .83rem;
      font-weight: 600;
      color: var(--dim);
      cursor: pointer;
      border-bottom: 2px solid transparent;
      transition: all var(--ease);
      white-space: nowrap;
      background: none;
      border-top: none;
      border-left: none;
      border-right: none;
      font-family: var(--font)
    }

    .tab.active {
      color: var(--accent);
      border-bottom-color: var(--accent)
    }

    .tab:hover:not(.active) {
      color: var(--text)
    }

    @keyframes fadeIn {
      from {
        opacity: 0;
        transform: translateY(5px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .tab-panel {
      display: none
    }

    .tab-panel.active {
      display: block;
      animation: fadeIn 0.4s ease-out forwards;
    }

    /* TABLE */
    .tbl-wrap {
      overflow-x: auto
    }

    table {
      width: 100%;
      border-collapse: collapse;
      font-size: .82rem
    }

    th {
      color: var(--dim);
      font-weight: 600;
      padding: 10px 12px;
      text-align: left;
      border-bottom: 1px solid var(--border);
      white-space: nowrap;
      font-size: .72rem;
      text-transform: uppercase;
      letter-spacing: .8px
    }

    td {
      padding: 10px 12px;
      border-bottom: 1px solid var(--border);
      color: var(--text);
      white-space: nowrap
    }

    tr:hover td {
      background: rgba(255, 255, 255, 0.02)
    }

    .tier-badge {
      display: inline-block;
      padding: 2px 10px;
      border-radius: 20px;
      font-size: .72rem;
      font-weight: 700
    }

    .tier-GOLD {
      background: rgba(232, 168, 56, .12);
      color: var(--gold);
      border: 1px solid rgba(232, 168, 56, .3)
    }

    .tier-SILVER {
      background: rgba(168, 173, 184, .1);
      color: var(--silver);
      border: 1px solid rgba(168, 173, 184, .25)
    }

    .tier-BRONZE {
      background: rgba(196, 129, 58, .1);
      color: var(--bronze);
      border: 1px solid rgba(196, 129, 58, .25)
    }

    /* STOCK HEADER */
    .stk-hdr {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 20px 24px;
      margin-bottom: 16px
    }

    .stk-name {
      font-size: 2rem;
      font-weight: 700
    }

    .badge-row {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      margin-top: 10px
    }

    .badge {
      border-radius: 20px;
      padding: 3px 14px;
      font-size: .75rem;
      font-weight: 600;
      border: 1px solid
    }

    .w52-label {
      display: flex;
      justify-content: space-between;
      font-size: .72rem;
      color: var(--dim);
      margin: 14px 0 4px
    }

    .w52-bar {
      background: var(--bg-input);
      border-radius: 999px;
      height: 6px;
      overflow: hidden
    }

    .w52-fill {
      background: linear-gradient(90deg, var(--accent2), var(--accent));
      height: 100%;
      border-radius: 999px;
      transition: width .5s ease
    }

    .bandar-card {
      border-radius: 12px;
      padding: 16px 20px;
      margin-bottom: 16px;
      border-left-width: 3px;
      border-left-style: solid
    }

    .bandar-title {
      font-size: .95rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 1px
    }

    .bandar-desc {
      font-size: .85rem;
      color: var(--muted);
      line-height: 1.6;
      margin-top: 6px
    }

    .tech-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 12px;
      margin-top: 12px
    }

    .tech-card {
      background: var(--bg-input);
      border-radius: var(--r);
      padding: 14px;
      text-align: center;
      border: 1px solid var(--border)
    }

    .tech-card small {
      color: var(--dim);
      font-size: .72rem;
      display: block;
      margin-bottom: 4px
    }

    .tech-card .val {
      font-size: 1.4rem;
      font-weight: 700
    }

    /* INTRADAY */
    .intra-card {
      background: var(--bg-card);
      border-radius: 12px;
      padding: 24px;
      margin-bottom: 16px;
      text-align: center;
      border: 1px solid var(--border)
    }

    .intra-sig {
      font-size: 3.5rem;
      font-weight: 900;
      letter-spacing: 4px;
      line-height: 1.1
    }

    .intra-meta {
      display: flex;
      justify-content: center;
      gap: 24px;
      margin-top: 12px
    }

    .intra-meta div small {
      color: var(--dim);
      font-size: .8rem;
      display: block
    }

    .intra-meta div span {
      font-size: 1.2rem;
      font-weight: 700
    }

    .intra-sep {
      border-left: 1px solid var(--border)
    }

    .plan-grid {
      display: grid;
      grid-template-columns: 1.3fr 1fr;
      gap: 14px;
      margin-bottom: 16px
    }

    .plan-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      background: var(--bg-input);
      border-radius: 8px;
      padding: 10px 14px;
      margin-bottom: 8px;
      border-left-width: 3px;
      border-left-style: solid
    }

    .plan-row .lp {
      color: var(--muted);
      font-size: .82rem
    }

    .plan-row .vp {
      font-weight: 700;
      font-size: .92rem
    }

    .lvl-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      background: var(--bg-input);
      border-radius: 8px;
      padding: 10px 14px;
      margin-bottom: 8px;
      border: 1px solid var(--border)
    }

    /* SCAN PROGRESS */
    .scan-progress {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 20px;
      margin-bottom: 16px;
      text-align: center
    }

    .scan-progress .sp-icon {
      font-size: 2rem;
      animation: spin .8s linear infinite;
      display: inline-block
    }

    @keyframes spin {
      to {
        transform: rotate(360deg)
      }
    }

    /* NEWS */
    .news-card {
      background: var(--bg-card);
      border-radius: var(--r);
      padding: 12px;
      margin-bottom: 10px;
      border-left: 3px solid var(--accent2);
      transition: all var(--ease)
    }

    .news-card:hover {
      background: var(--bg-input);
      border-left-width: 4px
    }

    .news-card a {
      color: var(--text);
      text-decoration: none;
      font-weight: 600;
      font-size: .83rem;
      line-height: 1.4;
      display: block;
      margin-bottom: 4px
    }

    .news-card a:hover {
      color: var(--accent)
    }

    .news-card small {
      color: var(--dim);
      font-size: .72rem
    }

    /* LOGIN */
    #login-overlay {
      position: fixed;
      inset: 0;
      background: var(--bg);
      z-index: 9999;
      display: flex;
      align-items: center;
      justify-content: center
    }

    .login-box {
      background: var(--bg-card);
      border: 1px solid var(--border-hover);
      border-radius: 16px;
      padding: 40px;
      width: 100%;
      max-width: 380px;
      box-shadow: 0 20px 60px rgba(0, 0, 0, .5)
    }

    .login-box h1 {
      font-family: var(--display);
      text-align: center;
      font-size: 1.3rem;
      color: var(--accent);
      letter-spacing: 2px;
      margin-bottom: 6px
    }

    .login-box p {
      text-align: center;
      color: var(--muted);
      font-size: .82rem;
      margin-bottom: 28px
    }

    .fr {
      margin-bottom: 16px
    }

    .fr label {
      font-size: .8rem;
      color: var(--muted);
      display: block;
      margin-bottom: 6px
    }

    .fr input {
      width: 100%;
      background: var(--bg-input);
      border: 1px solid var(--border);
      border-radius: 8px;
      color: var(--text);
      padding: 10px 14px;
      font-family: var(--font);
      font-size: .9rem;
      transition: border-color var(--ease)
    }

    .fr input:focus {
      outline: none;
      border-color: var(--accent)
    }

    .login-btn {
      width: 100%;
      padding: 12px;
      background: var(--accent);
      color: #0c0f1a;
      border: none;
      border-radius: 8px;
      font-family: var(--font);
      font-weight: 700;
      font-size: .95rem;
      cursor: pointer;
      transition: all var(--ease);
      margin-top: 6px
    }

    .login-btn:hover {
      background: #d4962f;
      box-shadow: 0 0 20px rgba(232, 168, 56, 0.25)
    }

    .login-err {
      color: var(--red);
      font-size: .8rem;
      margin-top: 8px;
      text-align: center;
      min-height: 20px
    }

    /* VITALS */
    .vitals-box {
      background: var(--bg-input);
      border-radius: var(--r);
      padding: 14px;
      border: 1px solid var(--border);
      margin-top: 12px
    }

    .vit-row {
      display: flex;
      justify-content: space-between;
      margin-bottom: 8px;
      font-size: .8rem
    }

    .vit-row:last-child {
      margin-bottom: 0
    }

    .vit-row .vl {
      color: var(--muted)
    }

    /* SELECT / Input */
    select,
    textarea.broadcast {
      width: 100%;
      background: var(--bg-input);
      border: 1px solid var(--border);
      border-radius: 8px;
      color: var(--text);
      padding: 8px 12px;
      font-family: var(--font);
      font-size: .83rem;
      cursor: pointer
    }

    textarea.broadcast {
      min-height: 100px;
      resize: vertical;
      margin-bottom: 8px;
      padding: 10px 14px
    }

    .search-row {
      display: flex;
      gap: 8px;
      margin-bottom: 16px
    }

    .search-row input {
      flex: 1;
      background: var(--bg-input);
      border: 1px solid var(--border);
      border-radius: 8px;
      color: var(--text);
      padding: 10px 14px;
      font-family: var(--font);
      font-size: .9rem
    }

    .search-row input:focus {
      outline: none;
      border-color: var(--accent)
    }

    .search-row button {
      background: var(--accent);
      border: none;
      border-radius: 8px;
      color: #0c0f1a;
      padding: 10px 18px;
      font-family: var(--font);
      font-weight: 700;
      cursor: pointer;
      font-size: .85rem;
      white-space: nowrap;
      transition: all var(--ease)
    }

    .search-row button:hover {
      background: #d4962f
    }

    .loading {
      display: inline-block;
      width: 14px;
      height: 14px;
      border: 2px solid rgba(232, 168, 56, .25);
      border-top-color: var(--accent);
      border-radius: 50%;
      animation: spin .7s linear infinite;
      vertical-align: middle;
      margin-right: 6px
    }

    .tradingview-iframe {
      border: none;
      width: 100%;
      height: 400px;
      border-radius: 8px
    }

    /* PORTO */
    .porto-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
      gap: 12px
    }

    .porto-card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--r);
      padding: 16px;
      transition: border-color var(--ease)
    }

    .porto-card:hover {
      border-color: var(--border-hover)
    }

    .porto-card h4 {
      font-family: var(--display);
      color: var(--accent);
      margin-bottom: 8px
    }

    .porto-card p {
      font-size: .85rem;
      margin: 3px 0
    }

    .porto-card .avg {
      color: var(--muted);
      font-size: .8rem
    }

    /* EXTRA INDICATORS ROW */
    .ind-row {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
      gap: 8px;
      margin: 12px 0
    }

    .ind-box {
      background: var(--bg-input);
      border-radius: 8px;
      padding: 10px;
      text-align: center;
      border: 1px solid var(--border)
    }

    .ind-box small {
      color: var(--dim);
      font-size: .68rem;
      display: block;
      margin-bottom: 2px
    }

    .ind-box span {
      font-size: .95rem;
      font-weight: 700
    }

    /* TOGGLE SWITCH */
    .switch {
      position: relative;
      display: inline-block;
      width: 34px;
      height: 20px;
    }

    .switch input {
      opacity: 0;
      width: 0;
      height: 0;
    }

    .slider {
      position: absolute;
      cursor: pointer;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background-color: var(--dim);
      transition: .4s;
      border-radius: 20px;
    }

    .slider:before {
      position: absolute;
      content: "";
      height: 14px;
      width: 14px;
      left: 3px;
      bottom: 3px;
      background-color: white;
      transition: .4s;
      border-radius: 50%;
    }

    input:checked+.slider {
      background-color: var(--accent);
    }

    input:checked+.slider:before {
      transform: translateX(14px);
    }

    /* SUMMARY PORTFOLIO */
    .porto-summary {
      background: rgba(255, 255, 255, 0.02);
      border: 1px solid var(--border);
      border-radius: var(--r);
      padding: 16px;
      margin-bottom: 20px;
      display: flex;
      gap: 24px;
      flex-wrap: wrap;
    }

    .porto-summary div {
      flex: 1;
      min-width: 120px;
    }

    .porto-summary small {
      color: var(--muted);
      font-size: 0.75rem;
      text-transform: uppercase;
    }

    .porto-summary .val {
      font-size: 1.2rem;
      font-weight: 700;
    }

    /* FILTER SCREENER */
    .filter-bar {
      display: flex;
      gap: 10px;
      margin-bottom: 16px;
      flex-wrap: wrap;
    }

    .filter-bar input,
    .filter-bar select {
      background: var(--bg-input);
      border: 1px solid var(--border);
      color: var(--text);
      padding: 8px 12px;
      border-radius: 6px;
      font-size: 0.8rem;
    }

    /* ── ADMIN PANEL ── */
    .admin-tabs {
      display: flex;
      gap: 4px;
      overflow-x: auto;
      padding-bottom: 8px;
      margin-bottom: 20px;
      border-bottom: 1px solid var(--border);
      flex-wrap: wrap;
    }

    .admin-tab {
      padding: 8px 14px;
      font-size: .78rem;
      font-weight: 600;
      color: var(--dim);
      cursor: pointer;
      border: 1px solid transparent;
      border-radius: 8px;
      background: none;
      font-family: var(--font);
      white-space: nowrap;
      transition: all var(--ease);
    }

    .admin-tab.active {
      color: var(--accent);
      background: rgba(232, 168, 56, 0.08);
      border-color: rgba(232, 168, 56, 0.25);
    }

    .admin-tab:hover:not(.active) {
      color: var(--text);
      background: rgba(255, 255, 255, 0.04);
    }

    .admin-sub {
      display: none;
    }

    .admin-sub.active {
      display: block;
      animation: fadeIn 0.3s ease-out;
    }

    .adm-card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 20px;
      margin-bottom: 16px;
    }

    .adm-card h5 {
      font-family: var(--display);
      font-size: .9rem;
      color: var(--accent);
      margin-bottom: 14px;
      text-transform: uppercase;
      letter-spacing: 1px;
    }

    .health-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 12px;
      margin-bottom: 16px;
    }

    .health-item {
      background: var(--bg-input);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 16px;
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .health-icon {
      font-size: 1.8rem;
    }

    .health-info .h-label {
      font-size: .72rem;
      color: var(--dim);
      text-transform: uppercase;
    }

    .health-info .h-val {
      font-size: 1.1rem;
      font-weight: 700;
    }

    .status-dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      display: inline-block;
      margin-right: 6px;
    }

    .status-dot.online {
      background: var(--green);
      box-shadow: 0 0 6px rgba(52, 211, 153, 0.5);
    }

    .status-dot.offline {
      background: var(--red);
      box-shadow: 0 0 6px rgba(251, 113, 133, 0.5);
    }

    .adm-form-row {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
      gap: 10px;
      margin-bottom: 12px;
    }

    .adm-form-row label {
      font-size: .75rem;
      color: var(--muted);
      display: block;
      margin-bottom: 4px;
    }

    .adm-form-row input,
    .adm-form-row select {
      width: 100%;
      background: var(--bg-input);
      border: 1px solid var(--border);
      border-radius: 6px;
      color: var(--text);
      padding: 8px 12px;
      font-family: var(--font);
      font-size: .85rem;
    }

    .adm-form-row input:focus,
    .adm-form-row select:focus {
      outline: none;
      border-color: var(--accent);
    }

    .rule-card {
      background: var(--bg-input);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 14px;
      margin-bottom: 10px;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .rule-card .rule-info {
      flex: 1;
    }

    .rule-card .rule-name {
      font-weight: 700;
      font-size: .88rem;
      margin-bottom: 2px;
    }

    .rule-card .rule-desc {
      font-size: .78rem;
      color: var(--muted);
    }

    .stat-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
      gap: 12px;
      margin-bottom: 20px;
    }

    .stat-card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 20px;
      text-align: center;
    }

    .stat-card .stat-num {
      font-size: 2rem;
      font-weight: 900;
      color: var(--accent);
    }

    .stat-card .stat-label {
      font-size: .72rem;
      color: var(--dim);
      text-transform: uppercase;
      letter-spacing: .5px;
      margin-top: 4px;
    }

    .perf-bar-wrap {
      background: var(--bg-input);
      border-radius: 20px;
      height: 8px;
      overflow: hidden;
      margin-top: 6px;
    }

    .perf-bar-fill {
      height: 100%;
      border-radius: 20px;
      transition: width .5s ease;
    }

    .api-key-display {
      background: var(--bg-input);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 10px 14px;
      font-family: var(--mono);
      font-size: .82rem;
      color: var(--accent);
      word-break: break-all;
      margin-bottom: 8px;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .announce-preview {
      background: linear-gradient(90deg, rgba(232, 168, 56, 0.12), rgba(62, 198, 198, 0.08));
      border: 1px solid rgba(232, 168, 56, 0.3);
      border-radius: 10px;
      padding: 14px 20px;
      margin-top: 12px;
      font-size: .88rem;
    }

    .announce-preview .a-title {
      font-weight: 700;
      color: var(--accent);
      margin-bottom: 4px;
    }

    .announce-active-banner {
      background: linear-gradient(90deg, rgba(232, 168, 56, 0.1), rgba(62, 198, 198, 0.06));
      border: 1px solid rgba(232, 168, 56, 0.2);
      border-radius: var(--r);
      padding: 12px 20px;
      margin-bottom: 16px;
      display: flex;
      align-items: center;
      gap: 10px;
      font-size: .85rem;
    }

    .announce-active-banner .a-icon {
      font-size: 1.2rem;
    }

    .log-entry {
      display: flex;
      gap: 12px;
      padding: 10px 14px;
      border-bottom: 1px solid var(--border);
      font-size: .82rem;
      align-items: center;
    }

    .log-entry:hover {
      background: rgba(255, 255, 255, 0.02);
    }

    .log-time {
      color: var(--dim);
      font-family: var(--mono);
      font-size: .75rem;
      min-width: 140px;
    }

    .log-action {
      flex: 1;
    }

    .log-badge {
      padding: 2px 10px;
      border-radius: 20px;
      font-size: .7rem;
      font-weight: 700;
    }

    .log-badge.login {
      background: rgba(52, 211, 153, 0.1);
      color: var(--green);
    }

    .log-badge.analyze {
      background: rgba(56, 189, 248, 0.1);
      color: #38bdf8;
    }

    .log-badge.admin {
      background: rgba(232, 168, 56, 0.1);
      color: var(--accent);
    }

    .log-badge.error {
      background: rgba(251, 113, 133, 0.1);
      color: var(--red);
    }

    .backtest-upload {
      border: 2px dashed var(--border);
      border-radius: 12px;
      padding: 40px;
      text-align: center;
      cursor: pointer;
      transition: all var(--ease);
    }

    .backtest-upload:hover {
      border-color: var(--accent);
      background: rgba(232, 168, 56, 0.03);
    }

    .perf-tier-row {
      display: grid;
      grid-template-columns: 100px 1fr 80px 80px;
      gap: 12px;
      padding: 12px 14px;
      align-items: center;
      border-bottom: 1px solid var(--border);
    }

    .perf-tier-row:first-child {
      border-bottom: 1px solid var(--border);
      font-size: .72rem;
      color: var(--dim);
      text-transform: uppercase;
    }

    /* RESPONSIVE */
    @media(max-width:768px) {
      #sidebar {
        transform: translateX(-100%)
      }

      #sidebar.open {
        transform: translateX(0)
      }

      #main {
        margin-left: 0
      }

      #burger {
        display: block
      }

      #btn-toggle-sidebar {
        display: none
      }

      .chart-row {
        grid-template-columns: 1fr
      }

      .pod-flex {
        flex-direction: column;
        align-items: center
      }

      .pod-1,
      .pod-2,
      .pod-3 {
        width: 100%;
        max-width: 280px;
        height: auto;
        min-height: 120px
      }

      .metric-grid {
        grid-template-columns: repeat(2, 1fr)
      }

      .plan-grid {
        grid-template-columns: 1fr
      }

      .tech-grid {
        grid-template-columns: repeat(2, 1fr)
      }

      .admin-tabs {
        gap: 2px;
      }

      .admin-tab {
        padding: 6px 10px;
        font-size: .72rem;
      }

      .health-grid {
        grid-template-columns: 1fr 1fr;
      }

      .stat-grid {
        grid-template-columns: repeat(2, 1fr);
      }

      .perf-tier-row {
        grid-template-columns: 80px 1fr 60px 60px;
        font-size: .78rem;
      }

      /* Tambahan Optimasi Mobile */
      body {
        font-size: 13px;
      }

      #content {
        padding: 12px;
      }

      .card {
        padding: 16px;
        margin-bottom: 16px;
      }

      #topbar {
        flex-wrap: wrap;
        height: auto;
        padding: 12px;
      }

      .topbar-r {
        width: 100%;
        justify-content: space-between;
        margin-top: 12px;
      }

      #pod-wrap>div {
        flex-direction: column !important;
        gap: 16px;
      }

      #pod-wrap>div>div {
        width: 100%;
        min-width: unset !important;
      }

      .table-wrap,
      table,
      .table-container,
      .sec-grid-custom {
        display: block !important;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
      }

      th,
      td {
        font-size: 0.75rem;
        padding: 8px 6px;
        white-space: nowrap;
      }

      .tradingview-widget-container {
        height: 360px !important;
      }

      .card[style*="height: 480px;"] {
        height: 410px !important;
      }
    }

    /* ══════════════════════════════════════════
       PREMIUM OVERHAUL — GLOBAL DESIGN SYSTEM
    ══════════════════════════════════════════ */

    /* 1. CUSTOM SCROLLBAR */
    ::-webkit-scrollbar { width: 4px; height: 4px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb { background: rgba(212,169,62,0.25); border-radius: 99px; }
    ::-webkit-scrollbar-thumb:hover { background: rgba(212,169,62,0.5); }

    /* 2. TICKER TAPE — premium */
    .ticker-wrap {
      background: rgba(8,10,16,0.95);
      border-bottom: 1px solid rgba(255,255,255,0.05);
      height: 36px;
      overflow: hidden;
      display: flex;
      align-items: center;
    }
    .ticker-move {
      display: flex;
      gap: 0;
      animation: ticker-scroll 60s linear infinite;
      white-space: nowrap;
      align-items: center;
      height: 100%;
    }
    .ticker-move:hover { animation-play-state: paused; }
    @keyframes ticker-scroll {
      0%   { transform: translateX(0); }
      100% { transform: translateX(-50%); }
    }
    .t-item {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 0 20px;
      font-size: 0.72rem;
      font-family: var(--mono);
      font-weight: 600;
      letter-spacing: 0.03em;
      border-right: 1px solid rgba(255,255,255,0.07);
      height: 100%;
      color: #8896a8;
    }
    .t-lbl { color: #5a6478; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.06em; }
    .t-val { color: #c0c8d8; }
    .t-val .up   { color: #3FC98E; font-size: 0.68rem; }
    .t-val .down { color: #F0546B; font-size: 0.68rem; }

    /* 3. SECTION HEADERS */
    .sec-hdr {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 16px;
      padding-bottom: 12px;
      border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    .sec-hdr-bar {
      width: 3px;
      height: 18px;
      border-radius: 2px;
      background: linear-gradient(180deg, var(--gold), rgba(212,169,62,0.3));
      flex-shrink: 0;
    }
    .sec-hdr h3, .sec-hdr h4 {
      font-family: var(--display);
      font-size: 0.82rem;
      font-weight: 700;
      color: var(--text);
      text-transform: uppercase;
      letter-spacing: 1.5px;
      margin: 0;
    }
    .sec-hdr-count {
      margin-left: auto;
      font-size: 0.68rem;
      color: var(--muted);
      font-family: var(--mono);
      background: rgba(255,255,255,0.04);
      padding: 2px 8px;
      border-radius: 20px;
      border: 1px solid rgba(255,255,255,0.06);
    }

    /* 4. TIER BADGES — premium chip */
    .tier-badge {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 3px 10px;
      border-radius: 6px;
      font-size: 0.65rem;
      font-weight: 800;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      position: relative;
      overflow: hidden;
    }
    .tier-GOLD {
      background: linear-gradient(135deg, rgba(212,169,62,0.2), rgba(255,210,90,0.08));
      color: #f0c84a;
      border: 1px solid rgba(212,169,62,0.4);
      text-shadow: 0 0 12px rgba(212,169,62,0.5);
    }
    .tier-SILVER {
      background: linear-gradient(135deg, rgba(185,194,208,0.15), rgba(185,194,208,0.05));
      color: #c8d0dc;
      border: 1px solid rgba(185,194,208,0.25);
    }
    .tier-BRONZE {
      background: linear-gradient(135deg, rgba(201,122,66,0.15), rgba(201,122,66,0.05));
      color: #d4915a;
      border: 1px solid rgba(201,122,66,0.25);
    }

    /* 5. TABLE — premium row design */
    table { width: 100%; border-collapse: collapse; font-size: .82rem; }
    th {
      color: #4a5470;
      font-weight: 700;
      padding: 10px 14px;
      text-align: left;
      border-bottom: 1px solid rgba(255,255,255,0.05);
      white-space: nowrap;
      font-size: .65rem;
      text-transform: uppercase;
      letter-spacing: 1px;
      background: rgba(0,0,0,0.2);
    }
    td {
      padding: 11px 14px;
      border-bottom: 1px solid rgba(255,255,255,0.04);
      color: var(--text);
      white-space: nowrap;
      transition: background 0.15s ease;
    }
    tr:hover td {
      background: rgba(212,169,62,0.04);
    }
    tbody tr:last-child td { border-bottom: none; }

    /* 6. METRIC CARDS — premium accent */
    .mc {
      background: var(--bg-card);
      border: 1px solid rgba(255,255,255,0.05);
      border-left: 3px solid rgba(212,169,62,0.3);
      border-radius: var(--r);
      padding: 16px;
      transition: all 0.2s ease;
      position: relative;
      overflow: hidden;
    }
    .mc::after {
      content: '';
      position: absolute;
      top: 0; right: 0; bottom: 0;
      width: 40%;
      background: linear-gradient(90deg, transparent, rgba(212,169,62,0.015));
      pointer-events: none;
    }
    .mc:hover {
      transform: translateY(-2px);
      border-left-color: var(--gold);
      box-shadow: 0 4px 20px rgba(0,0,0,0.3), -2px 0 12px rgba(212,169,62,0.1);
    }
    .mc .lbl {
      font-size: .65rem;
      color: #4a5470;
      text-transform: uppercase;
      letter-spacing: 1px;
      margin-bottom: 6px;
      font-weight: 700;
    }
    .mc .val { font-size: 1.1rem; font-weight: 800; color: var(--text); }
    .mc .dlt { font-size: .75rem; font-weight: 600; margin-top: 3px; }

    /* 7. AI BRIEF — hero card */
    .ai-brief {
      background: linear-gradient(135deg, rgba(15,18,30,0.95) 0%, rgba(20,24,40,0.95) 100%);
      border: 1px solid rgba(62,198,198,0.2);
      border-radius: 14px;
      padding: 22px 26px;
      margin-bottom: 24px;
      position: relative;
      overflow: hidden;
    }
    .ai-brief::before {
      content: '';
      position: absolute;
      top: -40px; right: -40px;
      width: 160px; height: 160px;
      background: radial-gradient(circle, rgba(62,198,198,0.08) 0%, transparent 70%);
      pointer-events: none;
    }
    .ai-brief h4 {
      font-family: var(--display);
      color: var(--accent2);
      font-size: 0.72rem;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 2px;
      margin-bottom: 12px;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .ai-brief h4::before {
      content: '';
      display: inline-block;
      width: 6px; height: 6px;
      background: var(--accent2);
      border-radius: 50%;
      box-shadow: 0 0 8px var(--accent2);
      animation: pulse 2s ease-in-out infinite;
    }
    .ai-brief p, #ai-brief-txt {
      color: #9aa3b8;
      font-size: .88rem;
      line-height: 1.75;
    }
    
    /* 7a. AI BRIEF MARKDOWN STYLES */
    .ai-brief-content {
      font-size: 0.95rem; 
      line-height: 1.7; 
      color: var(--text); 
      letter-spacing: 0.3px;
    }
    .ai-brief-content h1, 
    .ai-brief-content h2, 
    .ai-brief-content h3 {
      color: var(--accent);
      margin: 1.5em 0 0.5em 0;
      padding-bottom: 6px;
      border-bottom: 1px solid rgba(62, 198, 198, 0.2);
    }
    .ai-brief-content h1 { font-size: 1.4rem; color: white; border-bottom: none; }
    .ai-brief-content h2 { font-size: 1.2rem; }
    .ai-brief-content h3 { font-size: 1.1rem; border-bottom: 1px solid rgba(62, 198, 198, 0.1); }
    .ai-brief-content p {
      margin-bottom: 1em;
      color: #cbd5e1;
    }
    .ai-brief-content strong {
      color: white;
      font-weight: 700;
    }
    .ai-brief-content ul {
      margin: 1em 0;
      padding-left: 20px;
    }
    .ai-brief-content li {
      margin-bottom: 8px;
      color: #cbd5e1;
    }
    .ai-brief-content li::marker {
      color: var(--accent);
      font-size: 1.1em;
    }
    .ai-brief-content hr {
      border: none;
      border-top: 1px dashed rgba(255, 255, 255, 0.15);
      margin: 1.5em 0;
    }
    /* 8. LOADING SKELETON */
    @keyframes shimmer {
      0%   { background-position: -600px 0; }
      100% { background-position: 600px 0; }
    }
    .skeleton {
      background: linear-gradient(90deg,
        rgba(255,255,255,0.03) 0%,
        rgba(255,255,255,0.07) 40%,
        rgba(255,255,255,0.03) 80%
      );
      background-size: 600px 100%;
      animation: shimmer 1.6s ease-in-out infinite;
      border-radius: 6px;
    }
    .skel-row   { height: 40px; margin-bottom: 8px; border-radius: 8px; }
    .skel-text  { height: 12px; margin-bottom: 6px; border-radius: 4px; }
    .skel-card  { height: 80px; margin-bottom: 12px; border-radius: 12px; }

    /* 9. CARD global upgrade */
    .card {
      background: var(--bg-card);
      border: 1px solid rgba(255,255,255,0.05);
      border-radius: 12px;
      padding: 18px;
    }
    .card h4 {
      font-family: var(--display);
      font-size: 0.72rem;
      color: #5a6478;
      margin-bottom: 14px;
      text-transform: uppercase;
      letter-spacing: 2px;
      font-weight: 700;
    }

    /* 10. TOPBAR buttons unified */
    #topbar .btn {
      display: inline-flex;
      align-items: center;
      width: auto;
      margin: 0;
      padding: 0 12px;
      height: 30px;
      border-radius: 6px;
      border: 1px solid rgba(255,255,255,0.08);
      background: rgba(255,255,255,0.03);
      color: #8896a8;
      font-size: 0.72rem;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s ease;
      white-space: nowrap;
      font-family: var(--font);
      gap: 5px;
    }
    #topbar .btn:hover {
      background: rgba(255,255,255,0.07);
      border-color: rgba(255,255,255,0.15);
      color: var(--text);
    }
    #topbar .btn.gold {
      background: var(--gold);
      border-color: var(--gold);
      color: #0c0f1a;
      font-weight: 700;
    }
    #topbar .btn.gold:hover {
      background: #c49630;
      box-shadow: 0 0 16px rgba(212,169,62,0.3);
    }

    /* 11. CLOCK premium */
    #clock {
      font-family: var(--mono);
      font-size: 0.72rem;
      color: #5a6478;
      background: transparent;
      border: none;
      padding: 0;
      letter-spacing: 0.05em;
    }

    /* 12. MARKET STATUS badges */
    .mkt-badge {
      display: flex;
      align-items: center;
      gap: 6px;
      background: transparent;
      border: 1px solid rgba(255,255,255,0.07);
      border-radius: 6px;
      padding: 4px 10px;
      font-size: 0.68rem;
      font-weight: 700;
      letter-spacing: 0.04em;
    }

    /* 13. Performance tab sparkle */
    .stat-card {
      background: rgba(10,12,20,0.8);
      border: 1px solid rgba(255,255,255,0.05);
      border-radius: 12px;
      padding: 20px;
      text-align: center;
      position: relative;
      overflow: hidden;
      transition: all 0.2s ease;
    }
    .stat-card::before {
      content: '';
      position: absolute;
      bottom: 0; left: 0; right: 0;
      height: 2px;
      background: linear-gradient(90deg, transparent, var(--gold), transparent);
      opacity: 0;
      transition: opacity 0.2s ease;
    }
    .stat-card:hover::before { opacity: 1; }
    .stat-card .stat-num {
      font-size: 2.2rem;
      font-weight: 900;
      background: linear-gradient(135deg, var(--gold), #f0c84a);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      line-height: 1;
    }
    .stat-card .stat-label {
      font-size: 0.65rem;
      color: #4a5470;
      text-transform: uppercase;
      letter-spacing: 1px;
      margin-top: 6px;
      font-weight: 700;
    }

    /* ── SIDEBAR NAV BUTTONS ── */
    .sb-nav-btn {
      position: relative;
      background: transparent;
      border: none;
      color: #3d4560;
      cursor: pointer;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 5px;
      width: 100%;
      height: 60px;
      border-radius: 0;
      transition: color 0.2s ease, background 0.2s ease;
      padding: 0 6px;
      text-decoration: none;
    }
    .sb-nav-btn::before {
      content: '';
      position: absolute;
      left: 0;
      top: 50%;
      transform: translateY(-50%) scaleY(0);
      width: 2.5px;
      height: 28px;
      background: var(--gold);
      border-radius: 0 2px 2px 0;
      transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    }
    .sb-nav-btn .sb-icon {
      width: 22px;
      height: 22px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      transition: transform 0.2s ease;
    }
    .sb-nav-btn .sb-icon svg {
      width: 18px;
      height: 18px;
      stroke: currentColor;
      stroke-width: 1.7;
      fill: none;
      stroke-linecap: round;
      stroke-linejoin: round;
    }
    .sb-nav-btn .sb-label {
      font-size: 0.55rem;
      font-weight: 600;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      white-space: nowrap;
      color: inherit;
      transition: color 0.2s ease;
    }
    .sb-nav-btn:hover {
      color: #9aa3b8;
    }
    .sb-nav-btn:hover .sb-icon {
      transform: translateY(-1px);
    }
    .sb-nav-btn.active {
      color: var(--gold) !important;
    }
    .sb-nav-btn.active::before {
      transform: translateY(-50%) scaleY(1);
    }
    .sb-nav-btn.active .sb-icon {
      filter: drop-shadow(0 0 6px rgba(212,169,62,0.5));
    }
    .sb-nav-btn.sb-danger {
      color: #c94060;
    }
    .sb-nav-btn.sb-danger:hover {
      color: #f0546b;
    }
    .sb-sep {
      width: 28px;
      height: 1px;
      background: rgba(255,255,255,0.06);
      margin: 4px auto;
      flex-shrink: 0;
    }
    
/* TOAST NOTIFICATION */
#toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast-msg {
  background: rgba(20, 24, 45, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  font-size: 14px;
  animation: slideIn 0.3s ease forwards;
  opacity: 0;
  transform: translateX(100%);
  display: flex;
  align-items: center;
  gap: 10px;
}
.toast-msg.error {
  border-left: 4px solid #ff4444;
}
.toast-msg.success {
  border-left: 4px solid #00C851;
}
.toast-msg.info {
  border-left: 4px solid #33b5e5;
}
@keyframes slideIn {
  to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeOut {
  to { opacity: 0; transform: translateY(10px); }
}