:root {
  --navy: #0b1d36;
  --navy-mid: #14304f;
  --navy-soft: #1e3a5f;
  --purple: #6d28d9;
  --purple-deep: #5b21b6;
  --purple-soft: #ede9fe;
  --yellow: #f5c518;
  --yellow-deep: #e0b000;
  --yellow-soft: #fff8d6;
  --white: #ffffff;
  --bg: #f4f6fb;
  --bg-deep: #e8ecf5;
  --surface: #ffffff;
  --ink: #0b1d36;
  --muted: #5c6b82;
  --line: #d5dceb;
  --accent: var(--purple);
  --accent-2: var(--yellow-deep);
  --blue: var(--navy-mid);
  --amber: var(--yellow-deep);
  --teal: var(--purple);
  --red: #b42318;
  --orange: #c2410c;
  --shadow: 0 8px 24px rgba(11, 29, 54, 0.08);
  --font-display: "IBM Plex Sans", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --page-space: 20px;
  --radius: 12px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-display);
  color: var(--ink);
  background:
    radial-gradient(900px 480px at 0% 0%, rgba(109, 40, 217, 0.08) 0%, transparent 55%),
    radial-gradient(700px 400px at 100% 0%, rgba(245, 197, 24, 0.14) 0%, transparent 50%),
    linear-gradient(165deg, var(--bg) 0%, var(--bg-deep) 100%);
  min-height: 100vh;
}
html:has(.app-shell),
body:has(.app-shell) {
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}

a { color: var(--purple); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--purple-deep); }


.app-shell {
  display: grid;
  grid-template-columns: 100px 1fr;
  min-height: 100vh;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}
.app-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}
.app-body > .app-header,
.app-body > .breadcrumb {
  flex: 0 0 auto;
}
.sidebar {
  width: 100px;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-mid) 100%);
  color: var(--white);
  padding: 0.9rem 0.55rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  border-right: 3px solid var(--yellow);
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  width: 100%;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--purple) 0%, var(--navy) 100%);
  color: var(--yellow);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  border: 1px solid rgba(245, 197, 24, 0.45);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
  align-items: center;
}
.nav a {
  width: 100%;
  color: rgba(255, 255, 255, 0.82);
  padding: 0.55rem 0.25rem;
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  text-align: center;
  line-height: 1.15;
}
.nav a i { color: var(--yellow); font-size: 1.2rem; }
.nav a span {
  color: rgba(255, 255, 255, 0.78);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav a:hover, .nav a.active {
  background: rgba(109, 40, 217, 0.45);
  color: var(--white);
  text-decoration: none;
}
.nav a.active span, .nav a:hover span { color: var(--white); }

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
  padding: 0 20px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 12px rgba(11, 29, 54, 0.04);
  position: sticky;
  top: 0;
  z-index: 40;
}
.app-header-brand {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}
.app-header-brand strong {
  color: var(--navy);
  font-size: 0.98rem;
  letter-spacing: 0.01em;
}
.app-header-brand span {
  color: var(--muted);
  font-size: 0.78rem;
}

.breadcrumb {
  height: 30px;
  min-height: 30px;
  max-height: 30px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  background: #f7f8fc;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.breadcrumb ol {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  height: 30px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.breadcrumb li {
  display: inline-flex;
  align-items: center;
  height: 30px;
  font-size: 0.78rem;
  line-height: 1;
  color: var(--muted);
  min-width: 0;
}
.breadcrumb li + li::before {
  content: "/";
  margin: 0 0.45rem;
  color: #9aa6b8;
  font-weight: 500;
}
.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  max-width: 28ch;
  overflow: hidden;
  text-overflow: ellipsis;
}
.breadcrumb a:hover {
  color: var(--purple-deep);
  text-decoration: underline;
}
.breadcrumb-current {
  color: var(--navy);
  font-weight: 700;
  max-width: 36ch;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-menu { position: relative; }
.user-menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  border: 1px solid var(--line);
  background: #f8f9fd;
  border-radius: 999px;
  padding: 0.35rem 0.7rem 0.35rem 0.35rem;
  cursor: pointer;
  font: inherit;
  color: var(--navy);
}
.user-menu-toggle:hover {
  border-color: #c4b5fd;
  background: var(--purple-soft);
}
.user-menu.open .user-menu-toggle {
  border-color: var(--purple);
  background: var(--purple-soft);
}
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: var(--yellow);
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.user-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
  text-align: left;
  min-width: 0;
}
.user-meta strong {
  font-size: 0.88rem;
  font-weight: 650;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-meta small {
  font-size: 0.75rem;
  color: var(--muted);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-menu-toggle > .bi-chevron-down {
  color: var(--muted);
  font-size: 0.8rem;
  transition: transform 0.15s ease;
}
.user-menu.open .user-menu-toggle > .bi-chevron-down {
  transform: rotate(180deg);
}
.user-menu-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 0.45rem);
  min-width: 210px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(11, 29, 54, 0.14);
  padding: 0.4rem;
  z-index: 50;
}
.user-menu-dropdown a,
.user-menu-dropdown button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 0.8rem;
  border: 0;
  background: transparent;
  border-radius: 8px;
  color: var(--navy);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 560;
  text-decoration: none;
  cursor: pointer;
  text-align: left;
}
.user-menu-dropdown a:hover,
.user-menu-dropdown button:hover {
  background: var(--purple-soft);
  color: var(--purple-deep);
  text-decoration: none;
}
.user-menu-dropdown i {
  color: var(--purple);
  width: 1rem;
  text-align: center;
}
.user-menu-dropdown form {
  margin: 0;
  border-top: 1px solid var(--line);
  margin-top: 0.25rem;
  padding-top: 0.25rem;
}
.user-menu-dropdown form button { color: #b42318; }
.user-menu-dropdown form button i { color: #b42318; }

.main {
  padding: 20px;
  width: 100%;
  max-width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
}
/* List pages: lock page scroll — only the table body scrolls */
.main:has(> .panel.table-panel),
.main.has-table-panel {
  overflow: hidden;
}
.main:has(> .panel.table-panel) > :not(.panel.table-panel),
.main.has-table-panel > :not(.panel.table-panel) {
  flex: 0 0 auto;
}
.main > .panel.table-panel {
  margin-bottom: 0;
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  max-height: none;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin: 0 0 20px;
  min-height: 44px;
}
.topbar h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--navy);
  line-height: 1.25;
}
.topbar p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}
.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
}
.machinery-upload-form {
  display: inline-flex;
  margin: 0;
}
.machinery-upload-form .btn {
  cursor: pointer;
  margin: 0;
}
.filter-trigger {
  position: relative;
  order: 99;
}
.filter-trigger .filter-badge {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--navy);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
}
.filter-trigger .filter-badge[hidden] {
  display: none !important;
}
.filter-trigger.has-active-filters {
  border-color: var(--purple);
  color: var(--purple-deep);
  background: var(--purple-soft);
}
.filter-trigger small {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
}

.filter-chips-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin: 0 0 16px;
  padding: 12px 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  border-left: 3px solid var(--yellow);
  box-shadow: var(--shadow);
}
.filter-chips-bar[hidden] {
  display: none !important;
}
.filter-chips-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--navy);
  white-space: nowrap;
}
.filter-chips-label i {
  color: var(--yellow-deep, #b8860b);
}
.filter-chips-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 5px 6px 5px 10px;
  border-radius: 999px;
  background: rgba(15, 42, 74, 0.07);
  border: 1px solid rgba(15, 42, 74, 0.12);
  color: var(--navy);
  font-size: 0.84rem;
  line-height: 1.2;
}
.filter-chip-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.filter-chip-text strong {
  font-weight: 700;
}
.filter-chip-close {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  transition: background 0.15s ease, color 0.15s ease;
}
.filter-chip-close:hover {
  background: var(--navy);
  color: #fff;
}
.filter-chips-clear {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  white-space: nowrap;
}
.filter-chips-clear:hover {
  color: var(--navy);
  background: rgba(15, 42, 74, 0.06);
}

@media (max-width: 640px) {
  .filter-chips-bar {
    padding: 12px;
  }
  .filter-chips-clear {
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }
}

body.filter-drawer-open {
  overflow: hidden;
}
.filter-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 29, 54, 0.45);
  z-index: 80;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.filter-drawer-backdrop.is-open { opacity: 1; }
.filter-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(380px, 100vw);
  height: 100vh;
  background: var(--white);
  border-left: 1px solid var(--line);
  box-shadow: -12px 0 40px rgba(11, 29, 54, 0.18);
  z-index: 90;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.22s ease;
}
.filter-drawer.is-open { transform: translateX(0); }
.filter-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
  border-top: 3px solid var(--yellow);
}
.filter-drawer-head h2 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--navy);
}
.filter-drawer-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}
.filter-drawer-close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7f8fc;
  color: var(--navy);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.filter-drawer-close:hover {
  background: var(--purple-soft);
  color: var(--purple);
}
.filter-drawer-body {
  flex: 1;
  overflow: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.filter-drawer-body .field label {
  margin-bottom: 8px;
}
.filter-search-wrap {
  position: relative;
}
.filter-search-wrap i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}
.filter-search-wrap input {
  padding-left: 36px;
}
.filter-drawer-foot {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
  background: #fbfcff;
}
.table tbody tr.is-filtered-out,
.table tbody tr.is-page-hidden {
  display: none !important;
}
.card-grid .data-card.is-filtered-out,
.card-grid .data-card.is-page-hidden,
.card-grid .data-card[hidden],
.card-grid .card-grid-empty[hidden] {
  display: none !important;
}

.table-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: #fbfcff;
  flex: 0 0 auto;
  position: sticky;
  bottom: 0;
  z-index: 6;
  box-shadow: 0 -6px 16px rgba(11, 29, 54, 0.06);
}
.table-pagination-info {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}
.table-pagination-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.table-pagination-size {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
}
.table-pagination-size select {
  width: auto;
  min-width: 72px;
  min-height: 34px;
  padding: 6px 28px 6px 10px;
  font-size: 0.85rem;
  background: var(--white);
}
.table-pagination-nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.table-page-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--navy);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
}
.table-page-btn:hover:not(:disabled):not(.is-active) {
  background: var(--purple-soft);
  border-color: #c4b5fd;
  color: var(--purple-deep);
}
.table-page-btn.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--yellow);
}
.table-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.table-page-ellipsis {
  padding: 0 4px;
  color: var(--muted);
  font-weight: 700;
}
@media (max-width: 720px) {
  .table-pagination {
    flex-direction: column;
    align-items: stretch;
  }
  .table-pagination-controls {
    justify-content: space-between;
  }
}

.impersonation-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  margin: 0 0 20px;
  border-radius: var(--radius);
  background: var(--navy);
  color: #fff;
  border-top: 3px solid var(--yellow);
  font-size: 0.9rem;
}
.impersonation-banner i { color: var(--yellow); margin-right: 6px; }
.impersonation-banner strong { color: var(--yellow); }

.flash {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin: 0 0 20px;
  font-size: 0.9rem;
}
.flash-success { background: var(--purple-soft); color: var(--purple-deep); border: 1px solid #c4b5fd; }
.flash-error { background: #fdecea; color: var(--red); border: 1px solid #f3c1bc; }


/* KPI cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin: 0 0 20px;
}
.kpi-card {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  box-shadow: var(--shadow);
  min-height: 112px;
  position: relative;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
}
.kpi-card::after {
  content: none;
}
a.kpi-card-link {
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
a.kpi-card-link:hover {
  border-color: rgba(15, 42, 74, 0.28);
  box-shadow: 0 8px 22px rgba(11, 29, 54, 0.1);
  transform: translateY(-1px);
  color: inherit;
  text-decoration: none;
}
.kpi-media {
  width: 92px;
  flex: 0 0 92px;
  display: grid;
  place-items: center;
  border-right: 1px solid var(--line);
  font-size: 1.85rem;
  background: #eef2f8;
  color: var(--navy);
}
.kpi-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px 16px 12px;
  gap: 10px;
}
.kpi-card-top {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.kpi-body { flex: 1; min-width: 0; }
.kpi-go {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(15, 42, 74, 0.06);
  color: var(--navy);
  flex-shrink: 0;
  font-size: 1.1rem;
  margin-top: 2px;
}
a.kpi-card-link:hover .kpi-go {
  background: var(--navy);
  color: #fff;
}
.kpi-icon {
  display: none;
}
.kpi-label {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.kpi-value {
  margin-top: 0.2rem;
  font-size: 1.55rem;
  font-weight: 750;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.kpi-hint {
  margin-top: 0.3rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.kpi-chart {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 36px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}
.kpi-bar {
  flex: 1;
  min-width: 0;
  border-radius: 4px 4px 2px 2px;
  background: rgba(15, 42, 74, 0.12);
  transition: height 0.25s ease;
}
.kpi-bar.is-primary {
  background: linear-gradient(180deg, var(--yellow) 0%, var(--yellow-deep, #b8860b) 100%);
}
.kpi-blue .kpi-bar.is-primary,
.kpi-navy .kpi-bar.is-primary {
  background: linear-gradient(180deg, #4a6fa5 0%, var(--navy) 100%);
}
.kpi-amber .kpi-bar.is-primary,
.kpi-orange .kpi-bar.is-primary {
  background: linear-gradient(180deg, var(--yellow) 0%, var(--yellow-deep, #b8860b) 100%);
}
.kpi-purple .kpi-bar.is-primary {
  background: linear-gradient(180deg, #9b8cff 0%, var(--purple) 100%);
}
.kpi-green .kpi-bar.is-primary,
.kpi-teal .kpi-bar.is-primary {
  background: linear-gradient(180deg, #8b7cf0 0%, var(--purple-deep) 100%);
}
.kpi-red .kpi-bar.is-primary {
  background: linear-gradient(180deg, #f97066 0%, #b42318 100%);
}
.kpi-blue .kpi-media,
.kpi-navy .kpi-media {
  background: linear-gradient(160deg, #14304f 0%, var(--navy) 100%);
  color: var(--yellow);
  border-right-color: transparent;
}
.kpi-amber .kpi-media,
.kpi-orange .kpi-media {
  background: linear-gradient(160deg, var(--yellow-soft) 0%, #ffe9a8 100%);
  color: #8a6d00;
}
.kpi-purple .kpi-media {
  background: linear-gradient(160deg, var(--purple-soft) 0%, #ddd6fe 100%);
  color: var(--purple);
}
.kpi-green .kpi-media,
.kpi-teal .kpi-media {
  background: linear-gradient(160deg, #ede9fe 0%, #ddd6fe 100%);
  color: var(--purple-deep);
}
.kpi-red .kpi-media {
  background: linear-gradient(160deg, #fee4e2 0%, #fecdca 100%);
  color: #b42318;
}

@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .kpi-media {
    width: 76px;
    flex-basis: 76px;
    font-size: 1.55rem;
  }
}

.grid-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 0 0 20px;
}
.stat {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--purple);
}
.stat .label { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }
.stat .value { font-size: 1.8rem; font-weight: 700; margin-top: 0.35rem; font-variant-numeric: tabular-nums; color: var(--navy); }
.stat.blue { border-top-color: var(--navy); }
.stat.blue .value { color: var(--navy); }
.stat.amber { border-top-color: var(--yellow); }
.stat.amber .value { color: var(--yellow-deep); }
.stat.orange { border-top-color: var(--purple); }
.stat.orange .value { color: var(--purple); }
.stat.green { border-top-color: var(--purple-deep); }
.stat.green .value { color: var(--purple-deep); }
.stat.teal { border-top-color: var(--yellow-deep); }
.stat.teal .value { color: var(--navy); }

.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin: 0 0 20px;
}
.panel h2 {
  margin: 0 0 16px;
  font-size: 1.05rem;
  font-weight: 650;
  color: var(--navy);
}

.table-bulk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 12px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, #f8f9fd 0%, #eef1f8 100%);
}
.table-bulk-bar[hidden] { display: none !important; }
.table-bulk-info {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--navy);
  font-size: 0.88rem;
}
.table-bulk-info i { color: var(--purple); }
.table-bulk-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}
.table-bulk-delete {
  color: #b42318 !important;
  border-color: #f3c1bd !important;
}
.table-bulk-delete:hover {
  background: #fee4e2 !important;
  color: #912018 !important;
  border-color: #b42318 !important;
}
.table-check-col {
  width: 36px;
  text-align: center;
  vertical-align: middle;
}
.table-check {
  display: inline-grid;
  place-items: center;
  margin: 0;
  cursor: pointer;
}
.table-check input {
  width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  accent-color: var(--purple);
  cursor: pointer;
}

/* Tables sit edge-to-edge inside panels — no outer padding/margin */
.panel:has(.table),
.panel.table-panel {
  padding: 0;
  overflow: hidden;
}
.panel.table-panel {
  display: flex;
  flex-direction: column;
  min-height: 280px;
}
.panel.table-panel > .table-bulk-bar {
  flex: 0 0 auto;
}
.panel.table-panel > .table-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.panel.table-panel > .table-pagination {
  margin-top: auto;
  flex: 0 0 auto;
  position: sticky;
  bottom: 0;
}
.panel:has(.table) > :not(.table):not(.table-scroll):not(.card-grid):not([data-card-grid]):not(.table-pagination),
.panel.table-panel > :not(.table):not(.table-scroll):not(.card-grid):not([data-card-grid]):not(.table-pagination) {
  padding-left: 20px;
  padding-right: 20px;
  flex: 0 0 auto;
}
.panel:has(.table) > h2:first-child,
.panel:has(.table) > form:first-child,
.panel:has(.table) > .btn-row:first-child,
.panel:has(.table) > p:first-child,
.panel.table-panel > h2:first-child,
.panel.table-panel > .table-bulk-bar:first-child,
.panel.table-panel > form:first-child,
.panel.table-panel > .btn-row:first-child,
.panel.table-panel > p:first-child {
  padding-top: 20px;
}
.panel:has(.table) > h2,
.panel.table-panel > h2 {
  margin: 0 0 12px;
}
.panel:has(.table) > form,
.panel:has(.table) > .btn-row,
.panel.table-panel > form,
.panel.table-panel > .btn-row {
  margin-bottom: 12px !important;
  padding-bottom: 0;
}
.panel:has(.table) > p,
.panel.table-panel > p {
  margin: 0 0 12px;
  padding-bottom: 0;
}
.panel .table,
.panel .card-grid,
.panel .table-scroll {
  margin: 0;
  width: 100%;
}
.panel.table-panel .table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.92rem;
  margin: 0;
}
.table th,
.table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid #e4e9f2;
  vertical-align: middle;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.table thead th {
  color: #ffffff;
  font-weight: 650;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--navy);
  border-bottom: 2px solid var(--yellow);
  white-space: nowrap;
}
.table thead th.is-sortable {
  cursor: pointer;
  user-select: none;
  padding-right: 10px;
}
.table thead th.is-sortable .th-label {
  display: inline-block;
  vertical-align: middle;
}
.table thead th.is-sortable .th-sort {
  display: inline-flex;
  flex-direction: column;
  vertical-align: middle;
  margin-left: 6px;
  line-height: 0.7;
  opacity: 0.45;
}
.table thead th.is-sortable .th-sort i {
  font-size: 0.95rem;
  color: #ffffff;
}
.table thead th.is-sortable:hover {
  background: var(--navy-mid);
}
.table thead th.is-sortable:hover .th-sort {
  opacity: 0.85;
}
.table thead th.sort-asc .th-sort,
.table thead th.sort-desc .th-sort {
  opacity: 1;
}
.table thead th.sort-asc .th-asc,
.table thead th.sort-desc .th-desc {
  color: var(--yellow);
}
.table thead th.sort-asc .th-desc,
.table thead th.sort-desc .th-asc {
  opacity: 0.35;
}
.table tbody tr:nth-child(odd) td {
  background: #ffffff;
}
.table tbody tr:nth-child(even) td {
  background: #f3f6fb;
}
.table tbody tr:hover td {
  background: #ede9fe;
  color: var(--navy);
}
.table tbody tr:hover td:first-child {
  box-shadow: inset 3px 0 0 var(--purple);
}
.table tbody tr:hover a {
  color: var(--purple-deep);
}
.table tbody tr:last-child td {
  border-bottom: none;
}

.assign-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-width: 220px;
}
.assign-inline select {
  min-width: 160px;
  max-width: 240px;
  min-height: 34px;
  padding: 6px 10px;
  font-size: 0.82rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.chip-blue { background: #e8eef8; color: var(--navy); }
.chip-amber { background: var(--yellow-soft); color: #8a6d00; }
.chip-green { background: var(--purple-soft); color: var(--purple-deep); }
.chip-orange { background: #f3e8ff; color: var(--purple); }
.chip-teal { background: var(--yellow-soft); color: var(--navy); }
.chip-red { background: #fee4e2; color: var(--red); }
.chip-gray { background: #eef2f6; color: var(--muted); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 0;
  border-radius: 9px;
  padding: 0.55rem 0.95rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  background: var(--navy);
  color: var(--white);
  transition: filter 0.15s ease, transform 0.1s ease;
}
.btn i { font-size: 1rem; line-height: 1; }
.btn:hover { text-decoration: none; filter: brightness(1.1); color: var(--white); }
.btn-primary { background: var(--purple); color: var(--white); }
.btn-primary:hover { color: var(--white); }
.btn-accent { background: var(--yellow); color: var(--navy); }
.btn-accent:hover { color: var(--navy); filter: brightness(1.05); }
.btn-ghost {
  background: var(--white);
  color: var(--navy);
  border: 1.5px solid var(--navy);
}
.btn-ghost:hover { background: var(--purple-soft); color: var(--purple-deep); border-color: var(--purple); }
.btn-sm { padding: 0.35rem 0.65rem; font-size: 0.8rem; }
.btn-sm i { font-size: 0.85rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}
.form-grid .full { grid-column: 1 / -1; }
label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 6px;
  line-height: 1.2;
}
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  background: var(--white);
  color: var(--ink);
  min-height: 42px;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(109, 40, 217, 0.35);
  border-color: var(--purple);
}
textarea { min-height: 90px; resize: vertical; }
.field { margin-bottom: 0; }
.field label .req,
label .req,
.req {
  color: #c2410c;
  font-weight: 700;
  margin-left: 0.15em;
  font-size: 1.05em;
  line-height: 1;
}
.field-hint {
  display: block;
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    linear-gradient(135deg, var(--navy) 0%, var(--purple-deep) 55%, #3b0764 100%);
}
.login-card {
  width: min(420px, 100%);
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  border-top: 4px solid var(--yellow);
}
.login-card h1 { margin: 0 0 4px; font-size: 1.5rem; color: var(--navy); }
.login-card .sub { color: var(--muted); margin: 0 0 20px; font-size: 0.92rem; }
.demo-users {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--muted);
  font-family: var(--font-mono);
  line-height: 1.6;
}

.job-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0 0 20px;
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-top: 3px solid var(--yellow);
}
.job-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}
.job-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.job-header h1 {
  margin: 4px 0 0;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.25;
}
.job-created-line,
.job-customer-line {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.job-created-line i,
.job-customer-line i { color: var(--purple); }
.job-created-line strong,
.job-customer-line strong { color: var(--navy); font-weight: 650; }
.job-header .meta { color: var(--muted); margin-top: 0.35rem; }
.job-no {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--purple);
  letter-spacing: 0.04em;
}
.job-details {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.job-detail {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  background: #f7f8fc;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.job-detail-wide,
.job-detail-full {
  grid-column: 1 / -1;
}
.job-detail-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.job-detail-label i {
  color: var(--purple);
  font-size: 0.85rem;
}
.job-detail strong {
  color: var(--navy);
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.35;
  word-break: break-word;
}
.job-detail-sub {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.4;
}
@media (max-width: 980px) {
  .job-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .job-details { grid-template-columns: 1fr; }
  .job-header-top { flex-direction: column; }
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
  border-bottom: 1px solid var(--line);
  padding: 0 0 12px;
}
.tabs a {
  padding: 0.45rem 0.8rem;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.tabs a.active, .tabs a:hover {
  background: var(--navy);
  color: var(--white);
  text-decoration: none;
}
.tabs a.active i, .tabs a:hover i { color: var(--yellow); }

/* —— Job Card Timeline (professional vertical rail) —— */
.timeline-panel {
  padding: 20px;
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.timeline-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--yellow) 0%, var(--purple) 55%, var(--navy) 100%);
}
.timeline-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin: 0 0 20px;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--line);
}
.timeline-panel-head h2 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.timeline-subtitle {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}
.timeline-progress-meta {
  min-width: 160px;
  text-align: right;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.timeline-progress-bar {
  margin-top: 0.45rem;
  height: 6px;
  border-radius: 999px;
  background: #e8edf6;
  overflow: hidden;
}
.timeline-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--purple) 0%, var(--yellow) 100%);
  transition: width 0.35s ease;
}

.timeline-track {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0 0;
  position: relative;
}

.timeline-step {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 0 1.1rem;
  position: relative;
  min-height: 4.5rem;
}

.timeline-rail {
  position: relative;
  display: flex;
  justify-content: center;
}

/* Continuous vertical line segment */
.timeline-rail::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: #d7deea;
}
.timeline-step:first-child .timeline-rail::before { top: 22px; }
.timeline-step:last-child .timeline-rail::before { bottom: calc(100% - 22px); }

.timeline-step--done .timeline-rail::before {
  background: linear-gradient(180deg, var(--purple) 0%, #8b5cf6 100%);
}
.timeline-step--current .timeline-rail::before {
  background: linear-gradient(180deg, var(--purple) 0%, var(--yellow) 70%, #e5e9f2 100%);
}
.timeline-step--done + .timeline-step--done .timeline-rail::before,
.timeline-step--done + .timeline-step--current .timeline-rail::before {
  background: linear-gradient(180deg, var(--purple) 0%, #8b5cf6 100%);
}

.timeline-node {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  margin-top: 2px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 2px solid #c9d3e4;
  color: #8a97ad;
  font-size: 1rem;
  box-shadow: 0 0 0 4px #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.timeline-step--done .timeline-node {
  background: var(--purple);
  border-color: var(--purple);
  color: var(--white);
  box-shadow: 0 0 0 4px rgba(109, 40, 217, 0.12);
}
.timeline-step--current .timeline-node {
  background: var(--navy);
  border-color: var(--yellow);
  color: var(--yellow);
  box-shadow:
    0 0 0 4px rgba(245, 197, 24, 0.28),
    0 8px 20px rgba(11, 29, 54, 0.18);
  animation: timeline-pulse 2s ease-in-out infinite;
}
.timeline-step--pending .timeline-node {
  background: #f5f7fb;
  border-color: #d0d8e6;
  color: #9aa8bd;
}

@keyframes timeline-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(245, 197, 24, 0.28), 0 8px 20px rgba(11, 29, 54, 0.18); }
  50% { box-shadow: 0 0 0 8px rgba(245, 197, 24, 0.12), 0 8px 20px rgba(11, 29, 54, 0.18); }
}

.timeline-card {
  margin: 0 0 20px;
  padding: 16px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: 0 4px 14px rgba(11, 29, 54, 0.04);
}
.timeline-step:last-child .timeline-card { margin-bottom: 0; }

.timeline-step--done .timeline-card {
  border-color: #ddd6fe;
  background: linear-gradient(180deg, #ffffff 0%, #faf8ff 100%);
}
.timeline-step--current .timeline-card {
  border-color: #f0d56a;
  background: linear-gradient(180deg, #fffdf5 0%, #ffffff 100%);
  box-shadow: 0 8px 24px rgba(245, 197, 24, 0.12);
}
.timeline-step--pending .timeline-card {
  background: #fbfcfe;
  opacity: 0.88;
}

.timeline-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}
.timeline-stage {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  min-width: 0;
}
.timeline-index {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--purple);
  letter-spacing: 0.06em;
}
.timeline-step--pending .timeline-index { color: #9aa8bd; }
.timeline-step--current .timeline-index { color: var(--yellow-deep); }

.timeline-stage h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 650;
  color: var(--navy);
  letter-spacing: -0.01em;
}
.timeline-step--pending .timeline-stage h3 { color: #6b7a90; }

.timeline-badge {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
}
.timeline-badge--done {
  background: var(--purple-soft);
  color: var(--purple-deep);
}
.timeline-badge--live {
  background: var(--yellow-soft);
  color: #8a6d00;
}
.timeline-badge--pending {
  background: #eef2f7;
  color: #7a8799;
}

.timeline-card-body { margin-top: 0.55rem; }
.timeline-detail {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--ink);
}
.timeline-detail--muted {
  color: var(--muted);
  font-size: 0.86rem;
}
.timeline-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
  margin-top: 0.7rem;
  padding-top: 0.65rem;
  border-top: 1px dashed #e2e8f0;
  font-size: 0.8rem;
  color: var(--muted);
}
.timeline-foot span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.timeline-foot i {
  color: var(--purple);
  font-size: 0.85rem;
}
.timeline-step--current .timeline-foot i { color: var(--yellow-deep); }

@media (max-width: 640px) {
  .timeline-panel-head { flex-direction: column; align-items: flex-start; }
  .timeline-progress-meta { text-align: left; width: 100%; }
  .timeline-step { grid-template-columns: 36px 1fr; gap: 0 0.75rem; }
  .timeline-node { width: 32px; height: 32px; font-size: 0.85rem; }
  .timeline-card-top { flex-direction: column; align-items: flex-start; }
}

/* —— Job Card History feed —— */
.history-panel {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 50% at 100% 0%, rgba(15, 42, 74, 0.06), transparent 55%),
    var(--panel, #fff);
}
.history-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.history-panel-head h2 { margin: 0 0 0.25rem; }
.history-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.history-count {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(15, 42, 74, 0.07);
  color: var(--navy, #0f2a4a);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}
.history-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--muted);
}
.history-empty i {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.75rem;
  opacity: 0.45;
}
.history-feed { display: flex; flex-direction: column; gap: 1.75rem; }
.history-day-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.history-day-label span {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--navy, #0f2a4a);
  background: rgba(15, 42, 74, 0.08);
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
}
.history-day-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
.history-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.history-item {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 0 1rem;
  position: relative;
}
.history-rail {
  position: relative;
  display: flex;
  justify-content: center;
}
.history-rail::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(15, 42, 74, 0.2), rgba(15, 42, 74, 0.06));
}
.history-item:first-child .history-rail::before { top: 18px; }
.history-item:last-child .history-rail::before { bottom: calc(100% - 18px); }
.history-node {
  position: relative;
  z-index: 1;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 2px solid var(--navy, #0f2a4a);
  color: var(--navy, #0f2a4a);
  font-size: 0.95rem;
  box-shadow: 0 2px 8px rgba(15, 42, 74, 0.12);
}
.history-card {
  margin-bottom: 0.9rem;
  padding: 0.95rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 42, 74, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.history-item:last-child .history-card { margin-bottom: 0; }
.history-card:hover {
  border-color: rgba(15, 42, 74, 0.22);
  box-shadow: 0 4px 14px rgba(15, 42, 74, 0.08);
}
.history-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.history-stage-chip {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--navy, #0f2a4a);
  background: rgba(15, 42, 74, 0.08);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.35rem;
}
.history-card h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 650;
  color: var(--ink);
  line-height: 1.35;
}
.history-time {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.history-detail {
  margin: 0.55rem 0 0;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.45;
}
.history-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 0.7rem;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--line);
  font-size: 0.82rem;
  color: var(--muted);
}
.history-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.history-meta i { color: var(--navy, #0f2a4a); opacity: 0.75; }

@media (max-width: 640px) {
  .history-panel-head { flex-direction: column; }
  .job-header-actions { width: 100%; justify-content: space-between; }
  .history-item { grid-template-columns: 32px 1fr; gap: 0 0.7rem; }
  .history-node { width: 30px; height: 30px; font-size: 0.8rem; }
  .history-card-top { flex-direction: column; }
}

.checklist label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.65rem;
}
.checklist input { width: auto; accent-color: var(--purple); }

.work-list { list-style: none; padding: 0; margin: 0 0 20px; }
.work-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
}
.work-list li.done span { text-decoration: line-through; color: var(--muted); }

.two-col {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
  margin: 0 0 20px;
}
.two-col > .panel { margin-bottom: 0; }


.app-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

.view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem;
  background: #f3f5fa;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.view-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  cursor: pointer;
}
.view-toggle-btn i { font-size: 0.95rem; }
.view-toggle-btn:hover {
  color: var(--navy);
  background: rgba(255, 255, 255, 0.8);
}
.view-toggle-btn.active {
  background: var(--navy);
  color: var(--yellow);
  box-shadow: 0 4px 12px rgba(11, 29, 54, 0.18);
}
.view-toggle.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.view-toggle.is-disabled .view-toggle-btn {
  pointer-events: none;
  cursor: not-allowed;
  color: var(--muted);
  background: transparent;
  box-shadow: none;
}
.view-toggle.is-disabled .view-toggle-btn:hover {
  color: var(--muted);
  background: transparent;
}

body[data-view-mode="table"] .card-grid { display: none !important; }
body[data-view-mode="table"] main .table { display: table; width: 100%; }
body[data-view-mode="cards"] main .table { display: none !important; }
body[data-view-mode="cards"] .card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.card-grid-empty {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.92rem;
  padding: 20px 0;
}

.data-card {
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 8px 22px rgba(11, 29, 54, 0.06);
  border-top: 3px solid var(--purple);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 100%;
}
.data-card-row {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.data-card-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.data-card-value {
  color: var(--navy);
  font-size: 0.92rem;
  line-height: 1.4;
  word-break: break-word;
}
.data-card-value .btn { margin-top: 0.15rem; }

@media (max-width: 960px) {
  .app-shell { grid-template-columns: 72px 1fr; }
  .sidebar { width: 72px; padding: 0.7rem 0.35rem; }
  .brand-mark { width: 42px; height: 42px; font-size: 0.8rem; border-radius: 12px; }
  .nav a span { display: none; }
  .nav a { padding: 0.7rem 0.2rem; }
  .user-meta { display: none; }
  .app-header { padding: 0 20px; }
  .view-toggle-btn span { display: none; }
  .view-toggle-btn { padding: 0.45rem 0.6rem; }
  .grid-stats, .form-grid, .two-col, .kpi-grid { grid-template-columns: 1fr; }
  .main { padding: 20px; }
}


.profile-block-full {
  grid-column: 1 / -1;
}
.role-select-block {
  border-top: 3px solid var(--yellow);
}
.profile-form > .role-select-block {
  margin: 0 0 20px;
}
.profile-blocks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 0 0 20px;
  align-items: stretch;
}
.profile-block[hidden],
.field[hidden],
[data-section][hidden],
[data-help][hidden] {
  display: none !important;
}
.profile-block {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.profile-form.is-customer-mode .profile-blocks {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.profile-form.is-customer-mode .profile-block[data-section="company"],
.profile-form.is-customer-mode .profile-block[data-section="password"] {
  height: auto;
}
.profile-block-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--line);
  min-height: 44px;
}
.profile-block-head > i {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--purple-soft);
  color: var(--purple);
  flex-shrink: 0;
  font-size: 1.05rem;
}
.profile-block-head h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--navy);
  line-height: 1.25;
}
.profile-block-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.3;
}
.profile-block-head .btn {
  margin-left: auto;
  flex-shrink: 0;
}
.repeat-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.repeat-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  background: #fbfcff;
}
.repeat-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 12px;
}
.repeat-item-top strong {
  font-size: 0.85rem;
  color: var(--purple);
}
.doc-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 16px;
}
.doc-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f5f7fb;
  border: 1px solid var(--line);
}
.doc-item strong { display: block; color: var(--navy); font-size: 0.9rem; }
.doc-item span { color: var(--muted); font-size: 0.78rem; }
.profile-form-actions {
  position: sticky;
  bottom: 20px;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 20px;
  box-shadow: 0 8px 24px rgba(11,29,54,0.08);
  z-index: 5;
  margin: 0;
}
.field {
  min-width: 0;
}
@media (max-width: 980px) {
  .profile-blocks { grid-template-columns: 1fr; }
}


/* —— Machinery daily history —— */
.daily-history-panel {
  margin-top: 20px;
}
.daily-history-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.daily-history-head h2 { margin: 0 0 0.25rem; }
.daily-history-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.daily-history-count {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: rgba(15, 42, 74, 0.07);
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 650;
  white-space: nowrap;
}
.daily-log-form {
  margin-bottom: 1.5rem;
  padding: 1rem 1.1rem;
  border: 1px dashed rgba(15, 42, 74, 0.18);
  border-radius: 12px;
  background: rgba(15, 42, 74, 0.02);
}
.daily-log-form .optional {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.85em;
}
.daily-history-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
}
.daily-history-empty i {
  display: block;
  font-size: 1.8rem;
  margin-bottom: 0.6rem;
  opacity: 0.45;
}
.daily-log-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.daily-log-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 1rem 1.1rem;
  box-shadow: 0 1px 2px rgba(15, 42, 74, 0.04);
}
.daily-log-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.daily-log-card-head time {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 0.2rem;
}
.daily-log-card-head strong {
  font-size: 1.02rem;
  color: var(--ink);
}
.daily-log-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.daily-log-hours-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(184, 134, 11, 0.12);
  color: #8a6508;
  font-size: 0.78rem;
  font-weight: 700;
}
.daily-log-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.daily-log-metric {
  min-width: 0;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  background: #f6f8fc;
  border: 1px solid var(--line);
}
.daily-log-metric span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--muted);
  margin-bottom: 0.25rem;
}
.daily-log-metric span i { color: var(--navy); opacity: 0.8; }
.daily-log-metric strong {
  display: block;
  font-size: 0.92rem;
  color: var(--ink);
  line-height: 1.35;
  word-break: break-word;
}
.daily-log-metric em {
  display: block;
  margin-top: 0.2rem;
  font-style: normal;
  font-size: 0.78rem;
  color: var(--muted);
}
.daily-log-notes {
  margin: 0.8rem 0 0;
  padding-top: 0.7rem;
  border-top: 1px dashed var(--line);
  color: var(--ink);
  font-size: 0.9rem;
}
@media (max-width: 900px) {
  .daily-log-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .daily-history-head { flex-direction: column; }
  .daily-log-card-head { flex-direction: column; }
  .daily-log-metrics { grid-template-columns: 1fr; }
}

.daily-filter-panel { margin-bottom: 20px; }
.daily-filter-form { margin-top: 0.25rem; }
a.filter-chip-close {
  text-decoration: none;
  color: inherit;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
  white-space: nowrap;
}

/* —— Photo galleries —— */
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 12px;
  margin-top: 1rem;
}
.photo-tile {
  position: relative;
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, #eef1f7 0%, #f8f9fc 100%);
  aspect-ratio: 1;
  box-shadow: 0 4px 14px rgba(11, 29, 54, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.photo-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(11, 29, 54, 0.12);
}
.photo-tile a {
  display: block;
  width: 100%;
  height: 100%;
}
.photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-tile-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(11, 29, 54, 0.78);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease;
}
.photo-tile:hover .photo-tile-remove,
.photo-tile-remove:focus {
  opacity: 1;
}
.photo-tile-remove:hover { background: #b42318; }
.photo-gallery-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 0.85rem;
  padding: 14px 16px;
  border-radius: 12px;
  background: #f6f8fc;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}
.photo-gallery-empty i {
  font-size: 1.15rem;
  color: var(--navy-soft);
}
.photo-gallery-empty p { margin: 0; }

.photo-upload-form {
  margin: 0 0 0.25rem;
}
.photo-upload-actions {
  margin-top: 12px;
}

.photo-dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 180px;
  padding: 22px 20px;
  border-radius: 14px;
  border: 2px dashed rgba(109, 40, 217, 0.35);
  background:
    radial-gradient(ellipse 90% 80% at 50% 0%, rgba(245, 197, 24, 0.12) 0%, transparent 55%),
    linear-gradient(165deg, #ffffff 0%, #f4f1ff 100%);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}
.photo-dropzone:hover,
.photo-dropzone.is-dragover {
  border-color: var(--purple);
  border-style: dashed;
  box-shadow: 0 10px 28px rgba(109, 40, 217, 0.12);
  background:
    radial-gradient(ellipse 90% 80% at 50% 0%, rgba(245, 197, 24, 0.18) 0%, transparent 55%),
    linear-gradient(165deg, #fff 0%, var(--purple-soft) 100%);
}
.photo-dropzone.has-files {
  border-color: rgba(11, 29, 54, 0.28);
  border-style: solid;
}
.photo-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: 2;
  padding: 0;
  border: 0;
  background: transparent;
}
.photo-dropzone-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  pointer-events: none;
  flex: 1;
  min-height: 140px;
}
.photo-dropzone.has-files .photo-dropzone-body {
  min-height: 0;
  flex: 0;
}
.photo-dropzone-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--navy) 0%, var(--purple) 100%);
  color: var(--yellow);
  font-size: 1.45rem;
  box-shadow: 0 10px 20px rgba(11, 29, 54, 0.18);
  margin-bottom: 4px;
}
.photo-dropzone-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.01em;
}
.photo-dropzone-hint {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.35;
}
.photo-dropzone-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: var(--white);
  border: 1.5px solid var(--navy);
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 650;
}
.photo-dropzone-previews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
  pointer-events: none;
  position: relative;
  z-index: 1;
}
.photo-dropzone-previews[hidden] {
  display: none !important;
}
.photo-dropzone-preview {
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #eef1f7;
  box-shadow: 0 2px 8px rgba(11, 29, 54, 0.08);
}
.photo-dropzone-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-dropzone-more {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 10px;
  background: var(--navy);
  color: var(--yellow);
  font-size: 0.78rem;
  font-weight: 700;
}
.machinery-photo-panel .daily-history-head {
  margin-bottom: 0.85rem;
}

.photo-upload-inline {
  margin-top: 0.85rem;
}
.photo-upload-inline label.btn {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.photo-upload-inline input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
input[type="file"] {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  color: var(--ink);
}

.machinery-details-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.machinery-details-layout > .panel { margin: 0; }
@media (max-width: 980px) {
  .machinery-details-layout { grid-template-columns: 1fr; }
}

.machinery-create-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.machinery-create-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}
.machinery-create-layout > .panel {
  margin: 0;
  height: 100%;
}
.machinery-create-actions {
  margin-top: 4px;
}
@media (max-width: 980px) {
  .machinery-create-layout { grid-template-columns: 1fr; }
}

.machinery-list-photo {
  display: inline-flex;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #f3f5f9;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  flex-shrink: 0;
}
.machinery-list-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.machinery-list-photo.is-empty {
  font-size: 0.85rem;
}
a.machinery-list-photo:hover {
  border-color: rgba(15, 42, 74, 0.35);
  box-shadow: 0 2px 8px rgba(15, 42, 74, 0.1);
}

.machinery-empty {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 28px 12px 12px;
}
.machinery-empty-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: min(560px, 100%);
  height: 200px;
  padding: 24px 28px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  border-radius: 16px;
  border: 2px dotted rgba(109, 40, 217, 0.45);
  background:
    radial-gradient(ellipse 80% 70% at 50% 0%, rgba(245, 197, 24, 0.16) 0%, transparent 55%),
    linear-gradient(165deg, rgba(255, 255, 255, 0.95) 0%, rgba(237, 233, 254, 0.55) 100%);
  box-shadow: 0 10px 28px rgba(11, 29, 54, 0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
a.machinery-empty-card:hover {
  text-decoration: none;
  color: inherit;
  border-color: var(--purple);
  border-style: dashed;
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(109, 40, 217, 0.14);
  background:
    radial-gradient(ellipse 80% 70% at 50% 0%, rgba(245, 197, 24, 0.22) 0%, transparent 55%),
    linear-gradient(165deg, #fff 0%, var(--purple-soft) 100%);
}
.machinery-empty-card.is-static {
  cursor: default;
  border-color: rgba(92, 107, 130, 0.4);
}
.machinery-empty-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--navy) 0%, var(--purple) 100%);
  color: var(--yellow);
  font-size: 1.45rem;
  box-shadow: 0 8px 18px rgba(11, 29, 54, 0.18);
}
.machinery-empty-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--navy);
  line-height: 1.25;
}
.machinery-empty-hint {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.35;
  max-width: 32ch;
}
.machinery-empty-cta {
  margin-top: 4px;
  pointer-events: none;
}
a.machinery-empty-card:hover .machinery-empty-cta {
  filter: brightness(1.08);
}
@media (max-width: 640px) {
  .machinery-empty-card {
    height: auto;
    min-height: 200px;
    padding: 28px 20px;
  }
}
