:root {
  --ink: #16202e;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f6f8fb;
  --card: #ffffff;
  --accent: #1a46b8;
  --accent-soft: #e8eeff;
  --crit: #c4161c;
  --ok: #157347;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 14px/1.5 "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  min-height: 76px; padding: 14px 30px;
  background: #0f1c30; color: #fff;
}
.brand { display: flex; align-items: center; gap: 14px; }
.mark {
  font-weight: 800; letter-spacing: .06em; font-size: 15px;
  background: #1a46b8; padding: 8px 10px; border-radius: 8px;
}
header h1 { margin: 0; font-size: 17px; font-weight: 650; }
header p { margin: 2px 0 0; font-size: 12.5px; color: #9fb3d1; }
.head-meta { font-size: 12.5px; color: #9fb3d1; }
.header-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.app-layout {
  display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: calc(100vh - 76px);
}
.sidebar {
  position: relative; z-index: 10; padding: 24px 14px; border-right: 1px solid #e8ebf0;
  background: #fff;
}
.sidebar-nav { position: sticky; top: 24px; display: grid; gap: 5px; }
.sidebar-nav button {
  display: flex; align-items: center; gap: 13px; width: 100%; padding: 11px 13px;
  border: 0; border-radius: 8px; color: #69717e; background: transparent;
  font-size: 14px; font-weight: 500; text-align: left; transition: color .15s ease, background .15s ease;
}
.sidebar-nav button:hover { color: #1a46b8; background: #f4f7fc; }
.sidebar-nav button.active { color: #123f9f; background: #edf3ff; font-weight: 650; }
.sidebar-nav button:focus-visible { outline: 2px solid #1a46b8; outline-offset: 2px; }
.sidebar-nav button.is-disabled { color: #a7adb6; cursor: not-allowed; }
.sidebar-nav button.is-disabled:hover { color: #a7adb6; background: transparent; }
.sidebar-nav svg {
  flex: 0 0 19px; width: 19px; height: 19px; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.main-nav { display: flex; gap: 5px; }
.main-nav button {
  padding: 6px 10px; border-color: #32445e; color: #c6d2e3; background: transparent;
}
.main-nav button:hover, .main-nav button.active { color: #fff; border-color: #6083ba; background: #1c3150; }
.nav-dropdown { position: relative; }
.main-nav .nav-dropdown-toggle {
  display: flex; align-items: center; gap: 9px;
}
.nav-chevron {
  width: 7px; height: 7px; border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px);
  transition: transform .15s ease;
}
.nav-dropdown.open .nav-chevron { transform: rotate(225deg) translate(-1px, -1px); }
.nav-dropdown-menu {
  position: absolute; z-index: 20; top: calc(100% + 7px); right: 0;
  min-width: 158px; padding: 5px; border: 1px solid #32445e; border-radius: 8px;
  background: #12223a; box-shadow: 0 10px 24px rgba(0, 0, 0, .28);
}
.main-nav .nav-dropdown-menu button {
  display: block; width: 100%; padding: 8px 10px; border: 0;
  text-align: left; white-space: nowrap;
}
.main-nav .nav-dropdown-menu button:hover,
.main-nav .nav-dropdown-menu button.active { background: #1c3150; }

main { width: 100%; min-width: 0; padding: 24px 30px; max-width: 1680px; margin: 0 auto; }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 12.5px; }

.gauge-overview {
  max-width: 1440px; margin: 0 auto; padding: 8px 4px 32px;
  --dashboard-blue: #075dcc; --dashboard-blue-dark: #0753be;
}
.gauge-dashboard-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  margin-bottom: 28px;
}
.gauge-breadcrumb {
  display: flex; align-items: center; gap: 10px; margin: 0 0 26px;
  color: #334155; font-size: 12px; font-weight: 650;
}
.screen-back-button {
  display: inline-grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px;
  margin-right: 1px; padding: 0; border: 1px solid #dbe4f0; border-radius: 7px;
  color: var(--accent); background: #fff; cursor: pointer;
  transition: color .15s ease, background .15s ease, border-color .15s ease, transform .15s ease;
}
.screen-back-button:hover {
  color: #fff; background: var(--accent); border-color: var(--accent);
  transform: translateX(-1px);
}
.screen-back-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.screen-back-button svg {
  width: 17px; height: 17px; fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.gauge-breadcrumb span { color: #9aa3b1; font-weight: 500; }
.gauge-breadcrumb b { color: #d2d7df; font-weight: 500; }
.gauge-dashboard-head h2 { margin: 0; color: #222b38; font-size: 17px; font-weight: 600; }
.gauge-dashboard-head h2 span { color: #576170; font-weight: 500; }
.fleet-status { margin: 0 0 1px; color: #6d7582; font-size: 13px; white-space: nowrap; }
.fleet-status span {
  display: inline-block; width: 7px; height: 7px; margin-right: 7px;
  border-radius: 50%; background: var(--dashboard-blue); vertical-align: 1px;
}
.gauge-dashboard-actions { display: flex; align-items: center; gap: 18px; }
.calibration-notifications { position: relative; }
.calibration-notification-bell {
  position: relative; display: grid; place-items: center; width: 40px; height: 40px;
  padding: 8px; border: 1px solid #dbe4f0; border-radius: 10px;
  color: var(--dashboard-blue); background: #fff; cursor: pointer;
}
.calibration-notification-bell:hover,
.calibration-notification-bell[aria-expanded="true"] { background: #edf4ff; }
.calibration-notification-bell:focus-visible { outline: 2px solid var(--dashboard-blue); outline-offset: 3px; }
.calibration-notification-bell svg {
  width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.calibration-notification-count {
  position: absolute; top: -7px; right: -7px; min-width: 20px; height: 20px;
  padding: 0 5px; display: grid; place-items: center; border-radius: 12px;
  background: #e11d48; color: #fff; font-size: 11px; font-weight: 700; border: 2px solid #fff;
}
.notification-page { padding: 24px; background: #fff; border: 1px solid #e5ebf3; border-radius: 14px; min-width: 0; }
.notification-page-head, .notification-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.notification-page-head h2 { margin: 0; color: #222b38; font-size: 24px; }
.notification-page-head p, .notification-toolbar p { color: #64748b; font-size: 14px; }
.notification-toolbar { margin: 16px 0; }
.notification-toolbar label { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.notification-table-wrap { overflow-x: auto; }
.notification-table { width: 100%; min-width: 1100px; border-collapse: collapse; text-align: left; font-size: 13px; }
.notification-table th { background: #f1f5f9; color: #475569; font-size: 12px; }
.notification-table th, .notification-table td { padding: 16px 12px; border-bottom: 1px solid #e5ebf3; vertical-align: middle; }
.notification-table td { overflow-wrap: anywhere; }
.notification-unread { background: #f0f6ff; }
.notification-unread td:nth-child(2), .notification-unread td:nth-child(3) { font-weight: 600; color: #1e40af; }
.notification-flag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 20px; font-size: 12px; white-space: nowrap; }
.notification-flag::before { content: "⚑"; }
.notification-flag.is-unread { background: #dbeafe; color: #1d4ed8; }
.notification-flag.is-read { background: #e8f5ed; color: #166534; }
.notification-table button { padding: 7px 12px; border: 1px solid #bfdbfe; border-radius: 6px; color: #1d4ed8; background: #fff; cursor: pointer; }
.notification-table button:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.notification-detail { margin-bottom: 24px; padding: 20px; border: 1px solid #bfdbfe; border-radius: 10px; background: #f8fbff; }
.notification-detail h3 { margin: 0 0 16px; }
.notification-detail dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; margin: 0; }
.notification-detail dt { color: #64748b; font-size: 12px; margin-bottom: 5px; }
.notification-detail dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.calibration-notification-empty { text-align: center; color: #64748b; }
@media (max-width: 700px) {
  .gauge-dashboard-actions { width: 100%; justify-content: space-between; gap: 8px; }
}
.gauge-overview-search {
  display: flex; align-items: center; width: min(660px, 100%); min-height: 48px;
  margin-bottom: 30px; padding: 0 15px; border: 1px solid #eef1f5; border-radius: 12px;
  color: #263241; background: #fff; box-shadow: 0 5px 22px rgba(34, 49, 70, .025);
}
.gauge-overview-search:focus-within {
  border-color: #adc8ec; box-shadow: 0 0 0 3px rgba(7, 93, 204, .08);
}
.gauge-overview-search svg {
  flex: 0 0 20px; width: 20px; height: 20px; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round;
}
.gauge-overview-search input {
  min-width: 0; width: 100%; padding: 13px 14px; border: 0; outline: 0;
  color: var(--ink); background: transparent; font: inherit;
}
.gauge-overview-search input::placeholder { color: #b8bec8; }
.gauge-overview-search kbd {
  flex: 0 0 auto; color: #8b94a2; background: transparent; font: 11px/1.2 inherit;
  white-space: nowrap;
}
.gauge-dashboard-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; gap: 28px;
}
.gauge-dashboard-main { min-width: 0; }
.gauge-summary-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.gauge-summary-card {
  display: flex; min-width: 0; min-height: 154px; padding: 24px 26px;
  flex-direction: column; justify-content: center; border: 1px solid #edf0f4; border-radius: 14px;
  background: #fff; box-shadow: 0 4px 18px rgba(25, 39, 61, .025);
}
.gauge-summary-main {
  display: flex; align-items: center; width: 100%; min-width: 0;
}
.gauge-summary-icon {
  display: inline-grid; flex: 0 0 44px; width: 44px; height: 44px; place-items: center;
  border-radius: 12px; color: var(--dashboard-blue); background: #edf5ff;
}
.gauge-summary-icon svg {
  width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.gauge-summary-card--overdue { justify-content: flex-start; }
.gauge-summary-card--overdue .gauge-summary-icon { color: #d71932; background: #fff0f2; }
.gauge-summary-copy { min-width: 0; margin-left: 15px; }
.gauge-summary-label {
  display: block; color: #2a3441; font-size: 12px; font-weight: 750;
  letter-spacing: .065em; line-height: 1.2; text-transform: uppercase;
}
.gauge-summary-metric { display: flex; align-items: baseline; gap: 7px; margin-top: 5px; }
.gauge-summary-metric small {
  overflow: hidden; color: #64748b; font-size: 11px; font-weight: 400;
  line-height: 1.25; text-overflow: ellipsis;
}
.gauge-summary-arrow { margin-left: auto; color: var(--dashboard-blue); font-size: 19px; line-height: 1; }
.gauge-summary-card.clickable {
  cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.gauge-summary-card.clickable:hover {
  transform: translateY(-2px); border-color: #cadcf2; box-shadow: 0 12px 28px rgba(15, 58, 112, .08);
}
.gauge-summary-card.clickable:focus-visible {
  outline: 3px solid rgba(26, 70, 184, .2); outline-offset: 3px; border-color: var(--accent);
}
.gauge-summary-value {
  color: #0f172a; font-size: 26px; line-height: 1.1; font-weight: 750;
  font-variant-numeric: tabular-nums;
}
.gauge-summary-value.overdue { color: #d71932; }
.due-breakdown {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 16px;
  padding-top: 14px; border-top: 1px solid #e8edf4;
}
.due-breakdown > div { min-width: 0; padding: 0 9px; border-left: 1px solid #e8edf4; }
.due-breakdown > div:first-child { padding-left: 0; border-left: 0; }
.due-breakdown > div:last-child { padding-right: 0; }
.due-breakdown strong { display: block; color: #d71932; font-size: 16px; line-height: 1.2; }
.due-breakdown small {
  display: block; margin-top: 4px; color: #53627a; font-size: 9.5px; line-height: 1.25;
  white-space: nowrap;
}
.due-summary-caption { display: block; margin-top: 5px; color: #64748b; font-size: 11px; }
.due-count-button {
  display: flex; width: 100%; flex-direction: column; align-items: flex-start; gap: 6px;
  padding: 6px; border: 1px solid transparent; border-radius: 8px; background: transparent;
  color: var(--dashboard-blue); text-align: left; cursor: pointer; font: inherit;
}
.due-count-button span { font-size: 12px; font-weight: 700; }
.due-breakdown .due-count-button strong { color: var(--dashboard-blue); font-size: 26px; }
.due-breakdown .due-count-button--overdue, .due-breakdown .due-count-button--overdue strong { color: #d71932; }
.due-count-button:hover, .due-count-button[aria-pressed="true"] { background: #edf5ff; border-color: #cadcf2; }
.due-count-button--overdue:hover, .due-count-button--overdue[aria-pressed="true"] { background: #fff0f2; border-color: #f4c6cd; }
.due-count-button:focus-visible, .due-period-filter:focus-visible { outline: 2px solid var(--dashboard-blue); outline-offset: 2px; }
.due-period-filter { width: 100%; min-width: 0; margin-top: 6px; padding: 6px 3px; border: 1px solid #dce5f0; border-radius: 6px; background: #fff; color: #53627a; font: inherit; font-size: 11px; }
.gauge-overview-message { margin: 14px 0 0; color: var(--crit); text-align: center; }
.empty-gauge-summary { margin: 24px 0; color: var(--muted); text-align: center; }

.gauge-list-panel {
  overflow: hidden; margin-top: 24px; background: #fff; border: 1px solid #edf0f4;
  border-radius: 14px; box-shadow: 0 5px 24px rgba(24, 38, 59, .035);
}
.gauge-list-heading {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 18px;
  padding: 22px 24px 14px;
}
.back-link {
  margin: 0 0 8px; padding: 0; border: 0; color: var(--dashboard-blue); background: transparent;
  font: inherit; font-size: 11px; font-weight: 650;
}
.back-link:hover { text-decoration: underline; }
.gauge-list-heading h2 { margin: 0; font-size: 15px; font-weight: 700; }
.gauge-list-heading p { margin: 3px 0 0; color: var(--muted); }
.gauge-list-total {
  flex: 0 0 auto; padding: 5px 9px; border-radius: 999px; color: var(--dashboard-blue);
  background: #edf5ff; font-size: 11px; font-weight: 700;
}
.gauge-list-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 0 24px 4px;
}
.gauge-list-search {
  display: flex; align-items: center; gap: 9px; width: min(480px, 100%); padding: 0 12px;
  border: 1px solid #edf0f4; border-radius: 8px; color: var(--muted); background: #fff;
}
.gauge-list-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.gauge-list-search input {
  width: 100%; padding: 8px 0; border: 0; outline: 0; color: var(--ink); background: transparent; font: inherit;
}
.gauge-list-tabs { display: flex; align-items: center; gap: 2px; border-bottom: 1px solid var(--line); }
.gauge-list-tabs button {
  margin-bottom: -1px; padding: 8px 10px; border: 0; border-bottom: 2px solid transparent;
  border-radius: 0; color: var(--muted); background: transparent; font-size: 12px; font-weight: 650;
}
.gauge-list-tabs button:hover { color: var(--accent); }
.gauge-list-tabs button.active { color: var(--accent); border-bottom-color: var(--accent); }
.gauge-registry-scroll { overflow-x: hidden; padding: 8px 24px 10px; }
.gauge-registry-table { width: 100%; min-width: 0; border-collapse: collapse; table-layout: fixed; }
.gauge-registry-table th:nth-child(1) { width: 5%; }
.gauge-registry-table th:nth-child(2) { width: 11%; }
.gauge-registry-table th:nth-child(3) { width: 15%; }
.gauge-registry-table th:nth-child(4) { width: 10%; }
.gauge-registry-table th:nth-child(5) { width: 12%; }
.gauge-registry-table th:nth-child(6) { width: 12%; }
.gauge-registry-table th:nth-child(7) { width: 9%; }
.gauge-registry-table th:nth-child(8) { width: 11%; }
.gauge-registry-table th:nth-child(9) { width: 11%; }
.gauge-registry-table th:nth-child(10) { width: 4%; }
.gauge-registry-table th {
  position: static; padding: 13px 10px; color: #7e8795; background: transparent; font-size: 10px;
  font-weight: 700; letter-spacing: .06em; overflow-wrap: anywhere; text-align: left; text-transform: uppercase;
}
.gauge-registry-table td {
  padding: 14px 10px; border-bottom: 1px solid #f0f2f5; overflow-wrap: anywhere; vertical-align: middle;
}
.gauge-registry-table th:last-child, .gauge-registry-table td:last-child {
  padding-right: 0; padding-left: 0; text-align: center;
}
.gauge-registry-table th:first-child, .gauge-list-serial-cell {
  padding-right: 4px; padding-left: 4px; text-align: center; white-space: nowrap;
}
.gauge-registry-table tbody tr { transition: background .12s ease; }
.gauge-registry-table tbody tr:hover { background: #f8fbff; }
.gauge-id-cell { color: var(--dashboard-blue); font-weight: 700; }
.gauge-name-cell strong { display: block; color: var(--ink); font-weight: 650; }
.gauge-name-cell small { display: block; margin-top: 2px; color: var(--muted); }
.gauge-muted-cell { color: var(--muted); }
.gauge-registry-table tbody tr.gauge-row-overdue { background: #fff0f2; }
.gauge-registry-table tbody tr.gauge-row-overdue:hover { background: #ffe1e6; }
.gauge-registry-table .gauge-row-overdue td,
.gauge-registry-table .gauge-row-overdue strong,
.gauge-registry-table .gauge-row-overdue small,
.gauge-registry-table .gauge-row-overdue button { color: #bb1f2c; }
.gauge-status {
  display: inline-flex; align-items: center; gap: 6px; padding: 0; border-radius: 0;
  background: transparent !important; font-size: 11.5px; font-weight: 700; white-space: nowrap;
}
.gauge-status::before { display: none; }
.gauge-status.overdue { color: #bb1f2c; background: #fff0f1; }
.gauge-status.warning { color: #a65b00; background: #fff5df; }
.gauge-status.calibrated { color: var(--dashboard-blue); background: #eaf8f1; }
.gauge-status.unavailable { color: #697586; background: #eef1f5; }
.gauge-row-action {
  width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; color: #1f2937;
  background: transparent; font-size: 20px; line-height: 1;
}
.gauge-row-action:hover { background: var(--accent-soft); }
.gauge-list-message { margin: 12px 24px 0; padding: 10px 12px; border-radius: 7px; color: var(--crit); background: #fff1f1; }
.empty-gauge-list { padding: 54px 20px; color: var(--muted); text-align: center; }
.empty-gauge-list > span { display: block; font-size: 24px; }
.empty-gauge-list strong { display: block; margin-top: 8px; color: var(--ink); font-size: 15px; }
.empty-gauge-list p { margin: 3px 0 0; }

.gauge-quick-actions { display: grid; gap: 16px; min-width: 0; padding-top: 0; }
.gauge-action-card {
  position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center;
  gap: 13px; min-height: 126px; padding: 20px; overflow: hidden; border: 1px solid #edf0f4;
  border-radius: 17px; color: #202a37; background: #fff; text-align: left;
  box-shadow: 0 5px 22px rgba(24, 38, 59, .035);
}
.gauge-action-card:hover { border-color: #cbdcf2; box-shadow: 0 12px 26px rgba(12, 65, 133, .09); }
.gauge-action-icon {
  display: grid; width: 44px; height: 44px; place-items: center; align-self: start;
  border-radius: 12px; color: var(--dashboard-blue); background: #edf5ff;
}
.gauge-action-icon svg {
  width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.gauge-action-title { align-self: start; padding-top: 5px; font-size: 13px; font-weight: 700; line-height: 1.35; }
.gauge-action-cta {
  display: flex; grid-column: 1 / -1; align-items: center; justify-content: space-between;
  margin-top: 4px; padding-top: 15px; border-top: 1px solid #e8edf4;
  font-size: 11px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase;
}
.gauge-action-cta b { font-size: 17px; font-weight: 400; }
.movement-actions { gap: 8px; }
.movement-actions button {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 0; border: 0;
  color: var(--dashboard-blue); background: transparent; font: inherit; font-weight: 750;
  letter-spacing: .04em; text-transform: uppercase;
}
.movement-actions button:hover { color: #0647a3; }
.movement-actions button:last-child { margin-left: auto; }
.gauge-action-card--primary {
  min-height: 154px; border-color: var(--dashboard-blue-dark); color: #fff;
  background: linear-gradient(145deg, #0a63d3, #0753bd); box-shadow: 0 10px 22px rgba(7, 83, 190, .2);
}
.gauge-action-card--primary:hover { border-color: #0647a3; box-shadow: 0 14px 28px rgba(7, 83, 190, .27); }
.gauge-action-card--primary .gauge-action-icon { color: #fff; background: rgba(255, 255, 255, .16); }
.gauge-action-card--primary .gauge-action-cta { border-top-color: rgba(255, 255, 255, .13); }
.gauge-ambient-card {
  display: grid; grid-template-columns: 28px minmax(0, 1fr) 8px; align-items: center; gap: 12px;
  min-height: 92px; padding: 18px 20px; border: 1px solid #edf0f4; border-radius: 15px;
  background: #fff; box-shadow: 0 4px 18px rgba(24, 38, 59, .025);
}
.gauge-ambient-icon { color: var(--dashboard-blue); font-size: 15px; font-weight: 700; }
.gauge-ambient-card small { display: block; color: #a8afb9; font-size: 10px; }
.gauge-ambient-card strong { display: block; margin-top: 3px; color: #293341; font-size: 12px; line-height: 1.4; }
.gauge-ambient-card i { width: 7px; height: 7px; border-radius: 50%; background: var(--dashboard-blue); }
.gauge-overview-actions { display: flex; justify-content: flex-end; }
.gauge-overview-actions button {
  width: 100%; color: var(--dashboard-blue); border-color: #dbe7f6; background: #f6faff; font-size: 12px;
}

.movement-modal {
  position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 24px;
  background: rgba(24, 32, 45, .48); backdrop-filter: blur(2px);
}
.movement-dialog {
  width: min(620px, 100%); max-height: calc(100vh - 48px); overflow-y: auto;
  border-radius: 20px; background: #fff; box-shadow: 0 24px 70px rgba(17, 24, 39, .25);
}
.movement-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
  padding: 30px 36px 22px; border-bottom: 1px solid #eef1f5;
}
.movement-head h2 { margin: 0; color: #192331; font-size: 24px; line-height: 1.2; }
.movement-head p { max-width: 280px; margin: 5px 0 0; color: #798393; font-size: 15px; line-height: 1.35; }
.movement-close {
  flex: 0 0 auto; padding: 0; border: 0; color: #9ba4b1; background: transparent;
  font-size: 30px; font-weight: 300; line-height: 1;
}
.movement-close:hover { color: #3d4856; }
.movement-form { padding: 26px 36px 0; }
.movement-field { display: flex; flex-direction: column; gap: 8px; margin: 0 0 22px; color: #4d5868; font-size: 12px; font-weight: 750; letter-spacing: .035em; text-transform: uppercase; }
.movement-field input[type="text"], .movement-field input[type="date"], .movement-field select {
  width: 100%; min-height: 50px; padding: 11px 16px; border: 1px solid #dfe4ea;
  border-radius: 12px; outline: 0; color: #273243; background: #fff; font: inherit;
  font-size: 14px; font-weight: 500; line-height: 1.4;
  letter-spacing: 0; text-transform: none; box-shadow: 0 2px 6px rgba(20, 35, 55, .025);
}
.movement-field input:focus, .movement-field select:focus { border-color: #2773df; box-shadow: 0 0 0 3px rgba(39, 115, 223, .11); }
.movement-searchable-select { width: 100%; }
.movement-field .movement-searchable-select > input[type="text"] { padding-right: 52px; }
.movement-field .movement-searchable-select > button {
  top: 1px; right: 1px; width: 50px; height: 48px; border-radius: 0 11px 11px 0;
}
.movement-field .movement-searchable-select .searchable-select-options {
  border-radius: 11px; text-transform: none; letter-spacing: 0;
}
.movement-searchable-select .searchable-select-option { min-height: 44px; }
.movement-searchable-select .searchable-select-option strong { font-size: 13px; }
.movement-searchable-select .searchable-select-option span { font-size: 12px; }
.movement-field small { color: #8c96a4; font-size: 11px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.movement-field .availability-text { color: #13966f; }
.movement-field .issued-text { color: #7d8794; }
.movement-field .issued-text:not(:empty)::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: #2d7eea; }
.movement-segments { padding: 0; border: 0; }
.movement-segments legend { width: 100%; margin-bottom: 8px; color: #4d5868; font-size: 12px; font-weight: 750; letter-spacing: .035em; text-transform: uppercase; }
.movement-segments legend small { float: right; color: #9aa3af; font-weight: 500; letter-spacing: 0; text-transform: none; }
.movement-segments > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 5px; border-radius: 12px; background: #f3f6f9; }
.movement-segments label { position: relative; min-width: 0; }
.movement-segments input { position: absolute; opacity: 0; pointer-events: none; }
.movement-segments span {
  display: grid; min-height: 40px; padding: 7px 9px; place-items: center; border: 1px solid transparent;
  border-radius: 9px; color: #5f6b7a; background: transparent; font-size: 12px; font-weight: 650;
  letter-spacing: 0; text-align: center; text-transform: none; cursor: pointer;
}
.movement-segments input:checked + span { border-color: #e1e6ec; color: #1d5fc1; background: #fff; box-shadow: 0 2px 6px rgba(26, 48, 77, .06); }
.duration-segments > div { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0; background: transparent; }
.duration-segments span { border-color: #dfe4ea; }
.duration-segments input:checked + span { border-color: #2678e7; box-shadow: 0 0 0 1px #2678e7; }
.movement-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.movement-message { margin: -8px 0 18px; padding: 10px 12px; border-radius: 8px; color: #b4232c; background: #fff1f2; }
.movement-message.success { color: #13795b; background: #ebfaf5; }
.movement-footer { display: flex; justify-content: flex-end; gap: 12px; margin: 4px -36px 0; padding: 22px 36px; border-top: 1px solid #eef1f5; background: #fbfcfd; }
.movement-footer button { min-width: 105px; min-height: 46px; border-color: transparent; background: transparent; }
.movement-footer button.primary { min-width: 180px; color: #fff; background: #1768dc; border-radius: 12px; }
.movement-footer button.primary:hover { background: #0e58c4; }
body.movement-open { overflow: hidden; }

.pane {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px;
  max-width: 820px; margin: 24px auto;
}

.products-pane { max-width: 1180px; margin: 0 auto; }
.master-heading {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  margin-bottom: 18px;
}
.master-heading-title { display: flex; align-items: center; gap: 11px; min-width: 0; }
.master-heading h2 { margin: 0; font-size: 22px; }
.master-heading p { margin: 3px 0 0; color: var(--muted); }
.heading-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 9px; }
.visually-hidden {
  position: absolute !important; width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important; overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important;
}
.product-form, .product-list-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
}
.product-form { padding: 20px; margin-bottom: 18px; }
.gauge-modal {
  position: fixed; z-index: 110; inset: 0; display: grid; place-items: center; padding: 24px;
  background: rgba(24, 32, 45, .48); backdrop-filter: blur(2px);
}
.gauge-dialog {
  width: min(980px, 100%); max-height: calc(100vh - 48px); overflow-y: auto;
  margin: 0; padding: 28px; border: 0; border-radius: 16px;
  box-shadow: 0 24px 70px rgba(17, 24, 39, .25);
}
.gauge-modal-title { align-items: center; margin-bottom: 20px; }
.gauge-modal-title h3 { margin: 0; font-size: 20px; }
.gauge-modal-title > div { display: flex; align-items: center; gap: 18px; }
.gauge-modal-close {
  width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%;
  color: var(--muted); background: #f2f5f9; font-size: 24px; line-height: 1;
}
.gauge-modal-close:hover { color: var(--ink); background: #e8edf4; }
.gauge-form-message { margin-top: 16px; padding: 10px 12px; border-radius: 7px; color: var(--crit); background: #fff1f1; }
.gauge-modal-actions { margin: 24px -28px -28px; padding: 18px 28px; border-top: 1px solid var(--line); background: #fbfcfd; }
body.gauge-modal-open { overflow: hidden; }
.form-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.form-title h3 { margin: 0 0 15px; font-size: 17px; }
.form-title span { color: var(--muted); font-size: 12px; }
.product-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.gauge-type-master-fields { grid-template-columns: 1fr; }
.product-fields label { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 12.5px; }
.product-fields input, .product-fields select, .product-fields textarea {
  padding: 9px 10px; border: 1px solid var(--line); border-radius: 7px;
  color: var(--ink); font: inherit; background: #fff;
}
.product-fields textarea { resize: vertical; min-height: 76px; }
.product-fields input:focus, .product-fields select:focus, .product-fields textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.product-fields input[readonly] { background: #f3f5f8; color: var(--muted); }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.product-list-card { overflow: hidden; }
.product-scroll { overflow-x: auto; }
#productTable { min-width: 560px; }
#productTable td:last-child { width: 145px; white-space: nowrap; }
#productTable tbody tr:hover { cursor: default; }
.calibration-modal {
  position: fixed; z-index: 120; inset: 0; display: grid; place-items: center; padding: 24px;
  background: rgba(18, 27, 42, .54); backdrop-filter: blur(3px);
}
.calibration-dialog {
  width: min(1160px, 100%); max-height: calc(100vh - 48px); overflow-y: auto;
  border: 1px solid #e4e9f1; border-radius: 16px; background: #fff;
  box-shadow: 0 28px 80px rgba(17, 24, 39, .28);
}
.calibration-dialog-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
  padding: 25px 28px 18px;
}
.calibration-title-wrap { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.calibration-type-mark {
  flex: 0 0 11px; width: 11px; height: 11px; margin-top: 7px; border: 3px solid #fff;
  border-radius: 50%; background: #1768dc; box-shadow: 0 0 0 2px #1768dc;
}
.calibration-type-mark.external { background: #2879ea; box-shadow: 0 0 0 2px #2879ea; }
.calibration-dialog-head h3 { margin: 0; color: #172033; font-size: 20px; line-height: 1.3; }
.calibration-dialog-head p { margin: 4px 0 0; color: #697586; font-size: 12.5px; }
.calibration-close {
  flex: 0 0 32px; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%;
  color: #6c7685; background: transparent; font-size: 25px; line-height: 1;
}
.calibration-close:hover { color: #172033; background: #f1f4f8; }
.calibration-results-row { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px 18px; }
.calibration-results-row.split-observations { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.calibration-results-row > label { min-width: 0; }
.calibration-observation-heading { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; }
#calibrationObservationModeHint { display: block; margin-top: 3px; color: #697586; font-size: 12px; }
.calibration-observation-toggle {
  display: inline-flex; flex: 0 0 30px; align-items: center; width: 30px; height: 18px; min-height: 0;
  padding: 2px; border: 0; border-radius: 12px; background: #98a2b3; cursor: pointer;
}
.calibration-observation-toggle span { width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s; }
.calibration-observation-toggle[aria-checked="true"] { background: #2463db; }
.calibration-observation-toggle[aria-checked="true"] span { transform: translateX(12px); }
.calibration-observation-toggle:focus-visible { outline: 2px solid #2463db; outline-offset: 3px; }
.calibration-selector-grid {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; padding: 0 28px 18px;
}
.calibration-selector-grid label, .calibration-selector-field, .calibration-fields label, .reference-equipment-grid label {
  display: flex; flex-direction: column; gap: 6px; color: #536174; font-size: 12px; font-weight: 600;
}
.calibration-selector-grid select, .calibration-selector-grid input, .calibration-fields input, .calibration-fields select,
.reference-equipment-grid input {
  width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid #dce3ec;
  border-radius: 7px; color: #253044; background: #fff; font: inherit; font-weight: 400;
}
.calibration-selector-grid select:focus, .calibration-selector-grid input:focus, .calibration-fields input:focus,
.reference-equipment-grid input:focus {
  outline: none; border-color: #2773df; box-shadow: 0 0 0 3px rgba(39, 115, 223, .11);
}
.searchable-select { position: relative; }
.searchable-select > input { padding-right: 40px; }
.searchable-select > button {
  position: absolute; top: 1px; right: 1px; width: 40px; height: 40px; padding: 0;
  border: 0; border-radius: 0 7px 7px 0; color: #526071; background: transparent;
}
.searchable-select > button:hover { color: #1768dc; background: #f5f8fc; }
.searchable-select > button svg {
  width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; transition: transform .15s ease;
}
.searchable-select.open > button svg { transform: rotate(180deg); }
.searchable-select-options {
  position: absolute; z-index: 20; top: calc(100% + 5px); right: 0; left: 0;
  max-height: 230px; overflow-y: auto; padding: 5px; border: 1px solid #d9e1eb;
  border-radius: 8px; background: #fff; box-shadow: 0 12px 30px rgba(27, 39, 60, .16);
}
.searchable-select-option {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; min-height: 38px; padding: 8px 10px; border: 0; border-radius: 5px;
  color: #253044; background: transparent; text-align: left; cursor: pointer;
}
.searchable-select-option:hover, .searchable-select-option.active {
  color: #1458b3; background: #edf4ff;
}
.searchable-select-option strong { overflow: hidden; font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.searchable-select-option span { overflow: hidden; color: #7a8595; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.searchable-select-empty { margin: 0; padding: 12px 10px; color: #7a8595; font-size: 12px; font-weight: 400; }
.calibration-gauge-card {
  display: flex; align-items: center; gap: 13px; margin: 0 28px 18px; padding: 13px 15px;
  border: 1px solid #e4e9ff; border-radius: 8px; background: #f2f4ff;
}
.calibration-gauge-icon {
  display: grid; flex: 0 0 42px; width: 42px; height: 42px; place-items: center;
  border-radius: 7px; color: #1768dc; background: #fff;
}
.calibration-gauge-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.calibration-gauge-copy { display: flex; flex: 1; min-width: 0; flex-direction: column; }
.calibration-gauge-primary { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.calibration-gauge-primary strong {
  overflow: hidden; color: #202a3b; font-size: 13px; text-overflow: ellipsis; white-space: nowrap;
}
.calibration-gauge-primary strong:first-child { flex: 0 0 auto; }
.calibration-gauge-primary span { flex: 0 0 auto; color: #9ba5b4; font-size: 11px; }
.calibration-gauge-location {
  display: flex; align-items: center; gap: 4px; min-width: 0; margin-top: 2px;
  color: #667085; font-size: 11.5px;
}
.calibration-gauge-location svg {
  flex: 0 0 13px; width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8;
}
.calibration-gauge-location span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calibration-gauge-specification-label { flex: 0 0 auto; color: #344054; font-weight: 600; }
.calibration-status-badge {
  flex: 0 0 auto; padding: 4px 9px; border-radius: 999px; color: #17633d;
  background: #e8f7ee; font-size: 10.5px; font-weight: 700;
}
.calibration-status-badge.external { color: #1756a5; background: #e8f1ff; }
.certificate-upload-panel {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px 20px;
  margin: 0 28px 18px; padding: 15px 16px; border: 1px dashed #9dbcf0; border-radius: 9px;
  background: #f7faff;
}
.certificate-upload-copy { display: flex; align-items: center; gap: 12px; min-width: 0; }
.certificate-upload-copy strong { display: block; color: #26354d; font-size: 13px; }
.certificate-upload-copy p { margin: 3px 0 0; color: #66758a; font-size: 11.5px; line-height: 1.45; }
.certificate-ai-icon {
  display: grid; flex: 0 0 38px; width: 38px; height: 38px; place-items: center;
  border-radius: 8px; color: #1768dc; background: #e9f2ff;
}
.certificate-ai-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.certificate-upload-actions { display: flex; align-items: center; justify-content: flex-end; }
.certificate-upload-button {
  display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 8px 13px;
  border-color: #b8cbea; color: #175bb5; background: #fff; font-size: 12px; font-weight: 650;
}
.certificate-upload-button:hover { border-color: #2879ea; background: #f0f6ff; }
.certificate-upload-button:disabled { cursor: wait; opacity: .65; }
.certificate-upload-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.certificate-extraction-status {
  grid-column: 1 / -1; padding: 9px 11px; border-radius: 7px; color: #315d47;
  background: #eaf7ef; font-size: 11.5px;
}
.certificate-extraction-status.loading { color: #315a91; background: #eaf2ff; }
.certificate-extraction-status.error { color: #9a3030; background: #fff0f0; }
.calibration-fields {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px 18px;
  padding: 0 28px 24px;
}
.calibration-fields input[readonly] { color: #556276; background: #f4f6fb; }
.calibration-next-date > span:first-child { display: flex; justify-content: space-between; gap: 10px; }
.calibration-next-date strong { color: #1768dc; font-size: 11px; font-weight: 750; }
.calibration-date-control {
  position: relative; display: flex; align-items: center; min-height: 46px; padding: 0 8px;
  border: 1px solid #e6e8f7; border-radius: 7px; background: #f4f5ff;
}
.calibration-date-control:focus-within {
  border-color: #2773df; box-shadow: 0 0 0 3px rgba(39, 115, 223, .11);
}
.calibration-date-button {
  display: grid; flex: 0 0 34px; width: 34px; height: 34px; padding: 0; place-items: center;
  border: 0; border-radius: 6px; color: #5f6a7c; background: transparent;
}
.calibration-date-button:hover { color: #1768dc; background: #e9edfb; }
.calibration-date-button:focus-visible { outline: 2px solid #2773df; outline-offset: 1px; }
.calibration-date-button > svg {
  width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8;
}
.calibration-fields .calibration-date-control input {
  min-width: 0; min-height: 44px; padding: 7px 9px; border: 0; outline: 0;
  color: #3e4a5c; background: transparent; font-weight: 600; box-shadow: none;
}
.calibration-fields .calibration-date-control input:focus { border: 0; box-shadow: none; }
.calibration-checked-by { grid-column: auto; }
.reference-equipment-fields {
  grid-column: 1 / -1; margin: 0; padding: 14px;
  border: 1px solid #e3e8f0; border-radius: 8px; background: #fbfcfe;
}
.reference-equipment-fields legend { padding: 0 7px; color: #2f3a4d; font-size: 12px; font-weight: 700; }
.reference-equipment-grid {
  display: grid;
  grid-template-columns: 1.15fr 1.15fr 1.15fr .9fr .9fr;
  gap: 12px;
}
.calibration-dialog-actions {
  position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 10px;
  padding: 17px 28px; border-top: 1px solid #edf0f4; background: rgba(251, 252, 254, .96);
  backdrop-filter: blur(5px);
}
.calibration-dialog-actions button { min-height: 42px; padding-right: 18px; padding-left: 18px; }
.calibration-dialog-actions .primary { min-width: 155px; }
.calibration-dialog-actions .primary:disabled { border-color: #9fb9e9; background: #9fb9e9; cursor: not-allowed; }
body.calibration-modal-open { overflow: hidden; }
.external-calibration .calibration-dialog { scrollbar-width: none; }
.external-calibration .calibration-dialog::-webkit-scrollbar { display: none; }
@media (min-width: 1001px) {
  .external-calibration .calibration-dialog-head { padding: 18px 28px 12px; }
  .external-calibration .calibration-selector-grid { padding-bottom: 12px; }
  .external-calibration .calibration-gauge-card { margin-bottom: 12px; padding: 10px 15px; }
  .external-calibration .certificate-upload-panel { margin-bottom: 12px; padding: 10px 16px; }
  .external-calibration .calibration-fields { row-gap: 10px; padding-bottom: 14px; }
  .external-calibration .calibration-fields label { gap: 4px; }
  .external-calibration .calibration-fields input { min-height: 38px; padding: 7px 11px; }
  .external-calibration .calibration-date-control { min-height: 38px; }
  .external-calibration .calibration-date-control input { min-height: 36px; }
  .external-calibration .calibration-dialog-actions { padding-top: 12px; padding-bottom: 12px; }
}
#calibrationTable { width: 100%; min-width: 0; table-layout: fixed; }
.calibration-table-scroll { overflow-x: hidden; }
#calibrationTable .calibration-column-serial { width: 4%; }
#calibrationTable .calibration-column-identification { width: 13%; }
#calibrationTable .calibration-column-name { width: 12%; }
#calibrationTable .calibration-column-frequency { width: 7%; }
#calibrationTable .calibration-column-type { width: 12%; }
#calibrationTable .calibration-column-observations { width: 12%; }
#calibrationTable .calibration-column-date { width: 10%; }
#calibrationTable .calibration-column-next-date { width: 11%; }
#calibrationTable .calibration-column-actions { width: 10%; }
#calibrationTable .calibration-column-details { width: 9%; }
#calibrationTable th, #calibrationTable td { white-space: normal; overflow-wrap: anywhere; }
#calibrationTable td { max-width: none; }
#calibrationTable tbody tr:hover { cursor: default; }
.calibration-serial-cell { color: var(--muted); font-variant-numeric: tabular-nums; }
.calibration-identity-cell strong { display: block; white-space: normal; }
.calibration-gauge-name-label {
  display: inline-block; max-width: 100%; padding: 3px 7px;
  border-radius: 5px; color: #175a3b; background: #e5f5eb;
  font-size: 10px; font-weight: 700; line-height: 1.25; text-transform: uppercase;
}
.calibration-observations-cell { min-width: 0; }
#calibrationTable .calibration-table-actions button,
#calibrationTable .calibration-view-cell button {
  max-width: 100%; margin: 2px 0; white-space: normal; overflow-wrap: anywhere;
}
@media (max-width: 1200px) {
  #calibrationTable th, #calibrationTable td { padding: 5px 4px; }
  #calibrationTable .calibration-table-actions button,
  #calibrationTable .calibration-view-cell button { padding: 4px; font-size: 11px; }
}
.view-calibration-details {
  padding: 5px 10px; border-color: #a9c4ec; color: #175bb5; background: #f5f9ff;
  font-size: 12px; font-weight: 650;
}
.view-calibration-details:hover { border-color: #2773df; background: #eaf2ff; }
.calibration-details-modal { z-index: 130; }
.calibration-details-brand { display: none; }
.calibration-details-dialog {
  position: relative; width: min(1400px, 100%); max-height: calc(100vh - 32px); overflow-y: auto;
  border: 1px solid #1d2528; border-radius: 3px; background: #d9f7f7;
  box-shadow: 0 28px 80px rgba(17, 24, 39, .28);
}
.calibration-details-head {
  position: absolute; z-index: 4; top: 7px; right: 7px; padding: 0;
}
.calibration-details-heading-copy {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.calibration-details-head .calibration-close {
  border: 1px solid rgba(0, 0, 0, .42); color: #111; background: rgba(255, 255, 255, .88);
  font-family: Arial, sans-serif; font-size: 22px;
}
.calibration-details-head .calibration-close:hover { color: #fff; background: #111; }
.calibration-report { margin: 0; padding: 0; background: #d9f7f7; }
.calibration-sheet-scroll { width: 100%; overflow-x: auto; background: #d9f7f7; }
.calibration-history-sheet {
  width: 100%; min-width: 1050px; border-collapse: collapse; table-layout: fixed;
  color: #0b1112; background: #d9f7f7; font-family: Arial, Helvetica, sans-serif;
  font-size: 11.5px; line-height: 1.15;
}
.calibration-history-sheet .sheet-col-date { width: 16.7%; }
.calibration-history-sheet .sheet-col-observation { width: 26.2%; }
.calibration-history-sheet .sheet-col-dimensional { width: 22.2%; }
.calibration-history-sheet .sheet-col-visual { width: 13.5%; }
.calibration-history-sheet .sheet-col-checked { width: 11%; }
.calibration-history-sheet .sheet-col-next { width: 10.4%; }
.calibration-history-sheet th,
.calibration-history-sheet td {
  height: 24px; padding: 4px 7px; border: 1.4px solid #161d1e;
  color: #0b1112; background: #d9f7f7; text-align: center; vertical-align: middle;
  overflow-wrap: anywhere; white-space: pre-wrap;
}
.calibration-history-sheet tbody > tr:not(.calibration-sheet-reference-head):not(.calibration-sheet-result-head) > th:first-child { text-align: left; }
.calibration-history-sheet th { font-size: 11px; font-weight: 700; }
.calibration-sheet-title-row th { height: 58px; padding: 3px 8px; }
.calibration-sheet-title-row th:nth-child(2) {
  font-family: Georgia, "Times New Roman", serif; font-size: 25px; font-weight: 400;
  letter-spacing: -.025em;
}
.calibration-sheet-title-row .calibration-sheet-code {
  padding-right: 38px; font-size: 9px; font-weight: 700; overflow-wrap: anywhere;
}
.calibration-sheet-brand { display: inline-flex; align-items: center; flex-direction: column; line-height: .9; }
.calibration-sheet-brand strong {
  color: #cb0d70; font-family: Georgia, "Times New Roman", serif; font-size: 19px;
  font-style: italic; letter-spacing: -.04em; text-shadow: .5px .5px 0 #fff;
}
.calibration-sheet-brand span { color: #111; font-size: 7px; font-weight: 800; letter-spacing: .06em; }
.calibration-sheet-reference-head th { height: 26px; font-size: 11px; }
.calibration-sheet-reference-head th:first-child { padding: 8px; text-align: center; }
.calibration-sheet-reference-row td { height: 29px; }
.calibration-sheet-result-head th {
  height: 82px; padding: 8px; border-width: 2px 1.4px; font-size: 11.5px; line-height: 1.25;
}
.calibration-sheet-result-row td { height: 54px; padding: 7px; line-height: 1.35; }
.calibration-sheet-result-row .calibration-sheet-signature {
  font-family: Georgia, "Times New Roman", serif; font-size: 21px; font-weight: 700;
}
.calibration-sheet-empty-row td { height: 54px; }
.calibration-history-sheet thead th:first-child,
.calibration-history-sheet tbody th:first-child,
.calibration-history-sheet tbody td:first-child { border-left-width: 2px; }
.calibration-history-sheet thead th:last-child,
.calibration-history-sheet tbody th:last-child,
.calibration-history-sheet tbody td:last-child { border-right-width: 2px; }
.calibration-history-sheet thead tr:first-child th { border-top-width: 2px; }
.calibration-history-sheet tbody tr:last-child td { border-bottom-width: 2px; }
.calibration-details-actions {
  position: sticky; z-index: 5; bottom: 0; display: flex; justify-content: flex-end;
  padding: 10px 14px; border-top: 1px solid #161d1e; background: rgba(217, 247, 247, .97);
}
.calibration-details-actions button { min-width: 100px; }
.calibration-details-actions { gap: 10px; flex-wrap: wrap; align-items: center; }
#calibrationCardStatus { margin-right: auto; color: #b42332; font-size: 12px; }
.calibration-print-root { display: none; }
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  body > :not(.calibration-print-root) { display: none !important; }
  body.calibration-modal-open { overflow: visible !important; }
  .calibration-print-root { display: block !important; color: #253953; font-family: Arial, sans-serif; }
  .calibration-print-root * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .calibration-print-root.internal-history-card .calibration-details-dialog {
    display: block; width: 100%; max-height: none; overflow: visible; border: 0; border-radius: 0; box-shadow: none; background: white;
  }
  .calibration-print-root.internal-history-card .calibration-details-head {
    grid-template-columns: 160px 1fr 160px; padding: 8px 0;
  }
  .calibration-print-root.internal-history-card .calibration-details-type { padding-right: 0; }
  .calibration-print-root.internal-history-card .calibration-report,
  .calibration-print-root .history-table-scroll,
  .calibration-print-root .history-panel { overflow: visible; }
  .calibration-print-root .internal-history { display: block; padding: 10px 0; }
  .calibration-print-root .history-overview {
    grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); margin-bottom: 10px;
  }
  .calibration-print-root .history-information-grid { grid-template-columns: 1.2fr 1fr; }
  .calibration-print-root .history-panel { margin-bottom: 10px; }
  .calibration-print-root .history-details-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calibration-print-root .history-table { min-width: 0; font-size: 10px; }
  .calibration-print-root .history-table th,
  .calibration-print-root .history-table td { padding: 5px 8px; }
  .calibration-print-root tr,
  .calibration-print-root .history-overview,
  .calibration-print-root .history-information-grid { break-inside: avoid; }
  .calibration-print-root thead { display: table-header-group; }
  .calibration-print-root .history-panel-heading { break-after: avoid; }
}
.internal-history-card .calibration-details-dialog {
  display: flex; flex-direction: column; width: min(1440px, 100%);
  max-height: calc(100dvh - 48px); overflow: hidden;
  border: 1px solid #dce3ed; border-radius: 16px;
  background: #f6f8fc; box-shadow: 0 32px 100px #0f1c3040;
}
.internal-history-card .calibration-details-head {
  position: relative; top: auto; right: auto; z-index: 4; display: grid; align-items: center;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr);
  flex-shrink: 0; gap: 18px; padding: 12px 20px; border-bottom: 1px solid #e5eaf2;
  background: #fff;
}
.internal-history-card .calibration-details-brand {
  display: block; width: 160px; max-width: 100%; height: 72px; object-fit: cover;
}
.internal-history-card .calibration-details-heading-copy {
  position: static; min-width: 0; width: auto; height: auto; overflow: visible; clip: auto; clip-path: none; white-space: normal; text-align: center;
}
.internal-history-card .calibration-details-type {
  justify-self: end; padding-right: 52px; color: #253953; font-size: 16px; font-weight: 700;
}
.internal-history-card .calibration-details-head h3 { margin: 0; color: #152742; font-size: clamp(24px, 2.4vw, 34px); font-weight: 800; line-height: 1.2; letter-spacing: -.025em; }
.internal-history-card .calibration-details-head p { margin: 0; }
.internal-history-card .calibration-details-head .calibration-close {
  position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  flex-shrink: 0; width: 36px; height: 36px; border: 1px solid #e2e8f0; border-radius: 10px;
  color: #64748b; background: #f8fafc; font-size: 24px;
}
.internal-history-card .calibration-details-head .calibration-close:hover { color: #1a46b8; background: #edf2ff; }
.internal-history-card .calibration-report { min-height: 0; overflow: auto; background: transparent; }
.internal-history-card .calibration-report,
.history-table-scroll { scrollbar-width: thin; scrollbar-color: #b5c2d5 transparent; }
.internal-history-card .calibration-report::-webkit-scrollbar,
.history-table-scroll::-webkit-scrollbar { width: 5px; height: 5px; }
.internal-history-card .calibration-report::-webkit-scrollbar-thumb,
.history-table-scroll::-webkit-scrollbar-thumb { border-radius: 8px; background: #b5c2d5; }
.internal-history { display: grid; gap: 10px; padding: 12px 20px; }
.history-overview {
  display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); align-items: center; gap: 16px;
  padding: 12px 16px; border: 1px solid #dce6f6; border-radius: 12px;
  background: linear-gradient(110deg, #edf3ff, #fff 75%);
}
.history-kicker { color: #53719c; font-size: 10px; font-weight: 700; letter-spacing: .11em; }
.history-gauge-identity h4 { margin: 2px 0; color: #153b7b; font-size: 20px; letter-spacing: -.03em; overflow-wrap: anywhere; }
.history-gauge-identity p { margin: 0; color: #60718b; font-size: 12px; overflow-wrap: anywhere; }
.history-summary-item { display: grid; gap: 3px; padding-left: 16px; border-left: 1px solid #dfe6f1; }
.history-summary-item span { color: #67788e; font-size: 11px; }
.history-summary-item strong { color: #253953; font-size: 15px; font-weight: 650; overflow-wrap: anywhere; }
.history-next-date strong { color: #1a46b8; }
.history-information-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; gap: 12px; }
.history-panel { min-width: 0; overflow: hidden; border: 1px solid #e1e7ef; border-radius: 14px; background: #fff; }
.history-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 14px; border-bottom: 1px solid #edf0f5; }
.history-panel-heading h4 { margin: 0; color: #23364f; font-size: 14px; font-weight: 700; }
.history-panel-heading > span { color: #7a8799; font-size: 11px; text-align: right; }
.history-details-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; margin: 0; padding: 0 14px 6px; }
.history-detail { min-width: 0; padding: 7px 0; border-bottom: 1px solid #f0f3f7; }
.history-detail dt { color: #7a8799; font-size: 10px; font-weight: 600; letter-spacing: .025em; }
.history-detail dd { margin: 2px 0 0; color: #2c3d54; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; white-space: pre-wrap; }
.history-table-scroll { width: 100%; overflow-x: auto; }
.history-table { width: 100%; min-width: 0; border-collapse: collapse; color: #35465e; font-size: 12px; line-height: 1.5; }
.history-table td:first-child { width: auto; }
.history-table th, .history-table td { padding: 8px 14px; border: 0; border-bottom: 1px solid #edf0f5; background: transparent; text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; }
.history-table thead th { color: #738196; background: #f8fafc; font-size: 10px; font-weight: 700; letter-spacing: .035em; }
.history-table tbody th { color: #506178; font-size: 11px; font-weight: 600; }
.history-table tbody tr:last-child > * { border-bottom: 0; }
.history-table tbody tr:hover { background: #f9fbfe; cursor: default; }
.history-pitch-table { table-layout: fixed; }
.history-pitch-table thead th:first-child { width: 42%; }
.history-pitch-table td { font-variant-numeric: tabular-nums; font-weight: 650; }
.history-reference-table, .history-records-table { table-layout: fixed; }
.history-date { font-variant-numeric: tabular-nums; font-weight: 600; }
.history-document-view { padding: 5px 16px; border: 1px solid #b9cdf4; border-radius: 7px; background: #f0f6ff; color: #1d4ed8; font-size: 12px; font-weight: 600; cursor: pointer; }
.history-document-view:hover { background: #e1edff; }
.certificate-preview-dialog { width: min(1100px, 94vw); max-height: 92vh; padding: 0; border: 1px solid #dbe4f0; border-radius: 16px; color: #26354d; box-shadow: 0 24px 80px #13253d40; }
.certificate-preview-dialog::backdrop { background: #14213999; }
.certificate-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-bottom: 1px solid #e1e7ef; }
.certificate-preview-head h3 { margin: 0; font-size: 19px; }
.certificate-preview-head p { margin: 4px 0 0; color: #66758a; overflow-wrap: anywhere; }
#certificatePreviewStatus { margin: 10px 20px; color: #66758a; font-size: 12px; }
.certificate-preview-content { height: min(64vh, 760px); overflow: auto; background: #f3f6fa; text-align: center; }
.certificate-preview-content img { display: block; max-width: 100%; height: auto; margin: 0 auto; background: white; }
.certificate-preview-pages { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.certificate-preview-pages[hidden] { display: none; }
.certificate-preview-pages button { padding: 7px 12px; }
.certificate-preview-pages button:disabled { opacity: .5; cursor: default; }
.certificate-preview-actions { display: flex; justify-content: flex-end; padding: 12px 20px; border-top: 1px solid #e1e7ef; }
.certificate-preview-actions a { padding: 9px 22px; border-radius: 8px; background: #2146c7; color: white; text-decoration: none; font-weight: 600; }
.history-section-title { display: flex; align-items: center; gap: 10px; }
.history-count { padding: 3px 8px; border-radius: 6px; color: #58708f; background: #f0f4f9; font-size: 10px; font-weight: 600; }
.history-result { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 9px; border-radius: 6px; font-size: 11px; font-weight: 650; }
.history-result--accepted { color: #18724c; background: #edf8f1; }
.history-result--rejected { color: #b42332; background: #fff0f1; }
.history-result--neutral { color: #64748b; background: #f1f5f9; }
.history-result--accepted::before, .history-result--rejected::before { content: ""; flex-shrink: 0; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.internal-history-card .calibration-details-actions { position: static; flex-shrink: 0; padding: 8px 20px; border-top: 1px solid #e1e7ef; background: #fff; }
.internal-history-card .calibration-details-actions button { min-width: 90px; padding: 7px 20px; border-radius: 9px; }
@media (min-width: 1100px) {
  .history-details-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 901px) and (max-height: 800px) {
  .internal-history-card .calibration-details-head { padding: 8px 16px; }
  .internal-history { gap: 6px; padding: 8px 16px; }
  .history-overview { padding: 8px 12px; }
  .history-gauge-identity { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0 10px; }
  .history-kicker { grid-column: 1 / -1; }
  .history-gauge-identity h4 { font-size: 18px; }
  .history-gauge-identity p { font-size: 11px; }
  .history-panel-heading { padding: 6px 12px; }
  .history-detail { padding: 5px 0; }
  .history-table th, .history-table td { padding: 5px 12px; }
  .internal-history-card .calibration-details-actions { padding: 6px 16px; }
  .internal-history-card .calibration-details-actions button { padding: 5px 18px; }
}
@media (max-width: 900px) {
  .history-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .history-summary-item { padding-left: 0; border-left: 0; }
  .history-information-grid { grid-template-columns: 1fr; }
  .history-reference-table { min-width: 560px; }
  .history-records-table { min-width: 680px; }
}
@media (max-width: 600px) {
  .internal-history-card .calibration-details-dialog { max-height: calc(100dvh - 20px); border-radius: 14px; }
  .internal-history-card .calibration-details-head { grid-template-columns: 70px minmax(0, 1fr) 70px; gap: 6px; padding: 10px 12px 42px; }
  .internal-history-card .calibration-details-brand { width: 70px; height: 40px; }
  .internal-history-card .calibration-details-head h3 { font-size: 22px; }
  .internal-history-card .calibration-details-type { padding-right: 0; font-size: 12px; }
  .internal-history-card .calibration-details-head .calibration-close { top: auto; right: 12px; bottom: 5px; width: 30px; height: 30px; transform: none; }
  .internal-history { gap: 10px; padding: 10px 12px; }
  .history-overview { padding: 12px; gap: 12px; }
  .history-gauge-identity { grid-column: 1 / -1; }
  .history-gauge-identity h4 { font-size: 20px; }
  .history-summary-item strong { font-size: 13px; }
  .history-panel-heading { align-items: flex-start; padding: 9px 12px; }
  .history-panel-heading > span { max-width: 42%; }
  .history-details-list { gap: 0 12px; padding: 0 12px 6px; }
  .history-table th, .history-table td { padding: 8px 12px; }
  .internal-history-card .calibration-details-actions { padding: 8px 12px; }
}
.edit-product, .delete-product { padding: 4px 9px; font-size: 12px; }
.delete-product { color: var(--crit); margin-left: 5px; }
.edit-calibration, .delete-calibration { padding: 4px 9px; font-size: 12px; }
.delete-calibration { color: var(--crit); margin-left: 5px; }
.gauge-table-scroll { overflow-x: hidden; }
#gaugeTable { width: 100%; min-width: 0; table-layout: fixed; }
#gaugeTable .gauge-column-serial { width: 4%; }
#gaugeTable .gauge-column-identification { width: 13%; }
#gaugeTable .gauge-column-name { width: 12%; }
#gaugeTable .gauge-column-make { width: 8%; }
#gaugeTable .gauge-column-location { width: 10%; }
#gaugeTable .gauge-column-usage { width: 10%; }
#gaugeTable .gauge-column-specification { width: 11%; }
#gaugeTable .gauge-column-range { width: 10%; }
#gaugeTable .gauge-column-frequency { width: 12%; }
#gaugeTable .gauge-column-actions { width: 10%; }
#gaugeTable th, #gaugeTable td { white-space: normal; overflow-wrap: anywhere; }
#gaugeTable td { max-width: none; }
#gaugeTable td:last-child { overflow: visible; }
#gaugeTable tbody tr:hover { cursor: default; }
.gauge-serial-cell { color: var(--muted); font-variant-numeric: tabular-nums; }
.gauge-identity-cell strong { display: block; white-space: normal; }
.gauge-name-label {
  display: inline-block; max-width: 100%; padding: 3px 7px;
  border-radius: 5px; color: #175a3b; background: #e5f5eb;
  font-size: 10px; font-weight: 700; line-height: 1.25; text-transform: uppercase;
}
.gauge-frequency-cell strong { display: block; }
.calibration-type-label {
  display: inline-block; max-width: 100%; margin-top: 5px; padding: 3px 7px;
  border-radius: 5px; color: #174d8f; background: #e7f1ff;
  font-size: 10px; font-weight: 700; line-height: 1.25;
}
#gaugeTable .gauge-table-actions { white-space: nowrap; }
.edit-gauge, .delete-gauge { padding: 4px 9px; font-size: 12px; }
.delete-gauge { color: var(--crit); margin-left: 4px; }
@media (max-width: 1200px) {
  #gaugeTable th, #gaugeTable td { padding: 5px 4px; }
  #gaugeTable .gauge-table-actions button {
    display: inline-block; margin: 0; padding: 4px;
    font-size: 11px; white-space: nowrap;
  }
  #gaugeTable .gauge-table-actions .delete-gauge { margin-left: 4px; }
}
.user-address-field { grid-column: 1 / -1; }
#userTable { min-width: 1120px; }
#userTable td { max-width: 230px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#userTable td:last-child { width: 145px; overflow: visible; }
#userTable tbody tr:hover { cursor: default; }
.edit-user, .delete-user { padding: 4px 9px; font-size: 12px; }
.delete-user { color: var(--crit); margin-left: 5px; }
.user-status {
  display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700;
}
.user-status.active { color: var(--ok); background: #e7f4ec; }
.user-status.inactive { color: #697586; background: #eef1f5; }
.gauge-form-title {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline;
}
.gauge-form-title .form-required { justify-self: end; }
.gauge-identification {
  display: flex; align-items: baseline; justify-content: center; gap: 8px;
  margin: 0; white-space: nowrap;
}
.gauge-identification span { color: var(--muted); font-size: 12.5px; }
.gauge-identification strong {
  color: var(--accent); font-size: 17px; letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
}
.empty-products { text-align: center; color: var(--muted); padding: 34px 15px; margin: 0; }
.product-message { padding: 9px 12px; font-size: 12.5px; border-top: 1px solid var(--line); }
.product-message.success { color: var(--ok); background: #edf8f1; }
.product-message.error { color: var(--crit); background: #fff1f1; }

.scrap-wide-field { grid-column: 1 / -1; }
.scrap-gauge-field { display: flex; flex-direction: column; gap: 5px; }
.scrap-gauge-field .searchable-select > input { width: 100%; }
body.scrap-gauge-modal-open { overflow: hidden; }
#scrapGaugesPane .product-scroll { overflow: visible; }
#scrapGaugeTable { width: 100%; min-width: 0; table-layout: fixed; }
#scrapGaugeTable th { white-space: normal; overflow-wrap: anywhere; }
#scrapGaugeTable td { white-space: pre-wrap; overflow-wrap: anywhere; }
#scrapGaugeTable th:first-child { width: 5%; }
#scrapGaugeTable th:nth-child(2) { width: 14%; }
#scrapGaugeTable th:last-child { width: 14%; }
#scrapGaugeTable td:last-child { white-space: normal; }
#scrapGaugeTable td:last-child button { max-width: 100%; margin: 3px; padding: 7px 10px; white-space: normal; overflow-wrap: anywhere; }
#scrapGaugeForm .muted { font-size: 12px; }

/* Movement reports */
.reports-pane { max-width: 1540px; margin: 0 auto; padding: 3px 0 30px; }
.reports-heading {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  margin-bottom: 34px;
}
.reports-eyebrow {
  margin: 0 0 5px; color: #2e3746; font-size: 11px; font-weight: 700;
  letter-spacing: .055em; text-transform: uppercase;
}
.reports-eyebrow span { color: #9ba4b3; }
.reports-heading h2 { margin: 0; color: #111827; font-size: 29px; line-height: 1.15; letter-spacing: -.025em; }
.reports-heading-actions { display: flex; align-items: center; gap: 10px; }
.report-range-control, .report-export-button {
  display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 11px;
  border: 1px solid #ebeff5; border-radius: 4px; color: #344054; background: #fff;
}
.report-range-control { background: #f5f7ff; }
.report-range-control svg, .report-export-button svg {
  width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.report-range-control select {
  padding: 0 17px 0 0; border: 0; outline: 0; color: inherit; background: transparent; font: inherit;
}
.report-export-button { border-radius: 4px; font-size: 12px; font-weight: 650; }
.report-metrics {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px;
  margin-bottom: 30px;
}
.report-metrics article { min-width: 0; }
.report-metrics article > span {
  display: block; margin-bottom: 3px; color: #374151; font-size: 11px; font-weight: 650;
  letter-spacing: .055em; text-transform: uppercase;
}
.report-metrics article > div { display: flex; align-items: baseline; gap: 5px; }
.report-metrics strong { color: #101828; font-size: 29px; line-height: 1; letter-spacing: -.035em; }
.report-metrics small { color: #5b6473; font-size: 12px; }
.report-ledger-card {
  overflow: hidden; border: 1px solid #edf0f5; border-radius: 9px; background: #fff;
  box-shadow: 0 4px 22px rgba(31, 45, 69, .025);
}
.report-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  min-height: 54px; padding: 0 18px;
}
.report-tabs { display: flex; align-self: stretch; gap: 1px; }
.report-tabs button {
  position: relative; display: flex; align-items: center; gap: 7px; padding: 0 12px;
  border: 0; border-radius: 0; color: #374151; background: transparent; font-size: 12px;
}
.report-tabs button::after {
  content: ""; position: absolute; right: 8px; bottom: 0; left: 8px; height: 2px; background: transparent;
}
.report-tabs button.active { color: #075dcc; background: #f4f7ff; font-weight: 650; }
.report-tabs button.active::after { background: #075dcc; }
.report-tabs span { color: #747d8b; }
.report-search {
  display: flex; align-items: center; width: min(320px, 100%); min-height: 31px;
  padding: 0 9px; color: #364152; background: #f4f6ff;
}
.report-search:focus-within { box-shadow: inset 0 0 0 1px #94b7ed; }
.report-search svg {
  flex: 0 0 17px; width: 17px; height: 17px; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round;
}
.report-search input {
  min-width: 0; width: 100%; padding: 7px 8px; border: 0; outline: 0;
  color: #1f2937; background: transparent; font: inherit; font-size: 12px;
}
.report-table-scroll { min-height: 420px; overflow-x: auto; border-top: 1px solid #f2f4f7; }
.report-table { width: 100%; min-width: 970px; table-layout: fixed; font-size: 12px; }
.report-table th {
  position: static; height: 40px; padding: 8px 12px; color: #303849; background: #f1f3ff;
  font-size: 10.5px; font-weight: 650; letter-spacing: .055em; text-transform: uppercase;
}
.report-table th:nth-child(1) { width: 12%; padding-left: 6%; }
.report-table th:nth-child(2) { width: 22%; }
.report-table th:nth-child(3) { width: 11%; }
.report-table th:nth-child(4) { width: 14%; }
.report-table th:nth-child(5) { width: 14%; }
.report-table th:nth-child(6) { width: 17%; }
.report-table th:nth-child(7) { width: 10%; }
.report-table td {
  height: 64px; padding: 10px 12px; border-bottom: 0; color: #182230; vertical-align: middle;
}
.report-table td:first-child { width: auto; padding-left: 6%; font-weight: 500; }
.report-table tbody tr:hover { background: #fbfcff; cursor: default; }
.report-table td strong { display: block; font-size: 12px; font-weight: 650; }
.report-table td small { display: block; margin-top: 1px; color: #374151; font-size: 10.5px; }
.report-type { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.report-type i { width: 6px; height: 6px; border-radius: 50%; background: #687384; }
.report-type--inward i { background: #0769d7; }
.report-slip-number { color: #4b5565 !important; font-variant-numeric: tabular-nums; }
.report-status--overdue { color: #dc1010; }
.view-slip-button {
  padding: 3px 0; border: 0; color: #0063d7; background: transparent; font-size: 12px; white-space: nowrap;
}
.view-slip-button:hover { border: 0; color: #003f9e; text-decoration: underline; }
.report-message { padding: 9px 18px; color: #a91919; background: #fff2f2; font-size: 12px; }
.empty-report { padding: 90px 20px; color: #667085; text-align: center; }
.empty-report strong { color: #344054; font-size: 14px; }
.empty-report p { margin: 4px 0 0; }
.report-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  min-height: 54px; padding: 9px 18px; border-top: 1px solid #f2f4f7; color: #394254; font-size: 11px;
}
.report-pagination { display: flex; align-items: center; gap: 3px; }
.report-pagination button {
  min-width: 30px; padding: 6px 8px; border: 0; color: #232d3d; background: transparent; font-size: 11px;
}
.report-pagination button:first-child, .report-pagination button:last-child { min-width: auto; }
.report-pagination button.active { color: #075dcc; background: #f1f3ff; font-weight: 700; }
.report-pagination button:disabled { color: #b1b7c1; cursor: default; }
.report-pagination span { min-width: 24px; text-align: center; }
.movement-slip-modal {
  position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 20px;
  background: rgba(15, 23, 42, .42); backdrop-filter: blur(2px);
}
.movement-slip-dialog {
  overflow: hidden; width: min(590px, 100%); border-radius: 12px; background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .24);
}
.movement-slip-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 21px 24px; border-bottom: 1px solid #e9edf3;
}
.movement-slip-head span { color: #075dcc; font-size: 10px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.movement-slip-head h3 { margin: 2px 0 0; font-size: 20px; }
.movement-slip-head button { padding: 0 6px; border: 0; color: #667085; background: transparent; font-size: 25px; }
.movement-slip-content { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px 24px 22px; }
.movement-slip-content > div { min-width: 0; padding: 14px 12px; border-bottom: 1px solid #eef1f5; }
.movement-slip-content span { display: block; margin-bottom: 4px; color: #667085; font-size: 10px; text-transform: uppercase; }
.movement-slip-content strong { display: block; overflow-wrap: anywhere; font-size: 13px; font-weight: 650; }
.movement-slip-actions { display: flex; justify-content: flex-end; padding: 14px 24px; background: #f8fafc; }
@media (max-width: 1000px) {
  .gauge-dashboard-grid { grid-template-columns: 1fr; }
  .gauge-quick-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gauge-action-card, .gauge-action-card--primary { min-height: 148px; }
  .gauge-ambient-card { min-height: 148px; }
  .gauge-overview-actions { grid-column: 1 / -1; }
  .gauge-summary-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calibration-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calibration-results-row, .calibration-results-row.split-observations { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calibration-checked-by { grid-column: 1 / -1; }
  .reference-equipment-grid { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
  .report-metrics { gap: 24px; }
}
@media (max-width: 820px) {
  header { min-height: auto; padding: 12px 18px; }
  .app-layout { display: block; min-height: 0; }
  .sidebar { padding: 8px 12px; border-right: 0; border-bottom: 1px solid #e8ebf0; }
  .sidebar-nav {
    position: static; display: flex; gap: 3px; overflow-x: auto; scrollbar-width: thin;
  }
  .sidebar-nav button { flex: 0 0 auto; width: auto; padding: 9px 11px; white-space: nowrap; }
  main { padding: 20px 16px; }
}
@media (max-width: 700px) {
  .gauge-modal { padding: 10px; }
  .gauge-dialog { max-height: calc(100vh - 20px); padding: 20px; border-radius: 14px; }
  .gauge-modal-title { align-items: flex-start; }
  .gauge-modal-title > div { gap: 10px; }
  .gauge-modal-title .form-required { display: none; }
  .gauge-modal-actions { margin: 22px -20px -20px; padding: 16px 20px; }
  .gauge-overview { padding-top: 0; }
  .gauge-dashboard-head { align-items: flex-start; flex-direction: column; margin-bottom: 20px; }
  .gauge-breadcrumb { margin-bottom: 16px; }
  .fleet-status { align-self: flex-start; }
  .gauge-overview-search { margin-bottom: 22px; }
  .gauge-overview-search kbd { display: none; }
  .gauge-summary-cards { grid-template-columns: 1fr; }
  .gauge-summary-card { min-height: 104px; padding: 18px; }
  .gauge-quick-actions { grid-template-columns: 1fr; }
  .gauge-action-card, .gauge-action-card--primary, .gauge-ambient-card { min-height: 126px; }
  .gauge-overview-actions { grid-column: auto; }
  .product-fields { grid-template-columns: 1fr; }
  .reference-equipment-grid { grid-template-columns: 1fr; }
  .calibration-modal { padding: 10px; }
  .calibration-dialog { max-height: calc(100vh - 20px); border-radius: 14px; }
  .calibration-dialog-head { padding: 21px 20px 16px; }
  .calibration-selector-grid { grid-template-columns: 1fr; padding: 0 20px 16px; }
  .calibration-gauge-card { align-items: flex-start; margin: 0 20px 16px; }
  .certificate-upload-panel { grid-template-columns: 1fr; margin: 0 20px 16px; }
  .certificate-upload-actions { justify-content: flex-start; }
  .calibration-status-badge { display: none; }
  .calibration-fields { grid-template-columns: 1fr; padding: 0 20px 20px; }
  .calibration-results-row, .calibration-results-row.split-observations { grid-template-columns: 1fr; }
  .calibration-checked-by { grid-column: auto; }
  .calibration-dialog-actions { padding: 15px 20px; }
  .calibration-details-modal { padding: 4px; }
  .calibration-details-dialog { max-height: calc(100vh - 8px); border-radius: 2px; }
  .calibration-details-actions { padding: 8px; }
  .master-heading { align-items: flex-start; }
  .gauge-form-title { grid-template-columns: 1fr; gap: 5px; }
  .gauge-form-title .form-required { justify-self: start; }
  .gauge-identification { justify-content: flex-start; }
  .nav-dropdown-menu { right: auto; left: 0; }
  .gauge-list-heading { align-items: flex-start; padding: 18px; }
  .gauge-list-toolbar { align-items: stretch; flex-direction: column; padding: 14px 18px 0; }
  .gauge-list-search { width: 100%; }
  .gauge-list-tabs { overflow-x: auto; }
  .gauge-registry-scroll { padding-right: 18px; padding-left: 18px; }
  .movement-modal { padding: 10px; }
  .movement-dialog { max-height: calc(100vh - 20px); border-radius: 16px; }
  .movement-head { padding: 24px 20px 18px; }
  .movement-form { padding: 22px 20px 0; }
  .movement-grid { grid-template-columns: 1fr; gap: 0; }
  .duration-segments > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inward-purpose > div { grid-template-columns: 1fr; }
  .movement-footer { margin-right: -20px; margin-left: -20px; padding: 18px 20px; }
  .reports-heading { align-items: flex-start; flex-direction: column; margin-bottom: 24px; }
  .reports-heading-actions { width: 100%; }
  .report-range-control, .report-export-button { flex: 1; justify-content: center; }
  .report-metrics { grid-template-columns: 1fr; gap: 17px; }
  .report-toolbar { align-items: stretch; flex-direction: column; padding: 0 14px 12px; }
  .report-tabs { min-height: 50px; overflow-x: auto; }
  .report-search { width: 100%; }
  .report-footer { align-items: flex-start; flex-direction: column; }
  .report-pagination { width: 100%; justify-content: flex-end; overflow-x: auto; }
  .movement-slip-content { grid-template-columns: 1fr; }
}

.drop {
  border: 2px dashed #c3ceda; border-radius: var(--radius);
  padding: 44px 24px; text-align: center; color: var(--muted);
  transition: .15s background, .15s border-color;
}
.drop.over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.drop-title { font-size: 15px; color: var(--ink); margin: 14px 0 4px; }
.drop-sub { margin: 0; font-size: 12.5px; }
.linkish {
  background: none; border: 0; padding: 0; font: inherit;
  color: var(--accent); text-decoration: underline; cursor: pointer;
}

.opts {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px; margin-top: 22px;
}
.opts label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--muted); }
.opts label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); }
.opts input[type=text], .opts select {
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px;
  font: inherit; color: var(--ink); background: #fff;
}
.opts .ghost { grid-column: 1 / -1; }

button, .btn {
  font: inherit; cursor: pointer; border-radius: 7px; padding: 8px 14px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  text-decoration: none; display: inline-block;
}
button:hover, .btn:hover { border-color: #b9c5d3; }
.btn.primary, .primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #163a99; }
.ghost { color: var(--ink); }

.spinner {
  width: 30px; height: 30px; margin: 0 auto 14px;
  border: 3px solid var(--accent-soft); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
#busy { text-align: center; }

.toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-bottom: 14px;
}
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 12px; font-size: 12.5px;
}
.chip b { font-weight: 650; }
.chip.crit { color: var(--crit); border-color: #f0c3c5; background: #fdf2f2; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

.split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(430px, 1fr); gap: 16px; }
@media (max-width: 1150px) { .split { grid-template-columns: 1fr; } }

.viewer, .table-wrap {
  min-width: 0;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column;
}
.viewer-head, .table-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); background: #fbfcfe;
}
.viewer-head select, .table-head input {
  padding: 6px 9px; border: 1px solid var(--line); border-radius: 6px; font: inherit;
}
.table-head input { flex: 1; }
.zoom { display: flex; align-items: center; gap: 6px; }
.zoom button { padding: 3px 10px; line-height: 1.2; }
#zoomLabel { font-size: 12.5px; color: var(--muted); min-width: 42px; text-align: center; }

.hint {
  margin: 0; padding: 7px 12px; font-size: 12px; color: var(--muted);
  background: #fbfcfe; border-bottom: 1px solid var(--line);
}
.hint b { color: var(--ink); }
.canvas.adding { cursor: crosshair; }
.canvas { overflow: auto; background: #eef1f6; height: 72vh; padding: 12px; }
.stage { position: relative; display: inline-block; background: #fff; box-shadow: 0 1px 8px rgba(15,28,48,.12); }
.stage img { display: block; width: 100%; height: auto; }
#markers { position: absolute; inset: 0; pointer-events: none; }
#handles { position: absolute; inset: 0; }
.handle {
  position: absolute; transform: translate(-50%, -50%);
  border-radius: 50%; cursor: grab; touch-action: none;
  border: 2px solid transparent;
}
.handle:hover { border-color: rgba(26,70,184,.55); background: rgba(26,70,184,.10); }
.handle.dragging { cursor: grabbing; border-color: var(--accent); background: rgba(26,70,184,.18); }
.handle.moved { border-color: rgba(21,115,71,.5); border-style: dashed; }
.canvas.adding .handle { pointer-events: none; }

.add-form {
  position: absolute; z-index: 5; display: flex; gap: 6px;
  transform: translate(-50%, calc(-100% - 12px));
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 7px; box-shadow: 0 6px 22px rgba(15,28,48,.22);
}
.add-form input {
  width: 210px; padding: 6px 8px; border: 1px solid var(--line);
  border-radius: 6px; font: inherit;
}
.add-form button { padding: 6px 11px; font-size: 12.5px; }
.marker {
  position: absolute; border: 2.5px solid var(--accent); border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 4px rgba(26,70,184,.18);
  animation: pulse 1.1s ease-out 3;
}
.marker.crit { border-color: var(--crit); box-shadow: 0 0 0 4px rgba(196,22,28,.18); }
@keyframes pulse { 0% { opacity: .25; } 50% { opacity: 1; } 100% { opacity: 1; } }

.scroll { overflow: auto; height: 72vh; }
table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 12px; }
thead th {
  position: sticky; top: 0; z-index: 1; background: #0f1c30; color: #fff;
  text-align: left; padding: 8px 6px; font-weight: 600; white-space: nowrap;
}
tbody td { padding: 5px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:hover { background: #f3f7ff; cursor: pointer; }
tbody tr.sel { background: var(--accent-soft); }
tbody tr.crit td:first-child { color: var(--crit); }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
td:first-child { font-weight: 700; width: 38px; }
td.spec {
  font-family: "SFMono-Regular", Consolas, monospace;
  max-width: 190px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
tbody input[type=number] {
  width: 62px; padding: 3px 5px; border: 1px solid transparent; border-radius: 5px;
  font: inherit; background: transparent; text-align: right;
}
tbody input[type=number]:hover { border-color: var(--line); }
tbody input[type=number]:focus { border-color: var(--accent); background: #fff; outline: none; }
.del { border: 0; background: none; color: var(--muted); font-size: 15px; line-height: 1; padding: 2px 6px; }
.del:hover { color: var(--crit); }
.tag {
  margin-left: 6px; padding: 1px 5px; border-radius: 4px;
  font-family: system-ui, sans-serif; font-size: 10px; font-weight: 600;
  color: var(--ok); background: #e7f4ec; vertical-align: 1px;
}
td.lim { color: var(--muted); white-space: nowrap; }
.warn { margin: 0; padding: 10px 12px; color: #92400e; background: #fffbeb; font-size: 12.5px; }
.warn:empty { display: none; }

.internal-pitch-fields {
  grid-column: 1 / -1; margin: 0; padding: 14px;
  border: 1px solid #e3e8f0; border-radius: 8px; background: #fbfcfe;
}
.internal-pitch-fields legend { padding: 0 7px; color: #2f3a4d; font-size: 12px; font-weight: 700; }
.internal-pitch-scroll { overflow-x: auto; margin-bottom: 12px; }
.internal-pitch-table { width: 100%; min-width: 680px; border-collapse: collapse; table-layout: fixed; }
.internal-pitch-label-column { width: 34%; }
.internal-pitch-action-column { width: 105px; }
.internal-pitch-table th { text-align: left; color: #596981; background: #f2f5fc; font-size: 12px; }
.internal-pitch-table th, .internal-pitch-table td { padding: 8px; border: 1px solid #e3e8f0; }
.internal-pitch-table input { width: 100%; min-width: 0; box-sizing: border-box; }
.internal-pitch-table button { color: #b42318; }
.external-parameter-table { min-width: 760px; }
.external-calibration .calibration-results-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
