  *, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
  body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
    background: #0a0d14; color: #e0e3e8;
    min-height: 100vh;
  }

  .topbar {
    background: #0f1219; border-bottom: 1px solid #1e2329;
    padding: 0 28px; display: flex; align-items: center; height: 56px;
    position: sticky; top: 0; z-index: 100;
  }
  .topbar .logo { font-size: 20px; font-weight: 800; letter-spacing: -0.5px; margin-right: 32px; cursor: pointer; }
  .topbar .logo span { color: #f0b90b; }
  .topbar .mstats { display: flex; gap: 28px; flex: 1; }
  .topbar .ms { font-size: 12px; }
  .topbar .ms .ml { color: #707a8a; font-size: 10px; text-transform: uppercase; letter-spacing: 0.3px; }
  .topbar .ms .mv { font-weight: 600; font-size: 13px; margin-top: 1px; }
  .topbar .ms .mv.grn { color: #0ecb81; }
  .topbar .ms .mv.red { color: #f6465d; }
  .topbar .time { font-size: 11px; color: #5e6673; }

  /* P29-C2: trajni market ribbon — vidljiv na SVIM tabovima (za razliku od MARKET taba,
     koji je pun pregled), sticky ispod topbar-a, sakriven na telefonu (P28 filozofija:
     ne vracati zauzece ekrana koje je P28 namerno smanjio). */
  .market-ribbon {
    display: flex; gap: 0; overflow-x: auto; scrollbar-width: none;
    background: #0b0e13; border-bottom: 1px solid #1e2329;
    padding: 0 28px; position: sticky; top: 56px; z-index: 99;
  }
  .market-ribbon::-webkit-scrollbar { display: none; }
  .ribbon-item {
    display: flex; align-items: center; gap: 8px; flex-shrink: 0;
    padding: 7px 14px; border-right: 1px solid #1e2329; white-space: nowrap;
  }
  .ribbon-item .ril { font-size: 10px; color: #5e6673; text-transform: uppercase; letter-spacing: 0.3px; }
  .ribbon-item .riv { font-size: 12px; font-weight: 600; }
  .ribbon-item .spark-slot { width: 40px; height: 18px; }
  .ribbon-item .rich { font-size: 11px; font-weight: 500; }
  .ribbon-item .rich.grn { color: #0ecb81; }
  .ribbon-item .rich.red { color: #f6465d; }

  .hero { padding: 20px 28px 8px; }
  .hero .htitle { font-size: 13px; font-weight: 600; color: #848e9c; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; }
  .hero .htitle span { color: #e0e3e8; }
  .picks-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  .pick-col { display: flex; flex-direction: column; gap: 4px; }
  .pick-col .phead {
    font-size: 10px; font-weight: 600; color: #5e6673;
    text-transform: uppercase; letter-spacing: 0.3px;
    padding: 4px 8px 2px;
    display: grid;
    grid-template-columns: 20px 1fr 56px 44px 80px 70px;
    gap: 8px;
  }
  .pick-col .phead span { text-align: left; }
  .pick-col .phead span:nth-child(4),
  .pick-col .phead span:nth-child(5),
  .pick-col .phead span:nth-child(6) { text-align: right; }
  .pick-row {
    display: grid;
    grid-template-columns: 20px 1fr 56px 44px 80px 70px;
    align-items: center; gap: 8px;
    background: #0f1219; border: 1px solid #1e2329;
    border-radius: 6px; padding: 8px 12px; cursor: pointer;
    transition: all 0.12s;
  }
  .pick-row:hover { border-color: #f0b90b33; background: #151b24; }
  .pick-row .rnk { font-size: 10px; font-weight: 700; color: #5e6673; text-align: center; }
  .pick-row .pi { min-width: 0; }
  .pick-row .ptk { font-size: 13px; font-weight: 600; }
  .pick-row .pn { font-size: 10px; color: #707a8a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pick-row .pspark { display: flex; justify-content: center; align-items: center; }
  .pick-row .pscore-col { display: flex; justify-content: center; }
  .pick-row .ppr { text-align: right; }
  .pick-row .pp { font-size: 12px; font-weight: 600; }
  .pick-row .pch { font-size: 10px; font-weight: 500; }
  .pick-row .pch.grn { color: #0ecb81; }
  .pick-row .pch.red { color: #f6465d; }
  .pick-row .psc-val { text-align: right; font-size: 13px; font-weight: 700; }
  .pscore { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
  .pscore.ss { border: 2px solid #0ecb81; color: #0ecb81; }
  .pscore.sb { border: 2px solid #0ecb81; color: #0ecb81; opacity: 0.8; }
  .pscore.hl { border: 2px solid #f0b90b; color: #f0b90b; }
  .pscore.sl { border: 2px solid #f6465d; color: #f6465d; }

  .cntrls { padding: 12px 28px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
  .tabs { display: flex; gap: 2px; background: #0f1219; border-radius: 6px; padding: 2px; }
  .tab { padding: 5px 14px; font-size: 11px; font-weight: 500; border-radius: 4px; cursor: pointer; color: #707a8a; transition: all 0.12s; user-select: none; }
  .tab:hover { color: #e0e3e8; }
  .tab.on { background: #f0b90b; color: #0a0d14; }
  .tab .c { background: #1e2329; padding: 1px 6px; border-radius: 5px; font-size: 10px; margin-left: 5px; }
  .tab.on .c { background: #c99a0a; color: #0a0d14; }
  .tabs + .tabs { margin-left: 8px; }

  .srch { display: flex; align-items: center; gap: 6px; background: #0f1219; border: 1px solid #1e2329; border-radius: 6px; padding: 5px 10px; }
  .srch input { background: none; border: none; color: #e0e3e8; font-size: 12px; outline: none; width: 160px; }
  .srch input::placeholder { color: #5e6673; }

  .twrap { padding: 0 28px 24px; }
  .tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
  .tbl th {
    text-align: left; padding: 8px 12px;
    color: #5e6673; font-weight: 500; font-size: 10px;
    text-transform: uppercase; letter-spacing: 0.3px;
    background: #0f1219; border-bottom: 1px solid #1e2329;
    position: sticky; top: 56px; z-index: 10;
    cursor: pointer; user-select: none; white-space: nowrap;
    transition: color 0.12s;
  }
  .tbl th:hover { color: #c0c8d4; }
  .tbl th.sort-asc::after  { content: " ▲"; color: #f0b90b; font-size: 9px; }
  .tbl th.sort-desc::after { content: " ▼"; color: #f0b90b; font-size: 9px; }
  .tbl th.sort-asc, .tbl th.sort-desc { color: #e0e3e8; }
  .tbl td { padding: 7px 12px; border-bottom: 1px solid #1e2329; color: #e0e3e8; white-space: nowrap; }
  .tbl tr { cursor: pointer; }
  .tbl tr:hover td { background: #151b24; }
  .tbl .tkr { font-weight: 600; font-size: 13px; }
  .tbl .tn { font-size: 10px; color: #707a8a; }
  .tkm { display: none; } /* P28 P1#3: cena+promena kao drugi red u ime-celiji, samo ≤600px */
  .tbl .tbadge { font-size: 8px; padding: 1px 5px; border-radius: 3px; font-weight: 600; text-transform: uppercase; margin-left: 6px; }
  .tbadge.cr { background: #f0b90b22; color: #f0b90b; }
  .tbadge.st { background: #627eea22; color: #627eea; }
  .tbl .sig { font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 8px; display: inline-block; letter-spacing: 0.2px; }
  .sig.sb { background: #0ecb8122; color: #0ecb81; }
  .sig.ss { background: #0ecb8133; color: #0ecb81; }
  .sig.hl { background: #f0b90b22; color: #f0b90b; }
  .sig.sl { background: #f6465d22; color: #f6465d; }
  .tbl .pr { text-align: right; font-weight: 500; }
  .tbl .ch { text-align: right; font-weight: 500; }
  .tbl .ch.grn { color: #0ecb81; }
  .tbl .ch.red { color: #f6465d; }
  .tbl .sc { text-align: right; }
  .tbl .sc .sring { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; margin-left: auto; }
  .sring.a { border: 2px solid #0ecb81; color: #0ecb81; }
  .sring.b { border: 2px solid #0ecb81; color: #0ecb81; opacity: 0.7; }
  .sring.c { border: 2px solid #f0b90b; color: #f0b90b; }
  .sring.d { border: 2px solid #f6465d; color: #f6465d; opacity: 0.7; }
  .sring.f { border: 2px solid #f6465d; color: #f6465d; }
  .tbl .ts { color: #5e6673; font-size: 9px; text-align: right; }

  .reg { font-size: 9px; font-weight: 600; padding: 1px 6px; border-radius: 3px; text-transform: uppercase; letter-spacing: 0.2px; }
  .reg.bull { background: #0ecb8122; color: #0ecb81; }
  .reg.bear { background: #f6465d22; color: #f6465d; }
  .reg.sw { background: #f0b90b22; color: #f0b90b; }
  .reg.hv { background: #ff8c0022; color: #ff8c00; }
  .con { font-size: 9px; font-weight: 600; }
  .con.high { color: #0ecb81; }
  .con.med { color: #f0b90b; }
  .con.low { color: #5e6673; }
  .af { font-size: 10px; color: #848e9c; text-align: center; }

  .empty { text-align: center; padding: 60px; color: #5e6673; }

  .hint { font-size: 10px; color: #3d4552; text-align: center; padding: 6px 0 0; }

  /* TA indicator styles */
  .ta { font-size: 10px; }
  .ta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .ta-item { display: flex; justify-content: space-between; align-items: center; background: #0f1219; padding: 4px 8px; border-radius: 3px; }
  .ta-item .ta-lbl { color: #707a8a; }
  .ta-item .ta-val { font-weight: 600; }
  .ta-item .ta-val.grn { color: #0ecb81; }
  .ta-item .ta-val.red { color: #f6465d; }
  .ta-item .ta-val.ylw { color: #f0b90b; }
  .ta-section { margin-bottom: 10px; }
  .ta-section .ta-hdr { font-size: 9px; color: #5e6673; text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 4px; padding: 2px 0; border-bottom: 1px solid #1e2329; }
  .ta-row { display: flex; gap: 8px; flex-wrap: wrap; }
  .ta-chip { font-size: 9px; padding: 2px 6px; border-radius: 3px; background: #1e2329; }
  .ta-chip.grn { background: #0ecb8122; color: #0ecb81; }
  .ta-chip.red { background: #f6465d22; color: #f6465d; }
  .ta-chip.ylw { background: #f0b90b22; color: #f0b90b; }

  .dp-details { margin-top: 8px; }
  .dp-detail-item { font-size: 10px; color: #707a8a; padding: 1px 0; }
  .dp-detail-item strong { color: #e0e3e8; }

  /* ─── PRICE CHART ─── */
  .dp-chart-wrap {
    background: #0f1219; border: 1px solid #1e2329; border-radius: 6px;
    overflow: hidden; margin-bottom: 4px;
  }
  .dp-chart-hdr {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 12px; border-bottom: 1px solid #1e2329;
    font-size: 9px; color: #5e6673; text-transform: uppercase; letter-spacing: 0.3px;
  }
  .dp-chart-days { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
  .dp-chart-days button {
    background: #1e2329; border: none; color: #707a8a; font-size: 9px;
    padding: 2px 7px; border-radius: 3px; cursor: pointer; transition: 0.15s;
  }
  .dp-chart-days button.active, .dp-chart-days button:hover {
    background: #2b3139; color: #e0e3e8;
  }
  #dpChart { width: 100%; height: 200px; }
  #chartRangeChg.grn { color: #0ecb81; }
  #chartRangeChg.red { color: #f6465d; }

  /* ─── DETAIL OVERLAY ─── */
  .doverlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); z-index: 200;
    display: none; justify-content: flex-end;
  }
  .doverlay.on { display: flex; }
  .dpanel {
    width: 680px; max-width: 95vw; height: 100%;
    background: #0f1219; border-left: 1px solid #1e2329;
    overflow-y: auto; padding: 0;
    animation: slideIn 0.2s ease-out;
  }
  @keyframes slideIn { from { transform: translateX(40px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
  /* P28 P2#9: loading skeleton za lazy-load panele (Vesti/Finansije/Vlasništvo/Istorija) —
     umesto golog "…" teksta, pulsirajuci placeholder redovi nagoveste oblik sadrzaja. */
  @keyframes skelPulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 0.75; } }
  .skel-row { height: 14px; background: #1e2329; border-radius: 4px; animation: skelPulse 1.4s ease-in-out infinite; margin-bottom: 10px; }
  .skel-row.short { width: 35%; }
  .skel-row.med { width: 60%; }
  .skel-row.full { width: 100%; }
  .skel-row.title { height: 16px; width: 45%; margin-bottom: 16px; }

  .dp-head {
    position: sticky; top: 0; z-index: 10;
    background: #0f1219; border-bottom: 1px solid #1e2329;
    padding: 14px 20px; display: flex; align-items: center; gap: 12px;
  }
  .dp-back {
    background: none; border: none; color: #707a8a; font-size: 18px;
    cursor: pointer; padding: 4px 8px; border-radius: 4px; transition: all 0.12s;
  }
  .dp-back:hover { background: #1e2329; color: #e0e3e8; }
  .dp-hinfo { flex: 1; }
  .dp-htkr { font-size: 18px; font-weight: 700; }
  .dp-hname { font-size: 12px; color: #707a8a; }
  /* P28 P2#10: 12 tabova / 4 kolone = tačno 3 puna reda (bilo 5 kolona, treći red imao samo 2) */
  .dp-subtabs { margin: 12px 20px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; }
  .dp-subtabs .tab { text-align: center; }
  .dp-pane { display: none; }
  .dp-pane.on { display: block; }
  /* P28 P2#7: sektor kao chip ispod imena (ne vise centrirano lebdeci izmedju
     imena i cene) — dosledno sa .tbadge chip obrascem koriscenim u glavnoj tabeli. */
  .dp-hindustry:not(:empty) { display: inline-block; margin-top: 4px; font-size: 10px;
    color: #848e9c; background: #1e2329; border-radius: 4px; padding: 2px 8px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .dp-hprice { text-align: right; }
  .dp-hp { font-size: 18px; font-weight: 600; }
  .dp-hch { font-size: 12px; font-weight: 500; }
  .dp-hch.grn { color: #0ecb81; }
  .dp-hch.red { color: #f6465d; }

  .dp-body { padding: 16px 20px 40px; display: flex; flex-direction: column; gap: 16px; }

  .dp-section { background: #0a0d14; border: 1px solid #1e2329; border-radius: 8px; padding: 16px; }
  .dp-sectitle { font-size: 10px; font-weight: 600; color: #5e6673; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; }

  .dp-score-row { display: flex; align-items: center; gap: 16px; }
  .dp-bigscore {
    width: 72px; height: 72px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; font-weight: 800; flex-shrink: 0;
    border-width: 3px; border-style: solid;
  }
  .dp-bigscore.ss { border-color: #0ecb81; color: #0ecb81; background: #0ecb8111; }
  .dp-bigscore.sb { border-color: #0ecb81; color: #0ecb81; background: #0ecb8111; }
  .dp-bigscore.hl { border-color: #f0b90b; color: #f0b90b; background: #f0b90b11; }
  .dp-bigscore.sl { border-color: #f6465d; color: #f6465d; background: #f6465d11; }
  .dp-si { flex: 1; }
  .dp-sig { font-size: 16px; font-weight: 700; margin-bottom: 2px; }
  .dp-confl { font-size: 12px; color: #707a8a; }
  .dp-confl strong { color: #e0e3e8; }

  .dp-regime { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 4px; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
  .dp-regime.bull { background: #0ecb8122; color: #0ecb81; }
  .dp-regime.bear { background: #f6465d22; color: #f6465d; }
  .dp-regime.sw { background: #f0b90b22; color: #f0b90b; }
  .dp-regime.hv { background: #ff8c0022; color: #ff8c00; }
  .dp-rlabel { font-size: 12px; color: #848e9c; line-height: 1.4; }

  .dp-weights { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
  .dp-wtag {
    font-size: 10px; padding: 3px 8px; border-radius: 3px;
    background: #1e2329; color: #848e9c;
  }
  .dp-wtag strong { color: #e0e3e8; }

  .dp-factors { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .dp-fact {
    background: #0f1219; border: 1px solid #1e2329; border-radius: 6px; padding: 10px 12px;
    display: flex; align-items: flex-start; gap: 10px;
  }
  .dp-fscore {
    width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700;
  }
  .dp-fscore.hi { border: 2px solid #0ecb81; color: #0ecb81; }
  .dp-fscore.md { border: 2px solid #f0b90b; color: #f0b90b; }
  .dp-fscore.lo { border: 2px solid #f6465d; color: #f6465d; }
  .dp-fi { flex: 1; min-width: 0; }
  .dp-fn { font-size: 12px; font-weight: 600; margin-bottom: 1px; }
  .dp-fd { font-size: 10px; color: #5e6673; line-height: 1.3; }

  .dp-raw { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }

  /* P25: dugoročni ishod (detalj panel) */
  .lh-tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
  .lh-tbl thead td { color: #5e6673; font-size: 10px; text-transform: uppercase; letter-spacing: .3px;
    padding: 2px 6px; border-bottom: 1px solid #2b3139; }
  .lh-tbl tbody td { padding: 4px 6px; border-bottom: 1px solid #1e2329; }
  .lh-tbl .grn { color: #0ecb81; }
  .lh-tbl .red { color: #f6465d; }

  /* P25 deo B: „Dugoročno" tab */
  .lh-cards { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 6px; }
  .lh-card { flex: 1; min-width: 90px; background: #12161c; border: 1px solid #1e2329;
    border-radius: 8px; padding: 10px 12px; }
  .lh-card-h { font-size: 10px; color: #5e6673; text-transform: uppercase; letter-spacing: .3px; }
  .lh-card-a { font-size: 20px; font-weight: 700; margin-top: 2px; }
  .lh-card-a.grn { color: #0ecb81; } .lh-card-a.red { color: #f6465d; }
  .lh-card-s { font-size: 11px; color: #848e9c; margin-top: 2px; }
  .lh-sub { font-size: 11px; color: #5e6673; line-height: 1.5; margin-bottom: 14px; }
  /* sekcijski naslov u „Dugoročno" — isti stil kao hero .htitle (uppercase gray) */
  .lh-htitle { font-size: 13px; font-weight: 600; color: #848e9c; text-transform: uppercase;
    letter-spacing: 0.5px; margin: 4px 0 12px; }
  .lh-caveats { margin: 14px 0 0; padding-left: 18px; }
  .lh-caveats li { font-size: 10px; color: #5e6673; line-height: 1.5; margin-bottom: 4px; }

  /* ─── GATES & FACTOR MINI-SCORES ─── */
  .gates-ok  { color: #0ecb81; font-size: 13px; }
  .gates-fail { color: #f6465d; font-size: 13px; cursor: help; }
  .fscore-mini { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; font-size: 9px; font-weight: 700; }
  .fscore-mini.hi { border: 1.5px solid #0ecb81; color: #0ecb81; }
  .fscore-mini.md { border: 1.5px solid #f0b90b; color: #f0b90b; }
  .fscore-mini.lo { border: 1.5px solid #f6465d; color: #f6465d; }
  .fscore-mini.na { border: 1.5px solid #3d4552; color: #3d4552; }
  .tbl .rc-badge { font-size: 8px; color: #5e6673; display: block; margin-top: 1px; text-align: center; }
  .dp-rv { background: #0f1219; border: 1px solid #1e2329; border-radius: 4px; padding: 8px 10px; text-align: center; }
  .dp-rvl { font-size: 9px; color: #5e6673; text-transform: uppercase; letter-spacing: 0.3px; }
  .dp-rvv { font-size: 13px; font-weight: 600; margin-top: 2px; }

  /* ─── ALERT ITEM ─── */
  .alert-item {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 0; border-bottom: 1px solid #1e2329; font-size: 11px;
  }
  .alert-item:last-child { border-bottom: none; }
  .alert-arr { font-size: 14px; font-weight: 700; }
  .alert-arr.up { color: #0ecb81; }
  .alert-arr.down { color: #f6465d; }
  .alert-ts { font-size: 9px; color: #3d4552; margin-left: auto; white-space: nowrap; }

  /* ─── PORTFOLIO ─── */
  #portfolioView { padding: 0 28px 40px; }
  .port-stats { display: flex; gap: 12px; flex-wrap: wrap; padding: 0 0 16px; }
  .port-stat { background: #0f1219; border: 1px solid #1e2329; border-radius: 8px; padding: 12px 16px; flex: 1; min-width: 130px; }
  .port-stat .ps-lbl { font-size: 10px; color: #5e6673; text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 4px; }
  .port-stat .ps-val { font-size: 18px; font-weight: 700; line-height: 1.1; }
  .port-stat .ps-sub { font-size: 10px; color: #5e6673; margin-top: 1px; }
  .port-tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
  .port-tbl th { text-align: left; padding: 8px 12px; color: #5e6673; font-weight: 500; font-size: 10px; text-transform: uppercase; letter-spacing: 0.3px; background: #0f1219; border-bottom: 1px solid #1e2329; position: sticky; top: 56px; z-index: 10; }
  .port-tbl td { padding: 7px 12px; border-bottom: 1px solid #1e2329; white-space: nowrap; }
  .port-tbl tr:hover td { background: #151b24; }
  .port-alloc { height: 4px; border-radius: 2px; background: #1e2329; overflow: hidden; margin-top: 3px; }
  .port-alloc-fill { height: 100%; border-radius: 2px; background: #f0b90b; }
  .port-section-title { font-size: 11px; font-weight: 600; color: #5e6673; text-transform: uppercase; letter-spacing: 0.5px; padding: 16px 0 8px; border-bottom: 1px solid #1e2329; margin-bottom: 0; }
  .reb-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #1e2329; font-size: 12px; }
  .reb-item:last-child { border-bottom: none; }
  .reb-action { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 6px; flex-shrink: 0; }
  .reb-action.inc { background: #0ecb8122; color: #0ecb81; }
  .reb-action.dec { background: #f6465d22; color: #f6465d; }
  .reb-action.hld { background: #1e2329; color: #5e6673; }
  .port-add-form { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 0; align-items: flex-end; }
  .port-add-form input, .port-add-form select {
    background: #0f1219; border: 1px solid #2b3139; color: #e0e3e8;
    font-size: 12px; padding: 6px 10px; border-radius: 6px; outline: none;
  }
  .port-add-form input:focus, .port-add-form select:focus { border-color: #f0b90b44; }
  .port-add-form input::placeholder { color: #3d4552; }
  .port-add-btn { background: #f0b90b; color: #0a0d14; border: none; font-size: 11px; font-weight: 700; padding: 6px 14px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
  .port-add-btn:hover { background: #d9a500; }
  .port-empty { text-align: center; padding: 60px 20px; color: #5e6673; }
  .port-empty h3 { font-size: 16px; margin-bottom: 6px; color: #848e9c; }
  .feat-imp-bar { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 11px; }
  .feat-imp-bar .fi-name { width: 90px; color: #848e9c; flex-shrink: 0; }
  .feat-imp-bar .fi-track { flex: 1; height: 6px; background: #1e2329; border-radius: 3px; overflow: hidden; }
  .feat-imp-bar .fi-fill { height: 100%; border-radius: 3px; background: #f0b90b; }
  .feat-imp-bar .fi-val { width: 40px; text-align: right; color: #e0e3e8; font-weight: 600; }

  /* P20-A: klase izvučene iz inline stilova — identičan izgled, ali dostupne media
     query-jima (inline stil se ne može gađati iz @media bloka bez !important). */
  .tbtn { background: #1e2329; border: 1px solid #2b3139; color: #848e9c; font-size: 11px; padding: 5px 12px; border-radius: 5px; cursor: pointer; }
  .tbtn.bell { position: relative; font-size: 13px; }
  .tbtn-c { background: #2b3139; padding: 1px 5px; border-radius: 4px; font-size: 10px; }
  .viewpad { padding: 0 28px 24px; }
  .sg-wrap { overflow-x: auto; }
  .sg-tbl { width: 100%; border-collapse: collapse; font-size: 12px; color: #eaecef; }
  .sg-tbl th, .sg-tbl td { padding: 6px 8px; }
  .corr-tbl { border-collapse: collapse; font-size: 9px; }
  .pa-inp-ticker { width: 110px; text-transform: uppercase; }
  .pa-inp-units { width: 100px; }
  .pa-inp-avg { width: 120px; }
  /* KORELACIJA swipe hint — bazno skriven; ≤600 blok ga prikazuje (mora biti PRE media
     bloka da bi media pravilo, kasnije u izvoru, pobedilo na istoj specifičnosti). */
  .corr-hint { display: none; font-size: 11px; color: #f0b90b; padding: 4px 0 8px; }

  @media (max-width: 1200px) {
    /* Hide less-critical columns on medium screens */
    .tbl th:nth-child(14), .tbl td:nth-child(14) { display: none; } /* Fetched */
  }

  @media (max-width: 900px) {
    /* P28 P1#4: tablet (600-900px) NIJE telefon — mstats/picks-grid/cntrls-kolona/cena-
       promena-režim kolone su premeštene u ≤600px blok ispod, tablet ih zadržava. */
    .twrap { padding: 0 8px 12px; overflow-x: auto; }
    /* .twrap overflow-x:auto čini overflow-y takođe auto (CSS spec) → .twrap postaje
       scroll-kontejner, pa se sticky `top:56px` meri od njega i gura zaglavlje preko
       prvog reda. Na mobilnom zaglavlje ne mora biti sticky — vrati ga u normalni tok. */
    .tbl th { position: static; top: auto; }
    .dpanel { width: 100%; max-width: 100vw; }
    .dp-factors { grid-template-columns: 1fr; }
    .dp-raw { grid-template-columns: 1fr 1fr; }
    /* Sekundarne kolone i dalje suvišne na tabletu — cena/24h/režim/pouzdanost ostaju. */
    .tbl th:nth-child(10), .tbl td:nth-child(10) { display: none; } /* sent */
    .tbl th:nth-child(11), .tbl td:nth-child(11) { display: none; } /* F/OC */
    .tbl th:nth-child(12), .tbl td:nth-child(12) { display: none; } /* aligned */
    .tbl th:nth-child(13), .tbl td:nth-child(13) { display: none; } /* size */
    .tbl th:nth-child(14), .tbl td:nth-child(14) { display: none; } /* fetched */
    .tbl th:nth-child(15), .tbl td:nth-child(15) { display: none; } /* industrija */
    .hero { padding: 12px 12px 6px; }
    .topbar { padding: 0 12px; }
    #wlPanel, #alertPanel { padding: 8px 12px; }
  }

  /* P20 Faza B: telefonski breakpoint — tablet (≤900) gore ostaje; ovde ≤600.
     Cilj: čitljivost (fontovi ≥12px) i prst (touch targeti ≥40px). */
  @media (max-width: 600px) {
    .cntrls, .viewpad { padding-left: 12px; padding-right: 12px; }
    .twrap { padding: 0 4px 12px; }

    /* P28 P1#4: telefon-specificno (premesteno iz ≤900px bloka, koji sada tablet deli
       vise sa desktop rasporedom) — mstats i top-picks 2 kolone ne staju na telefonu. */
    .topbar .mstats { display: none; }
    .picks-grid { grid-template-columns: 1fr; }
    /* P28 P1#5: top-5 → top-3 po listi na telefonu — TOP PICKS je zauzimao ~727px
       (skoro ceo ekran) pre nego sto se stigne do tabova/tabele. */
    .pick-row:nth-child(n+4) { display: none; }
    /* P29-C1: sparkline kolona se gasi na telefonu (uska sirina, cetvrti prioritet
       posle imena/skora/cene) — vrati na 5 kolona bez nje, isto za phead. */
    .pick-row, .pick-col .phead { grid-template-columns: 20px 1fr 44px 80px 70px; }
    .pick-row .pspark { display: none; }
    .pick-col .phead span:nth-child(3) { display: none; }
    /* P29-C2: trajni market ribbon se GASI na telefonu — P28 je namerno smanjio
       zauzece ekrana, trajna traka bi to ponistila na vec tesnom prostoru. */
    .market-ribbon { display: none; }

    /* — topbar: dugmad kolabiraju u ikone, sat se sakriva — */
    .topbar { height: 52px; }
    .topbar .logo { font-size: 17px; margin-right: 0; }
    .topbar .time { display: none; }
    .tbtn { padding: 9px 11px; font-size: 13px; }
    .tbtn-label { display: none; }               /* "Watchlist" tekst → ostaje samo ★ */

    /* P28 P0#1: flex-wrap:wrap iz baznog .cntrls pravila (linija ~74, namenjeno desktop
       horizontalnom prelamanju) je u kombinaciji sa flex-direction:column prelamalo decu
       u DRUGU KOLONU kad ne stanu u dostupnu visinu — otud ceo sajt siri od viewporta.
       flex-wrap:nowrap primorava jednu vertikalnu kolonu. Samo na telefonu — tablet
       zadrzava red+wrap raspored iz baznog pravila (vise mesta, ne treba puna kolona). */
    .cntrls { flex-direction: column; flex-wrap: nowrap; align-items: stretch; padding: 8px 12px; }
    .srch input { width: 100%; }

    /* — tabovi: horizontalni scroll umesto prelamanja + veći tap — */
    .cntrls > div:first-child { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px;
      /* P28 P2#6: fade na desnoj ivici nagoveštava da ima još tabova van ekrana (MARKET/
         SKRINING/UPOREDI/HOLD/SELL su van vidljivog dela). mask-image prati kutiju
         kontejnera (ne skrolovan sadržaj), pa fade ostaje fiksiran na desnoj ivici. */
      -webkit-mask-image: linear-gradient(to right, black calc(100% - 28px), transparent 100%);
      mask-image: linear-gradient(to right, black calc(100% - 28px), transparent 100%); }
    .cntrls > div:first-child::-webkit-scrollbar { display: none; }
    .tabs { flex-shrink: 0; }
    .tab { padding: 10px 14px; font-size: 13px; }
    .tab .c { font-size: 11px; }
    .srch input { font-size: 16px; padding: 10px 12px; }   /* 16px = iOS ne zumira na fokus */
    #sectorFilter { font-size: 14px; padding: 9px 10px; }

    /* P28 P1#3: cena/24h kolone se sklanjaju (uzak ekran), ali .tkm ih vraca kao
       drugi red u ime-celiji — vidi .tkm pravilo i renderRow JS ispod. */
    .tbl th:nth-child(3),  .tbl td:nth-child(3)  { display: none; } /* price */
    .tbl th:nth-child(4),  .tbl td:nth-child(4)  { display: none; } /* 24h chg */
    .tbl th:nth-child(7),  .tbl td:nth-child(7)  { display: none; } /* regime */
    .tbl th:nth-child(8),  .tbl td:nth-child(8)  { display: none; } /* conf */
    .tkm { display: flex; gap: 6px; align-items: baseline; font-size: 11px; margin-top: 2px; }
    .tkm .ch.grn { color: #0ecb81; } .tkm .ch.red { color: #f6465d; }

    /* — glavna tabela: veći font i redovi (targeti) — */
    .tbl th { font-size: 11px; padding: 8px 10px; }
    .tbl td { padding: 11px 10px; }
    .tbl .tkr { font-size: 15px; }
    .tbl .tn { font-size: 12px; }
    .tbl .sig { font-size: 12px; padding: 4px 9px; }
    .tbl .tbadge { font-size: 10px; }
    .pscore, .sring { width: 38px; height: 38px; font-size: 13px; }

    /* — top picks: veći tekst — */
    .pick-row .pn { font-size: 12px; }
    .pick-row .rnk, .pick-row .pch { font-size: 12px; }
    .phead { font-size: 11px; }
    .htitle { font-size: 15px; }

    /* — JS view-ovi: veći font, targeti — */
    .sg-tbl { font-size: 13px; }
    .sg-tbl th, .sg-tbl td { padding: 9px 8px; }
    .port-stats { gap: 8px; }
    .port-add-form { flex-direction: column; align-items: stretch; }
    .pa-inp-ticker, .pa-inp-units, .pa-inp-avg, #paTypeInp { width: 100%; box-sizing: border-box; font-size: 16px; padding: 10px; }
    .port-add-btn { width: 100%; padding: 11px; font-size: 14px; }
    .corr-tbl { font-size: 11px; }

    /* — detail panel: čitljiviji — */
    .dp-raw { grid-template-columns: 1fr; }

    /* — Faza C: STRATEGIJE — sakrij sekundarne kolone (10→5) umesto horizontalnog skrola.
       Ostaju: Ticker, Strategija, Conf, Size, Entry-zona. Skini: #, Stop, T1, R:R, Flags. */
    .sg-tbl th:nth-child(1),  .sg-tbl td:nth-child(1),
    .sg-tbl th:nth-child(7),  .sg-tbl td:nth-child(7),
    .sg-tbl th:nth-child(8),  .sg-tbl td:nth-child(8),
    .sg-tbl th:nth-child(9),  .sg-tbl td:nth-child(9),
    .sg-tbl th:nth-child(10), .sg-tbl td:nth-child(10),
    .sg-tbl th:nth-child(11), .sg-tbl td:nth-child(11) { display: none; } /* industrija */

    /* — Faza C: PORTFOLIO pozicije (12→6). Ostaju: Ticker, Tip, Vrednost, P&L%, Signal, ✕.
       Skini: Količina(3), Avg(4), Tren(5), P&L abs(7), Alokacija(9), Score(11). */
    .port-tbl th:nth-child(3),  .port-tbl td:nth-child(3),
    .port-tbl th:nth-child(4),  .port-tbl td:nth-child(4),
    .port-tbl th:nth-child(5),  .port-tbl td:nth-child(5),
    .port-tbl th:nth-child(7),  .port-tbl td:nth-child(7),
    .port-tbl th:nth-child(9),  .port-tbl td:nth-child(9),
    .port-tbl th:nth-child(11), .port-tbl td:nth-child(11),
    .port-tbl th:nth-child(12), .port-tbl td:nth-child(12) { display: none; } /* industrija */

    /* — Faza C: KORELACIJA hint (matrica ostaje 2D scroll — legitimno) — */
    .corr-hint { display: block; }

    /* — P27 S1-S3: detalj sub-tab traka — 5 kolona ne staje na uskom telefonu (natapa se
       na 4+1+4+1 jer prirodni tekst prelom "pojede" red pre grid granice). 2 kolone × 5
       redova je citljivo i dovoljno za tap na svakoj sirini telefona. — */
    .dp-subtabs { grid-template-columns: repeat(2, 1fr); }
  }
