:root {
    color-scheme: dark;
    --bg: #020711;
    --surface: #06111f;
    --surface-2: #091a2c;
    --line: rgba(52, 169, 255, 0.18);
    --line-strong: rgba(52, 169, 255, 0.48);
    --blue: #25a8ff;
    --blue-soft: #85d2ff;
    --text: #edf8ff;
    --muted: #7893a8;
    --green: #32dc91;
    --red: #ff6474;
    --amber: #ffc85a;
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--bg);
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 82% 8%, rgba(0, 126, 255, 0.13), transparent 30%),
        radial-gradient(circle at 15% 90%, rgba(0, 82, 160, 0.12), transparent 32%),
        var(--bg);
    font-family:
        Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;
}

button,
input,
select {
    font: inherit;
}

.app-shell {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    grid-template-rows: 82px minmax(calc(100vh - 128px), auto) 46px;
    grid-template-areas:
        "topbar topbar"
        "sidebar content"
        "footer footer";
    min-height: 100vh;
}

.topbar {
    grid-area: topbar;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    border-bottom: 1px solid var(--line);
    background: rgba(2, 9, 20, 0.88);
    backdrop-filter: blur(16px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 13px;
}

.brand-mark {
    display: grid;
    width: 43px;
    height: 43px;
    place-items: center;
    border: 1px solid var(--blue);
    border-radius: 12px;
    color: var(--blue);
    background: rgba(0, 126, 255, 0.1);
    box-shadow:
        inset 0 0 18px rgba(0, 126, 255, 0.16),
        0 0 18px rgba(0, 126, 255, 0.14);
    font-size: 22px;
    font-weight: 900;
}

.brand h1 {
    margin: 0;
    color: var(--text);
    font-size: 20px;
    letter-spacing: 0.19em;
}

.brand p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.system-state {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-size: 13px;
}

.state-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--amber);
    box-shadow: 0 0 10px currentColor;
}

.system-state.online .state-dot {
    background: var(--green);
}

.system-state.offline .state-dot {
    background: var(--red);
}

.sidebar {
    grid-area: sidebar;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 24px 18px;
    border-right: 1px solid var(--line);
    background: rgba(4, 13, 25, 0.72);
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: var(--blue-soft);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.counter {
    min-width: 25px;
    padding: 3px 7px;
    border: 1px solid var(--line);
    border-radius: 99px;
    color: var(--blue);
    text-align: center;
}

.instrument-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.instrument-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 14px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.018);
}

.instrument-item:hover {
    border-color: var(--line);
    background: rgba(37, 168, 255, 0.055);
}

.instrument-symbol {
    font-size: 13px;
    font-weight: 850;
    letter-spacing: 0.07em;
}

.instrument-class {
    color: var(--muted);
    font-size: 10px;
    text-transform: uppercase;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--green);
    font-size: 11px;
}

.status-badge::before {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    content: "";
}

.sidebar-note {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: auto;
    padding: 14px;
    border: 1px solid rgba(255, 200, 90, 0.18);
    border-radius: 12px;
    background: rgba(255, 200, 90, 0.04);
}

.sidebar-note strong {
    color: var(--amber);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sidebar-note span {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}

.content {
    grid-area: content;
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 38px;
}

.hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 28px;
}

.eyebrow {
    color: var(--blue);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.18em;
}

.hero h2 {
    margin: 8px 0 10px;
    font-size: clamp(27px, 3vw, 42px);
    letter-spacing: -0.035em;
}

.hero p {
    max-width: 660px;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.last-update {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    gap: 5px;
    text-align: right;
}

.last-update span {
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.last-update strong {
    color: var(--blue-soft);
    font-size: 13px;
}

.opportunity-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}

.opportunity,
.panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(145deg, rgba(10, 28, 47, 0.88), rgba(4, 14, 26, 0.92));
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

.opportunity {
    position: relative;
    display: flex;
    min-height: 190px;
    gap: 22px;
    padding: 26px;
    overflow: hidden;
}

.opportunity::after {
    position: absolute;
    right: -50px;
    bottom: -70px;
    width: 170px;
    height: 170px;
    border: 1px solid var(--line);
    border-radius: 50%;
    content: "";
}

.opportunity.empty {
    border-style: dashed;
}

.rank {
    color: rgba(37, 168, 255, 0.35);
    font-size: 32px;
    font-weight: 900;
}

.opportunity h3 {
    margin: 5px 0 9px;
    font-size: 19px;
}

.opportunity p {
    max-width: 390px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.panel {
    padding: 22px;
}

.table-wrap {
    margin-top: 18px;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 12px;
    border-bottom: 1px solid rgba(52, 169, 255, 0.1);
    text-align: left;
}

th {
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

td {
    color: #c9ddea;
    font-size: 13px;
}

td:first-child {
    color: var(--blue-soft);
    font-weight: 800;
    letter-spacing: 0.05em;
}

.loading,
.muted {
    color: var(--muted);
}

.loading {
    padding: 16px;
    font-size: 12px;
}

.footer {
    grid-area: footer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 28px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    background: rgba(2, 9, 20, 0.9);
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

@media (max-width: 850px) {
    .app-shell {
        grid-template-columns: 1fr;
        grid-template-rows: 72px auto 1fr auto;
        grid-template-areas:
            "topbar"
            "sidebar"
            "content"
            "footer";
    }

    .sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .instrument-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sidebar-note {
        display: none;
    }

    .content {
        padding: 26px 18px;
    }

    .hero,
    .footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .last-update {
        text-align: left;
    }

    .opportunity-grid {
        grid-template-columns: 1fr;
    }

    .footer {
        padding: 16px 20px;
    }
}

@media (max-width: 520px) {
    .topbar {
        padding: 0 16px;
    }

    .brand p {
        display: none;
    }

    .system-state {
        font-size: 11px;
    }

    .instrument-list {
        grid-template-columns: 1fr;
    }

    .opportunity {
        min-height: 160px;
        padding: 20px;
    }
}


.opportunity.result {
    min-height: 390px;
}

.opportunity.result.open {
    border-color: rgba(50, 220, 145, 0.4);
}

.opportunity.result.closed {
    border-color: rgba(255, 200, 90, 0.28);
}

.opportunity.result.delayed {
    border-color: rgba(255, 100, 116, 0.4);
}

.opportunity-body {
    position: relative;
    z-index: 1;
    width: 100%;
    min-width: 0;
}

.opportunity-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.opportunity-heading h3 {
    margin: 3px 0 4px;
    color: var(--text);
    font-size: 22px;
    letter-spacing: 0.07em;
}

.instrument-name {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.badge-row {
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    gap: 7px;
}

.market-badge,
.direction-badge {
    padding: 5px 8px;
    border: 1px solid;
    border-radius: 7px;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.market-badge.open {
    border-color: rgba(50, 220, 145, 0.35);
    color: var(--green);
    background: rgba(50, 220, 145, 0.08);
}

.market-badge.closed {
    border-color: rgba(255, 200, 90, 0.3);
    color: var(--amber);
    background: rgba(255, 200, 90, 0.07);
}

.market-badge.delayed,
.market-badge.unknown {
    border-color: rgba(255, 100, 116, 0.3);
    color: var(--red);
    background: rgba(255, 100, 116, 0.07);
}

.direction-badge.long {
    border-color: rgba(50, 220, 145, 0.25);
    color: var(--green);
    background: rgba(50, 220, 145, 0.05);
}

.direction-badge.short {
    border-color: rgba(255, 100, 116, 0.25);
    color: var(--red);
    background: rgba(255, 100, 116, 0.05);
}

.score-row {
    display: grid;
    grid-template-columns: auto minmax(80px, 1fr) auto;
    align-items: center;
    gap: 12px;
    margin: 24px 0 18px;
}

.score-row span {
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.score-row strong {
    color: var(--blue-soft);
    font-size: 13px;
}

.score-track {
    height: 5px;
    overflow: hidden;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.06);
}

.score-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #087cff, #32dc91);
    box-shadow: 0 0 12px rgba(37, 168, 255, 0.45);
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.metric {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    border: 1px solid rgba(52, 169, 255, 0.1);
    border-radius: 9px;
    background: rgba(1, 8, 16, 0.36);
}

.metric span {
    color: var(--muted);
    font-size: 8px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.metric strong {
    color: #d9effc;
    font-size: 12px;
}

.reason-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin: 17px 0 0;
    padding: 0;
    list-style: none;
}

.reason-list li {
    position: relative;
    padding-left: 14px;
    color: #9eb7c9;
    font-size: 11px;
    line-height: 1.4;
}

.reason-list li::before {
    position: absolute;
    top: 0.48em;
    left: 0;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--blue);
    content: "";
}

.reason-list li:first-child {
    color: var(--amber);
}

.candle-time {
    margin-top: 16px;
    color: #607b91;
    font-size: 9px;
    letter-spacing: 0.04em;
}

@media (max-width: 1180px) {
    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .opportunity-heading {
        flex-direction: column;
    }

    .badge-row {
        align-items: flex-start;
    }

    .score-row {
        grid-template-columns: 1fr auto;
    }

    .score-track {
        grid-column: 1 / -1;
        grid-row: 2;
    }
}


/* Čitelnost dashboardu */
.section-heading {
    font-size: 14px;
}

.instrument-symbol {
    font-size: 16px;
}

.instrument-class {
    font-size: 12px;
}

.status-badge {
    font-size: 13px;
}

.hero p {
    font-size: 16px;
}

.last-update span {
    font-size: 12px;
}

.last-update strong {
    font-size: 15px;
}

.opportunity.result {
    min-height: 430px;
}

.opportunity-heading h3 {
    font-size: 26px;
}

.instrument-name {
    font-size: 15px;
}

.market-badge,
.direction-badge {
    padding: 7px 10px;
    font-size: 11px;
}

.score-row span {
    font-size: 12px;
}

.score-row strong {
    font-size: 16px;
}

.metric {
    min-height: 68px;
    padding: 13px;
}

.metric span {
    font-size: 10px;
}

.metric strong {
    font-size: 16px;
}

.reason-list {
    gap: 10px;
    margin-top: 21px;
}

.reason-list li {
    padding-left: 17px;
    font-size: 14px;
    line-height: 1.5;
}

.reason-list li::before {
    width: 7px;
    height: 7px;
}

.candle-time {
    margin-top: 20px;
    font-size: 12px;
}

th {
    font-size: 12px;
}

td {
    font-size: 15px;
}

.sidebar-note strong {
    font-size: 13px;
}

.sidebar-note span {
    font-size: 13px;
}

.footer {
    font-size: 12px;
}

/* Zavřený trh musí být jednoznačně červený */
.opportunity.result.closed {
    border-color: rgba(255, 100, 116, 0.52);
}

.market-badge.closed {
    border-color: rgba(255, 100, 116, 0.55);
    color: var(--red);
    background: rgba(255, 100, 116, 0.12);
    box-shadow: 0 0 13px rgba(255, 100, 116, 0.12);
}

.opportunity.result.closed .reason-list li:first-child {
    color: var(--red);
    font-weight: 750;
}


/* SIGNAL 0.4 - složky a čtyři TOP 2 sekce */

.app-shell {
    grid-template-columns: 290px minmax(0, 1fr);
}

.sidebar {
    gap: 14px;
    overflow-y: auto;
}

.main-navigation,
.folder-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.navigation-item,
.folder-item,
.folder-parent {
    width: 100%;
    border: 1px solid transparent;
    color: var(--text);
    background: transparent;
    cursor: pointer;
    text-align: left;
}

.navigation-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-color: var(--line-strong);
    border-radius: 12px;
    background: rgba(37, 168, 255, 0.09);
    font-size: 15px;
    font-weight: 750;
}

.navigation-icon {
    color: var(--blue);
}

.navigation-label {
    margin: 14px 8px 2px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.folder-item,
.folder-parent {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
    padding: 11px 13px;
    border-radius: 11px;
}

.folder-item:hover,
.folder-parent:hover {
    border-color: var(--line);
    background: rgba(37, 168, 255, 0.06);
}

.folder-item.nested {
    width: calc(100% - 14px);
    min-height: 51px;
    margin-left: 14px;
    border-left: 2px solid rgba(37, 168, 255, 0.18);
    border-radius: 0 10px 10px 0;
}

.folder-identity {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.folder-identity strong,
.folder-parent strong {
    color: #ddecf7;
    font-size: 15px;
}

.folder-identity small {
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 0.08em;
}

.folder-count {
    display: grid;
    min-width: 30px;
    height: 25px;
    padding: 0 7px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 99px;
    color: var(--blue-soft);
    font-size: 12px;
}

.view {
    display: none;
}

.view.active {
    display: block;
}

.content {
    max-width: 1600px;
    padding: 34px 38px 50px;
}

.dashboard-section {
    margin-bottom: 28px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(5, 16, 29, 0.62);
}

.dashboard-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.dashboard-section-header > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dashboard-section-header h3 {
    margin: 0;
    color: var(--text);
    font-size: 19px;
    letter-spacing: 0.06em;
}

.section-code {
    color: var(--blue);
    font-size: 13px;
    font-weight: 900;
}

.dashboard-section-header button,
.catalog-header button,
.open-detail {
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--blue-soft);
    background: rgba(37, 168, 255, 0.05);
    cursor: pointer;
}

.dashboard-section-header button {
    padding: 9px 12px;
    font-size: 12px;
}

.dashboard-section-header button:hover,
.catalog-header button:hover,
.open-detail:hover {
    border-color: var(--blue);
    background: rgba(37, 168, 255, 0.11);
}

.top-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.top-card {
    position: relative;
    min-width: 0;
    min-height: 275px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background:
        linear-gradient(
            145deg,
            rgba(9, 28, 47, 0.9),
            rgba(3, 13, 24, 0.95)
        );
}

.top-card.open {
    border-color: rgba(50, 220, 145, 0.46);
}

.top-card.closed,
.top-card.delayed,
.top-card.unknown {
    border-color: rgba(255, 100, 116, 0.45);
}

.top-card.empty {
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-style: dashed;
    color: var(--muted);
}

.top-card.empty h4 {
    margin: 0 0 9px;
    color: #a8bfce;
    font-size: 18px;
}

.top-card.empty p {
    margin: 0;
    font-size: 14px;
}

.top-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.top-card-heading h4 {
    margin: 0 0 5px;
    color: var(--text);
    font-size: 23px;
    letter-spacing: 0.06em;
}

.top-card-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.top-card-badges {
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    gap: 7px;
}

.compact-score {
    display: grid;
    grid-template-columns: auto minmax(80px, 1fr) auto;
    align-items: center;
    gap: 12px;
    margin: 20px 0 16px;
}

.compact-score span {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

.compact-score strong {
    color: var(--blue-soft);
    font-size: 15px;
}

.compact-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.compact-metric {
    display: flex;
    min-width: 0;
    min-height: 62px;
    flex-direction: column;
    gap: 7px;
    padding: 10px;
    border: 1px solid rgba(52, 169, 255, 0.11);
    border-radius: 9px;
    background: rgba(0, 6, 13, 0.3);
}

.compact-metric span {
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.compact-metric strong {
    overflow: hidden;
    color: #dceefa;
    font-size: 14px;
    text-overflow: ellipsis;
}

.top-card-reason {
    min-height: 42px;
    margin: 16px 0 13px;
    color: #adc3d2;
    font-size: 13px;
    line-height: 1.5;
}

.top-card.closed .top-card-reason,
.top-card.delayed .top-card-reason,
.top-card.unknown .top-card-reason {
    color: var(--red);
}

.open-detail {
    padding: 8px 11px;
    font-size: 12px;
}

.loading-card {
    display: grid;
    min-height: 210px;
    place-items: center;
    border: 1px dashed var(--line);
    border-radius: 14px;
    color: var(--muted);
    font-size: 14px;
}

.catalog-header {
    margin-bottom: 26px;
}

.catalog-header button {
    margin-bottom: 23px;
    padding: 10px 13px;
}

.catalog-header h2 {
    margin: 8px 0;
    font-size: 34px;
}

.catalog-header p {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.catalog-card {
    display: flex;
    min-height: 165px;
    flex-direction: column;
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: 13px;
    color: var(--text);
    background:
        linear-gradient(
            145deg,
            rgba(9, 27, 45, 0.87),
            rgba(3, 13, 24, 0.92)
        );
    cursor: pointer;
    text-align: left;
}

.catalog-card:hover {
    border-color: var(--line-strong);
    transform: translateY(-1px);
}

.catalog-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.catalog-card-top strong {
    color: var(--blue);
    font-size: 17px;
}

.catalog-card-top span {
    color: var(--muted);
    font-size: 11px;
}

.catalog-card h3 {
    margin: 17px 0 7px;
    font-size: 17px;
}

.catalog-card p {
    margin: 0 0 17px;
    color: #9bb4c6;
    font-size: 13px;
}

.catalog-card small {
    margin-top: auto;
    color: var(--muted);
    font-size: 11px;
}

@media (max-width: 1250px) {
    .compact-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .catalog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .top-grid,
    .catalog-grid {
        grid-template-columns: 1fr;
    }

    .folder-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .folder-item.nested {
        width: 100%;
        margin-left: 0;
    }
}

@media (max-width: 560px) {
    .folder-list {
        grid-template-columns: 1fr;
    }

    .dashboard-section {
        padding: 15px;
    }

    .dashboard-section-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .top-card-heading {
        flex-direction: column;
    }

    .top-card-badges {
        align-items: flex-start;
    }

    .compact-score {
        grid-template-columns: 1fr auto;
    }

    .compact-score .score-track {
        grid-column: 1 / -1;
    }
}


/* Detail instrumentu */

.detail-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.detail-toolbar button {
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--blue-soft);
    background: rgba(37, 168, 255, 0.06);
    cursor: pointer;
}

.detail-toolbar button:hover {
    border-color: var(--blue);
    background: rgba(37, 168, 255, 0.12);
}

.detail-toolbar span {
    color: var(--muted);
    font-size: 12px;
}

.detail-content {
    display: grid;
    gap: 18px;
}

.detail-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 25px;
    padding: 26px;
    border: 1px solid var(--line-strong);
    border-radius: 18px;
    background:
        linear-gradient(
            145deg,
            rgba(10, 34, 57, 0.92),
            rgba(3, 14, 26, 0.96)
        );
}

.detail-symbol {
    margin: 0 0 6px;
    color: var(--blue);
    font-size: 14px;
    letter-spacing: 0.16em;
}

.detail-name {
    margin: 0 0 11px;
    font-size: clamp(30px, 4vw, 48px);
}

.detail-meta {
    color: var(--muted);
    font-size: 14px;
}

.detail-statuses {
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    gap: 8px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.detail-panel {
    min-width: 0;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: rgba(6, 20, 35, 0.78);
}

.detail-panel.full {
    grid-column: 1 / -1;
}

.detail-panel h3 {
    margin: 0 0 18px;
    color: var(--blue-soft);
    font-size: 16px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.detail-panel h4 {
    margin: 20px 0 8px;
    color: #dceef9;
    font-size: 14px;
}

.detail-panel p {
    margin: 0;
    color: #adc2d0;
    font-size: 14px;
    line-height: 1.65;
}

.detail-facts,
.valuation-grid,
.technical-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.detail-fact {
    display: flex;
    min-height: 68px;
    flex-direction: column;
    gap: 7px;
    padding: 12px;
    border: 1px solid rgba(52, 169, 255, 0.11);
    border-radius: 9px;
    background: rgba(0, 7, 15, 0.32);
}

.detail-fact span {
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.detail-fact strong {
    color: var(--text);
    font-size: 15px;
}

.factor-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.factor-box {
    padding: 15px;
    border-radius: 11px;
}

.factor-box.positive {
    border: 1px solid rgba(50, 220, 145, 0.22);
    background: rgba(50, 220, 145, 0.04);
}

.factor-box.negative {
    border: 1px solid rgba(255, 100, 116, 0.22);
    background: rgba(255, 100, 116, 0.04);
}

.factor-box ul {
    margin: 10px 0 0;
    padding-left: 20px;
    color: #adc2d0;
    font-size: 14px;
    line-height: 1.6;
}

.xtb-state {
    padding: 16px;
    border: 1px solid rgba(255, 100, 116, 0.28);
    border-radius: 11px;
    color: var(--red);
    background: rgba(255, 100, 116, 0.06);
    font-size: 14px;
}

.empty-value {
    color: #6f899c !important;
    font-style: italic;
}

@media (max-width: 900px) {
    .detail-grid,
    .factor-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .detail-hero {
        flex-direction: column;
    }

    .detail-statuses {
        align-items: flex-start;
    }

    .detail-facts,
    .valuation-grid,
    .technical-grid {
        grid-template-columns: 1fr;
    }
}


/* SIGNAL 0.5 - finální responzivní rozhraní */

.mobile-menu-toggle,
.sidebar-backdrop {
    display: none;
}

@media (max-width: 1180px) and (min-width: 901px) {
    .app-shell {
        grid-template-columns: 240px minmax(0, 1fr);
    }

    .sidebar {
        padding-inline: 14px;
    }

    .content {
        padding: 28px 24px 44px;
    }

    .dashboard-section {
        padding: 18px;
    }

    .top-card {
        padding: 17px;
    }
}

@media (max-width: 900px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    body.menu-open {
        overflow: hidden;
    }

    .app-shell {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows:
            72px
            minmax(calc(100vh - 118px), auto)
            46px;
        grid-template-areas:
            "topbar"
            "content"
            "footer";
    }

    .topbar {
        position: sticky;
        z-index: 40;
        top: 0;
        min-width: 0;
        padding: 0 18px;
    }

    .mobile-menu-toggle {
        display: flex;
        width: 46px;
        height: 46px;
        flex: 0 0 46px;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 5px;
        margin-right: 13px;
        padding: 0;
        border: 1px solid var(--line-strong);
        border-radius: 11px;
        background: rgba(37, 168, 255, 0.08);
        cursor: pointer;
    }

    .mobile-menu-toggle span {
        width: 20px;
        height: 2px;
        border-radius: 3px;
        background: var(--blue-soft);
        transition:
            transform 180ms ease,
            opacity 180ms ease;
    }

    .menu-open .mobile-menu-toggle span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .menu-open .mobile-menu-toggle span:nth-child(2) {
        opacity: 0;
    }

    .menu-open .mobile-menu-toggle span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .brand {
        min-width: 0;
        margin-right: auto;
    }

    .sidebar {
        position: fixed;
        z-index: 100;
        top: 0;
        bottom: 0;
        left: 0;
        display: flex;
        width: min(84vw, 330px);
        max-height: 100vh;
        padding: 22px 17px 32px;
        border-right: 1px solid var(--line-strong);
        background: #04101e;
        box-shadow: 22px 0 55px rgba(0, 0, 0, 0.55);
        overflow-y: auto;
        overscroll-behavior: contain;
        transform: translateX(-105%);
        transition: transform 220ms ease;
    }

    .menu-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        position: fixed;
        z-index: 90;
        inset: 0;
        width: 100%;
        height: 100%;
        padding: 0;
        border: 0;
        background: rgba(0, 5, 12, 0.72);
        backdrop-filter: blur(3px);
        cursor: pointer;
    }

    .menu-open .sidebar-backdrop {
        display: block;
    }

    .content {
        grid-area: content;
        width: 100%;
        max-width: none;
        min-width: 0;
        padding: 26px 20px 42px;
    }

    .hero {
        gap: 20px;
    }

    .top-grid {
        grid-template-columns: 1fr;
    }

    .catalog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .folder-list {
        display: flex;
        grid-template-columns: none;
    }

    .folder-item.nested {
        width: calc(100% - 14px);
        margin-left: 14px;
    }

    .detail-toolbar {
        align-items: flex-start;
    }

    .detail-hero {
        padding: 22px;
    }

    .detail-panel {
        padding: 19px;
    }
}

@media (max-width: 560px) {
    .app-shell {
        grid-template-rows:
            64px
            minmax(calc(100vh - 110px), auto)
            46px;
    }

    .topbar {
        padding: 0 12px;
    }

    .mobile-menu-toggle {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
        margin-right: 10px;
    }

    .brand {
        gap: 9px;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
        border-radius: 10px;
        font-size: 19px;
    }

    .brand h1 {
        font-size: 17px;
    }

    .brand p {
        font-size: 8px;
        letter-spacing: 0.12em;
    }

    .system-state {
        gap: 0;
    }

    .system-state span:last-child {
        display: none;
    }

    .state-dot {
        width: 11px;
        height: 11px;
    }

    .content {
        padding: 18px 12px 34px;
    }

    .hero {
        align-items: flex-start;
        flex-direction: column;
        margin-bottom: 22px;
    }

    .hero h2,
    .catalog-header h2 {
        font-size: clamp(28px, 9vw, 36px);
        line-height: 1.08;
    }

    .hero p,
    .catalog-header p {
        font-size: 15px;
        line-height: 1.55;
    }

    .last-update {
        align-items: flex-start;
        text-align: left;
    }

    .dashboard-section {
        margin-bottom: 16px;
        padding: 14px;
        border-radius: 14px;
    }

    .dashboard-section-header {
        gap: 12px;
        margin-bottom: 14px;
    }

    .dashboard-section-header h3 {
        font-size: 17px;
    }

    .dashboard-section-header button,
    .catalog-header button,
    .open-detail,
    .detail-toolbar button {
        min-height: 44px;
        padding: 10px 13px;
        font-size: 14px;
    }

    .top-card {
        min-height: 0;
        padding: 16px;
    }

    .top-card-heading h4 {
        font-size: 21px;
    }

    .top-card-heading p,
    .top-card-reason {
        font-size: 14px;
    }

    .top-card-badges {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .compact-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .compact-metric {
        min-height: 70px;
    }

    .compact-metric span {
        font-size: 10px;
    }

    .compact-metric strong {
        white-space: normal;
        overflow-wrap: anywhere;
        font-size: 14px;
    }

    .catalog-grid {
        grid-template-columns: 1fr;
    }

    .catalog-card {
        min-height: 150px;
        padding: 16px;
    }

    .detail-toolbar {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 16px;
    }

    .detail-toolbar span {
        font-size: 11px;
    }

    .detail-hero {
        gap: 18px;
        padding: 18px;
        border-radius: 14px;
    }

    .detail-name {
        font-size: clamp(28px, 10vw, 38px);
        overflow-wrap: anywhere;
    }

    .detail-meta {
        font-size: 13px;
        line-height: 1.5;
    }

    .detail-statuses {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .detail-grid {
        gap: 12px;
    }

    .detail-panel {
        padding: 17px 15px;
        border-radius: 13px;
    }

    .detail-panel h3 {
        font-size: 15px;
        line-height: 1.4;
    }

    .detail-panel p,
    .factor-box ul,
    .xtb-state {
        font-size: 15px;
    }

    .detail-fact strong {
        font-size: 16px;
        overflow-wrap: anywhere;
    }

    .factor-box {
        padding: 13px;
    }
}


/* SIGNAL 0.6 - piktogramy instrumentů */

.instrument-icon {
    --instrument-accent: var(--blue);
    display: inline-grid;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    place-items: center;
    border: 1px solid color-mix(
        in srgb,
        var(--instrument-accent) 60%,
        transparent
    );
    border-radius: 14px;
    color: var(--instrument-accent);
    background: color-mix(
        in srgb,
        var(--instrument-accent) 10%,
        rgba(2, 10, 19, 0.92)
    );
    box-shadow:
        inset 0 0 18px color-mix(
            in srgb,
            var(--instrument-accent) 12%,
            transparent
        ),
        0 0 18px color-mix(
            in srgb,
            var(--instrument-accent) 10%,
            transparent
        );
}

.instrument-icon svg {
    width: 28px;
    height: 28px;
    overflow: visible;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.instrument-icon text {
    fill: currentColor;
    stroke: none;
    font-family: Inter, sans-serif;
    font-size: 15px;
    font-weight: 900;
}

.instrument-icon-catalog {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    border-radius: 11px;
}

.instrument-icon-catalog svg {
    width: 23px;
    height: 23px;
}

.instrument-icon-hero {
    width: 76px;
    height: 76px;
    flex-basis: 76px;
    border-radius: 20px;
}

.instrument-icon-hero svg {
    width: 44px;
    height: 44px;
}

.top-card-identity,
.catalog-symbol,
.detail-identity {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 13px;
}

.top-card-identity > div,
.detail-identity > div {
    min-width: 0;
}

.catalog-symbol strong {
    overflow-wrap: anywhere;
}

@media (max-width: 560px) {
    .instrument-icon-hero {
        width: 60px;
        height: 60px;
        flex-basis: 60px;
        border-radius: 16px;
    }

    .instrument-icon-hero svg {
        width: 34px;
        height: 34px;
    }

    .detail-identity {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* SIGNAL 0.7.2: směrový minigraf */
.top-card-identity {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 13px;
}

.trend-chart {
    display: grid;
    width: 58px;
    flex: 0 0 58px;
    place-items: center;
    gap: 2px;
    color: #d18b16;
}

.trend-chart svg {
    display: block;
    width: 52px;
    height: 48px;
    overflow: visible;
}

.trend-axis {
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.72;
}

.trend-bars {
    fill: currentColor;
    opacity: 0.7;
}

.trend-line,
.trend-arrow {
    fill: none;
    stroke: currentColor;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.trend-chart.up { color: #159b5b; }
.trend-chart.down { color: #d6424f; }
.trend-chart.flat { color: #d18b16; }

.trend-chart span {
    color: currentColor;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

@media (max-width: 560px) {
    .top-card-identity {
        align-items: flex-start;
    }

    .trend-chart {
        width: 52px;
        flex-basis: 52px;
    }
}


/* SIGNAL recommendation badges 0.8.2 */
.recommendation-badge {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 5px 9px;
    border: 1px solid currentColor;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .05em;
}
.recommendation-badge.recommended { color: #087c45; background: #dff8eb; }
.recommendation-badge.prepare { color: #8a5a00; background: #fff1c7; }
.recommendation-badge.wait { color: #39556b; background: #e7f0f6; }
.recommendation-badge.not_recommended { color: #b42332; background: #ffe5e8; }


/* SIGNAL trend placement 0.8.3 */
.top-card { position: relative; }
.top-card .trend-chart {
    position: absolute;
    right: 18px;
    bottom: 15px;
    width: 64px;
    z-index: 2;
    pointer-events: none;
}
.top-card .trend-chart svg { width: 58px; height: 54px; }
.top-card .top-card-identity { gap: 0; }
.detail-statuses .detail-trend-chart {
    position: static;
    width: 82px;
    margin-top: 10px;
    pointer-events: none;
}
.detail-statuses .detail-trend-chart svg { width: 76px; height: 68px; }
@media (max-width:560px) {
    .top-card .trend-chart { right: 14px; bottom: 13px; }
}


/* SIGNAL 0.8.4: mezera mezi ikonou a názvem */
.top-card .top-card-identity {
    gap: 14px;
}

.top-card .instrument-icon-card {
    flex: 0 0 auto;
}

.top-card .top-card-identity > div {
    min-width: 0;
}

@media (max-width: 560px) {
    .top-card .top-card-identity {
        gap: 11px;
    }
}


/* SIGNAL valuation intent */
.valuation-intent {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 12px 0 18px;
    padding: 14px 18px;
    border: 1px solid rgba(120, 150, 180, 0.28);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
}

.valuation-intent-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.72;
}

.valuation-intent-value {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.valuation-intent.strong_buy {
    border-color: rgba(54, 211, 153, 0.75);
    background: rgba(54, 211, 153, 0.10);
}

.valuation-intent.buy {
    border-color: rgba(72, 187, 120, 0.65);
    background: rgba(72, 187, 120, 0.08);
}

.valuation-intent.ok {
    border-color: rgba(37, 168, 255, 0.70);
    background: rgba(37, 168, 255, 0.08);
}

.valuation-intent.hold,
.valuation-intent.wait {
    border-color: rgba(245, 183, 66, 0.65);
    background: rgba(245, 183, 66, 0.08);
}

.valuation-intent.trim {
    border-color: rgba(239, 92, 92, 0.70);
    background: rgba(239, 92, 92, 0.09);
}

.valuation-intent.unavailable {
    opacity: 0.65;
}


/* =========================================================
   SIGNAL OPPORTUNITY WATCHLIST UI
   ========================================================= */

.signal-opportunity-watchlist {
    margin: 0 0 24px;
    padding: 22px;
    border: 1px solid rgba(90, 170, 255, 0.18);
    border-radius: 18px;
    background:
        linear-gradient(
            145deg,
            rgba(16, 31, 49, 0.96),
            rgba(8, 18, 31, 0.96)
        );
    box-shadow:
        0 18px 45px rgba(0, 0, 0, 0.18);
}

.signal-watchlist-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.signal-watchlist-header h2 {
    margin: 3px 0 4px;
    font-size: 1.4rem;
}

.signal-watchlist-header p {
    margin: 0;
    opacity: 0.64;
    font-size: 0.86rem;
}

.signal-watchlist-kicker {
    color: #43b8ff;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.signal-watchlist-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    white-space: nowrap;
    font-size: 0.75rem;
    opacity: 0.76;
}

.signal-watchlist-refresh {
    padding: 6px 11px;
    border: 1px solid rgba(80, 175, 255, 0.3);
    border-radius: 8px;
    background: rgba(40, 145, 220, 0.08);
    color: inherit;
    cursor: pointer;
}

.signal-watchlist-refresh:hover {
    background: rgba(40, 145, 220, 0.16);
}

.signal-watchlist-section-title,
.signal-watchlist-details summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 9px 4px;
}

.signal-watchlist-section-title {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.82;
}

.signal-watchlist-section-title span,
.signal-watchlist-details summary span {
    min-width: 26px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    text-align: center;
}

.signal-watchlist-list {
    display: grid;
    gap: 7px;
}

.signal-watchlist-row {
    display: grid;
    grid-template-columns:
        minmax(180px, 1.6fr)
        repeat(4, minmax(90px, 0.75fr))
        60px
        minmax(125px, 0.9fr);
    gap: 12px;
    align-items: center;
    min-height: 64px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.026);
    cursor: pointer;
    transition:
        transform 120ms ease,
        background 120ms ease,
        border-color 120ms ease;
}

.signal-watchlist-row:hover {
    transform: translateY(-1px);
    border-color: rgba(65, 175, 255, 0.25);
    background: rgba(65, 175, 255, 0.055);
}

.signal-watchlist-identity {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.signal-watchlist-rank {
    display: grid;
    place-items: center;
    width: 27px;
    height: 27px;
    flex: 0 0 27px;
    border-radius: 8px;
    background: rgba(49, 166, 255, 0.11);
    color: #5fc0ff;
    font-size: 0.72rem;
    font-weight: 800;
}

.signal-watchlist-symbol-box {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.signal-watchlist-symbol {
    font-size: 0.92rem;
}

.signal-watchlist-name {
    overflow: hidden;
    opacity: 0.52;
    font-size: 0.68rem;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.signal-watchlist-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.signal-watchlist-cell-label {
    margin-bottom: 2px;
    opacity: 0.43;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.signal-watchlist-cell-value {
    font-size: 0.80rem;
    font-variant-numeric: tabular-nums;
}

.signal-watchlist-cell.ok .signal-watchlist-cell-value {
    color: #67bdff;
}

.signal-watchlist-cell.buy .signal-watchlist-cell-value {
    color: #63d5a1;
}

.signal-watchlist-cell.big .signal-watchlist-cell-value {
    color: #7be2ad;
}

.signal-watchlist-score {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.signal-watchlist-score strong {
    font-size: 1.05rem;
}

.signal-watchlist-score span {
    opacity: 0.4;
    font-size: 0.53rem;
    letter-spacing: 0.08em;
}

.signal-watchlist-intent {
    justify-self: stretch;
    padding: 7px 8px;
    border-radius: 8px;
    text-align: center;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.025em;
}

.signal-watchlist-intent.strong_buy,
.signal-watchlist-intent.buy {
    background: rgba(53, 205, 143, 0.12);
    color: #66dca7;
}

.signal-watchlist-intent.ok {
    background: rgba(55, 166, 255, 0.12);
    color: #65bdff;
}

.signal-watchlist-intent.hold,
.signal-watchlist-intent.wait {
    background: rgba(245, 181, 64, 0.11);
    color: #f0bb5d;
}

.signal-watchlist-intent.trim {
    background: rgba(238, 91, 91, 0.12);
    color: #f17878;
}

.signal-watchlist-details {
    margin-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.055);
}

.signal-watchlist-details summary {
    cursor: pointer;
    font-size: 0.78rem;
    opacity: 0.72;
}

.signal-watchlist-details[open] summary {
    margin-bottom: 8px;
}

.signal-watchlist-review-list {
    display: grid;
    gap: 6px;
}

.signal-watchlist-review-row {
    display: grid;
    grid-template-columns: 75px 1fr;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 9px;
    background: rgba(240, 160, 50, 0.06);
    font-size: 0.76rem;
}

.signal-watchlist-review-row strong {
    color: #efb34f;
}

.signal-watchlist-review-row span {
    opacity: 0.7;
}

.signal-watchlist-loading,
.signal-watchlist-error {
    padding: 18px;
    text-align: center;
    opacity: 0.65;
}

@media (max-width: 1150px) {
    .signal-watchlist-row {
        grid-template-columns:
            minmax(150px, 1.5fr)
            repeat(4, minmax(75px, 0.7fr))
            52px;
    }

    .signal-watchlist-intent {
        grid-column: 1 / -1;
        justify-self: end;
        min-width: 140px;
    }
}

@media (max-width: 760px) {
    .signal-opportunity-watchlist {
        padding: 15px;
    }

    .signal-watchlist-header {
        flex-direction: column;
    }

    .signal-watchlist-meta {
        width: 100%;
        justify-content: space-between;
    }

    .signal-watchlist-row {
        grid-template-columns:
            minmax(120px, 1.4fr)
            repeat(2, 1fr);
    }

    .signal-watchlist-cell.now {
        display: none;
    }

    .signal-watchlist-score {
        align-items: flex-end;
    }

    .signal-watchlist-intent {
        grid-column: auto;
        justify-self: stretch;
    }
}



/* =========================================================
   WATCHLIST 0.8.5 – světlý samostatný pohled
   ========================================================= */

#watchlist-view {
    color: #173047;
}

#watchlist-view-host {
    width: 100%;
}

.signal-opportunity-watchlist {
    margin: 0;
    color: #173047;
    border: 1px solid #c9dce8;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(32, 73, 101, 0.10);
}

.signal-watchlist-header h2,
.signal-watchlist-symbol,
.signal-watchlist-score strong {
    color: #102b40;
}

.signal-watchlist-header p,
.signal-watchlist-name,
.signal-watchlist-meta {
    color: #536f82;
    opacity: 1;
}

.signal-watchlist-row {
    color: #173047;
    border-color: #d5e3ec;
    background: #f8fbfd;
}

.signal-watchlist-row:hover,
.signal-watchlist-row:focus-visible {
    border-color: #53aee8;
    background: #edf7fd;
    outline: none;
}

.signal-watchlist-rank {
    color: #0878bd;
    background: #e5f4fd;
}

.signal-watchlist-cell-label,
.signal-watchlist-score span {
    color: #617b8d;
    opacity: 1;
}

.signal-watchlist-cell-value {
    color: #102b40;
}

.signal-watchlist-cell.ok .signal-watchlist-cell-value {
    color: #0878bd;
}

.signal-watchlist-cell.buy .signal-watchlist-cell-value,
.signal-watchlist-cell.big .signal-watchlist-cell-value {
    color: #087b55;
}

.signal-watchlist-section-title,
.signal-watchlist-details summary {
    color: #27465b;
    opacity: 1;
}

.signal-watchlist-section-title span,
.signal-watchlist-details summary span {
    color: #173047;
    background: #e9f2f7;
}

.signal-watchlist-details {
    border-top-color: #d5e3ec;
}

.signal-watchlist-review-row {
    color: #5c481c;
    background: #fff8e8;
}

.signal-watchlist-review-row span {
    opacity: 1;
}

.signal-watchlist-refresh,
.signal-watchlist-pdf {
    padding: 8px 13px;
    border: 1px solid #73bce8;
    border-radius: 8px;
    color: #086da9;
    background: #eef8fe;
    font-weight: 700;
    cursor: pointer;
}

.signal-watchlist-pdf {
    color: #ffffff;
    border-color: #087cba;
    background: #087cba;
}

.signal-watchlist-refresh:hover {
    background: #dff2fc;
}

.signal-watchlist-pdf:hover {
    background: #06699e;
}

@media (max-width: 760px) {
    .signal-watchlist-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        padding: 14px;
    }

    .signal-watchlist-identity {
        grid-column: 1 / -1;
    }

    .signal-watchlist-cell {
        align-items: flex-start;
    }

    .signal-watchlist-cell.now {
        display: flex;
    }

    .signal-watchlist-score {
        align-items: flex-start;
    }

    .signal-watchlist-intent {
        align-self: center;
    }

    .signal-watchlist-meta {
        flex-wrap: wrap;
    }
}

@media print {
    @page {
        size: A4 landscape;
        margin: 10mm;
    }

    body {
        color: #000000 !important;
        background: #ffffff !important;
    }

    .topbar,
    .sidebar,
    .sidebar-backdrop,
    .footer,
    #dashboard-view,
    #catalog-view,
    #instrument-view,
    .signal-watchlist-refresh,
    .signal-watchlist-pdf {
        display: none !important;
    }

    .app-shell,
    .content,
    #watchlist-view {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
    }

    .signal-opportunity-watchlist {
        border: 0 !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    .signal-watchlist-details {
        display: block !important;
    }

    .signal-watchlist-details > summary {
        display: flex !important;
    }

    .signal-watchlist-row {
        break-inside: avoid;
        color: #000000 !important;
        border-color: #cccccc !important;
        background: #ffffff !important;
    }

    .signal-watchlist-list {
        display: grid !important;
    }

    .signal-watchlist-name,
    .signal-watchlist-header p,
    .signal-watchlist-meta,
    .signal-watchlist-cell-label {
        color: #333333 !important;
    }
}


.signal-watchlist-notice {
    margin: 0 0 14px;
    padding: 12px 14px;
    border: 1px solid #e8c66e;
    border-radius: 10px;
    color: #654c10;
    background: #fff8df;
    font-size: 0.84rem;
    line-height: 1.5;
}


/* SIGNAL 0.8.8 */

.watchlist-navigation {
    margin-top: 32px;
    padding-top: 22px;
    border-top: 1px solid #cbdde8;
}

.watchlist-navigation .navigation-label {
    margin-bottom: 10px;
}

.watchlist-menu-item {
    width: 100%;
}

/* Větší mezera nad tlačítkem Zpět. */
#instrument-view {
    scroll-margin-top: 20px;
}

#instrument-view .detail-toolbar {
    margin-top: 36px;
    margin-bottom: 24px;
}

/* LONG/SHORT necháváme vyjádřený pouze grafickou šipkou. */
#instrument-view .detail-statuses
.direction-badge.long,
#instrument-view .detail-statuses
.direction-badge.short {
    display: none !important;
}

/* Skrytí textového pole Směr v technickém panelu. */
#instrument-view .technical-grid
.detail-fact:first-child {
    display: none !important;
}

@media print {
    @page {
        size: A4 landscape;
        margin: 6mm;
    }

    html,
    body {
        margin: 0 !important;
        padding: 0 !important;
        color: #173047 !important;
        background: #fff !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .topbar,
    .sidebar,
    .sidebar-backdrop,
    .footer,
    #dashboard-view,
    #catalog-view,
    #instrument-view,
    .signal-watchlist-refresh,
    .signal-watchlist-pdf,
    .signal-watchlist-details {
        display: none !important;
    }

    .app-shell,
    .content,
    #watchlist-view,
    #watchlist-view-host {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .signal-opportunity-watchlist {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 5mm !important;
        border: 1px solid #c9dce8 !important;
        border-radius: 4mm !important;
        background: #fff !important;
        box-shadow: none !important;
        box-sizing: border-box;
    }

    .signal-watchlist-header {
        margin-bottom: 2mm !important;
    }

    .signal-watchlist-header h2 {
        margin: 0 !important;
        font-size: 16pt !important;
    }

    .signal-watchlist-header p,
    .signal-watchlist-meta {
        font-size: 7pt !important;
    }

    .signal-watchlist-notice {
        margin: 2mm 0 !important;
        padding: 2mm !important;
        font-size: 7pt !important;
    }

    .signal-watchlist-section-title {
        padding: 1mm !important;
        font-size: 8pt !important;
    }

    .signal-watchlist-list.top {
        display: grid !important;
        gap: 1.2mm !important;
    }

    .signal-watchlist-row {
        display: grid !important;
        grid-template-columns:
            minmax(34mm, 1.4fr)
            repeat(4, minmax(21mm, .75fr))
            12mm
            minmax(25mm, .85fr) !important;
        min-height: 10mm !important;
        gap: 2mm !important;
        padding: 1mm 2mm !important;
        border: 1px solid #d5e3ec !important;
        background: #f8fbfd !important;
        break-inside: avoid;
    }

    .signal-watchlist-symbol {
        font-size: 8pt !important;
    }

    .signal-watchlist-name,
    .signal-watchlist-cell-label {
        font-size: 5.5pt !important;
    }

    .signal-watchlist-cell-value {
        font-size: 7pt !important;
    }

    .signal-watchlist-score strong {
        font-size: 9pt !important;
    }

    .signal-watchlist-intent {
        padding: 1mm !important;
        font-size: 6pt !important;
    }

    .signal-opportunity-watchlist::after {
        display: block;
        margin-top: 2mm;
        padding-top: 2mm;
        border-top: 1px solid #d5e3ec;
        color: #617b8d;
        font-size: 6pt;
        content:
            "SIGNAL - osobní informační nástroj Lumíra Hoanga. "
            "Nejedná se o investiční doporučení.";
    }
}


/* SIGNAL 0.8.9 - watchlist PDF A4 portrait */

@media print {
    @page {
        size: A4 portrait;
        margin: 6mm;
    }

    .signal-opportunity-watchlist {
        padding: 5mm !important;
    }

    .signal-watchlist-header {
        margin-bottom: 2mm !important;
    }

    .signal-watchlist-header h2 {
        font-size: 15pt !important;
    }

    .signal-watchlist-header p {
        font-size: 6.5pt !important;
    }

    .signal-watchlist-meta {
        font-size: 6pt !important;
    }

    .signal-watchlist-notice {
        margin: 1.5mm 0 !important;
        padding: 1.5mm 2mm !important;
        font-size: 6.2pt !important;
    }

    .signal-watchlist-section-title {
        padding: 1mm !important;
        font-size: 7pt !important;
    }

    .signal-watchlist-list.top {
        gap: 1.2mm !important;
    }

    .signal-watchlist-row {
        display: grid !important;
        grid-template-columns:
            repeat(4, minmax(0, 1fr)) !important;
        grid-template-rows:
            auto auto !important;
        gap: 1.2mm 2mm !important;
        min-height: 0 !important;
        padding: 1.6mm 2mm !important;
        border-radius: 2mm !important;
    }

    .signal-watchlist-identity {
        grid-column: 1 / 3 !important;
        grid-row: 1 !important;
    }

    .signal-watchlist-score {
        grid-column: 3 !important;
        grid-row: 1 !important;
        align-items: flex-end !important;
        justify-self: end !important;
    }

    .signal-watchlist-intent {
        grid-column: 4 !important;
        grid-row: 1 !important;
        align-self: center !important;
        justify-self: stretch !important;
        padding: 1mm !important;
    }

    .signal-watchlist-cell.now {
        grid-column: 1 !important;
        grid-row: 2 !important;
    }

    .signal-watchlist-cell.ok {
        grid-column: 2 !important;
        grid-row: 2 !important;
    }

    .signal-watchlist-cell.buy {
        grid-column: 3 !important;
        grid-row: 2 !important;
    }

    .signal-watchlist-cell.big {
        grid-column: 4 !important;
        grid-row: 2 !important;
    }

    .signal-watchlist-cell {
        display: flex !important;
        align-items: flex-start !important;
        padding-top: 1mm !important;
        border-top: 1px solid #dce8ef;
    }

    .signal-watchlist-rank {
        width: 5.5mm !important;
        height: 5.5mm !important;
        flex-basis: 5.5mm !important;
    }

    .signal-watchlist-symbol {
        font-size: 7.5pt !important;
    }

    .signal-watchlist-name {
        font-size: 5.5pt !important;
    }

    .signal-watchlist-cell-label {
        font-size: 5pt !important;
    }

    .signal-watchlist-cell-value {
        font-size: 7pt !important;
    }

    .signal-watchlist-score strong {
        font-size: 8.5pt !important;
    }

    .signal-watchlist-intent {
        font-size: 5.8pt !important;
    }

    .signal-opportunity-watchlist::after {
        margin-top: 2mm;
        padding-top: 1.5mm;
        font-size: 5.5pt;
    }
}


/* SIGNAL NOTIFICATIONS 0.9.0 */

.notification-menu-item {
    position: relative;
    width: 100%;
    margin-top: 8px;
}

.notification-count {
    display: grid;
    place-items: center;
    min-width: 21px;
    height: 21px;
    margin-left: auto;
    padding: 0 6px;
    border-radius: 999px;
    color: #ffffff;
    background: #e52f43;
    font-size: 11px;
    font-weight: 900;
}

.notification-count[hidden] {
    display: none;
}

.notifications-header {
    margin-bottom: 22px;
}

.notifications-header h2 {
    margin: 8px 0;
    color: #102b40;
    font-size: clamp(28px, 4vw, 42px);
}

.notifications-header p {
    max-width: 680px;
    color: #536f82;
    line-height: 1.6;
}

.notifications-list {
    display: grid;
    gap: 12px;
}

.notification-card {
    display: grid;
    grid-template-columns: 46px 1fr;
    gap: 14px;
    width: 100%;
    padding: 16px;
    border: 1px solid #cfdfe9;
    border-radius: 13px;
    color: #173047;
    background: #ffffff;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 7px 20px rgba(30, 74, 103, 0.06);
}

.notification-card:hover {
    border-color: #53aee8;
    background: #f4faff;
}

.notification-card.very_attractive {
    border-color: #6dcda8;
    background: #f1fcf7;
}

.notification-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 11px;
    color: #0878bd;
    background: #e5f4fd;
    font-size: 18px;
}

.notification-card.very_attractive
.notification-icon {
    color: #087b55;
    background: #dff7ed;
}

.notification-content {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 5px;
}

.notification-content strong {
    color: #102b40;
    font-size: 16px;
}

.notification-content span {
    color: #536f82;
    font-size: 14px;
    line-height: 1.5;
}

.notification-content small {
    color: #7890a0;
    font-size: 11px;
}

.notifications-empty {
    padding: 30px;
    border: 1px dashed #bfd3df;
    border-radius: 14px;
    color: #617b8d;
    background: #f8fbfd;
    text-align: center;
}

@media (max-width: 560px) {
    .notification-card {
        grid-template-columns: 38px 1fr;
        gap: 11px;
        padding: 13px;
    }

    .notification-icon {
        width: 36px;
        height: 36px;
    }
}

@media print {
    #notifications-view {
        display: none !important;
    }
}

/* SIGNAL menu spacing 0.9.1 */
.watchlist-navigation .navigation-item + .navigation-item {
    margin-top: 8px;
}

/* SIGNAL NEWS 0.10.0 */

.news-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
    padding: 26px;
    border: 1px solid #cfe0ea;
    border-radius: 18px;
    background: #ffffff;
}

.news-page-header h2 {
    margin: 7px 0 8px;
    color: #05233f;
    font-size: clamp(27px, 4vw, 42px);
}

.news-page-header p {
    margin: 0;
    color: #567086;
}

.news-refresh {
    flex: 0 0 auto;
    padding: 11px 15px;
    border: 1px solid #8bc9ed;
    border-radius: 9px;
    color: #0069a8;
    background: #eff8fd;
    cursor: pointer;
}

.news-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.signal-news-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 13px;
    padding: 20px;
    border: 1px solid #cfe0ea;
    border-radius: 15px;
    background: #ffffff;
    box-shadow: 0 8px 25px rgba(5, 35, 63, 0.05);
}

.signal-news-card-top,
.signal-news-footer,
.signal-news-metrics,
.signal-news-instruments {
    display: flex;
    align-items: center;
    gap: 8px;
}

.signal-news-card-top,
.signal-news-footer {
    justify-content: space-between;
}

.signal-news-card-top {
    color: #6a8192;
    font-size: 11px;
}

.signal-news-source {
    color: #087cc1;
    font-weight: 800;
    text-transform: uppercase;
}

.signal-news-card h3 {
    margin: 0;
    color: #05233f;
    font-size: 17px;
    line-height: 1.35;
}

.signal-news-card p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: #567086;
    font-size: 13px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.signal-news-metrics {
    flex-wrap: wrap;
}

.signal-news-metrics > span {
    padding: 6px 8px;
    border: 1px solid #d8e7ef;
    border-radius: 7px;
    color: #526c80;
    background: #f5f9fc;
    font-size: 10px;
    font-weight: 800;
}

.signal-news-impact.positive {
    border-color: #8bd9be;
    color: #087a58;
    background: #eafaf4;
}

.signal-news-impact.negative {
    border-color: #f2a6b2;
    color: #c51f3a;
    background: #fff1f3;
}

.signal-news-impact.neutral {
    border-color: #cbdbe5;
    color: #526c80;
}

.signal-news-footer {
    margin-top: auto;
    padding-top: 4px;
}

.signal-news-instruments {
    flex-wrap: wrap;
}

.signal-news-instruments button {
    padding: 6px 9px;
    border: 1px solid #91cdec;
    border-radius: 7px;
    color: #0069a8;
    background: #eff8fd;
    font-weight: 800;
    cursor: pointer;
}

.signal-news-footer a {
    color: #087cc1;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.news-empty {
    grid-column: 1 / -1;
    padding: 30px;
    border: 1px solid #cfe0ea;
    border-radius: 14px;
    color: #567086;
    background: #ffffff;
    text-align: center;
}

@media (max-width: 900px) {
    .news-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .news-page-header {
        align-items: stretch;
        flex-direction: column;
        padding: 19px;
    }

    .news-refresh {
        width: 100%;
    }

    .signal-news-card {
        padding: 16px;
    }

    .signal-news-card-top,
    .signal-news-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* SIGNAL NEWS TRANSLATION 0.10.1 */

.signal-news-metrics
.signal-news-translation {
    border-color: #a9c9e0;
    color: #35637e;
    background: #edf5fa;
}

/* SIGNAL single active view guard 0.10.3 */
.content > .view {
    display: none !important;
}

.content > .view.active {
    display: block !important;
}

/* SIGNAL DETAIL HERO + NEWS 0.11.0 */

.detail-hero.detail-hero-v2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px;
}

.detail-signal-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
}

.detail-signal-cell {
    display: flex;
    min-width: 0;
    min-height: 92px;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
    padding: 13px;
    border: 1px solid #cfe0ea;
    border-radius: 11px;
    background: #f4f9fc;
}

.detail-signal-label {
    color: #577287;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.detail-signal-value {
    display: flex;
    align-items: center;
    min-height: 34px;
    color: #05233f;
}

.detail-score-value {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.detail-score-value strong {
    color: #05233f;
    font-size: 18px;
}

.detail-score-value small {
    color: #577287;
    font-size: 10px;
}

.detail-movement {
    display: flex;
    align-items: center;
    gap: 12px;
}

.detail-movement > strong {
    color: #05233f;
    font-size: 14px;
    text-transform: uppercase;
}

.detail-trend-chart {
    width: 58px;
    min-width: 58px;
    margin: 0;
}

.detail-trend-chart svg {
    display: block;
    width: 58px;
    height: 48px;
}

.detail-news-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.detail-news-item {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
    border: 1px solid #cfe0ea;
    border-radius: 11px;
    background: #f7fbfd;
}

.detail-news-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #667f91;
    font-size: 10px;
}

.detail-news-top strong {
    color: #087cc1;
    text-transform: uppercase;
}

.detail-news-item h4 {
    margin: 0;
    color: #05233f;
    font-size: 14px;
    line-height: 1.4;
}

.detail-news-item p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: #567086;
    font-size: 12px;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.detail-news-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.detail-news-badges span {
    padding: 5px 7px;
    border: 1px solid #d3e2ea;
    border-radius: 6px;
    color: #577287;
    background: #ffffff;
    font-size: 9px;
    font-weight: 800;
}

.detail-news-impact.positive {
    border-color: #8bd9be;
    color: #087a58;
    background: #eafaf4;
}

.detail-news-impact.negative {
    border-color: #f2a6b2;
    color: #c51f3a;
    background: #fff1f3;
}

.detail-news-link {
    margin-top: auto;
    color: #087cc1;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
}

@media (max-width: 900px) {
    .detail-signal-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-news-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .detail-hero.detail-hero-v2 {
        padding: 17px;
    }

    .detail-signal-strip {
        grid-template-columns: 1fr;
    }

    .detail-signal-cell {
        min-height: 76px;
    }
}

/* SIGNAL DASHBOARD INTERACTION 0.13.0 */

.top-card:not(.empty) {
    cursor: pointer;
}

.top-card:not(.empty):focus-visible {
    outline: 3px solid rgba(8, 124, 193, .22);
    outline-offset: 3px;
}

.top-card:not(.empty):hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(5, 35, 63, .10);
}

.top-card-badges {
    min-width: auto;
}

.top-card .market-badge {
    display: block;
    width: 13px;
    min-width: 13px;
    height: 13px;
    min-height: 13px;
    padding: 0;
    overflow: hidden;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow:
        0 0 0 1px rgba(5, 35, 63, .16),
        0 2px 7px rgba(5, 35, 63, .16);
    font-size: 0;
}

.top-card .market-badge.open,
.top-card .market-badge.market_open {
    background: #07996c;
}

.top-card .market-badge.closed,
.top-card .market-badge.market_closed {
    background: #d9364f;
}

.top-card .market-badge.delayed,
.top-card .market-badge.stale,
.top-card .market-badge.data_delayed {
    background: #d48806;
}

.top-card .trend-chart > span {
    display: none !important;
}

.top-card .trend-chart {
    padding-bottom: 0;
}

/* SIGNAL PRICE AVERAGES VISUAL 0.13.2 */

.valuation-with-averages
.price-averages-panel {
    margin: 24px 0 0;
    padding: 20px;
    border: 1px solid #cfe0ea;
    border-radius: 14px;
    background:
        linear-gradient(
            135deg,
            #f8fcfe 0%,
            #eef7fb 100%
        );
    box-shadow: none;
}

.valuation-with-averages
.price-averages-header {
    margin-bottom: 15px;
}

.valuation-with-averages
.price-averages-header h3 {
    color: #05233f;
    font-size: 1rem;
}

.valuation-with-averages
.price-averages-list {
    display: grid;
    gap: 8px;
    overflow: visible;
    border: 0;
    border-radius: 0;
}

.valuation-with-averages
.price-average-row {
    display: grid;
    grid-template-columns:
        68px
        minmax(120px, .8fr)
        minmax(150px, 1.2fr)
        minmax(170px, .9fr);
    align-items: center;
    gap: 14px;
    min-height: 50px;
    padding: 8px 13px;
    border: 1px solid #d6e5ed;
    border-radius: 9px;
    background: rgba(255, 255, 255, .86);
}

.valuation-with-averages
.price-average-row:nth-child(even) {
    background: rgba(255, 255, 255, .62);
}

.valuation-with-averages
.price-average-period {
    color: #087cc1;
    font-size: .7rem;
    letter-spacing: .04em;
}

.valuation-with-averages
.price-average-value {
    color: #05233f;
    font-size: .86rem;
}

.price-average-visual {
    position: relative;
    display: block;
    width: 100%;
    height: 20px;
}

.price-average-axis {
    position: absolute;
    top: 9px;
    right: 0;
    left: 0;
    height: 4px;
    border-radius: 4px;
    background:
        linear-gradient(
            90deg,
            #07996c 0%,
            #69cdb0 35%,
            #42a7d9 50%,
            #f1b44c 70%,
            #d48806 100%
        );
    opacity: .72;
}

.price-average-center {
    position: absolute;
    top: 4px;
    left: 50%;
    width: 2px;
    height: 14px;
    border-radius: 2px;
    background: #05233f;
    transform: translateX(-50%);
    opacity: .55;
}

.price-average-marker {
    position: absolute;
    top: 3px;
    width: 16px;
    height: 16px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: #087cc1;
    box-shadow:
        0 0 0 1px rgba(5, 35, 63, .22),
        0 2px 6px rgba(5, 35, 63, .18);
    transform: translateX(-50%);
}

.price-average-row.below
.price-average-marker {
    background: #07996c;
}

.price-average-row.above
.price-average-marker {
    background: #d48806;
}

.valuation-with-averages
.price-average-difference {
    justify-self: end;
    padding: 6px 9px;
    border-radius: 7px;
    color: #087cc1;
    background: #e4f3fa;
    font-size: .7rem;
    font-weight: 900;
    white-space: nowrap;
}

.valuation-with-averages
.price-average-row.below
.price-average-difference {
    color: #067956;
    background: #e8f7f2;
}

.valuation-with-averages
.price-average-row.above
.price-average-difference {
    color: #a76400;
    background: #fff1d6;
}

.valuation-with-averages
.price-average-samples {
    display: none;
}

.valuation-with-averages
.price-averages-note {
    margin-top: 12px;
}

@media (max-width: 850px) {
    .valuation-with-averages
    .price-average-row {
        grid-template-columns: 65px 1fr;
    }

    .valuation-with-averages
    .price-average-visual,
    .valuation-with-averages
    .price-average-difference {
        grid-column: 2;
    }

    .valuation-with-averages
    .price-average-difference {
        justify-self: start;
    }
}


/* SIGNAL NEWS REFRESH 0.14.0 */

.news-refresh-state {
    margin: 0 0 18px;
    padding: 11px 14px;
    border: 1px solid #cfe0ec;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.72);
    color: #547086;
    font-size: 13px;
}

.news-refresh-state[data-state="running"],
.news-refresh-state[data-state="queued"] {
    border-color: #89caf5;
    background: #edf8ff;
    color: #006eae;
}

.news-refresh-state[data-state="completed"] {
    border-color: #9ddcc8;
    background: #effbf6;
    color: #007c5d;
}

.news-refresh-state[data-state="failed"] {
    border-color: #f2a9b0;
    background: #fff3f4;
    color: #b71f35;
}

.news-refresh:disabled {
    cursor: wait;
    opacity: 0.7;
}
