﻿:root {
    --canvas: #0d1218;
    --sidebar: #101820;
    --surface: #151e27;
    --surface-raised: #192530;
    --surface-soft: #111920;
    --line: #334150;
    --line-soft: #26323d;
    --ink: #edf2f7;
    --muted: #9aa8b5;
    --dim: #718090;
    --accent: #2b78bd;
    --accent-strong: #4c9ce0;
    --good: #77bd8d;
    --warn: #e9b359;
    --bad: #d87070;
    --code: #93c5fd;
    --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); }
body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    background: var(--canvas);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.45;
}

a { color: inherit; }
button, input, select { font: inherit; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--sidebar);
    border-right: 1px solid var(--line);
}
.brand {
    display: block;
    padding: 25px 22px 23px;
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--line);
    letter-spacing: .02em;
}
.brand-main { font-size: 18px; font-weight: 800; letter-spacing: .045em; }
.brand-sub { color: var(--accent-strong); font-size: 18px; font-weight: 800; }
.brand small { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; letter-spacing: .04em; }
.main-nav { padding: 19px 0; overflow-y: auto; }
.nav-caption { margin: 14px 22px 7px; color: var(--dim); font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.nav-link {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 39px;
    padding: 0 22px;
    color: #c3cdd7;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background-color .14s ease, color .14s ease, border-color .14s ease;
}
.nav-link:hover { background: #17232e; color: #fff; }
.nav-link.is-active { color: #fff; background: #1a2b3a; border-left-color: var(--accent-strong); font-weight: 700; }

/* V097 UI — navigazione gerarchica: quotidiano, previsioni, governance, sviluppo e archivio. */
.nav-group {
    margin: 0;
    border-bottom: 1px solid rgba(51, 65, 80, .52);
}
.nav-group > summary,
.nav-subgroup > summary {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 0 38px 0 22px;
    color: var(--dim);
    cursor: pointer;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
    list-style: none;
    user-select: none;
}
.nav-group > summary::-webkit-details-marker,
.nav-subgroup > summary::-webkit-details-marker { display: none; }
.nav-group > summary::after,
.nav-subgroup > summary::after {
    position: absolute;
    right: 22px;
    content: "›";
    color: var(--muted);
    font-size: 20px;
    line-height: 1;
    transform: rotate(0deg);
    transition: transform .14s ease, color .14s ease;
}
.nav-group[open] > summary::after,
.nav-subgroup[open] > summary::after { transform: rotate(90deg); }
.nav-group > summary:hover,
.nav-subgroup > summary:hover { background: #17232e; color: #d8e4ef; }
.nav-group .nav-link { padding-left: 28px; }
.nav-subgroup {
    margin: 6px 0 8px;
    border-top: 1px solid rgba(51, 65, 80, .45);
    border-bottom: 1px solid rgba(51, 65, 80, .45);
    background: #0f171f;
}
.nav-subgroup > summary {
    min-height: 38px;
    padding-left: 30px;
    font-size: 9px;
    letter-spacing: .105em;
}
.nav-subgroup > summary::after { right: 20px; font-size: 17px; }
.nav-subgroup .nav-link { min-height: 35px; padding-left: 38px; font-size: 13px; }

.sidebar-note {
    margin-top: auto;
    padding: 16px 22px 20px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
}
.sidebar-note strong { display: block; color: var(--ink); margin-bottom: 5px; }
.sidebar-note span { display: block; line-height: 1.4; }

.workspace { min-width: 0; }
.topbar {
    min-height: 90px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 18px 34px;
    background: #121a22;
    border-bottom: 1px solid var(--line);
}
.eyebrow { margin: 0 0 5px; color: var(--accent-strong); font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 25px; line-height: 1.1; font-weight: 760; letter-spacing: -.02em; }
h2 { margin-bottom: 0; font-size: 18px; line-height: 1.2; font-weight: 720; letter-spacing: -.01em; }
.topbar-meta { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.environment-label, .database-label { padding: 5px 8px; border: 1px solid var(--line); background: var(--surface-soft); }
.database-label { color: var(--code); }
.content { max-width: 1640px; margin: 0 auto; padding: 30px 34px 46px; }

.metric-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--surface); margin-bottom: 22px; }
.metric-grid-five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.metric-block { min-height: 102px; padding: 18px 17px; border-right: 1px solid var(--line); }
.metric-block:last-child { border-right: 0; }
.metric-block p { margin: 0 0 13px; color: var(--muted); font-size: 11px; font-weight: 760; text-transform: uppercase; letter-spacing: .065em; }
.metric-block strong { font-size: 26px; font-weight: 760; letter-spacing: -.025em; }

.dashboard-grid, .detail-grid { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(280px, .8fr); gap: 22px; margin-bottom: 22px; }
.panel { background: var(--surface); border: 1px solid var(--line); margin-bottom: 22px; }
.dashboard-grid > .panel, .detail-grid > .panel { margin-bottom: 0; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 18px 20px 15px; border-bottom: 1px solid var(--line); }
.panel-heading .muted { margin: 2px 0 0; }
.panel-note { padding: 0 20px; color: var(--muted); font-size: 12px; }
.quality-panel { min-width: 0; }
.audit-list { margin: 0; }
.audit-list div { display: flex; justify-content: space-between; gap: 16px; padding: 13px 20px; border-bottom: 1px solid var(--line-soft); }
.audit-list div:last-child { border-bottom: 0; }
.audit-list dt { color: var(--muted); }
.audit-list dd { margin: 0; }

.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 670px; }
th, td { padding: 10px 13px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: middle; }
thead th { background: #131c25; color: #b9c5d0; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .075em; white-space: nowrap; }
tbody tr:hover { background: #19242e; }
tbody tr:last-child td { border-bottom: 0; }
th.number, td.number { text-align: right; font-variant-numeric: tabular-nums; }
td.score-cell { font-weight: 800; font-size: 15px; }
.table-link { color: #dceeff; text-decoration: none; font-weight: 680; }
.table-link:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.match-link { display: inline-flex; gap: 6px; align-items: center; }
.file-name { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-highlight { background: #1a2a37; }
.compact-table th, .compact-table td { padding: 8px 11px; }

.status { display: inline-block; font-size: 10px; font-weight: 820; line-height: 1; letter-spacing: .075em; text-transform: uppercase; }
.status-ok { color: var(--good); }
.status-alert { color: var(--bad); }
.status-warning { color: var(--warn); }
.muted { color: var(--muted); }
.text-link { color: #a8d7ff; text-decoration: none; font-weight: 700; font-size: 12px; white-space: nowrap; }
.text-link:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

.filter-bar { display: grid; grid-template-columns: 210px 240px minmax(250px, 1fr) auto; align-items: end; gap: 14px; padding: 16px 18px; margin-bottom: 22px; background: var(--surface); border: 1px solid var(--line); }
.compact-filter { grid-template-columns: minmax(280px, 460px) auto; justify-content: start; }
.filter-field { min-width: 0; }
.filter-field label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.filter-field select, .filter-field input {
    width: 100%; height: 38px; padding: 0 10px; background: #101820; color: var(--ink); border: 1px solid #4a5a6b; border-radius: 0; outline: 0;
}
.filter-field select:focus, .filter-field input:focus { border-color: var(--accent-strong); box-shadow: inset 0 0 0 1px var(--accent-strong); }
.filter-actions { display: flex; gap: 8px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 0 13px; border: 1px solid transparent; border-radius: 0; text-decoration: none; cursor: pointer; font-size: 12px; font-weight: 760; white-space: nowrap; }
.button-primary { background: #256ba8; color: #fff; border-color: #3b82bd; }
.button-primary:hover { background: #347bb8; }
.button-secondary { color: #d6e1eb; background: #18232d; border-color: #4a5a6b; }
.button-secondary:hover { background: #22313d; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 16px; border-top: 1px solid var(--line); color: var(--muted); }

.page-intro { margin: 0 0 17px; color: var(--muted); max-width: 900px; }
.page-intro p { margin-bottom: 0; }
.error-panel { border-left: 4px solid var(--bad); padding: 22px; }
.error-panel h2 { margin: 0 0 10px; }
.error-panel p { color: #d3dde7; }
.error-panel code { color: var(--code); }

.match-header { padding: 20px 24px 18px; }
.match-context { display: flex; justify-content: center; gap: 18px; margin-bottom: 20px; color: var(--muted); font-size: 12px; }
.score-board { display: grid; grid-template-columns: 1fr 130px 1fr; align-items: center; gap: 18px; }
.team-name { font-size: 24px; font-weight: 760; letter-spacing: -.02em; }
.team-name.home { text-align: right; }
.team-name.away { text-align: left; }
.score-box { min-height: 84px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #0f171e; border: 1px solid #52667a; }
.score-box strong { font-size: 36px; line-height: 1; letter-spacing: -.05em; }
.score-box small { margin-top: 7px; color: var(--accent-strong); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.match-meta-line { display: flex; justify-content: center; flex-wrap: wrap; gap: 9px 19px; margin-top: 20px; color: var(--muted); font-size: 12px; }
.match-meta-line strong { color: var(--ink); }
.stadium { margin: 13px 0 0; text-align: center; }

.timeline { padding: 2px 0; }
.timeline-row { display: grid; grid-template-columns: 74px minmax(0, 1fr) 70px; min-height: 46px; border-bottom: 1px solid var(--line-soft); }
.timeline-row:last-child { border-bottom: 0; }
.timeline-minute, .timeline-score { display: flex; align-items: center; justify-content: center; color: var(--muted); font-variant-numeric: tabular-nums; background: #121a22; }
.timeline-event { padding: 10px 14px; }
.timeline-event strong { margin-right: 8px; }
.timeline-event span { margin-right: 5px; color: #cad5de; }
.timeline-event small { display: inline-block; color: var(--muted); }
.timeline-event em { margin-left: 7px; color: var(--warn); font-size: 11px; font-style: normal; font-weight: 700; }
.timeline-event p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.timeline-row.is-goal .timeline-minute, .timeline-row.is-goal .timeline-score { color: #e5f3ff; background: #15314a; }
.timeline-row.is-goal .timeline-event { border-left: 3px solid var(--accent-strong); }
.timeline-row.is-red .timeline-event { border-left: 3px solid var(--bad); }
.timeline-row.is-yellow .timeline-event { border-left: 3px solid var(--warn); }
.timeline-row.is-sub .timeline-event { border-left: 3px solid #778d9e; }

.entity-header { padding: 22px; }
.entity-header h2 { font-size: 28px; }
.entity-header p:last-child { margin-bottom: 0; }

@media (max-width: 1220px) {
    .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .metric-block:nth-child(3) { border-right: 0; }
    .metric-block:nth-child(n+4) { border-top: 1px solid var(--line); }
    .metric-grid-five { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .metric-grid-five .metric-block:nth-child(3) { border-right: 0; }
    .metric-grid-five .metric-block:nth-child(n+4) { border-top: 1px solid var(--line); }
    .dashboard-grid, .detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 920px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
    .brand { padding: 17px 20px; }
    .main-nav { display: block; max-height: 56vh; overflow-y: auto; overflow-x: hidden; padding: 8px 0; }
    .nav-group { border-bottom: 1px solid rgba(51, 65, 80, .52); }
    .nav-group > summary { min-height: 40px; padding-left: 18px; }
    .nav-group > summary::after { right: 18px; }
    .nav-group .nav-link { min-height: 42px; padding-left: 24px; border-left: 3px solid transparent; border-bottom: 0; }
    .nav-group .nav-link.is-active { border-left-color: var(--accent-strong); border-bottom: 0; }
    .nav-subgroup .nav-link { padding-left: 34px; }
    .nav-caption, .sidebar-note { display: none; }
    .nav-link { min-height: 46px; padding: 0 14px; border-left: 0; border-bottom: 3px solid transparent; white-space: nowrap; }
    .nav-link.is-active { border-bottom-color: var(--accent-strong); border-left: 0; }
    .topbar { min-height: 78px; padding: 16px 20px; }
    .content { padding: 20px; }
    .filter-bar { grid-template-columns: 1fr 1fr; }
    .filter-search { grid-column: 1 / -1; }
    .filter-actions { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
    .topbar { align-items: flex-start; flex-direction: column; gap: 10px; }
    .topbar-meta { flex-wrap: wrap; white-space: normal; }
    h1 { font-size: 22px; }
    .content { padding: 16px; }
    .metric-grid, .metric-grid-five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .metric-block { border-right: 1px solid var(--line); border-top: 1px solid var(--line); }
    .metric-block:nth-child(-n+2) { border-top: 0; }
    .metric-block:nth-child(2n) { border-right: 0; }
    .filter-bar, .compact-filter { grid-template-columns: 1fr; }
    .score-board { grid-template-columns: 1fr; gap: 8px; }
    .team-name.home, .team-name.away { text-align: center; }
    .score-box { width: 120px; justify-self: center; }
    .match-context { flex-wrap: wrap; gap: 5px 13px; }
    .timeline-row { grid-template-columns: 54px minmax(0, 1fr) 54px; }
}


/* Grid sorting: standard obbligatorio per ogni tabella dati. */
thead th.sortable-column {
    position: relative;
    padding-right: 32px;
    cursor: pointer;
    user-select: none;
}

thead th.sortable-column:hover {
    background: #1a2835;
    color: #f0f6fb;
}

thead th.sortable-column::after {
    content: "↕";
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    color: #72869a;
    font-size: 11px;
    line-height: 1;
}

thead th.sortable-column[data-sort-direction="asc"]::after {
    content: "▲";
    color: #6bb8ff;
}

thead th.sortable-column[data-sort-direction="desc"]::after {
    content: "▼";
    color: #6bb8ff;
}

thead th.sortable-column:focus-visible {
    outline: 2px solid #6bb8ff;
    outline-offset: -3px;
}

.grid-sort-link {
    display: block;
    margin: -10px -32px -10px -13px;
    padding: 10px 32px 10px 13px;
    color: inherit;
    text-decoration: none;
}

.grid-sort-link:hover,
.grid-sort-link:focus-visible {
    color: #f0f6fb;
    text-decoration: none;
}

th.number .grid-sort-link {
    text-align: right;
}


/* Poisson FT V1: superfici operative, senza elementi decorativi. */
.json-block {
    margin: 0;
    padding: 16px 20px;
    border-top: 1px solid var(--line);
    color: #bed3e6;
    background: #101820;
    white-space: pre-wrap;
    overflow-x: auto;
    font-family: Consolas, "Courier New", monospace;
    font-size: 12px;
    line-height: 1.55;
}

.metric-block .status {
    display: block;
    margin-top: 5px;
    font-size: 15px;
}

/* Step 6 — indicatori numerici del backtest. */
.metric-block strong.metric-text {
    font-size: 18px;
    line-height: 1.2;
}
.metric-positive { color: var(--good); }
.metric-negative { color: var(--bad); }

/* Step 7U V079 — detail interaction for team xG form. */
.clickable-row { cursor: pointer; }
.clickable-row:focus { outline: 2px solid var(--accent-strong); outline-offset: -2px; }
.clickable-row:hover .team-form-link { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.team-form-detail-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; max-width: none; }
.team-form-detail-intro > div { max-width: 900px; }
.metric-date { font-size: 18px !important; line-height: 1.2; }

.row-detail-note td { padding-top: 5px; padding-bottom: 10px; font-size: 12px; background: #121a22; }


/* Step 8A0-8D V085 UI — KPI decisione leggibile e griglia pre-match compatta. */
.metric-decision-block { min-width: 0; }
.metric-decision-summary {
    display: block;
    font-size: 22px !important;
    line-height: 1.12;
    overflow-wrap: anywhere;
}
.metric-decision-code {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .055em;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.prematch-fixtures-heading { align-items: flex-start; }
.prematch-fixtures-intro { max-width: 780px; margin: 9px 0 0; font-size: 12px; line-height: 1.5; }
.prematch-sort-note { flex: 0 0 auto; margin: 2px 0 0; text-align: right; white-space: nowrap; }
.prematch-table-wrap { overflow-x: hidden; }
.prematch-table {
    min-width: 0;
    table-layout: fixed;
}
.prematch-table th:nth-child(1) { width: 7%; }
.prematch-table th:nth-child(2) { width: 13%; }
.prematch-table th:nth-child(3) { width: 23%; }
.prematch-table th:nth-child(4) { width: 17%; }
.prematch-table th:nth-child(5) { width: 19%; }
.prematch-table th:nth-child(6),
.prematch-table th:nth-child(7),
.prematch-table th:nth-child(8) { width: 7%; }
.prematch-table th,
.prematch-table td { padding: 11px 12px; }
.prematch-table td { overflow-wrap: anywhere; }
.prematch-table .number { white-space: nowrap; }
.prematch-kickoff { color: #d8e5ef; font-variant-numeric: tabular-nums; }
.prematch-match-cell { font-weight: 680; }
.prematch-match-link { display: inline-flex; align-items: baseline; gap: 7px; max-width: 100%; }
.prematch-match-link > span:first-child { min-width: 0; }
.prematch-link-arrow { flex: 0 0 auto; color: var(--accent-strong); }
.prematch-status-cell .status { line-height: 1.25; overflow-wrap: anywhere; }

@media (max-width: 1220px) {
    .prematch-table .prematch-input-column { display: none; }
    .prematch-table th:nth-child(1) { width: 8%; }
    .prematch-table th:nth-child(2) { width: 14%; }
    .prematch-table th:nth-child(3) { width: 27%; }
    .prematch-table th:nth-child(4) { width: 24%; }
    .prematch-table th:nth-child(6),
    .prematch-table th:nth-child(7),
    .prematch-table th:nth-child(8) { width: 9%; }
}

@media (max-width: 760px) {
    .prematch-fixtures-heading { flex-direction: column; gap: 8px; }
    .prematch-sort-note { text-align: left; white-space: normal; }
    .prematch-table-wrap { overflow-x: auto; }
    .prematch-table { min-width: 760px; }
}


/* Step 8E — catalogo pronostici prossime partite. */
.metric-grid-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric-date { display: block; font-size: 18px !important; line-height: 1.25; letter-spacing: -.01em !important; }
.upcoming-predictions-heading { align-items: flex-start; }
.upcoming-predictions-intro { max-width: 780px; margin: 9px 0 0; font-size: 12px; line-height: 1.5; }
.upcoming-sort-note { flex: 0 0 auto; margin: 2px 0 0; text-align: right; white-space: nowrap; }
.upcoming-table-wrap { overflow-x: hidden; }
.upcoming-predictions-table { table-layout: fixed; min-width: 0; }
.upcoming-predictions-table th:nth-child(1) { width: 14%; }
.upcoming-predictions-table th:nth-child(2) { width: 26%; }
.upcoming-predictions-table th:nth-child(3) { width: 11%; }
.upcoming-predictions-table th:nth-child(4) { width: 12%; }
.upcoming-predictions-table th:nth-child(5) { width: 12%; }
.upcoming-predictions-table th:nth-child(6) { width: 12%; }
.upcoming-predictions-table th:nth-child(7),
.upcoming-predictions-table th:nth-child(8) { width: 6.5%; }
.upcoming-predictions-table th,
.upcoming-predictions-table td { padding: 11px 12px; }
.upcoming-predictions-table td { overflow-wrap: anywhere; }
.upcoming-predictions-table .number { white-space: nowrap; }
.upcoming-kickoff { color: #d8e5ef; font-variant-numeric: tabular-nums; }
.upcoming-match-cell { font-weight: 680; }
.upcoming-match-link { display: inline-flex; align-items: baseline; gap: 7px; max-width: 100%; }
.upcoming-match-link > span:first-child { min-width: 0; }
.upcoming-link-arrow { flex: 0 0 auto; color: var(--accent-strong); }
.upcoming-selection { color: #e8f4ff; font-size: 16px; font-weight: 800; text-align: center; }
.upcoming-score-prob { display: inline-block; margin-left: 5px; font-size: 11px; white-space: nowrap; }

/* Step 8F — shortlist 1X2 read-only e auditabile. */
.selection-review-intro { max-width: 940px; }
.selection-profile-panel { margin-bottom: 22px; }
.selection-profile-heading { align-items: flex-end; }
.selection-profile-description { max-width: 780px; margin: 9px 0 0; font-size: 12px; line-height: 1.5; }
.selection-profile-form { display: flex; align-items: end; gap: 10px; flex: 0 0 auto; }
.selection-profile-form .filter-field { min-width: 205px; }
.selection-profile-form .button { margin-bottom: 0; }
.selection-rule-list dt { max-width: 42%; }
.selection-metric-grid { margin-bottom: 22px; }
.selection-review-heading { align-items: flex-start; }
.selection-review-table-intro { max-width: 790px; margin: 9px 0 0; font-size: 12px; line-height: 1.5; }
.selection-review-sort-note { flex: 0 0 auto; margin: 2px 0 0; text-align: right; white-space: nowrap; }
.selection-review-table-wrap { overflow-x: hidden; }
.selection-review-table { table-layout: fixed; min-width: 0; }
.selection-review-table th:nth-child(1) { width: 11%; }
.selection-review-table th:nth-child(2) { width: 20%; }
.selection-review-table th:nth-child(3) { width: 7%; }
.selection-review-table th:nth-child(4) { width: 9%; }
.selection-review-table th:nth-child(5) { width: 11%; }
.selection-review-table th:nth-child(6) { width: 10%; }
.selection-review-table th:nth-child(7) { width: 13%; }
.selection-review-table th:nth-child(8) { width: 9%; }
.selection-review-table th:nth-child(9) { width: 10%; }
.selection-review-table th,
.selection-review-table td { padding: 11px 12px; }
.selection-review-table td { overflow-wrap: anywhere; }
.selection-review-table .number { white-space: nowrap; }
.selection-kickoff { color: #d8e5ef; font-variant-numeric: tabular-nums; }
.selection-match-cell { font-weight: 680; }
.selection-match-link { display: inline-flex; align-items: baseline; gap: 7px; max-width: 100%; }
.selection-match-link > span:first-child { min-width: 0; }
.selection-link-arrow { flex: 0 0 auto; color: var(--accent-strong); }
.selection-signal { color: #e8f4ff; font-size: 16px; font-weight: 800; text-align: center; }
.selection-reason { color: var(--muted); font-size: 12px; line-height: 1.4; }
.selection-qualified-row { background: #16252e; }
.selection-qualified-row:hover { background: #1b2e39; }

@media (max-width: 1260px) {
    .upcoming-predictions-table .upcoming-optional-column { display: none; }
    .upcoming-predictions-table th:nth-child(1) { width: 15%; }
    .upcoming-predictions-table th:nth-child(2) { width: 28%; }
    .upcoming-predictions-table th:nth-child(3) { width: 12%; }
    .upcoming-predictions-table th:nth-child(4),
    .upcoming-predictions-table th:nth-child(5) { width: 14%; }
    .upcoming-predictions-table th:nth-child(6) { width: 17%; }
}

@media (max-width: 1220px) {
    .metric-grid-four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .metric-grid-four .metric-block { border-right: 1px solid var(--line); }
    .metric-grid-four .metric-block:nth-child(2n) { border-right: 0; }
    .metric-grid-four .metric-block:nth-child(n+3) { border-top: 1px solid var(--line); }
    .selection-review-table .selection-input-column { display: none; }
    .selection-review-table th:nth-child(1) { width: 12%; }
    .selection-review-table th:nth-child(2) { width: 23%; }
    .selection-review-table th:nth-child(3) { width: 8%; }
    .selection-review-table th:nth-child(4) { width: 10%; }
    .selection-review-table th:nth-child(5) { width: 12%; }
    .selection-review-table th:nth-child(6) { width: 11%; }
    .selection-review-table th:nth-child(8) { width: 10%; }
    .selection-review-table th:nth-child(9) { width: 14%; }
}

@media (max-width: 760px) {
    .upcoming-predictions-heading { flex-direction: column; gap: 8px; }
    .upcoming-sort-note { text-align: left; white-space: normal; }
    .upcoming-table-wrap { overflow-x: auto; }
    .upcoming-predictions-table { min-width: 720px; }
    .selection-profile-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
    .selection-profile-form { width: 100%; flex-wrap: wrap; }
    .selection-profile-form .filter-field { flex: 1 1 205px; }
    .selection-review-heading { flex-direction: column; gap: 8px; }
    .selection-review-sort-note { text-align: left; white-space: normal; }
    .selection-review-table-wrap { overflow-x: auto; }
    .selection-review-table { min-width: 960px; }
}
/* Step 8G/8H/8I — confronto profili, matrice per partita ed esportazione audit. */
.profile-comparison-intro { max-width: 980px; }
.profile-comparison-metric-grid { margin-bottom: 22px; }
.profile-summary-panel,
.profile-cause-panel { margin-bottom: 22px; }
.profile-summary-heading,
.profile-cause-heading,
.profile-matrix-heading { align-items: flex-start; }
.profile-summary-intro,
.profile-matrix-intro { max-width: 860px; margin: 9px 0 0; font-size: 12px; line-height: 1.5; }
.profile-cause-note,
.profile-matrix-sort-note { flex: 0 0 auto; margin: 2px 0 0; text-align: right; white-space: nowrap; }
.profile-summary-heading .button,
.profile-export-boundary-panel .button { flex: 0 0 auto; margin-bottom: 0; }
.profile-summary-table-wrap,
.profile-cause-table-wrap,
.profile-matrix-table-wrap { overflow-x: hidden; }
.profile-summary-table,
.profile-cause-table,
.profile-matrix-table { min-width: 0; table-layout: fixed; }
.profile-summary-table th:nth-child(1) { width: 14%; }
.profile-summary-table th:nth-child(2),
.profile-summary-table th:nth-child(3) { width: 12%; }
.profile-summary-table th:nth-child(4) { width: 26%; }
.profile-summary-table th:nth-child(5),
.profile-summary-table th:nth-child(6),
.profile-summary-table th:nth-child(7) { width: 12%; }
.profile-cause-table th:nth-child(1) { width: 24%; }
.profile-cause-table th:nth-child(n+2) { width: 19%; }
.profile-summary-table th,
.profile-summary-table td,
.profile-cause-table th,
.profile-cause-table td,
.profile-matrix-table th,
.profile-matrix-table td { padding: 11px 12px; }
.profile-summary-table td,
.profile-cause-table td,
.profile-matrix-table td { overflow-wrap: anywhere; }
.profile-summary-table .number,
.profile-cause-table .number,
.profile-matrix-table .number { white-space: nowrap; }
.profile-matrix-table th:nth-child(1) { width: 9%; }
.profile-matrix-table th:nth-child(2) { width: 14%; }
.profile-matrix-table th:nth-child(3) { width: 5%; }
.profile-matrix-table th:nth-child(4),
.profile-matrix-table th:nth-child(5) { width: 7%; }
.profile-matrix-table th:nth-child(6) { width: 12%; }
.profile-matrix-table th:nth-child(7),
.profile-matrix-table th:nth-child(8),
.profile-matrix-table th:nth-child(9) { width: 7%; }
.profile-matrix-table th:nth-child(10) { width: 25%; }
.profile-matrix-kickoff { color: #d8e5ef; font-variant-numeric: tabular-nums; }
.profile-matrix-match-cell { font-weight: 680; }
.profile-matrix-match-link { display: inline-flex; align-items: baseline; gap: 7px; max-width: 100%; }
.profile-matrix-match-link > span:first-child { min-width: 0; }
.profile-matrix-link-arrow { flex: 0 0 auto; color: var(--accent-strong); }
.profile-matrix-signal { color: #e8f4ff; font-size: 16px; font-weight: 800; text-align: center; }
.profile-matrix-all-qualified { background: #16252e; }
.profile-matrix-all-qualified:hover { background: #1b2e39; }
.profile-decision { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; min-height: 24px; padding: 2px 7px; border: 1px solid currentColor; border-radius: 999px; font-size: 11px; font-weight: 800; line-height: 1; text-decoration: none; }
.profile-decision.is-qualified { color: var(--success); }
.profile-decision.is-excluded { color: var(--warning); }
.profile-reason-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 11px; line-height: 1.35; }
.profile-reason-list strong { color: var(--text); }
.profile-export-boundary-panel { margin-top: 22px; }

@media (max-width: 1320px) {
    .profile-matrix-table .profile-matrix-input-column { display: none; }
    .profile-matrix-table th:nth-child(1) { width: 10%; }
    .profile-matrix-table th:nth-child(2) { width: 17%; }
    .profile-matrix-table th:nth-child(3) { width: 6%; }
    .profile-matrix-table th:nth-child(4),
    .profile-matrix-table th:nth-child(5) { width: 8%; }
    .profile-matrix-table th:nth-child(7),
    .profile-matrix-table th:nth-child(8),
    .profile-matrix-table th:nth-child(9) { width: 8%; }
    .profile-matrix-table th:nth-child(10) { width: 27%; }
}

@media (max-width: 940px) {
    .profile-summary-heading,
    .profile-cause-heading,
    .profile-matrix-heading { flex-direction: column; gap: 8px; }
    .profile-cause-note,
    .profile-matrix-sort-note { text-align: left; white-space: normal; }
    .profile-summary-table-wrap,
    .profile-cause-table-wrap,
    .profile-matrix-table-wrap { overflow-x: auto; }
    .profile-summary-table { min-width: 940px; }
    .profile-cause-table { min-width: 760px; }
    .profile-matrix-table { min-width: 1420px; }
}

@media (max-width: 760px) {
    .profile-summary-heading .button,
    .profile-export-boundary-panel .button { width: 100%; text-align: center; }
}

/* Step 8J — consuntivo risultati read-only e performance per profilo. */
.result-review-intro { max-width: 1030px; }
.result-review-metric-grid { margin-bottom: 22px; }
.result-profile-heading,
.result-review-heading { align-items: flex-start; }
.result-profile-intro,
.result-review-table-intro { max-width: 860px; margin: 9px 0 0; font-size: 12px; line-height: 1.5; }
.result-review-sort-note { flex: 0 0 auto; margin: 2px 0 0; text-align: right; white-space: nowrap; }
.result-profile-heading .button { flex: 0 0 auto; margin-bottom: 0; }
.result-profile-table-wrap { overflow-x: hidden; }
.result-review-table-wrap,
.result-market-reality-wrap { max-height: 620px; overflow-x: auto; overflow-y: auto; scrollbar-gutter: stable; }
.result-profile-table { min-width: 0; table-layout: fixed; }
.result-review-table { min-width: 1780px; table-layout: auto; }
.result-market-reality-table { min-width: 1260px; table-layout: auto; }
.result-market-reality-table thead th { position: sticky; top: 0; z-index: 3; background-color: var(--surface-soft); }
.result-profile-table th,
.result-profile-table td,
.result-review-table th,
.result-review-table td,
.result-market-reality-table th,
.result-market-reality-table td { padding: 9px 10px; }
.result-profile-table td { overflow-wrap: anywhere; }
.result-review-table td,
.result-market-reality-table td { white-space: nowrap; }
.result-profile-table .number,
.result-review-table .number,
.result-market-reality-table .number { white-space: nowrap; }
.result-profile-table th:nth-child(1) { width: 24%; }
.result-profile-table th:nth-child(n+2) { width: 15.2%; }
.result-kickoff { color: #d8e5ef; font-variant-numeric: tabular-nums; }
.result-match-cell { font-weight: 680; }
.result-match-link { display: inline-flex; align-items: baseline; gap: 7px; max-width: 100%; }
.result-match-link > span:first-child { min-width: 0; }
.result-link-arrow { flex: 0 0 auto; color: var(--accent-strong); }
.result-prediction { color: #e8f4ff; font-size: 15px; font-weight: 800; }
.result-prediction small,
.result-top-score small { display: inline-block; margin-left: 5px; color: var(--muted); font-size: 10px; font-weight: 600; }
.result-top-score,
.result-actual-score { font-variant-numeric: tabular-nums; }
.result-actual-score,
.result-actual-selection { color: #e8f4ff; font-weight: 760; }
.result-check,
.result-settlement { font-size: 11px; font-weight: 820; letter-spacing: .045em; }
.result-reason { min-width: 330px; color: var(--muted); font-size: 11px; line-height: 1.35; white-space: normal !important; }
.result-settled-row { background: #16252e; }
.result-settled-row:hover { background: #1b2e39; }
.result-market-miss-row { background: #251d23; }
.result-market-miss-row:hover { background: #30252c; }
.result-market-reality-panel { margin-top: 22px; }
.result-boundary-panel { margin-top: 22px; }

@media (max-width: 940px) {
    .result-profile-heading,
    .result-review-heading { flex-direction: column; gap: 8px; }
    .result-review-sort-note { text-align: left; white-space: normal; }
    .result-profile-table-wrap { overflow-x: auto; }
    .result-profile-table { min-width: 760px; }
}

@media (max-width: 760px) {
    .result-profile-heading .button { width: 100%; text-align: center; }
}

/* Step 8K — metriche probabilistiche e calibrazione pre-match read-only. */
.calibration-intro { max-width: 1060px; }
.calibration-metric-grid { margin-bottom: 22px; }
.calibration-scorecards-heading,
.calibration-input-heading,
.calibration-bins-heading,
.calibration-fixture-heading { align-items: flex-start; }
.calibration-scorecards-intro,
.calibration-input-intro,
.calibration-bins-intro,
.calibration-fixture-intro { max-width: 900px; margin: 9px 0 0; font-size: 12px; line-height: 1.5; }
.calibration-scorecards-heading .button { flex: 0 0 auto; margin-bottom: 0; }
.calibration-scope-form { display: grid; grid-template-columns: auto minmax(190px, 1fr) auto; align-items: end; gap: 8px; min-width: 430px; }
.calibration-scope-form label { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.calibration-scope-form select { min-width: 0; min-height: 37px; padding: 8px 10px; color: var(--text); background: #101c27; border: 1px solid #36506a; border-radius: 0; font: inherit; }
.calibration-scope-form .button { margin: 0; white-space: nowrap; }
.calibration-fixture-sort-note { flex: 0 0 auto; margin: 2px 0 0; text-align: right; white-space: nowrap; }
.calibration-scorecards-table-wrap,
.calibration-input-table-wrap,
.calibration-bins-table-wrap,
.calibration-fixture-table-wrap { overflow-x: hidden; }
.calibration-scorecards-table,
.calibration-input-table,
.calibration-bins-table,
.calibration-fixture-table { min-width: 0; table-layout: fixed; }
.calibration-scorecards-table th,
.calibration-scorecards-table td,
.calibration-input-table th,
.calibration-input-table td,
.calibration-bins-table th,
.calibration-bins-table td,
.calibration-fixture-table th,
.calibration-fixture-table td { padding: 11px 12px; }
.calibration-scorecards-table td,
.calibration-input-table td,
.calibration-bins-table td,
.calibration-fixture-table td { overflow-wrap: anywhere; }
.calibration-scorecards-table .number,
.calibration-input-table .number,
.calibration-bins-table .number,
.calibration-fixture-table .number { white-space: nowrap; }
.calibration-scorecards-table th:nth-child(1) { width: 19%; }
.calibration-scorecards-table th:nth-child(n+2) { width: 10.125%; }
.calibration-input-table th:nth-child(1) { width: 25%; }
.calibration-input-table th:nth-child(n+2) { width: 10.714%; }
.calibration-bins-table th:nth-child(1) { width: 28%; }
.calibration-bins-table th:nth-child(n+2) { width: 14.4%; }
.calibration-fixture-table th:nth-child(1) { width: 10%; }
.calibration-fixture-table th:nth-child(2) { width: 18%; }
.calibration-fixture-table th:nth-child(3),
.calibration-fixture-table th:nth-child(4) { width: 8%; }
.calibration-fixture-table th:nth-child(5),
.calibration-fixture-table th:nth-child(6),
.calibration-fixture-table th:nth-child(7) { width: 7%; }
.calibration-fixture-table th:nth-child(8) { width: 10%; }
.calibration-fixture-table th:nth-child(9),
.calibration-fixture-table th:nth-child(10) { width: 8%; }
.calibration-fixture-table th:nth-child(11) { width: 9%; }
.calibration-overall-row { background: #16252e; }
.calibration-overall-row:hover { background: #1b2e39; }
.calibration-kickoff { color: #d8e5ef; font-variant-numeric: tabular-nums; }
.calibration-match-cell { font-weight: 680; }
.calibration-match-link { display: inline-flex; align-items: baseline; gap: 7px; max-width: 100%; }
.calibration-match-link > span:first-child { min-width: 0; }
.calibration-link-arrow { flex: 0 0 auto; color: var(--accent-strong); }
.calibration-actual-score,
.calibration-actual-selection { color: #e8f4ff; font-weight: 760; font-variant-numeric: tabular-nums; }
.calibration-dominant { color: #e8f4ff; font-size: 16px; font-weight: 800; }
.calibration-dominant small { display: inline-block; margin-left: 5px; color: var(--muted); font-size: 11px; font-weight: 600; }
.calibration-correct-row { background: #16252e; }
.calibration-correct-row:hover { background: #1b2e39; }
.calibration-incorrect-row { background: #251d23; }
.calibration-incorrect-row:hover { background: #30252c; }
.calibration-boundary-panel { margin-top: 22px; }

@media (max-width: 1320px) {
    .calibration-fixture-table th:nth-child(5),
    .calibration-fixture-table td:nth-child(5),
    .calibration-fixture-table th:nth-child(6),
    .calibration-fixture-table td:nth-child(6),
    .calibration-fixture-table th:nth-child(7),
    .calibration-fixture-table td:nth-child(7) { display: none; }
    .calibration-fixture-table th:nth-child(1) { width: 11%; }
    .calibration-fixture-table th:nth-child(2) { width: 22%; }
    .calibration-fixture-table th:nth-child(3),
    .calibration-fixture-table th:nth-child(4) { width: 10%; }
    .calibration-fixture-table th:nth-child(8) { width: 14%; }
    .calibration-fixture-table th:nth-child(9),
    .calibration-fixture-table th:nth-child(10) { width: 11%; }
    .calibration-fixture-table th:nth-child(11) { width: 11%; }
}

@media (max-width: 940px) {
    .calibration-scorecards-heading,
    .calibration-input-heading,
    .calibration-bins-heading,
    .calibration-fixture-heading { flex-direction: column; gap: 8px; }
    .calibration-fixture-sort-note { text-align: left; white-space: normal; }
    .calibration-scope-form { width: 100%; min-width: 0; }
    .calibration-scorecards-table-wrap,
    .calibration-input-table-wrap,
    .calibration-bins-table-wrap,
    .calibration-fixture-table-wrap { overflow-x: auto; }
    .calibration-scorecards-table { min-width: 1100px; }
    .calibration-input-table { min-width: 920px; }
    .calibration-bins-table { min-width: 720px; }
    .calibration-fixture-table { min-width: 1220px; }
}

@media (max-width: 760px) {
    .calibration-scorecards-heading .button { width: 100%; text-align: center; }
    .calibration-scope-form { grid-template-columns: 1fr; align-items: stretch; }
    .calibration-scope-form .button { width: 100%; text-align: center; }
}



/* V094/V095 UI — schede di provenienza governance leggibili, con chiave e valore separati. */
.governance-fact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
    border-top: 1px solid var(--line-soft);
}

.governance-fact-grid > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 20px;
    min-width: 0;
    padding: 15px 20px;
    border-bottom: 1px solid var(--line-soft);
}

.governance-fact-grid > div:nth-child(odd) {
    border-right: 1px solid var(--line-soft);
}

.governance-fact-grid dt,
.governance-fact-grid dd {
    min-width: 0;
    margin: 0;
}

.governance-fact-grid dt {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.governance-fact-grid dd {
    color: var(--ink);
    font-size: 14px;
    font-weight: 740;
    line-height: 1.35;
    text-align: right;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.governance-fact-grid dd .status {
    font-size: 11px;
    line-height: 1.2;
}

.governance-fact-grid-last-wide > div:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    border-right: 0;
}

@media (max-width: 760px) {
    .governance-fact-grid {
        grid-template-columns: 1fr;
    }

    .governance-fact-grid > div,
    .governance-fact-grid > div:nth-child(odd),
    .governance-fact-grid-last-wide > div:last-child:nth-child(odd) {
        grid-column: auto;
        border-right: 0;
    }

    .governance-fact-grid > div {
        grid-template-columns: minmax(0, 1fr) minmax(110px, auto);
        column-gap: 14px;
        padding: 14px 16px;
    }
}

/* V096 UI — riequilibrio card/tabelle per eliminare spazi morti e scrollbar superflue. */
.detail-grid-market-details { grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.28fr); }
.detail-grid-walkforward-tables { grid-template-columns: minmax(0, 1.22fr) minmax(0, 0.98fr); }
.detail-grid-xgv2-bands { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1.08fr); }

.table-wrap table[data-grid-id="prematch-top-scores"] { min-width: 420px; }
.table-wrap table[data-grid-id="prematch-markets"] { min-width: 560px; }
.table-wrap table[data-grid-id="prematch-walkforward-seasons"] { min-width: 560px; }
.table-wrap table[data-grid-id="prematch-walkforward-bins"] { min-width: 460px; }
.table-wrap table[data-grid-id="xg-v2-lambda-bands"] { min-width: 520px; }
.table-wrap table[data-grid-id="xg-v2-history-bands"] { min-width: 500px; }

@media (max-width: 1180px) {
    .detail-grid-market-details,
    .detail-grid-walkforward-tables,
    .detail-grid-xgv2-bands {
        grid-template-columns: 1fr;
    }
}

/* V095 — chiusura Step 8O–8T: centro operativo, report, laboratorio e output pubblico. */
.operations-intro,
.walkforward-intro,
.candidate-intro,
.seasonal-intro { max-width: 1080px; }
.operations-kpis { margin-bottom: 22px; }
.operations-origin-grid { margin-bottom: 22px; }
.operations-alert-panel { margin-top: 22px; }
.operations-alert-heading,
.seasonal-heading { align-items: flex-start; }
.operations-alert-heading .button,
.seasonal-heading .button { flex: 0 0 auto; margin-bottom: 0; }
.operations-alert-table-wrap,
.seasonal-table-wrap { overflow-x: hidden; }
.operations-alert-table,
.seasonal-table { min-width: 0; table-layout: fixed; }
.operations-alert-table th,
.operations-alert-table td,
.seasonal-table th,
.seasonal-table td { padding: 11px 12px; overflow-wrap: anywhere; }
.operations-alert-table th:nth-child(1) { width: 10%; }
.operations-alert-table th:nth-child(2) { width: 12%; }
.operations-alert-table th:nth-child(3) { width: 19%; }
.operations-alert-table th:nth-child(4) { width: 11%; }
.operations-alert-table th:nth-child(5) { width: 39%; }
.operations-alert-table th:nth-child(6) { width: 9%; }
.operations-alert-title { color: var(--ink); font-weight: 720; }
.operations-alert-detail { color: var(--muted); font-size: 12px; line-height: 1.42; }
.operations-blocking-row { background: #251d23; }
.operations-blocking-row:hover { background: #30252c; }
.operations-boundary-panel { margin-top: 22px; }
.seasonal-table th:nth-child(1) { width: 8%; }
.seasonal-table th:nth-child(2),
.seasonal-table th:nth-child(3),
.seasonal-table th:nth-child(4),
.seasonal-table th:nth-child(5),
.seasonal-table th:nth-child(6),
.seasonal-table th:nth-child(7),
.seasonal-table th:nth-child(8),
.seasonal-table th:nth-child(9) { width: 8%; }
.seasonal-table th:nth-child(10),
.seasonal-table th:nth-child(11),
.seasonal-table th:nth-child(12) { width: 6.67%; }
.seasonal-settled-row { background: #16252e; }
.seasonal-settled-row:hover { background: #1b2e39; }

/* Output Step 8T: layout separato dal backoffice, informativo e non commerciale. */
.public-body { min-width: 0; background: #08111a; color: var(--text); }
.public-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 0 0 40px; }
.public-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.public-brand { color: #eff7ff; font-size: 18px; font-weight: 860; letter-spacing: .04em; text-decoration: none; }
.public-brand span { color: var(--accent-strong); }
.public-hero { max-width: 850px; padding: 52px 0 28px; }
.public-eyebrow { margin: 0 0 8px; color: var(--accent-strong); font-size: 11px; font-weight: 820; letter-spacing: .09em; text-transform: uppercase; }
.public-hero h1 { margin: 0; color: #f7fbff; font-size: clamp(30px, 4vw, 46px); line-height: 1.08; }
.public-hero > p:last-child { max-width: 720px; margin: 15px 0 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.public-metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); margin-bottom: 24px; }
.public-metric-grid article { min-width: 0; padding: 19px 20px; border-right: 1px solid var(--line); }
.public-metric-grid article:last-child { border-right: 0; }
.public-metric-grid span { display: block; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.public-metric-grid strong { display: block; margin-top: 9px; color: #eef8ff; font-size: 22px; line-height: 1.25; font-variant-numeric: tabular-nums; }
.public-panel { margin: 24px 0; border: 1px solid var(--line); background: #0d1822; }
.public-panel > h2,
.public-panel > p { margin: 0; padding: 20px; }
.public-panel > h2 { color: #eef8ff; font-size: 20px; }
.public-panel > p { color: var(--muted); line-height: 1.5; }
.public-error { border-color: #7a3a47; }
.public-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 20px; border-bottom: 1px solid var(--line); }
.public-panel-heading h2 { margin: 0; color: #eef8ff; font-size: 22px; }
.public-panel-heading p { max-width: 260px; margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.4; text-align: right; }
.public-table-wrap { overflow-x: auto; }
.public-table { width: 100%; min-width: 760px; border-collapse: collapse; }
.public-table th,
.public-table td { padding: 15px 18px; border-bottom: 1px solid var(--line-soft); text-align: left; }
.public-table th { color: #b7d4ec; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.public-table td { color: #dbe9f5; font-size: 14px; }
.public-table tbody tr:last-child td { border-bottom: 0; }
.public-table tbody tr:hover { background: #14222e; }
.public-match { color: #f0f8ff !important; font-weight: 760; }
.public-selection { color: #eaf6ff !important; font-size: 17px !important; font-weight: 860; }
.public-table .number { text-align: right; font-variant-numeric: tabular-nums; }
.public-note { padding: 0 2px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.public-footer { margin-top: 42px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.45; }

@media (max-width: 1320px) {
    .operations-alert-table th:nth-child(2),
    .operations-alert-table td:nth-child(2) { display: none; }
    .operations-alert-table th:nth-child(1) { width: 12%; }
    .operations-alert-table th:nth-child(3) { width: 23%; }
    .operations-alert-table th:nth-child(4) { width: 13%; }
    .operations-alert-table th:nth-child(5) { width: 42%; }
    .operations-alert-table th:nth-child(6) { width: 10%; }
    .seasonal-table th:nth-child(7),
    .seasonal-table td:nth-child(7),
    .seasonal-table th:nth-child(8),
    .seasonal-table td:nth-child(8) { display: none; }
}

@media (max-width: 940px) {
    .operations-alert-heading,
    .seasonal-heading,
    .public-panel-heading { flex-direction: column; gap: 10px; }
    .operations-alert-heading .button,
    .seasonal-heading .button { width: 100%; text-align: center; }
    .operations-alert-table-wrap,
    .seasonal-table-wrap { overflow-x: auto; }
    .operations-alert-table { min-width: 1050px; }
    .seasonal-table { min-width: 1060px; }
    .public-shell { width: min(100% - 28px, 1180px); }
    .public-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .public-metric-grid article:nth-child(2) { border-right: 0; }
    .public-metric-grid article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
    .public-panel-heading p { max-width: none; text-align: left; }
}

@media (max-width: 600px) {
    .public-header { align-items: flex-start; flex-direction: column; justify-content: center; gap: 4px; padding: 14px 0; }
    .public-hero { padding-top: 36px; }
    .public-metric-grid { grid-template-columns: 1fr; }
    .public-metric-grid article,
    .public-metric-grid article:nth-child(2) { border-right: 0; border-bottom: 1px solid var(--line); }
    .public-metric-grid article:last-child { border-bottom: 0; }
}

/* V098 — Step 9: universo mercati interno completo, indipendente dalla coverage bookmaker. */
.market-universe-intro,
.market-universe-detail-intro { max-width: 1120px; }
.market-universe-catalog-panel,
.market-universe-selection-panel,
.market-universe-pending-panel { margin-top: 22px; }
.market-universe-catalog th:nth-child(1) { width: 14%; }
.market-universe-catalog th:nth-child(2) { width: 18%; }
.market-universe-catalog th:nth-child(3) { width: 18%; }
.market-universe-catalog th:nth-child(4) { width: 20%; }
.market-universe-catalog th:nth-child(5) { width: 30%; }
.market-universe-description { color: var(--muted); line-height: 1.45; }
.market-universe-fixtures th:nth-child(1) { width: 16%; }
.market-universe-fixtures th:nth-child(2) { width: 34%; }
.market-universe-fixtures th:nth-child(3) { width: 12%; }
.market-universe-fixtures th:nth-child(4),
.market-universe-fixtures th:nth-child(5) { width: 13%; }
.market-universe-fixtures th:nth-child(6) { width: 12%; }
.market-universe-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.market-universe-tabs a { display: inline-flex; align-items: center; min-height: 34px; padding: 0 11px; color: var(--muted); text-decoration: none; border: 1px solid var(--line); background: var(--surface); font-size: 12px; font-weight: 720; }
.market-universe-tabs a:hover { color: var(--ink); border-color: #4a5a6b; }
.market-universe-tabs a.is-active { color: #fff; border-color: #3b82bd; background: #1d4f7a; }
.market-universe-selection-table { min-width: 1050px; }
.market-universe-selection-table th:nth-child(1) { width: 13%; }
.market-universe-selection-table th:nth-child(2) { width: 19%; }
.market-universe-selection-table th:nth-child(3) { width: 8%; }
.market-universe-selection-table th:nth-child(4) { width: 18%; }
.market-universe-selection-table th:nth-child(5),
.market-universe-selection-table th:nth-child(6),
.market-universe-selection-table th:nth-child(7) { width: 10%; }
.market-universe-selection-table th:nth-child(8) { width: 12%; }
.market-code,
.market-method { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 620; line-height: 1.35; }
.market-universe-scores { min-width: 480px; }
.market-universe-boundary-panel { margin-top: 22px; }

@media (max-width: 860px) {
    .market-universe-tabs { gap: 6px; }
    .market-universe-tabs a { flex: 1 1 calc(50% - 6px); justify-content: center; text-align: center; }
    .market-universe-catalog { min-width: 880px; }
    .market-universe-fixtures { min-width: 820px; }
}

/* V099 — Step 9A–9F: scheda partita con storico, copertura dati e mercati completi. */
.detail-grid-match-intelligence { grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr); }
.detail-grid-recent-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.market-universe-score-panel { margin-top: 22px; }
.market-universe-selection-table { min-width: 1260px; }
.market-universe-selection-table th:nth-child(1) { width: 10%; }
.market-universe-selection-table th:nth-child(2) { width: 15%; }
.market-universe-selection-table th:nth-child(3) { width: 7%; }
.market-universe-selection-table th:nth-child(4) { width: 14%; }
.market-universe-selection-table th:nth-child(5),
.market-universe-selection-table th:nth-child(6),
.market-universe-selection-table th:nth-child(7) { width: 8%; }
.market-universe-selection-table th:nth-child(8) { width: 17%; }
.market-universe-selection-table th:nth-child(9) { width: 13%; }
.market-universe-selection-table td:nth-child(8),
.market-universe-selection-table td:nth-child(9) { vertical-align: top; }
.market-universe-score-panel .table-wrap { max-height: 620px; overflow: auto; }
.market-universe-score-panel thead th { position: sticky; top: 0; z-index: 1; }

@media (max-width: 1180px) {
    .detail-grid-match-intelligence,
    .detail-grid-recent-form { grid-template-columns: 1fr; }
}

/* V101 — Step 10, simulazione aggio provider, dashboard previsioni e post-match. */
.provider-margin-control {
    display: grid;
    grid-template-columns: auto minmax(88px, 112px);
    align-items: center;
    justify-content: end;
    gap: 6px 10px;
    min-width: 218px;
}
.provider-margin-control label {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
    white-space: nowrap;
}
.provider-margin-control input {
    width: 100%;
    min-height: 34px;
    padding: 0 9px;
    color: var(--ink);
    background: #101820;
    border: 1px solid #4a5a6b;
    font-variant-numeric: tabular-nums;
}
.provider-margin-control input:focus {
    outline: 0;
    border-color: var(--accent-strong);
    box-shadow: inset 0 0 0 1px var(--accent-strong);
}
.provider-margin-control small {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
}
.provider-odd-cell {
    color: #b9e8ff;
    font-variant-numeric: tabular-nums;
}
.upcoming-heading-actions,
.dashboard-upcoming-actions {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 14px;
}
.upcoming-heading-actions .provider-margin-control { margin-top: -1px; }
.provider-margin-strip {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 22px;
    margin: 16px 0 22px;
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid var(--line);
}
.provider-margin-strip h2 { font-size: 16px; }
.provider-margin-strip p { margin-bottom: 0; }
.dashboard-upcoming-panel { margin-bottom: 22px; }
.dashboard-upcoming-heading { align-items: flex-start; }
.dashboard-upcoming-heading h2 { margin-bottom: 4px; }
.dashboard-upcoming-heading .muted { max-width: 820px; }
.dashboard-upcoming-table-wrap { overflow-x: auto; }
.dashboard-upcoming-table { min-width: 1040px; }
.dashboard-upcoming-table th,
.dashboard-upcoming-table td { padding-top: 9px; padding-bottom: 9px; }
.dashboard-upcoming-table th:nth-child(1) { width: 13%; }
.dashboard-upcoming-table th:nth-child(2) { width: 24%; }
.dashboard-upcoming-table th:nth-child(3) { width: 9%; }
.dashboard-upcoming-table th:nth-child(4),
.dashboard-upcoming-table th:nth-child(5),
.dashboard-upcoming-table th:nth-child(6),
.dashboard-upcoming-table th:nth-child(8),
.dashboard-upcoming-table th:nth-child(9) { width: 9%; }
.dashboard-upcoming-table th:nth-child(7) { width: 11%; }
.postmatch-kpi-grid { margin-bottom: 22px; }
.postmatch-source-grid { grid-template-columns: minmax(0, 1.28fr) minmax(300px, .72fr); }
.postmatch-status-code { font-size: 18px; }
.postmatch-note-list { margin: 0; padding: 0 0 0 20px; color: var(--muted); }
.postmatch-note-list li { margin: 0 0 8px; }

@media (max-width: 1160px) {
    .upcoming-heading-actions,
    .dashboard-upcoming-actions { flex-direction: column; align-items: stretch; }
    .provider-margin-control { justify-content: start; }
    .provider-margin-strip { align-items: stretch; flex-direction: column; }
    .postmatch-source-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .dashboard-upcoming-optional { display: none; }
    .provider-margin-control { grid-template-columns: 1fr; gap: 5px; min-width: 0; }
    .provider-margin-control small { grid-column: auto; }
    .provider-margin-strip { padding: 15px; }
}

/* V102 — dashboard: promemoria reale del sync post-partita manuale. */
.dashboard-postmatch-reminder {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 20px;
    margin-bottom: 22px;
    border-left: 4px solid var(--accent-strong);
}
.dashboard-postmatch-reminder-main { min-width: 0; }
.dashboard-postmatch-reminder h2 { margin: 0 0 7px; }
.dashboard-postmatch-reminder .muted { margin: 0; max-width: 940px; line-height: 1.5; }
.dashboard-postmatch-reminder-meta { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.dashboard-postmatch-reminder-meta strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.dashboard-postmatch-reminder-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 14px; padding-top: 2px; }

@media (max-width: 760px) {
    .dashboard-postmatch-reminder,
    .dashboard-postmatch-reminder-actions { flex-direction: column; align-items: flex-start; }
    .dashboard-postmatch-reminder-actions { gap: 8px; }
}


/* V127 — console operativa protetta e paginazione Market Universe */
.operations-login-shell{min-height:60vh;display:grid;place-items:center}.operations-login-card{width:min(520px,100%)}.operations-login-form{display:grid;gap:.75rem}.operations-login-form input,.operations-capture-form input{background:#0b151e;border:1px solid #385062;color:#f4f8fb;padding:.7rem .8rem;border-radius:2px}.checkbox-row{display:flex;gap:.55rem;align-items:center}.operations-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:1rem}.operation-card{border:1px solid #2e4658;background:#111e29;padding:1rem;display:flex;flex-direction:column;gap:.65rem;min-height:180px}.operation-card h3{margin:0}.operation-card p{margin:0 0 auto;color:#a9c0d1}.operations-capture-form{display:flex;gap:.65rem;align-items:end;flex-wrap:wrap}.operations-capture-form label{width:100%;font-size:.78rem;text-transform:uppercase;letter-spacing:.08em;color:#8eb4ce}.operations-capture-form input{width:110px}.operations-log{white-space:pre-wrap;word-break:break-word;max-height:620px;overflow:auto;background:#071018;border:1px solid #263d4e;padding:1rem;color:#d7e8f4;font-size:.82rem;line-height:1.45}.topbar-auth-link{color:#74c5ff;text-decoration:none;border:1px solid #2d4c60;padding:.35rem .55rem}.pagination{display:flex;gap:.75rem;align-items:center;justify-content:flex-end;padding:1rem;border-top:1px solid #263d4e;flex-wrap:wrap}.button-primary,.button-secondary{display:inline-flex;justify-content:center;align-items:center;padding:.55rem .8rem;border:1px solid #3b6f91;background:#17608f;color:#fff;text-decoration:none;cursor:pointer;font:inherit}.button-secondary{background:#122432;border-color:#385062}.success-panel{border-left:4px solid #4cc987}.success-panel p,.error-panel p{margin:.35rem 0}.market-code,.operation-card small,td small{display:block;color:#7897aa;font-size:.72rem;margin-top:.2rem}
@media (max-width:900px){.operations-capture-input-wrap input{width:78px}.pagination{justify-content:flex-start}}

.operations-category {
    margin-top: 1rem;
    border: 1px solid var(--line, #2b3b49);
    background: rgba(10, 21, 30, .35);
}
.operations-category > summary {
    cursor: pointer;
    padding: .85rem 1rem;
    font-weight: 800;
    letter-spacing: .08em;
    color: var(--text, #f5f7fa);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}
.operations-category > summary span {
    color: var(--muted, #91a8ba);
    font-size: .78rem;
    font-weight: 600;
}
.operations-category[open] > summary {
    border-bottom: 1px solid var(--line, #2b3b49);
}
.operations-category .operations-grid {
    padding: 1rem;
}
.operations-category .panel-note {
    margin: 1rem 1rem 0;
}

.metric-grid-six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1280px) {
    .metric-grid-six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .metric-grid-six .metric-block:nth-child(n+4) { border-top: 1px solid var(--line); }
}
@media (max-width: 760px) {
    .metric-grid-six { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ============================================================
   Operations V127 — Phase 1 chiusa: settori, modalità, tooltip e controllo intervallo
   ============================================================ */
.operations-kpi-strip { margin-bottom: 18px; }
.operations-legend { margin-bottom: 18px; }
.operations-legend-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; padding:16px 18px 20px; }
.operations-legend-grid > div { border:1px solid var(--border); background:rgba(7,18,29,.58); padding:14px; min-height:92px; }
.operations-legend-grid p { margin:10px 0 0; color:var(--muted); line-height:1.55; }
.operation-mode { display:inline-flex; align-items:center; min-height:24px; padding:3px 8px; border:1px solid currentColor; font-size:.69rem; font-weight:900; letter-spacing:.09em; }
.mode-auto { color:#70f3c2; background:rgba(27,150,111,.18); }
.mode-semi { color:#69bfff; background:rgba(39,128,192,.17); }
.mode-manual { color:#ffd36c; background:rgba(196,138,30,.17); }

.operations-sector { --sector:#3ba7ee; --sector-rgb:59,167,238; margin:18px 0; border:1px solid rgba(var(--sector-rgb),.58); border-left:5px solid var(--sector); background:linear-gradient(145deg,rgba(var(--sector-rgb),.115),rgba(7,17,27,.96) 42%); box-shadow:0 12px 34px rgba(0,0,0,.17); }
.operations-sector.sector-teal { --sector:#38c7b5; --sector-rgb:56,199,181; }
.operations-sector.sector-amber { --sector:#d6a83c; --sector-rgb:214,168,60; }
.operations-sector.sector-violet { --sector:#9a7bd1; --sector-rgb:154,123,209; }
.operations-sector.sector-blue { --sector:#469fe5; --sector-rgb:70,159,229; }
.operations-sector-header { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:start; gap:14px; padding:15px 17px; border-bottom:1px solid rgba(var(--sector-rgb),.42); background:rgba(var(--sector-rgb),.105); }
.operations-sector-header h2 { margin:2px 0 5px; }
.operations-sector-header p { margin:0; color:#b5cad9; line-height:1.5; }
.operations-sector-number { display:grid; place-items:center; min-width:34px; height:34px; padding:0 8px; border:1px solid rgba(var(--sector-rgb),.8); background:rgba(var(--sector-rgb),.26); color:#fff; font-weight:900; font-size:1rem; box-shadow:inset 3px 0 0 var(--sector); }
.operations-count { color:#c9e7fb; font-size:.77rem; letter-spacing:.08em; white-space:nowrap; }
.operations-sector-body { padding:16px; }
.operations-sector-warning { margin:0 0 14px; padding:11px 13px; border:1px solid rgba(var(--sector-rgb),.52); background:rgba(var(--sector-rgb),.12); color:#d8e5ee; }
.operations-grid { display:grid; grid-template-columns:repeat(3,minmax(230px,1fr)); gap:14px; }
.operation-card { position:relative; display:flex; flex-direction:column; min-height:275px; padding:15px; border:1px solid rgba(var(--sector-rgb),.42); background:linear-gradient(160deg,rgba(var(--sector-rgb),.12),rgba(5,16,25,.92) 55%); overflow:visible; transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease; }
.operation-card:hover,.operation-card:focus-within { transform:translateY(-2px); border-color:var(--sector); box-shadow:0 13px 30px rgba(0,0,0,.28),inset 0 1px 0 rgba(var(--sector-rgb),.12); z-index:5; }
.operation-card-top { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:12px; }
.operation-step { display:inline-grid; place-items:center; min-width:31px; height:27px; padding:0 7px; border:1px solid rgba(var(--sector-rgb),.75); background:rgba(var(--sector-rgb),.25); color:#fff; font-weight:900; }
.operation-card h3 { margin:0 0 8px; font-size:1rem; line-height:1.35; }
.operation-card > p { margin:0 0 13px; color:#b9d4e6; line-height:1.55; flex:1; }
.operation-meta { display:flex; align-items:center; justify-content:space-between; gap:8px; margin:0 0 12px; font-size:.67rem; color:#88bfe2; }
.operation-meta code { max-width:58%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#8bc9f3; }
.operation-card button { width:100%; margin-top:auto; }
.operation-help { position:absolute; left:12px; right:12px; bottom:58px; padding:12px; border:1px solid var(--sector); background:#071520; color:#dcebf4; font-size:.76rem; line-height:1.55; opacity:0; visibility:hidden; transform:translateY(7px); pointer-events:none; transition:opacity .14s ease,transform .14s ease,visibility .14s; box-shadow:0 14px 34px rgba(0,0,0,.45); }
.operation-card button:hover ~ .operation-help,.operation-card button:focus-visible ~ .operation-help { opacity:1; visibility:visible; transform:translateY(0); }
.operation-card-control .operation-help { top:calc(100% + 8px); bottom:auto; z-index:20; }
.automation-control-grid { display:grid; grid-template-columns:minmax(260px,1fr) minmax(260px,1fr) minmax(300px,1.05fr); gap:14px; }
.operation-card-control { min-height:285px; }
.operation-card-control > p { flex:0 0 auto; }
.operations-capture-form,.operation-control-form { display:flex; flex:1; flex-direction:column; align-items:stretch; flex-wrap:nowrap; min-height:0; }
.operations-capture-form { gap:12px; margin-top:2px; }
.operation-control-form > button,.operations-capture-form > button { margin-top:auto; }
.operations-capture-setting { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:5px 12px; padding:11px 12px; border:1px solid rgba(var(--sector-rgb),.48); background:rgba(4,18,28,.72); }
.operations-capture-setting label { margin:0; color:#d5eaf7; font-size:.75rem; font-weight:800; letter-spacing:.07em; text-transform:uppercase; }
.operations-capture-setting small { grid-column:1/-1; color:#8fb7ce; font-size:.68rem; line-height:1.4; }
.operations-capture-input-wrap { display:flex; align-items:center; justify-content:flex-end; gap:7px; color:#a9c7d8; font-size:.72rem; font-weight:800; }
.operations-capture-input-wrap input { width:78px; min-width:78px; margin:0; text-align:center; }
.operations-runtime-card { border:1px solid rgba(var(--sector-rgb),.42); background:rgba(5,16,25,.82); padding:15px; }
.operations-runtime-card .audit-list { margin-bottom:14px; }
.operations-failure-alert { display:grid; grid-template-columns:minmax(0,1fr) minmax(300px,.65fr); gap:20px; align-items:center; }
.compact-audit { margin:0; }
.operations-audit-sector table { background:rgba(5,15,24,.78); }
.operations-audit-sector td small { display:block; margin-top:4px; color:#75aed2; }

@media (max-width:1250px) {
  .operations-grid { grid-template-columns:repeat(2,minmax(230px,1fr)); }
  .automation-control-grid { grid-template-columns:repeat(2,minmax(260px,1fr)); }
  .operations-runtime-card { grid-column:1/-1; }
}
@media (max-width:760px) {
  .operations-legend-grid,.operations-grid,.automation-control-grid,.operations-failure-alert { grid-template-columns:1fr; }
  .operations-sector-header { grid-template-columns:auto minmax(0,1fr); }
  .operations-sector-header > .status,.operations-count { grid-column:2; justify-self:start; }
  .operation-help { position:static; opacity:1; visibility:visible; transform:none; margin-top:12px; box-shadow:none; }
  .operation-card { min-height:auto; }
  .operations-capture-setting { grid-template-columns:1fr; align-items:stretch; }
  .operations-capture-input-wrap { justify-content:flex-start; }
  .operations-capture-setting small { grid-column:1; }
}


/* ============================================================
   Operations V127 — sezioni collassabili e codifica cromatica job
   ============================================================ */
.operations-sector-header {
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
}
.operations-sector-toggle {
    appearance:none;
    display:grid;
    grid-template-columns:auto minmax(0,1fr) auto;
    align-items:start;
    gap:14px;
    width:100%;
    min-width:0;
    padding:0;
    border:0;
    background:transparent;
    color:inherit;
    text-align:left;
    cursor:pointer;
    font:inherit;
}
.operations-sector-toggle:focus-visible {
    outline:2px solid var(--sector);
    outline-offset:5px;
}
.operations-sector-title { display:block; min-width:0; }
.operations-sector-title > .eyebrow { display:block; margin:0; }
.operations-sector-title > strong { display:block; margin:2px 0 5px; color:#f4f8fb; font-size:1.25rem; line-height:1.25; }
.operations-sector-title > span:last-child { display:block; color:#b5cad9; line-height:1.5; }
.operations-sector-chevron {
    width:13px;
    height:13px;
    margin:9px 3px 0 8px;
    border-right:2px solid var(--sector);
    border-bottom:2px solid var(--sector);
    transform:rotate(45deg);
    transition:transform .18s ease,margin .18s ease;
}
.operations-sector.is-collapsed .operations-sector-chevron {
    margin-top:12px;
    transform:rotate(-45deg);
}
.operations-sector.is-collapsed .operations-sector-header { border-bottom-color:transparent; }
.operations-sector-body {
    transition:height .18s ease,opacity .18s ease;
}
.operations-sector-body[hidden] { display:none !important; }

.operation-job-row { --job-accent:#7897aa; --job-accent-rgb:120,151,170; }
.operation-job-row > td:first-child { box-shadow:inset 4px 0 0 var(--job-accent); }
.operation-job-row .operation-action-cell {
    background:linear-gradient(90deg,rgba(var(--job-accent-rgb),.15),rgba(var(--job-accent-rgb),.035));
}
.operation-kind-badge {
    display:inline-flex;
    align-items:center;
    min-height:20px;
    margin:0 7px 5px 0;
    padding:2px 6px;
    border:1px solid var(--job-accent,#7897aa);
    background:rgba(var(--job-accent-rgb,120,151,170),.13);
    color:var(--job-accent,#b8d2e2);
    font-size:.61rem;
    font-weight:900;
    letter-spacing:.08em;
    vertical-align:middle;
}
.job-action-capture { --job-accent:#38c7b5; --job-accent-rgb:56,199,181; }
.job-action-valuebet { --job-accent:#ba83ee; --job-accent-rgb:186,131,238; }
.job-action-diagnostic { --job-accent:#e4b54c; --job-accent-rgb:228,181,76; }
.job-action-research { --job-accent:#5caef0; --job-accent-rgb:92,174,240; }
.job-action-model { --job-accent:#9a7bd1; --job-accent-rgb:154,123,209; }
.job-action-daily { --job-accent:#62d9a5; --job-accent-rgb:98,217,165; }
.job-action-other { --job-accent:#8ca6b8; --job-accent-rgb:140,166,184; }
.operation-job-row:hover td { background-color:rgba(var(--job-accent-rgb),.08); }
.operation-job-row .market-code { color:var(--job-accent); }
.status-review { color:#69bfff; }

.operations-job-detail > .panel {
    border-left:5px solid var(--job-accent,#7897aa);
    background:linear-gradient(145deg,rgba(var(--job-accent-rgb,120,151,170),.10),rgba(12,24,34,.97) 42%);
}
.operations-job-detail .operation-kind-badge { margin-bottom:0; }
.operations-error-diagnostic {
    margin-top:18px;
    border-left:5px solid #ff6b6b;
    background:linear-gradient(145deg,rgba(255,80,80,.12),rgba(12,24,34,.97) 46%);
}
.operations-error-diagnostic code { color:#ffb9b9; overflow-wrap:anywhere; }
.operations-error-diagnostic dd { max-width:1100px; line-height:1.55; }

@media (max-width:760px) {
    .operations-sector-header { grid-template-columns:1fr; }
    .operations-sector-header > .status,
    .operations-sector-header > .operations-count { grid-column:1; justify-self:start; margin-left:48px; }
    .operations-sector-toggle { grid-template-columns:auto minmax(0,1fr) auto; }
    .operations-sector-title > strong { font-size:1.08rem; }
}

/* Operations V142 — hardening enqueue, stati pulsante e dettaglio diagnostico */
.operation-state-row{display:flex;align-items:center;justify-content:space-between;gap:.65rem;min-height:24px;margin:-3px 0 8px}.operation-state-row a{font-size:.72rem;color:#89cfff}.operation-live-state{display:inline-flex;align-items:center;min-height:22px;padding:.2rem .45rem;border:1px solid currentColor;font-size:.66rem;font-weight:900;letter-spacing:.06em}.operation-state-available{color:#8dd9ba}.operation-state-queued{color:#e2bd68}.operation-state-running{color:#71c6ff}.operation-state-completed{color:#72d69d}.operation-state-failed{color:#ff8b8b}.operation-state-suspended{color:#b6a7d8}.operation-state-not-applicable{color:#aeb8c0}.operation-state-blocked{color:#f0b563}.operation-block-reason{display:block;margin-top:.45rem;padding:.45rem .55rem;border-left:3px solid currentColor;color:#d8c78f;background:rgba(214,168,60,.08);line-height:1.4}.operation-card button:disabled,.operations-capture-form button:disabled,.operation-control-form button:disabled{cursor:not-allowed;opacity:.58;filter:saturate(.55)}form[aria-busy="true"]{pointer-events:none}form[aria-busy="true"] .operation-live-state{color:#e2bd68}.status-running{color:#71c6ff;border-color:#3f88b6;background:rgba(63,136,182,.13)}
.operations-job-result,.operations-job-technical,.operations-raw-log{margin-bottom:18px}.operations-diagnostic-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0}.operations-diagnostic-grid>div{min-width:0}.operations-diagnostic-grid .audit-span{grid-column:1/-1}.operations-diagnostic-grid code{white-space:pre-wrap;word-break:break-word}.operations-functional-valid,.operations-recalculated-note{margin-top:14px;padding:11px 13px;border:1px solid #3b7d5e;background:rgba(59,125,94,.12);color:#caebd8}.operations-recalculated-note{border-color:#8c7338;background:rgba(140,115,56,.12);color:#eadba9}.operations-error-diagnostic{border-left:5px solid #d85d5d}.operations-job-result{border-left:5px solid var(--sector,#469fe5)}
@media (max-width:760px){.operations-diagnostic-grid{grid-template-columns:1fr}.operations-diagnostic-grid .audit-span{grid-column:auto}.operation-state-row{align-items:flex-start;flex-direction:column}.operations-audit-sector table{min-width:1180px}}
.operations-job-result,.operations-job-technical{border-left:5px solid var(--job-accent,#7897aa);background:linear-gradient(145deg,rgba(var(--job-accent-rgb,120,151,170),.10),rgba(12,24,34,.97) 42%)}
.operations-raw-log{border-left:5px solid #536f82;background:linear-gradient(145deg,rgba(83,111,130,.10),rgba(7,16,24,.98) 42%)}

/* Phase 3 V142 - UI closure and explicit data-state contracts. */
.provider-margin-shared {
    display: block;
    grid-column: 1 / -1;
    color: var(--text-muted);
    font-size: 11px;
}
.provider-margin-shared strong { color: var(--text); }
.dashboard-postmatch-reminder-code {
    color: var(--text-muted);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 10px;
    overflow-wrap: anywhere;
}
.phase3-manual-sync-banner,
.corner-scale-contract,
.understat-scope-summary { margin-bottom: 18px; }
.corner-scale-contract code { overflow-wrap: anywhere; }
@media (max-width: 760px) {
    .provider-margin-shared { grid-column: auto; }
}



/* V142 ValueBet provider comparison: compact desktop layout without horizontal scrolling. */
.valuebet-provider-comparison-wrap { overflow-x: hidden; }
.valuebet-provider-comparison-table { width: 100%; min-width: 0; table-layout: fixed; font-size: .78rem; }
.valuebet-provider-comparison-table th,
.valuebet-provider-comparison-table td { padding: .65rem .42rem; overflow-wrap: anywhere; }
.valuebet-provider-comparison-table th { font-size: .68rem; line-height: 1.15; }
.valuebet-provider-comparison-table th:nth-child(1) { width: 6.5%; }
.valuebet-provider-comparison-table th:nth-child(2) { width: 8%; }
.valuebet-provider-comparison-table th:nth-child(3) { width: 7%; }
.valuebet-provider-comparison-table th:nth-child(4) { width: 5%; }
.valuebet-provider-comparison-table th:nth-child(5) { width: 7%; }
.valuebet-provider-comparison-table th:nth-child(6) { width: 7%; }
.valuebet-provider-comparison-table th:nth-child(7),
.valuebet-provider-comparison-table th:nth-child(8),
.valuebet-provider-comparison-table th:nth-child(9) { width: 6.5%; }
.valuebet-provider-comparison-table th:nth-child(10),
.valuebet-provider-comparison-table th:nth-child(11),
.valuebet-provider-comparison-table th:nth-child(12),
.valuebet-provider-comparison-table th:nth-child(13) { width: 7.5%; }
.valuebet-provider-comparison-table th:nth-child(14) { width: 5.5%; }
.valuebet-profile-summary-wrap { overflow-x: hidden; }
.valuebet-profile-runs .is-active-profile { background: rgba(65, 184, 255, .08); }
.market-universe-selection-table .provider-odd-cell { cursor: help; white-space: nowrap; }
.market-universe-selection-table .provider-odd-meta { color: var(--muted); font-size: 10px; font-weight: 600; white-space: nowrap; }
@media (max-width: 1180px) {
    .valuebet-provider-comparison-wrap { overflow-x: auto; }
    .valuebet-provider-comparison-table { min-width: 1080px; table-layout: auto; }
}

/* V143 - sidebar collassabile e guida semantica globale. */
.app-shell {
    transition: grid-template-columns .18s ease;
}
.sidebar {
    overflow: hidden;
    transition: width .18s ease, opacity .14s ease, border-color .18s ease;
}
.sidebar-toggle {
    position: relative;
    z-index: 9101;
    flex: 0 0 auto;
    min-width: 78px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 11px;
    border: 1px solid var(--line);
    background: var(--surface-soft);
    color: var(--ink);
    cursor: pointer;
}
.sidebar-toggle:hover,
.sidebar-toggle:focus-visible {
    border-color: var(--accent-strong);
    background: #17232e;
    outline: 0;
}
.sidebar-toggle-icon {
    width: 17px;
    display: grid;
    gap: 3px;
}
.sidebar-toggle-icon i {
    display: block;
    width: 100%;
    height: 2px;
    background: currentColor;
    transition: transform .18s ease, opacity .18s ease;
}
.sidebar-toggle-label { font-size: 12px; font-weight: 760; letter-spacing: .04em; }
.app-shell.is-sidebar-collapsed { grid-template-columns: 0 minmax(0, 1fr); }
.app-shell.is-sidebar-collapsed .sidebar {
    width: 0;
    opacity: 0;
    pointer-events: none;
    border-right-color: transparent;
}
.app-shell.is-sidebar-collapsed .sidebar-toggle-icon i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.app-shell.is-sidebar-collapsed .sidebar-toggle-icon i:nth-child(2) { opacity: 0; }
.app-shell.is-sidebar-collapsed .sidebar-toggle-icon i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.has-semantic-help {
    cursor: help;
    text-decoration-line: underline;
    text-decoration-style: dotted;
    text-decoration-color: rgba(147, 197, 253, .48);
    text-underline-offset: 4px;
}
thead th.has-semantic-help { cursor: help; }
thead th.sortable-column.has-semantic-help,
thead th:has(.grid-sort-link).has-semantic-help { cursor: pointer; }
.has-semantic-help:focus-visible {
    outline: 2px solid var(--accent-strong);
    outline-offset: -2px;
}
.semantic-tooltip {
    position: fixed;
    z-index: 10000;
    width: max-content;
    padding: 10px 12px;
    border: 1px solid #58708a;
    background: #081018;
    color: #edf5fc;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .42);
    font-size: 12px;
    line-height: 1.45;
    text-align: left;
    pointer-events: none;
    white-space: normal;
}
.semantic-tooltip[hidden] { display: none; }

@media (max-width: 920px) {
    .app-shell,
    .app-shell.is-sidebar-collapsed { grid-template-columns: 1fr; }
    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 9000;
        width: min(86vw, 320px);
        height: 100vh;
        box-shadow: 18px 0 45px rgba(0, 0, 0, .42);
    }
    .app-shell.is-sidebar-collapsed .sidebar { width: min(86vw, 320px); transform: translateX(-105%); }
    .app-shell:not(.is-sidebar-collapsed) .sidebar { transform: translateX(0); }
    .topbar { padding-left: 16px; }
    .sidebar-toggle-label { display: none; }
    .sidebar-toggle { min-width: 42px; }
}


/* V144 - andamento quote, sandwich operativo e font globale ufficiale. */
.sandwich-section {
    margin: 0 0 14px;
    border: 1px solid var(--line);
    background: var(--surface);
}
.sandwich-section > summary {
    display: grid;
    grid-template-columns: 34px minmax(0,1fr) 18px;
    align-items: center;
    gap: 11px;
    min-height: 58px;
    padding: 10px 14px;
    list-style: none;
    cursor: pointer;
    border-bottom: 1px solid transparent;
    user-select: none;
}
.sandwich-section > summary::-webkit-details-marker { display: none; }
.sandwich-section[open] > summary { border-bottom-color: var(--line); }
.sandwich-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid #496b87;
    background: #122230;
    color: #cfe9ff;
    font-size: 12px;
    font-weight: 850;
    font-variant-numeric: tabular-nums;
}
.sandwich-heading { min-width: 0; }
.sandwich-heading strong { display: block; color: var(--ink); font-size: 14px; line-height: 1.25; }
.sandwich-heading small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.sandwich-chevron {
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--accent-strong);
    border-bottom: 2px solid var(--accent-strong);
    transform: rotate(45deg);
    transition: transform .16s ease;
}
.sandwich-section:not([open]) .sandwich-chevron { transform: rotate(-45deg); }
.sandwich-body { min-width: 0; padding: 12px 14px 14px; }
.sandwich-body > .panel-note { padding: 4px 0 0; }

.odds-trend-filter {
    display: grid;
    grid-template-columns: minmax(190px,1.25fr) minmax(120px,.7fr) minmax(110px,.55fr) minmax(170px,1fr) auto;
    align-items: end;
    gap: 10px;
    margin: 0 0 12px;
}
.odds-trend-filter .filter-actions { align-items: center; }
.odds-trend-summary-wrap { border: 1px solid var(--line-soft); }
.odds-trend-summary-table { min-width: 860px; }
.odds-trend-chart-body { padding-top: 10px; }
.odds-trend-chart-shell {
    min-width: 0;
    border: 1px solid var(--line-soft);
    background: #101820;
    padding: 10px 12px 8px;
}
.odds-trend-chart { width: 100%; min-height: 310px; overflow: hidden; }
.odds-trend-chart svg { display: block; width: 100%; height: 310px; }
.odds-trend-grid { stroke: #2a3947; stroke-width: 1; vector-effect: non-scaling-stroke; }
.odds-trend-axis-label { fill: #8fa1b2; font-family: var(--font-sans); font-size: 11px; }
.odds-trend-line { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; }
.odds-trend-point { stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.odds-trend-series-0 { stroke: #66b6e8; color: #66b6e8; }
.odds-trend-series-1 { stroke: #7bcf9a; color: #7bcf9a; }
.odds-trend-series-2 { stroke: #e7b461; color: #e7b461; }
.odds-trend-series-3 { stroke: #c28be3; color: #c28be3; }
.odds-trend-series-4 { stroke: #e07d7d; color: #e07d7d; }
.odds-trend-series-5 { stroke: #6fd0c4; color: #6fd0c4; }
.odds-trend-series-6 { stroke: #d5d779; color: #d5d779; }
.odds-trend-series-7 { stroke: #94a9ee; color: #94a9ee; }
.odds-trend-point.odds-trend-series-0,
.odds-trend-point.odds-trend-series-1,
.odds-trend-point.odds-trend-series-2,
.odds-trend-point.odds-trend-series-3,
.odds-trend-point.odds-trend-series-4,
.odds-trend-point.odds-trend-series-5,
.odds-trend-point.odds-trend-series-6,
.odds-trend-point.odds-trend-series-7 { fill: #101820; }
.odds-trend-point.is-key { fill: currentColor; }
.odds-trend-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 7px 2px 1px; }
.odds-trend-legend-item { display: inline-flex; align-items: center; gap: 6px; color: #cbd7e1; font-size: 11px; white-space: nowrap; }
.odds-trend-legend-swatch { width: 18px; height: 2px; background: currentColor; }
.odds-trend-points-wrap { max-height: 520px; border: 1px solid var(--line-soft); }
.odds-trend-points-wrap thead th { position: sticky; top: 0; z-index: 1; }

.metric-grid-six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.valuebet-provider-coverage-wrap { overflow-x: auto; }
.valuebet-provider-coverage-table { min-width: 890px; }
.valuebet-provider-coverage-table td,
.valuebet-provider-coverage-table th { padding: 8px 10px; }
.valuebet-odds-link { color: #dceeff; text-decoration: none; font-weight: 760; white-space: nowrap; }
.valuebet-odds-link:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.valuebet-maturity-note { margin: 0; padding: 10px 14px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 12px; }

@media (max-width: 1180px) {
    .metric-grid-six { grid-template-columns: repeat(3, minmax(0,1fr)); }
    .metric-grid-six .metric-block:nth-child(3n) { border-right: 0; }
    .odds-trend-filter { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .odds-trend-filter .filter-actions { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
    .metric-grid-six { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .metric-grid-six .metric-block { min-height: 88px; padding: 14px 12px; }
    .metric-grid-six .metric-block:nth-child(3n) { border-right: 1px solid var(--line); }
    .metric-grid-six .metric-block:nth-child(2n) { border-right: 0; }
    .odds-trend-filter { grid-template-columns: 1fr; }
    .odds-trend-filter .filter-actions { grid-column: auto; }
    .odds-trend-filter .button { width: 100%; }
    .sandwich-section > summary { grid-template-columns: 32px minmax(0,1fr) 16px; padding: 9px 10px; }
    .sandwich-body { padding: 10px; }
    .odds-trend-chart-shell { padding: 8px 6px 6px; }
    .odds-trend-chart,
    .odds-trend-chart svg { min-height: 260px; height: 260px; }
}

/* V145 - UTC esplicito nello storico quote, freschezza leggibile e versione software visibile. */
.odds-trend-freshness { white-space: nowrap; }
.odds-trend-freshness small { display: block; margin-top: 1px; color: var(--dim); font-size: 10px; font-weight: 600; line-height: 1.15; }
@media (max-width: 620px) {
    .environment-label, .database-label, .topbar-auth-link { white-space: nowrap; }
}
.provider-history-gap { margin-top: 10px; }
.valuebet-provider-history-wrap { overflow-x: auto; margin-top: 8px; }
.valuebet-provider-history-table { min-width: 650px; }
.valuebet-provider-history-table td,
.valuebet-provider-history-table th { padding: 8px 10px; }

/* V147 - ValueBet candidate table: full-width desktop, one compact row per candidate. */
.content.content-wide {
    width: 100%;
    max-width: none;
    margin: 0;
}
.valuebet-content-wide { padding-left: 22px; padding-right: 22px; }
.valuebet-candidates-panel .panel-heading { padding-top: 13px; padding-bottom: 11px; }
.valuebet-candidate-wrap {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}
.valuebet-candidate-table {
    width: 100%;
    min-width: 1780px;
    table-layout: auto;
    font-size: 11px;
    line-height: 1.15;
}
.valuebet-candidate-table th,
.valuebet-candidate-table td {
    padding: 7px 6px;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
    vertical-align: middle;
}
.valuebet-candidate-table th {
    font-size: 9px;
    letter-spacing: .055em;
}
.valuebet-candidate-table tbody tr { height: 36px; }
.valuebet-candidate-table .valuebet-cell-kickoff { width: 112px; }
.valuebet-candidate-table .valuebet-cell-match { width: 150px; max-width: 190px; }
.valuebet-candidate-table .valuebet-cell-market { width: 112px; max-width: 140px; }
.valuebet-candidate-table .valuebet-cell-selection { width: 64px; }
.valuebet-candidate-table .valuebet-cell-expected { min-width: 112px; }
.valuebet-candidate-table .valuebet-cell-real { min-width: 140px; }
.valuebet-candidate-table .valuebet-cell-provider { min-width: 150px; }
.valuebet-candidate-table .valuebet-cell-ev-prud { min-width: 108px; }
.valuebet-candidate-table .valuebet-cell-context { min-width: 92px; }
.valuebet-candidate-table .valuebet-cell-status { min-width: 120px; }
.valuebet-candidate-table .valuebet-cell-reason {
    width: 190px;
    max-width: 190px;
}
.valuebet-candidate-table .valuebet-cell-reason > span {
    display: block;
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.valuebet-candidate-table .valuebet-inline-meta {
    color: var(--muted);
    font-size: 10px;
    font-weight: 500;
}
.valuebet-candidate-table .status {
    font-size: 9px;
    letter-spacing: .045em;
    white-space: nowrap;
}
.valuebet-candidate-table .table-link,
.valuebet-candidate-table .valuebet-odds-link { white-space: nowrap; }

@media (min-width: 1900px) {
    .valuebet-candidate-table { min-width: 0; font-size: 11px; }
}
@media (max-width: 1180px) {
    .valuebet-content-wide { padding-left: 14px; padding-right: 14px; }
    .valuebet-candidate-table { min-width: 1780px; }
}
@media (max-width: 760px) {
    .valuebet-content-wide { padding-left: 10px; padding-right: 10px; }
    .valuebet-candidate-table { min-width: 1740px; }
    .valuebet-candidate-table th,
    .valuebet-candidate-table td { padding-top: 6px; padding-bottom: 6px; }
}

/* V148 - UI operativa globale: pannelli sandwich, tabelle full-width/single-row, centraggi e colore armonizzato. */
:root {
    --domain-operations: #49bfb1;
    --domain-prematch: #5aa6df;
    --domain-valuebet: #79c78f;
    --domain-results: #e0ae5a;
    --domain-governance: #7f9ab3;
    --domain-models: #9a86d8;
    --domain-research: #c77fa7;
    --domain-archive: #83909d;
}

/* Lo spazio operativo e delle tabelle usa tutta la larghezza disponibile. */
.content,
.content.content-wide {
    width: 100%;
    max-width: none;
    margin: 0;
    padding-left: 22px;
    padding-right: 22px;
}
.dashboard-grid:has(table),
.detail-grid:has(table) {
    grid-template-columns: minmax(0, 1fr);
}

/* Regola globale tabelle: un record su una sola riga; scroll orizzontale solo quando necessario. */
.table-wrap,
.prematch-table-wrap,
.upcoming-table-wrap,
.selection-review-table-wrap,
.profile-matrix-table-wrap,
.result-review-table-wrap,
.calibration-scorecards-table-wrap,
.calibration-input-table-wrap,
.calibration-bins-table-wrap,
.calibration-fixture-table-wrap,
.operations-alert-table-wrap,
.seasonal-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto !important;
    overflow-y: hidden;
    scrollbar-gutter: stable;
}
.table-wrap table,
table {
    width: 100%;
    min-width: 100% !important;
    table-layout: auto !important;
}
table th,
table td {
    width: auto !important;
    padding: 7px 9px;
    text-align: center !important;
    vertical-align: middle;
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    font-variant-numeric: tabular-nums;
}
table thead th,
table th.number,
table td.number,
th.number .grid-sort-link,
.grid-sort-link {
    text-align: center !important;
}
table tbody tr { height: 34px; }
table td small { display: inline !important; margin: 0 0 0 6px !important; white-space: nowrap; }
table td .muted { white-space: nowrap; }
.compact-table th,
.compact-table td { padding: 6px 8px; }

/* Colonne descrittive eccezionalmente lunghe restano su una riga e non dominano la tabella. */
table td[title],
table .file-name {
    text-overflow: ellipsis;
}

/* Qualunque pannello standard diventa un sandwich apribile/chiudibile dalla testata intera. */
.panel > .panel-heading.panel-toggle-heading {
    position: relative;
    min-height: 54px;
    align-items: center;
    padding: 12px 44px 11px 16px;
    cursor: pointer;
    user-select: none;
    background: linear-gradient(90deg, rgba(76,156,224,.055), transparent 38%);
    transition: background-color .14s ease, border-color .14s ease;
}
.panel > .panel-heading.panel-toggle-heading:hover,
.panel > .panel-heading.panel-toggle-heading:focus-visible {
    background: linear-gradient(90deg, rgba(76,156,224,.11), rgba(73,191,177,.035) 55%, transparent);
    outline: 0;
}
.panel > .panel-heading.panel-toggle-heading::after {
    content: "";
    position: absolute;
    right: 18px;
    top: 50%;
    width: 9px;
    height: 9px;
    border-right: 2px solid var(--accent-strong);
    border-bottom: 2px solid var(--accent-strong);
    transform: translateY(-62%) rotate(45deg);
    transition: transform .16s ease;
}
.panel.is-panel-collapsed > .panel-heading.panel-toggle-heading::after {
    transform: translateY(-35%) rotate(-45deg);
}
.panel.is-panel-collapsed > :not(.panel-heading) { display: none !important; }
.panel-heading .eyebrow { color: #67b7ee; }

/* Menu per competenze: stessa UI, accenti cromatici sobri e leggibili. */
.nav-group > summary { border-left: 3px solid transparent; }
.nav-group > summary::before {
    content: "";
    width: 7px;
    height: 7px;
    margin-right: 9px;
    border-radius: 50%;
    background: var(--nav-domain-color, var(--dim));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--nav-domain-color, var(--dim)) 14%, transparent);
}
.nav-domain-operations { --nav-domain-color: var(--domain-operations); }
.nav-domain-prematch { --nav-domain-color: var(--domain-prematch); }
.nav-domain-valuebet { --nav-domain-color: var(--domain-valuebet); }
.nav-domain-results { --nav-domain-color: var(--domain-results); }
.nav-domain-governance { --nav-domain-color: var(--domain-governance); }
.nav-domain-models { --nav-domain-color: var(--domain-models); }
.nav-domain-research { --nav-domain-color: var(--domain-research); }
.nav-domain-archive { --nav-domain-color: var(--domain-archive); }
.nav-group > summary { color: color-mix(in srgb, var(--nav-domain-color, var(--dim)) 70%, #c7d4df); }
.nav-group .nav-link.is-active { border-left-color: var(--nav-domain-color, var(--accent-strong)); background: color-mix(in srgb, var(--nav-domain-color, var(--accent-strong)) 12%, #152330); }
.nav-domain-valuebet > summary { background: rgba(121,199,143,.035); }

/* KPI interattivi e azioni ricorrenti. */
.metric-block-link {
    position: relative;
    display: block;
    min-width: 0;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .14s ease, box-shadow .14s ease;
}
.metric-block-link::after {
    content: "→";
    position: absolute;
    right: 14px;
    bottom: 12px;
    color: var(--accent-strong);
    font-size: 14px;
    opacity: .75;
}
.metric-block-link:hover,
.metric-block-link:focus-visible { background: #1a2833; box-shadow: inset 0 3px 0 var(--metric-accent, var(--accent-strong)); outline: 0; }
.metric-tone-teal { --metric-accent: var(--domain-operations); box-shadow: inset 0 2px 0 rgba(73,191,177,.55); }
.metric-tone-blue { --metric-accent: var(--domain-prematch); box-shadow: inset 0 2px 0 rgba(90,166,223,.55); }
.metric-tone-green { --metric-accent: var(--domain-valuebet); box-shadow: inset 0 2px 0 rgba(121,199,143,.55); }
.metric-tone-amber { --metric-accent: var(--domain-results); box-shadow: inset 0 2px 0 rgba(224,174,90,.55); }
.metric-tone-violet { --metric-accent: var(--domain-models); box-shadow: inset 0 2px 0 rgba(154,134,216,.55); }

.dashboard-actions-panel { border-color: #385164; }
.dashboard-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
}
.dashboard-action-card {
    min-height: 116px;
    padding: 14px 16px;
    border-right: 1px solid var(--line);
    color: inherit;
    text-decoration: none;
    background: #131d26;
}
.dashboard-action-card:last-child { border-right: 0; }
.dashboard-action-card:hover { background: #192733; }
.dashboard-action-card .eyebrow { margin-bottom: 7px; }
.dashboard-action-card strong { display: block; font-size: 20px; line-height: 1.1; }
.dashboard-action-card span { display: block; margin-top: 7px; color: var(--muted); font-size: 11px; }
.dashboard-action-card.action-quotes { box-shadow: inset 0 3px 0 var(--domain-operations); }
.dashboard-action-card.action-coverage { box-shadow: inset 0 3px 0 var(--domain-prematch); }
.dashboard-action-card.action-valuebet { box-shadow: inset 0 3px 0 var(--domain-valuebet); }
.dashboard-action-card.action-postmatch { box-shadow: inset 0 3px 0 var(--domain-results); }

/* ValueBet: maturità visibile senza tooltip e KPI con destinazione diretta. */
.valuebet-cell-maturity { min-width: 118px; }
.maturity-badge { font-size: 9px; font-weight: 820; letter-spacing: .045em; text-transform: uppercase; white-space: nowrap; }
.maturity-early { color: var(--warn); }
.maturity-ready { color: var(--good); }
.maturity-lineup { color: var(--accent-strong); }
.maturity-rejected { color: var(--dim); }
.valuebet-kpi-grid .metric-block { padding: 0; }
.valuebet-kpi-grid .metric-block-link { min-height: 102px; padding: 18px 17px; }

/* Q6 è esclusivamente analisi post-partita: evidenza visiva senza confonderlo con la ricerca ValueBet pre-match. */
.operation-card[data-postmatch-analysis="true"] { border-color: color-mix(in srgb, var(--domain-results) 55%, #2e4658); box-shadow: inset 0 3px 0 rgba(224,174,90,.68); }
.operation-postmatch-badge { display:inline-flex; align-items:center; min-height:20px; padding:0 6px; border:1px solid rgba(224,174,90,.7); color:#efc779; font-size:9px; font-weight:850; letter-spacing:.07em; text-transform:uppercase; }

@media (max-width: 1180px) {
    .content, .content.content-wide { padding-left: 14px; padding-right: 14px; }
    .dashboard-actions-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .dashboard-action-card:nth-child(2) { border-right: 0; }
    .dashboard-action-card:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 760px) {
    .content, .content.content-wide { padding-left: 10px; padding-right: 10px; }
    .dashboard-actions-grid { grid-template-columns: 1fr; }
    .dashboard-action-card { border-right: 0; border-bottom: 1px solid var(--line); }
    .dashboard-action-card:last-child { border-bottom: 0; }
    table { min-width: max-content !important; }
    table th, table td { padding: 6px 8px; }
}

/* V148 - nessuna colonna dati viene sacrificata sui viewport stretti: si usa lo scroll orizzontale. */
.profile-reason-list { display: flex !important; align-items: center; gap: 10px !important; white-space: nowrap; }
.profile-reason-list li { display: inline !important; white-space: nowrap; }
@media (max-width: 1600px) {
    .prematch-table .prematch-input-column,
    .upcoming-predictions-table .upcoming-optional-column,
    .selection-review-table .selection-input-column,
    .profile-matrix-table .profile-matrix-input-column,
    .dashboard-upcoming-optional,
    .calibration-fixture-table th:nth-child(5), .calibration-fixture-table td:nth-child(5),
    .calibration-fixture-table th:nth-child(6), .calibration-fixture-table td:nth-child(6),
    .calibration-fixture-table th:nth-child(7), .calibration-fixture-table td:nth-child(7),
    .operations-alert-table th:nth-child(2), .operations-alert-table td:nth-child(2),
    .seasonal-table th:nth-child(8), .seasonal-table td:nth-child(8) {
        display: table-cell !important;
    }
}

/* Gli accessi rapidi KPI atterrano sulla testata della sezione senza nasconderla sotto l'header. */
#valuebet-provider-coverage,
#valuebet-last-capture,
#valuebet-candidates { scroll-margin-top: 78px; }
/* V148 - contenuti interattivi dentro una cella restano sulla stessa riga del record. */
table td form { display: inline-flex; align-items: center; margin: 0; white-space: nowrap; }
table td ul, table td ol { margin: 0; padding: 0; list-style: none; white-space: nowrap; }

/* V156R13 - sidebar brand close control + compact matchday lambda audit. */
.brand[data-sidebar-brand-close] { cursor: pointer; }
.brand[data-sidebar-brand-close]:hover,
.brand[data-sidebar-brand-close]:focus-visible { background: #15212b; outline: 0; }
.market-universe-matchday-audit { min-width: 1780px; font-size: .76rem; }
.market-universe-matchday-audit th,
.market-universe-matchday-audit td { white-space: nowrap; text-align: center; vertical-align: middle; }
.market-universe-matchday-audit th:nth-child(2),
.market-universe-matchday-audit td:nth-child(2) { text-align: left; }


/* V156R20 - richieste UI operative: diagnostica chiara, EV prudenziale e intestazioni semantiche. */
.valuebet-storage-unavailable {
    border-bottom: 1px solid var(--line-soft);
    color: var(--warn);
}
.valuebet-cell-ev-prud.valuebet-ev-positive {
    color: var(--good);
    font-weight: 820;
}
.valuebet-cell-ev-prud.valuebet-ev-negative {
    color: var(--bad);
    font-weight: 820;
}
.valuebet-cell-ev-prud.valuebet-ev-neutral { color: var(--muted); }

/* Solo le pagine operative marcate dal layout ricevono i gruppi cromatici delle intestazioni. */
body[data-operational-table-groups="true"] table thead th.op-head {
    --op-head-color: var(--dim);
    background: linear-gradient(180deg, color-mix(in srgb, var(--op-head-color) 13%, #111920), #111920 78%);
    border-bottom-color: color-mix(in srgb, var(--op-head-color) 34%, var(--line));
    box-shadow: inset 0 2px 0 color-mix(in srgb, var(--op-head-color) 72%, transparent);
}
body[data-operational-table-groups="true"] table thead th.op-head-identity { --op-head-color: var(--domain-prematch); }
body[data-operational-table-groups="true"] table thead th.op-head-model { --op-head-color: var(--domain-models); }
body[data-operational-table-groups="true"] table thead th.op-head-market { --op-head-color: var(--domain-operations); }
body[data-operational-table-groups="true"] table thead th.op-head-value { --op-head-color: var(--domain-valuebet); }
body[data-operational-table-groups="true"] table thead th.op-head-control { --op-head-color: var(--domain-results); }
body[data-operational-table-groups="true"] table thead th.op-head-status { --op-head-color: var(--domain-research); }
body[data-operational-table-groups="true"] table thead th.op-head-priority {
    color: color-mix(in srgb, var(--op-head-color) 66%, #ffffff);
    box-shadow: inset 0 3px 0 var(--op-head-color);
    background: linear-gradient(180deg, color-mix(in srgb, var(--op-head-color) 21%, #111920), #111920 82%);
}

/* Variazioni registrate: il contenitore globale non deve sopprimere lo scroll verticale locale. */
.odds-trend-points-wrap {
    max-height: 520px;
    overflow-x: auto !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}
.odds-trend-points-wrap thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background-color: var(--surface-soft);
}
.operational-table-scroll-note {
    padding: 0 0 8px;
    color: var(--muted);
    font-size: 11px;
}

/* V156R24 - watchlist automatica ValueBet e riordino pannelli nella stessa pagina. */
.valuebet-watchlist-panel { border-color: color-mix(in srgb, var(--domain-valuebet) 52%, var(--line)); }
.valuebet-watchlist-counts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}
.watchlist-count {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 7px;
    border: 1px solid var(--line-soft);
    background: #111b23;
    font-size: 10px;
    font-weight: 760;
    white-space: nowrap;
}
.watchlist-count-confirmed { border-color: color-mix(in srgb, var(--good) 48%, var(--line)); }
.watchlist-count-watch { border-color: color-mix(in srgb, var(--warn) 48%, var(--line)); }
.watchlist-count-drop { border-color: color-mix(in srgb, var(--bad) 48%, var(--line)); }
.valuebet-watchlist-policy { padding-top: 8px; padding-bottom: 5px; }
.valuebet-watchlist-wrap { max-height: 520px; overflow-y: auto; scrollbar-gutter: stable; }
.valuebet-watchlist-table { min-width: 1740px; }
.valuebet-watchlist-table thead th { position: sticky; top: 0; z-index: 3; background-color: var(--surface-soft); }
.watchlist-status {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 2px 6px;
    border: 1px solid currentColor;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .04em;
    white-space: nowrap;
}
.watchlist-status-confirmed { color: var(--good); background: color-mix(in srgb, var(--good) 8%, transparent); }
.watchlist-status-watch { color: var(--warn); background: color-mix(in srgb, var(--warn) 8%, transparent); }
.watchlist-status-drop { color: var(--bad); background: color-mix(in srgb, var(--bad) 8%, transparent); }
.watchlist-trend { font-size: 10px; font-weight: 780; white-space: nowrap; }
.watchlist-trend-up { color: var(--good); }
.watchlist-trend-down { color: var(--bad); }
.watchlist-trend-stable { color: var(--muted); }
.watchlist-trend-new { color: var(--accent-strong); }
.watchlist-row-confirmed { box-shadow: inset 3px 0 0 color-mix(in srgb, var(--good) 72%, transparent); }
.watchlist-row-watch { box-shadow: inset 3px 0 0 color-mix(in srgb, var(--warn) 72%, transparent); }
.watchlist-row-drop { box-shadow: inset 3px 0 0 color-mix(in srgb, var(--bad) 72%, transparent); opacity: .88; }
.watchlist-reason { max-width: 360px; overflow: hidden; text-overflow: ellipsis; }
.valuebet-watchlist-storage-note { padding-top: 7px; padding-bottom: 7px; }
.valuebet-cell-fair-odds { font-weight: 760; color: #dcecff; }
.valuebet-cell-odds-edge.valuebet-ev-positive { color: var(--good); font-weight: 820; }
.valuebet-cell-odds-edge.valuebet-ev-negative { color: var(--bad); font-weight: 820; }
.valuebet-cell-odds-edge.valuebet-ev-neutral { color: var(--muted); }


/* Riordino non distruttivo: soltanto pannelli/sandwich top-level della pagina, ordine persistito nel browser. */
.panel.is-panel-reorderable > .panel-heading,
.sandwich-section.is-panel-reorderable > summary { position: relative; }
.panel.is-panel-reorderable > .panel-heading { padding-right: 76px; }
.sandwich-section.is-panel-reorderable > summary { padding-right: 54px; }
.panel-reorder-handle {
    position: absolute;
    right: 42px;
    top: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    padding: 0;
    transform: translateY(-50%);
    border: 1px solid #42647d;
    background: #12202b;
    color: #a9d8f6;
    font: inherit;
    font-size: 15px;
    font-weight: 850;
    line-height: 1;
    cursor: grab;
    z-index: 5;
}
.sandwich-section.is-panel-reorderable > summary .panel-reorder-handle { right: 29px; }
.panel-reorder-handle:hover,
.panel-reorder-handle:focus-visible { border-color: var(--accent-strong); background: #182a37; outline: 0; }
.panel-reorder-handle:active { cursor: grabbing; }
.is-panel-dragging { opacity: .62; }
.panel-reorder-target-before { box-shadow: 0 -3px 0 var(--accent-strong), inset 0 0 0 1px color-mix(in srgb, var(--accent-strong) 34%, transparent); }
.panel-reorder-target-after { box-shadow: 0 3px 0 var(--accent-strong), inset 0 0 0 1px color-mix(in srgb, var(--accent-strong) 34%, transparent); }

@media (max-width: 760px) {
    .valuebet-watchlist-counts { justify-content: flex-start; }
    .panel-reorder-handle { display: none; }
    .panel.is-panel-reorderable > .panel-heading { padding-right: 44px; }
    .sandwich-section.is-panel-reorderable > summary { padding-right: 14px; }
}

/* V156R25 - user-sized operational table viewport + fail-soft auto refresh */
.table-viewport-resizable { position: relative; }
.table-viewport-resizable.table-viewport-has-height {
    overflow: auto !important;
    overflow-y: auto !important;
    min-height: 120px;
    max-height: none !important;
}
.table-viewport-resizable.table-viewport-has-height thead th { position: sticky; top: 0; z-index: 4; }
.table-viewport-resize-handle {
    position: sticky;
    left: 0;
    bottom: 0;
    display: block;
    width: 100%;
    height: 12px;
    margin-top: -1px;
    cursor: ns-resize;
    z-index: 8;
    border-top: 1px solid color-mix(in srgb, var(--accent-strong) 38%, var(--line));
    background: color-mix(in srgb, var(--surface-soft) 90%, transparent);
    touch-action: none;
}
.table-viewport-resize-handle::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 4px;
    width: 46px;
    height: 3px;
    transform: translateX(-50%);
    border-top: 1px solid color-mix(in srgb, var(--accent-strong) 72%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--accent-strong) 46%, transparent);
}
.table-viewport-resize-handle:hover,
.table-viewport-resize-handle:focus-visible {
    border-top-color: var(--accent-strong);
    background: color-mix(in srgb, var(--accent-strong) 8%, var(--surface-soft));
    outline: 0;
}
.is-table-viewport-resizing { user-select: none; cursor: ns-resize !important; }
.table-live-toolbar {
    min-height: 27px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 3px 5px;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface-soft) 82%, transparent);
}
.table-live-toggle {
    min-height: 22px;
    padding: 2px 7px;
    border: 1px solid #476173;
    background: #10202c;
    color: #afc4d2;
    font: inherit;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .045em;
    cursor: pointer;
}
.table-live-toggle.is-on { border-color: #4dc98b; color: #75dda7; background: #10271f; }
.table-live-status { color: #7897aa; font-size: .68rem; white-space: nowrap; }
.table-live-status-ok { color: #6ed79f; }
.table-live-status-working { color: #70c8ff; }
.table-live-status-changed { color: #ffcc66; font-weight: 800; }
.table-live-status-warning { color: #ffbc5b; }
.table-live-row-changed > td:first-child {
    box-shadow: inset 2px 0 0 color-mix(in srgb, var(--accent-strong) 72%, transparent);
}
.table-live-row-new > td:first-child {
    box-shadow: inset 2px 0 0 color-mix(in srgb, var(--good) 74%, transparent);
}
/* V156R29: valori cambiati - palpito tono-su-tono per 2 minuti, poi evidenza persistente fino al tick successivo. */
.table-live-cell-changed {
    background: transparent !important;
    outline: 0 !important;
    box-shadow: none !important;
}
.table-live-value-pulse-target {
    display: inline-block;
    position: relative;
    z-index: 0;
    border-radius: 999px;
    padding: 0 .10em;
    transform-origin: center center;
    will-change: transform, filter, text-shadow, background-image;
}
.table-live-value-recent {
    background-image: radial-gradient(
        ellipse at center,
        color-mix(in srgb, var(--accent-strong) 12%, transparent) 0%,
        color-mix(in srgb, var(--accent-strong) 6%, transparent) 48%,
        transparent 78%
    );
    text-shadow: 0 0 7px color-mix(in srgb, var(--accent-strong) 24%, transparent);
    filter: brightness(1.08);
}
.table-live-value-pulse-active {
    animation: table-live-value-pulse-r29 1.60s cubic-bezier(.22,.72,.30,1) infinite !important;
}
.table-live-value-pulse-fallback-active {
    animation: table-live-value-pulse-fallback-r29 1.60s cubic-bezier(.22,.72,.30,1) infinite !important;
}
@keyframes table-live-value-pulse-r29 {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1.08);
        background-image: radial-gradient(
            ellipse at center,
            color-mix(in srgb, var(--accent-strong) 12%, transparent) 0%,
            color-mix(in srgb, var(--accent-strong) 6%, transparent) 48%,
            transparent 78%
        );
        text-shadow: 0 0 7px color-mix(in srgb, var(--accent-strong) 24%, transparent);
    }
    44% {
        transform: scale(1.075);
        filter: brightness(1.36);
        background-image: radial-gradient(
            ellipse at center,
            color-mix(in srgb, var(--accent-strong) 28%, transparent) 0%,
            color-mix(in srgb, var(--accent-strong) 14%, transparent) 48%,
            transparent 78%
        );
        text-shadow:
            0 0 3px color-mix(in srgb, var(--accent-strong) 78%, transparent),
            0 0 9px color-mix(in srgb, var(--accent-strong) 48%, transparent),
            0 0 15px color-mix(in srgb, var(--accent-strong) 24%, transparent);
    }
}
@keyframes table-live-value-pulse-fallback-r29 {
    0%, 100% {
        filter: brightness(1.08);
        text-shadow: 0 0 7px color-mix(in srgb, var(--accent-strong) 24%, transparent);
    }
    44% {
        filter: brightness(1.36);
        text-shadow:
            0 0 3px color-mix(in srgb, var(--accent-strong) 78%, transparent),
            0 0 9px color-mix(in srgb, var(--accent-strong) 48%, transparent),
            0 0 15px color-mix(in srgb, var(--accent-strong) 24%, transparent);
    }
}
/* Segnale operativo esplicitamente richiesto: non viene soppresso da prefers-reduced-motion. */
@media (max-width: 760px) {
    .table-live-toolbar { justify-content: flex-start; }
    .table-viewport-resize-handle { height: 11px; }
}


/* V156R36 - concise ValueBet decision cockpit */
.valuebet-decision-cockpit { border-color: color-mix(in srgb, var(--domain-valuebet) 68%, var(--line)); }
.valuebet-cockpit-heading { align-items: flex-end; gap: 18px; }
.valuebet-cockpit-controls { display:flex; gap:10px; align-items:flex-end; flex-wrap:wrap; }
.valuebet-cockpit-controls label, .valuebet-live-lay-label { font-size:.78rem; color:var(--muted); display:flex; align-items:center; gap:6px; }
.valuebet-cockpit-controls input { width:76px; }
.valuebet-cockpit-table { min-width:1660px; }
.valuebet-cockpit-table td { vertical-align:middle; white-space:nowrap; }
.valuebet-cockpit-rank { font-weight:800; font-size:1.1rem; }
.valuebet-cockpit-betfair { min-width:560px; }
.valuebet-betfair-inline { display:flex; align-items:center; gap:10px; white-space:nowrap; min-height:28px; }
.valuebet-live-lay { font-weight:800; white-space:nowrap; }
.valuebet-lay-targets { font-weight:700; white-space:nowrap; margin:0; }
.valuebet-lay-result { margin:0; font-size:.78rem; color:var(--muted); line-height:1; white-space:nowrap; }
.valuebet-lay-positive { color:var(--success); font-weight:700; }
.valuebet-lay-negative { color:var(--danger); font-weight:700; }
@media (max-width: 900px) { .valuebet-cockpit-heading { align-items:flex-start; } .valuebet-cockpit-controls { width:100%; } }


/* V156R39 - cockpit action/reason separation, colored decision dots, max 10 */
.valuebet-cockpit-action-cell { min-width:154px; }
.valuebet-cockpit-reason { min-width:176px; color:var(--muted); font-weight:650; }
.valuebet-action { display:inline-flex; align-items:center; gap:8px; font-weight:850; letter-spacing:.01em; white-space:nowrap; }
.valuebet-action-dot { width:9px; height:9px; border-radius:50%; flex:0 0 9px; background:currentColor; box-shadow:0 0 0 3px color-mix(in srgb, currentColor 12%, transparent); }
.valuebet-action-red { color:var(--bad); }
.valuebet-action-orange { color:var(--warn); }
.valuebet-action-green { color:var(--good); }
.valuebet-action-blue { color:var(--accent-strong); }

/* V156R40R1 - guest preview pubblica: superficie editoriale, nessun dato operativo. */
.public-nav { display: flex; align-items: center; gap: 18px; }
.public-nav a { color: #b9cadd; font-size: 13px; font-weight: 760; text-decoration: none; }
.public-nav a:hover { color: #ffffff; }
.public-hero-preview { max-width: 780px; }
.guest-feature { margin: 8px 0 28px; padding: 28px; border: 1px solid var(--line); background: linear-gradient(180deg, #10202d 0%, #0b1721 100%); box-shadow: 0 20px 70px rgba(0,0,0,.16); }
.guest-feature-topline { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.guest-kickoff { margin: 2px 0 0; color: #b9cadd; font-size: 13px; }
.guest-status { display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px; border: 1px solid #36546d; border-radius: 999px; background: #142b3d; color: #dff2ff; font-size: 11px; font-weight: 860; letter-spacing: .06em; }
.guest-match-title { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 26px 0 22px; color: #f7fbff; font-size: clamp(28px, 4vw, 46px); font-weight: 900; line-height: 1.05; }
.guest-match-title b { color: #64849d; font-weight: 500; }
.guest-signal { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 18px; border-left: 3px solid var(--accent-strong); background: #0a141d; }
.guest-signal span { color: #9eb3c5; font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.guest-signal strong { color: #eef8ff; font-size: 20px; }
.guest-reading-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-top: 20px; background: var(--line); border: 1px solid var(--line); }
.guest-reading-grid article { min-width: 0; padding: 22px; background: #0d1822; }
.guest-reading-grid span { display: block; margin-bottom: 10px; color: #9eb3c5; font-size: 11px; font-weight: 820; letter-spacing: .06em; text-transform: uppercase; }
.guest-reading-grid p { margin: 0; color: #e1edf7; font-size: 15px; line-height: 1.6; }
.guest-update-note { margin: 18px 0 0; color: #91a6b8; font-size: 12px; line-height: 1.55; }
.guest-next-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.guest-next-list article { min-width: 0; padding: 20px; border-right: 1px solid var(--line); }
.guest-next-list article:last-child { border-right: 0; }
.guest-next-list span { display: block; color: #8ea4b7; font-size: 11px; }
.guest-next-list strong { display: block; margin-top: 8px; color: #eef7ff; font-size: 15px; line-height: 1.35; }
.guest-next-list em { display: block; margin-top: 9px; color: #86a8c1; font-size: 11px; font-style: normal; font-weight: 780; letter-spacing: .04em; text-transform: uppercase; }
.guest-soft-cta { margin: 34px 0 8px; padding: 30px; border: 1px solid var(--line); background: #0b151e; }
.guest-soft-cta h2 { max-width: 760px; margin: 0; color: #f1f8ff; font-size: clamp(23px, 3vw, 32px); line-height: 1.15; }
.guest-soft-cta > p:not(.public-eyebrow) { max-width: 760px; margin: 13px 0 0; color: #9fb1c0; line-height: 1.6; }
.guest-soft-cta a { display: inline-flex; margin-top: 20px; padding: 11px 15px; border: 1px solid #37556c; border-radius: 8px; color: #e5f4ff; font-size: 13px; font-weight: 820; text-decoration: none; }
.guest-soft-cta a:hover { background: #142a3b; }
.guest-principles-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 8px 0 28px; }
.guest-principles-grid article { min-width: 0; padding: 24px; border: 1px solid var(--line); background: #0d1822; }
.guest-principles-grid article > span { color: #6f94af; font-size: 12px; font-weight: 900; letter-spacing: .08em; }
.guest-principles-grid h2 { margin: 13px 0 8px; color: #eef8ff; font-size: 20px; }
.guest-principles-grid p { margin: 0; color: #9fb1c0; font-size: 14px; line-height: 1.6; }
.guest-explainer { display: grid; grid-template-columns: .9fr 1.1fr; gap: 28px; margin: 28px 0; padding: 28px; border: 1px solid var(--line); background: #0a141d; }
.guest-explainer h2 { margin: 0; color: #f1f8ff; font-size: 27px; line-height: 1.15; }
.guest-explainer-list { display: grid; gap: 10px; }
.guest-explainer-list p { margin: 0; padding: 12px 14px; border-left: 2px solid #355a73; background: #0f1d28; color: #cbd9e4; font-size: 14px; }

@media (max-width: 760px) {
    .public-nav { width: 100%; gap: 14px; }
    .guest-feature { padding: 20px; }
    .guest-feature-topline { align-items: flex-start; flex-direction: column; }
    .guest-reading-grid,
    .guest-principles-grid,
    .guest-explainer { grid-template-columns: 1fr; }
    .guest-next-list { grid-template-columns: 1fr; }
    .guest-next-list article { border-right: 0; border-bottom: 1px solid var(--line); }
    .guest-next-list article:last-child { border-bottom: 0; }
    .guest-signal { align-items: flex-start; flex-direction: column; gap: 8px; }
}


/* V156R40R2 - accesso area riservata reso evidente nella superficie guest. */
.public-nav .public-nav-private { display:inline-flex; align-items:center; min-height:36px; padding:0 13px; border:1px solid #3d617b; border-radius:8px; background:#132a3b; color:#eef8ff; }
.public-nav .public-nav-private:hover { background:#19364b; border-color:#527b98; color:#ffffff; }
.public-footer { display:flex; align-items:center; justify-content:space-between; gap:18px; }
.public-footer a { color:#bcd9ed; font-weight:780; text-decoration:none; }
.public-footer a:hover { color:#ffffff; }
.guest-access-strip { display:flex; align-items:center; justify-content:space-between; gap:24px; margin:6px 0 26px; padding:18px 20px; border:1px solid #29475d; border-radius:10px; background:#0d1d29; }
.guest-access-strip div { display:grid; gap:4px; }
.guest-access-strip span { color:#88a5ba; font-size:11px; font-weight:820; letter-spacing:.04em; text-transform:uppercase; }
.guest-access-strip strong { color:#eaf6ff; font-size:14px; line-height:1.45; }
.guest-access-strip a, .guest-access-card > a { display:inline-flex; align-items:center; justify-content:center; min-height:42px; padding:0 16px; border:1px solid #4c7896; border-radius:8px; background:#17364b; color:#f3faff; font-size:13px; font-weight:860; text-decoration:none; white-space:nowrap; }
.guest-access-strip a:hover, .guest-access-card > a:hover { background:#20465f; }
.guest-cta-actions { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin-top:20px; }
.guest-cta-actions a { margin-top:0; }
.guest-cta-actions .guest-private-link { border-color:#4c7896; background:#132b3b; }
.guest-access-card { display:flex; align-items:center; justify-content:space-between; gap:28px; margin:28px 0 8px; padding:28px; border:1px solid #29475d; background:linear-gradient(180deg,#10212e 0%,#0b1721 100%); }
.guest-access-card h2 { margin:0; color:#f1f8ff; font-size:clamp(23px,3vw,31px); line-height:1.15; }
.guest-access-card p:not(.public-eyebrow) { max-width:720px; margin:12px 0 0; color:#9fb1c0; line-height:1.6; }
.operations-login-intro { max-width:520px; margin:8px 0 0; color:#9fb1c0; font-size:13px; line-height:1.5; }
@media (max-width:760px) {
  .public-nav { flex-wrap:wrap; }
  .public-nav .public-nav-private { margin-left:auto; }
  .public-footer, .guest-access-strip, .guest-access-card { align-items:flex-start; flex-direction:column; }
  .guest-access-strip a, .guest-access-card > a { width:100%; }
}

/* V156R40R3 - logout area riservata */
.topbar-logout-form{margin:0;display:inline-flex;align-items:center}
.topbar-logout-button{display:inline-flex;align-items:center;justify-content:center;border:1px solid #6a4650;background:#26171c;color:#ffd9df;padding:.35rem .6rem;cursor:pointer;font:inherit;font-size:12px;line-height:1.2}
.topbar-logout-button:hover,.topbar-logout-button:focus-visible{border-color:#b46a7b;background:#3a2028;color:#fff;outline:none}

/* V156R40R4 - home guest teaser / curiosity layer */
.public-home-hero { max-width: 960px; padding-top: 66px; padding-bottom: 38px; }
.public-home-kicker { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; margin-bottom: 18px; border: 1px solid #2f5872; border-radius: 999px; background: #0d2130; color: #9ed7ff; font-size: 11px; font-weight: 860; letter-spacing: .08em; text-transform: uppercase; }
.public-home-hero h1 { max-width: 880px; font-size: clamp(38px, 6vw, 68px); letter-spacing: -.035em; }
.public-home-hero > p { max-width: 760px !important; font-size: 17px !important; line-height: 1.65 !important; }
.public-home-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.public-home-primary, .public-home-secondary { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 18px; border-radius: 9px; font-size: 13px; font-weight: 860; text-decoration: none; }
.public-home-primary { border: 1px solid #5c8eae; background: #1a4e70; color: #f7fbff; }
.public-home-primary:hover { background: #24658f; }
.public-home-secondary { border: 1px solid #314b5e; background: #0c1821; color: #c7d9e7; }
.public-home-secondary:hover { border-color: #4f7189; color: #ffffff; }
.public-home-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.public-home-pills span { padding: 8px 11px; border: 1px solid #243c4e; border-radius: 999px; background: #0a151e; color: #8fa9bb; font-size: 11px; font-weight: 760; }
.public-home-intro { display: grid; grid-template-columns: .9fr 1.4fr; gap: 34px; margin: 18px 0 46px; padding: 30px; border: 1px solid #20394b; background: linear-gradient(135deg,#0c1821 0%,#0f202d 100%); }
.public-home-intro-copy h2, .public-home-section-heading h2, .guest-curiosity-copy h2, .guest-home-final-cta h2 { margin: 0; color: #f2f8fd; font-size: clamp(25px, 3vw, 36px); line-height: 1.12; }
.public-home-intro-copy > p:not(.public-eyebrow), .guest-curiosity-copy > p:not(.public-eyebrow), .guest-home-final-cta p:not(.public-eyebrow) { margin: 14px 0 0; color: #9fb2c1; font-size: 14px; line-height: 1.65; }
.public-home-teaser-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.public-home-teaser-grid article { min-width: 0; padding: 20px; border: 1px solid #29475d; background: #0a151e; }
.public-home-teaser-grid article > span { color: #6f9cb9; font-size: 11px; font-weight: 900; letter-spacing: .08em; }
.public-home-teaser-grid strong { display: block; margin-top: 16px; color: #edf7ff; font-size: 17px; }
.public-home-teaser-grid p { margin: 9px 0 0; color: #93a9ba; font-size: 13px; line-height: 1.55; }
.public-home-section-anchor { scroll-margin-top: 18px; }
.public-home-section-heading { display: flex; justify-content: space-between; gap: 30px; align-items: end; margin: 0 0 18px; }
.public-home-section-heading > p { max-width: 330px; margin: 0; color: #8fa6b8; font-size: 12px; line-height: 1.5; text-align: right; }
.guest-feature-home { position: relative; overflow: hidden; }
.guest-feature-home::before { content: ""; position: absolute; width: 260px; height: 260px; right: -120px; top: -140px; border-radius: 50%; background: rgba(58,145,200,.10); filter: blur(8px); pointer-events: none; }
.guest-radar-pending { display: flex; align-items: center; gap: 16px; margin: 8px 0 34px; padding: 24px; border: 1px solid #29475d; background: #0c1923; }
.guest-radar-pending strong { display: block; color: #edf7ff; font-size: 18px; }
.guest-radar-pending p { margin: 6px 0 0; color: #95aabb; line-height: 1.5; }
.guest-radar-dot { width: 13px; height: 13px; flex: 0 0 auto; border: 3px solid #183548; border-top-color: #78c7f7; border-radius: 50%; }
.guest-curiosity-section { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin: 42px 0; padding: 32px; border: 1px solid #29485d; background: linear-gradient(135deg,#0d1c27 0%,#09131b 100%); }
.guest-curiosity-copy > a { display: inline-flex; margin-top: 22px; padding: 11px 15px; border: 1px solid #4d7896; border-radius: 8px; background: #16344a; color: #f4faff; font-size: 13px; font-weight: 860; text-decoration: none; }
.guest-locked-preview { position: relative; overflow: hidden; display: grid; gap: 1px; align-self: stretch; padding: 1px; border: 1px solid #2c4659; background: #284255; box-shadow: inset 0 0 60px rgba(0,0,0,.28); }
.guest-locked-row { display: flex; justify-content: space-between; gap: 18px; padding: 17px 18px; background: #0b1720; }
.guest-locked-row span { color: #a9bdcc; font-size: 13px; }
.guest-locked-row strong { color: #7fa4bd; font-size: 10px; letter-spacing: .07em; }
.guest-locked-mask { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(180deg,rgba(7,15,21,.18),rgba(7,15,21,.72)); backdrop-filter: blur(2px); }
.guest-locked-mask span { padding: 10px 14px; border: 1px solid #4d7188; border-radius: 999px; background: rgba(10,28,40,.92); color: #dff2ff; font-size: 11px; font-weight: 900; letter-spacing: .10em; }
.public-home-upcoming { margin-top: 36px; }
.public-home-value-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin: 36px 0; }
.public-home-value-grid article { padding: 24px; border: 1px solid #243f52; background: #0c1720; }
.public-home-value-grid span { color: #74a7c7; font-size: 10px; font-weight: 900; letter-spacing: .09em; }
.public-home-value-grid h3 { margin: 14px 0 0; color: #eef7ff; font-size: 19px; line-height: 1.25; }
.public-home-value-grid p { margin: 10px 0 0; color: #93a8b8; font-size: 13px; line-height: 1.6; }
.guest-home-final-cta { display: flex; align-items: center; justify-content: space-between; gap: 32px; margin: 44px 0 10px; padding: 34px; border: 1px solid #35607b; background: linear-gradient(135deg,#123047 0%,#0b1a25 70%); }
.guest-home-final-cta > div:first-child { max-width: 700px; }
.guest-home-final-actions { display: flex; flex-wrap: wrap; gap: 10px; flex: 0 0 auto; }
.public-footer-links { display: flex; align-items: center; gap: 16px; }
@media (max-width: 900px) {
  .public-home-intro, .guest-curiosity-section { grid-template-columns: 1fr; }
  .public-home-teaser-grid, .public-home-value-grid { grid-template-columns: 1fr; }
  .public-home-section-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .public-home-section-heading > p { max-width: none; text-align: left; }
  .guest-home-final-cta { align-items: flex-start; flex-direction: column; }
  .guest-home-final-actions { width: 100%; }
  .guest-home-final-actions a { flex: 1 1 220px; }
}
@media (max-width: 620px) {
  .public-home-hero { padding-top: 42px; }
  .public-home-hero h1 { font-size: clamp(34px,11vw,48px); }
  .public-home-intro, .guest-curiosity-section, .guest-home-final-cta { padding: 22px; }
  .public-home-actions a, .guest-home-final-actions a { width: 100%; }
  .public-footer-links { flex-wrap: wrap; }
}
