/* ── Alerts page overrides ─────────────────────────────────────────── */
.al-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    height: calc(100vh - 48px - 44px);
    /* topbar + info panel */
    overflow: hidden;
}

/* ── Alert list sidebar ────────────────────────────────────────────── */
.al-list {
    overflow-y: auto;
    flex: 1;
}

.al-card {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background .14s;
}

.al-card:hover {
    background: var(--bg3);
}

.al-card.active {
    background: var(--bg3);
    border-left: 2px solid var(--accent);
}

.al-header-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.al-pair {
    font-size: 14px;
    font-weight: 700;
    color: var(--text1);
}

.al-time {
    font-size: 10px;
    color: var(--text3);
    margin-top: 2px;
}

.al-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    border-radius: 4px;
    padding: 2px 7px;
    font-weight: 600;
    margin-top: 5px;
}

.al-badge.bull {
    background: #0d2e1a;
    color: #4caf50;
}

.al-badge.bear {
    background: #2e0d0d;
    color: #ef5350;
}

.al-badge.smt {
    background: #1a1a3a;
    color: #8a64ff;
    margin-left: 4px;
}

.al-prices {
    font-size: 10px;
    color: var(--text3);
    margin-top: 3px;
}

.al-empty {
    padding: 32px 16px;
    text-align: center;
    color: var(--text3);
    font-size: 12px;
    line-height: 1.9;
}

/* ── Right pane ────────────────────────────────────────────────────── */
.al-detail {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.al-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text3);
}

.al-placeholder svg {
    opacity: .25;
}

.al-placeholder h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
}

/* detail header */
.al-detail-header {
    padding: 12px 16px 8px;
    border-bottom: 1px solid var(--border);
    background: var(--bg2);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.al-detail-pair {
    font-size: 18px;
    font-weight: 700;
    color: var(--text1);
}

.al-detail-time {
    font-size: 11px;
    color: var(--text3);
    margin-left: auto;
}

/* stat grid */
.al-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.stat-box {
    background: var(--bg3);
    border-radius: 8px;
    padding: 8px 12px;
}

.stat-label {
    font-size: 10px;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 600;
}

.stat-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--text1);
    margin-top: 2px;
}

.stat-value.bull {
    color: var(--bull);
}

.stat-value.bear {
    color: var(--bear);
}

.stat-value.accent {
    color: var(--accent);
}

.stat-value.fvg {
    color: #64b4ff;
}

.stat-value.smt {
    color: #8a64ff;
}

.stat-value.tp {
    color: var(--tp);
}

/* badge row in detail */
.al-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

/* pair filter */
.al-filter {
    display: flex;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    align-items: center;
}

.al-filter input {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 4px 10px;
    color: var(--text1);
    font-size: 12px;
    outline: none;
    width: 120px;
}

.al-filter input:focus {
    border-color: var(--accent);
}

.al-count {
    font-size: 11px;
    color: var(--text3);
    margin-left: auto;
}

/* chart area */
.al-chart-area {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.al-tf-bar {
    display: flex;
    gap: 4px;
    padding: 5px 10px;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    align-items: center;
    flex-shrink: 0;
}

.al-chart-inner {
    flex: 1;
    min-height: 0;
    position: relative;
}

#al-tv-chart {
    width: 100%;
    height: 100%;
}

.al-chart-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text3);
    font-size: 12px;
    pointer-events: none;
    background: rgba(14, 15, 17, .6);
}

.al-chart-overlay.hidden {
    display: none !important;
}

.legend {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-left: 8px;
}

.leg-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: var(--text3);
}

.leg-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* responsive narrow screen */
@media (max-width: 680px) {
    .al-grid {
        grid-template-columns: 1fr;
    }
}