/* Pocket Option–style live board on the home tab */
.po-home {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 8px 14px 18px;
    box-sizing: border-box;
}
/* График только после анализа в сигнале, не на главной вкладке */
.po-home .po-board,
.po-home .po-zoom {
    display: none !important;
}
.sig-live-stage {
    margin: 0 0 10px;
}
.sig-chart-wrap {
    position: relative;
    margin: 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #0e1624;
}
.signal-chart-board {
    height: 286px;
    margin: 0;
    border-radius: 0;
    overflow: hidden;
    border: none;
    background: #0e1624;
    touch-action: none;
}
.sig-po-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    overflow: hidden;
}
.sig-entry-mark {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    z-index: 5;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,.45));
    pointer-events: none;
}
.sig-entry-mark.up { transform: translate(0, 0); }
.sig-entry-mark.dn { transform: translate(0, -100%); }
.sig-entry-arrow {
    width: 0;
    height: 0;
}
.sig-entry-mark.up .sig-entry-arrow {
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 9px solid #00c853;
}
.sig-entry-mark.dn .sig-entry-arrow {
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 9px solid #ef4664;
    order: 2;
}
.sig-entry-mark.dn .sig-entry-tag { order: 1; }
.sig-entry-tag {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.01em;
    padding: 4px 10px;
    border-radius: 10px;
    color: #fff;
    line-height: 1.15;
    border: 1px solid rgba(255,255,255,.28);
}
.sig-entry-mark.up .sig-entry-tag {
    background: #00c853;
    border-color: #14e06a;
}
.sig-entry-mark.dn .sig-entry-tag {
    background: #ef4664;
    border-color: #ff6b81;
}
.sig-scan {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 4;
    overflow: hidden;
}
.sig-scan-beam {
    position: absolute;
    top: -8%;
    bottom: -8%;
    width: 36%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(56, 189, 248, 0.04) 28%,
        rgba(56, 189, 248, 0.42) 50%,
        rgba(56, 189, 248, 0.04) 72%,
        transparent 100%);
    animation: sigScanX 1.65s ease-in-out infinite;
    mix-blend-mode: screen;
}
.sig-scan-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #38bdf8, transparent);
    box-shadow: 0 0 14px #38bdf8;
    animation: sigScanY 2.15s ease-in-out infinite alternate;
}
.sig-scan-hud {
    position: absolute;
    left: 10px;
    top: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
    font-weight: 700;
    color: #d7e8ff;
    text-shadow: 0 1px 6px #000;
}
.sig-scan-live {
    color: #20c997;
    font-size: 10px;
    letter-spacing: 0.06em;
    font-weight: 800;
}
.sig-scan-live::before {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 5px;
    border-radius: 50%;
    background: #20c997;
    box-shadow: 0 0 8px #20c997;
    animation: sigScanDot 0.9s ease-in-out infinite;
    vertical-align: middle;
}
@keyframes sigScanX {
    0% { transform: translateX(-90%); }
    100% { transform: translateX(290%); }
}
@keyframes sigScanY {
    0% { top: 10%; }
    100% { top: 88%; }
}
@keyframes sigScanDot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.25; }
}
.po-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.po-toolbar-2 {
    margin-bottom: 6px;
    justify-content: space-between;
}
.po-pair {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 6px 10px 6px 6px;
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 700;
    text-align: start;
    cursor: pointer;
}
.po-pair-ico {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.po-pair-ico .pair-ico,
.po-pair-ico .avatar {
    width: 28px;
    height: 28px;
    font-size: 8px;
}
.po-pair-ico .pair-ico img {
    top: 3px;
    width: 20px;
    height: 20px;
}
.po-pair-ico .pair-ico.stack img:last-child { left: 8px; }
.po-pair-ico .pair-ico.single img {
    top: 0; left: 0;
    width: 28px; height: 28px;
}
.po-pair-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.po-pair-caret { margin-left: auto; opacity: .55; flex-shrink: 0; }

.po-exp-wrap { position: relative; flex-shrink: 0; }
.po-exp {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 76px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px 10px;
    color: var(--text);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}
.po-exp-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 30;
    min-width: 132px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 12px 32px rgba(0,0,0,.35);
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.po-exp-menu.hidden { display: none; }
.po-exp-item {
    border: 0;
    background: transparent;
    color: var(--text);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 700;
    text-align: start;
    padding: 9px 10px;
    border-radius: 8px;
    cursor: pointer;
}
.po-exp-item.on,
.po-exp-item:active { background: var(--surface); color: var(--accent); }

.po-live {
    display: flex; align-items: center; gap: 6px;
    font-size: 11px; font-weight: 800; letter-spacing: .06em;
    color: #2BBA82; flex-shrink: 0;
    padding: 6px 2px 6px 6px;
}
.po-live i {
    width: 7px; height: 7px; border-radius: 50%; background: #2BBA82;
    box-shadow: 0 0 0 0 rgba(43, 186, 130, .7);
    animation: po-pulse 1.4s ease-out infinite;
}
@keyframes po-pulse {
    0% { box-shadow: 0 0 0 0 rgba(43, 186, 130, .55); }
    100% { box-shadow: 0 0 0 8px rgba(43, 186, 130, 0); }
}
.po-quote {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 2px 2px 8px;
    font-variant-numeric: tabular-nums;
    min-height: 34px;
}
.po-last {
    font-size: 26px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.03em;
    line-height: 1;
}
.po-chg {
    font-size: 13px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 8px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    align-self: center;
}
.po-chg.up { color: var(--up); background: rgba(31, 169, 113, .14); }
.po-chg.dn { color: var(--down); background: rgba(229, 72, 77, .14); }

.po-zoom {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.po-zoom button {
    width: 32px; height: 32px;
    border: 0;
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.po-board {
    position: relative;
    flex: 1;
    min-height: 340px;
    height: 52vh;
    background: #0e1624;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(8, 12, 24, .28);
    touch-action: none;
    user-select: none;
}
.po-board .tv-lightweight-charts { width: 100% !important; height: 100% !important; }
.po-board a[href*="tradingview"],
.po-board a[href*="TradingView"],
.po-board #tv-attr-logo {
    display: none !important;
}

.po-actions { display: flex; gap: 8px; margin-top: 12px; }
.po-actions .btn {
    flex: 1;
    width: auto;
    margin-top: 0;
    padding: 12px 10px;
    font-size: 14px;
}

@media (max-height: 700px) {
    .po-board { min-height: 260px; height: 44vh; }
}
