:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #edf1f4;
  color: #122033;
  --navy: #101b2d;
  --teal: #0c9b89;
  --teal-dark: #087467;
  --line: #d9e0e7;
  --muted: #68788b;
  --orange: #f3a712;
  --red: #dc3e4e;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; }
button, input { font: inherit; }

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto minmax(240px, 1fr);
  align-items: center;
  min-height: 60px;
  padding: 0 clamp(18px, 4vw, 64px);
  background: rgba(16, 27, 45, .97);
  color: white;
  box-shadow: 0 8px 25px rgba(14, 25, 40, .18);
}

.brand { display: flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; }
.brand-mark { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; background: var(--teal); font-size: 13px; font-weight: 900; letter-spacing: -.04em; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; }
.brand small { margin-top: 2px; color: #9eadbc; font-size: 11px; }
nav { display: flex; align-self: stretch; gap: 6px; }
.nav-link { display: grid; position: relative; place-items: center; padding: 0 16px; color: #c4ced9; font-size: 13px; font-weight: 750; text-decoration: none; }
.nav-link.active, .nav-link:hover { color: white; }
.nav-link.active::after { position: absolute; right: 12px; bottom: 0; left: 12px; height: 3px; border-radius: 3px 3px 0 0; background: #3dd6bd; content: ""; }
.nav-link.muted { opacity: .45; cursor: default; }
.live-indicator { display: grid; grid-template-columns: auto auto; justify-self: end; column-gap: 8px; align-items: center; }
.live-indicator > span { width: 9px; height: 9px; border-radius: 50%; background: #39d98a; box-shadow: 0 0 0 5px rgba(57,217,138,.13); }
.live-indicator b { font-size: 12px; }
.live-indicator small { grid-column: 2; color: #8797a8; font-size: 10px; }

main { width: min(1540px, calc(100% - 40px)); margin: 0 auto 70px; }
.section-heading, .analytics-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; padding: 24px 0 14px; }
.section-heading h1, .analytics-heading h2 { margin: 0; font-size: clamp(29px, 3.3vw, 42px); letter-spacing: -.035em; }
.section-heading p:not(.eyebrow) { margin: 8px 0 0; color: var(--muted); }
.eyebrow { margin: 0 0 5px; color: var(--teal-dark); font-size: 11px; font-weight: 850; letter-spacing: .15em; text-transform: uppercase; }
.button { min-height: 42px; padding: 0 18px; border: 0; border-radius: 9px; background: var(--teal); color: white; cursor: pointer; font-size: 13px; font-weight: 800; }
.button:hover { background: var(--teal-dark); }
.button.secondary { border: 1px solid #c8d1da; background: white; color: #25384d; }
.button:disabled { opacity: .55; cursor: progress; }

.notice { margin-bottom: 14px; padding: 12px 16px; border: 1px solid #d7e0e8; border-radius: 9px; background: #e7edf2; color: #526477; font-size: 13px; }
.notice.ok { border-color: #b8e4d8; background: #e5f6f1; color: #146c5e; }
.notice.error { border-color: #f0c4c9; background: #fff0f1; color: #9e2f3b; }

.fleet { display: grid; gap: 18px; }
.machine-card { overflow: hidden; border: 1px solid #d6dee6; border-top: 4px solid #8090a0; border-radius: 16px; background: white; box-shadow: 0 12px 35px rgba(23, 40, 61, .08); }
.machine-card.status-printing { border-top-color: var(--teal); }
.machine-card.status-waiting { border-top-color: var(--orange); }
.machine-card.status-error { border-top-color: var(--red); }
.machine-card.status-offline { border-top-color: #536170; }
.machine-card.status-idle { border-top-color: #9fce57; }
.machine-card-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px 8px; }
.machine-card-head h2 { margin: 3px 0 0; font-size: 25px; }
.area-label { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.state-wrap { display: grid; justify-items: end; gap: 5px; }
.state-wrap small { color: var(--muted); font-size: 11px; }
.state-pill { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; background: #edf1f4; font-size: 12px; font-weight: 850; }
.state-pill i { width: 9px; height: 9px; border-radius: 50%; background: #778697; }
.status-printing .state-pill { background: #dcefe9; color: #075e52; }
.status-printing .state-pill i { background: #087467; box-shadow: 0 0 0 4px rgba(8,116,103,.14); }
.status-waiting .state-pill { background: #fff1cf; color: #855b00; }
.status-waiting .state-pill i { background: var(--orange); }
.status-sleeping .state-pill { background: #e2eef7; color: #315f7a; }
.status-sleeping .state-pill i { background: #5c9fc5; box-shadow: 0 0 0 4px rgba(92,159,197,.14); }
.status-error .state-pill { background: #fde4e7; color: #9d2936; }
.status-error .state-pill i { background: var(--red); }
.status-offline .state-pill { background: #e4e7ea; color: #45525f; }
.status-idle .state-pill { background: #edf8d9; color: #50751d; }
.status-idle .state-pill i { background: #9fce57; box-shadow: 0 0 0 4px rgba(159,206,87,.18); }

.machine-layout { display: grid; grid-template-columns: minmax(260px, .9fr) minmax(360px, 1.3fr) minmax(210px, .65fr); min-height: 260px; padding: 8px 24px 20px; }
.machine-figure { display: grid; align-content: center; justify-items: center; min-width: 0; border-right: 1px solid var(--line); }
.printer-svg { width: min(100%, 320px); height: auto; filter: drop-shadow(0 9px 8px rgba(18,32,51,.08)); }
.iridesse-machine-image { display: block; width: min(100%, 360px); height: auto; filter: drop-shadow(0 9px 8px rgba(18,32,51,.08)); }
.dtf-machine-image { display: block; width: min(100%, 390px); height: auto; filter: drop-shadow(0 9px 8px rgba(18,32,51,.1)); }
.equipment-machine-image { display: block; width: 154px; max-width: 94%; height: auto; filter: drop-shadow(0 7px 7px rgba(0,0,0,.2)); }
.machine-light { fill: #7c8a98; }
.machine-light.printing { fill: #087467; filter: drop-shadow(0 0 5px #087467); }
.machine-light.waiting { fill: #f3a712; }
.machine-light.error { fill: #ef4d5d; filter: drop-shadow(0 0 5px #ef4d5d); }
.machine-light.idle { fill: #a9d85f; filter: drop-shadow(0 0 4px #a9d85f); }
.machine-light.sleeping { fill: #5c9fc5; }
.machine-figure p { margin: 2px 10px 0; color: var(--muted); font-size: 12px; text-align: center; }
.output-block { display: grid; align-content: center; padding: 10px clamp(24px, 4vw, 56px); }
.metric-label { color: var(--muted); font-size: 12px; font-weight: 750; }
.hero-number { display: flex; gap: 9px; align-items: baseline; margin: 2px 0 19px; }
.hero-number strong { font-size: clamp(46px, 5.5vw, 78px); line-height: .98; letter-spacing: -.055em; }
.hero-number span { color: var(--teal-dark); font-size: 19px; font-weight: 850; }
.progress-caption { display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 11px; }
.progress-caption b { color: #26394e; }
.progress-track { height: 10px; margin: 8px 0 10px; overflow: hidden; border-radius: 999px; background: #e8edf1; }
.progress-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #0d9987, #3ad5bd); }
.benchmark-row { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 10px; }
.benchmark-row b { display: block; margin-top: 2px; color: #2b3c50; font-size: 12px; }
.load-block { display: grid; align-content: center; justify-items: center; border-left: 1px solid var(--line); }
.load-ring { display: grid; width: 152px; height: 152px; place-items: center; border-radius: 50%; background: conic-gradient(#087467 var(--load), #e7ecf0 0); }
.load-ring::before { grid-area: 1/1; width: 118px; height: 118px; border-radius: 50%; background: white; content: ""; }
.load-ring > div { z-index: 1; grid-area: 1/1; text-align: center; }
.load-ring strong, .load-ring span { display: block; }
.load-ring strong { font-size: 31px; letter-spacing: -.04em; }
.load-ring span { color: var(--muted); font-size: 11px; }
.load-block p { margin: 12px 0 0; color: #3e5064; font-size: 12px; line-height: 1.5; text-align: center; }
.load-block p span { color: var(--muted); }

.machine-details { display: grid; grid-template-columns: 1fr 1.25fr 1.25fr; border-top: 1px solid var(--line); }
.machine-details > div { padding: 16px 22px; }
.machine-details > div + div { border-left: 1px solid var(--line); }
.quick-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quick-metrics span, .current-job > span, .ink-panel > span { display: block; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.quick-metrics b { display: block; margin-top: 4px; font-size: 16px; }
.current-job { display: grid; gap: 3px; }
.current-job b { overflow: hidden; margin-top: 2px; text-overflow: ellipsis; white-space: nowrap; }
.current-job small { color: var(--muted); }
.current-job.active { box-shadow: inset 3px 0 var(--teal); }
.ink-panel > div { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px; }
.ink-cell { display: grid; grid-template-columns: auto auto; justify-content: start; align-items: center; column-gap: 5px; }
.ink-cell b { grid-column: 1/-1; margin-top: 2px; font-size: 11px; }
.ink-dot { width: 8px; height: 8px; border-radius: 50%; }
.ink-dot.cyan { background: #00aeca; }.ink-dot.magenta { background: #d62d78; }.ink-dot.yellow { background: #f0c800; }.ink-dot.black { background: #17212d; }
.event-line { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 12px; min-height: 52px; padding: 9px 22px; border-top: 1px solid var(--line); background: #f7f9fa; }
.event-line > span { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.event-line b { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.event-line time { color: var(--muted); font-size: 11px; }
.event-line button { padding: 7px 10px; border: 1px solid #ccd4dc; border-radius: 7px; background: white; color: #526274; font-size: 11px; font-weight: 750; }
.event-line.event-error { background: #fff5f5; }
.event-line.event-error > span { color: #b23744; }

.analytics-heading { margin-top: 28px; padding-top: 48px; border-top: 1px solid #cfd8e0; }
.analytics-heading h2 { font-size: 32px; }
.period { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
label { display: grid; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 750; }
input { min-height: 42px; padding: 8px 11px; border: 1px solid #c7d1da; border-radius: 9px; background: white; color: #1d3045; }
.summary-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.summary-cards article { padding: 17px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.summary-cards span { display: block; min-height: 30px; color: var(--muted); font-size: 11px; font-weight: 750; }
.summary-cards strong { display: block; margin-top: 6px; font-size: clamp(20px, 2.4vw, 31px); letter-spacing: -.03em; }
.panel { margin-top: 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: white; }
.panel-title { display: flex; justify-content: space-between; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.panel-title h2 { margin: 0; font-size: 18px; }
.panel-title span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { position: sticky; top: 60px; padding: 11px 12px; background: #e8f4f2; color: #15675d; text-align: left; white-space: nowrap; }
td { max-width: 420px; padding: 10px 12px; overflow: hidden; border-top: 1px solid #edf0f3; text-overflow: ellipsis; white-space: nowrap; }
tbody tr:hover { background: #f7fafb; }

@media (max-width: 1120px) {
  .topbar { grid-template-columns: 1fr auto; }
  .topbar nav { display: none; }
  .machine-layout { grid-template-columns: .9fr 1.1fr; }
  .load-block { grid-column: 1/-1; grid-template-columns: auto 1fr; gap: 20px; justify-content: center; padding: 20px; border-top: 1px solid var(--line); border-left: 0; }
  .load-ring { width: 116px; height: 116px; }
  .load-ring::before { width: 88px; height: 88px; }
  .machine-details { grid-template-columns: 1fr 1fr; }
  .ink-panel { grid-column: 1/-1; border-top: 1px solid var(--line); border-left: 0 !important; }
}

@media (max-width: 760px) {
  main { width: min(100% - 20px, 1540px); }
  .topbar { min-height: 56px; padding: 0 14px; }
  .brand small, .live-indicator b { display: none; }
  .section-heading, .analytics-heading { align-items: start; flex-direction: column; }
  .machine-card-head { padding: 16px 16px 4px; }
  .machine-layout { grid-template-columns: 1fr; padding: 4px 16px 16px; }
  .machine-figure { border-right: 0; border-bottom: 1px solid var(--line); }
  .printer-svg { max-width: 270px; }
  .output-block { padding: 24px 8px; }
  .load-block { grid-template-columns: 1fr; }
  .machine-details { grid-template-columns: 1fr; }
  .machine-details > div + div, .ink-panel { border-top: 1px solid var(--line); border-left: 0; }
  .event-line { grid-template-columns: 1fr auto; }
  .event-line > span, .event-line b { grid-column: 1/-1; }
  .event-line button { display: none; }
  .summary-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 440px) {
  .summary-cards { grid-template-columns: 1fr; }
  .quick-metrics { grid-template-columns: 1fr 1fr; }
  .ink-panel > div { grid-template-columns: repeat(2, 1fr); }
  .benchmark-row { flex-wrap: wrap; }
}

/* Operational dashboard */
.dashboard-toolbar { display: flex; align-items: center; gap: 12px; padding: 12px 0 10px; }
.now-actions { display: flex; flex: 0 0 auto; gap: 10px; align-items: center; }
.day-navigation { display: flex; min-width: 0; flex: 1; gap: 10px; align-items: stretch; margin: 0; }
.day-strip { display: flex; min-width: 0; flex: 1; gap: 5px; overflow-x: auto; padding: 1px 1px 5px; scrollbar-width: thin; }
.day-option { display: grid; min-width: 63px; gap: 1px; padding: 6px 8px; border: 1px solid #ccd5dd; border-radius: 8px; background: #f7f9fa; color: #536578; cursor: pointer; text-align: left; }
.day-option span { font-size: 9px; font-weight: 750; text-transform: capitalize; }
.day-option b { color: #21364b; font-size: 11px; white-space: nowrap; }
.day-option:hover { border-color: #75bbae; background: #edf7f4; }
.day-option.active { border-color: var(--teal); background: var(--teal); color: #dff8f3; box-shadow: 0 6px 16px rgba(12,155,137,.18); }
.day-option.active b { color: white; }
.day-calendar { min-width: 132px; padding: 5px 8px; border: 1px solid #ccd5dd; border-radius: 8px; background: white; font-size: 9px; }
.day-calendar input { min-height: 28px; padding: 2px 4px; border: 0; font-size: 11px; }
.dashboard-compact .day-navigation { display: none; }
.dashboard-compact .dashboard-toolbar { justify-content: flex-end; }
.view-switch { display: flex; padding: 3px; border: 1px solid #c8d1da; border-radius: 10px; background: #e4e9ed; }
.view-switch button { min-height: 34px; padding: 0 13px; border: 0; border-radius: 7px; background: transparent; color: #5c6d7f; cursor: pointer; font-size: 12px; font-weight: 800; }
.view-switch button.active { background: white; color: #173047; box-shadow: 0 2px 8px rgba(18,32,51,.09); }
#configure-dashboard.active { border-color: var(--teal); background: #e4f5f1; color: var(--teal-dark); }
.dashboard-settings[hidden] { display: none; }
.dashboard-settings { margin: 0 0 16px; overflow: hidden; border: 1px solid #9bc9bf; border-radius: 12px; background: #f7fbfa; box-shadow: 0 10px 30px rgba(18,32,51,.08); }
.dashboard-settings-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 14px 16px; border-bottom: 1px solid #d5e7e3; }
.dashboard-settings-head h2 { margin: 0; font-size: 17px; }.dashboard-settings-head p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.dashboard-settings-actions { display: flex; align-items: center; gap: 8px; }.dashboard-settings-actions .button { min-height: 34px; padding: 0 13px; }
#dashboard-settings-status { min-width: 80px; color: var(--muted); font-size: 11px; text-align: right; }
#dashboard-settings-status.saved { color: var(--teal-dark); }#dashboard-settings-status.error { color: var(--red); }
.dashboard-machine-settings { display: grid; grid-template-columns: repeat(auto-fit,minmax(270px,1fr)); gap: 8px; padding: 10px; }
.dashboard-machine-setting { display: grid; grid-template-columns: auto minmax(100px,1fr) auto auto; align-items: center; gap: 10px; min-width: 0; padding: 9px 10px; border: 1px solid #d7e3e0; border-radius: 9px; background: white; cursor: grab; }
.dashboard-machine-setting.dragging, .dashboard-configuring .machine-card.dragging { opacity: .42; }
.dashboard-machine-setting.is-hidden { background: #eef1f3; color: #657484; }
.dashboard-machine-setting b, .dashboard-machine-setting small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.dashboard-machine-setting b { font-size: 12px; }.dashboard-machine-setting small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.dashboard-drag-handle { color: #7a8a99; font-size: 20px; letter-spacing: -5px; line-height: 1; }
.dashboard-machine-visible { display: flex; align-items: center; gap: 5px; color: #405469; font-size: 10px; white-space: nowrap; }.dashboard-machine-visible input { width: 16px; min-height: 16px; margin: 0; accent-color: var(--teal); }
.dashboard-order-buttons { display: flex; gap: 3px; }.dashboard-order-buttons button { width: 27px; height: 27px; border: 1px solid #c9d4dc; border-radius: 6px; background: white; color: #405469; cursor: pointer; }.dashboard-order-buttons button:disabled { opacity: .3; cursor: default; }
.dashboard-configuring .machine-card { position: relative; cursor: grab !important; outline: 2px dashed rgba(12,155,137,.45); outline-offset: -7px; }
.dashboard-configuring .machine-card::after { position: absolute; z-index: 5; top: 9px; right: 12px; padding: 4px 7px; border-radius: 6px; background: #087467; color: white; content: "Перетащите"; font-size: 9px; font-weight: 800; pointer-events: none; }
.dashboard-empty { grid-column: 1/-1; display: grid; gap: 4px; padding: 40px; border: 1px dashed #b8c4ce; border-radius: 14px; background: rgba(255,255,255,.55); color: #32485d; text-align: center; }.dashboard-empty span { color: var(--muted); font-size: 12px; }
.machine-open { color: var(--teal-dark); font-size: 12px; font-weight: 800; text-decoration: none; }
.machine-figure { position: relative; }
.machine-figure .state-wrap { position: absolute; right: 12px; bottom: 13px; left: 12px; align-items: center; justify-items: center; }
.machine-figure .state-wrap small { max-width: 100%; overflow: hidden; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.today-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.today-metrics div { padding: 11px 12px; border: 1px solid #e1e7eb; border-radius: 9px; background: #f8fafb; }
.today-metrics span, .event-summary > span { display: block; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.today-metrics b { display: block; margin-top: 4px; font-size: 15px; }
.timeline-block { padding: 16px 24px 12px; border-top: 1px solid var(--line); }
.timeline-heading { display: flex; justify-content: space-between; margin-bottom: 8px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.timeline-track { position: relative; height: 18px; overflow: hidden; border-radius: 5px; background: #e7ebee; }
.timeline-segment { position: absolute; top: 0; bottom: 0; min-width: 2px; border-right: 1px solid rgba(255,255,255,.35); }
.timeline-segment.printing { background: #087467; }.timeline-segment.idle { background: #b7df78; }.timeline-segment.waiting { background: #f2ac25; }.timeline-segment.sleeping { background: #74a9c8; }.timeline-segment.warning { background: #b785d7; }.timeline-segment.offline { background: #7b8793; }
.timeline-job { position: absolute; z-index: 2; right: auto; bottom: 0; height: 4px; min-width: 10px; border-radius: 2px; background: rgba(18,32,51,.72); cursor: help; }
.timeline-job:hover { z-index: 5; height: 7px; background: #122033; box-shadow: 0 0 0 2px rgba(255,255,255,.75); }
.timeline-empty { display: grid; height: 100%; place-items: center; color: #778697; font-size: 10px; font-style: normal; }
.timeline-event { position: absolute; z-index: 3; top: 0; width: 3px; height: 100%; transform: translateX(-1px); background: #dc3e4e; box-shadow: 0 0 0 1px rgba(255,255,255,.75); }
.timeline-event.warning { background: #7e54c8; }
.timeline-event.production { background: #168c7e; }
.timeline-hours { position: relative; height: 13px; margin-top: 4px; color: #8795a4; font-size: 9px; }
.timeline-hours span { position: absolute; transform: translateX(-50%); }.timeline-hours span:nth-child(1) { left: 0; transform: none; }.timeline-hours span:nth-child(2) { left: 11.57%; }.timeline-hours span:nth-child(3) { left: 44.63%; }.timeline-hours span:nth-child(4) { left: 77.69%; }.timeline-hours span:nth-child(5) { left: 94.21%; }.timeline-hours span:nth-child(6) { right: 0; transform: none; }
.timeline-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); gap: 7px; margin-top: 9px; }
.timeline-legend span { position: relative; min-width: 0; padding: 8px 8px 8px 22px; border: 1px solid #e1e7eb; border-radius: 8px; background: #f8fafb; }
.timeline-legend span::before { position: absolute; top: 10px; left: 8px; width: 7px; height: 18px; border-radius: 3px; background: #999; content: ""; }
.timeline-legend b, .timeline-legend small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timeline-legend b { color: #22364a; font-size: 12px; }.timeline-legend small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.timeline-legend .printing::before { background: #087467; }.timeline-legend .idle::before { background: #b7df78; }.timeline-legend .waiting::before { background: #f2ac25; }.timeline-legend .sleeping::before { background: #74a9c8; }.timeline-legend .state-warning::before { background: #b785d7; }.timeline-legend .error::before { background: #dc3e4e; }.timeline-legend .offline::before { background: #7b8793; }.timeline-legend .warning::before { background: #7e54c8; }.timeline-legend .no-data::before { background: repeating-linear-gradient(135deg,#c4ccd3 0 2px,#eef1f3 2px 4px); }
.timeline-legend .production-event::before { background: #168c7e; }
.timeline-legend .shift-start::before { background: #4a90a4; }.timeline-legend .shift-end::before { background: #31566c; }
.machine-details { grid-template-columns: 1fr 1.6fr; }
.event-summary { display: grid; min-width: 0; gap: 3px; }
.event-summary { color: inherit; text-decoration: none; }
.event-summary b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-summary small { color: var(--muted); }
.show-jobs { display: grid; min-width: 0; gap: 3px; padding: 16px 22px; border: 0; border-left: 1px solid var(--line); background: white; color: inherit; cursor: pointer; text-align: left; }
.show-jobs:hover { background: #f2f8f6; }
.show-jobs span { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.show-jobs b { color: var(--teal-dark); }.show-jobs small { color: var(--muted); }
.today-jobs .panel-title { align-items: end; }
.today-jobs .notice { margin: 12px; }
.jobs-actions { display: flex; gap: 10px; align-items: end; }
.fleet .today-jobs { grid-column: 1/-1; margin-top: -10px; border-color: #afc8c2; box-shadow: 0 14px 35px rgba(23,40,61,.1); }
.machine-card.jobs-open { border-color: #7cb9ad; box-shadow: 0 12px 35px rgba(12,116,103,.13); }
.jobs-scroll { max-height: min(440px,55vh); overflow: auto; overscroll-behavior: contain; }
.today-jobs th { z-index: 2; top: 0; }

.fleet.view-compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.view-compact .machine-card { min-width: 0; cursor: zoom-in; user-select: none; }
.view-compact .machine-card-head { padding: 15px 17px 2px; }
.view-compact .machine-card-head h2 { font-size: 20px; }
.view-compact .machine-open { display: none; }
.view-compact .machine-layout { grid-template-columns: minmax(120px, 1.2fr) minmax(82px, .75fr) 76px; min-height: 150px; padding: 2px 12px 12px; }
.view-compact .machine-figure { min-height: 140px; }
.view-compact .printer-svg { width: 125px; }
.view-compact .iridesse-machine-image { width: 140px; max-width: 100%; }
.view-compact .dtf-machine-image { width: 150px; max-width: 100%; }
.view-compact .machine-figure { border-right: 0; }
.view-compact .machine-figure .state-wrap { right: 0; bottom: 2px; left: 0; }
.view-compact .machine-figure .state-wrap small { display: none; }
.view-compact .state-pill { padding: 6px 9px; font-size: 10px; }
.view-compact .output-block { display: grid; align-content: center; min-width: 0; padding: 0 8px; border-left: 1px solid var(--line); }
.view-compact .metric-label { font-size: 9px; line-height: 1.2; }
.view-compact .hero-number { gap: 5px; margin: 4px 0 0; }
.view-compact .hero-number strong { overflow: hidden; font-size: clamp(25px, 2.3vw, 33px); text-overflow: ellipsis; }
.view-compact .hero-number span { font-size: 12px; }
.view-compact .today-metrics { display: none; }
.view-compact .load-block { display: grid; align-content: center; padding-left: 8px; border-left: 1px solid var(--line); }
.view-compact .load-ring { width: 68px; height: 68px; }
.view-compact .load-ring::before { width: 52px; height: 52px; }
.view-compact .load-ring strong { font-size: 18px; }
.view-compact .load-ring span { font-size: 8px; line-height: 1.1; }
.view-compact .load-block p { display: none; }
.view-compact .timeline-heading, .view-compact .timeline-track, .view-compact .timeline-hours { display: none; }
.view-compact .timeline-legend { grid-template-columns: repeat(3, minmax(0,1fr)); }
.view-compact .timeline-legend span { padding: 6px 5px 6px 17px; }.view-compact .timeline-legend span::before { top: 7px; left: 6px; height: 16px; }.view-compact .timeline-legend b { font-size: 10px; }
.view-compact .machine-details { display: none; }
.view-compact .show-jobs { display: none; }
.view-compact .timeline-block { padding: 9px 16px 13px; }

@media (max-width: 1250px) {
  .fleet.view-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .dashboard-toolbar { flex-wrap: wrap; }
  .day-navigation { order: 2; flex-basis: 100%; }
  .now-actions { margin-left: auto; }
}
@media (max-width: 760px) {
  .now-actions { width: 100%; justify-content: space-between; }
  .now-actions { flex-wrap: wrap; }
  .dashboard-settings-head { align-items: stretch; flex-direction: column; }
  .dashboard-settings-actions { justify-content: space-between; }
  .dashboard-machine-settings { grid-template-columns: 1fr; }
  .day-navigation { align-items: stretch; flex-direction: column; }
  .day-calendar { width: 100%; }
  .fleet.view-compact { grid-template-columns: 1fr; }
  .view-compact .machine-layout { grid-template-columns: minmax(90px, 1fr) minmax(72px, .7fr) 64px; padding-right: 8px; padding-left: 8px; }
  .view-compact .printer-svg { width: 110px; }
  .view-compact .iridesse-machine-image { width: 120px; }
  .view-compact .dtf-machine-image { width: 128px; }
  .view-compact .load-ring { width: 60px; height: 60px; }
  .view-compact .load-ring::before { width: 46px; height: 46px; }
  .view-compact .machine-figure .state-wrap { position: absolute; margin-bottom: 0; }
  .machine-figure .state-wrap { position: static; margin-bottom: 12px; }
  .timeline-block { padding-right: 16px; padding-left: 16px; }
  .timeline-legend { flex-wrap: wrap; }
  .today-metrics { grid-template-columns: 1fr 1fr; }
  .jobs-actions { width: 100%; justify-content: space-between; }
}
