/* «Пульс Системы» — в тон сайта (noir: латунь, манила, лёгкий cyan-акцент) */

.transactions-sidebar-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.live-right-rail {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
    position: sticky;
    top: 20px;
    align-self: start;
}

.agent-pulse-block {
    position: relative;
    background: linear-gradient(165deg, rgba(22, 26, 34, 0.94) 0%, rgba(18, 20, 28, 0.97) 100%);
    border-radius: 14px;
    padding: 16px 14px 14px;
    border: 1px solid rgba(90, 82, 70, 0.45);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 8px 28px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    transition: border-color 0.45s ease, box-shadow 0.45s ease, background 0.45s ease;
}

.agent-pulse-block--hot {
    border-color: rgba(196, 163, 90, 0.55);
    box-shadow:
        inset 0 1px 0 rgba(255, 248, 231, 0.08),
        0 0 0 1px rgba(61, 212, 232, 0.2),
        0 0 28px rgba(196, 163, 90, 0.2),
        0 0 40px rgba(61, 212, 232, 0.12),
        0 8px 28px rgba(0, 0, 0, 0.5);
    background: linear-gradient(165deg, rgba(42, 36, 28, 0.75) 0%, rgba(22, 26, 34, 0.96) 100%);
}

.agent-pulse-glow {
    position: absolute;
    inset: -40% -20%;
    background:
        radial-gradient(ellipse at 50% 10%, rgba(196, 163, 90, 0.14), transparent 52%),
        radial-gradient(ellipse at 50% 90%, rgba(61, 212, 232, 0.06), transparent 48%);
    pointer-events: none;
    z-index: 0;
}

.agent-pulse-block > *:not(.agent-pulse-glow) {
    position: relative;
    z-index: 1;
}

.agent-pulse-avatar {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
}

.agent-pulse-orb {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: radial-gradient(
        circle at 34% 28%,
        #f0e6d4 0%,
        #c4a35a 38%,
        #8a7038 72%,
        #2a2118 100%
    );
    box-shadow:
        0 0 18px rgba(196, 163, 90, 0.45),
        0 0 36px rgba(61, 212, 232, 0.12),
        inset 0 2px 10px rgba(255, 255, 255, 0.22),
        inset 0 -6px 14px rgba(0, 0, 0, 0.35);
    animation: agent-breathe 3.2s ease-in-out infinite;
}

@keyframes agent-breathe {
    0%, 100% {
        transform: scale(1);
        box-shadow:
            0 0 16px rgba(196, 163, 90, 0.38),
            0 0 32px rgba(61, 212, 232, 0.08),
            inset 0 2px 10px rgba(255, 255, 255, 0.2),
            inset 0 -6px 14px rgba(0, 0, 0, 0.32);
    }
    50% {
        transform: scale(1.06);
        box-shadow:
            0 0 26px rgba(196, 163, 90, 0.58),
            0 0 48px rgba(61, 212, 232, 0.16),
            inset 0 2px 12px rgba(255, 255, 255, 0.28),
            inset 0 -6px 16px rgba(0, 0, 0, 0.38);
    }
}

.agent-pulse-badge {
    margin-top: 8px;
    font-size: 9px;
    letter-spacing: 0.14em;
    font-weight: 700;
    color: #86c9b1;
    text-shadow: 0 0 10px rgba(61, 212, 232, 0.35);
}

.agent-pulse-title {
    font-family: var(--font-title, 'Cinzel', Georgia, serif);
    font-size: 15px;
    font-weight: 700;
    color: #f5f0e6;
    text-align: center;
    margin-bottom: 2px;
    line-height: 1.2;
    text-shadow: 0 0 18px rgba(255, 248, 231, 0.18), 0 1px 2px rgba(0, 0, 0, 0.75);
}

.agent-pulse-sub {
    font-size: 11px;
    color: #b8a88a;
    text-align: center;
    margin-bottom: 12px;
}

.agent-pulse-marquee-wrap {
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(18, 16, 14, 0.75);
    border: 1px solid rgba(90, 82, 70, 0.4);
    padding: 6px 0;
    margin-bottom: 10px;
}

.agent-pulse-marquee {
    display: block;
    white-space: nowrap;
}

.agent-pulse-marquee-inner {
    display: inline-block;
    white-space: nowrap;
    animation: agent-marquee 32s linear infinite;
    font-family: var(--font-mono, 'Share Tech Mono', monospace);
    font-size: 10px;
    color: #c9b896;
    letter-spacing: 0.04em;
}

.agent-pulse-marquee-inner--paused {
    animation-play-state: paused;
}

@keyframes agent-marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.agent-pulse-feed {
    max-height: 120px;
    overflow-y: auto;
    font-size: 10px;
    line-height: 1.45;
    color: #a89f8e;
    margin-bottom: 8px;
}

.agent-pulse-feed-line {
    padding: 3px 0;
    border-bottom: 1px solid rgba(90, 82, 70, 0.35);
}

.agent-pulse-feed-line:first-child { padding-top: 0; }
.agent-pulse-feed-line:last-child { border-bottom: none; }

.agent-pulse-insight-area {
    border-radius: 8px;
    padding: 8px 10px;
    background: rgba(18, 16, 14, 0.72);
    border: 1px solid transparent;
    min-height: 0;
    opacity: 0.45;
    max-height: 0;
    overflow: hidden;
    padding-top: 0;
    padding-bottom: 0;
    transition: opacity 0.4s ease, max-height 0.45s ease, border-color 0.3s, padding 0.3s;
}

.agent-pulse-insight-area--on {
    opacity: 1;
    max-height: 200px;
    padding: 8px 10px;
    border-color: rgba(196, 163, 90, 0.45);
    box-shadow: inset 0 0 0 1px rgba(61, 212, 232, 0.12);
}

.agent-pulse-insight-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #7d7364;
    margin-bottom: 4px;
}

.agent-pulse-insight-text {
    font-size: 12px;
    line-height: 1.45;
    color: #d4c4a8;
    font-style: italic;
}

.agent-pulse-cursor {
    display: inline;
    color: #c4a35a;
    animation: agent-blink 0.9s step-end infinite;
}

@keyframes agent-blink {
    50% { opacity: 0; }
}

/* Явная привязка к теме admin-noir (переменные с html) */
html.admin-noir-global .agent-pulse-block {
    background: linear-gradient(180deg, var(--noir-panel) 0%, rgba(18, 16, 14, 0.96) 100%);
    border-color: var(--noir-border);
}

html.admin-noir-global .agent-pulse-title {
    color: var(--noir-glow-title);
}

html.admin-noir-global .agent-pulse-sub {
    color: var(--noir-manila);
}

html.admin-noir-global .agent-pulse-marquee-inner {
    color: var(--noir-paper);
}

html.admin-noir-global .agent-pulse-feed {
    color: var(--noir-text-muted);
}

html.admin-noir-global .agent-pulse-insight-text {
    color: var(--noir-paper);
}

html.admin-noir-global .agent-pulse-insight-label {
    color: rgba(180, 170, 150, 0.55);
}

html.admin-noir-global .agent-pulse-marquee-wrap {
    background: var(--noir-input-bg);
    border-color: var(--noir-input-border);
}

html.admin-noir-global .agent-pulse-badge {
    color: var(--noir-accent);
    text-shadow: 0 0 12px var(--noir-accent-dim);
}

html.admin-noir-global .agent-pulse-cursor {
    color: var(--noir-brass);
}

@media (max-width: 1400px) {
    .transactions-sidebar-column {
        grid-column: 1 / -1;
    }
}
