/* Tablero integral: estilos aislados para conservar los demás módulos. */
body[data-view="dashboard"]:has(.management-board) .main { background: #081c17; }
body[data-view="dashboard"]:has(.management-board) .main::before,
body[data-view="dashboard"]:has(.management-board) .main::after { display: none; }
body[data-view="dashboard"]:has(.management-board) .content { padding: 16px 30px 40px; scrollbar-width: thin; }
.management-board { --mb-line:rgba(197,230,204,.13); --mb-muted:#a3b9ae; --mb-gold:#e6c477; --mb-surface:#10281f; color:#eef5ef; max-width:1800px; margin:auto; font-size:13px; color-scheme:dark; }
.management-board *, .mb-dialog * { box-sizing:border-box; }
.management-board :is(h1,h2,h3,h4,p) { margin:0; }
.management-board :is(button,input,select) { font:inherit; }
.management-board button { cursor:pointer; }
.management-board svg { width:20px; height:20px; flex-shrink:0; }
.management-board :is(button,a,input,select):focus-visible { outline:2px solid var(--mb-gold); outline-offset:4px; }
.mb-header-shell { margin:0 0 20px; padding:20px 24px; border:1px solid var(--mb-line); border-radius:18px; background:var(--mb-surface); box-shadow:0 8px 24px #0000000d; }
.mb-hero { display:flex; justify-content:space-between; align-items:center; min-height:76px; padding:0 0 18px; margin-bottom:18px; border-bottom:1px solid var(--mb-line); gap:28px; }
.mb-hero-copy { min-width:0; flex:1; }
.mb-eyebrow { display:flex; align-items:center; gap:8px; font-size:10px; font-weight:800; letter-spacing:.16em; color:var(--mb-gold); }
.mb-eyebrow i { width:6px; height:6px; background:var(--prism-lime); border-radius:50%; box-shadow:0 0 12px #b6ef5a66; }
.mb-title-row { display:flex; flex-wrap:wrap; align-items:center; gap:12px 24px; margin:5px 0 6px; }
.mb-hero h1 { flex:0 1 auto; font-size:clamp(21px,1.7vw,27px); line-height:1.2; letter-spacing:-.04em; font-weight:500; color:#f3f5ef; }
.mb-hero h1 em { font-style:normal; color:var(--mb-gold); }
.mb-hero-copy>p { color:var(--mb-muted); font-size:11px; line-height:1.45; }
.mb-commercial-link { display:inline-flex; align-items:center; gap:8px; min-height:34px; padding:7px 11px; border:1px solid #e6c4778c; border-radius:11px; background:linear-gradient(135deg,#4e441f99,#10251b 72%); box-shadow:inset 0 1px 0 #fff1bd1c,0 6px 16px #0003; color:#f1e6bc; text-decoration:none; font-size:9px; font-weight:750; white-space:nowrap; }
.mb-commercial-link:hover { color:#fff5cf; border-color:var(--mb-gold); }
.mb-commercial-link svg { width:15px; height:15px; }
.mb-hero-right { display:flex; align-items:center; justify-content:flex-end; gap:24px; flex:0 0 auto; }
.mb-brand-lockup { width:140px; display:grid; justify-items:center; }
.mb-brand-lockup img { display:block; width:100%; height:48px; object-fit:contain; filter:drop-shadow(0 8px 18px #0009); }
.mb-live { display:flex; align-items:center; gap:9px; min-width:0; padding:0; color:#bed0c5; font-size:11px; line-height:1.4; }
.mb-live>i { width:11px; height:11px; flex:0 0 11px; border-radius:50%; background:#51d474; box-shadow:0 0 0 6px #51d47412,0 0 15px #51d47480; }
.mb-live span { display:grid; }
.mb-live small { color:#6f8b7c; font-size:11px; }
.mb-live[data-status="stale"] { color:#edc988; }
.mb-control-deck { display:grid; grid-template-columns:minmax(0,1fr); align-items:start; gap:18px; }
.mb-company-switch { min-width:0; }
.mb-company-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.mb-company-heading h2 { font-size:13px; font-weight:700; }
.mb-company-tabs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.mb-company-tabs button { position:relative; min-width:0; min-height:150px; display:grid; grid-template-columns:minmax(0,1fr) auto auto; grid-template-rows:64px auto auto; align-items:center; gap:4px 9px; padding:18px; border:2px solid var(--mb-line); border-radius:12px; background:linear-gradient(145deg,#0c241b,#081b15); color:#d2ddd6; text-align:left; }
.mb-company-logo { grid-column:1/-1; grid-row:1; width:100%; max-width:180px; height:64px; object-fit:contain; object-position:left center; margin-bottom:8px; }
.mb-company-tabs button>b { grid-column:2; grid-row:2/4; min-width:27px; padding:5px 7px; border-radius:18px; background:#dcca9013; color:#dce7df; font-size:11px; text-align:center; }
.mb-company-tabs button>em { display:grid; visibility:hidden; grid-column:3; grid-row:2/4; width:23px; height:23px; place-items:center; border-radius:50%; background:var(--mb-gold); color:#263018; }
.mb-company-tabs button>em svg { width:14px; height:14px; stroke-width:2.4; }
.mb-company-tabs button span { grid-column:1; grid-row:2; color:inherit; font:700 14px 'Space Grotesk',sans-serif; letter-spacing:.04em; }
.mb-company-tabs button small { grid-column:1; grid-row:3; color:#a3b9ae; font-size:11px; }
.mb-company-tabs button[aria-selected="true"] { border-color:var(--mb-gold); background:linear-gradient(135deg,#2e402b,#153424); color:#f7f1da; box-shadow:inset 0 1px 0 #ffffff14,0 6px 18px #0004; }
.mb-company-tabs button[aria-selected="true"]>em { visibility:visible; }
.mb-company-tabs button[aria-selected="true"]>b { background:#6c6337; color:#fff6d6; }
.mb-company-tabs button[aria-selected="true"] small { color:#b8c6aa; }
.mb-filters { min-width:0; display:grid; grid-template-columns:minmax(160px,1.3fr) repeat(2,minmax(105px,.75fr)) minmax(185px,1fr) auto; grid-template-rows:auto auto; align-items:end; gap:7px 10px; padding:16px 0 0; border-top:1px solid var(--mb-line); }
.mb-period-filter, .mb-filters label { min-width:0; display:grid; gap:4px; color:var(--mb-muted); font-size:11px; font-weight:600; }
.mb-filters :is(input,select) { width:100%; min-width:0; padding:10px; height:39px; border:1px solid var(--mb-line); border-radius:8px; color:#eef5ef; background:#11291f; }
.mb-quick { display:flex; align-self:end; gap:3px; padding:3px; border:1px solid var(--mb-line); border-radius:9px; background:#061710; }
.mb-quick button { flex:1; padding:7px 9px; color:var(--mb-muted); background:transparent; border:0; border-radius:5px; font-size:9px; }
.mb-quick button[aria-pressed="true"] { background:#dcca90; color:#1d291a; font-weight:800; }
.mb-button { display:inline-flex; justify-content:center; align-items:center; gap:9px; min-height:39px; padding:10px 15px; border:1px solid #bbd99240; background:linear-gradient(135deg,#395b32,#254827); color:#e7f5d8; border-radius:8px; font-weight:700!important; }
.mb-refresh { min-width:105px; border-color:#e5be6a; background:linear-gradient(180deg,#f2d681,#c99f4f); color:#152015; box-shadow:inset 0 1px 0 #fff0b6,0 7px 18px #0003; }
.mb-button svg { width:16px; height:16px; }
.mb-button:disabled { opacity:.55; cursor:wait; }
.mb-filter-error,.mb-error { color:#ffb5ab; padding:18px; border:1px solid #eb897944; border-radius:10px; background:#41231e; }
.mb-cutline { grid-column:1/-1; display:flex; justify-content:space-between; flex-wrap:wrap; gap:6px; color:var(--mb-muted); font-size:8px; padding-top:0; }
.mb-cutline span { display:flex; align-items:center; gap:6px; }
.mb-cutline svg { width:13px; height:13px; }
.mb-company-source-notice { display:flex; align-items:center; gap:10px; margin:0 0 14px; padding:11px 14px; border:1px solid #e6c47736; border-radius:10px; background:#e6c4770a; color:#bfd0c4; font-size:10px; }
.mb-company-source-notice b { color:#ead18e; }
.mb-overview { padding:18px; border:1px solid #b7d4bd1f; border-radius:16px; background:linear-gradient(145deg,#071a15,#0b211a); box-shadow:0 16px 38px #020d0926; }
.mb-overview-heading { display:flex; align-items:end; justify-content:space-between; gap:16px; margin-bottom:14px; }
.mb-overview-heading h2 { margin-top:5px!important; font:600 22px 'Space Grotesk',sans-serif; letter-spacing:-.03em; color:#f4f7ef; }
.mb-overview-heading>span { padding:6px 10px; border-radius:20px; background:#e6c47714; color:#ead18e; font-size:9px; font-weight:800; letter-spacing:.08em; }
.mb-spotlights { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.mb-spotlight { --mb-card-accent:#e6c477; background:linear-gradient(145deg,#173127,#10271f); border:1px solid color-mix(in srgb,var(--mb-card-accent) 25%,transparent); border-left:3px solid var(--mb-card-accent); border-radius:12px; padding:15px; box-shadow:0 8px 18px #0002,inset 0 1px 0 #fff04; min-width:0; }
.mb-spotlight[data-tone="billing"] { --mb-card-accent:#66d1c1; background:linear-gradient(145deg,#12302c,#0d2521); }
.mb-spotlight[data-tone="efficiency"] { --mb-card-accent:#b7d879; background:linear-gradient(145deg,#24331d,#17281b); }
.mb-spotlight[data-tone="quotes"] { --mb-card-accent:#f2b56f; background:linear-gradient(145deg,#35291b,#2a2119); }
.mb-spotlight[data-tone="overdue"] { --mb-card-accent:#ef9a7d; background:linear-gradient(145deg,#38251f,#292019); }
.mb-spotlight header { display:flex; gap:9px; align-items:center; color:#f0f5ef; font-size:12px; font-weight:750; }
.mb-spotlight header i { display:grid; place-items:center; color:var(--mb-card-accent); }
.mb-spotlight header svg { width:18px; height:18px; }
.mb-spotlight-values { display:grid; gap:9px; padding-top:14px; }
.mb-spotlight-values button { min-width:0; border:0; border-radius:9px; background:#020b081f; color:#f6f8f3; text-align:left; }
.mb-kpi-primary { width:100%; display:grid; grid-template-columns:68px minmax(0,1fr); align-items:center; gap:12px; padding:8px; }
.mb-kpi-ring { --mb-gauge-color:var(--mb-card-accent); width:64px; aspect-ratio:1; display:grid; place-items:center; position:relative; border-radius:50%; background:conic-gradient(var(--mb-gauge-color) var(--mb-gauge),#254036 0); }
.mb-kpi-ring::after { content:''; position:absolute; inset:8px; border-radius:50%; background:#0b2119; box-shadow:inset 0 0 10px #0004; }
.mb-kpi-ring b { z-index:1; color:var(--mb-gold); font:700 11px 'Space Grotesk',sans-serif; letter-spacing:-.03em; }
.mb-kpi-summary { display:grid; gap:4px; min-width:0; }
.mb-kpi-summary small,.mb-kpi-secondary small { color:#b5c7bc; font-size:8px; text-transform:uppercase; letter-spacing:.06em; }
.mb-kpi-summary strong { color:var(--mb-gold); font:600 clamp(18px,1.55vw,26px) 'Space Grotesk',sans-serif; letter-spacing:-.045em; overflow-wrap:anywhere; }
.mb-kpi-summary em,.mb-kpi-secondary em { color:var(--mb-card-accent); font-size:8px; font-style:normal; font-weight:700; }
.mb-kpi-secondary-list { display:grid; gap:1px; border-top:1px solid color-mix(in srgb,var(--mb-card-accent) 17%,transparent); padding-top:6px; }
.mb-kpi-secondary { width:100%; display:flex!important; align-items:center; justify-content:space-between; gap:10px!important; padding:7px 8px!important; background:transparent!important; }
.mb-kpi-secondary>span { display:flex; flex:1; align-items:baseline; justify-content:space-between; gap:7px; min-width:0; }
.mb-kpi-secondary small { line-height:1.3; }
.mb-kpi-secondary strong { color:var(--mb-gold); font:600 14px 'Space Grotesk',sans-serif; white-space:nowrap; }
.mb-hubspot-spotlight { grid-column:span 2; }
.mb-hubspot-summary-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; padding-top:14px; }
.mb-hubspot-result { min-width:0; display:grid; gap:4px; padding:10px; border:1px solid transparent!important; border-radius:9px; background:#020b0838!important; color:#f6f8f3; text-align:left; cursor:pointer; transition:transform .16s ease,border-color .16s ease,background .16s ease; }
.mb-hubspot-result:hover:not(:disabled) { transform:translateY(-2px); border-color:color-mix(in srgb,var(--mb-card-accent) 45%,transparent)!important; background:#0b18124f!important; }
.mb-hubspot-result:focus-visible { outline:2px solid var(--mb-card-accent); outline-offset:2px; }
.mb-hubspot-result:disabled { cursor:default; opacity:.72; }
.mb-hubspot-result small { color:#c5d1ca; font-size:8px; font-weight:800; letter-spacing:.05em; text-transform:uppercase; }
.mb-hubspot-result strong { min-width:0; color:var(--mb-gold); font:600 clamp(15px,1.2vw,21px) 'Space Grotesk',sans-serif; letter-spacing:-.045em; overflow-wrap:anywhere; }
.mb-hubspot-result span { min-width:0; color:#d2ddd6; font-size:9px; font-weight:700; line-height:1.35; overflow-wrap:anywhere; }
.mb-hubspot-result em { color:var(--mb-card-accent); font-size:7px; font-style:normal; font-weight:750; }
.mb-kpi-ring[data-status="good"] { --mb-gauge-color:#b6dc8d; }
.mb-kpi-ring[data-status="attention"] { --mb-gauge-color:#ef9a7d; }
.mb-kpi-ring[data-status="pending"] { --mb-gauge-color:#6f8679; }
.mb-kpi-ring[data-status="stale"],.mb-kpi-ring[data-status="partial"] { --mb-gauge-color:#e8cf8f; }
.mb-kpi-summary em[data-status="good"],.mb-kpi-secondary em[data-status="good"] { color:#b6dc8d; }
.mb-kpi-summary em[data-status="attention"],.mb-kpi-secondary em[data-status="attention"] { color:#fac09c; }
.mb-kpi-summary em[data-status="pending"],.mb-kpi-secondary em[data-status="pending"] { color:#9daf9f; }
.mb-kpi-summary em[data-status="stale"],.mb-kpi-summary em[data-status="partial"],.mb-kpi-secondary em[data-status="stale"],.mb-kpi-secondary em[data-status="partial"] { color:#e8cf8f; }
.mb-section-title { display:flex; justify-content:space-between; align-items:end; gap:15px; margin-bottom:18px; }
.mb-section-title h2 { font-size:25px; color:#eef5ed; font-weight:500; letter-spacing:-.03em; margin-top:8px; }
.mb-section-title .mb-eyebrow { font-size:9px; color:#87a18e; }
.mb-export { display:flex; align-items:center; gap:7px; margin-left:auto; background:none; border:0; padding:8px 0 8px 8px; color:#b8cabb; font-size:10px!important; }
.mb-export svg { width:15px; height:15px; }
.mb-workspace { display:grid; grid-template-columns:minmax(0,1fr); align-items:start; }
.mb-area-list { display:grid; gap:20px; min-width:0; }
.mb-area-card { border:1px solid var(--mb-line); border-radius:13px; background:linear-gradient(120deg,#142b21,#10251d); overflow:hidden; min-width:0; }
.mb-area-heading { display:flex; gap:12px; align-items:center; padding:19px; }
.mb-area-icon { display:grid; place-items:center; width:38px; height:38px; background:#c4deaa0c; border:1px solid #c4deaa20; border-radius:11px; color:#b8d294; flex-shrink:0; }
.mb-area-heading h3 { font-size:17px; font-weight:500; color:#f1f5eb; }
.mb-area-heading p { font-size:10px; color:var(--mb-muted); margin-top:3px; }
.mb-area-count { margin-left:auto; color:var(--mb-gold); white-space:nowrap; font:500 18px 'Space Grotesk',sans-serif; }
.mb-area-count small { font:500 9px 'Manrope',sans-serif; color:var(--mb-muted); }
.mb-group-heading { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:10px 19px; background:#bbd69b08; border-block:1px solid var(--mb-line); }
.mb-group-heading>div { min-width:0; display:grid; gap:3px; }
.mb-group-heading h4 { font:800 11px 'Manrope',sans-serif; color:#edf5e9; }
.mb-group-heading small { color:#91aa98; font-size:8px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.mb-group-heading>span { font-size:9px; letter-spacing:.10em; color:var(--mb-gold); }
.mb-metric-group-window { margin:14px; border:1px solid #b6dc8d24; border-radius:18px; background:linear-gradient(145deg,#082318,#061b12); overflow:hidden; box-shadow:0 12px 30px #00000024; }
.mb-metric-group-window + .mb-metric-group-window { margin-top:18px; }
.mb-metric-group-window.is-national { border-color:#6fd6a940; background:linear-gradient(145deg,#08291f,#061b12); }
.mb-metric-group-window.is-national .mb-group-heading { background:#58d6a10d; border-color:#6fd6a92e; }
.mb-metric-group-window.is-export { border-color:#edcf8640; background:linear-gradient(145deg,#102a1d,#061b12); }
.mb-metric-group-window.is-export .mb-group-heading { background:#edcf8610; border-color:#edcf8633; }
.mb-metric-card-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:13px; padding:15px; background:#061f151f; }
.mb-finished-goods-group [data-finished-goods-summary] { padding:16px 15px 0; font-size:12px; line-height:1.6; }
.mb-finished-goods-group [data-finished-goods-summary] p { margin:0 0 8px; }
.mb-open-orders-window .mb-metric-card-grid { grid-template-columns:repeat(auto-fit,minmax(min(100%,360px),1fr)); }
.mb-planned-orders-group .mb-metric-card-grid { grid-template-columns:minmax(0,1fr); }
.mb-planned-orders-readings { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:12px 0; }
.mb-planned-orders-measure { display:grid; gap:7px; min-width:0; padding:13px; border:1px solid #b6dc8d38; border-radius:12px; }
.mb-planned-orders-measure>small { font-size:11px; font-weight:800; color:var(--mb-muted); }
.mb-planned-orders-measure>b { font:900 clamp(22px,2.2vw,32px)/1.15 'Space Grotesk',sans-serif; color:var(--mb-card-tone); overflow-wrap:anywhere; }
.mb-planned-orders-comparison { display:flex; flex-wrap:wrap; justify-content:space-between; gap:6px 16px; font-size:10px; color:var(--mb-muted); }
.mb-planned-orders-comparison strong { color:inherit; }
.mb-planned-orders-note { display:block; margin-bottom:9px; color:var(--mb-muted); font-size:10px; line-height:1.4; }
.mb-planned-detail-value { display:grid; gap:4px; margin:4px 0 14px; }
.mb-planned-detail-value small,.mb-planned-detail-value span { color:var(--mb-muted); font-size:11px; }
.mb-planned-detail-value strong { color:var(--mb-card-tone,#28633d); font:850 24px 'Space Grotesk',sans-serif; overflow-wrap:anywhere; }
.mb-open-orders-window .mb-metric-card-head strong { white-space:normal; overflow:visible; text-overflow:clip; }
.mb-metric-card { --mb-card-tone:var(--mb-gold); display:block; min-width:0; width:100%; padding:14px; border:1px solid #b6dc8d24; border-top:7px solid var(--mb-card-tone); border-radius:18px; background:linear-gradient(155deg,#123923,#0d2d1d); box-shadow:0 15px 34px #00000038; color:var(--mb-text,#eef6e9); text-align:left; transform-origin:center; transition:transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.mb-metric-card:hover { transform:translateY(-3px) scale(1.018); border-color:#edcf86cc; background:radial-gradient(circle at 88% 0,#edcf862b,transparent 34%),linear-gradient(155deg,#183f28,#0e3320); box-shadow:0 22px 52px #00000052,0 0 0 1px #edcf8633; }
.mb-metric-card:disabled { opacity:.68; cursor:default; transform:none; }
.mb-metric-card:disabled:hover { transform:none; border-color:#b6dc8d24; box-shadow:0 15px 34px #00000038; }
.mb-metric-card:focus-visible { outline:2px solid var(--mb-card-tone); outline-offset:3px; transform:translateY(-3px) scale(1.018); background:radial-gradient(circle at 88% 0,#edcf862b,transparent 34%),linear-gradient(155deg,#183f28,#0e3320); }
.mb-metric-card-head { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; margin-bottom:11px; }
.mb-metric-card-head span { min-width:0; display:block; }
.mb-metric-card-head strong { display:block; color:#f3f7ef; font-size:15px; line-height:1.12; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mb-metric-card-head small { display:block; margin-top:4px; color:#a8bea7; font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.08em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mb-metric-card-head em { flex:0 0 auto; padding:7px 9px; border:1px solid #65d58f55; border-radius:999px; background:#1f7f46; color:#ecfff3; box-shadow:inset 0 1px 0 #ffffff22,0 8px 18px #0002; font-size:12px; font-style:normal; font-weight:950; white-space:nowrap; max-width:46%; overflow:hidden; text-overflow:ellipsis; }
.mb-metric-card-head em[data-status="up"], .mb-metric-card-head em[data-status="good"] { border-color:#63db8c80; background:#1f7f46; color:#ecfff3; }
.mb-metric-card-head em[data-status="down"], .mb-metric-card-head em[data-status="attention"] { border-color:#ff967f80; background:#9d382b; color:#fff0ec; }
.mb-metric-card-head em[data-status="new"], .mb-metric-card-head em[data-status="partial"], .mb-metric-card-head em[data-status="stale"] { border-color:#edcf8680; background:#8b6824; color:#fff5d7; }
.mb-metric-card-head em[data-status="pending"], .mb-metric-card-head em[data-status="neutral"] { border-color:#d4e9c52b; background:#243b30; color:#d6e4d9; }
.mb-metric-today { display:block; margin:8px 0 12px; color:var(--mb-card-tone); font:950 clamp(24px,2vw,34px)/1 'Space Grotesk',sans-serif; letter-spacing:-.045em; white-space:normal; overflow-wrap:anywhere; text-shadow:0 8px 26px color-mix(in srgb,var(--mb-card-tone) 14%,transparent); }
.mb-metric-support-value { display:block; margin:-5px 0 4px; color:#edf4e9; font-size:11px; font-weight:950; line-height:1.25; overflow-wrap:anywhere; }
.mb-metric-support { display:block; margin:-5px 0 4px; color:#edf4e9; font-size:11px; font-weight:900; line-height:1.25; }
.mb-metric-drill { display:block; margin:0 0 11px; color:var(--mb-card-tone); font-size:9px; font-style:normal; font-weight:900; line-height:1.2; }
.mb-metric-bars { display:grid; gap:8px; margin-bottom:11px; }
.mb-metric-bar-row { display:grid; grid-template-columns:42px minmax(0,1fr) minmax(116px,auto); align-items:center; gap:9px; }
.mb-metric-bar-row small { color:#a8bea7; font-size:11px; font-weight:950; }
.mb-metric-bar-row b { color:#eef6e9; font-size:11px; text-align:right; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mb-metric-bar-row i { height:14px; border-radius:999px; background:#d4e9c51e; overflow:hidden; }
.mb-metric-bar-row u { display:block; height:100%; border-radius:999px; background:#c9d7bd60; }
.mb-metric-bar-row.is-today u { background:var(--mb-card-tone); box-shadow:0 0 14px color-mix(in srgb,var(--mb-card-tone) 24%,transparent); }
.mb-metric-values { display:grid; grid-template-columns:1fr; gap:7px; }
.mb-metric-values>span { min-width:0; display:block; padding:8px; border:1px solid #b6dc8d20; border-radius:11px; background:#061e14; }
.mb-metric-values small { display:block; margin-bottom:4px; color:#a8bea7; font-size:10px; font-weight:950; white-space:nowrap; }
.mb-metric-values b { display:block; color:#eef6e9; font-size:13px; font-weight:950; white-space:normal; overflow-wrap:anywhere; }
.mb-metric-values .is-delta b { color:#9edf84; }
.mb-metric-values .is-delta[data-status="up"] b, .mb-metric-values .is-delta[data-status="good"] b { color:#9edf84; }
.mb-metric-values .is-delta[data-status="down"] b, .mb-metric-values .is-delta[data-status="attention"] b { color:#f08d74; }
.mb-metric-values .is-delta[data-status="new"] b, .mb-metric-values .is-delta[data-status="partial"] b, .mb-metric-values .is-delta[data-status="stale"] b { color:#edcf86; }
.mb-metric-values .is-delta[data-status="pending"] b, .mb-metric-values .is-delta[data-status="neutral"] b { color:#c7d8ca; }
.mb-table-wrap { overflow:auto; }
.mb-metrics-table { border-collapse:collapse; width:100%; table-layout:fixed; font-size:11px; background:transparent; }
.mb-metrics-table :is(th,td) { border:0; border-bottom:1px solid #b3d4be0b; padding:11px 12px; background:transparent; color:inherit; text-align:right; vertical-align:middle; }
.mb-metrics-table thead th { font-size:8px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:#87a18f; padding-top:10px; padding-bottom:8px; }
.mb-metrics-table :is(th,td):first-child { text-align:left; padding-left:19px; width:34%; }
.mb-metrics-table :is(th,td):last-child { width:23%; padding-right:19px; }
.mb-metrics-table tbody tr:hover { background:#d0e6b503; }
.mb-metrics-table tbody tr:last-child :is(th,td) { border-bottom:0; }
.mb-metric-name { display:block; text-align:left; border:0; background:none; color:#dee7dc; font-weight:600!important; padding:0; line-height:1.5; width:100%; }
.mb-metric-name small { display:block; font-size:8px; font-weight:400; color:#91aa98; margin-top:3px; }
.mb-metric-name small span { padding-left:7px; color:#bccd9b; }
.mb-metric-name:hover { color:var(--mb-gold); }
body[data-view="dashboard"] .management-board .mb-metrics-table td.mb-result { font:500 15px 'Space Grotesk',sans-serif; color:var(--mb-gold); white-space:nowrap; }
body[data-view="dashboard"] .management-board .mb-metrics-table td.mb-target,
body[data-view="dashboard"] .management-board .mb-metrics-table td.mb-delta { color:var(--mb-gold); font-size:10px; white-space:nowrap; }
.mb-status { display:inline-flex; gap:5px; align-items:center; font-size:8px; padding:5px 7px; border-radius:5px; background:#a7beb00b; color:#a6b8ad; white-space:nowrap; }
.mb-status i { width:4px; height:4px; border-radius:50%; background:currentColor; }
.mb-status[data-status="attention"] { color:#fac09c; background:#df935717; }
.mb-status[data-status="good"] { color:#b6dc8d; background:#b6dc8d13; }
.mb-status[data-status="stale"], .mb-status[data-status="partial"] { color:#e8cf8f; background:#e8cf8f13; }
.mb-value-status[data-status="good"] { color:#b6dc8d; }
.mb-value-status[data-status="attention"] { color:#fac09c; }
.mb-value-status[data-status="stale"], .mb-value-status[data-status="partial"] { color:#e8cf8f; }
.mb-insights { display:grid; gap:18px; }
.mb-focus { padding:22px; border:1px solid #c7d99430; border-radius:13px; background:radial-gradient(ellipse at 100% 0,#b6cc6624,transparent 65%),linear-gradient(135deg,#293924,#1b3020); }
.mb-focus .mb-eyebrow { font-size:8px; }
.mb-focus h2 { font-size:25px; line-height:1.15; letter-spacing:-.03em; font-weight:400; margin:14px 0 22px; color:#ebedda; }
.mb-focus-count { display:flex; align-items:center; gap:14px; border-bottom:1px solid #dce2bc20; padding-bottom:18px; margin-bottom:15px; }
.mb-focus-count strong { font:400 54px 'Space Grotesk',sans-serif; color:#e2cd88; line-height:1; }
.mb-focus-count span { font-size:10px; line-height:1.7; color:#beccb1; }
.mb-focus p { font-size:11px; line-height:1.7; color:#bfccb6; margin:10px 0; }
.mb-focus-note { display:inline-block; font-size:8px; border:1px solid #c7d99430; padding:6px 9px; margin-top:4px; border-radius:20px; color:#d8dfb2; }
.mb-focus-list { list-style:none; padding:0; margin:0; }
.mb-focus-list li+li { border-top:1px solid #ffffff0d; }
.mb-focus-list button { padding:10px 0; border:0; background:none; text-align:left; color:#eef0d9; width:100%; }
.mb-focus-list button span { display:block; font-size:11px; }
.mb-focus-list button small { display:block; color:#abbca2; font-size:9px; margin-top:5px; line-height:1.6; }
.mb-coverage { padding:20px; border:1px solid var(--mb-line); border-radius:13px; background:#10251c; }
.mb-coverage header { display:flex; justify-content:space-between; align-items:center; gap:8px; }
.mb-coverage h3,.mb-reading-guide h3 { font:700 11px 'Manrope',sans-serif; color:#d1dfcf; }
.mb-coverage header span { color:#ddca8d; font-size:11px; }
.mb-coverage progress { width:100%; height:4px; accent-color:#c4d697; background:#2a4231; border:0; border-radius:3px; margin:18px 0 12px; }
.mb-coverage progress::-webkit-progress-bar { background:#2a4231; border-radius:3px; }
.mb-coverage progress::-webkit-progress-value { background:#c4d697; border-radius:3px; }
.mb-coverage dl { display:grid; gap:10px; margin:0 0 15px; }
.mb-coverage dl>div { display:flex; justify-content:space-between; color:#a9beac; font-size:10px; }
.mb-coverage dd { margin:0; color:#d8e0ca; }
.mb-coverage p { color:#96af9d; font-size:10px; line-height:1.7; border-top:1px solid var(--mb-line); padding-top:13px; }
.mb-coverage>small { display:block; color:#829d8a; font-size:9px; line-height:1.8; margin-top:12px; }
.mb-coverage>small b { color:#c4d5bd; font-weight:500; }
.mb-reading-guide { padding:6px 9px; }
.mb-reading-guide p { color:#94aa9b; font-size:10px; line-height:1.7; margin-top:12px; }
.mb-reading-guide b { color:#d4ddbd; }
.mb-footer { border-top:1px solid var(--mb-line); padding-top:20px; margin-top:30px; display:flex; flex-wrap:wrap; justify-content:space-between; gap:12px; color:#789782; font-size:9px; }
.mb-footer>span:first-child { font-weight:800; letter-spacing:.1em; color:#a2b58c; }
.mb-loading { padding:20px 0 60px; color:var(--mb-muted); }
.mb-loading>span { font-size:12px; }
.mb-loading>div { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-top:20px; }
.mb-loading i { height:160px; border:1px solid var(--mb-line); border-radius:13px; background:linear-gradient(110deg,#153323,#0b231b); animation:mb-pulse 1.2s ease-in-out infinite alternate; }
@keyframes mb-pulse { to { opacity:.4; } }
.mb-error { margin:10px 0 50px; }
.mb-error h2 { color:#ffe2d3; margin:12px 0; font-size:24px; }
.mb-error p { color:#e0b4a8; margin:10px 0 20px; }
.mb-dialog { width:min(570px,calc(100vw - 28px)); max-height:85dvh; overflow:auto; padding:26px; border:1px solid #668052; border-radius:18px; background:linear-gradient(130deg,#1a3526,#0a2119); color:#e6eddf; box-shadow:0 30px 100px #0009; margin:auto; }
.mb-dialog:has([data-accident-month]) { width:min(960px,calc(100vw - 28px)); }
[data-accident-month] { min-width:0; max-width:100%; }
[data-accident-month] .mb-detail-table { min-width:620px; }
[data-accident-cases] {min-width:0;max-width:100%;margin-bottom:24px;}
[data-accident-cases] .mb-detail-table {min-width:760px;font-size:14px;}
[data-accident-cases] .mb-detail-table td,
[data-accident-cases] .mb-detail-table th {white-space:normal;vertical-align:top;text-align:left;overflow-wrap:anywhere;}
[data-accident-cases] .mb-accident-description {min-width:280px;max-width:480px;white-space:pre-wrap;}
[data-accident-cases] .mb-detail-table tbody th {position:static;min-width:140px;font:inherit;text-transform:none;letter-spacing:normal;font-weight:700;}
[data-accident-cases] .mb-detail-table td:first-child {min-width:90px;}
[data-accident-cases] .mb-detail-table td:nth-child(3) {min-width:85px;}
[data-accident-cases] .mb-detail-table td:nth-child(4) {min-width:110px;}
@media (max-width:640px) {
  [data-accident-cases] .mb-detail-table {display:block;min-width:0;width:100%;}
  [data-accident-cases] .mb-detail-table thead {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);}
  [data-accident-cases] .mb-detail-table tbody {display:block;}
  [data-accident-cases] .mb-detail-table tbody tr {display:block;padding:14px;border-bottom:1px solid var(--border,#d5e1d9);}
  [data-accident-cases] .mb-detail-table tbody td,
  [data-accident-cases] .mb-detail-table tbody th {display:block;min-width:0;max-width:none;padding:6px 0;border:0;}
  [data-accident-cases] [data-label]::before {content:attr(data-label);display:block;font-size:11px;font-weight:700;color:var(--muted,#596e61);margin-bottom:4px;}
}
.mb-dialog::backdrop { background:#02100cbf; backdrop-filter:blur(5px); }
.mb-dialog>header { display:flex; align-items:center; justify-content:space-between; }
.mb-dialog>header button { width:34px; height:34px; border-radius:50%; border:1px solid #ffffff22; background:#ffffff08; color:#fff; font-size:22px; }
.mb-detail-scope { display:block; color:#acbf9e; font-size:11px; margin:20px 0 7px; }
.mb-dialog h2 { font-size:28px; line-height:1.2; font-weight:500; color:#e9efde; }
.mb-detail-value { font:500 clamp(24px,5vw,38px) 'Space Grotesk',sans-serif; color:#dec88b; margin:20px 0 10px; overflow-wrap:anywhere; }
.mb-dialog dl { display:grid; gap:13px; padding:20px 0; margin:15px 0; border-block:1px solid #d7e8c821; }
.mb-dialog dl>div { display:flex; justify-content:space-between; gap:20px; font-size:11px; }
.mb-dialog dt { color:#a2b798; flex:1; }
.mb-dialog dd { margin:0; text-align:right; max-width:65%; overflow-wrap:anywhere; }
.mb-dialog h3 { color:#e1e8cf; font-size:14px; margin-bottom:10px; }
.mb-dialog p { color:#bbceb1; font-size:12px; line-height:1.8; }
.mb-dialog .mb-detail-note { font-size:10px; color:#8fac90; margin-top:15px; }
.mb-open-lines { width:100%; justify-content:center; margin:0 0 7px; }
.mb-double-click-hint { display:block; text-align:center; color:#8fac90; font-size:9px; margin:0 0 18px; }
.mb-dialog[data-view="lines"] { width:min(1180px,calc(100vw - 28px)); padding:22px; }
.mb-dialog[data-view="lines"]>header>div { min-width:0; }
.mb-dialog[data-view="lines"]>header h2 { margin:4px 0; }
.mb-dialog[data-view="lines"]>header small { color:#9fb49f; }
.mb-detail-loading,.mb-detail-empty { padding:38px 12px; text-align:center; color:#a9bca8; }
.mb-detail-empty b { display:block; color:#e3eacf; margin-bottom:8px; }
.mb-detail-search { display:flex; align-items:flex-end; gap:8px; margin:18px 0 10px; }
.mb-detail-search label { flex:1; }
.mb-detail-search input,.mb-detail-search select { width:100%; min-height:38px; border:1px solid #ffffff20; border-radius:9px; background:#061b14; color:#edf1e8; padding:0 12px; }
.mb-detail-category { flex:0 1 230px!important; }
.mb-detail-category>span { display:block; margin-bottom:5px; color:#9fb49f; font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; }
.mb-detail-query { min-width:210px; }
.mb-detail-search button,.mb-detail-pages button { border:1px solid #d8b75a66; border-radius:9px; background:#d8b75a18; color:#ead17f; padding:8px 15px; }
.mb-detail-search button:hover,.mb-detail-pages button:not(:disabled):hover { background:#d8b75a2c; }
.mb-detail-summary { display:flex; justify-content:space-between; gap:16px; color:#8fac90; font-size:10px; margin:10px 0; }
.mb-detail-summary b { color:#dec88b; white-space:nowrap; }
.mb-detail-line-summary { display:grid; grid-template-columns:repeat(auto-fit,minmax(118px,1fr)); gap:8px; margin:10px 0 12px; }
.mb-detail-line-summary span { min-width:0; border:1px solid #ffffff16; border-radius:8px; background:#061b14; padding:9px 10px; }
.mb-detail-line-summary small { display:block; color:#9fb59f; font-size:8px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; }
.mb-detail-line-summary b { display:block; margin-top:3px; color:#e4ce86; font:600 18px 'Space Grotesk',sans-serif; }
.mb-detail-line-summary span[data-tone="good"] b { color:#b9df91; }
.mb-detail-line-summary span[data-tone="warning"] b { color:#e4ce86; }
.mb-detail-line-summary span[data-tone="danger"] b { color:#f2a48e; }
.mb-detail-table-wrap { overflow:auto; max-height:52dvh; border:1px solid #ffffff18; border-radius:11px; }
.mb-detail-table { width:100%; border-collapse:collapse; font-size:10px; white-space:nowrap; }
.mb-detail-table th { position:sticky; top:0; z-index:1; background:#183426; color:#aebfa7; text-align:left; text-transform:uppercase; font-size:8px; letter-spacing:.04em; }
.mb-detail-table :is(th,td) { padding:10px 11px; border-bottom:1px solid #ffffff12; }
.mb-detail-table td[data-type="money"],.mb-detail-table td[data-type="number"],.mb-detail-table td[data-type="integer"],.mb-detail-table td[data-type="percent"] { text-align:right; color:#e4ce86; font-variant-numeric:tabular-nums; }
.mb-inventory-categories { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:9px; margin:16px 0 4px; }
.mb-inventory-categories>button { display:grid; grid-template-columns:auto 1fr; align-items:center; gap:4px 10px; border:1px solid #ffffff1f; border-radius:10px; background:#061b14; color:#edf1e8; padding:11px 12px; text-align:left; cursor:pointer; }
.mb-inventory-categories>button:hover,.mb-inventory-categories>button[aria-pressed="true"] { border-color:#6fa77c; box-shadow:inset 3px 0 0 #6fa77c; }
.mb-inventory-categories>button b { justify-self:end; color:#cbe5d0; font:600 13px 'Space Grotesk',sans-serif; }
.mb-inventory-categories>button small { grid-column:1/-1; color:#9fb49f; font-size:9px; line-height:1.4; }
.mb-inventory-state { display:inline-flex; align-items:center; min-height:24px; border:1px solid #6fa77c66; border-radius:999px; background:#6fa77c1f; color:#cbe5d0; padding:3px 9px; font-size:9px; font-weight:800; line-height:1; white-space:nowrap; }
.mb-inventory-state[data-location="quarantine"] { border-color:#78a98766; background:#78a98724; color:#d3ead8; }
.mb-inventory-state[data-location="nonconforming"] { border-color:#557e6266; background:#557e6226; color:#c4ddca; }
.mb-inventory-state[data-location="picking"] { border-color:#8fbd9a66; background:#8fbd9a24; color:#dbefdf; }
.mb-inventory-state[data-location="production"] { border-color:#9acb8b66; background:#9acb8b24; color:#dff1da; }
.mb-detail-pages { display:flex; justify-content:space-between; align-items:center; gap:15px; margin-top:13px; color:#9db09c; font-size:10px; }
.mb-detail-pages button:disabled { opacity:.35; }
.mb-sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; clip:rect(0,0,0,0); overflow:hidden; }
@media(min-width:1650px) { .mb-metrics-table :is(th,td) { padding-block:14px; } }
@media(max-width:1250px) {
  .mb-filters { grid-template-columns:repeat(3,minmax(0,1fr)) auto; }
  .mb-period-filter { grid-column:1/-1; }
  .mb-metric-card-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .mb-workspace { grid-template-columns:minmax(0,1fr); } .mb-insights { grid-template-columns:1.1fr 1fr 1fr; } .mb-focus h2 { font-size:22px; } .mb-spotlight { padding:12px; } .mb-kpi-summary strong { font-size:23px; }
}
@media(max-width:900px) {
  body[data-view="dashboard"]:has(.management-board) .content { padding:16px 18px; }
  .mb-hero { align-items:flex-start; gap:16px; }
  .mb-title-row { align-items:flex-start; flex-direction:column; gap:7px; }
  .mb-hero h1 { white-space:normal; }
  .mb-hero-right { gap:10px; }
  .mb-filters { grid-template-columns:repeat(3,minmax(0,1fr)) auto; }
  .mb-period-filter { grid-column:1/-1; }
  .mb-spotlights { grid-template-columns:repeat(2,minmax(0,1fr)); } .mb-kpi-summary strong { font-size:27px; } .mb-insights { grid-template-columns:1fr 1fr; } .mb-reading-guide { grid-column:1/-1; }
}
@media(max-width:720px) {
  .mb-open-orders-window .mb-group-heading,.mb-open-orders-window .mb-metric-card-head { align-items:flex-start; flex-direction:column; }
  .mb-open-orders-window .mb-metric-card-head em { max-width:100%; }
  body[data-view="dashboard"]:has(.management-board) .content { padding:12px 14px 100px; }
  .mb-header-shell { padding:16px; }
  .mb-hero { align-items:flex-start; padding:0 0 16px; gap:12px; }
  .mb-title-row { margin-block:6px; }
  .mb-hero h1 { font-size:22px; }
  .mb-commercial-link { min-height:32px; width:fit-content; }
  .mb-hero-right { display:flex; gap:10px; }
  .mb-brand-lockup { flex:0 0 88px; width:88px; }
  .mb-brand-lockup img { height:31px; }
  .mb-eyebrow { font-size:10px; }
  .mb-company-heading { align-items:flex-start; flex-wrap:wrap; }
  .mb-company-tabs button { gap:4px 6px; padding:12px; }
  .mb-company-tabs button span { font-size:13px; }
  .mb-filters { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; padding-top:10px; }
  .mb-period-filter { grid-column:1/-1; }
  .mb-quick { justify-content:space-between; }
  .mb-quick button { flex:1; min-height:34px; }
  .mb-filters :is(input,select), .mb-refresh { min-height:44px; }
  .mb-cutline { font-size:9px; }
  .mb-overview { padding:14px; } .mb-export { font-size:9px!important; } .mb-metric-card-grid { grid-template-columns:1fr; padding:12px; } .mb-area-heading { padding:16px; gap:10px; } .mb-area-heading h3 { font-size:16px; } .mb-area-heading p { max-width:180px; line-height:1.5; } .mb-area-count small { display:block; font-size:8px; } .mb-area-count { text-align:right; } .mb-group-heading { padding-inline:16px; } .mb-insights { grid-template-columns:1fr 1fr; gap:12px; } .mb-focus,.mb-coverage { padding:17px; } .mb-focus h2 { font-size:24px; } .mb-dialog { padding:20px; }
  .mb-detail-search { align-items:stretch; flex-direction:column; }
  .mb-detail-search label,.mb-detail-category { flex-basis:auto!important; width:100%; }
  .mb-detail-search button { min-height:40px; }
}
@media(max-width:520px) {
  .mb-hero { flex-wrap:wrap; }
  .mb-hero-copy { flex-basis:calc(100% - 112px); }
  .mb-company-tabs { grid-template-columns:1fr; gap:9px; }
  .mb-company-tabs button { min-height:98px; grid-template-columns:78px minmax(0,1fr) auto; grid-template-rows:auto auto auto; gap:3px 10px; }
  .mb-company-logo { grid-column:1; grid-row:1/-1; height:54px; margin:0; }
  .mb-company-tabs button span { grid-column:2; grid-row:1; }
  .mb-company-tabs button small { grid-column:2; grid-row:2; }
  .mb-company-tabs button>b { grid-column:2; grid-row:3; justify-self:start; padding:0; background:transparent; }
  .mb-company-tabs button>b::after { content:' indicadores'; font-weight:400; }
  .mb-company-tabs button>em { grid-column:3; grid-row:1/-1; }
  .mb-filters label:has(#mbCurrency), .mb-filters .mb-refresh { grid-column:1/-1; }
}
@media(max-width:720px) { .mb-planned-orders-readings { grid-template-columns:1fr; } }
@media(max-width:420px) { .mb-hero-copy { flex-basis:100%; } .mb-overview-heading h2 { font-size:19px; } .mb-spotlight header { font-size:10px; gap:6px; } .mb-spotlight-values { gap:7px; } .mb-kpi-summary strong { font-size:22px; } .mb-kpi-ring { width:58px; } .mb-kpi-primary { grid-template-columns:58px minmax(0,1fr); gap:9px; } .mb-spotlight-values small { font-size:8px; } .mb-spotlight { padding:12px 10px; } .mb-insights { grid-template-columns:1fr; } .mb-section-title { align-items:start; } .mb-section-title h2 { font-size:21px; } .mb-area-heading p { font-size:9px; max-width:150px; } .mb-area-count small { max-width:45px; white-space:normal; } .mb-metric-today { font-size:29px; } .mb-metric-values { grid-template-columns:1fr; } }
@media(max-width:720px) { .mb-section-title { flex-wrap:wrap; align-items:center; } }
@media(prefers-reduced-motion:reduce) { .management-board *, .management-board *::before, .management-board *::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; } }

/* Controles oscuros y cifras legibles incluso en pantallas estrechas. */
body[data-view="dashboard"] .management-board .mb-filters :is(input,select) { background:#11291f; color:#eef5ef; border:1px solid #c5e6cc21; box-shadow:none; border-radius:8px; }
.mb-commercial-return { color:#e6c477; font-size:11px; padding:8px; text-decoration:none; }
.mb-kpi-summary strong { font-size:clamp(18px,1.5vw,27px); }
@media(max-width:600px) {
  .mb-spotlight-values { padding-block:12px 4px; gap:8px; }
  .mb-kpi-summary strong { font-size:23px; }
}
@media(max-width:520px) {
  .mb-spotlights { grid-template-columns:1fr; }
  .mb-hubspot-spotlight { grid-column:auto; }
  .mb-hubspot-summary-grid { grid-template-columns:1fr; }
  .mb-kpi-summary strong { white-space:nowrap; }
}

.mb-table-wrap:focus-visible { outline:2px solid var(--mb-gold); outline-offset:-3px; }
.mb-kpi-summary strong { white-space:normal; overflow-wrap:anywhere; }
@media(max-width:720px) {
  body[data-view="dashboard"] .layout:has(.management-board) .sidebar-shell { display:block; padding:8px; }
  body[data-view="dashboard"] .layout:has(.management-board) .nav { display:flex; flex-direction:row; align-items:center; gap:4px; width:100%; height:100%; overflow-x:auto; overflow-y:hidden; }
  body[data-view="dashboard"] .layout:has(.management-board) .nav-group,
  body[data-view="dashboard"] .layout:has(.management-board) .nav-group-items { display:contents; }
  body[data-view="dashboard"] .layout:has(.management-board) .nav a { flex:0 0 48px; }
}
.mb-metrics-table tbody tr:hover :is(th,td) { background:#193527; }

/* Una fuente caída no oculta la matriz gerencial. */
.mb-error.mb-availability-warning { display:flex; align-items:center; justify-content:space-between; gap:20px; margin:4px 0 20px; padding:17px 20px; background:#332c1c; border-color:#d8b56544; color:#e9d4a1; }
.mb-availability-warning .mb-eyebrow { font-size:8px; }
.mb-availability-warning h2 { color:#f0dfb5; font-size:19px; margin:8px 0; }
.mb-availability-warning p { font-size:11px; color:#d8c39b; margin:5px 0; line-height:1.6; overflow-wrap:anywhere; }
.mb-availability-warning small { display:block; font-size:10px; color:#bfb797; line-height:1.6; }
.mb-availability-warning>button { flex-shrink:0; }
@media(max-width:720px) { .mb-error.mb-availability-warning { align-items:stretch; flex-direction:column; gap:14px; padding:16px; } }

/* Áreas del tablero dentro de la navegación lateral. */
.sidebar-dashboard-group { min-width:0; }
.sidebar-dashboard-row { position:relative; display:flex; min-width:0; }
.sidebar-dashboard-row .nav-link { flex:1; min-width:0; padding-right:38px; }
.sidebar-dashboard-toggle { position:absolute; right:5px; top:50%; display:grid; place-items:center; width:32px; height:32px; transform:translateY(-50%); border:0; border-radius:8px; color:#cde4d1; background:transparent; cursor:pointer; }
.sidebar-dashboard-toggle svg { width:16px; height:16px; transition:transform .18s ease; }
.sidebar-dashboard-toggle[aria-expanded="true"] svg { transform:rotate(180deg); }
.sidebar-dashboard-toggle:is(:hover,:focus-visible) { color:#fff; background:#ffffff19; }
.sidebar-dashboard-toggle:focus-visible,.sidebar-dashboard-areas button:focus-visible,.sidebar-trm-widget:focus-visible { outline:2px solid #a9d0aa; outline-offset:2px; }
.sidebar-dashboard-areas[hidden],.sidebar-dashboard-areas button[hidden] { display:none; }
.sidebar-dashboard-areas { display:grid; gap:3px; margin:5px 0 4px 14px; padding:4px 0 4px 10px; border-left:1px solid #78ac8466; }
.sidebar-dashboard-areas button { display:flex; align-items:center; gap:9px; min-width:0; min-height:36px; padding:7px 9px; border:1px solid transparent; border-radius:8px; color:#b8cebd; background:transparent; text-align:left; font:700 11px/1.3 'Manrope',sans-serif; cursor:pointer; }
.sidebar-dashboard-areas button:is(:hover,:focus-visible) { color:#fff; background:#ffffff13; }
.sidebar-dashboard-areas button[aria-pressed="true"] { color:#fff; border-color:#7bae8855; background:#29633b70; }
.sidebar-area-mark { width:6px; height:6px; flex:0 0 6px; border-radius:50%; background:#8bb59a; }
.sidebar-dashboard-areas button[aria-pressed="true"] .sidebar-area-mark { background:#d8f0d7; }

/* TRM informativa, visible en el panel de navegación de los perfiles autorizados. */
.sidebar-trm-widget { display:grid; gap:5px; width:100%; margin-top:auto; padding:12px; border:1px solid #8cbb9870; border-radius:13px; color:#f2f8f1; background:linear-gradient(145deg,#153b29,#0b271b); text-align:left; box-shadow:0 12px 24px #0003; cursor:pointer; }
.sidebar-trm-widget:is(:hover,:focus-visible) { border-color:#b4d8b7; background:linear-gradient(145deg,#1c4931,#103020); }
.sidebar-trm-label { color:#b9d4bf; font:800 9px/1.2 'Manrope',sans-serif; letter-spacing:.08em; text-transform:uppercase; }
.sidebar-trm-widget strong { color:#fff; font:700 22px/1.15 'Space Grotesk',sans-serif; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.sidebar-trm-widget small { color:#b9d4bf; font:600 9px/1.3 'Manrope',sans-serif; }
.sidebar-trm-action { display:flex; justify-content:space-between; align-items:center; margin-top:3px; padding-top:8px; border-top:1px solid #b4d8b735; color:#d8ecda; font:750 10px 'Manrope',sans-serif; }
.sidebar-trm-widget[data-status="error"] strong { font-size:16px; }
.sidebar-trm-dialog { width:min(1100px,calc(100vw - 24px)); max-width:100%; max-height:calc(100vh - 24px); margin:auto; padding:0; border:0; border-radius:18px; background:#fff; color:#173b28; box-shadow:0 24px 70px #0007; }
.sidebar-trm-dialog::backdrop { background:#06170ed9; }
.sidebar-trm-dialog-shell { max-height:calc(100vh - 24px); padding:18px; overflow:auto; }
.sidebar-trm-dialog .trm-history-panel { margin:0; border:0; box-shadow:none; }
.sidebar-trm-dialog .trm-history-head { padding-right:44px; }
.sidebar-trm-close { position:sticky; top:0; z-index:3; float:right; display:grid; place-items:center; width:36px; height:36px; margin:0 0 -36px; border:1px solid #bcd8c3; border-radius:9px; color:#174e31; background:#fff; font:700 24px/1 'Manrope',sans-serif; cursor:pointer; }
.sidebar-trm-close:focus-visible { outline:3px solid #9dc8a7; outline-offset:2px; }
@media(min-width:1121px) { .layout:has(.sidebar-trm-widget) .sidebar { overflow-y:auto; scrollbar-width:thin; } }
@media(min-width:681px) and (max-width:1120px) {
  .layout:has(.sidebar-trm-widget) { grid-template-columns:96px minmax(0,1fr); }
  .layout:has(.sidebar-trm-widget) .sidebar { width:96px; }
  .sidebar-dashboard-row .nav-link { padding-right:11px; }
  .sidebar-dashboard-toggle { right:-4px; top:auto; bottom:-4px; width:21px; height:21px; transform:none; background:#123c27; }
  .sidebar-dashboard-toggle svg { width:13px; height:13px; }
  .sidebar-dashboard-areas:not([hidden]) { position:fixed; z-index:60; top:var(--sidebar-menu-top); left:var(--sidebar-menu-left); width:222px; max-height:calc(100vh - var(--sidebar-menu-top) - 12px); margin:0; padding:8px; overflow:auto; border:1px solid #7bae8855; border-radius:11px; background:#0b2419; box-shadow:0 18px 36px #0007; }
  .sidebar-trm-widget { gap:3px; padding:8px 3px; text-align:center; }
  .sidebar-trm-label { font-size:8px; }
  .sidebar-trm-widget strong { font-size:10px; }
  .sidebar-trm-widget small { display:none; }
  .sidebar-trm-action { justify-content:center; font-size:8px; }
  .sidebar-trm-action>span { display:none; }
}
@media(min-width:681px) and (max-width:720px) {
  body[data-view="dashboard"] .layout:has(.management-board) { display:block; }
  body[data-view="dashboard"] .layout:has(.management-board) .sidebar { position:sticky; top:0; width:100%; height:auto; padding:8px 10px; overflow:hidden; border-right:0; border-bottom:1px solid rgba(214,172,85,.24); }
  body[data-view="dashboard"] .layout:has(.management-board) .sidebar-shell { display:flex; flex-direction:row; align-items:center; gap:7px; height:auto; }
  body[data-view="dashboard"] .layout:has(.management-board) .nav { flex:1; min-width:0; flex-direction:row; gap:6px; margin:0; overflow-x:auto; }
  body[data-view="dashboard"] .layout:has(.management-board) .nav-group,
  body[data-view="dashboard"] .layout:has(.management-board) .nav-group-items { display:contents; }
  body[data-view="dashboard"] .layout:has(.management-board) .nav a { width:auto; }
}
@media(max-width:680px) {
  .layout:has(.sidebar-trm-widget) .sidebar-shell { display:flex; flex-direction:row; align-items:center; gap:7px; }
  .layout:has(.sidebar-trm-widget) .nav { flex:1; min-width:0; }
  body[data-view="dashboard"] .layout:has(.management-board) .sidebar-shell:has(.sidebar-trm-widget) { display:flex; align-items:center; gap:7px; }
  body[data-view="dashboard"] .layout:has(.management-board) .sidebar-shell:has(.sidebar-trm-widget) .nav { flex:1; min-width:0; width:auto; height:auto; }
  .sidebar-dashboard-row .nav-link { padding-right:30px; }
  .sidebar-dashboard-toggle { right:1px; width:27px; height:27px; }
  .sidebar-dashboard-areas:not([hidden]) { position:fixed; z-index:60; top:var(--sidebar-menu-top); left:var(--sidebar-menu-left); width:min(250px,calc(100vw - 16px)); max-height:calc(100vh - var(--sidebar-menu-top) - 12px); margin:0; padding:8px; overflow:auto; border:1px solid #7bae8855; border-radius:11px; background:#0b2419; box-shadow:0 18px 36px #0007; }
  .sidebar-trm-widget { flex:0 0 105px; gap:2px; margin:0; padding:7px; }
  .sidebar-trm-label { font-size:8px; }
  .sidebar-trm-widget strong { font-size:12px; }
  .sidebar-trm-widget small,.sidebar-trm-action { display:none; }
  .sidebar-trm-dialog-shell { padding:8px; }
}
@media(min-width:681px) and (max-width:720px) {
  body[data-view="dashboard"] .sidebar-dashboard-row .nav-link { padding-right:30px; }
  body[data-view="dashboard"] .sidebar-dashboard-toggle { right:1px; top:50%; bottom:auto; width:27px; height:27px; transform:translateY(-50%); }
  body[data-view="dashboard"] .sidebar-dashboard-areas:not([hidden]) { position:fixed; z-index:60; top:var(--sidebar-menu-top); left:var(--sidebar-menu-left); width:min(250px,calc(100vw - 16px)); max-height:calc(100vh - var(--sidebar-menu-top) - 12px); margin:0; padding:8px; overflow:auto; border:1px solid #7bae8855; border-radius:11px; background:#0b2419; box-shadow:0 18px 36px #0007; }
  body[data-view="dashboard"] .sidebar-trm-widget { flex:0 0 105px; gap:2px; width:105px; margin:0; padding:7px; text-align:left; }
  body[data-view="dashboard"] .sidebar-trm-widget strong { font-size:12px; }
  body[data-view="dashboard"] .sidebar-trm-widget small,
  body[data-view="dashboard"] .sidebar-trm-action { display:none; }
}
@media(max-width:360px) {
  .sidebar-trm-dialog .trm-table-wrap :is(th,td) { padding:7px 3px; white-space:normal; overflow-wrap:anywhere; }
}
@media(prefers-reduced-motion:reduce) { .sidebar-dashboard-toggle svg { transition:none; } }

/* Histórico oficial de TRM: referencia informativa, independiente de los KPI. */
.trm-history-panel {
  margin-top:24px;
  padding:22px;
  color:#1f2d24;
  background:#fff;
  border:1px solid #d7e6dc;
  border-radius:18px;
  box-shadow:0 18px 45px rgba(25,83,55,.10);
}
.trm-history-head { display:flex; align-items:flex-start; justify-content:space-between; gap:24px; }
.trm-history-head h2 { margin:7px 0 5px; color:#173b28; font:700 clamp(20px,2vw,28px)/1.15 'Space Grotesk',sans-serif; }
.trm-history-head p { margin:0; color:#5a6c60; font-size:12px; line-height:1.55; }
.trm-history-head>a { flex:none; display:inline-flex; align-items:center; gap:5px; min-height:36px; padding:0 12px; color:#1b6844; border:1px solid #bed7c6; border-radius:9px; font-size:11px; font-weight:750; text-decoration:none; }
.trm-history-head>a:hover { background:#edf7f0; border-color:#7ead8f; }
.trm-history-head>a:focus-visible,.trm-periods button:focus-visible,.trm-date-range :is(input,button):focus-visible,.trm-history-content button:focus-visible,.trm-table-wrap:focus-visible { outline:3px solid rgba(35,128,82,.3); outline-offset:2px; }
.trm-informative-badge { display:inline-flex; align-items:center; gap:7px; color:#1b6844; font-size:9px; font-weight:800; letter-spacing:.09em; text-transform:uppercase; }
.trm-informative-badge i { width:8px; height:8px; border-radius:50%; background:#238052; box-shadow:0 0 0 4px #e2f1e7; }
.trm-periods { display:flex; flex-wrap:wrap; gap:7px; margin:19px 0 10px; }
.trm-periods button { min-height:34px; padding:0 12px; color:#375647; background:#f5f9f6; border:1px solid #d8e5dc; border-radius:9px; font:700 10px 'Manrope',sans-serif; cursor:pointer; }
.trm-periods button:hover { background:#eaf4ed; border-color:#9ec2aa; }
.trm-periods button[aria-pressed="true"] { color:#fff; background:#176b45; border-color:#176b45; }
.trm-date-range { display:flex; align-items:end; gap:9px; margin-bottom:16px; padding:11px 0 15px; border-bottom:1px solid #e5eee8; }
.trm-date-range label { display:grid; gap:5px; color:#52685b; font-size:9px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; }
.trm-date-range input { min-height:37px; padding:0 10px; color:#244936; background:#fbfdfb; border:1px solid #cddfd2; border-radius:8px; font:650 11px 'Manrope',sans-serif; color-scheme:light; }
.trm-date-range button,.trm-daily-review>header button,.trm-pagination button { min-height:37px; padding:0 13px; color:#fff; background:#176b45; border:1px solid #176b45; border-radius:8px; font:750 10px 'Manrope',sans-serif; cursor:pointer; }
.trm-date-range button:hover,.trm-daily-review>header button:hover,.trm-pagination button:hover:not(:disabled) { background:#115b39; border-color:#115b39; }
.trm-date-range>small { align-self:center; margin-left:auto; color:#65766c; font-size:9px; }
.trm-history-content.is-loading,.trm-history-content.is-error { min-height:260px; display:grid; place-items:center; text-align:center; color:#577064; font-size:12px; }
.trm-loading-dot { display:inline-block; width:10px; height:10px; margin-right:8px; border-radius:50%; background:#238052; animation:trm-pulse 1.2s ease-in-out infinite; }
@keyframes trm-pulse { 50% { opacity:.35; transform:scale(.82); } }
.trm-history-content.is-error>div { max-width:430px; padding:24px; background:#f2f7f3; border:1px solid #d8e5dc; border-radius:13px; }
.trm-history-content.is-error strong { color:#244936; }
.trm-history-content.is-error p { margin:7px 0 15px; color:#5a6c60; line-height:1.6; }
.trm-history-content.is-error button { min-height:36px; padding:0 16px; color:#fff; background:#176b45; border:0; border-radius:8px; font-weight:750; cursor:pointer; }
.trm-summary { display:grid; grid-template-columns:minmax(230px,.8fr) minmax(400px,1.2fr); gap:14px; }
.trm-current,.trm-summary dl { margin:0; padding:17px 18px; background:#f1f7f3; border:1px solid #dce9df; border-radius:13px; }
.trm-current small { display:block; color:#587064; font-size:10px; font-weight:750; text-transform:uppercase; letter-spacing:.04em; }
.trm-current>strong { display:block; margin:5px 0 7px; color:#164b31; font:700 clamp(27px,3vw,37px)/1 'Space Grotesk',sans-serif; font-variant-numeric:tabular-nums; }
.trm-trend { display:inline-flex; align-items:center; min-height:25px; padding:0 9px; color:#2f6248; background:#e3f0e7; border-radius:999px; font-size:9px; font-weight:750; }
.trm-trend.is-flat { color:#53665b; background:#e8eeea; }
.trm-current p { margin:9px 0 0; color:#607167; font-size:9px; }
.trm-summary dl { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); align-items:center; }
.trm-summary dl>div { min-width:0; padding:2px 14px; border-left:1px solid #d7e5dc; }
.trm-summary dl>div:first-child { border-left:0; }
.trm-summary dt { color:#607167; font-size:9px; font-weight:750; text-transform:uppercase; }
.trm-summary dd { margin:5px 0 0; color:#214b34; font:700 clamp(14px,1.35vw,19px) 'Space Grotesk',sans-serif; font-variant-numeric:tabular-nums; white-space:nowrap; }
.trm-history-grid { display:grid; grid-template-columns:1fr; gap:14px; margin-top:14px; }
.trm-chart-wrap,.trm-daily-review { min-width:0; background:#fbfdfb; border:1px solid #dfe9e2; border-radius:13px; }
.trm-chart-wrap { padding:10px 12px 4px; }
.trm-chart,.management-board .trm-chart { display:block; width:100%; height:auto; min-height:210px; overflow:visible; }
.trm-chart line { stroke:#dce8df; stroke-width:1; stroke-dasharray:4 4; }
.trm-chart text { fill:#617368; font:10px 'Manrope',sans-serif; }
.trm-chart .trm-chart-area { stroke:none; }
.trm-chart .trm-chart-line { fill:none; stroke:#1f7a4e; stroke-width:3; stroke-linecap:round; stroke-linejoin:round; }
.trm-chart circle { fill:#fff; stroke:#176b45; stroke-width:4; }
.trm-daily-review { overflow:hidden; }
.trm-daily-review>header { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:13px 15px; background:#f3f8f4; border-bottom:1px solid #dfe9e2; }
.trm-daily-review>header strong { display:block; color:#244936; font-size:12px; }
.trm-daily-review>header small { display:block; margin-top:3px; color:#65766c; font-size:9px; }
.trm-daily-review>header button { min-height:32px; flex:none; }
.trm-table-wrap { max-height:330px; overflow:auto; }
.trm-table-wrap table { width:100%; min-width:0; table-layout:fixed; border-collapse:collapse; font-size:10px; }
.trm-table-wrap th:first-child { width:40%; }
.trm-table-wrap th:nth-child(2) { width:28%; }
.trm-table-wrap th:nth-child(3) { width:32%; }
.trm-table-wrap th { position:sticky; top:0; z-index:1; color:#3f5d4d; background:#edf5ef; font-size:8px; letter-spacing:.06em; text-align:left; text-transform:uppercase; }
.trm-table-wrap :is(th,td) { padding:10px 12px; border-bottom:1px solid #e5ede7; }
.trm-table-wrap :is(th,td):nth-child(n+2) { text-align:right; }
.trm-table-wrap td:nth-child(n+2) { color:#1b5c3b; font-weight:750; font-variant-numeric:tabular-nums; }
.trm-table-wrap td.is-flat { color:#65766c; font-weight:650; }
.trm-pagination { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:11px 15px; color:#5b7063; background:#f8fbf9; border-top:1px solid #e3ece6; font-size:9px; }
.trm-pagination>div { display:flex; align-items:center; gap:9px; }
.trm-pagination strong { color:#315642; font-size:9px; }
.trm-pagination button { min-height:30px; padding-inline:10px; }
.trm-pagination button:disabled { color:#7c8d83; background:#e8eeea; border-color:#dce5df; cursor:not-allowed; }
.trm-source-line { display:flex; justify-content:space-between; gap:16px; margin-top:11px; color:#65766c; font-size:9px; line-height:1.5; }
.trm-stale { color:#465f51; font-weight:800; }
.trm-history-panel>footer { margin-top:14px; padding:11px 13px; color:#52685b; background:#edf5ef; border-left:3px solid #4b9469; border-radius:4px 9px 9px 4px; font-size:10px; line-height:1.55; }
.trm-history-panel>footer strong { color:#24553a; }
.profile-modal-card.has-trm-history { width:min(940px,100%); }
.profile-modal-card .trm-history-panel { margin-top:17px; padding:17px; box-shadow:none; }
.trm-history-panel.is-compact .trm-history-head h2 { font-size:19px; }
.trm-history-panel.is-compact .trm-history-head p { font-size:10px; }
.trm-history-panel.is-compact .trm-periods { margin-block:14px 8px; }
.trm-history-panel.is-compact .trm-date-range { padding-top:8px; }
.trm-history-panel.is-compact .trm-summary { grid-template-columns:minmax(210px,.75fr) minmax(360px,1.25fr); }
.trm-history-panel.is-compact .trm-current,.trm-history-panel.is-compact .trm-summary dl { padding:13px 14px; }
.trm-history-panel.is-compact .trm-current>strong { font-size:27px; }
.trm-history-panel.is-compact .trm-summary dl>div { padding-inline:10px; }
.trm-history-panel.is-compact .trm-summary dd { font-size:16px; }
.trm-history-panel.is-compact .trm-chart { min-height:170px; }
.trm-history-panel.is-compact .trm-table-wrap { max-height:260px; }
.trm-history-panel.is-compact>footer { margin-bottom:0; }
@media(max-width:800px) {
  .trm-summary,.trm-history-panel.is-compact .trm-summary { grid-template-columns:1fr; }
  .trm-summary dl { min-width:0; }
  .trm-history-panel.is-compact .trm-table-wrap { max-height:220px; }
}
@media(max-width:600px) {
  .trm-history-panel { margin-top:17px; padding:16px 13px; border-radius:14px; }
  .trm-history-head { gap:12px; }
  .trm-history-head>a { padding-inline:9px; font-size:0; }
  .trm-history-head>a span { font-size:13px; }
  .trm-periods { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); }
  .trm-periods button { padding-inline:5px; }
  .trm-date-range { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:end; }
  .trm-date-range input { width:100%; }
  .trm-date-range button,.trm-date-range>small { grid-column:1/-1; margin-left:0; }
  .trm-summary dl { grid-template-columns:repeat(2,minmax(0,1fr)); gap:11px 0; }
  .trm-summary dl>div:nth-child(odd) { border-left:0; }
  .trm-current>strong { font-size:29px; }
  .trm-chart-wrap { padding-inline:2px; overflow:hidden; }
  .trm-chart,.management-board .trm-chart { width:100%; max-width:none; transform:none; }
  .trm-source-line { flex-direction:column; gap:3px; }
  .trm-daily-review>header,.trm-pagination { align-items:stretch; flex-direction:column; }
  .trm-daily-review>header button { width:100%; }
  .trm-pagination>div { justify-content:space-between; }
  .trm-table-wrap table { font-size:8.5px; }
  .trm-table-wrap :is(th,td) { padding:9px 6px; white-space:nowrap; }
  .profile-modal { padding:10px; }
  .profile-modal-card.has-trm-history { max-height:calc(100vh - 20px); padding:14px; }
}
@media(prefers-reduced-motion:reduce) { .trm-loading-dot { animation:none; } }

.mb-inventory-summary { margin:0 15px 16px; padding:18px; border:1px solid var(--ditar-border,#dbe5de); border-radius:12px; background:var(--ditar-surface,#fff); color:var(--ditar-text,#233b2d); }
.mb-inventory-summary>header { margin-bottom:14px; }
.mb-inventory-summary h4 { margin:0; font-size:15px; color:var(--ditar-text,#233b2d); }
.mb-inventory-summary header p,.mb-inventory-summary footer p,.mb-inventory-message { margin:5px 0; color:var(--ditar-muted,#596c60); font-size:12px; line-height:1.6; }
.mb-inventory-table-wrap { overflow:auto; max-width:100%; }
.mb-inventory-table-wrap:focus-visible { outline:2px solid var(--ditar-accent,#28633d); outline-offset:3px; }
.mb-inventory-table-wrap table { width:100%; min-width:480px; border-collapse:collapse; font-size:12px; }
.mb-inventory-table-wrap :is(th,td) { padding:11px 10px; border-bottom:1px solid var(--ditar-border,#dbe5de); text-align:left; }
.mb-inventory-table-wrap thead th { font-size:10px; text-transform:uppercase; letter-spacing:.04em; }
.mb-inventory-table-wrap :is(th,td):nth-child(n+3),.mb-inventory-table-wrap tfoot td { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.mb-inventory-table-wrap tbody th { min-width:180px; font-weight:500; }
.mb-inventory-table-wrap tbody th b { display:block; font-family:'Space Grotesk',sans-serif; }
.mb-inventory-table-wrap tbody th>span { display:inline-flex; margin-top:0; }
.mb-inventory-table-wrap tbody th small { display:block; margin-top:5px; color:var(--ditar-muted,#596c60); font-size:10px; font-weight:500; overflow-wrap:anywhere; }
.mb-inventory-table-wrap tr[data-inventory-line] { cursor:pointer; transition:background-color .16s ease,box-shadow .16s ease; }
.mb-inventory-table-wrap tr[data-inventory-line]:is(:hover,:focus-visible) { background:var(--ditar-surface-soft,#f1f7f2); box-shadow:inset 3px 0 0 var(--ditar-accent,#28633d); outline:0; }
.mb-inventory-table-wrap tfoot { font-weight:800; }
.mb-inventory-hint { display:block; margin-top:8px; color:var(--ditar-muted,#596c60); font-size:10px; line-height:1.5; }
.mb-inventory-summary footer { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-top:12px; }
.mb-inventory-summary .mb-button { flex-shrink:0; min-height:40px; color:var(--ditar-accent,#28633d); background:var(--ditar-surface,#fff); border:1px solid var(--ditar-border,#dbe5de); }
.mb-detail .mb-inventory-summary { margin:16px 0; }
@media(max-width:600px) {
  .mb-inventory-summary { padding:13px; margin:0 10px 12px; }
  .mb-inventory-summary footer { flex-direction:column; align-items:stretch; gap:8px; }
  .mb-inventory-table-wrap table { min-width:0; }
  .mb-inventory-table-wrap thead { display:none; }
  .mb-inventory-table-wrap :is(tbody,tfoot) { display:block; }
  .mb-inventory-table-wrap tr { display:grid; grid-template-columns:1fr auto minmax(90px,1.2fr); border-bottom:1px solid var(--ditar-border,#dbe5de); padding:9px 0; }
  .mb-inventory-table-wrap :is(th,td) { border:0; padding:5px 3px; }
  .mb-inventory-table-wrap tbody th { grid-column:1/-1; min-width:0; }
  .mb-inventory-table-wrap td[data-label]::before { content:attr(data-label); display:block; margin-bottom:4px; color:var(--ditar-muted,#596c60); font-size:10px; font-weight:500; }
  .mb-inventory-table-wrap tfoot th { grid-column:1/3; }
}

/* Ayer es una referencia neutra; Hoy y la diferencia expresan la variación diaria. */
.mb-metric-card[data-comparison="pending"] { --mb-comparison-ink:#c5d3dc; --mb-comparison-bg:#172b33; --mb-comparison-bar:#9aaebd; }
.mb-metric-card[data-comparison="good"] { --mb-comparison-ink:#a7ebbd; --mb-comparison-bg:#143923; --mb-comparison-bar:#81dca0; }
.mb-metric-card[data-comparison="attention"] { --mb-comparison-ink:#ffb5af; --mb-comparison-bg:#402220; --mb-comparison-bar:#f18d84; }
.mb-metric-card[data-comparison="warning"] { --mb-comparison-ink:#f8d88a; --mb-comparison-bg:#382e18; --mb-comparison-bar:#e7bf61; }
.mb-metric-card[data-comparison] .mb-metric-today { color:var(--mb-comparison-ink); text-shadow:none; }
.mb-metric-card[data-comparison] .mb-metric-values > .is-previous { background:#172b33; border-color:#9aaebd; }
.mb-metric-card[data-comparison] .mb-metric-values .is-previous :is(small,b) { color:#c5d3dc; }
.mb-metric-card[data-comparison] .mb-metric-bar-row:not(.is-today) :is(small,b) { color:#c5d3dc; }
.mb-metric-card[data-comparison] .mb-metric-bar-row:not(.is-today) u { background:#9aaebd; box-shadow:none; }
.mb-metric-card[data-comparison] .mb-metric-bar-row.is-today :is(small,b) { color:var(--mb-comparison-ink); }
.mb-metric-card[data-comparison] .mb-metric-bar-row.is-today u { background:var(--mb-comparison-bar); box-shadow:none; }
.mb-metric-card[data-comparison] .mb-metric-values > :is(.is-current,.is-delta) { background:var(--mb-comparison-bg); border-color:var(--mb-comparison-bar); }
.mb-metric-card[data-comparison] .mb-metric-values :is(.is-current,.is-delta) :is(small,b) { color:var(--mb-comparison-ink); }
.mb-metric-card[data-comparison] .mb-metric-card-head em[data-status] { color:var(--mb-comparison-ink); background:var(--mb-comparison-bg); border-color:var(--mb-comparison-bar); }
.mb-metric-values .is-delta small { white-space:normal; }
.mb-finished-card { display: flex; flex-direction: column; align-self: stretch; padding: 12px; border-top-width: 4px; }
.mb-finished-card:hover { transform: none; }
.mb-finished-main { display: block; width: 100%; min-width: 0; padding: 0; margin: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.mb-finished-main:focus-visible { outline: 2px solid #70c59d; outline-offset: 3px; border-radius: 6px; }
.mb-finished-card .mb-metric-today { font-size: clamp(21px,1.8vw,28px); margin: 7px 0; line-height: 1.12; }
.mb-finished-card .mb-metric-card-head { margin-bottom: 6px; }
.mb-finished-versus { margin-top: auto; padding: 8px 0; }
.mb-finished-versus .mb-metric-bars { margin: 0; }
.mb-finished-comparison { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 8px 0; border-top: 1px solid rgba(111,195,157,.25); }
.mb-finished-comparison small { display: block; font-size: 10px; opacity: .8; }
.mb-finished-comparison b { display: block; font-size: 11px; overflow-wrap: anywhere; text-align: right; }
.mb-finished-comparison b[data-status] { color: var(--mb-comparison-ink); }
.mb-product-disclosure { margin: 0 0 6px; font-size: 11px; }
.mb-product-disclosure > summary { padding: 7px 0; cursor: pointer; font-weight: 600; }
.mb-product-disclosure > summary:focus-visible { outline: 2px solid #70c59d; outline-offset: 2px; }
.mb-finished-goods-group .mb-metric-card-grid:has(.mb-product-disclosure[open]) .mb-finished-card { align-self: start; }

/* El semáforo califica la comparación; la cifra principal conserva el tono de la tarjeta. */
.mb-comparison-pill { display:inline-flex; align-items:center; justify-content:center; gap:3px; flex:0 0 auto; padding:6px 9px; border:1px solid #7b988880; border-radius:999px; background:#253b31; color:#eef6e9; font-size:11px; font-style:normal; font-weight:900; white-space:nowrap; }
.mb-comparison-pill[data-signal="green"] { border-color:#72d69a; background:#175b35; color:#f1fff4; }
.mb-comparison-pill[data-signal="orange"] { border-color:#d9b75c; background:#694c1a; color:#fff4d3; }
.mb-comparison-pill[data-signal="red"] { border-color:#ec8b7e; background:#8a302b; color:#fff1ed; }
.mb-comparison-pill[data-signal="gray"] { border-color:#81968e; background:#33433e; color:#eef2ef; }
.mb-metric-card-head .mb-comparison-pill { max-width:none; overflow:visible; text-overflow:clip; }
.mb-metric-bar-row { grid-template-columns:minmax(0,1.5fr) minmax(45px,1fr) minmax(86px,auto); }
.mb-metric-bar-row:not(.is-today) u { background:#83968b; box-shadow:none; }
.mb-metric-bar-row small,.mb-metric-values small { white-space:normal; overflow-wrap:anywhere; }
.mb-metric-values .is-delta { background:#182e25; }
.mb-metric-values .is-delta b { color:#eef6e9; }
.mb-metric-values .mb-comparison-note { margin:5px 0 0; font-weight:600; line-height:1.4; }
.mb-planned-orders-measure .mb-comparison-pill { justify-self:start; }
.mb-planned-orders-measure .mb-metric-values { margin-top:2px; }
.mb-monthly-trend { display:block; margin:0 0 12px; }
.mb-monthly-trend small { display:block; margin-bottom:4px; color:#c3d5c5; font-size:9px; line-height:1.35; }
.mb-monthly-trend svg { display:block; width:100%; height:38px; overflow:visible; }
.mb-monthly-trend polyline { fill:none; stroke:#86d9a0; stroke-width:2; vector-effect:non-scaling-stroke; }
.mb-monthly-trend circle { fill:#143923; stroke:#f0d28a; stroke-width:2; vector-effect:non-scaling-stroke; }
.mb-finished-details { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 8px 0 0; border: 0; border-top: 1px solid rgba(111,195,157,.2); background: transparent; color: inherit; font: inherit; font-size: 11px; text-align: left; cursor: pointer; }
.mb-finished-details:focus-visible { outline: 2px solid #70c59d; outline-offset: 3px; }
.mb-finished-main { margin-bottom: 10px; }
.mb-product-summary { padding: 12px; border: 1px solid rgba(111,195,157,.25); border-radius: 14px; background: rgba(22,90,62,.08); min-width: 0; }
.mb-product-summary h5 { margin: 0 0 10px; font-size: 13px; }
.mb-product-summary p { margin: 10px 0 0; font-size: 11px; line-height: 1.5; }
.mb-product-list { display: grid; gap: 6px; }
.mb-product-list button { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 9px; border: 1px solid rgba(111,195,157,.25); border-radius: 8px; background: transparent; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.mb-product-list button:hover { background: rgba(111,195,157,.12); }
.mb-product-list button:focus-visible { outline: 2px solid #70c59d; outline-offset: 2px; }
.mb-product-list small { display: block; font-size: 10px; }
.mb-product-list b { font-size: 12px; overflow-wrap: anywhere; text-align: right; }
.mb-product-summary.is-compact { padding: 7px 0; margin: 0 0 7px; border: 0; border-top: 1px solid rgba(111,195,157,.3); border-radius: 0; background: transparent; }
.mb-product-summary.is-compact h5 { font-size: 11px; margin-bottom: 5px; }
.mb-product-summary.is-compact .mb-product-list { gap: 0; }
.mb-product-summary.is-compact .mb-product-list button { min-height: 30px; padding: 5px 0; border: 0; border-radius: 0; font-size: 11px; }
.mb-product-summary.is-compact .mb-product-list button > span { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px; }
.mb-product-summary.is-compact .mb-product-list small { display: inline; font-size: 9px; opacity: .75; }
.mb-product-summary.is-compact .mb-product-list b { font-size: 11px; }
.mb-product-summary.is-compact p { margin-top: 6px; font-size: 10px; }

/* El detalle de personas conserva sus tres columnas visibles en móvil. */
.mb-detail-table.mb-absence-table { min-width:0; table-layout:fixed; white-space:normal; }
.mb-absence-table :is(th,td) { overflow-wrap:anywhere; font-size:11px; }
.mb-absence-table :is(th,td):first-child { width:25%; }
.mb-absence-table :is(th,td):nth-child(2) { width:48%; }
.mb-absence-table :is(th,td):last-child { width:27%; }
.mb-absence-card { min-width:0; display:flex; flex-direction:column; gap:12px; }
.mb-absence-month { display:grid; gap:8px; width:100%; padding:16px; border:1px solid #81a88d; border-radius:16px; background:#eef5ef; color:#264c36; text-align:left; font:inherit; cursor:pointer; }
.mb-absence-month > span { font-size:12px; line-height:1.5; }
.mb-absence-month > strong { font-size:28px; }
.mb-absence-month strong small { font-size:13px; font-weight:500; }
.mb-absence-month > b { font-size:12px; margin-top:4px; }
.mb-absence-month:focus-visible, .mb-absence-calendar button:focus-visible { outline:3px solid #407d55; outline-offset:3px; }
.mb-absence-totals { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:18px 0; }
.mb-absence-totals span { padding:10px; background:#eef5ef; color:#264c36; border:1px solid #b6cebd; border-radius:10px; font-size:12px; overflow-wrap:anywhere; }
.mb-absence-totals strong { display:block; margin-top:8px; font-size:24px; }
.mb-detail-table.mb-absence-calendar { min-width:0; table-layout:fixed; white-space:normal; }
.mb-absence-calendar :is(th,td) { width:25%; padding:8px 5px; font-size:12px; overflow-wrap:anywhere; text-align:center; }
.mb-absence-calendar thead th { font-size:10px; letter-spacing:0; }
.mb-absence-calendar button { min-height:36px; padding:6px 10px; border:1px solid #9eb8a6; border-radius:7px; color:inherit; background:transparent; font:inherit; text-decoration:underline; cursor:pointer; }
.mb-absence-calendar [data-day-status="open"] { opacity:.65; }
