:root {
  color-scheme: light;
  --navy: #071a42;
  --text: #10244f;
  --muted: #61708f;
  --blue: #0b57e3;
  --blue-dark: #0644b4;
  --blue-soft: #edf4ff;
  --green: #148c39;
  --green-dark: #0b6b2a;
  --green-soft: #edf9f0;
  --red: #bd3434;
  --red-soft: #fff1f1;
  --amber: #a56800;
  --amber-soft: #fff7e3;
  --canvas: #f4f6fa;
  --surface: #ffffff;
  --line: #d8e0ec;
  --line-strong: #b8c5d9;
  --shadow: 0 16px 44px rgba(7, 26, 66, .1);
  --radius: 16px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  padding-bottom: 82px;
  overflow-x: hidden;
  color: var(--text);
  background: var(--canvas);
  font-family: "Segoe UI", Inter, system-ui, -apple-system, sans-serif;
  font-size: 17px;
}
button, input, select, textarea { font: inherit; }
button, input, select, textarea, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .46; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 3px solid #0b57e3;
  outline-offset: 3px;
}
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { display: block; }
.app-header svg, button svg, a svg, .landing-note svg, .field-schedule svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px clamp(18px, 2.4vw, 38px);
  background: rgba(255, 255, 255, .98);
  border-bottom: 1px solid var(--line);
}
.brand-button {
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  gap: 13px;
  padding: 3px 8px 3px 0;
  color: var(--navy);
  background: transparent;
  border: 0;
  text-align: left;
}
.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--blue);
  border-radius: 13px;
}
.brand-mark svg { width: 29px; height: 29px; }
.soceram-logo-frame {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #fff;
  border: 1px solid #dce3ed;
  box-shadow: 0 8px 20px rgba(7, 26, 66, .09);
}
.soceram-logo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}
.header-soceram-logo {
  width: 46px;
  height: 56px;
  padding: 4px;
  border-radius: 13px;
}
.brand-button strong, .brand-button small { display: block; }
.brand-button strong { font-size: clamp(20px, 2vw, 29px); letter-spacing: -.035em; }
.brand-button small { margin-top: 2px; color: var(--muted); font-size: 13px; font-weight: 650; }
.header-controls { display: flex; align-items: center; justify-content: flex-end; min-width: 0; }
.operator-control, .date-control, .hour-control, .sync-button {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  color: var(--text);
  background: #fff;
  border: 0;
  border-left: 1px solid var(--line);
  font-weight: 700;
}
.operator-control { min-width: 205px; color: var(--navy); text-align: left; }
.operator-control > span { min-width: 0; flex: 1; }
.operator-control small, .operator-control strong { display: block; }
.operator-control small { color: var(--muted); font-size: 11px; font-weight: 700; }
.operator-control strong { max-width: 180px; margin-top: 2px; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.operator-control.needs-selection { color: var(--blue); background: var(--blue-soft); }
.operator-chevron { width: 18px !important; height: 18px !important; color: var(--muted); }
.operator-chevron { transform: rotate(90deg); }
.date-control input, .hour-control select {
  min-height: 44px;
  color: var(--text);
  background: #fff;
  border: 0;
  font-weight: 700;
}
.date-control input { width: 142px; }
.hour-control select { min-width: 92px; padding: 0 5px; }
.sync-button { color: var(--green); white-space: nowrap; }
.sync-button.pending { color: var(--amber); }
.sync-button.offline, .sync-button.error { color: var(--red); }
.account-placeholder {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  margin-left: 12px;
  color: #738098;
  background: #f6f8fb;
  border: 1px solid var(--line);
  border-radius: 50%;
}
.account-placeholder svg { width: 24px; height: 24px; }

.app-main { width: min(1600px, 100%); margin: 0 auto; }
.landing-view { padding: clamp(28px, 4vw, 64px) clamp(18px, 4vw, 68px) 44px; }
.landing-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(25px, 3vw, 42px);
}
.landing-heading h1 { margin: 0; color: var(--navy); font-size: clamp(30px, 4vw, 54px); letter-spacing: -.045em; line-height: 1.05; }
.landing-heading p { margin: 10px 0 0; color: var(--muted); font-size: clamp(17px, 1.7vw, 22px); }
.live-clock { min-width: 190px; padding-left: 26px; border-left: 1px solid var(--line-strong); text-align: right; }
.live-clock span, .live-clock strong { display: block; }
.live-clock span { color: var(--muted); font-size: 13px; font-weight: 650; }
.live-clock strong { margin-top: 2px; color: var(--navy); font-size: 34px; font-variant-numeric: tabular-nums; }
.station-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 2.4vw, 34px); }
.station-card {
  position: relative;
  min-height: 330px;
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  gap: 22px 28px;
  padding: clamp(24px, 3vw, 42px);
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 10px 28px rgba(7, 26, 66, .06);
  text-align: left;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.station-card:hover { transform: translateY(-3px); border-color: #91afe6; box-shadow: var(--shadow); }
.station-card:active { transform: translateY(0); }
.station-art {
  width: 126px;
  height: 126px;
  display: grid;
  place-items: center;
  align-self: start;
  color: var(--blue);
  background: var(--blue-soft);
  border: 1px solid #c9daf8;
  border-radius: 25px;
}
.station-art svg { width: 69px; height: 69px; fill: none; stroke: currentColor; stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round; }
.station-card-cazan .station-art { position: relative; }
.station-card-cazan .station-art i {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 16px;
  height: 16px;
  background: #a8b2c2;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #a8b2c2;
}
.station-card-cazan .station-art i.on { background: var(--green); box-shadow: 0 0 0 1px var(--green), 0 0 12px rgba(20, 140, 57, .55); }
.station-card-cazan .station-art i.off { background: var(--red); box-shadow: 0 0 0 1px var(--red); }
.station-card-copy { min-width: 0; display: block; }
.station-card-title, .station-card-description, .station-card-status, .station-card-meta { display: block; }
.station-card-title { color: var(--navy); font-size: clamp(27px, 2.8vw, 39px); font-weight: 780; letter-spacing: -.04em; }
.station-card-description { max-width: 430px; margin-top: 8px; color: var(--muted); line-height: 1.45; }
.station-card-status { margin-top: 27px; color: var(--blue); font-size: 18px; font-weight: 780; }
.station-card-status.success { color: var(--green); }
.station-card-status.danger { color: var(--red); }
.station-card-meta { margin-top: 5px; color: var(--muted); font-size: 14px; }
.station-open {
  grid-column: 1 / -1;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  color: var(--blue);
  border-top: 1px solid var(--line);
  font-weight: 780;
}
.station-open svg { width: 26px; height: 26px; }
.landing-note { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 27px 0 0; color: var(--muted); text-align: center; }
.landing-note svg { color: var(--green); }

.workspace-view { min-width: 0; max-width: 100%; padding: 22px clamp(16px, 2.5vw, 38px) 36px; }
.workspace-heading {
  min-height: 82px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  margin-bottom: 16px;
}
.back-button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  color: var(--blue);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-weight: 750;
}
.workspace-title { min-width: 0; display: flex; align-items: center; gap: 14px; }
.workspace-icon { width: 58px; height: 58px; display: grid; place-items: center; flex: 0 0 auto; color: var(--blue); background: var(--blue-soft); border-radius: 14px; }
.workspace-icon svg { width: 35px; height: 35px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.workspace-title h1 { margin: 0; color: var(--navy); font-size: clamp(25px, 2.5vw, 36px); letter-spacing: -.035em; }
.workspace-title p { margin: 3px 0 0; color: var(--muted); font-size: 14px; }
.slot-summary { min-width: 158px; padding-left: 22px; border-left: 1px solid var(--line-strong); text-align: right; }
.slot-summary span, .slot-summary strong, .slot-summary small { display: block; }
.slot-summary span { color: var(--muted); font-size: 12px; font-weight: 650; }
.slot-summary strong { margin-top: 1px; color: var(--navy); font-size: 30px; font-variant-numeric: tabular-nums; }
.slot-summary small { margin-top: 1px; color: var(--amber); font-weight: 700; }
.slot-summary small.complete { color: var(--green); }

.workspace-tabs {
  width: fit-content;
  max-width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(155px, 1fr));
  gap: 5px;
  margin: 0 0 16px;
  padding: 5px;
  background: #fff;
  border: 1px solid #d7e0ed;
  border-radius: 12px;
}
.workspace-tabs button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 9px 18px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 9px;
  font-weight: 800;
  white-space: nowrap;
}
.workspace-tabs button.selected {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 4px 12px rgba(11, 87, 227, .22);
}
.workspace-tabs svg { width: 22px; height: 22px; }
.workspace-mode-row { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.workspace-mode-row .workspace-tabs { margin-bottom: 0; }
.workspace-reports-button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 9px 16px;
  color: var(--green-dark);
  background: #fff;
  border: 1px solid #8fc39d;
  border-radius: 10px;
  font-weight: 800;
}
.workspace-reports-button:hover { background: var(--green-soft); border-color: var(--green); }
.workspace-reports-button svg { width: 21px; height: 21px; }

.hours-table-view { min-width: 0; max-width: 100%; }
.hours-table-layout {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(390px, .72fr);
  gap: 16px;
  align-items: start;
}
.hours-table-main {
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(7, 26, 66, .05);
}
.hours-table-toolbar {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
}
.hours-table-heading { min-width: 0; }
.hours-table-heading h2 { margin: 0; color: var(--navy); font-size: 24px; }
.hours-table-heading p { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.35; }
.hours-table-actions { display: flex; flex: 0 0 auto; gap: 8px; }
.hours-table-actions button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.hours-table-actions svg { width: 19px; height: 19px; }
.hours-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 16px;
  align-items: center;
  padding: 13px 20px;
  background: #f7f9fc;
  border-bottom: 1px solid var(--line);
}
.hours-progress strong, .hours-progress small { display: block; }
.hours-progress strong { color: var(--navy); font-size: 14px; }
.hours-progress small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.hours-progress-value { color: var(--blue); font-size: 17px; font-weight: 850; font-variant-numeric: tabular-nums; }
.hours-progress > progress { grid-column: 1 / -1; width: 100%; height: 7px; overflow: hidden; appearance: none; background: #dce4ef; border: 0; border-radius: 999px; }
.hours-progress > progress::-webkit-progress-bar { background: #dce4ef; border-radius: 999px; }
.hours-progress > progress::-webkit-progress-value { background: var(--green); border-radius: 999px; }
.hours-progress > progress::-moz-progress-bar { background: var(--green); border-radius: 999px; }
.hours-table-scroll { min-width: 0; max-width: 100%; max-height: min(690px, calc(100vh - 330px)); overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.hours-table { width: 100%; min-width: 790px; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.hours-table th, .hours-table td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.hours-table th:last-child, .hours-table td:last-child { border-right: 0; }
.hours-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  height: 66px;
  padding: 9px 8px;
  color: var(--navy);
  background: #fff;
  box-shadow: inset 0 -2px 0 #cdd7e5;
  text-align: center;
  font-size: 12px;
  line-height: 1.2;
}
.hours-table thead th:first-child { left: 0; z-index: 5; width: 76px; }
.hours-table thead th:last-child { width: 112px; }
.hours-table thead th span, .hours-table thead th small { display: block; }
.hours-table thead th span { color: var(--blue); font-size: 15px; font-weight: 900; }
.hours-table thead th small { margin-top: 3px; color: var(--navy); font-size: 10px; font-weight: 750; }
.hours-table tbody tr { background: #fff; }
.hours-table tbody tr:nth-child(even) { background: #fafbfd; }
.hours-table tbody tr.current-row { background: #edf5ff; }
.hours-table tbody tr.selected-row { background: #e5efff; }
.hours-table tbody th {
  position: sticky;
  left: 0;
  z-index: 2;
  width: 76px;
  height: 57px;
  padding: 8px;
  color: var(--navy);
  background: inherit;
  font-size: 14px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.hours-table tbody tr.current-row th::after {
  content: "Acum";
  display: block;
  margin-top: 2px;
  color: var(--blue);
  font-size: 9px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.hours-table td { height: 57px; padding: 5px; vertical-align: middle; }
.hours-cell {
  width: 100%;
  min-height: 45px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  padding: 4px 6px;
  color: var(--text);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  line-height: 1.1;
  text-align: center;
}
button.hours-cell:hover { color: var(--blue); background: #fff; border-color: #8faee2; box-shadow: 0 2px 8px rgba(7, 26, 66, .08); }
.hours-cell strong { max-width: 100%; overflow: hidden; font-size: 14px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.hours-cell small { color: var(--muted); font-size: 9px; font-weight: 750; }
.hours-cell.complete { color: var(--green-dark); background: var(--green-soft); }
.hours-cell.skipped { color: #725000; background: var(--amber-soft); }
.hours-cell.pending { color: var(--blue); background: var(--blue-soft); border-color: #a9c2eb; }
.hours-cell.local { color: #704d00; background: #fff5d5; border-color: #e0bd65; }
.hours-cell.automatic { color: #4c5d79; background: #edf1f6; }
.hours-cell.disabled { color: #8b96a8; background: #f2f4f7; }
.hours-cell.future { color: #a2aaba; background: #f7f8fa; }
.hours-cell.selected { border: 2px solid var(--blue); box-shadow: 0 0 0 2px rgba(11, 87, 227, .12); }
.hours-row-status { padding: 5px 7px; color: var(--muted); font-size: 10px; font-weight: 800; text-align: center; }
.hours-row-status.complete { color: var(--green-dark); }
.hours-row-status.pending { color: var(--blue); }
.hours-row-status.blocked { color: var(--red); }
.hours-row-status.local { color: var(--amber); }
.hours-table-legend { display: flex; flex-wrap: wrap; gap: 9px 17px; padding: 12px 18px; color: var(--muted); font-size: 11px; font-weight: 700; }
.hours-table-legend span { display: inline-flex; align-items: center; gap: 6px; }
.hours-table-legend i { width: 11px; height: 11px; border-radius: 3px; }
.legend-complete { background: var(--green-soft); border: 1px solid #7bbd8d; }
.legend-pending { background: var(--blue-soft); border: 1px solid #8faee2; }
.legend-local { background: #fff5d5; border: 1px solid #d5ad49; }
.legend-disabled { background: #edf1f6; border: 1px solid #bdc6d3; }
.table-editor-host {
  min-width: 0;
  position: sticky;
  top: 99px;
  max-height: calc(100vh - 230px);
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(7, 26, 66, .05);
}
.table-editor-host .entry-panel { padding: 24px; }
.table-editor-host .editor-empty { min-height: 390px; }
.table-editor-host .field-title-row h2 { font-size: clamp(23px, 2vw, 31px); }
.table-editor-host .numeric-keypad button { min-height: 55px; }

.workspace-view.table-mode { padding-top: 14px; }
.workspace-view.table-mode .workspace-heading { min-height: 64px; margin-bottom: 10px; }
.workspace-view.table-mode .workspace-icon { width: 48px; height: 48px; border-radius: 12px; }
.workspace-view.table-mode .workspace-icon svg { width: 29px; height: 29px; }
.workspace-view.table-mode .workspace-title h1 { font-size: clamp(24px, 2vw, 30px); }
.workspace-view.table-mode .workspace-title p { margin-top: 1px; font-size: 12px; }
.workspace-view.table-mode .slot-summary strong { font-size: 26px; }
.workspace-view.table-mode .workspace-mode-row { margin-bottom: 10px; }
.workspace-view.table-mode .workspace-mode-row .workspace-tabs { margin-bottom: 0; }
.workspace-view.table-mode .workspace-tabs button { min-height: 44px; }
.workspace-view.table-mode .workspace-reports-button { min-height: 44px; }
.workspace-view.table-mode .hours-table-toolbar { min-height: 76px; padding-block: 12px; }
.workspace-view.table-mode .hours-table-heading h2 { font-size: 22px; }

.motor-panel, .bca-info-panel {
  display: grid;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
  padding: 20px clamp(18px, 2.4vw, 32px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.motor-panel { grid-template-columns: 72px minmax(210px, .8fr) minmax(440px, 1.2fr); }
.engine-indicator {
  position: relative;
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  color: #7b899f;
  background: #f0f3f7;
  border-radius: 17px;
}
.engine-indicator svg { width: 40px; height: 40px; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.engine-indicator i { position: absolute; right: -3px; top: -3px; width: 18px; height: 18px; background: #a8b2c2; border: 4px solid #fff; border-radius: 50%; }
.engine-indicator.on { color: var(--green-dark); background: var(--green-soft); }
.engine-indicator.on i { background: var(--green); box-shadow: 0 0 12px rgba(20, 140, 57, .55); }
.engine-indicator.off { color: var(--red); background: var(--red-soft); }
.engine-indicator.off i { background: var(--red); }
.motor-copy h2, .bca-info-panel h2 { margin: 0; color: var(--navy); font-size: 22px; }
.motor-copy p, .bca-info-panel p { margin: 5px 0 0; color: var(--muted); line-height: 1.4; }
.motor-control { min-width: 0; }
.motor-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.motor-toggle button {
  min-height: 72px;
  color: var(--muted);
  background: #fff;
  border: 2px solid var(--line-strong);
  border-radius: 12px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: .025em;
}
.motor-toggle button[data-motor-state="ON"].selected { color: #fff; background: var(--green); border-color: var(--green); }
.motor-toggle button[data-motor-state="OFF"].selected { color: #fff; background: var(--red); border-color: var(--red); }
.motor-off-details { display: grid; grid-template-columns: minmax(200px, .7fr) minmax(260px, 1.3fr); gap: 12px; margin-top: 12px; }
.motor-off-details label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 700; }
.motor-off-details select, .motor-off-details textarea { width: 100%; min-height: 48px; padding: 9px 12px; color: var(--text); background: #fff; border: 1px solid var(--line-strong); border-radius: 9px; }
.motor-off-details textarea { min-height: 62px; resize: vertical; }
.form-error, .validation-message, .dialog-error { min-height: 21px; margin: 7px 0 0; color: var(--red); font-size: 14px; font-weight: 600; }
.motor-confirm { width: 100%; min-height: 52px; margin-top: 4px; color: #fff; background: var(--blue); border: 1px solid var(--blue); border-radius: 10px; font-weight: 780; }
.bca-info-panel { grid-template-columns: 66px minmax(0, 1fr); }
.info-icon { width: 58px; height: 58px; display: grid; place-items: center; color: #d24c19; background: #fff2ec; border-radius: 15px; }
.info-icon svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }

.reading-layout {
  min-height: 610px;
  display: grid;
  grid-template-columns: minmax(310px, .78fr) minmax(520px, 1.22fr);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(7, 26, 66, .05);
}
.task-rail { min-width: 0; display: flex; flex-direction: column; padding: 22px; background: #fbfcfe; border-right: 1px solid var(--line); }
.task-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 0 2px 16px; border-bottom: 1px solid var(--line); }
.task-heading h2 { margin: 0; color: var(--navy); font-size: 21px; }
.task-heading p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.task-heading > span { min-width: 54px; min-height: 36px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); border-radius: 9px; font-weight: 800; }
.task-list { display: grid; gap: 9px; margin-top: 14px; }
.task-item {
  width: 100%;
  min-height: 76px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  text-align: left;
}
.task-item:hover { border-color: #9ab8ef; }
.task-item.active { border: 2px solid var(--blue); box-shadow: 0 0 0 3px rgba(11, 87, 227, .08); }
.task-number { width: 32px; height: 32px; display: grid; place-items: center; color: var(--muted); background: #eef1f6; border-radius: 50%; font-size: 13px; font-weight: 800; }
.task-item strong, .task-item small { display: block; }
.task-item strong { color: var(--navy); font-size: 15px; line-height: 1.25; }
.task-item small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.task-state { color: var(--blue); font-size: 12px; font-weight: 800; text-align: right; }
.task-item.complete .task-number { color: #fff; background: var(--green); }
.task-item.complete .task-state { color: var(--green); }
.task-item.skipped .task-number { color: #5b3a00; background: #ffd47b; }
.task-item.skipped .task-state { color: var(--amber); }
.task-item.not-due { cursor: default; opacity: .8; }
.task-item.not-due .task-state { color: var(--muted); }
.entry-panel { min-width: 0; padding: clamp(22px, 3vw, 42px); background: #fff; }
.editor-empty { min-height: 510px; display: grid; place-items: center; align-content: center; text-align: center; color: var(--muted); }
.empty-icon { width: 74px; height: 74px; display: grid; place-items: center; color: var(--green); background: var(--green-soft); border-radius: 50%; }
.empty-icon svg { width: 43px; height: 43px; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.editor-empty h2 { margin: 20px 0 6px; color: var(--navy); font-size: 27px; }
.editor-empty p { max-width: 470px; margin: 0; line-height: 1.5; }
.field-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.field-heading-wrap { min-width: 0; display: flex; align-items: center; gap: 13px; }
.field-visual {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--workspace-accent-dark);
  background: var(--workspace-soft);
  border: 1px solid var(--workspace-line);
  border-radius: 14px;
}
.field-visual svg { width: 31px; height: 31px; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.field-position { display: block; margin-bottom: 4px; color: var(--muted); font-size: 13px; font-weight: 700; }
.field-title-row h2 { margin: 0; color: var(--navy); font-size: clamp(25px, 2.4vw, 35px); letter-spacing: -.035em; line-height: 1.12; }
.field-status { flex: 0 0 auto; padding: 7px 10px; color: var(--blue); background: var(--blue-soft); border-radius: 8px; font-size: 13px; font-weight: 800; }
.field-status.complete { color: var(--green-dark); background: var(--green-soft); }
.field-status.skipped { color: #6f4700; background: var(--amber-soft); }
.field-schedule { display: flex; align-items: center; gap: 8px; margin: 8px 0 18px; color: var(--muted); font-size: 14px; }
.field-schedule svg { width: 20px; height: 20px; }
.previous-reading { margin-bottom: 14px; padding: 12px 14px; background: #f6f8fb; border-left: 4px solid #a7b6cd; border-radius: 8px; }
.previous-reading span, .previous-reading strong { display: block; }
.previous-reading span { color: var(--muted); font-size: 13px; }
.previous-reading strong { margin-top: 3px; color: var(--navy); font-size: 20px; font-variant-numeric: tabular-nums; }
.correction-hint { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 11px; align-items: center; margin: -3px 0 14px; padding: 11px 13px; color: #594000; background: #fff8e7; border: 1px solid #e7c76e; border-radius: 10px; }
.correction-hint[hidden] { display: none; }
.correction-hint-icon { width: 40px; height: 40px; display: grid; place-items: center; color: #7f5700; background: #fff; border-radius: 9px; }
.correction-hint-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.correction-hint strong, .correction-hint small { display: block; }
.correction-hint strong { font-size: 14px; }
.correction-hint small { margin-top: 2px; color: #6f5a2c; font-size: 12px; line-height: 1.35; }
.value-label { display: block; margin-bottom: 7px; color: var(--blue); font-size: 14px; font-weight: 800; }
.value-input-wrap { position: relative; }
.value-input-wrap input { width: 100%; min-height: 72px; padding: 8px 100px 8px 18px; color: var(--navy); background: #fff; border: 3px solid var(--blue); border-radius: 11px; font-size: clamp(30px, 4vw, 47px); font-weight: 800; font-variant-numeric: tabular-nums; }
.value-input-wrap input::placeholder { color: #9ba7ba; font-size: 18px; font-weight: 550; }
.value-input-wrap span { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); min-width: 62px; padding: 8px 10px; color: var(--muted); background: #eef1f5; border-radius: 7px; text-align: center; font-size: 14px; font-weight: 700; }
.numeric-keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.numeric-keypad button { min-height: 60px; color: var(--navy); background: #fff; border: 1px solid var(--line); border-radius: 10px; font-size: 29px; font-weight: 800; box-shadow: 0 2px 5px rgba(7, 26, 66, .035); }
.numeric-keypad button:hover { color: var(--blue); background: var(--blue-soft); border-color: #8eafe9; }
.numeric-keypad .erase-key { display: grid; place-items: center; color: #fff; background: var(--navy); border-color: var(--navy); }
.auto-reading-card { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; gap: 15px; align-items: center; margin-top: 14px; padding: 18px; background: #f0f7ff; border: 2px solid #8db5ec; border-radius: 13px; }
.auto-reading-icon { width: 58px; height: 58px; display: grid; place-items: center; color: var(--blue); background: #fff; border-radius: 50%; box-shadow: 0 4px 14px rgba(31, 83, 158, .12); }
.auto-reading-icon svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.auto-reading-copy span, .auto-reading-copy strong, .auto-reading-copy small { display: block; }
.auto-reading-copy span { color: var(--blue); font-size: 13px; font-weight: 850; text-transform: uppercase; letter-spacing: .035em; }
.auto-reading-copy strong { margin-top: 3px; color: var(--navy); font-size: clamp(30px, 4vw, 46px); font-variant-numeric: tabular-nums; line-height: 1.08; }
.auto-reading-copy p { margin: 5px 0 0; color: var(--text); font-size: 14px; line-height: 1.4; }
.auto-reading-copy small { margin-top: 5px; color: var(--muted); font-size: 12px; }
.confirm-auto-hours { min-height: 58px; max-width: 215px; padding: 10px 16px; color: #fff; background: var(--blue); border: 0; border-radius: 10px; font-size: 15px; font-weight: 850; line-height: 1.25; }
.confirm-auto-hours:disabled { color: #6c788a; background: #dce3ec; }
.numeric-keypad .erase-key svg { width: 29px; height: 29px; }
.validation-message { margin-bottom: 0; }
.editor-actions { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 7px; }
.confirm-reading, .confirm-warning, .skip-reading, .primary-button, .secondary-button, .omit-button {
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 10px 17px;
  border-radius: 10px;
  font-weight: 800;
}
.confirm-reading, .primary-button { color: #fff; background: var(--blue); border: 1px solid var(--blue); }
.confirm-reading:hover, .primary-button:hover { background: var(--blue-dark); }
.confirm-reading:disabled, .primary-button:disabled { cursor: not-allowed; color: #6c788a; background: #dce3ec; border-color: #dce3ec; }
.confirm-reading svg { width: 28px; height: 28px; }
.skip-reading, .secondary-button { color: var(--blue); background: #fff; border: 2px solid var(--blue); }
.confirm-warning { grid-column: 1 / -1; color: #4b3000; background: #ffc65b; border: 1px solid #d99410; }
.editor-note { margin: 10px 0 0; color: var(--muted); text-align: center; font-size: 12px; }

.correction-dialog form { width: min(620px, calc(100vw - 30px)); }
.dialog-icon.correction { color: #6b4a00; background: #fff3d2; }
.correction-compare { display: grid; grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr); gap: 10px; align-items: center; margin: 15px 0 18px; }
.correction-compare > span { min-width: 0; padding: 13px; background: #f5f7fb; border: 1px solid var(--line); border-radius: 10px; }
.correction-compare > span.new { background: #eef5ff; border-color: #9cbbe9; }
.correction-compare small, .correction-compare strong { display: block; }
.correction-compare small { color: var(--muted); font-size: 12px; font-weight: 750; }
.correction-compare strong { margin-top: 4px; color: var(--navy); font-size: 21px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.correction-compare > svg { width: 26px; height: 26px; color: var(--blue); }
.correction-reason-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.correction-reason-fieldset legend { margin-bottom: 9px; color: var(--navy); font-size: 14px; font-weight: 850; }

.offline-bar {
  position: fixed;
  left: max(14px, env(safe-area-inset-left));
  right: max(14px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 25;
  min-height: 60px;
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 11px;
  max-width: 920px;
  margin: 0 auto;
  padding: 8px 10px 8px 14px;
  color: #fff;
  background: var(--navy);
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 14px;
  box-shadow: 0 14px 45px rgba(7, 26, 66, .28);
}
.offline-bar.pending { background: #604000; }
.offline-bar.offline { background: #722b2b; }
.offline-icon { width: 38px; height: 38px; display: grid; place-items: center; color: #bcd0ff; }
.offline-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.offline-bar strong, .offline-bar small { display: block; }
.offline-bar strong { font-size: 14px; }
.offline-bar small { margin-top: 2px; color: rgba(255, 255, 255, .72); font-size: 12px; }
.offline-bar > button { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; color: #fff; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .24); border-radius: 9px; font-weight: 750; }
.offline-bar > button svg { width: 22px; height: 22px; }

.app-dialog { width: min(660px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; overflow: auto; color: var(--text); background: #fff; border: 0; border-radius: 17px; box-shadow: 0 32px 95px rgba(5, 18, 45, .38); }
.app-dialog::backdrop { background: rgba(6, 17, 39, .68); backdrop-filter: blur(2px); }
.app-dialog form, .queue-dialog-content { position: relative; padding: 26px 30px 22px; }
.dialog-close { position: absolute; right: 14px; top: 14px; width: 48px; height: 48px; display: grid; place-items: center; color: var(--muted); background: #f2f4f8; border: 0; border-radius: 50%; }
.dialog-heading { text-align: center; }
.dialog-icon { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 11px; color: var(--blue); background: var(--blue-soft); border-radius: 50%; }
.dialog-icon.warning { color: #9a6100; background: var(--amber-soft); }
.dialog-icon svg { width: 31px; height: 31px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dialog-heading h2 { margin: 0; color: var(--navy); font-size: 27px; }
.dialog-heading p { margin: 5px 0 0; color: var(--muted); }
.dialog-instruction { margin: 15px 0 12px; color: var(--muted); text-align: center; }
.reason-list { display: grid; gap: 7px; }
.reason-option { min-height: 50px; display: flex; align-items: center; gap: 12px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.reason-option:hover { background: #f8faff; border-color: #9ab7e9; }
.reason-option input { width: 22px; height: 22px; accent-color: var(--blue); }
.dialog-note { display: grid; gap: 6px; margin-top: 11px; color: var(--muted); font-size: 14px; font-weight: 700; }
.dialog-note textarea { width: 100%; min-height: 80px; resize: vertical; padding: 10px 12px; color: var(--text); border: 1px solid var(--line-strong); border-radius: 9px; }
.dialog-actions, .queue-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.omit-button { color: #4a3000; background: #ffc55c; border: 1px solid #df9b19; }
.queue-storage-status { margin: 16px 0 0; padding: 10px 12px; color: #43536c; background: #f3f6fa; border: 1px solid #dbe3ee; border-radius: 9px; font-size: 12px; line-height: 1.45; }
.queue-storage-status.protected { color: #145b2d; background: #edf9f0; border-color: #b9dec2; }
.queue-storage-status.warning { color: #714b00; background: #fff8e8; border-color: #ead09a; }
.queue-legacy-recovery { display: grid; gap: 8px; margin: 12px 0 0; padding: 14px; color: #6a3d00; background: #fff6e5; border: 1px solid #e6be72; border-radius: 10px; }
.queue-legacy-recovery[hidden] { display: none; }
.queue-legacy-recovery p { margin: 0; line-height: 1.45; }
.queue-legacy-recovery button { justify-self: start; min-height: 44px; }
.queue-list { display: grid; gap: 8px; max-height: 430px; margin: 18px 0; overflow: auto; }
.queue-empty { padding: 30px 14px; color: var(--muted); background: #f7f9fc; border-radius: 11px; text-align: center; }
.queue-item { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 11px; align-items: center; min-height: 72px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.queue-order { width: 38px; height: 38px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); border-radius: 9px; font-size: 13px; font-weight: 800; }
.queue-item strong, .queue-item small { display: block; }
.queue-item strong { color: var(--navy); font-size: 14px; }
.queue-item small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.queue-item.blocked { border-color: #e0a34b; background: #fffaf0; }
.queue-error { grid-column: 2 / -1; color: var(--red); font-size: 12px; font-weight: 650; }
.queue-error.pending { color: #714b00; }
.queue-actions .queue-import { grid-column: 1 / -1; }
.queue-ingest-report { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #f7fafc; }
.queue-ingest-report h3 { margin: 0 0 6px; font-size: 15px; color: var(--navy); }
.queue-ingest-report h4 { margin: 12px 0 6px; font-size: 13px; color: var(--muted); }
.queue-ingest-report p { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.queue-ingest-row { display: grid; gap: 4px; padding: 8px 0; border-top: 1px solid var(--line); }
.queue-ingest-row:first-of-type { border-top: 0; }
.queue-ingest-row strong { font-size: 13px; color: var(--navy); }
.queue-ingest-row small { color: var(--muted); font-size: 12px; }
.queue-ingest-row.problem { background: #fff7eb; margin: 0 -8px; padding: 8px; border-radius: 8px; }
.hours-cell.ingest-problem { border-color: #e0a34b; background: #fffaf0; }
.queue-inline-action { min-height: 40px; padding: 6px 10px; color: var(--blue); background: #fff; border: 1px solid var(--blue); border-radius: 8px; font-size: 12px; font-weight: 750; }
.queue-inline-action { min-height: 44px; }
.operator-dialog { width: min(620px, calc(100vw - 24px)); }
.operator-dialog-content { position: relative; padding: 26px 30px 22px; }
.operator-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 18px 0 8px; }
.operator-option { min-height: 76px; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 11px; align-items: center; padding: 11px 13px; color: var(--navy); background: #fff; border: 1px solid var(--line-strong); border-radius: 11px; text-align: left; }
.operator-option:hover, .operator-option.selected { color: var(--blue); background: var(--blue-soft); border-color: #7ea7e4; }
.operator-option-icon { width: 46px; height: 46px; display: grid; place-items: center; color: var(--blue); background: #edf4ff; border-radius: 50%; font-size: 16px; font-weight: 900; }
.operator-option strong, .operator-option small { display: block; }
.operator-option strong { font-size: 16px; }
.operator-option small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.operator-dialog-footer { display: flex; justify-content: flex-end; margin-top: 8px; }
.operator-dialog-footer button { min-height: 46px; padding: 9px 18px; }

.landing-tools { display: flex; align-items: center; gap: 13px; }
.landing-actions { display: flex; align-items: center; gap: 8px; }
.administration-button, .reports-button { min-height: 46px; padding: 10px 16px; color: var(--muted); background: #fff; border: 1px solid var(--line-strong); border-radius: 10px; font-weight: 750; }
.administration-button:hover { color: var(--blue); border-color: #8dadde; background: var(--blue-soft); }
.reports-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; color: var(--green-dark); border-color: #91c29e; }
.reports-button:hover { color: var(--green-dark); background: var(--green-soft); border-color: var(--green); }
.reports-button svg { width: 20px; height: 20px; }

.reports-dialog { width: min(860px, calc(100vw - 24px)); }
.reports-dialog-content { position: relative; padding: 27px 30px 24px; }
.dialog-icon.report { color: var(--green-dark); background: var(--green-soft); }
.report-period-block { margin-top: 20px; padding: 15px; background: #fbfcfe; border: 1px solid var(--line); border-radius: 14px; }
.report-period-block.monthly { background: #f8fbff; border-color: #bdcdea; }
.report-period-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 220px); gap: 16px; align-items: end; }
.report-period-heading > span > strong, .report-period-heading > span > small { display: block; }
.report-period-heading > span > strong { color: var(--navy); font-size: 17px; }
.report-period-heading > span > small { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.report-date-control { display: grid; gap: 7px; margin-top: 20px; color: var(--muted); font-size: 13px; font-weight: 800; }
.report-period-heading .report-date-control { margin-top: 0; }
.report-date-control input { width: 100%; min-height: 52px; padding: 9px 12px; color: var(--navy); background: #fff; border: 1px solid var(--line-strong); border-radius: 10px; font-weight: 800; }
.report-file-list { display: grid; gap: 11px; margin-top: 13px; }
.report-file-card { min-height: 80px; display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 10px 13px; align-items: center; padding: 12px 14px; background: #f7faf8; border: 1px solid #b9d5c0; border-radius: 12px; }
.report-file-card.factory-gas { background: #f6f9ff; border-color: #b9cbea; }
.report-file-card.factory-gas .report-file-icon { background: var(--navy); }
.report-file-icon { width: 52px; height: 52px; display: grid; place-items: center; color: #fff; background: var(--green-dark); border-radius: 10px; font-size: 11px; font-weight: 900; letter-spacing: .04em; }
.report-file-icon.monthly { background: var(--blue); font-size: 9px; }
.report-file-card strong, .report-file-card small { display: block; }
.report-file-card strong { color: var(--navy); font-size: 16px; }
.report-file-card small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.report-file-state { padding: 6px 9px; color: var(--green-dark); background: var(--green-soft); border-radius: 8px; font-size: 11px; font-weight: 850; text-align: center; }
.report-file-state.warning { color: #785000; background: var(--amber-soft); }
.report-file-state.error { color: var(--red); background: var(--red-soft); }
.report-sync-status { min-height: 22px; margin: 11px 2px 8px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.report-sync-status.success { color: var(--green-dark); font-weight: 750; }
.report-sync-status.warning { color: #785000; font-weight: 750; }
.report-file-card .report-download-button { grid-column: 2 / -1; justify-self: stretch; min-height: 48px; }
.report-file-card .report-download-button svg { width: 21px; height: 21px; flex: 0 0 auto; }
.report-integrity-note { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: center; margin: 12px 2px 0; padding: 11px 13px; color: var(--blue-dark); background: var(--blue-soft); border: 1px solid #bfd0ed; border-radius: 10px; font-size: 12px; font-weight: 700; line-height: 1.4; }
.report-integrity-note svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.report-actions { display: grid; grid-template-columns: 1fr; gap: 10px; }
.report-actions > button, .report-download-button { min-height: 54px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 10px 14px; border-radius: 10px; font-weight: 800; text-align: center; text-decoration: none; }
.report-actions svg { width: 22px; height: 22px; flex: 0 0 auto; }
.report-download-button { color: #fff; background: var(--green-dark); border: 1px solid var(--green-dark); }
.report-download-button:hover { background: #075521; }
.report-download-button.is-disabled { pointer-events: none; opacity: .45; }
.report-device-help { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 15px; }
.report-device-help p { min-width: 0; margin: 0; padding: 12px 13px; color: var(--muted); background: #f5f7fb; border: 1px solid var(--line); border-radius: 10px; font-size: 12px; line-height: 1.4; }
.report-device-help strong, .report-device-help span { display: block; }
.report-device-help strong { margin-bottom: 4px; color: var(--navy); font-size: 13px; }
.report-error { margin-bottom: 0; }
.reports-dialog-footer { display: flex; justify-content: flex-end; margin-top: 8px; padding-top: 13px; border-top: 1px solid var(--line); }
.reports-dialog-footer button { min-height: 46px; padding: 8px 19px; }

.admin-dialog { width: min(940px, calc(100vw - 24px)); }
.admin-dialog-content { position: relative; padding: 27px 30px 24px; }
.admin-heading { padding-right: 58px; }
.admin-heading h2 { margin: 0; color: var(--navy); font-size: 28px; }
.admin-heading p { margin: 4px 0 0; color: var(--muted); }
.admin-tabs { display: flex; gap: 7px; margin: 20px 0 18px; padding: 5px; background: #eef2f8; border-radius: 11px; }
.admin-tabs button { flex: 1; min-height: 46px; padding: 8px 13px; color: var(--muted); background: transparent; border: 0; border-radius: 8px; font-weight: 800; }
.admin-tabs button[aria-selected="true"] { color: var(--navy); background: #fff; box-shadow: 0 2px 10px rgba(13, 35, 72, .1); }
.admin-section[hidden] { display: none; }
.admin-device-operator { min-height: 70px; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; margin-bottom: 18px; padding: 11px 13px; background: var(--blue-soft); border: 1px solid #b7cdef; border-radius: 11px; }
.admin-device-icon { width: 46px; height: 46px; display: grid; place-items: center; color: var(--blue); background: #fff; border-radius: 50%; }
.admin-device-icon svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.admin-device-operator small, .admin-device-operator strong { display: block; }
.admin-device-operator small { color: var(--muted); font-size: 11px; font-weight: 700; }
.admin-device-operator strong { margin-top: 3px; color: var(--navy); font-size: 15px; }
.admin-device-operator > small:last-child { max-width: 330px; line-height: 1.4; }
.admin-device-operator button { min-height: 43px; padding: 8px 13px; }
.admin-operators-config { margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.admin-operators-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.admin-operators-heading button { min-height: 42px; padding: 8px 13px; white-space: nowrap; }
.admin-operator-list { display: grid; gap: 8px; margin-top: 12px; }
.admin-operator-row { display: grid; grid-template-columns: minmax(180px, 1fr) auto auto; gap: 12px; align-items: center; min-height: 65px; padding: 10px 12px; background: #f8faff; border: 1px solid var(--line); border-radius: 10px; }
.admin-operator-name { min-width: 0; }
.admin-operator-name span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.admin-operator-name input { width: 100%; min-height: 40px; padding: 7px 9px; color: var(--navy); background: #fff; border: 1px solid var(--line-strong); border-radius: 8px; font-size: 14px; font-weight: 750; }
.admin-operator-stations { display: flex; flex-wrap: wrap; gap: 6px; }
.admin-operator-stations label, .admin-operator-active { min-height: 40px; display: flex; align-items: center; gap: 6px; padding: 7px 9px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; font-weight: 750; }
.admin-operator-stations input, .admin-operator-active input { width: 19px; height: 19px; accent-color: var(--blue); }
.admin-section-heading h3, .factory-hours-config h3, .admin-summary-grid h3 { margin: 0; color: var(--navy); font-size: 18px; }
.admin-section-heading p, .factory-hours-config p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.admin-field-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 13px; }
.admin-field-row { min-height: 68px; display: flex; align-items: center; gap: 12px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.admin-field-row:hover { border-color: #9ab7e9; background: #f9fbff; }
.admin-field-row input { width: 23px; height: 23px; flex: 0 0 auto; accent-color: var(--blue); }
.admin-field-row span { min-width: 0; }
.admin-field-row strong, .admin-field-row small { display: block; }
.admin-field-row strong { color: var(--navy); font-size: 14px; }
.admin-field-row small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.factory-hours-config { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.admin-hour-grid { display: grid; grid-template-columns: repeat(12, minmax(48px, 1fr)); gap: 6px; margin-top: 12px; }
.admin-hour-option { position: relative; min-width: 0; }
.admin-hour-option input { position: absolute; opacity: 0; pointer-events: none; }
.admin-hour-option span { min-height: 43px; display: grid; place-items: center; color: var(--muted); background: #f5f7fb; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; font-weight: 800; cursor: pointer; }
.admin-hour-option input:checked + span { color: #fff; background: var(--blue); border-color: var(--blue); }
.admin-hour-option input:focus-visible + span { outline: 3px solid rgba(41, 103, 198, .25); outline-offset: 2px; }
.admin-error { min-height: 20px; margin: 10px 0 0; color: var(--red); font-size: 13px; font-weight: 700; }
.admin-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--line); }
.admin-footer button { min-height: 48px; padding: 10px 18px; }
.admin-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.admin-kpi, .admin-kpis article { min-height: 88px; display: grid; align-content: center; padding: 13px; background: #f5f7fb; border: 1px solid var(--line); border-radius: 11px; }
.admin-kpi strong, .admin-kpis article strong { color: var(--navy); font-size: 27px; line-height: 1; }
.admin-kpi span, .admin-kpis article span { color: var(--muted); font-size: 12px; font-weight: 750; }
.admin-kpis article small { margin-top: 6px; color: var(--muted); font-size: 11px; }
.admin-summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.admin-summary-grid > section { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 11px; }
.motor-event-list, .admin-exception-list { display: grid; gap: 7px; max-height: 320px; margin-top: 11px; overflow: auto; }
.admin-log-row { min-height: 56px; display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px 10px; background: #f7f9fc; border-radius: 8px; }
.log-time { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; font-weight: 800; }
.log-state { color: var(--navy); font-size: 13px; font-weight: 800; }
.log-state.on { color: var(--green-dark); }
.log-state.off { color: #855c0a; }
.admin-log-row small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.3; }
.admin-empty { padding: 20px 10px; color: var(--muted); background: #f7f9fc; border-radius: 8px; font-size: 13px; text-align: center; }

.toast { position: fixed; right: 22px; top: 98px; z-index: 60; max-width: min(440px, calc(100vw - 32px)); padding: 14px 17px; color: #fff; background: var(--navy); border-radius: 11px; box-shadow: var(--shadow); line-height: 1.42; }
.toast.success { background: var(--green-dark); }
.toast.warning { background: #765000; }
.toast.error { background: #8f2929; }

.reminder-banner {
  position: sticky;
  top: 82px;
  z-index: 18;
  width: min(1180px, calc(100% - 32px));
  min-height: 72px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  margin: 12px auto 0;
  padding: 10px 12px;
  color: var(--navy);
  background: #eef5ff;
  border: 1px solid #a9c4ef;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(7, 26, 66, .1);
}
.reminder-banner.due { background: var(--amber-soft); border-color: #e5bd65; }
.motor-notice-banner {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin: 10px 16px 0;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f4f7fb;
}
.motor-notice-banner.off { background: var(--red-soft, #fdecec); border-color: #e7b0b0; }
.motor-notice-banner.on { background: var(--bca-soft, #eaf9f7); border-color: #9ed9d3; }
.motor-notice-banner.unknown { background: var(--amber-soft); border-color: #e5bd65; }
.reminder-banner-icon, .automatic-assistant-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: var(--blue);
  background: #fff;
  border-radius: 12px;
}
.reminder-banner.due .reminder-banner-icon { color: #8a5900; }
.reminder-banner-icon svg, .automatic-assistant-icon svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.reminder-banner-copy { min-width: 0; }
.reminder-banner-copy strong, .reminder-banner-copy small { display: block; }
.reminder-banner-copy strong { font-size: 17px; }
.reminder-banner-copy small { margin-top: 3px; color: var(--muted); font-size: 13px; line-height: 1.35; }
.reminder-banner > button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 15px;
  color: #fff;
  background: var(--blue);
  border: 0;
  border-radius: 10px;
  font-weight: 800;
}

.automatic-assistant {
  min-height: 84px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
  padding: 13px 15px;
  color: var(--navy);
  background: linear-gradient(135deg, #eef5ff, #f8fbff);
  border: 1px solid #aac5ef;
  border-radius: 14px;
}
.automatic-assistant-copy { min-width: 0; }
.automatic-assistant-copy small, .automatic-assistant-copy strong, .automatic-assistant-copy span { display: block; }
.automatic-assistant-copy small { color: var(--blue); font-size: 11px; font-weight: 900; letter-spacing: .06em; }
.automatic-assistant-copy strong { margin-top: 3px; font-size: 19px; }
.automatic-assistant-copy span { margin-top: 3px; color: var(--muted); font-size: 13px; line-height: 1.35; }
.automatic-assistant > button { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding-inline: 16px; white-space: nowrap; }
.automatic-assistant > button svg { width: 22px; height: 22px; }

.admin-reminder-config { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.admin-reminder-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(210px, .65fr); gap: 10px; margin-top: 13px; }
.admin-reminder-switch, .admin-reminder-lead {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  background: #f8faff;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.admin-reminder-switch input { width: 25px; height: 25px; flex: 0 0 auto; accent-color: var(--blue); }
.admin-reminder-switch strong, .admin-reminder-switch small { display: block; }
.admin-reminder-switch strong { color: var(--navy); font-size: 14px; }
.admin-reminder-switch small, .admin-reminder-lead small { margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.3; }
.admin-reminder-lead { display: grid; grid-template-columns: 1fr 78px; }
.admin-reminder-lead > span { color: var(--navy); font-size: 13px; font-weight: 800; }
.admin-reminder-lead input { width: 78px; min-height: 43px; padding: 7px; color: var(--navy); background: #fff; border: 1px solid var(--line-strong); border-radius: 8px; text-align: center; font-weight: 850; }
.admin-reminder-lead small { grid-column: 1 / -1; }
.admin-reminder-stations { margin: 12px 0 0; padding: 11px 13px 13px; border: 1px solid var(--line); border-radius: 10px; }
.admin-reminder-stations legend { padding: 0 5px; color: var(--muted); font-size: 12px; font-weight: 800; }
.admin-reminder-stations > div { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.admin-reminder-stations label { min-height: 58px; display: flex; align-items: center; gap: 9px; padding: 9px 10px; background: #fff; border: 1px solid var(--line); border-radius: 9px; }
.admin-reminder-stations input { width: 22px; height: 22px; flex: 0 0 auto; accent-color: var(--blue); }
.admin-reminder-stations strong, .admin-reminder-stations small { display: block; }
.admin-reminder-stations strong { color: var(--navy); font-size: 13px; }
.admin-reminder-stations small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.notification-device-card { min-height: 72px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; margin-top: 12px; padding: 11px 13px; background: var(--green-soft); border: 1px solid #a9d7b6; border-radius: 10px; }
.notification-device-card strong, .notification-device-card small { display: block; }
.notification-device-card strong { color: var(--green-dark); font-size: 14px; }
.notification-device-card small { margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.notification-device-card button { min-height: 45px; padding: 8px 13px; white-space: nowrap; }

@media (max-width: 1180px) {
  body { font-size: 16px; }
  .app-header { gap: 12px; padding-inline: 18px; }
  .operator-control, .date-control, .hour-control, .sync-button { padding-inline: 12px; }
  .operator-control { min-width: 185px; }
  .station-card { grid-template-columns: 100px minmax(0, 1fr); min-height: 300px; }
  .station-art { width: 100px; height: 100px; }
  .station-art svg { width: 57px; height: 57px; }
  .motor-panel { grid-template-columns: 62px minmax(180px, .65fr) minmax(410px, 1.35fr); }
  .reading-layout { grid-template-columns: minmax(285px, .72fr) minmax(470px, 1.28fr); }
  .hours-table-layout { grid-template-columns: minmax(0, 1.45fr) minmax(350px, .72fr); }
  .hours-table-toolbar { align-items: flex-start; }
  .hours-table-actions { flex-direction: column; }
}

@media (max-width: 1023px) {
  .app-header { position: static; flex-wrap: wrap; }
  .reminder-banner { position: static; }
  .brand-button { flex: 1 1 auto; }
  .header-controls { flex: 1 1 100%; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.25fr auto; border-top: 1px solid var(--line); }
  .operator-control, .date-control, .hour-control, .sync-button { justify-content: center; border-left: 0; }
  .date-control, .hour-control, .sync-button { border-left: 1px solid var(--line); }
  .operator-control strong { max-width: 220px; }
  .station-grid { grid-template-columns: 1fr; }
  .station-card { min-height: 250px; }
  .motor-panel { grid-template-columns: 62px 1fr; }
  .motor-control { grid-column: 1 / -1; }
  .reading-layout { grid-template-columns: 1fr; }
  .task-rail { border-right: 0; border-bottom: 1px solid var(--line); }
  .task-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .entry-panel { padding-bottom: 28px; }
  .admin-hour-grid { grid-template-columns: repeat(8, minmax(48px, 1fr)); }
  .admin-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auto-reading-card { grid-template-columns: 58px minmax(0, 1fr); }
  .confirm-auto-hours { grid-column: 1 / -1; width: 100%; max-width: none; }
  .hours-table-layout { grid-template-columns: 1fr; }
  .table-editor-host { position: static; max-height: none; }
  .hours-table-scroll { max-height: 640px; }
  .hours-table-toolbar { align-items: center; }
  .hours-table-actions { flex-direction: row; }
}

@media (max-width: 720px) {
  body { padding-bottom: 94px; }
  .brand-mark { width: 43px; height: 43px; }
  .brand-button strong { font-size: 20px; }
  .header-controls { grid-template-columns: 1fr 1fr; }
  .account-placeholder { position: absolute; right: 18px; top: 18px; margin: 0; }
  .operator-control { grid-column: 1 / -1; justify-content: flex-start; min-width: 0; border-bottom: 1px solid var(--line); }
  .operator-control strong { max-width: calc(100vw - 130px); }
  .date-control { grid-column: 1 / -1; border-bottom: 1px solid var(--line); }
  .sync-button { border-left: 1px solid var(--line); }
  .landing-view { padding: 24px 13px 34px; }
  .landing-heading { align-items: flex-start; flex-wrap: wrap; }
  .landing-tools { width: 100%; align-items: center; justify-content: space-between; flex-direction: row; }
  .landing-actions { flex-wrap: wrap; }
  .administration-button, .reports-button { min-height: 42px; padding: 7px 11px; font-size: 13px; }
  .live-clock { min-width: 110px; padding-left: 13px; }
  .live-clock span { display: none; }
  .live-clock strong { font-size: 27px; }
  .station-card { min-height: 0; grid-template-columns: 76px minmax(0, 1fr); gap: 18px; padding: 18px; border-radius: 16px; }
  .station-art { width: 76px; height: 76px; border-radius: 17px; }
  .station-art svg { width: 43px; height: 43px; }
  .station-card-title { font-size: 25px; }
  .station-card-description { font-size: 14px; }
  .station-card-status { margin-top: 15px; font-size: 16px; }
  .landing-note { align-items: flex-start; font-size: 14px; }
  .workspace-view { padding: 12px 9px 28px; }
  .workspace-heading { grid-template-columns: auto 1fr; gap: 10px; }
  .back-button { width: 50px; padding: 8px; font-size: 0; }
  .back-button svg { width: 25px; height: 25px; }
  .workspace-icon { width: 48px; height: 48px; }
  .workspace-title p { display: none; }
  .slot-summary { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; min-width: 0; padding: 8px 12px; border-left: 0; border-top: 1px solid var(--line); text-align: left; }
  .slot-summary strong { font-size: 23px; }
  .workspace-mode-row { align-items: stretch; flex-direction: column; gap: 8px; margin-bottom: 12px; }
  .workspace-reports-button { width: 100%; min-height: 48px; }
  .motor-panel { grid-template-columns: 56px 1fr; gap: 14px; padding: 16px 13px; }
  .engine-indicator { width: 54px; height: 54px; }
  .engine-indicator svg { width: 33px; height: 33px; }
  .motor-copy h2, .bca-info-panel h2 { font-size: 20px; }
  .motor-toggle button { min-height: 68px; font-size: 18px; }
  .motor-off-details { grid-template-columns: 1fr; }
  .bca-info-panel { padding: 15px 13px; }
  .task-rail { padding: 15px 12px; }
  .task-list { grid-template-columns: 1fr; }
  .task-item { min-height: 66px; }
  .entry-panel { padding: 22px 13px; }
  .field-title-row { display: block; }
  .field-heading-wrap { align-items: flex-start; }
  .field-visual { width: 48px; height: 48px; border-radius: 12px; }
  .field-visual svg { width: 28px; height: 28px; }
  .field-status { display: inline-block; margin-top: 9px; }
  .value-input-wrap input { min-height: 67px; }
  .numeric-keypad button { min-height: 57px; }
  .editor-actions { grid-template-columns: 1fr; position: sticky; bottom: 76px; z-index: 5; padding-top: 8px; background: #fff; }
  body:has(#offline-bar[hidden]) .editor-actions { bottom: max(8px, env(safe-area-inset-bottom)); }
  .confirm-warning { grid-column: auto; }
  .offline-bar { grid-template-columns: 34px 1fr auto; }
  .offline-bar small { max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .offline-bar > button span { display: none; }
  .app-dialog form, .queue-dialog-content { padding: 24px 15px 18px; }
  .operator-dialog-content { padding: 24px 15px 18px; }
  .reports-dialog-content { padding: 24px 15px 18px; }
  .report-period-block { padding: 12px; }
  .report-period-heading { grid-template-columns: 1fr; gap: 11px; }
  .report-file-card { grid-template-columns: 48px minmax(0, 1fr); }
  .report-file-icon { width: 46px; height: 46px; }
  .report-file-state { grid-column: 1 / -1; }
  .report-file-card .report-download-button { grid-column: 1 / -1; }
  .report-actions, .report-device-help { grid-template-columns: 1fr; }
  .report-actions > button, .report-download-button { min-height: 56px; }
  .operator-list { grid-template-columns: 1fr; }
  .dialog-actions, .queue-actions { grid-template-columns: 1fr; }
  .correction-compare { grid-template-columns: 1fr; }
  .correction-compare > svg { justify-self: center; transform: rotate(90deg); }
  .queue-item { grid-template-columns: 38px minmax(0, 1fr); }
  .queue-item > .queue-inline-action { grid-column: 2; justify-self: start; }
  .admin-dialog-content { padding: 23px 14px 17px; }
  .admin-tabs { align-items: stretch; }
  .admin-tabs button { min-height: 52px; }
  .admin-field-list, .admin-summary-grid { grid-template-columns: 1fr; }
  .admin-hour-grid { grid-template-columns: repeat(6, minmax(42px, 1fr)); }
  .admin-footer { display: grid; grid-template-columns: 1fr; }
  .admin-device-operator { grid-template-columns: 43px minmax(0, 1fr); }
  .admin-device-operator > small:last-child { grid-column: 1 / -1; max-width: none; }
  .admin-device-operator button { grid-column: 1 / -1; width: 100%; }
  .admin-operators-heading { align-items: stretch; flex-direction: column; }
  .admin-operator-row { grid-template-columns: 1fr; }
  .admin-operator-stations { display: grid; grid-template-columns: 1fr 1fr; }
  .auto-reading-card { grid-template-columns: 48px minmax(0, 1fr); padding: 14px; }
  .auto-reading-icon { width: 48px; height: 48px; }
  .workspace-tabs { width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 12px; }
  .workspace-tabs button { min-width: 0; min-height: 54px; padding: 7px 9px; font-size: 13px; white-space: normal; }
  .hours-table-toolbar { align-items: stretch; flex-direction: column; padding: 14px 12px; }
  .hours-table-actions { display: grid; grid-template-columns: 1fr; }
  .hours-table-actions button { width: 100%; min-height: 50px; white-space: normal; }
  .hours-progress { padding: 12px; }
  .hours-table-scroll { max-height: 590px; }
  .hours-table { min-width: 720px; }
  .hours-table thead th { height: 62px; padding: 7px 5px; }
  .hours-table tbody th { width: 68px; }
  .hours-table thead th:first-child { width: 68px; }
  .hours-table td { padding: 4px; }
  .hours-cell { min-height: 46px; padding-inline: 4px; }
  .hours-cell strong { font-size: 13px; }
  .hours-table-legend { padding: 11px 12px; }
  .table-editor-host .entry-panel { padding: 20px 13px; }
  .table-editor-host .editor-empty { min-height: 260px; }
  .reminder-banner { width: calc(100% - 18px); grid-template-columns: 43px minmax(0, 1fr); margin-top: 9px; padding: 9px; }
  .reminder-banner-icon { width: 43px; height: 43px; }
  .reminder-banner > button { grid-column: 1 / -1; width: 100%; }
  .automatic-assistant { grid-template-columns: 45px minmax(0, 1fr); padding: 12px; }
  .automatic-assistant-icon { width: 45px; height: 45px; }
  .automatic-assistant > button { grid-column: 1 / -1; width: 100%; }
  .admin-reminder-grid, .admin-reminder-stations > div, .notification-device-card { grid-template-columns: 1fr; }
  .notification-device-card button { width: 100%; }
}

@media (max-width: 420px) {
  .brand-button small { display: none; }
  .date-control input { width: 132px; }
  .landing-heading h1 { font-size: 29px; }
  .landing-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .administration-button, .reports-button { min-width: 0; padding-inline: 8px; font-size: 12px; }
  .station-card { grid-template-columns: 64px minmax(0, 1fr); gap: 13px; }
  .station-art { width: 64px; height: 64px; }
  .station-art svg { width: 36px; height: 36px; }
  .station-card-title { font-size: 22px; }
  .station-card-description { display: none; }
  .station-open { font-size: 14px; }
  .workspace-title h1 { font-size: 22px; }
  .motor-copy p { font-size: 14px; }
  .offline-bar strong { font-size: 13px; }
  .admin-kpis { grid-template-columns: 1fr 1fr; }
  .admin-hour-grid { grid-template-columns: repeat(4, minmax(43px, 1fr)); }
  .workspace-tabs button svg { display: none; }
  .hours-table-heading h2 { font-size: 21px; }
  .hours-progress-value { font-size: 15px; }
}

/* V8 visual system: distinct station identities, clearer hierarchy and touch-first flow. */
:root {
  --cazan: #d98205;
  --cazan-dark: #9a5c00;
  --cazan-soft: #fff7e8;
  --cazan-line: #efc477;
  --bca: #078f8a;
  --bca-dark: #056c69;
  --bca-soft: #eaf8f7;
  --bca-line: #81cbc7;
  --panel-shadow: 0 12px 32px rgba(7, 26, 66, .07);
}

.brand-mark {
  box-shadow: 0 8px 18px rgba(11, 87, 227, .2);
}
.reminder-banner {
  width: min(1540px, calc(100% - 64px));
}
.operator-control > svg:first-child {
  width: 40px;
  height: 40px;
  padding: 9px;
  color: var(--blue);
  background: var(--blue-soft);
  border: 1px solid #c7d9f7;
  border-radius: 50%;
}
.administration-button,
.reports-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}
.administration-button svg,
.reports-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.landing-view {
  padding: clamp(24px, 3vw, 42px) clamp(20px, 3.8vw, 60px) 36px;
}
.landing-heading {
  align-items: center;
  margin-bottom: clamp(20px, 2.4vw, 30px);
}
.landing-heading h1 {
  font-size: clamp(34px, 3.6vw, 50px);
}
.station-grid {
  grid-template-columns: 1fr;
  gap: 16px;
}
.station-card {
  --station-accent: var(--blue);
  --station-accent-dark: var(--blue-dark);
  --station-soft: var(--blue-soft);
  --station-line: #91afe6;
  position: relative;
  min-height: 188px;
  grid-template-columns: 136px minmax(0, 1fr) minmax(205px, 265px);
  grid-template-rows: 1fr;
  gap: 28px;
  align-items: center;
  padding: 24px 28px 24px 36px;
  overflow: hidden;
  border-color: var(--line);
  border-radius: 18px;
  box-shadow: var(--panel-shadow);
}
.station-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 8px;
  background: var(--station-accent);
}
.station-card-cazan {
  --station-accent: var(--cazan);
  --station-accent-dark: var(--cazan-dark);
  --station-soft: var(--cazan-soft);
  --station-line: var(--cazan-line);
}
.station-card-bca {
  --station-accent: var(--bca);
  --station-accent-dark: var(--bca-dark);
  --station-soft: var(--bca-soft);
  --station-line: var(--bca-line);
}
.station-card:hover {
  border-color: var(--station-line);
  box-shadow: 0 16px 40px rgba(7, 26, 66, .12);
}
.station-art {
  width: 126px;
  height: 126px;
  color: var(--station-accent-dark);
  background: var(--station-soft);
  border-color: var(--station-line);
  border-radius: 24px;
}
.station-art svg {
  width: 78px;
  height: 78px;
  stroke-width: 1.35;
}
.station-card-copy {
  align-self: center;
}
.station-card-title {
  font-size: clamp(29px, 2.5vw, 37px);
}
.station-card-description {
  margin-top: 5px;
}
.station-card-status {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 19px;
  color: var(--station-accent-dark);
}
.station-card-status::before {
  content: "";
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  background: var(--station-accent);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--station-line);
}
.station-card-status.success::before { background: var(--green); box-shadow: 0 0 0 2px #8dc99d; }
.station-card-status.danger::before { background: var(--red); box-shadow: 0 0 0 2px #e3a1a1; }
.station-open {
  grid-column: 3;
  grid-row: 1;
  align-self: stretch;
  justify-content: center;
  gap: 22px;
  padding: 0 8px 0 28px;
  color: var(--blue);
  border-top: 0;
  border-left: 1px solid var(--line);
  font-size: 18px;
}
.station-open svg {
  width: 29px;
  height: 29px;
}
.landing-note {
  margin-top: 20px;
}

.workspace-view {
  --workspace-accent: var(--blue);
  --workspace-accent-dark: var(--blue-dark);
  --workspace-soft: var(--blue-soft);
  --workspace-line: #9ab7e7;
}
.workspace-view[data-station="cazan-cogenerare"] {
  --workspace-accent: var(--cazan);
  --workspace-accent-dark: var(--cazan-dark);
  --workspace-soft: var(--cazan-soft);
  --workspace-line: var(--cazan-line);
}
.workspace-view[data-station="poarta-bca"] {
  --workspace-accent: var(--bca);
  --workspace-accent-dark: var(--bca-dark);
  --workspace-soft: var(--bca-soft);
  --workspace-line: var(--bca-line);
}
.workspace-title {
  padding-left: 18px;
  border-left: 5px solid var(--workspace-accent);
}
.workspace-icon {
  color: var(--workspace-accent-dark);
  background: var(--workspace-soft);
  border: 1px solid var(--workspace-line);
}
.workspace-icon svg {
  width: 39px;
  height: 39px;
  stroke-width: 1.4;
}
.workspace-tabs button.selected {
  background: var(--workspace-accent-dark);
  box-shadow: 0 4px 13px color-mix(in srgb, var(--workspace-accent) 25%, transparent);
}
.bca-info-panel {
  grid-template-columns: 66px minmax(0, 1fr) minmax(270px, .75fr);
  gap: 18px;
  padding-left: 18px;
  background: #fff;
  border-color: var(--bca-line);
  border-left: 5px solid var(--bca);
  box-shadow: 0 8px 22px rgba(7, 26, 66, .045);
}
.info-icon {
  color: var(--bca-dark);
  background: var(--bca-soft);
  border: 1px solid var(--bca-line);
}
.info-icon svg {
  width: 38px;
  height: 38px;
  stroke-width: 1.4;
}
.info-guidance {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  padding-left: 18px;
  color: var(--muted);
  border-left: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.4;
}
.info-guidance svg {
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--bca);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.reading-layout {
  min-height: 480px;
  grid-template-columns: minmax(300px, .62fr) minmax(0, 1.38fr);
  border-color: #d5deea;
  border-radius: 18px;
  box-shadow: var(--panel-shadow);
}
.task-rail {
  background: #f8fafc;
}
.task-heading > span {
  color: var(--workspace-accent-dark);
  background: var(--workspace-soft);
}
.task-item {
  position: relative;
  overflow: hidden;
}
.task-item.active {
  background: var(--workspace-soft);
  border-color: var(--workspace-line);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--workspace-accent) 13%, transparent);
}
.task-item.active::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--workspace-accent);
}
.task-item.active .task-number {
  color: #fff;
  background: var(--workspace-accent);
}
.task-item.active .task-state,
.field-status:not(.complete):not(.skipped),
.value-label {
  color: var(--workspace-accent-dark);
}
.field-status:not(.complete):not(.skipped) {
  background: var(--workspace-soft);
}
.previous-reading {
  border-left-color: var(--workspace-line);
}
.value-input-wrap input {
  border-color: var(--workspace-accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--workspace-accent) 16%, transparent);
}
.numeric-keypad button:hover {
  color: var(--workspace-accent-dark);
  background: var(--workspace-soft);
  border-color: var(--workspace-line);
}
#guided-reading-layout #manual-reading-controls {
  display: grid;
  grid-template-columns: minmax(290px, 1.15fr) minmax(240px, .85fr);
  grid-template-rows: auto auto auto 1fr;
  gap: 10px 16px;
  align-items: start;
}
#guided-reading-layout .entry-panel { padding: clamp(20px, 2.1vw, 30px); }
#guided-reading-layout #manual-reading-controls > .previous-reading,
#guided-reading-layout #manual-reading-controls > .correction-hint,
#guided-reading-layout #manual-reading-controls > .value-label,
#guided-reading-layout #manual-reading-controls > .value-input-wrap {
  grid-column: 1;
  margin-bottom: 0;
}
#guided-reading-layout .numeric-keypad {
  grid-column: 2;
  grid-row: 1 / span 4;
  align-self: stretch;
  margin-top: 0;
}
#guided-reading-layout .numeric-keypad button {
  min-height: 61px;
}
.confirm-reading {
  border-radius: 11px;
  box-shadow: 0 8px 18px rgba(11, 87, 227, .16);
}

@media (max-width: 1180px) {
  .station-card {
    min-height: 174px;
    grid-template-columns: 112px minmax(0, 1fr) minmax(175px, 220px);
    gap: 22px;
    padding: 22px 24px 22px 30px;
  }
  .station-art { width: 106px; height: 106px; }
  .station-art svg { width: 65px; height: 65px; }
  .station-card-status { margin-top: 14px; }
  .station-open { padding-left: 22px; font-size: 16px; }
  .bca-info-panel { grid-template-columns: 58px minmax(0, 1fr) minmax(230px, .65fr); }
  #guided-reading-layout #manual-reading-controls { grid-template-columns: minmax(260px, 1fr) minmax(220px, .75fr); }
  .reading-layout { grid-template-columns: minmax(285px, .68fr) minmax(0, 1.32fr); }
}

@media (max-width: 900px) {
  .station-card {
    grid-template-columns: 96px minmax(0, 1fr) 160px;
    gap: 18px;
  }
  .station-art { width: 92px; height: 92px; }
  .station-art svg { width: 56px; height: 56px; }
  .station-card-description { font-size: 14px; }
  .station-open { padding-left: 16px; font-size: 15px; }
  .bca-info-panel { grid-template-columns: 58px minmax(0, 1fr); }
  .info-guidance { grid-column: 1 / -1; padding: 11px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .reading-layout { grid-template-columns: 1fr; }
  .task-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .reminder-banner { width: calc(100% - 18px); }
  .operator-control > svg:first-child { width: 36px; height: 36px; padding: 8px; }
  .landing-heading { margin-bottom: 18px; }
  .station-card {
    grid-template-columns: 76px minmax(0, 1fr);
    grid-template-rows: 1fr auto;
    gap: 15px 17px;
    padding: 18px 17px 15px 23px;
  }
  .station-art { width: 74px; height: 74px; border-radius: 17px; }
  .station-art svg { width: 46px; height: 46px; }
  .station-card-title { font-size: 25px; }
  .station-card-status { margin-top: 12px; }
  .station-open {
    grid-column: 1 / -1;
    grid-row: 2;
    min-height: 49px;
    justify-content: space-between;
    padding: 11px 2px 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
  .workspace-title { padding-left: 11px; border-left-width: 4px; }
  .workspace-icon { width: 50px; height: 50px; }
  .workspace-icon svg { width: 32px; height: 32px; }
  .bca-info-panel { grid-template-columns: 50px minmax(0, 1fr); }
  .info-icon { width: 48px; height: 48px; }
  .info-icon svg { width: 31px; height: 31px; }
  #guided-reading-layout #manual-reading-controls { display: block; }
  #guided-reading-layout #manual-reading-controls > .previous-reading,
  #guided-reading-layout #manual-reading-controls > .correction-hint { margin-bottom: 14px; }
  #guided-reading-layout #manual-reading-controls > .value-label { margin-bottom: 7px; }
  #guided-reading-layout .numeric-keypad { margin-top: 14px; }
}

@media (max-width: 420px) {
  .station-card { grid-template-columns: 62px minmax(0, 1fr); }
  .station-art { width: 60px; height: 60px; }
  .station-art svg { width: 38px; height: 38px; }
  .station-card-status { font-size: 15px; }
  .station-card-meta { font-size: 12px; }
  .administration-button, .reports-button { min-height: 46px; }
  .administration-button svg,
  .reports-button svg { width: 18px; height: 18px; }
}

@media (display-mode: standalone) {
  .app-header { padding-top: max(12px, env(safe-area-inset-top)); }
}

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

/* V9 · autentificare, administrare și dashboard */
.auth-view {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: minmax(420px, .9fr) minmax(520px, 1.1fr);
  min-height: 100dvh;
  color: var(--navy);
  background: #fff;
  overflow: auto;
}
.auth-identity {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 42px;
  padding: clamp(34px, 5vw, 78px);
  overflow: hidden;
  background: #f7f9fc;
  border-right: 1px solid var(--line);
}
.auth-brand { display: flex; align-items: center; gap: 18px; }
.auth-soceram-logo { width: 78px; height: 98px; padding: 6px; border-radius: 18px; }
.auth-brand strong, .auth-brand small { display: block; }
.auth-brand strong { font-size: clamp(25px, 2.4vw, 39px); letter-spacing: -.035em; }
.auth-brand small { margin-top: 5px; color: var(--muted); font-size: 15px; font-weight: 650; }
.auth-illustration {
  align-self: center;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  place-items: center;
  gap: 18px;
  width: min(620px, 100%);
  margin: 0 auto;
  color: var(--navy);
}
.auth-illustration .auth-factory { grid-column: 1 / -1; width: min(420px, 80%); height: 260px; color: var(--navy); stroke-width: .9; }
.auth-illustration > span { width: 96px; height: 96px; display: grid; place-items: center; color: var(--blue); background: #fff; border: 2px solid currentColor; border-radius: 50%; }
.auth-illustration > span.amber { color: var(--cazan-dark, #9a5c00); }
.auth-illustration > span.teal { color: var(--bca-dark, #056c69); }
.auth-illustration > span svg { width: 50px; height: 50px; }
.auth-illustration svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.auth-form-panel { display: grid; place-items: center; padding: clamp(28px, 6vw, 90px); }
.login-form { width: min(620px, 100%); }
.login-company-brand { display: none; align-items: center; gap: 12px; margin-bottom: 22px; }
.login-company-brand .soceram-logo-frame { width: 52px; height: 65px; padding: 4px; border-radius: 12px; }
.login-company-brand strong, .login-company-brand small { display: block; }
.login-company-brand strong { color: var(--navy); font-size: 18px; letter-spacing: -.02em; }
.login-company-brand small { margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 700; }
.login-shield { width: 78px; height: 78px; display: grid; place-items: center; margin-bottom: 18px; color: var(--navy); background: #f2f7ff; border: 1px solid #b9cbea; border-radius: 24px; }
.login-shield svg { width: 42px; height: 42px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.login-form h1 { margin: 0; font-size: clamp(40px, 4vw, 64px); line-height: 1; letter-spacing: -.05em; }
.login-form > p:first-of-type { margin: 12px 0 38px; color: var(--muted); font-size: clamp(19px, 2vw, 26px); }
.login-form > label:not(.remember-session) { display: grid; gap: 8px; margin-top: 20px; color: var(--navy); font-size: 17px; font-weight: 750; }
.login-form input[type="text"], .login-form input[type="password"], .login-form input:not([type]) { width: 100%; min-height: 60px; padding: 12px 16px; color: var(--navy); background: #fff; border: 1px solid var(--line-strong); border-radius: 10px; font-size: 19px; }
.remember-session { min-height: 48px; display: flex; align-items: center; gap: 12px; margin-top: 18px; color: var(--text); }
.remember-session input { width: 24px; height: 24px; accent-color: var(--blue); }
.login-error { min-height: 24px; margin: 10px 0 0; color: var(--red); font-size: 14px; font-weight: 750; }
.login-submit { width: 100%; min-height: 66px; display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 6px; color: #fff; background: var(--blue); border: 0; border-radius: 11px; box-shadow: 0 12px 28px rgba(11, 87, 227, .18); font-size: 22px; font-weight: 850; }
.login-submit:hover { background: var(--blue-dark); }
.login-submit svg, .login-help svg, .login-security svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.login-help, .login-security { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 15px; }
.login-help { margin: 23px 0 0; }
.login-security { margin: 23px 0 0; padding-top: 20px; border-top: 1px solid var(--line); }
.login-security svg { color: var(--bca-dark, #056c69); }

.app-header { justify-content: flex-start; }
.main-nav { display: flex; align-items: center; gap: 4px; margin-right: auto; }
.main-nav button { min-height: 46px; display: flex; align-items: center; gap: 8px; padding: 9px 13px; color: var(--muted); background: transparent; border: 0; border-radius: 9px; font-size: 14px; font-weight: 800; }
.main-nav button.selected { color: var(--blue); background: var(--blue-soft); }
.main-nav button svg { width: 20px; height: 20px; }
.account-control, .logout-button { min-height: 48px; display: flex; align-items: center; gap: 9px; padding: 7px 11px; color: var(--navy); background: #fff; border: 0; border-left: 1px solid var(--line); }
.account-control > svg { width: 34px; height: 34px; padding: 7px; color: var(--blue); background: var(--blue-soft); border-radius: 50%; }
.account-control small, .account-control strong { display: block; max-width: 125px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.account-control small { color: var(--muted); font-size: 10px; text-transform: capitalize; }
.account-control strong { margin-top: 2px; font-size: 13px; }
.logout-button { color: var(--muted); font-size: 13px; font-weight: 800; }
.logout-button svg { width: 20px; height: 20px; }

.dashboard-view { min-height: calc(100vh - 108px); display: grid; grid-template-columns: 214px minmax(0, 1fr); margin: 0; background: #fff; }
.dashboard-side-nav { min-height: calc(100vh - 82px); display: flex; flex-direction: column; gap: 6px; padding: 22px 12px; background: #fbfcfe; border-right: 1px solid var(--line); }
.dashboard-side-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; padding: 0 9px 18px; border-bottom: 1px solid var(--line); }
.dashboard-side-brand > svg { width: 34px; height: 34px; color: var(--blue); }
.dashboard-side-brand > .soceram-logo-frame { width: 34px; height: 43px; padding: 3px; border-radius: 9px; }
.dashboard-side-brand strong, .dashboard-side-brand small { display: block; }
.dashboard-side-brand strong { font-size: 14px; }
.dashboard-side-brand small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.dashboard-side-nav button { min-height: 48px; display: flex; align-items: center; gap: 11px; padding: 10px 12px; color: var(--text); background: transparent; border: 0; border-radius: 8px; font-size: 14px; font-weight: 750; text-align: left; }
.dashboard-side-nav button svg { width: 21px; height: 21px; }
.dashboard-side-nav button.selected { color: #fff; background: var(--blue); }
.dashboard-canvas { min-width: 0; padding: 24px clamp(18px, 2.5vw, 38px) 42px; }
.dashboard-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.dashboard-heading h1 { margin: 0; color: var(--navy); font-size: clamp(29px, 3vw, 42px); letter-spacing: -.04em; }
.dashboard-heading p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.dashboard-filters { display: flex; align-items: end; gap: 9px; }
.dashboard-filters label { display: grid; gap: 4px; color: var(--muted); font-size: 11px; font-weight: 800; }
.dashboard-filters input { min-height: 46px; padding: 8px 11px; color: var(--navy); background: #fff; border: 1px solid var(--line-strong); border-radius: 9px; font-weight: 750; }
.dashboard-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: 22px; border-block: 1px solid var(--line); }
.dashboard-kpi { min-width: 0; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 10px; align-items: center; padding: 17px 16px; border-right: 1px solid var(--line); }
.dashboard-kpi:last-child { border-right: 0; }
.dashboard-kpi-icon { width: 42px; height: 42px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); border-radius: 10px; }
.dashboard-kpi.amber .dashboard-kpi-icon { color: var(--cazan-dark, #9a5c00); background: var(--cazan-soft, #fff6e7); }
.dashboard-kpi.teal .dashboard-kpi-icon { color: var(--bca-dark, #056c69); background: var(--bca-soft, #eaf9f7); }
.dashboard-kpi.danger .dashboard-kpi-icon { color: var(--red); background: var(--red-soft); }
.dashboard-kpi svg { width: 24px; height: 24px; }
.dashboard-side-brand > svg,
.dashboard-kpi-icon svg,
.dashboard-chart-empty svg,
.dashboard-station-state > svg,
.admin-side-brand > svg,
.admin-notification-row > svg,
.handover-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dashboard-kpi span, .dashboard-kpi strong, .dashboard-kpi small { display: block; }
.dashboard-kpi span { color: var(--muted); font-size: 11px; font-weight: 750; }
.dashboard-kpi strong { margin-top: 3px; color: var(--navy); font-size: clamp(22px, 2vw, 30px); line-height: 1; }
.dashboard-kpi small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.dashboard-primary-grid { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(285px, .8fr); gap: 14px; margin-top: 18px; }
.dashboard-secondary-grid { display: grid; grid-template-columns: minmax(320px, .85fr) minmax(0, 1.15fr); gap: 14px; margin-top: 14px; }
.dashboard-chart-panel, .dashboard-stations-panel, .dashboard-breakdown, .dashboard-activity { min-width: 0; padding: 16px 17px; background: #fff; border: 1px solid var(--line); border-radius: 11px; }
.dashboard-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dashboard-panel-heading h2 { margin: 0; color: var(--navy); font-size: 17px; }
.dashboard-panel-heading p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.dashboard-chart-switch { display: flex; padding: 3px; background: #edf1f7; border-radius: 8px; }
.dashboard-chart-switch button { min-height: 36px; padding: 6px 18px; color: var(--muted); background: transparent; border: 0; border-radius: 6px; font-size: 12px; font-weight: 800; }
.dashboard-chart-switch button.selected { color: #fff; background: var(--blue); }
.dashboard-chart { width: 100%; height: 330px; margin-top: 10px; overflow: visible; }
.dashboard-chart text { fill: var(--muted); font-family: "Segoe UI", sans-serif; font-size: 11px; }
.dashboard-chart .grid { stroke: #dfe6f0; stroke-width: 1; stroke-dasharray: 3 4; }
.dashboard-chart .axis { stroke: #aebbd0; stroke-width: 1; }
.dashboard-chart .series-energy, .dashboard-chart .series-gas, .dashboard-chart .series-thermal { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.dashboard-chart .series-energy { stroke: var(--blue); }
.dashboard-chart .series-thermal { stroke: var(--cazan, #d98205); }
.dashboard-chart .series-gas { stroke: var(--bca, #078f8a); }
.dashboard-chart .point { stroke: #fff; stroke-width: 2; }
.dashboard-chart-empty { min-height: 315px; display: grid; place-items: center; align-content: center; gap: 8px; color: var(--muted); text-align: center; }
.dashboard-chart-empty svg { width: 50px; height: 50px; color: #8ca2c4; }
.dashboard-chart-empty strong { color: var(--navy); font-size: 16px; }
.dashboard-chart-empty span { max-width: 430px; font-size: 12px; line-height: 1.45; }
.dashboard-station { padding: 16px 0; border-bottom: 1px solid var(--line); }
.dashboard-station:last-child { border-bottom: 0; }
.dashboard-station-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dashboard-station-title strong { color: var(--navy); font-size: 14px; }
.dashboard-station-title span { color: var(--muted); font-size: 11px; font-weight: 800; }
.dashboard-station-state { display: flex; align-items: center; gap: 11px; margin-top: 13px; }
.dashboard-station-state > svg { width: 48px; height: 48px; color: var(--cazan-dark, #9a5c00); }
.dashboard-station.poarta .dashboard-station-state > svg { color: var(--bca-dark, #056c69); }
.dashboard-station-state strong, .dashboard-station-state small { display: block; }
.dashboard-station-state strong { font-size: 19px; }
.dashboard-station-state small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.progress-track { width: 100%; height: 9px; display: block; margin-top: 12px; overflow: hidden; border-radius: 999px; }
.progress-track .background { fill: #e9edf4; }
.progress-track .value { fill: var(--green); }
.progress-track .skipped { fill: var(--cazan, #d98205); }
.progress-track .pending { fill: #bdc8d9; }
.dashboard-breakdown-row { display: grid; grid-template-columns: 132px minmax(0, 1fr) 72px; gap: 10px; align-items: center; margin-top: 16px; }
.dashboard-breakdown-row strong { color: var(--navy); font-size: 13px; }
.dashboard-breakdown-row small { color: var(--muted); font-size: 11px; text-align: right; }
.dashboard-activity-table { margin-top: 12px; overflow-x: auto; }
.dashboard-activity-row { min-width: 560px; display: grid; grid-template-columns: 72px 1.2fr 1fr 1.6fr .75fr; gap: 10px; align-items: center; min-height: 42px; padding: 7px 5px; border-top: 1px solid var(--line); font-size: 11px; }
.dashboard-activity-row.header { color: var(--muted); border-top: 0; font-weight: 850; }
.dashboard-activity-row strong { color: var(--navy); font-size: 11px; }
.dashboard-empty-row { padding: 36px 12px; color: var(--muted); text-align: center; font-size: 12px; }
.text-button { min-height: 40px; padding: 6px 8px; color: var(--blue); background: transparent; border: 0; font-size: 12px; font-weight: 800; }

.admin-dialog { width: min(1520px, calc(100vw - 20px)); height: min(950px, calc(100dvh - 20px)); max-height: calc(100dvh - 20px); overflow: hidden; border-radius: 12px; }
.admin-dialog-content.admin-shell { height: 100%; display: grid; grid-template-columns: 245px minmax(0, 1fr); padding: 0; }
.admin-dialog .dialog-close { z-index: 4; }
.admin-sidebar { min-height: 0; padding: 24px 12px; background: #fbfcfe; border-right: 1px solid var(--line); }
.admin-side-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 18px; padding: 0 10px 19px; border-bottom: 1px solid var(--line); }
.admin-side-brand > svg { width: 35px; height: 35px; color: var(--blue); }
.admin-side-brand > .soceram-logo-frame { width: 35px; height: 44px; padding: 3px; border-radius: 9px; }
.admin-side-brand strong, .admin-side-brand small { display: block; }
.admin-side-brand strong { color: var(--navy); font-size: 15px; }
.admin-side-brand small { margin-top: 2px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.admin-dialog .admin-tabs { display: grid; gap: 5px; margin: 0; padding: 0; background: transparent; }
.admin-dialog .admin-tabs button { min-height: 49px; display: flex; align-items: center; justify-content: flex-start; gap: 11px; padding: 10px 12px; color: var(--text); border-radius: 8px; text-align: left; }
.admin-dialog .admin-tabs button svg { width: 21px; height: 21px; }
.admin-dialog .admin-tabs button[aria-selected="true"] { color: var(--blue); background: var(--blue-soft); box-shadow: none; }
.admin-main { min-width: 0; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto auto; overflow: hidden; }
.admin-dialog .admin-heading { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 74px 16px 28px; border-bottom: 1px solid var(--line); }
.admin-heading h2 { font-size: 28px; }
.admin-session { text-align: right; }
.admin-session small, .admin-session strong { display: block; }
.admin-session small { color: var(--muted); font-size: 10px; }
.admin-session strong { margin-top: 3px; color: var(--navy); font-size: 13px; }
.admin-dialog .admin-section { min-height: 0; padding: 22px 28px 110px; overflow: auto; }
.admin-dialog .admin-footer { position: absolute; right: 0; bottom: 0; left: 245px; z-index: 3; min-height: 72px; align-items: center; margin: 0; padding: 10px 28px; background: rgba(255,255,255,.98); box-shadow: 0 -8px 20px rgba(7,26,66,.06); }
.admin-dialog .admin-error { position: absolute; right: 390px; bottom: 22px; z-index: 4; margin: 0; }
.admin-dialog .admin-error:empty { display: none; }
.admin-dialog .admin-field-list { display: grid; grid-template-columns: 1fr; gap: 10px; }
.admin-field-row { display: grid; grid-template-columns: 58px minmax(220px, 1.2fr) minmax(145px, .65fr) minmax(150px, .7fr) 104px; gap: 12px; min-height: 82px; padding: 12px 14px; cursor: default; }
.admin-field-row.station-cazan { border-left: 4px solid var(--cazan, #d98205); }
.admin-field-row.station-bca { border-left: 4px solid var(--bca, #078f8a); }
.admin-field-row .field-toggle { display: grid; place-items: center; }
.admin-field-row .field-toggle input { width: 24px; height: 24px; }
.admin-field-row .field-copy strong { font-size: 14px; }
.admin-field-row .field-copy small { font-size: 11px; }
.admin-field-control { display: grid; gap: 5px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.admin-field-control select, .admin-field-control input { width: 100%; min-height: 42px; padding: 7px 9px; color: var(--navy); background: #fff; border: 1px solid var(--line-strong); border-radius: 8px; font-size: 12px; font-weight: 750; text-transform: none; }
.admin-field-flags { display: grid; gap: 5px; align-content: center; }
.admin-field-flags label { min-height: 28px; display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 750; }
.admin-field-flags input { width: 18px; height: 18px; accent-color: var(--blue); }
.admin-user-list { display: grid; gap: 9px; margin: 13px 0 26px; }
.admin-user-card { display: grid; gap: 16px; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 8px 24px rgba(14, 33, 66, .055); }
.admin-user-card.new { background: linear-gradient(145deg, #f4f8ff, #fff); border-color: #a8c4ef; }
.admin-user-card.security-locked { background: #fff8f6; border-color: #f2b8aa; box-shadow: inset 4px 0 0 #d9482f; }
.admin-user-card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.admin-user-card-head > span:first-child { min-width: 0; }
.admin-user-card-head strong, .admin-user-card-head small { display: block; }
.admin-user-card-head > span:first-child > strong { color: var(--navy); font-size: 16px; }
.admin-user-card-head small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.admin-user-controls { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 12px; }
.admin-user-controls > label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 700; }
.admin-user-controls input, .admin-user-controls select { width: 100%; min-height: 46px; padding: 8px 10px; color: var(--navy); background: #fff; border: 1px solid var(--line-strong); border-radius: 9px; font: inherit; }
.admin-user-controls .admin-user-active { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 8px 10px; background: #f7f9fd; border: 1px solid var(--line); border-radius: 9px; }
.admin-user-active input { width: 18px; min-height: 18px; }
.admin-user-active span strong, .admin-user-active span small { display: block; }
.admin-user-stations { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; padding: 12px; background: #f7f9fd; border: 1px solid var(--line); border-radius: 10px; }
.admin-user-stations legend { padding: 0 5px; color: var(--navy); font-size: 11px; font-weight: 800; }
.admin-user-stations label { display: flex; align-items: center; gap: 6px; min-height: 34px; padding: 5px 9px; color: var(--navy); background: #fff; border: 1px solid var(--line); border-radius: 8px; font-size: 11px; }
.admin-capability-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.admin-capability-groups fieldset { display: grid; align-content: start; gap: 6px; min-width: 0; padding: 10px; background: #f8faff; border: 1px solid var(--line); border-radius: 10px; }
.admin-capability-groups legend { padding: 0 5px; color: var(--blue); font-size: 10px; font-weight: 900; letter-spacing: .055em; text-transform: uppercase; }
.admin-capability-option { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: start; gap: 8px; min-height: 44px; padding: 7px; border-radius: 8px; cursor: pointer; }
.admin-capability-option:hover { background: #fff; }
.admin-capability-option input { margin-top: 2px; }
.admin-capability-option strong, .admin-capability-option small { display: block; }
.admin-capability-option strong { color: var(--navy); font-size: 11px; }
.admin-capability-option small { margin-top: 2px; color: var(--muted); font-size: 9px; line-height: 1.35; }
.admin-capability-admin { display: grid; grid-template-columns: 36px minmax(0, 1fr); align-items: center; gap: 10px; padding: 12px; color: #145c38; background: #eefaf4; border: 1px solid #b7e4ca; border-radius: 10px; }
.admin-capability-admin svg { width: 26px; height: 26px; }
.admin-capability-admin strong, .admin-capability-admin small { display: block; }
.admin-capability-admin small { margin-top: 3px; color: #3d7058; font-size: 10px; }
.admin-user-row { display: grid; grid-template-columns: minmax(170px, 1.1fr) 130px minmax(230px, 1fr) 80px auto; gap: 10px; align-items: center; min-height: 64px; padding: 9px 12px; background: #f8faff; border: 1px solid var(--line); border-radius: 9px; }
.admin-user-row.with-password { grid-template-columns: minmax(150px, 1fr) 115px minmax(205px, 1fr) minmax(170px, .85fr) 72px auto; }
.admin-user-row strong, .admin-user-row small { display: block; }
.admin-user-row strong { color: var(--navy); font-size: 13px; }
.admin-user-row small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.admin-user-row select, .admin-user-row input[type="text"], .admin-user-row input[type="password"] { min-width: 0; min-height: 44px; padding: 7px 8px; color: var(--navy); background: #fff; border: 1px solid var(--line-strong); border-radius: 7px; font-size: 12px; }
.admin-user-row.new { background: var(--blue-soft); border-color: #a8c4ef; }
.admin-user-row.new > span:first-child { display: grid; gap: 5px; }
.admin-user-row.security-locked { background: #fff7f5; border-color: #f2b8aa; box-shadow: inset 3px 0 0 #d9482f; }
.security-lock-status { display: inline-flex !important; width: fit-content; margin-top: 5px !important; padding: 3px 7px; color: #9f2f1d !important; background: #ffe1da; border-radius: 999px; font-size: 9px !important; font-weight: 800; letter-spacing: .02em; }
.security-lock-status.ready { color: #18723b !important; background: #e3f6e9; }
.security-lock-status.warning { color: #8a5500 !important; background: #fff0c7; }
.admin-user-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.admin-user-actions .security-unlock { color: #9f2f1d; border-color: #e9a493; background: #fff; }
.admin-email-provider { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 12px; margin-bottom: 14px; padding: 14px; background: #fff9ea; border: 1px solid #ecd99d; border-radius: 12px; }
.admin-email-provider.configured { background: #effaf5; border-color: #b9dfcb; }
.admin-email-provider.degraded { background: #fff4e8; border-color: #efc38f; }
.admin-email-provider strong, .admin-email-provider small { display: block; }
.admin-email-provider strong { color: var(--navy); }
.admin-email-provider small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.admin-email-enabled { margin-bottom: 14px; }
.admin-email-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.admin-email-field { display: grid; align-content: start; gap: 7px; color: var(--navy); font-size: 11px; font-weight: 800; }
.admin-email-field.wide { grid-row: span 2; }
.admin-email-field input, .admin-email-field select, .admin-email-field textarea { width: 100%; min-height: 46px; padding: 10px; color: var(--navy); background: #fff; border: 1px solid var(--line-strong); border-radius: 9px; font: inherit; resize: vertical; }
.admin-email-field small { color: var(--muted); font-size: 9px; font-weight: 500; }
.admin-email-attachments { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; padding: 14px; background: #f7f9fd; border: 1px solid var(--line); border-radius: 10px; }
.admin-email-attachments legend { padding: 0 5px; color: var(--navy); font-size: 11px; font-weight: 800; }
.admin-email-attachments label { display: flex; align-items: center; gap: 7px; min-height: 40px; padding: 7px 10px; background: #fff; border: 1px solid var(--line); border-radius: 8px; color: var(--navy); font-size: 11px; }
.admin-email-explanation { display: grid; gap: 4px; margin: 14px 0; padding: 12px 14px; color: #31506f; background: #eef6ff; border-left: 4px solid var(--blue); border-radius: 8px; }
.admin-email-explanation span { font-size: 10px; line-height: 1.5; }
.admin-email-actions { display: flex; justify-content: flex-end; gap: 9px; }
.admin-email-feedback { min-height: 22px; margin: 10px 0 0; color: var(--muted); font-size: 11px; text-align: right; }
.admin-shift-stations { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 16px 0 18px; }
.admin-shift-stations button { min-height: 74px; display: flex; align-items: center; gap: 13px; padding: 12px 14px; color: var(--muted); background: #fff; border: 1px solid var(--line-strong); border-radius: 11px; text-align: left; }
.admin-shift-stations button > svg { width: 38px; height: 38px; flex: 0 0 auto; padding: 8px; color: var(--blue); background: var(--blue-soft); border-radius: 10px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.admin-shift-stations button span, .admin-shift-stations button strong, .admin-shift-stations button small { min-width: 0; display: block; }
.admin-shift-stations button strong { color: var(--navy); font-size: 14px; }
.admin-shift-stations button small { margin-top: 4px; font-size: 10px; font-weight: 750; }
.admin-shift-stations button[aria-selected="true"] { color: var(--blue); background: var(--blue-soft); border-color: var(--blue); box-shadow: 0 0 0 2px rgba(11,87,227,.1); }
.admin-shift-workspace { padding: 18px; background: #fbfcff; border: 1px solid var(--line); border-radius: 12px; }
.admin-shift-workspace[data-station="cazan-cogenerare"] { border-top: 4px solid var(--cazan, #d98205); }
.admin-shift-workspace[data-station="poarta-bca"] { border-top: 4px solid var(--bca, #078f8a); }
.admin-shift-station-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 4px; }
.admin-shift-station-icon, .admin-shift-reminder-icon { width: 45px; height: 45px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); border-radius: 11px; }
.admin-shift-station-icon svg, .admin-shift-reminder-icon svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.admin-shift-station-heading small, .admin-shift-station-heading strong { display: block; }
.admin-shift-station-heading small { color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.admin-shift-station-heading strong { margin-top: 3px; color: var(--navy); font-size: 17px; }
.admin-shift-policy-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.admin-shift-reminder-card { display: grid; grid-template-columns: 45px minmax(230px, 1fr) 190px; gap: 12px; align-items: center; margin-top: 10px; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.admin-shift-reminder-card .admin-policy-switch.compact { min-height: 48px; margin: 0; padding: 0; background: transparent; border: 0; }
.admin-shift-lead { position: relative; display: grid; gap: 4px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.admin-shift-lead input { width: 100%; min-height: 44px; padding: 7px 66px 7px 10px; color: var(--navy); background: #fff; border: 1px solid var(--line-strong); border-radius: 8px; font-size: 15px; font-weight: 800; }
.admin-shift-lead > span { position: absolute; right: 11px; bottom: 14px; color: var(--muted); font-size: 10px; text-transform: none; }
.admin-shift-hours-heading { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.admin-shift-hours-heading button { min-height: 44px; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.admin-shift-hours-heading button svg { width: 20px; height: 20px; }
.admin-shift-list { display: grid; gap: 10px; margin-top: 13px; }
.admin-shift-row { display: grid; grid-template-columns: 52px minmax(180px, 1fr) 140px minmax(180px, .8fr) auto; gap: 12px; align-items: center; min-height: 78px; padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 9px; }
.admin-shift-number { width: 42px; height: 42px; display: grid; place-items: center; color: #fff; background: var(--blue); border-radius: 10px; font-weight: 900; }
.admin-shift-row > label { display: grid; gap: 4px; color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.admin-shift-row input { width: 100%; min-height: 42px; padding: 7px 9px; color: var(--navy); background: #fff; border: 1px solid var(--line-strong); border-radius: 8px; font-size: 13px; font-weight: 750; text-transform: none; }
.admin-shift-range strong, .admin-shift-range small { display: block; }
.admin-shift-range strong { color: var(--navy); font-size: 13px; }
.admin-shift-range small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.admin-policy-switch { min-height: 72px; display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px; background: var(--blue-soft); border: 1px solid #bad0f2; border-radius: 10px; }
.admin-policy-switch input { width: 24px; height: 24px; accent-color: var(--blue); }
.admin-policy-switch strong, .admin-policy-switch small { display: block; }
.admin-policy-switch strong { color: var(--navy); font-size: 14px; }
.admin-policy-switch small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.admin-shift-responsibles { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.admin-shift-responsibles h3 { margin: 0; color: var(--navy); font-size: 17px; }
.admin-shift-responsibles > div:first-child > p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.admin-shift-operator-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 13px; }
.admin-shift-operator { min-height: 64px; display: grid; grid-template-columns: 23px 42px minmax(0, 1fr); gap: 10px; align-items: center; padding: 9px 11px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.admin-shift-operator.selected { color: var(--blue); background: var(--blue-soft); border-color: #8db4ef; }
.admin-shift-operator input { width: 21px; height: 21px; accent-color: var(--blue); }
.admin-shift-operator .operator-option-icon { width: 40px; height: 40px; }
.admin-shift-operator strong, .admin-shift-operator small { display: block; }
.admin-shift-operator strong { color: var(--navy); font-size: 13px; }
.admin-shift-operator small { margin-top: 3px; font-size: 10px; }
.admin-notification-fields { display: grid; gap: 9px; margin-top: 16px; }
.admin-notification-row { display: grid; grid-template-columns: 44px minmax(230px, 1fr) 180px 140px; gap: 12px; align-items: center; min-height: 68px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; }
.admin-notification-row > svg { width: 30px; height: 30px; color: var(--blue); }
.admin-notification-row strong, .admin-notification-row small { display: block; }
.admin-notification-row strong { color: var(--navy); font-size: 13px; }
.admin-notification-row small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.admin-notification-row select, .admin-notification-row input { min-height: 42px; padding: 7px 9px; color: var(--navy); background: #fff; border: 1px solid var(--line-strong); border-radius: 8px; font-size: 12px; }
.notification-device-card > div { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.notification-device-card button { display: inline-flex; align-items: center; gap: 7px; }
.notification-control { min-height: 46px; display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; color: var(--blue); background: #fff; border-left: 1px solid var(--line); font-size: 11px; font-weight: 800; white-space: nowrap; }
.notification-control svg { width: 21px; height: 21px; }
.notification-settings-dialog { width: min(620px, calc(100vw - 24px)); }
.notification-settings-content { position: relative; padding: 30px; }
.notification-settings-dialog .notification-device-card { margin-top: 20px; }
.admin-alarm-account-grid { display: grid; grid-template-columns: minmax(240px, 1fr) 180px minmax(280px, 1fr); gap: 12px; align-items: end; }
.admin-alarm-account-grid .admin-policy-switch { min-height: 62px; margin: 0; }
.admin-alarm-stations { margin-bottom: 10px; }
.admin-alarm-station-policy { display: grid; grid-template-columns: minmax(280px, 1fr) 210px; gap: 12px; align-items: end; padding: 13px; background: #f7f9fd; border: 1px solid var(--line); border-radius: 10px; }
.admin-alarm-station-policy .admin-policy-switch { min-height: 60px; margin: 0; }
.admin-alarm-note { display: flex; align-items: flex-start; gap: 8px; margin: 10px 0 0; padding: 10px 12px; color: #31506f; background: #eef6ff; border-radius: 8px; font-size: 10px; line-height: 1.45; }
.admin-alarm-note svg { width: 18px; height: 18px; flex: 0 0 auto; }
.admin-alarm-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.admin-alarm-actions p { flex: 1; margin: 0; color: var(--muted); font-size: 11px; }
.admin-handover-correction-card { display: grid; grid-template-columns: 45px minmax(0, 1fr) auto; gap: 12px; align-items: center; margin-top: 10px; padding: 12px 14px; background: #fff8e8; border: 1px solid #ecd394; border-radius: 10px; }
.admin-handover-correction-card strong, .admin-handover-correction-card small { display: block; }
.admin-handover-correction-card strong { color: var(--navy); font-size: 13px; }
.admin-handover-correction-card small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.handover-correction-dialog { width: min(680px, calc(100vw - 24px)); }
.handover-correction-dialog form { position: relative; padding: 30px; }
.handover-correction-dialog .handover-phase { display: flex; margin: 12px auto; }
.handover-correction-dialog fieldset { margin: 15px 0; padding: 0; border: 0; }
.handover-correction-dialog legend { margin-bottom: 8px; color: var(--navy); font-size: 12px; font-weight: 850; }
.handover-correction-dialog .operator-list { max-height: 250px; overflow: auto; }
.dialog-note select { width: 100%; min-height: 46px; margin-top: 6px; padding: 9px 10px; color: var(--navy); background: #fff; border: 1px solid var(--line-strong); border-radius: 8px; font: inherit; }
.admin-audit-toolbar { display: flex; align-items: end; gap: 10px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.admin-audit-toolbar label { display: grid; gap: 5px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.admin-audit-toolbar input, .admin-audit-toolbar select { min-height: 43px; padding: 7px 9px; color: var(--navy); background: #fff; border: 1px solid var(--line-strong); border-radius: 8px; font-size: 12px; text-transform: none; }
.admin-audit-list { display: grid; gap: 7px; margin-top: 14px; }
.admin-audit-entry { display: grid; grid-template-columns: 86px 170px 150px minmax(230px, 1fr) 94px; gap: 10px; align-items: center; min-height: 54px; padding: 8px 10px; background: #f8faff; border: 1px solid var(--line); border-radius: 8px; font-size: 11px; }
.admin-audit-entry strong { color: var(--navy); }
.admin-audit-entry small { color: var(--muted); }

.handover-dialog { width: min(680px, calc(100vw - 24px)); }
.handover-dialog form { padding: 32px 34px 28px; text-align: center; }
.handover-icon { width: 68px; height: 68px; display: grid; place-items: center; margin: 0 auto 12px; color: var(--blue); background: var(--blue-soft); border-radius: 22px; }
.handover-icon svg { width: 38px; height: 38px; }
.handover-dialog h2 { margin: 0; color: var(--navy); font-size: 29px; }
.handover-dialog > form > p { color: var(--muted); }
.handover-dialog.upcoming .handover-icon { color: #9a5c00; background: #fff3d8; }
.handover-phase { width: fit-content; min-height: 34px; display: inline-flex; align-items: center; gap: 7px; margin: 8px auto 0; padding: 6px 10px; color: #8a5500; background: #fff3d8; border: 1px solid #f2cf87; border-radius: 999px; font-size: 11px; }
.handover-phase.due { color: #18723b; background: #e9f8ee; border-color: #a9dfb9; }
.handover-phase svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.handover-shift-card { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0; padding: 13px; background: #f5f8fd; border: 1px solid var(--line); border-radius: 10px; text-align: left; }
.handover-shift-card small, .handover-shift-card strong { display: block; }
.handover-shift-card small { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.handover-shift-card strong { margin-top: 4px; color: var(--navy); font-size: 15px; }
.handover-dialog fieldset { margin: 0; padding: 0; border: 0; text-align: left; }
.handover-dialog legend { margin-bottom: 9px; color: var(--navy); font-size: 13px; font-weight: 850; }
.handover-dialog .operator-option { position: relative; }
.handover-dialog .operator-option[aria-pressed="true"] { color: var(--blue); background: var(--blue-soft); border-color: var(--blue); box-shadow: 0 0 0 2px rgba(11,87,227,.12); }
.handover-dialog .operator-option:disabled { cursor: not-allowed; opacity: .58; }
.handover-actions { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 9px; margin-top: 14px; }
.handover-actions > button { min-height: 58px; }
.handover-actions > button[hidden] + button { grid-column: 1 / -1; }

@media (max-width: 1280px) {
  .brand-button > span:last-child { display: none; }
  .main-nav button { padding-inline: 10px; }
  .account-control span, .logout-button span { display: none; }
  .notification-control span { display: none; }
  .dashboard-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard-kpi:nth-child(3) { border-right: 0; }
  .dashboard-kpi:nth-child(n+4) { border-top: 1px solid var(--line); }
  .admin-field-row { grid-template-columns: 52px minmax(200px, 1.1fr) minmax(140px, .7fr) 100px; }
  .admin-field-row .admin-field-flags { grid-column: 2 / -1; display: flex; }
}

@media (max-width: 1000px) {
  .main-nav button { font-size: 0; }
  .main-nav button svg { width: 25px; height: 25px; }
  .dashboard-view { grid-template-columns: 76px minmax(0, 1fr); }
  .dashboard-side-brand > span:last-child { display: none; }
  .dashboard-side-nav button { font-size: 0; justify-content: center; }
  .dashboard-side-nav button svg { width: 26px; height: 26px; }
  .dashboard-primary-grid, .dashboard-secondary-grid { grid-template-columns: 1fr; }
  .admin-dialog-content.admin-shell { grid-template-columns: 78px minmax(0, 1fr); }
  .admin-side-brand > span:last-child, .admin-dialog .admin-tabs button { font-size: 0; justify-content: center; }
  .admin-dialog .admin-tabs button svg { width: 27px; height: 27px; }
  .admin-dialog .admin-footer { left: 78px; }
  .admin-dialog .admin-error { right: 340px; }
  .admin-user-controls, .admin-email-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .auth-view { grid-template-columns: minmax(0, 1fr); }
  .auth-identity { display: none; }
  .auth-form-panel { min-width: 0; align-items: start; padding: max(26px, env(safe-area-inset-top)) 20px 34px; }
  .login-company-brand { display: flex; }
}

@media (max-width: 760px) {
  body { padding-bottom: 76px; }
  .auth-view { grid-template-columns: 1fr; }
  .auth-identity { display: none; }
  .auth-form-panel { align-items: start; padding: max(26px, env(safe-area-inset-top)) 20px 34px; }
  .login-form h1 { font-size: 39px; }
  .login-form > p:first-of-type { margin-bottom: 25px; font-size: 18px; }
  .app-header { flex-wrap: wrap; gap: 7px; padding-bottom: 8px; }
  .main-nav { order: 3; width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); }
  .main-nav button { justify-content: center; font-size: 13px; }
  .header-controls { margin-left: auto; }
  .account-control, .logout-button { min-height: 44px; padding-inline: 8px; }
  .dashboard-view { display: block; margin-top: -18px; }
  .dashboard-side-nav { min-height: auto; flex-direction: row; overflow-x: auto; padding: 8px 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .dashboard-side-brand { display: none; }
  .dashboard-side-nav button { min-width: 50px; }
  .dashboard-canvas { padding: 18px 12px 34px; }
  .dashboard-heading { align-items: flex-start; }
  .dashboard-filters { display: grid; }
  .dashboard-kpis { grid-template-columns: 1fr 1fr; }
  .dashboard-kpi, .dashboard-kpi:nth-child(3) { border-right: 1px solid var(--line); border-top: 1px solid var(--line); }
  .dashboard-kpi:nth-child(1), .dashboard-kpi:nth-child(2) { border-top: 0; }
  .dashboard-kpi:nth-child(even) { border-right: 0; }
  .dashboard-kpi:last-child { grid-column: 1 / -1; border-right: 0; }
  .dashboard-chart-panel { padding-inline: 9px; }
  .dashboard-chart { height: 280px; }
  .dashboard-panel-heading { align-items: flex-start; }
  .admin-dialog { width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .admin-dialog-content.admin-shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0,1fr); }
  .admin-sidebar, .admin-main { min-width: 0; width: 100%; }
  .admin-sidebar { min-height: auto; padding: 8px 55px 8px 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  .admin-side-brand { display: none; }
  .admin-dialog .admin-tabs { display: flex; overflow-x: auto; }
  .admin-dialog .admin-tabs button { min-width: max-content; flex: 0 0 auto; gap: 6px; font-size: 10px; }
  .admin-dialog .admin-tabs button svg { width: 21px; height: 21px; }
  .admin-dialog .admin-heading { min-height: 76px; padding: 14px 62px 12px 14px; }
  .admin-heading h2 { font-size: 23px; }
  .admin-session { display: none; }
  .admin-dialog .admin-section { padding: 17px 12px 105px; }
  .admin-dialog .admin-footer { left: 0; padding: 9px 12px; }
  .admin-dialog .admin-error { right: 12px; bottom: 78px; left: 12px; padding: 7px 9px; background: #fff; }
  .admin-field-row { grid-template-columns: 42px minmax(0, 1fr); }
  .admin-field-row .admin-field-control, .admin-field-row .admin-field-flags { grid-column: 2; }
  .admin-hour-grid { grid-template-columns: repeat(4, minmax(48px, 1fr)); }
  .admin-user-row, .admin-shift-row, .admin-notification-row, .admin-audit-entry { grid-template-columns: 1fr; }
  .admin-user-card { padding: 13px; }
  .admin-user-card-head { align-items: stretch; flex-direction: column; }
  .admin-user-actions { justify-content: stretch; }
  .admin-user-actions button { flex: 1; }
  .admin-user-controls, .admin-capability-groups, .admin-email-grid { grid-template-columns: 1fr; }
  .admin-email-field.wide { grid-row: auto; }
  .admin-email-actions { display: grid; grid-template-columns: 1fr; }
  .admin-email-actions button { width: 100%; }
  .admin-shift-number { display: none; }
  .admin-shift-policy-grid, .admin-shift-operator-list { grid-template-columns: 1fr; }
  .admin-shift-reminder-card { grid-template-columns: 45px minmax(0, 1fr); }
  .admin-shift-reminder-card .admin-shift-lead { grid-column: 1 / -1; }
  .admin-alarm-account-grid, .admin-alarm-station-policy, .admin-handover-correction-card { grid-template-columns: 1fr; }
  .admin-handover-correction-card .admin-shift-reminder-icon { display: none; }
  .admin-alarm-actions { align-items: stretch; flex-direction: column; }
  .admin-alarm-actions button { width: 100%; }
  .admin-shift-hours-heading { align-items: stretch; flex-direction: column; }
  .admin-shift-row > *, .admin-shift-row > label { width: 100%; }
  .notification-device-card > div { justify-content: stretch; }
  .notification-device-card button { flex: 1; justify-content: center; }
  .admin-audit-toolbar { display: grid; grid-template-columns: 1fr 1fr; }
  .admin-audit-toolbar button { grid-column: 1 / -1; }
  .handover-dialog form { padding: 26px 16px 20px; }
  .handover-dialog .operator-list { grid-template-columns: 1fr; max-height: 330px; overflow: auto; }
  .notification-settings-content, .handover-correction-dialog form { padding: 26px 16px 20px; }
}

@media (max-width: 420px) {
  .app-header { padding-inline: 10px; }
  .header-controls {
    width: 100%;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .header-controls > *,
  .operator-control > span,
  .date-control input,
  .hour-control select { min-width: 0; }
  .date-control input,
  .hour-control select { width: 100%; }
  .sync-button span { display: none; }
  .account-control, .logout-button, .sync-button { justify-content: center; }
  .administration-button, .reports-button { min-height: 44px; }
  .admin-shift-stations { grid-template-columns: 1fr; }
  .admin-shift-workspace { padding: 13px; }
  .handover-actions { grid-template-columns: 1fr; }
  .handover-actions > button, .handover-actions > button[hidden] + button { grid-column: 1; width: 100%; }
}

@media (max-width: 720px) {
  .admin-dialog .admin-section { padding-bottom: 170px; }
  .admin-dialog .admin-error { bottom: 138px; }
}

/* V10 · dashboard operațional, source-backed */
.dashboard-view {
  min-height: calc(100vh - 82px);
  grid-template-columns: 218px minmax(0, 1fr);
  background: #f5f7fb;
}
.dashboard-side-nav {
  position: sticky;
  top: 82px;
  height: calc(100vh - 82px);
  min-height: 0;
  padding: 24px 14px;
  background: #fff;
  border-color: #e1e7f0;
}
.dashboard-side-brand { margin-bottom: 18px; padding-inline: 8px; }
.dashboard-side-nav button {
  position: relative;
  min-height: 50px;
  padding-inline: 13px;
  border-radius: 10px;
  transition: color .18s ease, background .18s ease, transform .18s ease;
}
.dashboard-side-nav button:hover { background: #f1f5fb; transform: translateX(2px); }
.dashboard-side-nav button.selected { color: var(--blue-dark); background: #eaf2ff; }
.dashboard-side-nav button.selected::before {
  content: "";
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: -14px;
  width: 4px;
  background: var(--blue);
  border-radius: 0 999px 999px 0;
}
.dashboard-canvas { padding: 28px clamp(18px, 2.4vw, 38px) 48px; }
.dashboard-heading { align-items: flex-start; }
.dashboard-heading h1 { font-size: clamp(31px, 3vw, 43px); }
.dashboard-heading p { margin-top: 7px; font-size: 13px; }
.dashboard-source-status {
  min-height: 54px;
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) 24px;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  color: var(--text);
  background: #fff;
  border: 1px solid #dce4ef;
  border-radius: 12px;
  box-shadow: 0 5px 18px rgba(7, 26, 66, .045);
}
.dashboard-source-status > svg { width: 21px; height: 21px; color: #71809b; fill: none; stroke: currentColor; stroke-width: 1.8; }
.dashboard-live-dot { width: 9px; height: 9px; background: #17a45b; border-radius: 50%; box-shadow: 0 0 0 5px rgba(23,164,91,.1); }
.dashboard-source-status strong, .dashboard-source-status small { display: block; }
.dashboard-source-status strong { font-size: 12px; }
.dashboard-source-status small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.dashboard-filters {
  display: flex;
  align-items: end;
  gap: 10px;
  margin-top: 20px;
  padding: 12px;
  background: #fff;
  border: 1px solid #e0e6ef;
  border-radius: 14px;
  box-shadow: 0 6px 22px rgba(7,26,66,.04);
}
.dashboard-filters label { min-width: 172px; display: grid; flex: 1; gap: 5px; }
.dashboard-filters label > span:first-child { color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .045em; text-transform: uppercase; }
.dashboard-control { min-height: 47px; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 9px; align-items: center; padding: 0 11px; background: #fbfcff; border: 1px solid var(--line); border-radius: 10px; }
.dashboard-control > svg { width: 20px; height: 20px; color: var(--blue); fill: none; stroke: currentColor; stroke-width: 1.8; }
.dashboard-control input, .dashboard-control select { min-width: 0; width: 100%; min-height: 43px; padding: 0; background: transparent; border: 0; border-radius: 0; font-size: 13px; font-weight: 760; }
.dashboard-refresh { min-height: 47px; display: inline-flex; align-items: center; gap: 7px; padding-inline: 15px; }
.dashboard-kpis {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
  border: 0;
}
.dashboard-kpi {
  min-height: 122px;
  grid-template-columns: 48px minmax(0, 1fr);
  padding: 17px;
  background: #fff;
  border: 1px solid #e0e6ef !important;
  border-radius: 14px;
  box-shadow: 0 6px 22px rgba(7,26,66,.045);
}
.dashboard-kpi-icon { width: 48px; height: 48px; border-radius: 14px; }
.dashboard-kpi span { font-size: 11px; }
.dashboard-kpi strong { margin-top: 7px; font-size: clamp(24px, 2vw, 31px); }
.dashboard-kpi small { margin-top: 7px; line-height: 1.3; }
.dashboard-primary-grid { grid-template-columns: minmax(0, 1fr) minmax(300px, .36fr); gap: 14px; margin-top: 14px; }
.dashboard-chart-panel, .dashboard-stations-panel, .dashboard-breakdown, .dashboard-activity, .dashboard-metrics-panel {
  min-width: 0;
  padding: 18px;
  background: #fff;
  border: 1px solid #e0e6ef;
  border-radius: 15px;
  box-shadow: 0 7px 25px rgba(7,26,66,.045);
}
.dashboard-panel-heading h2 { font-size: 18px; letter-spacing: -.015em; }
.dashboard-panel-heading p { margin-top: 5px; line-height: 1.4; }
.dashboard-metric-select { min-width: 215px; display: grid; gap: 4px; color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.dashboard-metric-select select { width: 100%; min-height: 42px; padding: 7px 10px; color: var(--navy); background: #f8faff; border: 1px solid var(--line); border-radius: 9px; font-size: 12px; font-weight: 780; text-transform: none; }
.dashboard-chart-meta { min-height: 30px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.dashboard-chart-meta span { min-height: 25px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; color: #53627e; background: #f1f4f9; border-radius: 999px; font-size: 9px; font-weight: 800; }
.dashboard-chart-meta svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.dashboard-chart-wrap { position: relative; min-width: 0; margin-top: 2px; }
.dashboard-chart { height: 340px; margin-top: 0; touch-action: pan-y; }
.dashboard-chart text { font-size: 10px; }
.dashboard-chart .grid { stroke: #e2e8f1; stroke-dasharray: 0; }
.dashboard-chart .axis { stroke: #9eacc0; }
.dashboard-series-line { fill: none; stroke: var(--blue); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.dashboard-point-guide { fill: transparent; stroke: transparent; }
.dashboard-point { fill: #fff; stroke: var(--blue); stroke-width: 3; transition: r .15s ease, fill .15s ease; }
.dashboard-data-point { cursor: pointer; outline: none; }
.dashboard-data-point:hover .dashboard-point, .dashboard-data-point:focus .dashboard-point, .dashboard-data-point.selected .dashboard-point { r: 7px; fill: var(--blue); stroke: #fff; }
.dashboard-data-point:focus .dashboard-point-guide { fill: rgba(11,87,227,.1); stroke: rgba(11,87,227,.25); }
.dashboard-chart-unit { fill: var(--blue) !important; font-size: 10px !important; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.dashboard-chart-tooltip {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  min-width: 150px;
  display: grid;
  gap: 3px;
  padding: 9px 11px;
  color: #fff;
  background: #071a42;
  border-radius: 9px;
  box-shadow: 0 10px 25px rgba(7,26,66,.22);
  pointer-events: none;
  transform: none;
}
.dashboard-chart-tooltip strong { font-size: 10px; color: #b8cff8; }
.dashboard-chart-tooltip span { font-size: 10px; }
.dashboard-chart-tooltip b { margin-top: 2px; font-size: 14px; }
.dashboard-chart-empty { min-height: 330px; padding: 24px; background: #fbfcff; border: 1px dashed #c9d4e4; border-radius: 12px; }
.dashboard-chart-empty svg { width: 54px; height: 54px; color: #7990b4; }
.dashboard-chart-empty strong { font-size: 18px; }
.dashboard-chart-empty span { max-width: 520px; }
.dashboard-chart-inspector { min-height: 78px; margin-top: 5px; border-top: 1px solid #e2e8f1; }
.dashboard-chart-inspector article { display: grid; grid-template-columns: 42px minmax(150px, .8fr) minmax(0, 1.8fr); gap: 12px; align-items: center; padding-top: 12px; }
.dashboard-inspector-icon { width: 42px; height: 42px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); border-radius: 11px; }
.dashboard-inspector-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.dashboard-inspector-value small, .dashboard-inspector-value strong { display: block; }
.dashboard-inspector-value small { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.dashboard-inspector-value strong { margin-top: 4px; color: var(--navy); font-size: 19px; }
.dashboard-chart-inspector dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin: 0; }
.dashboard-chart-inspector dl div { min-width: 0; padding-left: 10px; border-left: 1px solid var(--line); }
.dashboard-chart-inspector dt { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.dashboard-chart-inspector dd { margin: 4px 0 0; overflow: hidden; color: var(--text); font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-inspector-empty { min-height: 70px; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.dashboard-inspector-empty svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.dashboard-stations-panel { align-self: stretch; }
.dashboard-station {
  width: 100%;
  display: block;
  padding: 17px 4px;
  color: var(--text);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  text-align: left;
}
.dashboard-station:hover { background: #fafcff; }
.dashboard-station.selected { margin-inline: -7px; padding-inline: 11px; background: #f1f6ff; border-radius: 11px; box-shadow: inset 3px 0 0 var(--blue); }
.dashboard-station-title span { display: flex; align-items: center; gap: 4px; }
.dashboard-station-title span svg { width: 15px; height: 15px; }
.dashboard-station-state > svg { width: 54px; height: 54px; padding: 9px; background: #fff5e7; border-radius: 14px; }
.dashboard-station.poarta .dashboard-station-state > svg { background: #eaf9f7; }
.dashboard-station-state strong { font-size: 17px; }
.dashboard-metrics-panel { margin-top: 14px; }
.dashboard-metric-cards { display: grid; grid-template-columns: repeat(6, minmax(170px, 1fr)); gap: 10px; margin-top: 13px; overflow-x: auto; padding-bottom: 2px; }
.dashboard-metric-card {
  min-width: 170px;
  min-height: 164px;
  display: grid;
  align-content: start;
  padding: 13px;
  color: var(--text);
  background: #fbfcff;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: left;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.dashboard-metric-card:hover { transform: translateY(-2px); border-color: #aebfda; box-shadow: 0 7px 18px rgba(7,26,66,.07); }
.dashboard-metric-card.selected { background: #f0f6ff; border-color: var(--blue); box-shadow: 0 0 0 2px rgba(11,87,227,.08); }
.dashboard-metric-card-heading { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 9px; font-weight: 800; }
.dashboard-metric-card-heading > span { min-width: 0; display: flex; gap: 5px; align-items: center; overflow: hidden; color: var(--text); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-metric-card-heading svg { width: 16px; height: 16px; flex: 0 0 auto; color: var(--blue); fill: none; stroke: currentColor; stroke-width: 1.8; }
.dashboard-metric-card > strong { margin-top: 13px; color: var(--navy); font-size: 20px; line-height: 1.05; }
.dashboard-sparkline { width: 100%; height: 44px; margin-top: 9px; }
.dashboard-sparkline polyline { fill: none; stroke: var(--blue); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dashboard-spark-empty { height: 44px; display: grid; place-items: center; margin-top: 9px; color: #8d9bb0; }
.dashboard-spark-empty svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.dashboard-metric-card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; color: var(--muted); font-size: 9px; font-weight: 750; }
.dashboard-metric-card-foot svg { width: 15px; height: 15px; }
.dashboard-secondary-grid { margin-top: 14px; }
.dashboard-source-note { min-height: 48px; display: flex; align-items: center; gap: 9px; margin: 14px 0 0; padding: 10px 12px; color: var(--muted); background: #eef4fd; border: 1px solid #d5e2f5; border-radius: 10px; font-size: 10px; line-height: 1.45; }
.dashboard-source-note svg { width: 19px; height: 19px; flex: 0 0 auto; color: var(--blue); fill: none; stroke: currentColor; stroke-width: 1.8; }
.dashboard-source-note strong { color: var(--navy); }

@media (max-width: 1420px) {
  .dashboard-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard-kpi:nth-child(n) { border: 1px solid #e0e6ef !important; }
  .dashboard-metric-cards { grid-template-columns: repeat(6, minmax(190px, 1fr)); }
}

@media (max-width: 1550px) {
  .brand-button > span:last-child { display: none; }
  .main-nav button { min-width: 46px; justify-content: center; padding-inline: 10px; font-size: 0; }
  .main-nav button svg { width: 24px; height: 24px; }
}

@media (max-width: 1080px) {
  .dashboard-view { grid-template-columns: 78px minmax(0, 1fr); }
  .dashboard-side-nav button { justify-content: center; font-size: 0; }
  .dashboard-side-nav button svg { width: 25px; height: 25px; }
  .dashboard-side-brand > span:last-child { display: none; }
  .dashboard-primary-grid, .dashboard-secondary-grid { grid-template-columns: 1fr; }
  .dashboard-chart-inspector article { grid-template-columns: 42px minmax(0, 1fr); }
  .dashboard-chart-inspector dl { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .dashboard-view { display: block; margin-top: 0; }
  .dashboard-side-nav {
    position: fixed;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 55;
    width: 100%;
    height: calc(68px + env(safe-area-inset-bottom));
    display: flex;
    justify-content: space-around;
    gap: 2px;
    padding: 5px 6px calc(5px + env(safe-area-inset-bottom));
    overflow: visible;
    background: rgba(255,255,255,.98);
    border: 0;
    border-top: 1px solid var(--line);
    box-shadow: 0 -7px 22px rgba(7,26,66,.08);
  }
  .dashboard-side-brand { display: none; }
  .dashboard-side-nav button {
    min-width: 48px;
    min-height: 54px;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 4px 3px;
    font-size: 9px;
    border-radius: 9px;
  }
  .dashboard-side-nav button:hover { transform: none; }
  .dashboard-side-nav button svg { width: 22px; height: 22px; }
  .dashboard-side-nav button.selected::before { top: -5px; right: 20%; bottom: auto; left: 20%; width: auto; height: 3px; border-radius: 0 0 999px 999px; }
  .dashboard-canvas { padding: 18px 12px 24px; }
  .dashboard-heading { align-items: center; gap: 10px; }
  .dashboard-heading h1 { font-size: 27px; }
  .dashboard-heading p { font-size: 10px; }
  .dashboard-source-status { min-height: 48px; grid-template-columns: 8px 20px; padding: 8px 10px; }
  .dashboard-source-status > span:nth-child(2) { display: none; }
  .dashboard-source-status > svg { width: 19px; height: 19px; }
  .dashboard-filters { overflow-x: auto; align-items: end; margin: 14px -12px 0; padding: 10px 12px; border-inline: 0; border-radius: 0; box-shadow: none; scrollbar-width: none; }
  .dashboard-filters::-webkit-scrollbar { display: none; }
  .dashboard-filters label { min-width: 176px; flex: 0 0 auto; }
  .dashboard-refresh { min-width: 48px; padding: 0; justify-content: center; }
  .dashboard-refresh span { display: none; }
  .dashboard-kpis { grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 12px; }
  .dashboard-kpi { min-height: 115px; grid-template-columns: 40px minmax(0, 1fr); gap: 8px; padding: 13px; }
  .dashboard-kpi:last-child { grid-column: 1 / -1; }
  .dashboard-kpi-icon { width: 40px; height: 40px; border-radius: 11px; }
  .dashboard-kpi strong { font-size: 23px; }
  .dashboard-chart-panel, .dashboard-stations-panel, .dashboard-breakdown, .dashboard-activity, .dashboard-metrics-panel { padding: 14px 12px; border-radius: 13px; }
  .dashboard-panel-heading { display: grid; align-items: start; }
  .dashboard-metric-select { min-width: 0; width: 100%; }
  .dashboard-chart { height: 295px; }
  .dashboard-chart-empty { min-height: 280px; }
  .dashboard-chart-inspector article { grid-template-columns: 38px minmax(0, 1fr); }
  .dashboard-inspector-icon { width: 38px; height: 38px; }
  .dashboard-chart-inspector dl { grid-template-columns: 1fr; gap: 6px; }
  .dashboard-chart-inspector dl div { padding: 6px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .dashboard-stations-panel > div:last-child { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
  .dashboard-station, .dashboard-station.selected { margin: 0; padding: 12px; background: #fbfcff; border: 1px solid var(--line); border-radius: 11px; box-shadow: none; }
  .dashboard-station-state { align-items: flex-start; }
  .dashboard-station-state > svg { width: 43px; height: 43px; padding: 7px; }
  .dashboard-station-state strong { font-size: 14px; }
  .dashboard-metric-cards { grid-template-columns: repeat(6, 190px); margin-inline: -12px; padding: 0 12px 4px; scroll-snap-type: x proximity; }
  .dashboard-metric-card { scroll-snap-align: start; }
  .dashboard-activity-row { min-width: 520px; }
  .dashboard-source-note { margin-bottom: 8px; }
}

@media (max-width: 430px) {
  .dashboard-heading h1 { font-size: 24px; }
  .dashboard-kpi { grid-template-columns: 1fr; }
  .dashboard-kpi-icon { width: 38px; height: 38px; }
  .dashboard-stations-panel > div:last-child { grid-template-columns: 1fr; }
  .dashboard-chart-meta span:nth-child(n+4) { display: none; }
}

@media (max-width: 760px) {
  body.dashboard-active .app-header {
    min-height: 66px;
    flex-wrap: nowrap;
    gap: 7px;
    padding: 7px 10px;
  }
  body.dashboard-active .brand-button { flex: 0 0 auto; min-height: 48px; }
  body.dashboard-active .header-soceram-logo { width: 38px; height: 48px; }
  body.dashboard-active .main-nav { order: 0; width: auto; display: flex; flex: 1; }
  body.dashboard-active .main-nav button { min-width: 44px; width: 44px; padding: 7px; }
  body.dashboard-active .header-controls {
    width: auto;
    display: flex;
    flex: 0 0 auto;
    margin: 0;
    border: 0;
  }
  body.dashboard-active .operator-control,
  body.dashboard-active .date-control,
  body.dashboard-active .hour-control,
  body.dashboard-active .sync-button { display: none; }
  body.dashboard-active .account-control,
  body.dashboard-active .logout-button { min-height: 44px; display: flex; padding: 6px; border: 0; }
  body.dashboard-active .account-control > svg { width: 36px; height: 36px; }
  body.dashboard-active .logout-button svg { width: 22px; height: 22px; }
  body.dashboard-active .reminder-banner { margin: 8px 10px 0; padding: 9px 10px; border-radius: 11px; }
  body.dashboard-active .reminder-banner-copy small { display: none; }
  body.dashboard-active .reminder-banner button { min-height: 43px; padding-inline: 11px; }
}

/* V12 · dashboard Apple-like, scoped și source-backed */
.dashboard-apple {
  --dash-bg: #f5f5f7;
  --dash-surface: rgba(255, 255, 255, .94);
  --dash-surface-solid: #fff;
  --dash-text: #111b36;
  --dash-muted: #667085;
  --dash-line: rgba(17, 27, 54, .10);
  --dash-line-strong: rgba(17, 27, 54, .17);
  --dash-blue: #175cd3;
  --dash-blue-bright: #246bfd;
  --dash-blue-soft: #edf4ff;
  --dash-teal: #087e6d;
  --dash-teal-soft: #e9f8f4;
  --dash-amber: #a86000;
  --dash-amber-soft: #fff5df;
  --dash-red: #c13645;
  --dash-red-soft: #fff0f2;
  --dash-shadow: 0 18px 50px rgba(18, 31, 58, .075), 0 2px 8px rgba(18, 31, 58, .035);
  --dash-shadow-hover: 0 24px 58px rgba(18, 31, 58, .105), 0 4px 12px rgba(18, 31, 58, .045);
  min-height: calc(100vh - 82px);
  grid-template-columns: 196px minmax(0, 1fr);
  color: var(--dash-text);
  background: var(--dash-bg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
}
body.dashboard-active { background: var(--dash-bg, #f5f5f7); }
body.dashboard-active .app-header {
  background: rgba(255, 255, 255, .86);
  border-color: rgba(17, 27, 54, .09);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8), 0 8px 28px rgba(18, 31, 58, .045);
  -webkit-backdrop-filter: saturate(150%) blur(22px);
  backdrop-filter: saturate(150%) blur(22px);
}
.dashboard-apple .dashboard-side-nav {
  top: 82px;
  height: calc(100vh - 82px);
  padding: 22px 13px;
  background: rgba(250, 250, 252, .88);
  border-color: var(--dash-line);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}
.dashboard-apple .dashboard-side-brand { margin-bottom: 20px; padding: 0 9px 19px; border-color: var(--dash-line); }
.dashboard-apple .dashboard-side-brand strong { color: var(--dash-text); letter-spacing: -.015em; }
.dashboard-apple .dashboard-side-nav button {
  min-height: 48px;
  padding: 10px 12px;
  color: #4f5d73;
  border: 1px solid transparent;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 720;
  transition: color 170ms cubic-bezier(.2,.8,.2,1), background 170ms cubic-bezier(.2,.8,.2,1), border-color 170ms cubic-bezier(.2,.8,.2,1), transform 170ms cubic-bezier(.2,.8,.2,1);
}
.dashboard-apple .dashboard-side-nav button.selected,
.dashboard-apple .dashboard-side-nav button.selected:disabled {
  color: var(--dash-blue);
  background: rgba(23, 92, 211, .09);
  border-color: rgba(23, 92, 211, .12);
  opacity: 1;
  cursor: default;
}
.dashboard-apple .dashboard-side-nav button.selected::before { left: -13px; width: 3px; background: var(--dash-blue-bright); }
.dashboard-apple .dashboard-canvas {
  width: 100%;
  max-width: 1640px;
  margin-inline: auto;
  padding: 30px clamp(20px, 2.6vw, 42px) 54px;
}
.dashboard-apple .dashboard-heading { align-items: center; }
.dashboard-apple .dashboard-eyebrow,
.dashboard-apple .dashboard-section-kicker {
  display: block;
  color: var(--dash-blue);
  font-size: 10px;
  font-weight: 820;
  letter-spacing: .075em;
  text-transform: uppercase;
}
.dashboard-apple .dashboard-heading h1 {
  margin-top: 7px;
  color: var(--dash-text);
  font-size: clamp(34px, 3.1vw, 48px);
  font-weight: 760;
  letter-spacing: -.05em;
  line-height: 1;
}
.dashboard-apple .dashboard-heading p { margin-top: 9px; color: var(--dash-muted); font-size: 13px; }
.dashboard-apple .dashboard-source-status {
  min-width: 250px;
  min-height: 58px;
  padding: 10px 13px;
  background: var(--dash-surface);
  border-color: var(--dash-line);
  border-radius: 17px;
  box-shadow: 0 8px 30px rgba(18, 31, 58, .055);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.dashboard-apple .dashboard-live-dot { background: #16a36a; box-shadow: 0 0 0 5px rgba(22,163,106,.11); }
.dashboard-apple[data-dashboard-status="loading"] .dashboard-live-dot { background: var(--dash-blue-bright); box-shadow: 0 0 0 5px rgba(36,107,253,.11); }
.dashboard-apple[data-dashboard-status="empty"] .dashboard-live-dot { background: #8a94a6; box-shadow: 0 0 0 5px rgba(138,148,166,.12); }
.dashboard-apple[data-dashboard-status="stale"] .dashboard-live-dot { background: var(--dash-amber); box-shadow: 0 0 0 5px rgba(168,96,0,.11); }
.dashboard-apple[data-dashboard-status="error"] .dashboard-live-dot { background: var(--dash-red); box-shadow: 0 0 0 5px rgba(193,54,69,.11); }
.dashboard-apple .dashboard-source-status strong { color: var(--dash-text); font-size: 12px; }
.dashboard-apple .dashboard-source-status small { color: var(--dash-muted); }
.dashboard-apple .dashboard-filters.dashboard-global-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(190px, auto) auto;
  align-items: end;
  gap: 12px;
  margin-top: 22px;
  padding: 14px 15px;
  background: var(--dash-surface);
  border-color: var(--dash-line);
  border-radius: 20px;
  box-shadow: var(--dash-shadow);
}
.dashboard-apple .dashboard-toolbar-copy { align-self: center; }
.dashboard-apple .dashboard-toolbar-copy strong,
.dashboard-apple .dashboard-toolbar-copy small { display: block; }
.dashboard-apple .dashboard-toolbar-copy strong { color: var(--dash-text); font-size: 14px; }
.dashboard-apple .dashboard-toolbar-copy small { margin-top: 4px; color: var(--dash-muted); font-size: 11px; }
.dashboard-apple .dashboard-global-toolbar label { min-width: 190px; flex: 0 0 auto; }
.dashboard-apple .dashboard-filters label > span:first-child,
.dashboard-apple .dashboard-metric-select > span { color: var(--dash-muted); }
.dashboard-apple .dashboard-control {
  min-height: 48px;
  background: #f8f9fb;
  border-color: var(--dash-line);
  border-radius: 13px;
}
.dashboard-apple .dashboard-control input,
.dashboard-apple .dashboard-control select { color: var(--dash-text); font-weight: 690; }
.dashboard-apple .dashboard-refresh {
  min-width: 148px;
  min-height: 48px;
  justify-content: center;
  color: var(--dash-blue);
  background: var(--dash-blue-soft);
  border: 1px solid rgba(23, 92, 211, .13);
  border-radius: 13px;
  font-size: 13px;
  font-weight: 750;
}
.dashboard-apple[data-dashboard-status="loading"] .dashboard-refresh svg { animation: dashboardAppleSpin 780ms linear infinite; }
.dashboard-apple .dashboard-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-top: 16px;
}
.dashboard-apple .dashboard-kpi {
  position: relative;
  min-height: 130px;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 13px;
  padding: 19px;
  overflow: hidden;
  background: var(--dash-surface-solid);
  border: 1px solid var(--dash-line) !important;
  border-radius: 22px;
  box-shadow: var(--dash-shadow);
}
.dashboard-apple .dashboard-kpi::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: -38px;
  width: 104px;
  height: 104px;
  background: radial-gradient(circle, rgba(36,107,253,.09), transparent 68%);
  pointer-events: none;
}
.dashboard-apple .dashboard-kpi.teal::after { background: radial-gradient(circle, rgba(8,126,109,.09), transparent 68%); }
.dashboard-apple .dashboard-kpi.amber::after { background: radial-gradient(circle, rgba(168,96,0,.09), transparent 68%); }
.dashboard-apple .dashboard-kpi.danger::after { background: radial-gradient(circle, rgba(193,54,69,.085), transparent 68%); }
.dashboard-apple .dashboard-kpi-icon {
  width: 54px;
  height: 54px;
  color: var(--dash-blue);
  background: var(--dash-blue-soft);
  border: 1px solid rgba(23,92,211,.08);
  border-radius: 17px;
}
.dashboard-apple .dashboard-kpi.teal .dashboard-kpi-icon { color: var(--dash-teal); background: var(--dash-teal-soft); }
.dashboard-apple .dashboard-kpi.amber .dashboard-kpi-icon { color: var(--dash-amber); background: var(--dash-amber-soft); }
.dashboard-apple .dashboard-kpi.danger .dashboard-kpi-icon { color: var(--dash-red); background: var(--dash-red-soft); }
.dashboard-apple .dashboard-kpi span { color: var(--dash-muted); font-size: 11px; }
.dashboard-apple .dashboard-kpi strong { margin-top: 7px; color: var(--dash-text); font-size: clamp(27px, 2.2vw, 35px); font-weight: 760; letter-spacing: -.035em; }
.dashboard-apple .dashboard-kpi small { margin-top: 7px; color: var(--dash-muted); font-size: 10px; line-height: 1.4; }
.dashboard-apple .dashboard-chart-panel,
.dashboard-apple .dashboard-stations-panel,
.dashboard-apple .dashboard-breakdown,
.dashboard-apple .dashboard-activity,
.dashboard-apple .dashboard-metrics-panel {
  padding: 20px;
  background: var(--dash-surface-solid);
  border: 1px solid var(--dash-line);
  border-radius: 24px;
  box-shadow: var(--dash-shadow);
}
.dashboard-apple .dashboard-panel-heading h2 { margin-top: 5px; color: var(--dash-text); font-size: 19px; font-weight: 730; letter-spacing: -.025em; }
.dashboard-apple .dashboard-panel-heading p { color: var(--dash-muted); font-size: 11px; }
.dashboard-apple .dashboard-stations-panel { margin-top: 16px; }
.dashboard-apple .dashboard-stations-panel > .dashboard-panel-heading { margin-bottom: 13px; }
.dashboard-apple #dashboard-stations { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dashboard-apple .dashboard-station,
.dashboard-apple .dashboard-station.selected {
  min-width: 0;
  min-height: 134px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 9px;
  margin: 0;
  padding: 15px 17px;
  color: var(--dash-text);
  background: #fafbfc;
  border: 1px solid var(--dash-line);
  border-radius: 18px;
  box-shadow: none;
  transition: transform 170ms cubic-bezier(.2,.8,.2,1), border-color 170ms cubic-bezier(.2,.8,.2,1), background 170ms cubic-bezier(.2,.8,.2,1);
}
.dashboard-apple .dashboard-station:not(.poarta) { border-left: 4px solid var(--dash-amber); }
.dashboard-apple .dashboard-station.poarta { border-left: 4px solid var(--dash-teal); }
.dashboard-apple .dashboard-lookback {
  margin-top: 16px;
  padding: 20px;
  background: var(--dash-surface-solid);
  border: 1px solid var(--dash-line);
  border-radius: 24px;
  box-shadow: var(--dash-shadow);
}
.dashboard-apple .dashboard-station-title strong { color: var(--dash-text); font-size: 15px; }
.dashboard-apple .dashboard-station-title span { color: var(--dash-muted); font-size: 11px; }
.dashboard-apple .dashboard-station-state { margin-top: 0; }
.dashboard-apple .dashboard-station-state > svg {
  width: 44px;
  height: 44px;
  padding: 8px;
  color: var(--dash-amber);
  background: var(--dash-amber-soft);
  border-radius: 14px;
}
.dashboard-apple .dashboard-station.poarta .dashboard-station-state > svg { color: var(--dash-teal); background: var(--dash-teal-soft); }
.dashboard-apple .dashboard-station-state strong { color: var(--dash-text); font-size: 15px; }
.dashboard-apple .dashboard-station-state small { color: var(--dash-muted); }
.dashboard-apple .progress-track { height: 7px; border-radius: 999px; overflow: hidden; }
.dashboard-apple .progress-track rect { transform-box: fill-box; transform-origin: left center; }
.dashboard-apple .dashboard-primary-grid { grid-template-columns: minmax(0, 1fr) minmax(286px, 330px); gap: 15px; margin-top: 16px; }
.dashboard-apple .dashboard-chart-panel { min-height: 590px; }
.dashboard-apple .dashboard-chart-filters {
  display: grid;
  grid-template-columns: minmax(155px, .8fr) minmax(155px, .8fr) minmax(220px, 1.25fr);
  gap: 9px;
  margin-top: 16px;
  padding: 10px;
  background: #f6f7f9;
  border: 1px solid var(--dash-line);
  border-radius: 16px;
}
.dashboard-apple .dashboard-metric-select { min-width: 0; gap: 5px; }
.dashboard-apple .dashboard-metric-select select {
  min-height: 44px;
  padding: 7px 11px;
  color: var(--dash-text);
  background: var(--dash-surface-solid);
  border-color: var(--dash-line);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 680;
}
.dashboard-apple .dashboard-chart-meta { margin-top: 12px; }
.dashboard-apple .dashboard-chart-meta span {
  min-height: 27px;
  color: #526078;
  background: #f2f4f7;
  border: 1px solid rgba(17,27,54,.045);
}
.dashboard-apple .dashboard-chart-wrap {
  margin-top: 4px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(246,249,255,.58), rgba(255,255,255,0) 62%);
  border-radius: 17px;
}
.dashboard-apple .dashboard-chart { height: 348px; }
.dashboard-apple .dashboard-chart text { fill: #778196; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif; font-size: 10px; }
.dashboard-apple .dashboard-chart .grid { stroke: rgba(45,61,91,.10); }
.dashboard-apple .dashboard-chart .axis { stroke: rgba(45,61,91,.20); }
.dashboard-apple .dashboard-series-area { fill: url(#dashboard-chart-area); opacity: .86; }
.dashboard-apple .dashboard-series-line { stroke: var(--dash-blue-bright); stroke-width: 3.2; }
.dashboard-apple .dashboard-selection-guide { stroke: rgba(36,107,253,.32); stroke-width: 1; stroke-dasharray: 4 5; }
.dashboard-apple .dashboard-point { fill: #fff; stroke: var(--dash-blue-bright); stroke-width: 3; }
.dashboard-apple .dashboard-data-point.selected .dashboard-point { fill: var(--dash-blue-bright); stroke: #fff; }
.dashboard-apple .dashboard-data-point.selected .dashboard-point-guide { fill: rgba(36,107,253,.11); stroke: rgba(36,107,253,.20); }
.dashboard-apple .dashboard-chart-unit { fill: var(--dash-blue) !important; }
.dashboard-apple .dashboard-chart-tooltip {
  top: 13px;
  right: 13px;
  min-width: 160px;
  padding: 10px 12px;
  background: rgba(15, 27, 52, .92);
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 13px;
  box-shadow: 0 16px 34px rgba(15,27,52,.24);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.dashboard-apple .dashboard-chart-empty {
  min-height: 348px;
  background: #f8f9fb;
  border-color: var(--dash-line-strong);
  border-radius: 18px;
}
.dashboard-apple .dashboard-chart-inspector { min-height: 86px; margin-top: 7px; border-color: var(--dash-line); }
.dashboard-apple .dashboard-chart-inspector article { grid-template-columns: 46px minmax(165px, .75fr) minmax(0, 1.8fr); padding-top: 14px; }
.dashboard-apple .dashboard-inspector-icon { width: 46px; height: 46px; color: var(--dash-blue); background: var(--dash-blue-soft); border-radius: 15px; }
.dashboard-apple .dashboard-inspector-value strong { color: var(--dash-text); font-size: 21px; }
.dashboard-apple .dashboard-chart-inspector dt { color: var(--dash-muted); }
.dashboard-apple .dashboard-chart-inspector dd { color: var(--dash-text); }
.dashboard-apple .dashboard-metrics-panel { min-height: 590px; }
.dashboard-apple .dashboard-metric-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 14px;
  overflow: visible;
}
.dashboard-apple .dashboard-metric-card {
  min-width: 0;
  min-height: 92px;
  grid-template-columns: minmax(0, 1fr) 78px;
  grid-template-rows: auto 1fr auto;
  gap: 2px 9px;
  padding: 12px 13px;
  background: #fafbfc;
  border-color: var(--dash-line);
  border-radius: 16px;
  box-shadow: none;
  transition: transform 170ms cubic-bezier(.2,.8,.2,1), border-color 170ms cubic-bezier(.2,.8,.2,1), background 170ms cubic-bezier(.2,.8,.2,1);
}
.dashboard-apple .dashboard-metric-card.selected { background: var(--dash-blue-soft); border-color: rgba(23,92,211,.35); box-shadow: none; }
.dashboard-apple .dashboard-metric-card-heading { grid-column: 1 / -1; }
.dashboard-apple .dashboard-metric-card-heading > span { color: var(--dash-text); font-size: 10px; }
.dashboard-apple .dashboard-metric-card > strong { grid-column: 1; align-self: end; margin-top: 5px; color: var(--dash-text); font-size: 17px; }
.dashboard-apple .dashboard-sparkline,
.dashboard-apple .dashboard-spark-empty { grid-column: 2; grid-row: 2 / span 2; width: 78px; height: 38px; align-self: center; margin: 0; }
.dashboard-apple .dashboard-sparkline polyline { stroke: var(--dash-blue-bright); }
.dashboard-apple .dashboard-metric-card-foot { grid-column: 1; margin-top: 4px; }
.dashboard-apple .dashboard-secondary-grid { grid-template-columns: minmax(300px, .8fr) minmax(0, 1.2fr); gap: 15px; margin-top: 16px; }
.dashboard-apple .dashboard-breakdown-row { grid-template-columns: 126px minmax(0, 1fr) 72px; }
.dashboard-apple .dashboard-activity-table { border-radius: 14px; }
.dashboard-apple .dashboard-activity-row { border-color: var(--dash-line); }
.dashboard-apple .dashboard-source-note {
  min-height: 52px;
  margin-top: 16px;
  padding: 11px 14px;
  color: var(--dash-muted);
  background: rgba(237,244,255,.75);
  border-color: rgba(23,92,211,.11);
  border-radius: 16px;
}
.dashboard-apple .dashboard-source-note strong { color: var(--dash-text); }
.dashboard-apple .dashboard-command {
  margin-top: 16px;
  padding: 18px 18px 16px;
  color: #d7e3f4;
  background: #10243f;
  border-radius: 24px;
  box-shadow: var(--dash-shadow);
}
.dashboard-apple .dashboard-command > header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 2px 4px 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.dashboard-apple .dashboard-command .dashboard-section-kicker { color: #7eb0ff; }
.dashboard-apple .dashboard-command h2 {
  margin-top: 6px;
  color: #fff;
  font-size: 20px;
  font-weight: 730;
  letter-spacing: -.03em;
}
.dashboard-apple .dashboard-command > header p {
  margin-top: 6px;
  color: #93a4bb;
  font-size: 11px;
}
.dashboard-apple .dashboard-motor-chip {
  flex: 0 0 auto;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  color: #d7e3f4;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.dashboard-apple .dashboard-motor-chip[data-motor="ON"] { color: #7ee0c8; background: rgba(20,184,166,.12); }
.dashboard-apple .dashboard-motor-chip[data-motor="OFF"] { color: #f3c38a; background: rgba(168,96,0,.16); }
.dashboard-apple .dashboard-command-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.dashboard-apple .dashboard-command-card {
  min-width: 0;
  padding: 16px 16px 14px;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
}
.dashboard-apple .dashboard-command-card span,
.dashboard-apple .dashboard-command-card small { display: block; }
.dashboard-apple .dashboard-command-card > span {
  color: #93a4bb;
  font-size: 11px;
  font-weight: 740;
}
.dashboard-apple .dashboard-command-card strong {
  display: block;
  margin-top: 8px;
  color: #fff;
  font-size: clamp(24px, 2vw, 32px);
  font-weight: 760;
  letter-spacing: -.04em;
  line-height: 1;
}
.dashboard-apple .dashboard-command-card .dashboard-delta {
  margin-top: 8px;
  color: #9ec5ff;
  font-size: 11px;
  font-weight: 720;
}
.dashboard-apple .dashboard-command-card .dashboard-delta.down { color: #7ee0c8; }
.dashboard-apple .dashboard-command-card small {
  margin-top: 8px;
  color: #5eead4;
  font-size: 11px;
  line-height: 1.35;
}
.dashboard-apple .dashboard-week,
.dashboard-apple .dashboard-outlook-panel {
  margin-top: 16px;
  padding: 18px 20px;
  background: var(--dash-surface-solid);
  border: 1px solid var(--dash-line);
  border-radius: 24px;
  box-shadow: var(--dash-shadow);
}
.dashboard-apple .dashboard-week-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.dashboard-apple .dashboard-week-day {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 10px 6px 8px;
  border: 1px solid transparent;
  border-radius: 16px;
}
.dashboard-apple .dashboard-week-day.today {
  background: var(--dash-blue-soft);
  border-color: rgba(23,92,211,.16);
}
.dashboard-apple .dashboard-week-bar {
  width: 28px;
  height: 88px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  background: #eef2f6;
  border-radius: 999px;
}
.dashboard-apple .dashboard-week-bar i {
  display: block;
  width: 100%;
  flex: 0 0 auto;
  min-height: 0;
  background: var(--dash-blue-bright);
}
.dashboard-apple .dashboard-week-bar i.forecast { background: #14b8a6; opacity: .85; }
.dashboard-apple .dashboard-week-day strong {
  color: var(--dash-text);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: -.02em;
}
.dashboard-apple .dashboard-week-day small { color: var(--dash-muted); font-size: 10px; }
.dashboard-apple .dashboard-outlook-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.dashboard-apple .dashboard-outlook-card {
  min-width: 0;
  padding: 14px 15px 13px;
  background: #fafbfc;
  border: 1px solid var(--dash-line);
  border-radius: 18px;
}
.dashboard-apple .dashboard-outlook-card > span {
  color: var(--dash-muted);
  font-size: 11px;
  font-weight: 740;
}
.dashboard-apple .dashboard-outlook-card strong {
  display: block;
  margin-top: 7px;
  color: var(--dash-text);
  font-size: 22px;
  font-weight: 760;
  letter-spacing: -.03em;
}
.dashboard-apple .dashboard-outlook-card small {
  display: block;
  margin-top: 6px;
  color: var(--dash-muted);
  font-size: 11px;
  line-height: 1.35;
}
.dashboard-apple .outlook-dual { display: grid; gap: 7px; margin-top: 12px; }
.dashboard-apple .outlook-dual-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--dash-muted);
  font-size: 10px;
  font-weight: 700;
}
.dashboard-apple .outlook-bar {
  height: 7px;
  display: flex;
  overflow: hidden;
  background: #e8edf3;
  border-radius: 999px;
}
.dashboard-apple .outlook-bar i { display: block; height: 100%; }
.dashboard-apple .outlook-bar i.measured { background: var(--dash-blue-bright); }
.dashboard-apple .outlook-bar i.forecast { background: #14b8a6; }
.dashboard-apple .dashboard-series-typical {
  fill: none;
  stroke: #98a2b3;
  stroke-width: 2;
  stroke-dasharray: 5 6;
  stroke-linecap: round;
  opacity: .75;
}
.dashboard-apple .dashboard-series-forecast {
  fill: none;
  stroke: #0e8f7a;
  stroke-width: 2.8;
  stroke-dasharray: 7 6;
  stroke-linecap: round;
}
.dashboard-apple .dashboard-forecast-point { fill: #fff; stroke: #0e8f7a; stroke-width: 2.4; }
.dashboard-apple .dashboard-now-marker { stroke: rgba(168,96,0,.55); stroke-width: 1.2; stroke-dasharray: 3 4; }
.dashboard-apple .dashboard-now-label { fill: var(--dash-amber) !important; font-size: 9px; font-weight: 760; }

@media (hover: hover) and (pointer: fine) {
  .dashboard-apple .dashboard-side-nav button:not(.selected):hover { color: var(--dash-text); background: rgba(17,27,54,.045); transform: translateX(2px); }
  .dashboard-apple .dashboard-station:hover,
  .dashboard-apple .dashboard-metric-card:hover { transform: translateY(-2px); border-color: var(--dash-line-strong); background: #fff; box-shadow: none; }
  .dashboard-apple .dashboard-station:active,
  .dashboard-apple .dashboard-metric-card:active { transform: scale(.99); }
}

.dashboard-apple[data-motion="enter"] .dashboard-heading,
.dashboard-apple[data-motion="enter"] .dashboard-global-toolbar,
.dashboard-apple[data-motion="enter"] .dashboard-kpi,
.dashboard-apple[data-motion="enter"] .dashboard-command,
.dashboard-apple[data-motion="enter"] .dashboard-week,
.dashboard-apple[data-motion="enter"] .dashboard-outlook-panel,
.dashboard-apple[data-motion="enter"] .dashboard-stations-panel,
.dashboard-apple[data-motion="enter"] .dashboard-lookback,
.dashboard-apple[data-motion="enter"] .dashboard-chart-panel,
.dashboard-apple[data-motion="enter"] .dashboard-metrics-panel,
.dashboard-apple[data-motion="enter"] .dashboard-secondary-grid,
.dashboard-apple[data-motion="enter"] .dashboard-source-note {
  animation: dashboardAppleEnter 320ms cubic-bezier(.16,1,.3,1) both;
}
.dashboard-apple[data-motion="enter"] .dashboard-global-toolbar { animation-delay: 35ms; }
.dashboard-apple[data-motion="enter"] .dashboard-kpi:nth-child(1) { animation-delay: 70ms; }
.dashboard-apple[data-motion="enter"] .dashboard-kpi:nth-child(2) { animation-delay: 105ms; }
.dashboard-apple[data-motion="enter"] .dashboard-kpi:nth-child(3) { animation-delay: 140ms; }
.dashboard-apple[data-motion="enter"] .dashboard-kpi:nth-child(4) { animation-delay: 175ms; }
.dashboard-apple[data-motion="enter"] .dashboard-command { animation-delay: 185ms; }
.dashboard-apple[data-motion="enter"] .dashboard-week { animation-delay: 195ms; }
.dashboard-apple[data-motion="enter"] .dashboard-outlook-panel { animation-delay: 200ms; }
.dashboard-apple[data-motion="enter"] .dashboard-stations-panel { animation-delay: 205ms; }
.dashboard-apple[data-motion="enter"] .dashboard-chart-panel { animation-delay: 240ms; }
.dashboard-apple[data-motion="enter"] .dashboard-metrics-panel { animation-delay: 275ms; }
.dashboard-apple[data-motion="enter"] .dashboard-secondary-grid { animation-delay: 310ms; }
.dashboard-apple[data-motion="enter"] .dashboard-lookback { animation-delay: 328ms; }
.dashboard-apple[data-motion="enter"] .dashboard-source-note { animation-delay: 345ms; }
.dashboard-apple[data-motion="enter"] .progress-track rect { animation: dashboardAppleProgress 480ms cubic-bezier(.16,1,.3,1) both; animation-delay: 260ms; }
.dashboard-apple .dashboard-chart[data-chart-motion="reveal"] .dashboard-series-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: dashboardAppleLine 520ms cubic-bezier(.16,1,.3,1) forwards; }
.dashboard-apple .dashboard-chart[data-chart-motion="reveal"] .dashboard-series-area { animation: dashboardAppleFade 440ms cubic-bezier(.16,1,.3,1) both; }
.dashboard-apple .dashboard-chart[data-chart-motion="reveal"] .dashboard-data-point { transform-box: fill-box; transform-origin: center; animation: dashboardApplePoint 300ms cubic-bezier(.16,1,.3,1) both; }

@keyframes dashboardAppleEnter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes dashboardAppleLine { to { stroke-dashoffset: 0; } }
@keyframes dashboardAppleFade { from { opacity: 0; } to { opacity: .86; } }
@keyframes dashboardApplePoint { from { opacity: 0; transform: scale(.72); } to { opacity: 1; transform: scale(1); } }
@keyframes dashboardAppleProgress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes dashboardAppleSpin { to { transform: rotate(1turn); } }

@media (max-width: 1420px) {
  .dashboard-apple .dashboard-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-apple .dashboard-kpi:nth-child(n) { border: 1px solid var(--dash-line) !important; }
  .dashboard-apple .dashboard-command-grid,
  .dashboard-apple .dashboard-outlook-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1080px) {
  .dashboard-apple { grid-template-columns: 78px minmax(0, 1fr); }
  .dashboard-apple .dashboard-primary-grid,
  .dashboard-apple .dashboard-secondary-grid { grid-template-columns: 1fr; }
  .dashboard-apple .dashboard-metrics-panel { min-height: 0; }
  .dashboard-apple .dashboard-metric-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard-apple .dashboard-chart-inspector article { grid-template-columns: 46px minmax(0, 1fr); }
  .dashboard-apple .dashboard-chart-inspector dl { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .dashboard-apple { display: block; margin-top: 0; }
  .dashboard-apple .dashboard-side-nav {
    position: fixed;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 55;
    width: 100%;
    height: calc(70px + env(safe-area-inset-bottom));
    display: flex;
    justify-content: space-around;
    gap: 2px;
    padding: 6px 7px calc(6px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.91);
    border: 0;
    border-top: 1px solid var(--dash-line);
    box-shadow: 0 -12px 36px rgba(18,31,58,.09);
    -webkit-backdrop-filter: saturate(150%) blur(22px);
    backdrop-filter: saturate(150%) blur(22px);
  }
  .dashboard-apple .dashboard-side-brand { display: none; }
  .dashboard-apple .dashboard-side-nav button {
    min-width: 48px;
    min-height: 55px;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 4px;
    font-size: 9px;
    border-radius: 12px;
  }
  .dashboard-apple .dashboard-side-nav button svg { width: 22px; height: 22px; }
  .dashboard-apple .dashboard-side-nav button.selected::before { top: -6px; right: 24%; bottom: auto; left: 24%; width: auto; height: 3px; border-radius: 0 0 999px 999px; }
  .dashboard-apple .dashboard-canvas { padding: 20px 13px 30px; }
  .dashboard-apple .dashboard-heading { align-items: center; gap: 9px; }
  .dashboard-apple .dashboard-eyebrow { font-size: 8px; }
  .dashboard-apple .dashboard-heading h1 { margin-top: 5px; font-size: 28px; }
  .dashboard-apple .dashboard-heading p { max-width: 260px; font-size: 10px; }
  .dashboard-apple .dashboard-source-status { min-width: 50px; width: 50px; min-height: 50px; grid-template-columns: 8px 20px; padding: 8px 9px; border-radius: 15px; }
  .dashboard-apple .dashboard-source-status > span:nth-child(2) { display: none; }
  .dashboard-apple .dashboard-source-status > svg { width: 18px; height: 18px; }
  .dashboard-apple .dashboard-filters.dashboard-global-toolbar { grid-template-columns: minmax(0, 1fr) 50px; gap: 8px; margin-top: 15px; padding: 10px; border-radius: 17px; }
  .dashboard-apple .dashboard-toolbar-copy { display: none; }
  .dashboard-apple .dashboard-global-toolbar label { min-width: 0; }
  .dashboard-apple .dashboard-refresh { min-width: 50px; width: 50px; padding: 0; }
  .dashboard-apple .dashboard-refresh span { display: none; }
  .dashboard-apple .dashboard-kpis { grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 11px; }
  .dashboard-apple .dashboard-command { padding: 14px 13px 12px; border-radius: 20px; }
  .dashboard-apple .dashboard-command > header { display: grid; gap: 10px; }
  .dashboard-apple .dashboard-command h2 { font-size: 17px; }
  .dashboard-apple .dashboard-command-grid,
  .dashboard-apple .dashboard-outlook-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-apple .dashboard-week,
  .dashboard-apple .dashboard-outlook-panel { padding: 15px 13px; border-radius: 20px; }
  .dashboard-apple .dashboard-week-strip { gap: 6px; }
  .dashboard-apple .dashboard-week-bar { width: 22px; height: 72px; }
  .dashboard-apple .dashboard-kpi,
  .dashboard-apple .dashboard-kpi:last-child { min-height: 124px; grid-column: auto; grid-template-columns: 44px minmax(0, 1fr); gap: 9px; padding: 14px; border-radius: 18px; }
  .dashboard-apple .dashboard-kpi-icon { width: 44px; height: 44px; border-radius: 14px; }
  .dashboard-apple .dashboard-kpi strong { font-size: 24px; }
  .dashboard-apple .dashboard-stations-panel,
  .dashboard-apple .dashboard-chart-panel,
  .dashboard-apple .dashboard-breakdown,
  .dashboard-apple .dashboard-activity,
  .dashboard-apple .dashboard-metrics-panel { padding: 15px 13px; border-radius: 20px; }
  .dashboard-apple #dashboard-stations { grid-template-columns: 1fr; }
  .dashboard-apple .dashboard-station,
  .dashboard-apple .dashboard-station.selected { min-height: 126px; padding: 14px; }
  .dashboard-apple .dashboard-primary-grid { display: grid; grid-template-columns: 1fr; gap: 11px; }
  .dashboard-apple .dashboard-chart-panel { min-height: 0; }
  .dashboard-apple .dashboard-chart-filters {
    display: flex;
    margin-inline: -13px;
    padding: 9px 13px 11px;
    overflow-x: auto;
    border-inline: 0;
    border-radius: 0;
    scrollbar-width: none;
  }
  .dashboard-apple .dashboard-chart-filters::-webkit-scrollbar { display: none; }
  .dashboard-apple .dashboard-chart-filters label { min-width: 172px; flex: 0 0 auto; }
  .dashboard-apple .dashboard-chart-filters .dashboard-metric-control { min-width: 220px; }
  .dashboard-apple .dashboard-chart { height: 300px; }
  .dashboard-apple .dashboard-chart-empty { min-height: 285px; }
  .dashboard-apple .dashboard-chart-inspector article { grid-template-columns: 42px minmax(0, 1fr); }
  .dashboard-apple .dashboard-inspector-icon { width: 42px; height: 42px; }
  .dashboard-apple .dashboard-chart-inspector dl { grid-template-columns: 1fr; gap: 5px; }
  .dashboard-apple .dashboard-chart-inspector dl div { padding: 7px 0 0; border-top: 1px solid var(--dash-line); border-left: 0; }
  .dashboard-apple .dashboard-metrics-panel { min-height: 0; }
  .dashboard-apple .dashboard-metric-cards { grid-template-columns: repeat(6, 214px); margin-inline: -13px; padding: 0 13px 4px; overflow-x: auto; scroll-snap-type: x proximity; }
  .dashboard-apple .dashboard-metric-card { min-width: 214px; scroll-snap-align: start; }
  .dashboard-apple .dashboard-secondary-grid { gap: 11px; }
  .dashboard-apple .dashboard-source-note { border-radius: 16px; }
}

@media (max-width: 430px) {
  .dashboard-apple .dashboard-heading h1 { font-size: 25px; }
  .dashboard-apple .dashboard-kpi { grid-template-columns: 1fr; min-height: 138px; }
  .dashboard-apple .dashboard-kpi-icon { width: 40px; height: 40px; }
  .dashboard-apple .dashboard-chart-meta span:nth-child(n+4) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-apple *,
  .dashboard-apple *::before,
  .dashboard-apple *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .dashboard-apple .dashboard-side-nav button:hover,
  .dashboard-apple .dashboard-station:hover,
  .dashboard-apple .dashboard-metric-card:hover { transform: none !important; }
}

/* V11 · chat operațional intern */
.chat-nav-button { position: relative; }
.chat-unread-badge { min-width: 20px; height: 20px; display: inline-grid; place-items: center; padding: 0 5px; color: #fff; background: #c33d4b; border: 2px solid #fff; border-radius: 999px; font-size: 10px; font-weight: 900; line-height: 1; }
.chat-unread-badge[hidden] { display: none; }
.main-nav .chat-nav-button.has-unread { color: var(--blue); }

.chat-dialog { width: min(1060px, calc(100vw - 28px)); max-height: calc(100vh - 28px); overflow: hidden; }
.chat-dialog-content { position: relative; height: min(720px, calc(100vh - 28px)); display: grid; grid-template-columns: 280px minmax(0, 1fr); overflow: hidden; }
.chat-dialog .dialog-close { z-index: 5; }
.chat-sidebar { min-width: 0; display: flex; flex-direction: column; padding: 24px 15px 17px; color: #fff; background: linear-gradient(160deg, #0d2549 0%, #123b6d 100%); }
.chat-side-heading { min-height: 58px; display: flex; align-items: center; gap: 11px; padding: 0 46px 14px 5px; border-bottom: 1px solid rgba(255, 255, 255, .15); }
.chat-side-heading .dialog-icon { flex: 0 0 auto; color: #fff; background: rgba(255, 255, 255, .13); }
.chat-side-heading strong, .chat-side-heading small { display: block; }
.chat-side-heading strong { font-size: 16px; }
.chat-side-heading small { margin-top: 3px; color: #c9d8ec; font-size: 11px; }
.chat-channels { min-height: 0; display: grid; align-content: start; gap: 5px; margin: 13px -4px; overflow-y: auto; }
.chat-channels { scrollbar-width: none; }
.chat-channels::-webkit-scrollbar { display: none; }
.chat-channels button { min-width: 0; min-height: 58px; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 8px 10px; color: #d9e6f5; background: transparent; border: 0; border-radius: 9px; text-align: left; }
.chat-channels button:hover { background: rgba(255, 255, 255, .08); }
.chat-channels button[aria-selected="true"] { color: #fff; background: rgba(255, 255, 255, .16); box-shadow: inset 3px 0 #65a7ff; }
.chat-channels button > svg { width: 27px; height: 27px; }
.chat-channels button span { min-width: 0; }
.chat-channels button strong, .chat-channels button small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-channels button strong { font-size: 13px; }
.chat-channels button small { margin-top: 2px; color: #aebfd5; font-size: 10px; }
.chat-channels button b { min-width: 22px; height: 22px; display: inline-grid; place-items: center; padding: 0 5px; color: #fff; background: #d04958; border-radius: 999px; font-size: 10px; }
.chat-notification-control { display: grid; gap: 5px; margin-top: auto; padding: 12px; color: #dbe8f8; background: rgba(0, 0, 0, .15); border: 1px solid rgba(255, 255, 255, .12); border-radius: 10px; font-size: 11px; font-weight: 800; }
.chat-notification-control select { min-height: 40px; padding: 7px 9px; color: var(--navy); background: #fff; border: 0; border-radius: 7px; font: inherit; }
.chat-notification-control small { color: #aebfd5; font-size: 10px; font-weight: 600; line-height: 1.35; }

.chat-main { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: #f4f7fb; }
.chat-heading { min-height: 88px; display: flex; align-items: center; padding: 18px 74px 16px 24px; background: #fff; border-bottom: 1px solid var(--line); }
.chat-heading h2 { margin: 0; color: var(--navy); font-size: 23px; }
.chat-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.chat-heading p.error { color: #9b303b; }
.chat-messages { min-height: 0; display: flex; flex-direction: column; gap: 10px; padding: 20px 24px; overflow-y: auto; overscroll-behavior: contain; }
.chat-message { width: fit-content; max-width: min(78%, 620px); padding: 10px 13px; background: #fff; border: 1px solid #dfe6ef; border-radius: 5px 14px 14px; box-shadow: 0 4px 14px rgba(13, 35, 72, .06); }
.chat-message.mine { align-self: flex-end; background: #e6f0ff; border-color: #bfd5f6; border-radius: 14px 5px 14px 14px; }
.chat-message > div { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; }
.chat-message > div strong { color: var(--blue-dark); font-size: 11px; }
.chat-message time { color: var(--muted); font-size: 9px; white-space: nowrap; }
.chat-message p { margin: 5px 0 0; color: var(--text); font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; white-space: normal; }
.chat-empty { align-self: center; margin: auto; padding: 24px; color: var(--muted); text-align: center; }
.chat-composer { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 12px; padding: 14px 20px 17px; background: #fff; border-top: 1px solid var(--line); }
.chat-composer > label { grid-column: 1 / -1; color: var(--navy); font-size: 11px; font-weight: 900; }
.chat-composer textarea { min-width: 0; min-height: 74px; resize: vertical; padding: 10px 12px; color: var(--text); background: #fbfcfe; border: 1px solid #bfcada; border-radius: 9px; font: inherit; line-height: 1.4; }
.chat-composer textarea:focus { outline: 3px solid rgba(43, 111, 205, .16); border-color: var(--blue); }
.chat-composer .primary-button { grid-column: 2; grid-row: 2; align-self: stretch; min-width: 112px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.chat-composer .primary-button svg { width: 18px; height: 18px; }
.chat-composer-meta { grid-column: 1; display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 10px; }
.chat-composer-meta b.limit { color: #a42f3b; }
.chat-error { grid-column: 1 / -1; min-height: 17px; margin: 0; font-size: 11px; }

.admin-chat-heading, .admin-chat-users-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.admin-chat-heading .secondary-button { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; }
.admin-chat-heading .secondary-button svg { width: 18px; height: 18px; }
.admin-chat-status { margin: 10px 0 20px; padding: 10px 12px; color: var(--muted); background: #f7f9fc; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; }
.admin-chat-users { display: grid; gap: 8px; margin-top: 12px; }
.admin-chat-user { min-height: 66px; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.admin-chat-user.disabled { background: #fff7f7; border-color: #efc9cd; }
.admin-chat-user-icon { width: 38px; height: 38px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); border-radius: 9px; }
.admin-chat-user-icon svg { width: 20px; height: 20px; }
.admin-chat-user > span:nth-child(2) { min-width: 0; }
.admin-chat-user strong, .admin-chat-user small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-chat-user strong { color: var(--navy); font-size: 13px; }
.admin-chat-user small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.admin-chat-user-control { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.admin-chat-user-control input { width: 23px; height: 23px; accent-color: #b33442; }
.admin-capability-option.admin-only { opacity: .58; }

@media (max-width: 760px) {
  .main-nav { grid-template-columns: repeat(3, 1fr); }
  .chat-unread-badge { position: absolute; top: 3px; right: 6px; }
  .chat-dialog { width: calc(100vw - 12px); max-height: calc(100vh - 12px); }
  .chat-dialog-content { height: calc(100vh - 12px); grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .chat-sidebar { padding: 10px 56px 10px 10px; }
  .chat-side-heading { min-height: 42px; padding: 0 0 8px; }
  .chat-side-heading .dialog-icon { width: 38px; height: 38px; }
  .chat-channels { display: flex; gap: 6px; margin: 8px -46px 8px 0; overflow-x: auto; overflow-y: hidden; }
  .chat-channels button { min-width: 156px; flex: 0 0 auto; min-height: 50px; }
  .chat-notification-control { grid-template-columns: minmax(0, 1fr) 150px; align-items: center; margin: 0 -46px 0 0; padding: 7px 9px; }
  .chat-notification-control small { grid-column: 1 / -1; }
  .chat-heading { min-height: 64px; padding: 11px 62px 10px 14px; }
  .chat-heading h2 { font-size: 19px; }
  .chat-messages { padding: 13px 10px; }
  .chat-message { max-width: 88%; }
  .chat-composer { padding: 10px; }
  .chat-composer textarea { resize: none; }
  .chat-composer-meta span { display: none; }
  .admin-chat-user { grid-template-columns: 36px minmax(0, 1fr); }
  .admin-chat-user-control { grid-column: 2; justify-self: start; }
}

@media (max-width: 430px) {
  .chat-notification-control { grid-template-columns: 1fr; }
  .chat-notification-control select { width: 100%; }
  .chat-composer { grid-template-columns: minmax(0, 1fr) 92px; }
  .chat-composer .primary-button { min-width: 92px; padding-inline: 10px; }
  .chat-heading p { max-width: 250px; }
}

.admin-download-from {
  max-width: 420px;
  margin: 0 0 18px;
}
.report-date-control small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
}

/* V13 · dashboard operațional, responsive și compatibil CSP */
.dashboard-apple .dashboard-kpi::after { display: none; }
.dashboard-apple .dashboard-chart-wrap { background: #fbfcff; }
.dashboard-apple .dashboard-command {
  color: var(--dash-text);
  background: var(--dash-surface-solid);
  border: 1px solid var(--dash-line);
}
.dashboard-apple .dashboard-command > header {
  align-items: center;
  margin-bottom: 12px;
  padding: 0 1px 12px;
  border-color: var(--dash-line);
}
.dashboard-apple .dashboard-command .dashboard-section-kicker { color: var(--dash-blue); }
.dashboard-apple .dashboard-command h2 { color: var(--dash-text); font-size: 22px; }
.dashboard-apple .dashboard-command > header p { color: var(--dash-muted); font-size: 12px; }
.dashboard-apple .dashboard-motor-chip {
  color: var(--dash-muted);
  background: #f6f7f9;
  border-color: var(--dash-line);
}
.dashboard-apple .dashboard-motor-chip[data-motor="ON"] { color: var(--dash-teal); background: var(--dash-teal-soft); }
.dashboard-apple .dashboard-motor-chip[data-motor="OFF"] { color: var(--dash-amber); background: var(--dash-amber-soft); }
.dashboard-apple .dashboard-command-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 12px;
  padding: 14px;
  color: var(--dash-text);
  background: #fbfcfe;
  border-color: var(--dash-line);
}
.dashboard-apple .dashboard-command-card-heading {
  grid-column: 1 / -1;
  display: flex !important;
  align-items: center;
  gap: 9px;
}
.dashboard-apple .dashboard-command-card-heading > span:last-child { min-width: 0; }
.dashboard-apple .dashboard-command-card-heading strong,
.dashboard-apple .dashboard-command-card-heading small { display: block; }
.dashboard-apple .dashboard-command-card-heading strong { margin: 0; color: var(--dash-text); font-size: 12px; letter-spacing: 0; line-height: 1.25; }
.dashboard-apple .dashboard-command-card-heading small { margin-top: 2px; color: var(--dash-muted); font-size: 10px; }
.dashboard-apple .dashboard-command-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid !important;
  place-items: center;
  color: var(--dash-blue);
  background: var(--dash-blue-soft);
  border-radius: 12px;
}
.dashboard-apple .dashboard-command-icon svg { width: 21px; height: 21px; }
.dashboard-apple .dashboard-command-card[data-metric="motor"] .dashboard-command-icon { color: var(--dash-amber); background: var(--dash-amber-soft); }
.dashboard-apple .dashboard-command-card[data-metric="thermal"] .dashboard-command-icon { color: var(--dash-red); background: var(--dash-red-soft); }
.dashboard-apple .dashboard-command-reading,
.dashboard-apple .dashboard-command-forecast { min-width: 0; }
.dashboard-apple .dashboard-command-reading small,
.dashboard-apple .dashboard-command-forecast small { margin: 0; color: var(--dash-muted); font-size: 10px; }
.dashboard-apple .dashboard-command-card .dashboard-command-reading strong {
  margin-top: 5px;
  color: var(--dash-blue-bright);
  font-size: clamp(22px, 1.8vw, 29px);
}
.dashboard-apple .dashboard-command-forecast { align-self: end; text-align: right; }
.dashboard-apple .dashboard-command-forecast b { display: block; margin-top: 5px; color: var(--dash-teal); font-size: 14px; }
.dashboard-apple .dashboard-command-foot {
  grid-column: 1 / -1;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 9px;
  border-top: 1px solid var(--dash-line);
}
.dashboard-apple .dashboard-command-card .dashboard-delta { margin: 0; color: var(--dash-blue); }
.dashboard-apple .dashboard-command-card .dashboard-delta.down { color: var(--dash-teal); }
.dashboard-apple .dashboard-command-card .dashboard-command-foot small { margin: 0; color: var(--dash-muted); text-align: right; }

.dashboard-apple .dashboard-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, .85fr);
  gap: 16px;
  margin-top: 16px;
}
.dashboard-apple .dashboard-overview-grid > .dashboard-week,
.dashboard-apple .dashboard-overview-grid > .dashboard-stations-panel { min-width: 0; margin-top: 0; }
.dashboard-apple .dashboard-overview-grid #dashboard-stations { grid-template-columns: 1fr; }
.dashboard-apple .dashboard-overview-grid .dashboard-station { min-height: 0; }
.dashboard-apple .dashboard-legend {
  width: 9px;
  height: 9px;
  display: inline-block;
  margin: 0 5px 0 10px;
  border-radius: 999px;
  vertical-align: -1px;
}
.dashboard-apple .dashboard-panel-heading p .dashboard-legend:first-child { margin-left: 0; }
.dashboard-apple .dashboard-legend.measured { background: var(--dash-blue-bright); }
.dashboard-apple .dashboard-legend.forecast { background: #14a991; }
.dashboard-apple .dashboard-week-bar { width: 32px; height: 96px; overflow: visible; background: transparent; border-radius: 0; }
.dashboard-apple .dashboard-week-bar .background { fill: #edf1f6; }
.dashboard-apple .dashboard-week-bar .measured { fill: var(--dash-blue-bright); }
.dashboard-apple .dashboard-week-bar .forecast { fill: #14a991; opacity: .86; }
.dashboard-apple .dashboard-week-bar.empty .background { fill: #f8fafc; stroke: #cbd4e1; stroke-dasharray: 4 4; }
.dashboard-apple .outlook-bar { width: 100%; height: 7px; display: block; overflow: hidden; border-radius: 999px; }
.dashboard-apple .outlook-bar .background { fill: #e8edf3; }
.dashboard-apple .outlook-bar .measured { fill: var(--dash-blue-bright); }
.dashboard-apple .outlook-bar .forecast { fill: #14a991; }

.dashboard-apple details.dashboard-lookback { padding: 0; overflow: hidden; }
.dashboard-apple .dashboard-lookback > summary {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  cursor: pointer;
  list-style: none;
}
.dashboard-apple .dashboard-lookback > summary::-webkit-details-marker { display: none; }
.dashboard-apple .dashboard-lookback > summary strong,
.dashboard-apple .dashboard-lookback > summary small { display: block; }
.dashboard-apple .dashboard-lookback > summary strong { margin-top: 5px; color: var(--dash-text); font-size: 19px; }
.dashboard-apple .dashboard-lookback > summary small { margin-top: 5px; color: var(--dash-muted); font-size: 11px; }
.dashboard-apple .dashboard-lookback-toggle { display: inline-flex; align-items: center; gap: 5px; color: var(--dash-blue); font-size: 11px; font-weight: 750; white-space: nowrap; }
.dashboard-apple .dashboard-lookback-toggle svg { width: 16px; height: 16px; transform: rotate(90deg); transition: transform 170ms ease; }
.dashboard-apple details.dashboard-lookback[open] .dashboard-lookback-toggle svg { transform: rotate(-90deg); }
.dashboard-apple details.dashboard-lookback[open] > summary { border-bottom: 1px solid var(--dash-line); }
.dashboard-apple details.dashboard-lookback > .lookback-table-wrap { padding: 14px 20px 20px; }

@media (min-width: 901px) and (max-width: 1420px) {
  .dashboard-apple .dashboard-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
  .dashboard-apple .dashboard-overview-grid { grid-template-columns: 1fr; }
  .dashboard-apple .dashboard-overview-grid #dashboard-stations { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  body.dashboard-active .app-header { min-height: 66px; flex-wrap: nowrap; gap: 7px; padding: 7px 10px; }
  body.dashboard-active .brand-button { flex: 0 0 auto; min-height: 48px; }
  body.dashboard-active .header-soceram-logo { width: 38px; height: 48px; }
  body.dashboard-active .main-nav { display: none; }
  body.dashboard-active .header-controls { width: auto; flex: 0 0 auto; margin-left: auto; border: 0; }
  body.dashboard-active .operator-control,
  body.dashboard-active .date-control,
  body.dashboard-active .hour-control,
  body.dashboard-active .sync-button { display: none; }
  body.dashboard-active .account-control,
  body.dashboard-active .logout-button { min-height: 44px; display: flex; padding: 6px; border: 0; }
  .dashboard-apple { display: block; min-height: calc(100vh - 66px); }
  .dashboard-apple .dashboard-side-nav {
    position: fixed;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 55;
    width: 100%;
    height: calc(72px + env(safe-area-inset-bottom));
    display: flex;
    min-height: auto;
    flex-direction: row;
    justify-content: space-around;
    gap: 2px;
    padding: 6px 7px calc(6px + env(safe-area-inset-bottom));
    overflow: visible;
    background: rgba(255,255,255,.94);
    border: 0;
    border-top: 1px solid var(--dash-line);
    box-shadow: 0 -12px 36px rgba(18,31,58,.09);
  }
  .dashboard-apple .dashboard-side-brand { display: none; }
  .dashboard-apple .dashboard-side-nav button {
    min-width: 48px;
    min-height: 57px;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 4px;
    font-size: 11px;
    border-radius: 12px;
  }
  .dashboard-apple .dashboard-side-nav button svg { width: 22px; height: 22px; }
  .dashboard-apple .dashboard-side-nav button.selected::before { top: -6px; right: 24%; bottom: auto; left: 24%; width: auto; height: 3px; border-radius: 0 0 999px 999px; }
  .dashboard-apple .dashboard-canvas { padding: 20px 14px calc(94px + env(safe-area-inset-bottom)); }
  .dashboard-apple .dashboard-filters.dashboard-global-toolbar { margin-inline: 0; }
  .dashboard-apple .dashboard-kpis { grid-template-columns: 1fr 1fr; }
  .dashboard-apple .dashboard-command-grid,
  .dashboard-apple .dashboard-outlook-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-apple .dashboard-primary-grid,
  .dashboard-apple .dashboard-secondary-grid { grid-template-columns: 1fr; }
  .dashboard-apple .dashboard-metrics-panel { min-height: 0; }
  .dashboard-apple .dashboard-metric-cards { grid-template-columns: repeat(6, 214px); margin-inline: -13px; padding: 0 13px 4px; overflow-x: auto; scroll-snap-type: x proximity; }
  .dashboard-apple .dashboard-metric-card { min-width: 214px; scroll-snap-align: start; }
}

@media (max-width: 560px) {
  .dashboard-apple .dashboard-heading h1 { font-size: 28px; }
  .dashboard-apple .dashboard-eyebrow { font-size: 10px; }
  .dashboard-apple .dashboard-heading p { font-size: 11px; }
  .dashboard-apple .dashboard-source-status { min-width: 50px; width: 50px; }
  .dashboard-apple .dashboard-source-status > span:nth-child(2) {
    display: block !important;
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .dashboard-apple .dashboard-overview-grid #dashboard-stations { grid-template-columns: 1fr; }
  .dashboard-apple .dashboard-command-card { grid-template-columns: 1fr; }
  .dashboard-apple .dashboard-command-card-heading,
  .dashboard-apple .dashboard-command-foot { grid-column: 1; }
  .dashboard-apple .dashboard-command-forecast { text-align: left; }
  .dashboard-apple .dashboard-command-foot { align-items: flex-start; flex-direction: column; }
  .dashboard-apple .dashboard-command-card .dashboard-command-foot small { text-align: left; }
  .dashboard-apple .dashboard-week-strip { gap: 3px; }
  .dashboard-apple .dashboard-week-day { padding-inline: 2px; }
  .dashboard-apple .dashboard-week-day strong { font-size: 11px; }
  .dashboard-apple .dashboard-lookback > summary { min-height: 78px; padding: 15px 14px; }
  .dashboard-apple .dashboard-lookback-toggle { font-size: 0; }
  .dashboard-apple .dashboard-lookback-toggle svg { width: 20px; height: 20px; }
  .dashboard-apple details.dashboard-lookback > .lookback-table-wrap { padding: 10px 12px 14px; }
}

@media (max-width: 380px) {
  body.dashboard-active .logout-button { display: none; }
  .dashboard-apple .dashboard-side-nav { max-width: 100vw; gap: 0; padding-inline: 3px; }
  .dashboard-apple .dashboard-side-nav button { min-width: 0; padding-inline: 1px; overflow: hidden; font-size: 9px; letter-spacing: -.02em; }
  .dashboard-apple .dashboard-canvas { padding-inline: 10px; }
  .dashboard-apple .dashboard-heading h1 { font-size: 25px; }
  .dashboard-apple .dashboard-command-grid { grid-template-columns: 1fr; }
  .dashboard-apple .dashboard-kpi,
  .dashboard-apple .dashboard-kpi:last-child { min-height: 116px; grid-template-columns: 38px minmax(0, 1fr); gap: 8px; padding: 12px; }
  .dashboard-apple .dashboard-kpi-icon { width: 38px; height: 38px; }
  .dashboard-apple .dashboard-kpi strong { font-size: 22px; }
}

@media (max-width: 340px) {
  .dashboard-apple .dashboard-kpis { grid-template-columns: 1fr; }
  .dashboard-apple .dashboard-outlook-grid { grid-template-columns: 1fr; }
}

.operations-lookback,
.dashboard-lookback {
  min-width: 0;
}
.operations-lookback {
  margin: 18px 0 8px;
  padding: 18px 18px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
}
.operations-lookback.compact { margin-top: 0; margin-bottom: 16px; }
.lookback-heading { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.lookback-kicker,
.lookback-heading h2,
.lookback-heading p { display: block; }
.lookback-kicker {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.lookback-heading h2 { margin: 4px 0 0; color: var(--navy); font-size: 18px; }
.lookback-heading p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.lookback-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}
.lookback-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f3f6fb;
  color: var(--navy);
  font-size: 11px;
  font-weight: 700;
}
.lookback-chip.missing { background: #fee2e2; color: #991b1b; }
.lookback-chip.problem { background: #ffedd5; color: #9a3412; }
.lookback-chip.skipped { background: #fef3c7; color: #92400e; }
.lookback-chip.ok { background: #dcfce7; color: #166534; }
.lookback-table-wrap { overflow: visible; border: 0; border-radius: 0; }
.lookback-scroll { overflow: auto; border: 1px solid var(--line); border-radius: 14px; }
.lookback-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 12px;
}
.lookback-table th,
.lookback-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
  vertical-align: top;
}
.lookback-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7f9fc;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.lookback-table .hour-col { position: sticky; left: 0; z-index: 2; background: #fff; font-weight: 800; color: var(--navy); }
.lookback-table thead .hour-col { z-index: 3; background: #f7f9fc; }
.lookback-table .station-cazan { box-shadow: inset 0 -2px 0 #f0c36a; }
.lookback-table .station-poarta { box-shadow: inset 0 -2px 0 #5ec8c0; }
.lookback-cell { display: grid; gap: 2px; }
.lookback-cell strong { color: var(--navy); font-size: 13px; }
.lookback-cell small { color: var(--muted); font-size: 10px; }
.lookback-table tr.future td { background: #f8fafc; color: #94a3b8; }
.lookback-table td.value { background: #f0fdf4; }
.lookback-table td.skipped { background: #fffbeb; }
.lookback-table td.missing { background: #fef2f2; }
.lookback-table td.problem { background: #fff7ed; }
.lookback-table td.blocked { background: #f8fafc; }
.lookback-empty {
  padding: 18px;
  color: var(--muted);
  font-size: 13px;
}

.dashboard-apple .lookback-table-wrap { border-color: var(--dash-line); border-radius: 16px; }
.dashboard-apple .lookback-scroll { border-color: var(--dash-line); }
.dashboard-apple .lookback-table thead th,
.dashboard-apple .lookback-table thead .hour-col { background: #f4f7fb; color: var(--dash-muted); }
.dashboard-apple .lookback-table .hour-col { background: #fff; color: var(--dash-text); }
.dashboard-apple .lookback-heading h2,
.dashboard-apple .lookback-cell strong { color: var(--dash-text); }

.admin-advance-notice { margin: 16px 0 8px; padding: 16px; border: 1px solid #c7d9f8; border-radius: 14px; background: var(--blue-soft); }
.admin-advance-notice small { display: block; margin-top: 6px; line-height: 1.5; }
.index-reminder-notice {
  position: fixed;
  z-index: 90;
  right: 24px;
  bottom: 24px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  width: min(430px, calc(100vw - 32px));
  max-height: calc(100dvh - 40px);
  overflow: auto;
  padding: 20px;
  border: 1px solid #c7d9f8;
  border-top: 3px solid var(--blue);
  border-radius: 20px;
  color: var(--text);
  background: #fff;
  box-shadow: 0 18px 60px rgba(7, 26, 66, .19);
  animation: index-notice-enter .22s ease-out;
}
.index-reminder-symbol { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--blue-soft); color: var(--blue); }
.index-reminder-symbol svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.index-reminder-message strong { display: block; font-size: 16px; line-height: 1.4; }
.index-reminder-message p { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.index-reminder-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.index-reminder-actions button { min-height: 44px; padding: 10px 13px; font-size: 13px; }
@keyframes index-notice-enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 600px) { .index-reminder-notice { right: 12px; bottom: 12px; width: calc(100vw - 24px); padding: 16px; gap: 10px; } }
@media (prefers-reduced-motion: reduce) { .index-reminder-notice { animation: none; } }

@media (max-width: 760px) {
  .operations-lookback { padding: 14px; }
  .lookback-table { min-width: 520px; }
}
