/* ==========================================================================
   GAINER HUNTER (momentum) - stilovi odvojeni od glavnog 15m radara.
   Akcentna boja: ljubičasta (spajk) + narandžasta (hitan izlaz), da se ne meša sa zelenim radarom.
   ========================================================================== */

:root {
    --violet: #a78bfa;
    --violet-strong: #8b5cf6;
    --violet-soft: rgba(167, 139, 250, 0.14);
    --violet-line: rgba(167, 139, 250, 0.5);
}

.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-yellow { color: var(--yellow); }
.text-violet { color: var(--violet); }

/* ---------- Prekidač pogleda ---------- */

.view-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
    padding: 6px;
    border-radius: 18px;
    background: rgba(148, 163, 184, 0.06);
    border: 1px solid var(--line);
}
.view-tab {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid transparent;
    border-radius: 13px;
    background: transparent;
    color: var(--muted);
    font-family: var(--font);
    text-align: left;
    cursor: pointer;
    transition: 0.2s;
}
.view-tab .icon { font-size: 24px; flex-shrink: 0; }
.view-tab-text { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.25; }
.view-tab-text strong { font-size: 13px; font-weight: 800; letter-spacing: 0.04em; }
.view-tab-text small { font-size: 11px; opacity: 0.8; }
.view-tab:hover { color: var(--text-strong); background: rgba(148, 163, 184, 0.06); }
.view-tab.active { background: var(--surface-2); color: var(--green); border-color: var(--green-line); box-shadow: 0 6px 26px rgba(0, 242, 165, 0.1); }
.view-tab-momentum.active { color: var(--violet); border-color: var(--violet-line); box-shadow: 0 6px 26px rgba(167, 139, 250, 0.16); }
.view-tab .tab-count { min-width: 26px; text-align: center; }
.view-tab-momentum .tab-count.has-open { background: var(--violet); color: #12091f; animation: gh-pulse 1.6s ease-in-out infinite; }
.view[hidden] { display: none; }
.view { animation: fade-in 0.2s ease-out; }

/* ---------- Hero i pravila ---------- */

.gh-hero { margin-bottom: 18px; border-color: var(--violet-line); box-shadow: 0 0 40px rgba(167, 139, 250, 0.1); background: linear-gradient(120deg, rgba(167, 139, 250, 0.12), transparent 60%), var(--surface); }
.gh-hero-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.gh-title { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; color: var(--text-strong); letter-spacing: 0.01em; }
.gh-title .icon { color: var(--violet); font-size: 24px; }
.gh-title span { color: var(--violet); font-weight: 700; font-size: 14px; letter-spacing: 0.08em; }
.gh-sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.gh-rules { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.gh-chip { display: inline-flex; align-items: baseline; gap: 7px; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--text-strong); background: rgba(5, 8, 13, 0.45); border: 1px solid var(--line-strong); }
.gh-chip em { font-style: normal; color: var(--violet); font-weight: 800; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; }

.live-dot.gh-ok { background: var(--violet); box-shadow: 0 0 10px var(--violet); }
.live-dot.gh-wait { background: var(--yellow); box-shadow: 0 0 10px var(--yellow); }
.live-dot.gh-warn { background: var(--orange); box-shadow: 0 0 10px var(--orange); }
.live-dot.gh-err { background: var(--red); box-shadow: 0 0 10px var(--red); animation: none; }

.kpi-momentum { border-color: var(--violet-line); box-shadow: 0 0 40px rgba(167, 139, 250, 0.1); }
.kpi-momentum::after { background: linear-gradient(90deg, transparent, var(--violet), transparent); }
.kpi-momentum .kpi-label .icon { color: var(--violet); }
.kpi-momentum .kpi-value { color: var(--violet); }

/* ---------- Tabela ---------- */

.momentum-card { border-color: var(--violet-line); box-shadow: 0 0 0 1px rgba(167, 139, 250, 0.12), 0 8px 40px rgba(167, 139, 250, 0.08); }
.momentum-card .table-head { background: linear-gradient(90deg, rgba(167, 139, 250, 0.12), transparent 70%); }
.momentum-card .table-title h2 .icon { color: var(--violet); }
.tab-momentum.active { color: var(--violet); box-shadow: inset 0 0 0 1px var(--violet-line); }
.tab-momentum .tab-count { background: var(--violet-soft); color: var(--violet); }

.momentum-table td { vertical-align: middle; }
.momentum-table .coin-box { gap: 11px; }
.coin-icon-m { background: linear-gradient(135deg, #2a1f4a, #1a1530); border-color: var(--violet-line); color: var(--violet); }
.btn-binance-inline { margin-left: 4px; padding: 6px 10px; font-size: 11px; }
.btn-binance-inline .icon { font-size: 12px; }

.row-m-spike { background: rgba(167, 139, 250, 0.06); box-shadow: inset 3px 0 0 var(--violet); }
.row-m-rising { background: rgba(0, 242, 165, 0.045); box-shadow: inset 3px 0 0 var(--green); }
.row-m-take-profit { box-shadow: inset 3px 0 0 var(--yellow); }
.row-m-take-profit td, .row-m-stopped td { opacity: 0.88; }
.row-m-stopped { box-shadow: inset 3px 0 0 var(--red); }

.badge-spike { color: var(--violet); background: var(--violet-soft); border-color: var(--violet-line); animation: gh-pulse 1.8s ease-in-out infinite; }
.badge-rising { color: #03140e; background: linear-gradient(135deg, var(--green), #38e8d0); border-color: var(--green); box-shadow: 0 0 16px rgba(0, 242, 165, 0.4); }
.badge-takeprofit { color: #1a1300; background: linear-gradient(135deg, var(--yellow), #ffd75a); border-color: var(--yellow); box-shadow: 0 0 16px rgba(240, 185, 11, 0.35); }

.thr-line { display: flex; align-items: baseline; gap: 8px; line-height: 1.7; }
.thr-label { color: var(--muted); font-size: 11px; min-width: 86px; }
.thr-trail { color: var(--yellow); font-variant-numeric: tabular-nums; }
.thr-be { color: var(--text-strong); font-variant-numeric: tabular-nums; }
.thr-be.armed { color: var(--green); }
.thr-state { font-size: 10.5px; color: var(--muted); font-weight: 700; }
.thr-state.armed { color: var(--green); }
.thr-closed { color: var(--text-strong); font-weight: 600; white-space: normal; max-width: 260px; }

.btn-chart {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 13px;
    border-radius: 10px;
    border: 1px solid var(--violet-line);
    background: var(--violet-soft);
    color: var(--violet);
    font: 800 12px var(--font);
    cursor: pointer;
    white-space: nowrap;
    transition: 0.2s;
}
.btn-chart:hover { background: rgba(167, 139, 250, 0.26); color: #fff; }
.empty-icon { display: block; margin: 0 auto 10px; font-size: 30px; color: var(--violet); }

/* ---------- Modal ---------- */

.mm-interval { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 12px; border-radius: 999px; background: rgba(148, 163, 184, 0.07); }
.mm-interval .tab.active { color: var(--violet); box-shadow: inset 0 0 0 1px var(--violet-line); }

/* ---------- Upozorenja ---------- */

.alert-mbuy { --tone: var(--violet); }
.alert-msell { --tone: var(--orange); }
.test-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.test-grid .btn { min-width: 0; white-space: normal; line-height: 1.2; text-align: center; }
.btn-test-mbuy { color: var(--violet); border-color: var(--violet-line); background: var(--violet-soft); }
.btn-test-msell { color: var(--orange); border-color: rgba(251, 146, 60, 0.45); background: rgba(251, 146, 60, 0.12); }

@keyframes gh-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(167, 139, 250, 0.45); } 50% { box-shadow: 0 0 0 6px rgba(167, 139, 250, 0); } }

/* ---------- Telefon ---------- */

@media (max-width: 860px) {
    .view-switch { gap: 6px; padding: 5px; border-radius: 16px; }
    .view-tab { padding: 10px 10px; gap: 8px; }
    .view-tab .icon { font-size: 20px; }
    .view-tab-text strong { font-size: 11px; letter-spacing: 0.02em; }
    .view-tab-text small { display: none; }
    .gh-title { font-size: 16px; }
    .gh-title span { display: block; font-size: 11px; }
    .gh-chip { font-size: 11px; padding: 4px 9px; }
    .momentum-table td.cell-coin .coin-box { flex-wrap: wrap; }
    .momentum-table td.cell-coin .btn-binance-inline { margin-left: auto; padding: 9px 13px; font-size: 12px; }
    .momentum-table td.cell-action .btn-chart { width: 100%; justify-content: center; padding: 11px; }
    .thr-closed { max-width: none; }
    .row-m-spike, .row-m-rising, .row-m-take-profit, .row-m-stopped { box-shadow: none; }
    .data-table tr.row-m-spike { background: rgba(167, 139, 250, 0.09); border-left: 3px solid var(--violet) !important; }
    .data-table tr.row-m-rising { border-left: 3px solid var(--green) !important; }
    .data-table tr.row-m-take-profit { border-left: 3px solid var(--yellow) !important; }
    .data-table tr.row-m-stopped { border-left: 3px solid var(--red) !important; }
    .momentum-card .table-head { flex-direction: column; align-items: stretch; }
}

@media (max-width: 380px) {
    .view-tab .tab-count { display: none; }
}
