:root {
  --ink: #02283a;
  --ink-2: #0b3a4d;
  --lime: #adf000;
  --lime-dark: #5d8500;
  --paper: #f5f6f1;
  --surface: #ffffff;
  --line: #dfe5df;
  --muted: #69777c;
  --danger: #c54835;
  --amber: #c17a12;
  --radius: 14px;
  --sidebar: 220px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Avenir Next", "Segoe UI Variable", "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
a { color: inherit; }
::selection { background: var(--lime); color: var(--ink); }
* { scrollbar-color: #9caaa7 transparent; scrollbar-width: thin; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; background: var(--ink); color: white; border-radius: 8px; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid #7eae00; outline-offset: 3px; }

.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar); z-index: 10;
  display: flex; flex-direction: column; padding: 28px 18px 20px;
  background: var(--ink); color: #c9d5d8;
}
.logo-wrap { display: block; width: 126px; margin: 0 10px 40px; padding: 7px 10px; background: #fff; border-radius: 10px; }
.logo-wrap img { display: block; width: 100%; height: auto; }
.sidebar nav { display: grid; gap: 7px; }
.sidebar nav a {
  min-height: 46px; display: flex; align-items: center; gap: 12px;
  padding: 0 13px; border-radius: 9px; text-decoration: none; font-weight: 650;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.sidebar nav a:hover { background: #0d3b4d; color: #fff; transform: translateX(2px); }
.sidebar nav a.active { background: var(--lime); color: var(--ink); }
.nav-icon { width: 24px; height: 24px; padding: 4px; border: 1px solid currentColor; border-radius: 7px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-bottom { margin-top: auto; display: grid; gap: 14px; padding: 15px 10px 0; border-top: 1px solid #234654; }
.connection { display: flex; align-items: center; gap: 9px; font-size: 12px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #f4a73b; box-shadow: 0 0 0 4px #f4a73b20; }
.status-dot.ok { background: var(--lime); box-shadow: 0 0 0 4px #adf00020; }
.logout { border: 0; background: transparent; color: #9fb2b8; padding: 6px 0; cursor: pointer; text-align: left; }
.logout:hover { color: white; }

.main-content { margin-left: var(--sidebar); padding: 38px clamp(24px, 4vw, 58px) 28px; max-width: 1640px; }
.topbar { display: flex; justify-content: space-between; gap: 30px; align-items: flex-end; margin-bottom: 28px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 4px; font-size: clamp(29px, 3vw, 43px); letter-spacing: -.04em; line-height: 1.08; }
h2 { margin-bottom: 0; font-size: 19px; letter-spacing: -.02em; }
.subhead, .muted { color: var(--muted); }
.topbar-meta { display: grid; justify-items: end; gap: 8px; }
.health-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 11px; border-radius: 999px; font-size: 12px; font-weight: 750; }
.health-pill span { width: 7px; height: 7px; border-radius: 50%; }
.health-pill.healthy { background: #e7f7c3; color: #3e6200; }
.health-pill.healthy span { background: #73a500; }
.health-pill.warning { background: #fff0d6; color: #915d0d; }
.health-pill.warning span { background: var(--amber); }
.generated { font-size: 11px; color: var(--muted); }

.attention-strip {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  margin-bottom: 16px; padding: 14px 18px; background: #e7ecea; border: 1px solid #d6dedb; border-radius: 11px;
}
.attention-strip > div { display: flex; align-items: center; gap: 12px; }
.attention-strip strong, .attention-strip small { display: block; }
.attention-strip small { color: var(--muted); font-size: 12px; }
.pulse { width: 11px; height: 11px; flex: 0 0 auto; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 6px #c17a121a; }
.pulse.ok { background: #7eae00; box-shadow: 0 0 0 6px #7eae001a; }
.attention-strip dl { display: flex; gap: clamp(15px, 3vw, 36px); margin: 0; }
.attention-strip dl div { min-width: 90px; }
.attention-strip dt { color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
.attention-strip dd { margin: 2px 0 0; font: 650 12px ui-monospace, SFMono-Regular, Menlo, monospace; }

.metrics { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.metric, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.metric { min-height: 154px; padding: 20px 21px; display: flex; flex-direction: column; justify-content: space-between; }
.metric-primary { background: var(--ink); color: white; border-color: var(--ink); }
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12px; font-weight: 700; }
.metric-primary .metric-top, .metric-primary small { color: #b7c8ce; }
.metric strong { font-size: clamp(27px, 3vw, 39px); letter-spacing: -.04em; line-height: 1; }
.metric strong em { color: var(--muted); font-size: 16px; font-style: normal; font-weight: 650; letter-spacing: 0; }
.metric small { color: var(--muted); }
.money { font-variant-numeric: tabular-nums; }
.trend { padding: 4px 7px; border-radius: 6px; font: 700 11px ui-monospace, monospace; }
.trend.up { background: #dff2ac; color: #436400; }
.trend.down { background: #fae3df; color: #9b3324; }
.count-badge, .panel-count { padding: 4px 8px; color: var(--ink); background: #eef1ec; border-radius: 6px; font-size: 11px; font-weight: 800; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(330px, .9fr); gap: 14px; margin-bottom: 14px; }
.panel { padding: 21px; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.panel-head a { display: inline-flex; align-items: center; gap: 5px; color: #52666d; text-decoration: none; font-size: 12px; font-weight: 750; }
.panel-head a svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.panel-head a:hover { color: var(--lime-dark); }
.chart-summary { display: flex; align-items: baseline; gap: 9px; margin: 4px 0 20px; }
.chart-summary strong { font-size: 27px; letter-spacing: -.04em; }
.chart-summary span { color: var(--muted); font-size: 11px; }
.bars { height: 174px; padding-top: 5px; }
.bars svg { display: block; width: 100%; height: 100%; overflow: visible; }
.bars rect { fill: #d3ded9; }
.bars rect:last-of-type { fill: var(--lime); }
.bars text { fill: var(--muted); font: 9px ui-monospace, monospace; text-anchor: middle; }
.chart-panel { padding-bottom: 38px; }

.priority-list, .stock-list, .jobs-list { margin: 0; padding: 0; list-style: none; }
.priority-list li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 11px; align-items: center; padding: 11px 0; border-top: 1px solid #edf0ec; }
.priority-list li:first-child { border-top: 0; padding-top: 0; }
.priority-rank { color: #9aa7aa; font: 650 10px ui-monospace, monospace; }
.priority-list strong, .priority-list small, .stock-list strong, .stock-list small, .jobs-list strong, .jobs-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.priority-list strong, .stock-list strong, .jobs-list strong { font-size: 13px; }
.priority-list small, .stock-list small, .jobs-list small { color: var(--muted); font-size: 10px; margin-top: 2px; }
.priority-money { font: 700 12px ui-monospace, monospace; }

.team-panel { margin-bottom: 14px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 700px; }
th { padding: 9px 12px; color: var(--muted); border-bottom: 1px solid var(--line); text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
td { padding: 12px; border-bottom: 1px solid #edf0ec; font-size: 12px; }
tbody tr:last-child td { border-bottom: 0; }
td:first-child { display: flex; align-items: center; gap: 10px; }
.avatar { width: 28px; height: 28px; display: grid; place-items: center; flex: 0 0 auto; background: var(--ink); color: var(--lime); border-radius: 8px; font-weight: 800; }
.number { font: 700 12px ui-monospace, monospace; }
.progress { width: 82px; height: 5px; margin-right: 7px; vertical-align: middle; border: 0; overflow: hidden; background: #e7ebe7; border-radius: 99px; }
.progress::-webkit-progress-bar { background: #e7ebe7; border-radius: 99px; }
.progress::-webkit-progress-value { background: var(--lime-dark); border-radius: 99px; }
.progress::-moz-progress-bar { background: var(--lime-dark); border-radius: 99px; }
td small { color: var(--muted); }

.lower-grid { grid-template-columns: 1fr 1fr; }
.stock-list li, .jobs-list li { min-height: 48px; display: flex; align-items: center; gap: 11px; padding: 9px 0; border-top: 1px solid #edf0ec; }
.stock-list li:first-child, .jobs-list li:first-child { border-top: 0; }
.stock-list li > div, .jobs-list li > div { min-width: 0; flex: 1; }
.stock { flex: 0 0 auto; padding: 5px 8px; background: #fff0d6; color: #875608; border-radius: 6px; font: 750 10px ui-monospace, monospace; }
.stock.zero { background: #fae3df; color: #a43829; }
.job-icon { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; font-weight: 900; }
.job-icon svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.job-icon.ok { color: #466900; background: #e4f3bd; }
.job-icon.atrasado { color: #9f3527; background: #fae3df; }
.job-state { font-size: 10px; font-weight: 800; }
.job-state.ok { color: var(--lime-dark); }
.job-state.atrasado { color: var(--danger); }
.empty { color: var(--muted); padding: 24px !important; text-align: center; }
.dashboard-footer { display: flex; justify-content: space-between; gap: 20px; padding: 13px 4px 0; color: #879397; font-size: 10px; }

.fatal-state { max-width: 620px; margin: 15vh auto; padding: 34px; background: #fff7f5; border: 1px solid #efc8c0; border-radius: var(--radius); }
.fatal-state a { font-weight: 800; }

/* Superficies de gestión */
.management-main { width: calc(100% - var(--sidebar)); }
.management-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 28px; margin-bottom: 26px; }
.management-header h1 { margin-bottom: 7px; }
.management-header p { max-width: 720px; margin-bottom: 0; color: var(--muted); }
.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 15px; border: 1px solid transparent; border-radius: 9px; text-decoration: none; font-size: 13px; font-weight: 800; cursor: pointer; transition: background .18s ease, border-color .18s ease, transform .18s ease; }
.button:active { transform: translateY(1px); }
.button.primary { background: var(--ink); color: white; }
.button.primary:hover { background: var(--ink-2); }
.button.secondary { background: white; color: var(--ink); border-color: #cbd5d0; }
.button.secondary:hover { border-color: #8b9e97; background: #f8faf6; }
.button.small { min-height: 34px; padding: 0 11px; font-size: 11px; }
.action-message { margin: -8px 0 16px; padding: 11px 14px; border-radius: 9px; font-size: 13px; font-weight: 700; }
.action-message.success { color: #3e6200; background: #e9f7c9; border: 1px solid #c7e782; }
.action-message.error { color: #943827; background: #fbe9e5; border: 1px solid #efc4bc; }

.decision-strip { display: grid; grid-template-columns: repeat(3, minmax(140px, .7fr)) minmax(260px, 1.4fr); align-items: center; margin-bottom: 14px; padding: 18px 21px; background: var(--ink); color: white; border-radius: var(--radius); }
.decision-strip > div { padding-right: 20px; border-right: 1px solid #31515d; }
.decision-strip > div + div { padding-left: 20px; }
.decision-strip strong, .decision-strip span { display: block; }
.decision-strip strong { font-size: 25px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.decision-strip span { color: #b7c8ce; font-size: 11px; }
.decision-strip p { margin: 0; padding-left: 24px; color: #d5e0e3; font-size: 12px; }

.filter-panel { margin-bottom: 14px; padding-block: 17px; }
.filter-form { display: grid; grid-template-columns: minmax(230px, 1.6fr) minmax(150px, 1fr) 120px 140px 140px auto; gap: 11px; align-items: end; }
.inventory-filter { grid-template-columns: minmax(280px, 1fr) minmax(190px, .5fr) auto; }
.field, .inline-decision label { min-width: 0; display: grid; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 750; }
.field input, .field select, .inline-decision input, .inline-decision select { width: 100%; height: 42px; padding: 0 11px; color: var(--ink); background: #fbfcf8; border: 1px solid #cbd5d0; border-radius: 8px; }
.field input:focus, .field select:focus, .inline-decision input:focus, .inline-decision select:focus { border-color: var(--lime-dark); outline: 3px solid #adf00035; }
.data-panel { margin-bottom: 14px; padding-bottom: 14px; }
.management-table { min-width: 980px; }
.management-table td { vertical-align: middle; }
.management-table td:first-child { display: table-cell; }
.entity strong, .entity small, .cell-note { display: block; }
.mobile-case { display: none !important; }
.entity small, .cell-note { max-width: 230px; margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.age { color: #7a581e; font-weight: 800; font-variant-numeric: tabular-nums; }
.age.old { color: var(--danger); }
.state-text { font-size: 11px; font-weight: 800; }
.state-text.positive { color: var(--lime-dark); }
.state-text.neutral { color: var(--muted); }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 14px; padding: 16px 12px 2px; color: var(--muted); font-size: 12px; }

.source-contract { display: grid; grid-template-columns: 1fr 58px 1fr; align-items: center; margin-bottom: 14px; padding: 18px 21px; background: #e7ecea; border: 1px solid #d6dedb; border-radius: 11px; }
.source-contract div { display: grid; gap: 2px; }
.source-contract span { color: var(--muted); font-size: 12px; }
.source-contract svg { width: 40px; margin: auto; fill: none; stroke: var(--lime-dark); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.inventory-table { min-width: 900px; }
.inline-decision { position: relative; }
.inline-decision > summary { width: max-content; color: var(--ink-2); font-size: 11px; font-weight: 800; cursor: pointer; text-decoration: underline; text-decoration-color: #9bad9f; text-underline-offset: 3px; }
.inline-decision[open] > summary { margin-bottom: 10px; }
.inline-decision form { width: 310px; display: grid; gap: 10px; padding: 13px; background: var(--paper); border: 1px solid #cbd5d0; border-radius: 10px; }

.evidence-note { margin-bottom: 14px; padding: 15px 18px; color: #5d4a1d; background: #fff5df; border: 1px solid #ecd6a9; border-radius: 11px; }
.evidence-note strong { display: block; margin-bottom: 3px; }
.evidence-note p { margin: 0; font-size: 12px; }
.reports-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(340px, .75fr); gap: 14px; }
.artifact-list, .trace-list { margin: 0; padding: 0; list-style: none; }
.artifact-list { max-height: 720px; overflow-y: auto; padding-right: 4px; }
.artifact-list li { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 61px; padding: 9px 0; border-top: 1px solid #edf0ec; }
.artifact-list li:first-child { border-top: 0; }
.artifact-list strong, .artifact-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.artifact-list strong { font-size: 12px; }
.artifact-list small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.file-mark { width: 42px; height: 42px; display: grid; place-items: center; color: var(--ink); background: #e7f7c3; border-radius: 8px; font: 800 9px ui-monospace, monospace; }
.trace-panel { align-self: start; }
.trace-list li { position: relative; display: grid; grid-template-columns: 18px 1fr; gap: 8px; padding-bottom: 18px; }
.trace-list li::before { content: ""; position: absolute; left: 5px; top: 12px; bottom: 0; width: 1px; background: var(--line); }
.trace-list li:last-child::before { display: none; }
.trace-node { position: relative; z-index: 1; width: 11px; height: 11px; margin-top: 4px; background: var(--lime); border: 3px solid var(--ink); border-radius: 50%; }
.trace-list strong, .trace-list small { display: block; }
.trace-list small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.trace-list p { margin: 5px 0 0; font-size: 11px; }
.danger-text { color: var(--danger); }

.intelligence-flow { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 14px; overflow: hidden; background: var(--ink); color: white; border-radius: var(--radius); }
.intelligence-flow > div { position: relative; min-height: 132px; padding: 20px; border-right: 1px solid #31515d; }
.intelligence-flow > div:last-child { border-right: 0; }
.intelligence-flow span { width: 27px; height: 27px; display: grid; place-items: center; margin-bottom: 16px; color: var(--ink); background: var(--lime); border-radius: 7px; font-weight: 900; }
.intelligence-flow strong, .intelligence-flow small { display: block; }
.intelligence-flow small { margin-top: 5px; color: #b7c8ce; font-size: 11px; }
.intelligence-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .65fr); gap: 14px; margin-bottom: 14px; }
.import-panel p { max-width: 70ch; color: var(--muted); }
.schema-box { margin: 16px 0; padding: 13px; overflow-x: auto; color: #dce8eb; background: var(--ink); border-radius: 9px; }
.schema-box code { font-size: 11px; white-space: nowrap; }
.import-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.import-status { min-height: 20px; margin-top: 12px; color: var(--muted); font-size: 12px; }
.import-status.success { color: var(--lime-dark); font-weight: 700; }
.import-status.error { color: var(--danger); font-weight: 700; }
.guardrail-panel ul { margin: 16px 0 0; padding-left: 19px; }
.guardrail-panel li { margin-top: 9px; color: var(--muted); font-size: 12px; }
.priority { padding: 5px 7px; border-radius: 6px; font-size: 10px; font-weight: 850; }
.priority.alta { color: #953325; background: #fae3df; }
.priority.media { color: #86580f; background: #fff0d6; }
.priority.baja { color: #496a05; background: #e7f7c3; }
.insight-summary { max-width: 360px; white-space: normal; }

/* Acceso */
.login-page { min-height: 100vh; background: var(--ink); }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 1.15fr) minmax(390px, .85fr); }
.login-story { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(36px, 6vw, 86px); color: white; }
.login-story::after { content: ""; position: absolute; width: 500px; height: 500px; right: -230px; bottom: -250px; border: 80px solid var(--lime); border-radius: 50%; opacity: .96; }
.login-logo { width: 145px; padding: 8px 12px; background: #fff; border-radius: 11px; }
.login-story h1 { max-width: 720px; font-size: clamp(38px, 5.3vw, 72px); line-height: .98; letter-spacing: -.055em; }
.login-copy { max-width: 590px; margin: 24px 0 0; color: #b9cbd1; font-size: clamp(16px, 1.5vw, 21px); }
.login-foot { position: relative; z-index: 1; margin: 0; color: #88a1aa; font-size: 11px; }
.login-panel { display: grid; place-items: center; padding: 30px; background: #f4f5ef; }
.login-form { width: min(100%, 410px); padding: clamp(26px, 5vw, 48px); background: white; border: 1px solid var(--line); border-radius: 16px; }
.login-heading { display: flex; align-items: center; gap: 13px; margin-bottom: 25px; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; background: var(--lime); color: var(--ink); border-radius: 11px; font-size: 29px; font-weight: 900; line-height: 1; }
.login-heading h2 { font-size: 27px; }
.login-form > .muted { margin-bottom: 25px; }
.login-form label { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 800; }
.password-field { position: relative; }
.password-field input { width: 100%; height: 50px; padding: 0 52px 0 14px; color: var(--ink); background: #fbfcf8; border: 1px solid #cbd5d0; border-radius: 9px; }
.password-field input:focus { border-color: var(--lime-dark); }
.reveal { position: absolute; inset: 5px 5px 5px auto; width: 40px; border: 0; background: transparent; color: #718086; border-radius: 7px; cursor: pointer; }
.reveal svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.form-error { margin-top: 10px; padding: 9px 11px; color: #943827; background: #fbe9e5; border-radius: 7px; font-size: 12px; }
.primary-button { width: 100%; height: 50px; display: flex; justify-content: space-between; align-items: center; margin-top: 16px; padding: 0 17px; border: 0; background: var(--ink); color: white; border-radius: 9px; font-weight: 800; cursor: pointer; transition: background .18s ease, transform .18s ease; }
.primary-button:hover { background: var(--ink-2); transform: translateY(-1px); }
.primary-button svg { width: 21px; fill: none; stroke: var(--lime); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 980px) {
  :root { --sidebar: 74px; }
  .sidebar { padding-inline: 12px; }
  .logo-wrap { width: 50px; height: 45px; margin-inline: 0; padding: 7px; overflow: hidden; }
  .logo-wrap img { width: 110px; max-width: none; }
  .sidebar nav a { justify-content: center; padding: 0; }
  .sidebar nav a span:last-child, .connection span:last-child, .logout { display: none; }
  .sidebar-bottom { align-items: center; justify-items: center; padding-inline: 0; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric-primary { grid-column: span 2; }
  .content-grid { grid-template-columns: 1fr; }
  .filter-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field-search { grid-column: span 2; }
  .decision-strip { grid-template-columns: repeat(3, 1fr); }
  .decision-strip p { grid-column: 1 / -1; padding: 15px 0 0; }
  .reports-layout, .intelligence-layout { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  :root { --sidebar: 0px; }
  .sidebar { position: fixed; inset: auto 0 0; width: 100%; height: 67px; padding: 8px 10px; flex-direction: row; }
  .logo-wrap, .sidebar-bottom { display: none; }
  .sidebar nav { width: 100%; grid-template-columns: repeat(5, 1fr); gap: 3px; }
  .sidebar nav .nav-optional { display: none; }
  .sidebar nav a { min-height: 50px; flex-direction: column; gap: 1px; padding: 4px 2px; font-size: 9px; }
  .sidebar nav a span:last-child { display: block; }
  .nav-icon { width: 23px; height: 23px; border: 0; }
  .main-content { margin-left: 0; padding: 24px 15px 92px; }
  .management-main { width: auto; }
  .topbar { display: block; }
  .topbar-meta { margin-top: 16px; justify-items: start; }
  .attention-strip { align-items: flex-start; flex-direction: column; }
  .attention-strip dl { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .attention-strip dl div { min-width: 0; }
  .attention-strip dd { font-size: 9px; }
  .metrics { grid-template-columns: 1fr; }
  .metric-primary { grid-column: auto; }
  .panel, .metric { padding: 17px; }
  .priority-list li { grid-template-columns: 23px minmax(0, 1fr); }
  .priority-money { grid-column: 2; }
  .dashboard-footer { display: block; }
  .dashboard-footer span { display: block; margin-top: 4px; }
  .management-header { display: block; }
  .management-header .button { margin-top: 16px; }
  .decision-strip { grid-template-columns: 1fr; }
  .decision-strip > div { padding: 11px 0; border-right: 0; border-bottom: 1px solid #31515d; }
  .decision-strip > div + div { padding-left: 0; }
  .decision-strip p { grid-column: auto; }
  .filter-form, .inventory-filter { grid-template-columns: 1fr; }
  .field-search { grid-column: auto; }
  .source-contract { grid-template-columns: 1fr; gap: 11px; }
  .source-contract svg { transform: rotate(90deg); }
  .intelligence-flow { grid-template-columns: 1fr 1fr; }
  .intelligence-flow > div:nth-child(2) { border-right: 0; }
  .intelligence-flow > div { border-bottom: 1px solid #31515d; }
  .artifact-list li { grid-template-columns: 38px minmax(0, 1fr); }
  .artifact-list .button { grid-column: 2; justify-self: start; }
  .cartera-table { min-width: 100%; table-layout: fixed; }
  .cartera-table th:nth-child(n+3), .cartera-table td:nth-child(n+3) { display: none; }
  .cartera-table th:first-child { width: 72%; }
  .cartera-table th:nth-child(2), .cartera-table td:nth-child(2) { width: 28%; text-align: right; }
  .cartera-table .mobile-case { display: block !important; color: var(--danger); font-weight: 700; }
  .login-shell { grid-template-columns: 1fr; }
  .login-story { min-height: 39vh; padding: 28px 24px; }
  .login-story h1 { font-size: 38px; margin-top: 35px; }
  .login-copy { display: none; }
  .login-logo { width: 108px; }
  .login-panel { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
