/* Operations-first visual system: color marks actions and state, not decoration. */
:root {
  --bg: #ffffff;
  --surface-strong: #f5f7f5;
  --ink: #202a24;
  --muted: #647269;
  --line: #dfe5e0;
  --brand: #3b7f23;
  --brand-strong: #2b611a;
  --accent: #287c9e;
  --shadow: none;
  font-family: "Segoe UI", Arial, sans-serif;
}
body { background: #fff; }
.btn { border-radius: 5px; font-size: 13px; font-weight: 600; }
.btn, .btn.primary { box-shadow: none; }
.btn:hover { transform: none; }
.btn.primary { background: var(--brand); }
.btn.primary:hover { background: var(--brand-strong); }
.btn.ghost { border-color: #cbd5cd; }
.btn svg { width: 17px; height: 17px; }
.btn:active { transform: translateY(1px); }
html[data-device="desktop"] .shell { grid-template-columns: 222px minmax(0, 1fr); }
html[data-device="desktop"] .sidebar { background: #232c26; border-right: 0; padding: 30px 16px 20px; box-shadow: inset 0 5px #5ca52d; }
html[data-device="desktop"] .side-head { border-bottom: 1px solid #ffffff1f; padding: 0 2px 26px; gap: 10px; }
html[data-device="desktop"] .side-head .brand-mark { width: 40px; height: 40px; background: transparent; border: 1px solid #81927f; color: #b3d99d; border-radius: 4px; }
html[data-device="desktop"] .side-head .brand-mark svg { width: 29px; height: 29px; }
html[data-device="desktop"] .side-head strong { color: #fafcf9; font-size: 13px; }
html[data-device="desktop"] .side-head span:not(.brand-mark) { color: #aab9af; font-size: 11px; }
html[data-device="desktop"] .nav { margin-top: 26px; gap: 5px; }
html[data-device="desktop"] .nav::before { content: "OPERACIÓN"; color: #a8b4ab; font-size: 10px; font-weight: 650; padding: 0 10px 14px; }
html[data-device="desktop"] .nav button { color: #bdc8bf; font-size: 13px; font-weight: 500; min-height: 45px; border-radius: 4px; padding: 11px 12px; }
html[data-device="desktop"] .nav button.active { background: #426e31; color: #fff; box-shadow: inset 3px 0 #a7da75; }
html[data-device="desktop"] .nav button:hover { background: #344838; color: #fff; }
html[data-device="desktop"] .nav button[data-view="assets"] { margin-top: 22px; border-top: 1px solid #ffffff20; padding-top: 18px; min-height: 54px; }
html[data-device="desktop"] .nav button[data-view="assets"].active { border-top-color: transparent; }
html[data-device="desktop"] .user-box { color: #f3f7f0; border-top-color: #ffffff20; }
html[data-device="desktop"] .user-box small { color: #a4b2a7; }
html[data-device="desktop"] .user-row .btn { background: transparent; color: #d5dfd7; border-color: #78847a; }
html[data-device="desktop"] .profile-avatar { border-radius: 4px; color: #d5ecc8; background: #3e5541; }
.main { background: #fff; padding-left: 38px; padding-right: 38px; }
.workspace-strip { min-height: 60px; margin-bottom: 25px; font-size: 10px; color: #68756d; }
.workspace-strip svg { color: #4d952b; }
.eyebrow { font-weight: 650; color: #487e32; font-size: 10px; margin-bottom: 10px; }
.topbar { margin-bottom: 26px; }
.topbar h1 { font-size: 32px; font-weight: 650; }
.topbar p { color: #647269; margin-top: 9px; max-width: 670px; font-size: 13px; line-height: 1.6; }
.topbar .field select { border-radius: 5px; min-width: 210px; font-size: 13px; }
.quick-actions { padding-top: 18px; border-top: 1px solid #dfe5e0; }
.quick-actions > span { font-size: 13px; color: #526158; font-weight: 600; }
.quick-actions > span svg { width: 17px; height: 17px; }
.content { gap: 26px; animation: operation-enter .2s ease-out; }
.main[data-view="dashboard"] > .content > .stats-grid { padding: 8px 0 25px; gap: 0; border-bottom: 1px solid #dfe5e0; }
.main[data-view="dashboard"] > .content > .stats-grid .stat-card { min-height: 128px; border: 0; border-right: 1px solid #dfe5e0; border-radius: 0; background: transparent; padding: 5px 24px; box-shadow: none; }
.main[data-view="dashboard"] > .content > .stats-grid .stat-card:first-child { padding-left: 0; }
.main[data-view="dashboard"] > .content > .stats-grid .stat-card:last-child { border-right: 0; }
.main[data-view="dashboard"] > .content > .stats-grid .stat-symbol { display: none; }
.main[data-view="dashboard"] > .content > .stats-grid small { max-width: 100%; font-size: 12px; font-weight: 500; }
.main[data-view="dashboard"] > .content > .stats-grid strong { margin: 15px 0 10px; font-size: 35px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.main[data-view="dashboard"] > .content > .stats-grid .stat-card:first-child strong { color: #3b7f23; }
.main[data-view="dashboard"] > .content > .stats-grid .stat-card:last-child strong { color: #b43a40; }
.main[data-view="dashboard"] > .content > .stats-grid .stat-card > span:not(.stat-symbol) { font-size: 11px; line-height: 1.5; color: #647269; }
.ops-chart-band { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr); gap: 34px; padding: 0 0 26px; border-bottom: 1px solid #dfe5e0; }
.ops-performance { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr); gap: 34px; padding: 0 0 24px; border-bottom: 1px solid #dfe5e0; }
.ops-chart-band > .panel, .ops-performance > .panel { padding: 0; border: 0; }
.ops-chart-band > .distribution, .ops-performance > .availability { border-left: 1px solid #dfe5e0; padding-left: 30px; min-width: 0; }
.ops-chart-band h2, .ops-performance h2, .panel h2 { font-size: 16px; font-weight: 650; color: #26372b; }
.panel-head { min-height: 34px; margin-bottom: 20px; gap: 12px; }
.chart-period { display: inline-flex; border-bottom: 1px solid #cbd5cd; gap: 4px; }
.chart-period button { min-height: 34px; padding: 6px 10px; font-size: 11px; background: transparent; color: #5d6c63; border-bottom: 2px solid transparent; }
.chart-period button[aria-pressed="true"] { color: #32731f; border-bottom-color: #4c9c28; font-weight: 750; }
.chart-period button:hover { background: #f0f5ed; }
.chart-period button:focus-visible { outline: 2px solid #287c9e; outline-offset: 1px; }
.chart-summary { display: flex; align-items: center; gap: 11px; padding: 0 0 12px; }
.chart-summary > strong { font-size: 27px; font-weight: 600; color: #2d482f; font-variant-numeric: tabular-nums; }
.chart-summary > span { font-size: 10px; line-height: 1.5; color: #6b7970; }
.chart-summary > small { margin-left: auto; font-size: 10px; color: #69766e; }
.column-chart { height: 210px; padding: 10px 0 0; border-bottom: 0; background: repeating-linear-gradient(to top, transparent 0, transparent 49px, #e7ece8 49px, #e7ece8 50px); }
.chart-column { position: relative; padding-bottom: 32px; }
.chart-column > strong { min-height: 12px; font-size: 10px; color: #526258; font-weight: 650; }
.chart-column > span { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 70px; background: #fff; color: #5d6c62; font-size: 10px; min-height: 32px; padding-top: 12px; white-space: nowrap; }
.chart-column:first-child > span { left: 0; transform: none; text-align: left; }
.chart-column:last-child > span { left: auto; right: 0; transform: none; text-align: right; }
.column-fill { max-width: 39px; border-radius: 2px 2px 0 0; background: #4c9c28; animation-duration: .35s; }
.chart-column:nth-child(even) .column-fill { background: #93bc6c; }
.chart-axis-note { display: flex; justify-content: space-between; font-size: 10px; color: #708074; padding-top: 4px; }
.donut-layout { flex-direction: column; gap: 18px; }
.donut { width: 178px; height: 178px; }
.donut strong { font-size: 32px; font-weight: 600; font-variant-numeric: tabular-nums; }
.donut span { font-size: 11px; }
.chart-legend { display: grid; gap: 0; width: 100%; font-size: 12px; }
.chart-legend > div { min-height: 30px; border-bottom: 1px solid #edf0ec; }
.chart-legend > div:last-child { border-bottom: 0; }
.chart-legend strong { font-weight: 650; font-variant-numeric: tabular-nums; }
.legend-dot { width: 7px; height: 7px; border-radius: 2px; }
.badge { border-radius: 4px; font-size: 10px; font-weight: 600; background: #eef2ec; color: #4d6553; }
.bar-label { font-size: 12px; font-weight: 500; }
.bar-list { gap: 18px; }
.bar-track { border-radius: 2px; height: 7px; background: #e8ede6; }
.bar-fill { border-radius: 2px; background: #4c9c28; }
.availability-row { margin-top: 23px; }
.availability-track { height: 7px; border-radius: 2px; }
.availability-track > span { border-radius: 2px; }
.panel { border-color: #dfe5e0; }
.table-wrap { border-radius: 4px; border-color: #dfe5e0; }
th { background: #f5f7f4; color: #526358; font-size: 10px; font-weight: 650; }
td { padding-top: 15px; padding-bottom: 15px; font-size: 12px; font-variant-numeric: tabular-nums; }
tbody tr:hover { background: #f3f8ef; }
.asset-card, .maintenance-card { border-radius: 5px; box-shadow: none; }
.asset-card:hover, .maintenance-card:hover { border-color: #7b9e6c; }
.field label, .checklist-title { font-weight: 600; }
input, select, textarea { border-radius: 5px; border-color: #cbd5cd; }
input:focus, select:focus, textarea:focus { border-color: #4c922d; box-shadow: 0 0 0 3px #4c922d14; }
.check-item { border-radius: 5px; }
.check-item input { accent-color: #3b7f23; }
.battery-capture-field { border-radius: 5px; background: #fbfcfa; }
html[data-device="desktop"] .registration-section { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.registration-section span { width: 24px; height: 24px; border-radius: 4px; background: #eaf1e4; }
.registration-section h3 { font-size: 12px; }
.capture-mode { border-radius: 4px; }
.battery-controls { border-radius: 5px; background: #e9eee7; }
.capture-mode.selected { box-shadow: none; border: 1px solid #c8d6c4; }
.success { border-left: 3px solid #4c9c28; border-radius: 3px; }
.modal-card { border-radius: 6px; box-shadow: 0 12px 60px #17271e30; }
@keyframes operation-enter { from { opacity: .4; } to { opacity: 1; } }
@media (max-width: 1180px) {
  .ops-chart-band, .ops-performance { grid-template-columns: minmax(0, 1.4fr) minmax(230px, 1fr); gap: 22px; }
  .ops-chart-band > .distribution, .ops-performance > .availability { padding-left: 22px; }
  .main { padding-left: 26px; padding-right: 26px; }
  .main[data-view="dashboard"] > .content > .stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .main[data-view="dashboard"] > .content > .stats-grid .stat-card { padding-left: 14px; padding-right: 14px; }
  .main[data-view="dashboard"] > .content > .stats-grid strong { font-size: 29px; }
}
html[data-device="mobile"] .main { background: #fff; }
html[data-device="mobile"] .sidebar { background: #fff; backdrop-filter: none; box-shadow: inset 0 3px #4c9c28; }
html[data-device="mobile"] .mobile-bottom-nav { background: #fff; backdrop-filter: none; box-shadow: none; }
html[data-device="mobile"] .mobile-bottom-nav button { border-radius: 4px; }
html[data-device="mobile"] .mobile-bottom-nav button[aria-current="page"] { box-shadow: inset 0 2px #4c9c28; background: #f0f6eb; }
html[data-device="mobile"] .topbar h1 { font-size: 27px; }
html[data-device="mobile"] .topbar .field select { min-width: 0; }
html[data-device="mobile"] .main[data-view="dashboard"] > .content > .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 22px; padding-bottom: 23px; }
html[data-device="mobile"] .main[data-view="dashboard"] > .content > .stats-grid .stat-card { min-height: 115px; padding: 0 16px; }
html[data-device="mobile"] .main[data-view="dashboard"] > .content > .stats-grid .stat-card:nth-child(odd) { padding-left: 0; }
html[data-device="mobile"] .main[data-view="dashboard"] > .content > .stats-grid .stat-card:nth-child(even) { border-right: 0; }
html[data-device="mobile"] .main[data-view="dashboard"] > .content > .stats-grid strong { font-size: 30px; }
html[data-device="mobile"] .ops-chart-band, html[data-device="mobile"] .ops-performance { grid-template-columns: minmax(0, 1fr); gap: 26px; }
html[data-device="mobile"] .ops-chart-band > .distribution, html[data-device="mobile"] .ops-performance > .availability { padding-left: 0; padding-top: 24px; border-left: 0; border-top: 1px solid #dfe5e0; }
html[data-device="mobile"] .ops-chart-band > .panel, html[data-device="mobile"] .ops-performance > .panel { padding: 0; }
html[data-device="mobile"] .donut-layout { flex-direction: row; gap: 24px; }
html[data-device="mobile"] .donut { width: 142px; height: 142px; }
html[data-device="mobile"] .chart-legend { font-size: 11px; }
html[data-device="mobile"] .column-chart { height: 215px; }
html[data-device="mobile"] .chart-period button { min-height: 40px; padding: 7px 11px; }
html[data-device="mobile"] .quick-actions > div { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
html[data-device="mobile"] .quick-actions .btn { font-size: 11px; padding-left: 8px; padding-right: 8px; }
html[data-device="mobile"] form > .split-actions { background: #fffffff5; border-top: 1px solid #e1e7df; }
html[data-device="mobile"] .modal-card > .split-actions { background: #fff; }
html[data-device="mobile"] .scan-dialog { background: #f9fcf7; }
@media (max-width: 359px) {
  html[data-device="mobile"] .donut-layout { flex-direction: column; }
  html[data-device="mobile"] .quick-actions > div { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .content, .column-fill, .btn { animation: none; transition: none; }
}

/* Shared engineering charts keep a common zero origin and explicit units. */
.cycle-plot { margin: 0; min-width: 0; }
.engineering-chart { --plot-height: 200px; display: grid; grid-template-columns: 28px minmax(0, 1fr); grid-template-rows: var(--plot-height) 28px; padding-top: 8px; }
.engineering-y-axis { position: relative; grid-column: 1; grid-row: 1; height: var(--plot-height); }
.engineering-y-axis > span { position: absolute; right: 8px; transform: translateY(-50%); color: #627166; font-size: 10px; font-variant-numeric: tabular-nums; }
.engineering-plot { position: relative; grid-column: 2; grid-row: 1; height: var(--plot-height); border-left: 1px solid #cad6cd; border-bottom: 1px solid #cad6cd; }
.engineering-grid { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.engineering-grid > span { display: block; height: 0; width: 100%; border-top: 1px solid #e5ebe5; }
.engineering-plot .chart-columns { position: absolute; inset: 0; gap: var(--column-gap); height: 100%; padding: 0 4px; }
.engineering-plot .chart-column { display: flex; flex-direction: row; align-items: flex-end; justify-content: center; height: 100%; width: 100%; padding: 0; margin: 0; background: transparent; border: 0; border-radius: 2px; }
.engineering-plot .chart-column > .column-fill { position: static; display: block; min-height: 0; width: 78%; max-width: 39px; margin: 0 auto; padding: 0; transform: none; background: #4c9c28; border-radius: 2px 2px 0 0; }
.engineering-plot .chart-column:hover, .engineering-plot .chart-column:focus-visible { background: #3c801f12; }
.engineering-plot .chart-column:focus-visible { outline: 2px solid #287c9e; outline-offset: 1px; }
.engineering-plot .chart-column.is-inspected > .column-fill { background: #287c9e; }
.engineering-x-axis { display: grid; grid-column: 2; grid-row: 2; grid-template-columns: repeat(var(--chart-days), minmax(0, 1fr)); align-items: start; padding: 9px 4px 0; }
.engineering-x-axis span { font-size: 10px; color: #627166; white-space: nowrap; text-align: center; justify-self: center; }
.engineering-x-axis span:first-child { justify-self: start; }
.engineering-x-axis span:last-child { justify-self: end; }
.chart-axis-note { gap: 12px; flex-wrap: wrap; line-height: 1.5; }
.chart-detail { display: block; min-height: 36px; margin-top: 10px; padding: 10px 12px; background: #f1f6ed; color: #355829; font-size: 12px; line-height: 1.4; font-variant-numeric: tabular-nums; border-left: 2px solid #83aa65; }
.chart-data-table { margin-top: 10px; border-top: 1px solid #e0e7de; max-height: 300px; overflow-y: auto; }
.chart-data-table summary { min-height: 44px; padding: 13px 0; font-size: 12px; color: #4b6554; cursor: pointer; }
html[data-device] .chart-data-table table { display: table; width: 100%; min-width: 0; border-collapse: collapse; }
html[data-device] .chart-data-table thead { display: table-header-group; }
html[data-device] .chart-data-table tbody { display: table-row-group; }
html[data-device] .chart-data-table tr { display: table-row; padding: 0; margin: 0; border: 0; background: #fff; }
html[data-device] .chart-data-table th, html[data-device] .chart-data-table td { display: table-cell; padding: 10px 12px; font-size: 12px; }
html[data-device] .chart-data-table td::before { content: none; }
html[data-device] .chart-data-table th:last-child, html[data-device] .chart-data-table td:last-child { text-align: right; }
.chart-legend > div { display: grid; grid-template-columns: 8px minmax(0, 1fr) 26px 40px; column-gap: 8px; align-items: center; }
.chart-legend strong { text-align: right; margin: 0; }
.chart-legend small { text-align: right; color: #6c7a70; font-size: 11px; font-variant-numeric: tabular-nums; }
.change-review { margin-top: 14px; padding: 18px 0; border-top: 1px solid #cad8c7; border-bottom: 1px solid #cad8c7; }
.change-review h3 { margin: 0 0 16px; font-size: 14px; font-weight: 650; }
.change-route { display: grid; grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr); gap: 12px; align-items: center; }
.change-route > div { min-width: 0; }
.change-route small { color: #647469; display: block; font-size: 10px; }
.change-route strong { display: block; margin-top: 7px; color: #365e2b; font-size: 19px; font-weight: 650; overflow-wrap: anywhere; }
.change-route > span { color: #7d8d80; text-align: center; font-size: 21px; }
.change-review dl { display: grid; gap: 9px; margin: 16px 0 0; }
.change-review dl > div { display: grid; grid-template-columns: minmax(100px, .8fr) minmax(0, 1.2fr); gap: 12px; font-size: 12px; line-height: 1.5; }
.change-review dt { color: #6c7b70; }
.change-review dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.change-review > p { margin: 14px 0 0; font-size: 12px; color: #8b621d; }
.change-review[data-complete="true"] > p { color: #32731f; }
.battery-capture-field[data-capture-mode="scan"] > .battery-manual-input, .battery-capture-field[data-capture-mode="scan"] > select { display: none; }
.battery-capture-field[data-capture-mode="scan"] > .battery-match { display: block; padding: 14px; background: #e9f4e3; border-left: 3px solid #4c9c28; font-size: 15px; }
html[data-device="mobile"] .ops-chart-band, html[data-device="mobile"] .ops-performance { gap: 28px; }
html[data-device="mobile"] .ops-chart-band > .distribution { padding-top: 24px; }
html[data-device="mobile"] .donut-layout { display: grid; grid-template-columns: 132px minmax(0, 1fr); align-items: center; gap: 18px; }
html[data-device="mobile"] .donut { width: 132px; height: 132px; }
html[data-device="mobile"] .chart-legend > div { grid-template-columns: 7px minmax(0, 1fr) 22px 34px; column-gap: 5px; min-height: 38px; }
html[data-device="mobile"] .chart-legend { font-size: 11px; }
html[data-device="mobile"] .chart-legend small { font-size: 10px; }
html[data-device="mobile"] .engineering-chart { --plot-height: 210px; }
html[data-device="mobile"] .chart-summary { align-items: center; flex-wrap: wrap; row-gap: 8px; }
html[data-device="mobile"] .chart-summary > small { font-size: 11px; }
html[data-device="mobile"] .cycle-analysis .panel-head { flex-direction: column; align-items: stretch; }
html[data-device="mobile"] .chart-period { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
html[data-device="mobile"] .chart-period button { min-height: 44px; font-size: 13px; }
html[data-device="mobile"] .chart-detail { min-height: 44px; font-size: 13px; }
html[data-device="mobile"] .chart-data-table summary { min-height: 48px; font-size: 14px; }
html[data-device="mobile"] .change-review { padding-top: 20px; }
html[data-device="mobile"] .change-review h3 { font-size: 16px; }
html[data-device="mobile"] .change-route strong { font-size: 20px; }
html[data-device="mobile"] .change-review dl > div { font-size: 13px; }
html[data-device="mobile"] .change-review > p { font-size: 13px; }
@media (max-width: 420px) {
  html[data-device="mobile"] .donut-layout { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  html[data-device="mobile"] .donut { width: 164px; height: 164px; }
  html[data-device="mobile"] .chart-legend { width: 100%; font-size: 12px; }
}
html[data-device="mobile"][data-keyboard-open="true"] .mobile-bottom-nav { display: none; }
html[data-device="mobile"][data-keyboard-open="true"] form > .split-actions { bottom: 8px; }
