/* ==========================================================================
   manager.php — the modern skin (1 Oct 2026)
   --------------------------------------------------------------------------
   Linked by manager.php just before <div class="benfica-layout mg-page">, after
   the theme stylesheet, and scoped to .benfica-layout.mg-page so it never
   reaches another page. Same family as match-modern.css (.mm-*): borderless
   cards, soft shadows, tinted icon chips, count-ups and bar fills from
   bn-motion.js. Colours are theme tokens only (a literal only as a fallback).

   Hands off, on purpose (approved 27 Sep):
     - the manager hero (hero.php .hero-pv2--manager) - it sits outside .mg-page,
     - the pill tab bar #managerSelectionTabs + includes/js/sticky-tabs.js,
     - the intro side card .mgr-attrs / .mgr-attr-item (Position Map style).
   Nothing below selects inside those three.
   ========================================================================== */

.benfica-layout.mg-page {
    --mg-card-bg: var(--theme-surface, #fff);
    --mg-row-bg: var(--theme-surface-2, #f7f7f8);
    --mg-row-hover: color-mix(in oklab, var(--theme-primary) 5%, var(--theme-surface-2, #f7f7f8));
    --mg-line: color-mix(in oklab, var(--theme-border) 70%, transparent);
    --mg-soft-shadow: var(--elev-2);
    --mg-lift-shadow: var(--elev-3);
    --mg-radius: var(--theme-radius, 1rem);
}
/* Dark: the neutral surface the sidebar panels use (.bn-panel → --bs-tertiary-bg), so
   the main column and the aside read as one set of cards (as on match.php). */
[data-bs-theme="dark"] .benfica-layout.mg-page {
    --mg-card-bg: var(--bs-tertiary-bg, var(--theme-surface-2));
    --mg-row-bg: color-mix(in oklab, var(--theme-ink) 7%, var(--mg-card-bg));
    --mg-row-hover: color-mix(in oklab, var(--theme-ink) 11%, var(--mg-card-bg));
    --mg-line: color-mix(in oklab, var(--theme-ink) 10%, transparent);
}

/* ---- Section cards ---------------------------------------------------------
   (.bn-main, not #manager-tab-panel: a manager with one tab has no panel wrapper.)
   bnSection's .card loses its hairline for the soft shadow every modern page uses. */
.benfica-layout.mg-page .bn-main .bn-section > .card,
.benfica-layout.mg-page .bn-main .bn-section > .collapse > .card,
.benfica-layout.mg-page .bn-main .bn-section > .collapsing > .card {
    border: 0; border-radius: var(--mg-radius); overflow: hidden;
    background: var(--mg-card-bg); box-shadow: var(--mg-soft-shadow);
}

/* ---- Shared: empty state + notes ---------------------------------------- */
.benfica-layout.mg-page .mg-empty {
    display: flex; align-items: center; gap: .7rem;
    padding: .8rem 1rem; border-radius: var(--mg-radius);
    background: var(--mg-card-bg); box-shadow: var(--mg-soft-shadow);
    color: var(--theme-ink-muted); font-size: .88rem; font-weight: 600;
}
.benfica-layout.mg-page .mg-empty-ico {
    flex: 0 0 auto; width: 2.2rem; height: 2.2rem; border-radius: .75rem;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(var(--theme-accent-rgb, 233, 180, 0), .16); color: var(--theme-accent-700, var(--theme-accent));
}
[data-bs-theme="dark"] .benfica-layout.mg-page .mg-empty-ico { color: var(--theme-accent); }
/* A section holding only the empty state drops its own frame: the empty card is it. */
.benfica-layout.mg-page .bn-section > .card:has(> .card-body > .mg-empty:only-child) { background: transparent; box-shadow: none; overflow: visible; }
.benfica-layout.mg-page .bn-section > .card > .card-body:has(> .mg-empty:only-child) { padding: 0 !important; }

/* Context notes (the appointment-period line under the season table, the "no spell
   recorded" warnings): a soft tinted strip with the icon in a chip, never a boxed alert. */
.benfica-layout.mg-page .bn-main .alert {
    display: flex; align-items: center; gap: .65rem;
    margin: .75rem .75rem .75rem !important; padding: .55rem .8rem;
    border: 0; border-radius: .85rem; box-shadow: none;
    font-size: .84rem; font-weight: 600;
    background: var(--mg-row-bg); color: var(--theme-ink-muted);
}
.benfica-layout.mg-page .bn-main .alert > i:first-child {
    flex: 0 0 auto; width: 1.9rem; height: 1.9rem; margin: 0 !important; border-radius: .65rem;
    display: inline-flex; align-items: center; justify-content: center; font-size: .82rem;
    background: rgba(var(--theme-info-rgb, 13, 110, 253), .14); color: var(--theme-info);
}
.benfica-layout.mg-page .bn-main .alert-warning > i:first-child {
    background: rgba(var(--theme-warning-rgb, 255, 193, 7), .2); color: var(--theme-accent-700, var(--theme-warning));
}
[data-bs-theme="dark"] .benfica-layout.mg-page .bn-main .alert-warning > i:first-child { color: var(--theme-warning); }

/* ---- Intro / biography card ---------------------------------------------- */
.benfica-layout.mg-page #manager-profile > .card > .card-body { padding: 1rem 1.1rem !important; }
.benfica-layout.mg-page #manager-profile .manager-description {
    font-size: .95rem; line-height: 1.72; color: var(--theme-ink);
}
.benfica-layout.mg-page #manager-profile .manager-description a { color: var(--theme-link); }
/* Coaching Philosophy: a soft quote card with an icon chip (was a grey box with a
   cyan rule and cyan title). */
.benfica-layout.mg-page .mg-quote {
    position: relative; display: flex; gap: .85rem; align-items: flex-start;
    padding: .9rem 1rem .95rem; border-radius: var(--mg-radius);
    background: radial-gradient(120% 140% at 0% 0%, rgba(var(--theme-accent-rgb, 233, 180, 0), .12), transparent 55%), var(--mg-row-bg);
}
.benfica-layout.mg-page .mg-quote-ico {
    flex: 0 0 auto; width: 2.4rem; height: 2.4rem; border-radius: .8rem;
    display: inline-flex; align-items: center; justify-content: center; font-size: 1rem;
    background: rgba(var(--theme-accent-rgb, 233, 180, 0), .18); color: var(--theme-accent-700, var(--theme-accent));
}
[data-bs-theme="dark"] .benfica-layout.mg-page .mg-quote-ico { color: var(--theme-accent); }
.benfica-layout.mg-page .mg-quote-body { min-width: 0; }
.benfica-layout.mg-page .mg-quote-title {
    margin: .15rem 0 .35rem; font-size: .72rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: .06em; color: var(--theme-ink-muted);
}
.benfica-layout.mg-page .mg-quote-text { font-size: .93rem; line-height: 1.65; font-style: italic; color: var(--theme-ink); }
/* Phones: the chip floats beside the title and the quote takes the full width under it. */
@media (max-width: 575.98px) {
    .benfica-layout.mg-page .mg-quote { display: block; padding: .8rem .85rem .85rem; }
    .benfica-layout.mg-page .mg-quote-ico { float: left; width: 2rem; height: 2rem; border-radius: .65rem; font-size: .85rem; margin: 0 .6rem .2rem 0; }
    .benfica-layout.mg-page .mg-quote-title { margin: .5rem 0 .55rem; }
    .benfica-layout.mg-page .mg-quote-text { clear: left; font-size: .9rem; }
}

/* ---- Tiles ----------------------------------------------------------------
   transfers.php .trf-tile / match.php .mm-tile idiom: --c is an "r,g,b" triplet. */
.benfica-layout.mg-page .mg-tiles {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; padding: .1rem 0 .25rem;
}
.benfica-layout.mg-page .mg-tiles + .mg-tiles { margin-top: .75rem; }
.benfica-layout.mg-page .mg-tiles--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.benfica-layout.mg-page .mg-tiles--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.benfica-layout.mg-page .mg-tiles--1 { grid-template-columns: minmax(0, 1fr); }
.benfica-layout.mg-page .mg-kpis { margin: .35rem 0 1.25rem; }
@media (max-width: 1199.98px) {
    .benfica-layout.mg-page .mg-tiles:not(.mg-tiles--1) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .benfica-layout.mg-page .mg-tiles--3 > :last-child { grid-column: 1 / -1; }
}
.benfica-layout.mg-page .mg-tile {
    --c: var(--theme-primary-rgb, 200, 16, 46);
    position: relative; min-width: 0; display: flex; align-items: center; gap: .75rem;
    padding: .85rem .95rem; border-radius: var(--mg-radius); overflow: hidden;
    background: radial-gradient(120% 120% at 0% 0%, rgba(var(--c), .10), transparent 60%), var(--mg-card-bg);
    box-shadow: var(--mg-soft-shadow);
    transition: transform var(--dur-base, .24s) ease, box-shadow var(--dur-base, .24s) ease;
}
@media (hover: hover) { .benfica-layout.mg-page .mg-tile:hover { transform: translateY(-3px); box-shadow: var(--mg-lift-shadow); } }
[data-bs-theme="dark"] .benfica-layout.mg-page .mg-tile { background: radial-gradient(120% 120% at 0% 0%, rgba(var(--c), .18), transparent 60%), var(--mg-card-bg); }
.benfica-layout.mg-page .mg-tile--neutral { --c: var(--theme-draw-rgb, 199, 204, 209); }
.benfica-layout.mg-page .mg-tile--win { --c: var(--theme-success-rgb, 25, 135, 84); }
.benfica-layout.mg-page .mg-tile--loss { --c: var(--theme-danger-rgb, 220, 53, 69); }
.benfica-layout.mg-page .mg-tile--goals { --c: var(--theme-accent-rgb, 233, 180, 0); }
.benfica-layout.mg-page .mg-tile--clean { --c: var(--theme-info-rgb, 13, 110, 253); }
.benfica-layout.mg-page .mg-tile--accent { --c: var(--theme-primary-rgb, 200, 16, 46); }
.benfica-layout.mg-page .mg-tile-ico {
    flex: 0 0 auto; width: 2.6rem; height: 2.6rem; border-radius: .8rem;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(var(--c), .14); color: rgb(var(--c)); font-size: 1.05rem;
}
.benfica-layout.mg-page .mg-tile--neutral .mg-tile-ico { color: var(--theme-ink-muted); background: rgba(var(--c), .35); }
/* Dark: club red and green chips are lifted toward the ink, or they sink into the card. */
[data-bs-theme="dark"] .benfica-layout.mg-page :is(.mg-tile--accent, .mg-tile--loss) .mg-tile-ico { color: color-mix(in oklab, rgb(var(--c)) 60%, var(--theme-ink)); background: rgba(var(--c), .24); }
[data-bs-theme="dark"] .benfica-layout.mg-page .mg-tile--win .mg-tile-ico { color: color-mix(in oklab, rgb(var(--c)) 72%, var(--theme-ink)); }
.benfica-layout.mg-page .mg-tile--clean .mg-tile-ico { color: var(--theme-info-strong, rgb(var(--c))); }
[data-bs-theme="dark"] .benfica-layout.mg-page .mg-tile--clean .mg-tile-ico { color: rgb(var(--c)); }
.benfica-layout.mg-page .mg-tile--goals .mg-tile-ico { color: var(--theme-accent-700, rgb(var(--c))); }
[data-bs-theme="dark"] .benfica-layout.mg-page .mg-tile--goals .mg-tile-ico { color: rgb(var(--c)); }
.benfica-layout.mg-page .mg-tile-body { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; }
.benfica-layout.mg-page .mg-tile-num {
    font-size: 1.6rem; font-weight: 900; line-height: 1; color: var(--theme-ink);
    font-variant-numeric: tabular-nums; white-space: nowrap;
}
.benfica-layout.mg-page .mg-tile--win .mg-tile-num { color: var(--theme-success); }
.benfica-layout.mg-page .mg-tile--loss .mg-tile-num { color: var(--theme-danger); }
.benfica-layout.mg-page .mg-tile-num .mg-gf { color: var(--theme-success); }
.benfica-layout.mg-page .mg-tile-num .mg-ga { color: var(--theme-danger); font-size: .7em; }
.benfica-layout.mg-page .mg-tile-num .mg-sep { font-style: normal; font-size: .62em; color: var(--theme-ink-faint); margin: 0 .15rem; }
.benfica-layout.mg-page .mg-tile-lbl {
    font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
    color: var(--theme-ink-muted); margin-top: .3rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.benfica-layout.mg-page .mg-tile-meta {
    font-size: .74rem; color: var(--theme-ink-muted); margin-top: .15rem; line-height: 1.3;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.benfica-layout.mg-page .mg-tile-meta .mg-w { color: var(--theme-success); font-weight: 800; }
.benfica-layout.mg-page .mg-tile-meta .mg-d { color: var(--theme-ink); font-weight: 800; }
.benfica-layout.mg-page .mg-tile-meta .mg-l { color: var(--theme-danger); font-weight: 800; }
.benfica-layout.mg-page .mg-tile-meta .mg-dot { margin: 0 .3rem; opacity: .5; }
/* The W-D-L split under a tile (data-bn-fill grows each segment). */
.benfica-layout.mg-page .mg-split {
    display: flex; gap: 2px; height: 6px; margin-top: .45rem; border-radius: 99px; overflow: hidden;
    background: var(--mg-row-bg);
}
.benfica-layout.mg-page .mg-split i { display: block; height: 100%; min-width: 0; transition: width 1s cubic-bezier(.22, 1, .36, 1); }
.benfica-layout.mg-page .mg-split-w { background: var(--theme-success); }
.benfica-layout.mg-page .mg-split-d { background: var(--theme-draw); }
.benfica-layout.mg-page .mg-split-l { background: var(--theme-danger); }
@media (max-width: 575.98px) {
    .benfica-layout.mg-page .mg-tiles { gap: .55rem; }
    .benfica-layout.mg-page .mg-tile { padding: .7rem .7rem; gap: .55rem; }
    .benfica-layout.mg-page .mg-tile-ico { width: 2.15rem; height: 2.15rem; border-radius: .68rem; font-size: .9rem; }
    .benfica-layout.mg-page .mg-tile-num { font-size: 1.3rem; }
    .benfica-layout.mg-page .mg-tile-lbl { font-size: .62rem; letter-spacing: .03em; white-space: normal; line-height: 1.2; }
    .benfica-layout.mg-page .mg-tile-meta { font-size: .68rem; white-space: normal; }
}
@media (max-width: 359.98px) {
    .benfica-layout.mg-page .mg-tile-ico { display: none; }
}

/* ---- Statistics: the season table ----------------------------------------
   The shared stats-table skin, with the same head, rows and foot as player-modern.css. */
.benfica-layout.mg-page #manager-statistics .stats-table thead tr { border-bottom: 1px solid var(--mg-line); }
.benfica-layout.mg-page #manager-statistics .stats-th {
    background: var(--mg-row-bg); border-bottom: 1px solid var(--mg-line) !important;
    padding: .6rem .45rem .55rem !important;
}
.benfica-layout.mg-page #manager-statistics .stats-th.stats-th-active { background: rgba(var(--theme-primary-rgb, 200, 16, 46), .09) !important; }
.benfica-layout.mg-page #manager-statistics .stats-table tbody td { padding-top: .55rem; padding-bottom: .55rem; }
.benfica-layout.mg-page #manager-statistics .stats-table tbody tr.stats-row { border-bottom-color: var(--mg-line); }
.benfica-layout.mg-page #manager-statistics .stats-table tbody tr.stats-row:hover { background: var(--mg-row-hover) !important; }
.benfica-layout.mg-page #manager-statistics .stats-name-cell { font-weight: 700; }
.benfica-layout.mg-page #manager-statistics .stats-minibar { height: 5px; box-shadow: none; background: var(--mg-row-bg); }
.benfica-layout.mg-page #manager-statistics .stats-minibar-fill { transition: width 1s cubic-bezier(.22, 1, .36, 1); }
.benfica-layout.mg-page #manager-statistics .stats-summary-row td {
    border-top: 0; background: var(--mg-row-bg) !important; font-weight: 800;
    font-size: .9rem; padding-top: .7rem; padding-bottom: .7rem;
}
.benfica-layout.mg-page #manager-statistics .stats-sortby-bar { background: transparent; border-top: 1px solid var(--mg-line); padding: .65rem .6rem; }
.benfica-layout.mg-page #manager-statistics .stats-sortbtn { border-color: transparent; background: var(--mg-row-bg); font-weight: 700; }
.benfica-layout.mg-page #manager-statistics .stats-sortbtn:hover { background: var(--mg-row-hover); border-color: transparent; }
.benfica-layout.mg-page #manager-statistics .mstat-toggle {
    width: 20px; height: 20px; border-radius: .4rem; background: var(--mg-row-bg);
}
.benfica-layout.mg-page #manager-statistics .mstat-detail-row > td { background: var(--mg-row-bg); }

/* Dark: the red and green figures are lifted toward the ink so they read on the dark
   card (club red on near-black was below 3:1). */
[data-bs-theme="dark"] .benfica-layout.mg-page .bn-main :is(.stats-table, .plg-skin) :is(.text-primary, .text-danger) { color: color-mix(in oklab, var(--theme-danger) 68%, var(--theme-ink)) !important; }
[data-bs-theme="dark"] .benfica-layout.mg-page .bn-main :is(.stats-table, .plg-skin) .text-success { color: color-mix(in oklab, var(--theme-success) 72%, var(--theme-ink)) !important; }
[data-bs-theme="dark"] .benfica-layout.mg-page .bn-main :is(.stats-table, .plg-skin) .text-secondary { color: var(--theme-ink-muted) !important; }
[data-bs-theme="dark"] .benfica-layout.mg-page #manager-statistics .stats-highlight-pill { color: var(--theme-on-primary, #fff) !important; }
[data-bs-theme="dark"] .benfica-layout.mg-page :is(.mg-tile--win .mg-tile-num, .mg-tile-num .mg-gf, .mgr-period-pct.text-success) { color: color-mix(in oklab, var(--theme-success) 72%, var(--theme-ink)) !important; }
[data-bs-theme="dark"] .benfica-layout.mg-page :is(.mg-tile--loss .mg-tile-num, .mg-tile-num .mg-ga) { color: color-mix(in oklab, var(--theme-danger) 68%, var(--theme-ink)); }

/* By Formation: its own soft inset block under the season table. */
.benfica-layout.mg-page #manager-by-formation {
    margin: .9rem .75rem 0 !important; width: auto; border-radius: .9rem; background: var(--mg-row-bg);
}
.benfica-layout.mg-page #manager-by-formation .stats-table { min-width: 560px; }
.benfica-layout.mg-page #manager-by-formation thead th {
    background: transparent; border-bottom: 1px solid var(--mg-line) !important; padding: .6rem .45rem;
    font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--theme-ink-muted);
}
.benfica-layout.mg-page #manager-by-formation tbody td { background: transparent; border-bottom-color: var(--mg-line); padding-top: .5rem; padding-bottom: .5rem; }
.benfica-layout.mg-page #manager-by-formation tbody tr:hover td { background: var(--mg-row-hover); }
.benfica-layout.mg-page #manager-by-formation .stats-total-row td { border-bottom: 0; background: color-mix(in oklab, var(--theme-primary) 6%, var(--mg-row-bg)); }
.benfica-layout.mg-page #manager-by-formation .mg-pct-cell { min-width: 6.5rem; }
.benfica-layout.mg-page #manager-by-formation .mg-pct-num { display: block; font-weight: 700; font-variant-numeric: tabular-nums; }
.benfica-layout.mg-page #manager-by-formation .mg-pct-cell .pla-wdl { margin: .25rem auto 0; max-width: 5.5rem; }
.benfica-layout.mg-page #manager-by-formation + .text-muted { padding: .45rem 1rem .1rem !important; font-size: .76rem !important; }

/* ---- Match lists and the two analytics tables (.plg-skin) ------------------ */
.benfica-layout.mg-page .bn-main .plg-skin > thead > tr > th {
    background: var(--mg-row-bg); border-bottom: 1px solid var(--mg-line) !important;
    padding-top: .55rem; padding-bottom: .55rem; font-size: .68rem;
}
/* Result squares: the site's squared chip (radius .25rem). */
.benfica-layout.mg-page .bn-main .plg-skin .badge { border-radius: .25rem; }
.benfica-layout.mg-page .bn-main .plg-skin tbody tr { transition: background-color var(--dur-base, .24s) ease; }
.benfica-layout.mg-page .bn-main .plg-skin tbody tr:hover > td { background: var(--mg-row-hover); }
.benfica-layout.mg-page .bn-main .plg-skin tbody td { border-bottom-color: var(--mg-line); }
.benfica-layout.mg-page .bn-main .plg-skin tbody tr:last-child > td { border-bottom: 0; }
.benfica-layout.mg-page .bn-main .mgr-analytics-table .pla-figure { font-weight: 800; }
.benfica-layout.mg-page .bn-main .mgr-analytics-table td.fw-bold { font-variant-numeric: tabular-nums; }
.benfica-layout.mg-page .bn-main .pla-wdl { height: 6px; border-radius: 99px; gap: 2px; }
.benfica-layout.mg-page .bn-main .pla-wdl > span { border-radius: 99px; }
.benfica-layout.mg-page .bn-main .pla-wdl-d { background: var(--theme-draw); }
.benfica-layout.mg-page .bn-main :is(#manager-head-to-head, #manager-matches) .text-muted.small { padding: .55rem .9rem !important; }
/* Pagination of the full managed-match list: pills. */
.benfica-layout.mg-page #manager-matches .pagination { gap: .3rem; }
.benfica-layout.mg-page #manager-matches .page-link {
    border: 0; border-radius: 999px !important; min-width: 2rem; text-align: center; font-weight: 700;
    background: var(--mg-row-bg); color: var(--theme-ink);
}
.benfica-layout.mg-page #manager-matches .page-item.active .page-link { background: var(--theme-primary); color: var(--theme-on-primary, #fff); }
.benfica-layout.mg-page #manager-matches .page-item.disabled .page-link { opacity: .45; }

/* ---- Analytics: Manager Facts (match_facts_functions.php cards) ------------ */
.benfica-layout.mg-page #manager-facts .mf-grid,
.benfica-layout.mg-page #manager-facts .mf-wrap { gap: .6rem; }
.benfica-layout.mg-page #manager-facts .mf-card {
    border: 0; border-radius: .9rem; padding: .6rem .8rem .6rem .9rem;
    background: var(--mg-card-bg); box-shadow: var(--mg-soft-shadow);
}
.benfica-layout.mg-page #manager-facts .mf-card.mf-lead {
    background: linear-gradient(100deg, color-mix(in oklab, var(--mf-tone, var(--theme-ink-faint)) 13%, var(--mg-card-bg)) 0%, var(--mg-card-bg) 70%);
}
@media (hover: hover) {
    .benfica-layout.mg-page #manager-facts .mf-card:hover { transform: translateY(-2px); box-shadow: var(--mg-lift-shadow); }
}
.benfica-layout.mg-page #manager-facts .mf-chip { width: 2rem; height: 2rem; border-radius: .65rem; font-size: .85rem; }
.benfica-layout.mg-page #manager-facts .mf-body { font-size: .85rem; }
.benfica-layout.mg-page #manager-facts .mf-lead .mf-body { font-size: .95rem; }

/* ---- Analytics: Detailed Metrics ------------------------------------------- */
.benfica-layout.mg-page .mg-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; }
@media (max-width: 1199.98px) { .benfica-layout.mg-page .mg-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.benfica-layout.mg-page .mg-metric {
    min-width: 0; display: flex; align-items: flex-start; gap: .6rem;
    padding: .7rem .8rem; border-radius: .9rem;
    background: var(--mg-card-bg); box-shadow: var(--mg-soft-shadow);
    transition: transform var(--dur-base, .24s) ease, box-shadow var(--dur-base, .24s) ease;
}
@media (hover: hover) { .benfica-layout.mg-page .mg-metric:hover { transform: translateY(-2px); box-shadow: var(--mg-lift-shadow); } }
.benfica-layout.mg-page .mg-metric-ico {
    flex: 0 0 auto; width: 2rem; height: 2rem; border-radius: .65rem;
    display: inline-flex; align-items: center; justify-content: center; font-size: .82rem;
    background: rgba(var(--theme-primary-rgb, 200, 16, 46), .1); color: var(--theme-primary);
}
[data-bs-theme="dark"] .benfica-layout.mg-page .mg-metric-ico { color: color-mix(in oklab, var(--theme-primary) 60%, var(--theme-ink)); }
.benfica-layout.mg-page .mg-metric-body { min-width: 0; display: flex; flex-direction: column; }
.benfica-layout.mg-page .mg-metric-lbl {
    font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
    color: var(--theme-ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.benfica-layout.mg-page .mg-metric-val { font-size: 1.2rem; font-weight: 900; line-height: 1.2; font-variant-numeric: tabular-nums; color: var(--theme-ink); }
.benfica-layout.mg-page .mg-metric-hint { font-size: .72rem; color: var(--theme-ink-muted); line-height: 1.3; overflow-wrap: anywhere; }
@media (max-width: 575.98px) {
    .benfica-layout.mg-page .mg-metrics { gap: .5rem; }
    .benfica-layout.mg-page .mg-metric { padding: .6rem .65rem; gap: .5rem; }
    .benfica-layout.mg-page .mg-metric-ico { width: 1.7rem; height: 1.7rem; border-radius: .55rem; font-size: .72rem; }
    .benfica-layout.mg-page .mg-metric-lbl { white-space: normal; line-height: 1.2; font-size: .6rem; letter-spacing: .03em; }
    .benfica-layout.mg-page .mg-metric-val { font-size: 1.05rem; }
}

/* ---- Analytics: chart cards ------------------------------------------------- */
.benfica-layout.mg-page .mg-charts { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: .75rem; }
.benfica-layout.mg-page .mg-chart {
    min-width: 0; padding: .8rem .9rem .75rem; border-radius: var(--mg-radius);
    background: var(--mg-card-bg); box-shadow: var(--mg-soft-shadow);
}
.benfica-layout.mg-page .mg-chart--form { grid-column: 1 / -1; }
@media (max-width: 991.98px) { .benfica-layout.mg-page .mg-charts { grid-template-columns: minmax(0, 1fr); } }
.benfica-layout.mg-page .mg-chart-head {
    display: flex; align-items: center; gap: .55rem; margin-bottom: .55rem;
    font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--theme-ink-muted);
}
.benfica-layout.mg-page .mg-chart-head > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.benfica-layout.mg-page .mg-chart-ico,
.benfica-layout.mg-page .mg-chip-ico {
    --c: var(--theme-draw-rgb, 199, 204, 209);
    flex: 0 0 auto; width: 1.8rem; height: 1.8rem; border-radius: .6rem;
    display: inline-flex; align-items: center; justify-content: center; font-size: .78rem;
    background: rgba(var(--c), .35); color: var(--theme-ink-muted);
}
.benfica-layout.mg-page .mg-chart-ico--win,
.benfica-layout.mg-page .mg-chip-ico--win { --c: var(--theme-success-rgb, 25, 135, 84); background: rgba(var(--c), .14); color: var(--theme-success); }
.benfica-layout.mg-page .mg-chart-ico--accent { --c: var(--theme-accent-rgb, 233, 180, 0); background: rgba(var(--c), .16); color: var(--theme-accent-700, var(--theme-accent)); }
[data-bs-theme="dark"] .benfica-layout.mg-page .mg-chart-ico--accent { color: var(--theme-accent); }

/* ---- History: Performance by Period ----------------------------------------
   The grid plumbing stays in renderManagerPanelStyles(); here the panels lose their
   hairline for the soft card, the titles get icon chips, the bar grows in. */
.benfica-layout.mg-page #manager-timeline-periods .mgr-team-head {
    align-items: center; padding: .1rem 0 .55rem; border-bottom: 0;
}
.benfica-layout.mg-page #manager-timeline-periods .mgr-team-name { gap: .55rem; font-size: .95rem; }
.benfica-layout.mg-page #manager-timeline-periods .mgr-team-meta {
    padding: .22rem .65rem; border-radius: 999px; background: var(--mg-row-bg); font-weight: 600;
}
.benfica-layout.mg-page #manager-timeline-periods .mgr-period {
    border: 0; border-radius: var(--mg-radius); padding: .9rem 1rem .95rem 1.1rem;
    background: var(--mg-card-bg); box-shadow: var(--mg-soft-shadow);
    transition: transform var(--dur-base, .24s) ease, box-shadow var(--dur-base, .24s) ease;
}
@media (hover: hover) { .benfica-layout.mg-page #manager-timeline-periods .mgr-period:hover { transform: translateY(-3px); box-shadow: var(--mg-lift-shadow); } }
.benfica-layout.mg-page #manager-timeline-periods .mgr-period-current {
    background: radial-gradient(120% 120% at 0% 0%, rgba(var(--theme-success-rgb, 25, 135, 84), .10), transparent 60%), var(--mg-card-bg);
}
.benfica-layout.mg-page #manager-timeline-periods .mgr-period::before { width: 3px; opacity: .25; }
.benfica-layout.mg-page #manager-timeline-periods .mgr-period-current::before { opacity: 1; }
.benfica-layout.mg-page #manager-timeline-periods .mgr-period-head { align-items: center; }
.benfica-layout.mg-page #manager-timeline-periods .mgr-period-title { gap: .5rem; font-size: .88rem; font-weight: 800; }
.benfica-layout.mg-page #manager-timeline-periods .mgr-period-dates {
    padding: .18rem .55rem; border-radius: 999px; background: var(--mg-row-bg); font-weight: 600;
}
.benfica-layout.mg-page #manager-timeline-periods .mgr-period-stat { margin: .7rem 0 .45rem; }
.benfica-layout.mg-page #manager-timeline-periods .mgr-period-pct { font-size: 1.85rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.benfica-layout.mg-page #manager-timeline-periods .mgr-period-played { font-weight: 700; }
.benfica-layout.mg-page #manager-timeline-periods .mgr-period-bar { height: 8px; gap: 2px; background: var(--mg-row-bg); }
.benfica-layout.mg-page #manager-timeline-periods .mgr-period-bar span { border-radius: 99px; transition: width 1s cubic-bezier(.22, 1, .36, 1); }
.benfica-layout.mg-page #manager-timeline-periods .mgr-period-bar .bg-secondary { background: var(--theme-draw) !important; }
.benfica-layout.mg-page #manager-timeline-periods .mgr-period-legend { gap: .4rem; margin-top: .6rem; }
.benfica-layout.mg-page #manager-timeline-periods .mgr-period-key {
    padding: .15rem .5rem; border-radius: .45rem; background: var(--mg-row-bg); font-variant-numeric: tabular-nums;
}
/* W / D / L keys are squares, as every form chip on the site. */
.benfica-layout.mg-page #manager-timeline-periods .mgr-period-dot { border-radius: .15rem; }
.benfica-layout.mg-page #manager-timeline-periods .mgr-period-dot.bg-secondary { background: var(--theme-draw) !important; }
.benfica-layout.mg-page #manager-timeline-periods .mgr-period-trophies {
    margin-top: .65rem; padding: .22rem .65rem; background: rgba(var(--theme-accent-rgb, 233, 180, 0), .18); font-weight: 700;
}

/* ---- History: Achievements & Milestones (includes/honours_display.php) ----- */
.benfica-layout.mg-page .bn-main .person-honours .ph-card {
    border: 0; border-radius: var(--mg-radius); background: var(--mg-card-bg); box-shadow: var(--mg-soft-shadow);
    transition: transform var(--dur-base, .24s) ease, box-shadow var(--dur-base, .24s) ease;
}
@media (hover: hover) { .benfica-layout.mg-page .bn-main .person-honours .ph-card:hover { transform: translateY(-2px); box-shadow: var(--mg-lift-shadow); } }
.benfica-layout.mg-page .bn-main .person-honours .ph-ico {
    border-radius: .8rem; background: rgba(var(--theme-accent-rgb, 233, 180, 0), .16); color: var(--theme-accent-700, var(--theme-accent));
}
[data-bs-theme="dark"] .benfica-layout.mg-page .bn-main .person-honours .ph-ico { color: var(--theme-accent); }

/* ---- Sidebar ---------------------------------------------------------------
   Manager facts: each icon in a small tinted chip (the match page's Match Info). */
.benfica-layout.mg-page .bn-aside .mi-info-panel .bn-facts { gap: .45rem; }
.benfica-layout.mg-page .bn-aside .mi-info-panel .mg-fi {
    flex: 0 0 auto; width: 1.7rem; height: 1.7rem; border-radius: .55rem;
    display: inline-flex; align-items: center; justify-content: center; font-size: .8rem;
    background: rgba(var(--theme-accent-rgb, 233, 180, 0), .14); color: var(--theme-accent);
}
.benfica-layout.mg-page .bn-aside .mi-info-panel .mg-fi > i { margin: 0 !important; width: auto; }
/* Quick Stats: soft tinted tiles with an icon chip, figures printed final. */
.benfica-layout.mg-page .bn-aside .mg-qs {
    --c: var(--theme-draw-rgb, 199, 204, 209);
    position: relative; border: 0; gap: .3rem; padding: .75rem .5rem .7rem;
    background: radial-gradient(120% 120% at 0% 0%, rgba(var(--c), .14), transparent 65%), var(--mg-row-bg);
    transition: transform var(--dur-base, .24s) ease;
}
@media (hover: hover) { .benfica-layout.mg-page .bn-aside .mg-qs:hover { transform: translateY(-2px); } }
.benfica-layout.mg-page .bn-aside .mg-qs--win { --c: var(--theme-success-rgb, 25, 135, 84); }
.benfica-layout.mg-page .bn-aside .mg-qs--goals { --c: var(--theme-accent-rgb, 233, 180, 0); }
.benfica-layout.mg-page .bn-aside .mg-qs--clean { --c: var(--theme-info-rgb, 13, 110, 253); }
.benfica-layout.mg-page .bn-aside .mg-qs-ico {
    width: 1.9rem; height: 1.9rem; border-radius: .6rem;
    display: inline-flex; align-items: center; justify-content: center; font-size: .8rem;
    background: rgba(var(--c), .16); color: rgb(var(--c));
}
.benfica-layout.mg-page .bn-aside .mg-qs--neutral .mg-qs-ico { background: rgba(var(--c), .4); color: var(--theme-ink-muted); }
.benfica-layout.mg-page .bn-aside .mg-qs--goals .mg-qs-ico { color: var(--theme-accent-700, rgb(var(--c))); }
[data-bs-theme="dark"] .benfica-layout.mg-page .bn-aside .mg-qs--goals .mg-qs-ico { color: rgb(var(--c)); }
.benfica-layout.mg-page .bn-aside .mg-qs .bn-stat-num { font-variant-numeric: tabular-nums; }
.benfica-layout.mg-page .bn-aside .mg-qs--win .bn-stat-num { color: var(--theme-success); }
[data-bs-theme="dark"] .benfica-layout.mg-page .bn-aside .mg-qs--win .bn-stat-num,
[data-bs-theme="dark"] .benfica-layout.mg-page .bn-aside .mg-qs--win .mg-qs-ico { color: color-mix(in oklab, var(--theme-success) 72%, var(--theme-ink)); }
/* Contract / Trophy widgets: the soft card of the other panels, no hairline. */
.benfica-layout.mg-page .bn-aside .co-sidebar-widget .section-card { border: 0 !important; box-shadow: var(--mg-soft-shadow) !important; }
.benfica-layout.mg-page .bn-aside .bn-panel:not(.bn-cta) { border: 0; box-shadow: var(--mg-soft-shadow); }
[data-bs-theme="dark"] .benfica-layout.mg-page .bn-aside .co-sidebar-widget .section-card { background: var(--mg-card-bg) !important; }

@media (prefers-reduced-motion: reduce) {
    .benfica-layout.mg-page :is(.mg-tile, .mg-metric, .mg-qs, .mgr-period, .mg-split i, .stats-minibar-fill, .mgr-period-bar span) { transition: none !important; animation: none !important; }
}

/* No shadows, the sidebar's border instead (Bruno, 1 Oct 2026, as on the match page):
   the two shadow tokens become a 1px ring in the .bn-panel line colour, so every card
   that wore the soft shadow now shows that border (no layout shift), and the theme's
   drop shadows on the sidebar panels and widgets go. The pill tab bar keeps its own. */
.benfica-layout.mg-page { --mg-soft-shadow: 0 0 0 1px rgba(0, 0, 0, .07); --mg-lift-shadow: 0 0 0 1px rgba(0, 0, 0, .07); }
[data-bs-theme="dark"] .benfica-layout.mg-page { --mg-soft-shadow: 0 0 0 1px rgba(255, 255, 255, .08); --mg-lift-shadow: 0 0 0 1px rgba(255, 255, 255, .08); }
.benfica-layout.mg-page :is(.bn-aside .bn-panel, .section-card) { box-shadow: none !important; border: 1px solid rgba(0, 0, 0, .07) !important; }
[data-bs-theme="dark"] .benfica-layout.mg-page :is(.bn-aside .bn-panel, .section-card) { border-color: rgba(255, 255, 255, .08) !important; }
.benfica-layout.mg-page .bn-aside .bn-panel.bn-cta { border-color: transparent !important; }
/* The intro side card keeps its own 1px border; only its drop shadow goes, like the
   player page's Position Map panel. */
.benfica-layout.mg-page .mgr-attrs { box-shadow: none !important; }
/* Intro card: a smaller gap around the biography (Bruno, 1 Oct 2026). */
.benfica-layout.mg-page #manager-profile > .card > .card-body { padding: .75rem .85rem !important; }
.benfica-layout.mg-page #manager-profile .manager-description { line-height: 1.6; }

/* Cards as on the forum, the site's normal (Bruno, 1 Oct 2026): the 1px .bn-panel line
   AND the theme's soft drop shadow. Overrides the shadow-free pass just above. */
.benfica-layout.mg-page {
    --mg-soft-shadow: 0 0 0 1px rgba(0, 0, 0, .07), var(--theme-shadow, 0 10px 30px rgba(0, 0, 0, .06));
    --mg-lift-shadow: 0 0 0 1px rgba(0, 0, 0, .07), var(--theme-shadow, 0 10px 30px rgba(0, 0, 0, .06));
}
[data-bs-theme="dark"] .benfica-layout.mg-page {
    --mg-soft-shadow: 0 0 0 1px rgba(255, 255, 255, .08), var(--theme-shadow, 0 10px 30px rgba(0, 0, 0, .3));
    --mg-lift-shadow: 0 0 0 1px rgba(255, 255, 255, .08), var(--theme-shadow, 0 10px 30px rgba(0, 0, 0, .3));
}
.benfica-layout.mg-page :is(.bn-aside .bn-panel, .section-card) { box-shadow: var(--theme-shadow, 0 10px 30px rgba(0, 0, 0, .06)) !important; }
