.monitor-page {
  min-height: 100vh;
  padding: 1rem 0.75rem;
  background: linear-gradient(145deg, #f8fafc 0%, #eef2ff 52%, #f1f5f9 100%);
  color: #1e293b;
}

.monitor-page:fullscreen { overflow: auto; padding: 1.5rem; background: #f1f5f9; }
.monitor-page > div { width: 100%; }
.monitor-page > div > header { border: 1px solid rgb(255 255 255 / 8%); background: linear-gradient(115deg, #171d3a, #312e81 70%, #4338ca); }

.monitor-page .px-5 { padding-inline: 1.25rem; }
.monitor-page .py-14 { padding-block: 3.5rem; }
.monitor-page .bg-slate-100 { background-color: #f1f5f9; }
.monitor-page .py-1\.5 { padding-block: 0.375rem; }
.monitor-page .mt-0\.5 { margin-top: 0.125rem; }
.monitor-page .overflow-hidden { overflow: hidden; }
.monitor-page .h-2,
.monitor-page .w-2 { width: 0.5rem; height: 0.5rem; }
.monitor-page .animate-pulse { animation: monitor-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
.monitor-page .bg-emerald-500 { background-color: #10b981; }
.monitor-page .min-w-\[920px\] { min-width: 920px; }
.monitor-page .text-\[11px\] { font-size: 11px; }
.monitor-page .text-right { text-align: right; }
.monitor-page .max-w-\[1800px\] { max-width: 1800px; }
.monitor-page .tracking-\[0\.2em\] { letter-spacing: 0.2em; }
.monitor-page .text-indigo-300 { color: #a5b4fc; }
.monitor-page .text-slate-300 { color: #cbd5e1; }
.monitor-page .border-white\/20 { border-color: rgb(255 255 255 / 20%); }

.monitor-page .hover\:bg-white\/10:hover { background-color: rgb(255 255 255 / 10%); }
.monitor-page .min-h-\[60vh\] { min-height: 60vh; }

.monitor-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr));
  gap: 0.75rem;
}

.monitor-summary > article {
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: #fff;
  padding: 1rem;
  box-shadow: 0 1px 3px rgb(15 23 42 / 6%);
}

.monitor-search-panel,
.monitor-board-section {
  margin-top: 1.25rem;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 1px 3px rgb(15 23 42 / 6%);
}

.monitor-search-panel { padding: 1rem; }
.monitor-search-panel > label { display: block; margin-bottom: 0.5rem; font-size: 0.875rem; font-weight: 700; }
.monitor-search-controls { display: flex; gap: 0.625rem; }
.monitor-search-controls input {
  min-width: 0;
  flex: 1;
  border: 1px solid #cbd5e1;
  border-radius: 0.75rem;
  padding: 0.7rem 0.9rem;
  color: #0f172a;
  outline: none;
}
.monitor-search-controls input:focus { border-color: #4f46e5; box-shadow: 0 0 0 3px rgb(99 102 241 / 15%); }
.monitor-search-controls button {
  flex: 0 0 auto;
  border: 1px solid #cbd5e1;
  border-radius: 0.75rem;
  background: #fff;
  padding: 0.7rem 0.9rem;
  color: #334155;
  font-size: 0.875rem;
  font-weight: 700;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.monitor-search-controls button:not(:disabled) { cursor: pointer; }
.monitor-search-controls button:not(:disabled):hover { border-color: #94a3b8; background: #f8fafc; }
.monitor-search-controls button:disabled { cursor: not-allowed; opacity: 0.45; }
.monitor-search-controls #monitor-fullscreen { border-color: #4338ca; background: #4338ca; color: #fff; }
.monitor-search-controls #monitor-fullscreen:hover { background: #3730a3; }
.monitor-search-meta { margin: 0.5rem 0 0; color: #64748b; font-size: 0.75rem; }

.monitor-board-section { overflow: hidden; }
.monitor-board-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e2e8f0;
}
.monitor-board-heading h2 { margin: 0; font-size: 1.05rem; font-weight: 800; }
.monitor-board-heading p { margin: 0.25rem 0 0; color: #64748b; font-size: 0.75rem; }
.monitor-realtime { display: inline-flex; align-items: center; gap: 0.5rem; color: #047857; font-size: 0.75rem; font-weight: 700; }
.monitor-realtime > span { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: #10b981; animation: monitor-pulse 1.8s infinite; }
.monitor-board-scroll { overflow-x: auto; overscroll-behavior-x: contain; scroll-behavior: smooth; }
.monitor-board {
  display: grid;
  grid-template-columns: repeat(6, minmax(225px, 1fr));
  min-width: 1450px;
  min-height: 390px;
  gap: 0.75rem;
  padding: 0.875rem;
}
.monitor-lane {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 0.875rem;
  background: linear-gradient(180deg, #f8fafc, #f1f5f9);
}
.monitor-lane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 3.25rem;
  padding: 0.7rem 0.75rem;
  border-top: 4px solid #94a3b8;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 2px 8px rgb(15 23 42 / 3%);
}
.monitor-lane-header h2 { margin: 0; font-size: 0.8rem; font-weight: 800; line-height: 1.2; }
.monitor-lane-count { display: inline-grid; min-width: 1.65rem; height: 1.65rem; place-items: center; border-radius: 999px; background: #e2e8f0; color: #334155; font-size: 0.75rem; font-weight: 800; }
.monitor-lane-slate .monitor-lane-header { border-top-color: #64748b; }
.monitor-lane-blue .monitor-lane-header { border-top-color: #3b82f6; }
.monitor-lane-amber .monitor-lane-header { border-top-color: #f59e0b; }
.monitor-lane-rose .monitor-lane-header { border-top-color: #ef4444; }
.monitor-lane-emerald .monitor-lane-header { border-top-color: #10b981; }
.monitor-lane-green .monitor-lane-header { border-top-color: #166534; }
.monitor-lane-blue .monitor-lane-count { background: #dbeafe; color: #1d4ed8; }
.monitor-lane-amber .monitor-lane-count { background: #fef3c7; color: #a16207; }
.monitor-lane-rose .monitor-lane-count { background: #fee2e2; color: #b91c1c; }
.monitor-lane-emerald .monitor-lane-count { background: #d1fae5; color: #047857; }
.monitor-lane-green .monitor-lane-count { background: #dcfce7; color: #166534; }
.monitor-lane-cards { display: flex; flex: 1; flex-direction: column; gap: 0.65rem; overflow-y: auto; padding: 0.65rem; }
.monitor-lane-empty { margin: auto; padding: 1rem 0.25rem; color: #94a3b8; font-size: 0.75rem; text-align: center; }
.monitor-order-card {
  position: relative;
  flex: 0 0 auto;
  border: 1px solid #e2e8f0;
  border-left: 4px solid var(--machine-accent, #cbd5e1);
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #fff 70%, var(--machine-tint, #f8fafc));
  padding: 0.75rem;
  box-shadow: 0 1px 2px rgb(15 23 42 / 5%);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.monitor-order-card:hover { z-index: 1; transform: translateY(-3px) scale(1.015); box-shadow: 0 12px 24px rgb(15 23 42 / 12%); }
.monitor-card-code { overflow-wrap: anywhere; color: #312e81; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1rem; font-weight: 900; letter-spacing: -0.025em; }
.monitor-card-customer { margin: 0.55rem 0 0; color: #0f172a; font-size: 0.9rem; font-weight: 800; }
.monitor-card-product { margin: 0.2rem 0 0; color: #64748b; font-size: 0.8rem; }
.monitor-card-status { display: inline-flex; margin-top: 0.65rem; border: 1px solid #e2e8f0; border-radius: 999px; background: #f8fafc; padding: 0.25rem 0.5rem; color: #475569; font-size: 0.65rem; font-weight: 800; line-height: 1.2; }
.monitor-card-quantity { display: flex; justify-content: space-between; margin-top: 0.75rem; padding-top: 0.55rem; border-top: 1px solid #f1f5f9; color: #64748b; font-size: 0.75rem; }
.monitor-card-quantity strong { color: #0f172a; font-size: 0.85rem; }
.monitor-card-operator { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.65rem; }
.monitor-card-avatar { display: grid; width: 1.8rem; height: 1.8rem; flex: 0 0 auto; place-items: center; border-radius: 50%; background: #eef2ff; color: #4338ca; font-size: 0.75rem; font-weight: 800; }
.monitor-card-operator > div { display: flex; min-width: 0; flex-direction: column; }
.monitor-card-operator strong,
.monitor-card-operator span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.monitor-card-operator strong { color: #334155; font-size: 0.72rem; }
.monitor-card-operator > div > span { color: #64748b; font-size: 0.68rem; }
.monitor-card-operator > div > .monitor-machine-badge { display: inline-flex; width: fit-content; max-width: 100%; align-items: center; gap: 0.3rem; margin-top: 0.15rem; border: 1px solid var(--machine-border, #e2e8f0); border-radius: 999px; background: var(--machine-tint, #f8fafc); padding: 0.2rem 0.45rem; color: var(--machine-ink, #475569); font-size: 0.67rem; font-weight: 800; }
.monitor-machine-neutral { --machine-accent: #94a3b8; --machine-tint: #f1f5f9; --machine-border: #cbd5e1; --machine-ink: #475569; }
.monitor-machine-teal { --machine-accent: #0f766e; --machine-tint: #ccfbf1; --machine-border: #99f6e4; --machine-ink: #115e59; }
.monitor-machine-violet { --machine-accent: #7c3aed; --machine-tint: #ede9fe; --machine-border: #c4b5fd; --machine-ink: #5b21b6; }
.monitor-machine-orange { --machine-accent: #c2410c; --machine-tint: #ffedd5; --machine-border: #fdba74; --machine-ink: #9a3412; }
.monitor-machine-cyan { --machine-accent: #0e7490; --machine-tint: #cffafe; --machine-border: #67e8f9; --machine-ink: #155e75; }
.monitor-machine-pink { --machine-accent: #be185d; --machine-tint: #fce7f3; --machine-border: #f9a8d4; --machine-ink: #9d174d; }
.monitor-machine-lime { --machine-accent: #4d7c0f; --machine-tint: #ecfccb; --machine-border: #bef264; --machine-ink: #3f6212; }
.monitor-machine-indigo { --machine-accent: #4338ca; --machine-tint: #e0e7ff; --machine-border: #a5b4fc; --machine-ink: #3730a3; }
.monitor-machine-rose { --machine-accent: #be123c; --machine-tint: #ffe4e6; --machine-border: #fda4af; --machine-ink: #9f1239; }
.monitor-card-updated { display: block; margin-top: 0.65rem; color: #94a3b8; font-size: 0.65rem; }
.monitor-card-enter { animation: monitor-slide-in 560ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.monitor-card-flight {
  position: fixed;
  z-index: 10000;
  box-sizing: border-box;
  margin: 0;
  pointer-events: none;
  transform-origin: top left;
  box-shadow: 0 18px 38px rgb(15 23 42 / 22%), 0 0 0 2px rgb(99 102 241 / 22%);
}
.monitor-updated { margin: 0; padding: 0.7rem 1rem; border-top: 1px solid #f1f5f9; color: #94a3b8; font-size: 0.7rem; text-align: right; }

@keyframes monitor-slide-in {
  from { opacity: 0; transform: translateX(22px) scale(0.97); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}
@media (min-width: 640px) {
  .monitor-page .sm\:px-5 { padding-inline: 1.25rem; }
  .monitor-page .sm\:py-6 { padding-block: 1.5rem; }
  .monitor-page .sm\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
  .monitor-page .sm\:px-7 { padding-inline: 1.75rem; }
  .monitor-page .sm\:py-5 { padding-block: 1.25rem; }
  .monitor-page .sm\:inline { display: inline; }
}

@media (min-width: 1024px) {
  .monitor-page .lg\:px-8 { padding-inline: 2rem; }
}

@media (min-width: 1280px) {
  .monitor-page .xl\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .monitor-page { padding: 0.75rem 0.5rem; }
  .monitor-search-panel { padding: 0.75rem; }
  .monitor-search-controls { flex-wrap: wrap; }
  .monitor-search-controls input { flex-basis: 100%; }
  .monitor-search-controls button { flex: 1; }
  .monitor-board-heading { padding-inline: 0.875rem; }
}

@media (prefers-reduced-motion: reduce) {
  .monitor-page *,
  .monitor-page *::before,
  .monitor-page *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

}

@keyframes monitor-pulse {
  50% { opacity: 0.5; }
}

@media print {
  .monitor-page { background: #fff; }
  .monitor-order-card:hover { transform: none; box-shadow: none; }
}

.monitor-page {
  display: flex;
  min-height: 100vh;
  padding: 0;
  overflow: hidden;
  background: #080e16;
  color: #e5e7eb;
}
.monitor-page:fullscreen { padding: 0; background: #080e16; }
.monitor-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  width: 14.5rem;
  height: 100vh;
  flex: 0 0 14.5rem;
  flex-direction: column;
  border-right: 1px solid #1e293b;
  background: linear-gradient(180deg, #0b1420, #08111b 70%);
  padding: 1.25rem .9rem 1rem;
}
.monitor-sidebar-brand { display: flex; align-items: center; gap: .7rem; padding: .25rem .45rem 1.5rem; }
.monitor-sidebar-brand > div { display: flex; min-width: 0; flex-direction: column; }
.monitor-sidebar-brand strong { color: #f8fafc; font-size: 1rem; letter-spacing: -.02em; }
.monitor-sidebar-brand span { margin-top: .15rem; color: #7c8da3; font-size: .67rem; }
.monitor-sidebar-nav { min-height: 0; flex: 1; overflow-y: auto; }
.monitor-nav-caption { display: flex; align-items: center; gap: .45rem; margin: 1.1rem .55rem .55rem; color: #64748b; font-size: .62rem; font-weight: 800; letter-spacing: .12em; }
.monitor-sidebar-nav > a,
.monitor-machine-nav-item { display: flex; align-items: center; justify-content: space-between; gap: .45rem; min-width: 0; margin: .2rem 0; border: 1px solid transparent; border-radius: .7rem; padding: .62rem .65rem; color: #a9b6c7; font-size: .76rem; text-decoration: none; transition: background 150ms ease, color 150ms ease, border-color 150ms ease; }
.monitor-sidebar-nav > a > span,
.monitor-machine-nav-item > span { display: flex; min-width: 0; align-items: center; gap: .5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.monitor-sidebar-nav > a:hover,
.monitor-machine-nav-item:hover { background: #162334; color: #f8fafc; }
.monitor-sidebar-nav > a.monitor-nav-active { border-color: #244675; background: linear-gradient(110deg, #142944, #172c48); color: #67a9ff; font-weight: 750; }
.monitor-machine-nav-item { padding-block: .5rem; font-size: .7rem; }
.monitor-machine-nav-item > strong { display: grid; min-width: 1.35rem; height: 1.35rem; place-items: center; border-radius: 999px; background: #1d2a3a; color: #a9b6c7; font-size: .62rem; }
.monitor-nav-empty { padding: .4rem .6rem; color: #64748b; font-size: .7rem; }
.monitor-sidebar-account { display: flex; align-items: center; justify-content: space-between; gap: .5rem; border-top: 1px solid #1e293b; padding: 1rem .4rem .1rem; }
.monitor-sidebar-account > div { display: flex; min-width: 0; flex-direction: column; }
.monitor-sidebar-account strong { overflow: hidden; color: #e2e8f0; font-size: .74rem; text-overflow: ellipsis; white-space: nowrap; }
.monitor-sidebar-account span { margin-top: .15rem; color: #738399; font-size: .66rem; }
.monitor-sidebar-account button { display: grid; width: 2.2rem; height: 2.2rem; flex: 0 0 auto; place-items: center; border: 1px solid #29384a; border-radius: .65rem; background: #111d2a; color: #a9b6c7; }
.monitor-sidebar-account button:hover { background: #253143; color: #fff; }
.monitor-main { min-width: 0; flex: 1; overflow: auto; padding: .75rem 1.1rem .85rem; }
.monitor-page > .monitor-main > .monitor-topbar { border: 0; background: transparent; padding: 0; box-shadow: none; }
.monitor-topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .6rem; }
.monitor-topbar h1 { margin: .2rem 0 0; color: #f8fafc; font-size: 1.35rem; font-weight: 800; letter-spacing: -.03em; }
.monitor-breadcrumb { margin: 0; color: #8290a2; font-size: .68rem; }
.monitor-breadcrumb span { margin: 0 .35rem; color: #48566a; }
.monitor-topbar-actions { display: flex; align-items: center; gap: .8rem; }
.monitor-online { display: inline-flex; align-items: center; gap: .4rem; color: #a8b5c5; font-size: .7rem; }
.monitor-online > i,
.monitor-machine-title > i,
.monitor-machine-total > i { width: .5rem; height: .5rem; flex: 0 0 auto; border-radius: 50%; background: #35c47b; box-shadow: 0 0 10px rgb(53 196 123 / 45%); }
.monitor-topbar-actions #monitor-fullscreen { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid #29384a; border-radius: .65rem; background: #111d2a; padding: .55rem .75rem; color: #cbd5e1; font-size: .72rem; font-weight: 700; }
.monitor-filterbar { display: grid; grid-template-columns: minmax(13rem, 1.5fr) minmax(7rem, .8fr) minmax(7rem, .8fr) minmax(14rem, 1.7fr); align-items: stretch; gap: .45rem; margin-bottom: .55rem; }
.monitor-page .monitor-search-panel,
.monitor-page .machine-filter-panel,
.monitor-page .order-type-filter-panel,
.monitor-page .monitor-filterbar > section.mb-5 {
  min-width: 0;
  margin: 0;
  border: 1px solid #1e293b;
  border-radius: .75rem;
  background: #0e1723;
  padding: .45rem .65rem;
  box-shadow: none;
}
.monitor-page .monitor-search-panel > label { display: flex; align-items: center; gap: .35rem; margin-bottom: .2rem; color: #bec9d8; font-size: .64rem; }
.monitor-page .monitor-search-controls { gap: .35rem; }
.monitor-page .monitor-search-controls input,
.monitor-page .machine-filter-panel select,
.monitor-page .order-type-filter-panel > select {
  min-width: 0;
  border: 1px solid #29384a;
  border-radius: .5rem;
  background: #0a121d;
  padding: .35rem .5rem;
  color: #e2e8f0;
  font-size: .7rem;
}
.monitor-page .monitor-search-controls input::placeholder { color: #64748b; }
.monitor-page .monitor-search-controls button { border-color: #29384a; border-radius: .5rem; background: #172334; padding: .45rem .55rem; color: #bac7d6; font-size: .67rem; }
.monitor-page .monitor-search-controls #monitor-fullscreen { display: none; }
.monitor-page .monitor-search-meta { margin-top: .15rem; color: #718096; font-size: .58rem; }
.monitor-page .machine-filter-panel,
.monitor-page .order-type-filter-panel { display: flex; max-width: none; flex-direction: column; gap: .25rem; margin: 0; }
.monitor-page .machine-filter-panel > span,
.monitor-page .order-type-filter-panel > span { color: #9aa9bb; font-size: .65rem; }
.monitor-page .machine-filter-panel > span svg,
.monitor-page .order-type-filter-panel > span svg { color: #60a5fa; }
.monitor-page .monitor-filterbar > section.mb-5 { display: block; }
.monitor-page .monitor-filterbar > section.mb-5 > div:first-child { display: none; }
.monitor-page .monitor-filterbar > section.mb-5 p { color: #9aa9bb; font-size: .65rem; }
.monitor-page .monitor-filterbar > section.mb-5 p span { color: #e2e8f0; }
.monitor-page .monitor-filterbar > section.mb-5 > div:last-child { display: flex; width: 100%; flex-wrap: nowrap; gap: .2rem; margin-top: 0; overflow-x: auto; }
.monitor-page .monitor-filterbar > section.mb-5 button,
.monitor-page .monitor-filterbar > section.mb-5 label { flex: 0 0 auto; border-color: #29384a; background: #0a121d; padding: .3rem .4rem; color: #bac7d6; font-size: .58rem; }
.monitor-page .monitor-filterbar > section.mb-5 button { flex: 0 0 auto; border-color: #29384a; background: #0a121d; padding: .3rem .4rem; color: #bac7d6; font-size: .58rem; }
.monitor-page .monitor-filterbar > section.mb-5 button[aria-pressed="true"] { background: #315ea8; color: white; }
.monitor-page .monitor-filterbar > section.mb-5 input { color: #e2e8f0; }
.monitor-content { min-height: 60vh; }
.monitor-board-section { margin: 0; overflow: visible; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.monitor-board-heading { padding: .1rem .1rem .4rem; border: 0; }
.monitor-board-heading h2 { margin-top: .15rem; color: #f1f5f9; font-size: .95rem; }
.monitor-board-heading > div > p:last-child { color: #748399; font-size: .61rem; }
.monitor-realtime { color: #6ee7a3; font-size: .65rem; }
.monitor-machine-board { display: flex; flex-direction: column; gap: .38rem; padding: 0; }
.monitor-machine-section {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #1d2a39;
  border-radius: .8rem;
  background: linear-gradient(110deg, #101a26, #0d1722);
  box-shadow: 0 5px 16px rgb(0 0 0 / 12%);
}
.monitor-machine-heading { min-height: 2.1rem; padding: .2rem .65rem; border-bottom: 1px solid #1d2a39; background: transparent; color: #e2e8f0; }
.monitor-machine-title { display: inline-flex; min-width: 0; align-items: center; gap: .55rem; }
.monitor-machine-title .app-icon { width: 1.85rem !important; height: 1.85rem !important; padding: .42rem; border-radius: 50%; background: var(--machine-accent, #52647a); color: white; }
.monitor-machine-title > strong { overflow: hidden; font-size: .85rem; text-overflow: ellipsis; white-space: nowrap; }
.monitor-machine-title > span { color: #99a8b8; font-size: .68rem; }
.monitor-machine-title > i { width: .46rem; height: .46rem; }
.monitor-machine-total { display: inline-flex; align-items: center; gap: .45rem; color: #aab7c7; font-size: .66rem; white-space: nowrap; }
.monitor-machine-total > i { width: .48rem; height: .48rem; background: var(--machine-accent, #818cf8); box-shadow: 0 0 9px var(--machine-accent, #818cf8); }
.monitor-machine-cards { display: grid; grid-template-columns: repeat(6, minmax(7.5rem, 1fr)) minmax(5.2rem, .62fr); gap: .32rem; overflow-x: auto; padding: .35rem; scrollbar-color: #344256 #111b27; scrollbar-width: thin; }
.monitor-machine-cards:has(.monitor-less-card) { grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr)); }
.monitor-machine-section .monitor-order-card {
  min-width: 0;
  min-height: 3.9rem;
  border: 1px solid #334155;
  border-left: 1px solid #334155;
  border-radius: .65rem;
  background: linear-gradient(145deg, #131f2c, #0e1823);
  padding: .32rem .42rem;
  box-shadow: none;
}
.monitor-machine-section .monitor-order-card:hover { border-color: #64748b; background: #172535; box-shadow: 0 5px 14px rgb(0 0 0 / 25%); }
.monitor-machine-section .monitor-order-waiting { border-color: #465365; }
.monitor-machine-section .monitor-order-progress { border-color: #2769ab; }
.monitor-machine-section .monitor-order-ready { border-color: #a98216; }
.monitor-machine-section .monitor-order-repair { border-color: #a53c4c; }
.monitor-machine-section .monitor-order-repair-in-progress { border-color: #c2410c; }
.monitor-machine-section .monitor-order-packing,
.monitor-machine-section .monitor-order-done { border-color: #287d59; }
.monitor-card-code { overflow: hidden; color: #edf3fa; font-family: inherit; font-size: .64rem; font-weight: 750; letter-spacing: 0; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.monitor-card-heading { display: flex; align-items: center; justify-content: space-between; gap: .25rem; margin-top: .18rem; }
.monitor-card-customer { min-width: 0; margin: 0; overflow: hidden; color: #c4cfdb; font-size: .62rem; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.monitor-card-product { margin-top: .1rem; color: #93a1b3; font-size: .58rem; line-height: 1.2; }
.monitor-card-heading .order-type-badge { padding: .1rem .25rem; font-size: .5rem; }
.monitor-card-footer { display: flex; align-items: center; justify-content: space-between; gap: .25rem; margin-top: .18rem; }
.monitor-card-status { max-width: 80%; overflow: hidden; margin: 0; padding: .12rem .26rem; font-size: .5rem; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.monitor-card-status .app-icon { width: 9px !important; height: 9px !important; }
.monitor-card-quantity,
.monitor-card-operator { display: none; }
.monitor-card-quantity { color: #92a0b1; font-size: .56rem; }
.monitor-card-quantity strong { color: #e2e8f0; font-size: .6rem; }
.monitor-card-operator { margin-top: .28rem; color: #7e8da0; font-size: .57rem; }
.monitor-more-card { display: flex; min-width: 0; min-height: 3.9rem; flex-direction: column; align-items: center; justify-content: center; gap: .1rem; border: 1px dashed #7765c7; border-radius: .65rem; background: rgb(79 70 229 / 5%); color: #d3c8ff; cursor: pointer; }
.monitor-more-card:hover { border-color: #a78bfa; background: rgb(79 70 229 / 13%); }
.monitor-more-card strong { font-size: 1.1rem; }
.monitor-more-card span { font-size: .62rem; }
.monitor-less-card { min-height: 4rem; border-color: #43536a; background: #111d2a; color: #aab7c7; }
.monitor-board-empty,
.monitor-loading { margin: 0; border: 1px solid #1d2a39; border-radius: .8rem; background: #101a26; padding: 2.5rem 1rem; color: #8998aa; text-align: center; }
.monitor-board-section > nav { border-color: #1d2a39; }
.monitor-board-section > nav p,
.monitor-board-section > nav span { color: #9aa9bb; }
.monitor-board-section > nav button { border-color: #344256; background: #111d2a; color: #d1d9e2; }
.monitor-updated { margin-top: .2rem; border: 0; padding: .15rem .6rem; color: #708096; font-size: .58rem; }
.monitor-status-legend { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: .35rem; border: 1px solid #1d2a39; border-radius: .7rem; background: #0e1723; padding: .4rem .6rem; color: #aeb9c7; font-size: .58rem; }
.monitor-status-legend > span { display: inline-flex; align-items: center; gap: .32rem; }
.monitor-status-legend i { width: .55rem; height: .55rem; border-radius: 50%; background: #64748b; }
.monitor-status-legend .legend-waiting { background: #94a3b8; }
.monitor-status-legend .legend-progress { background: #3b82f6; }
.monitor-status-legend .legend-ready { background: #fbbf24; }
.monitor-status-legend .legend-repair { background: #ef4444; }
.monitor-status-legend .legend-done { background: #4ade80; }
.monitor-status-legend .legend-urgent { background: #ef4444; }
.monitor-status-legend small { display: inline-flex; align-items: center; gap: .35rem; margin-left: auto; color: #8896a8; font-size: .61rem; }
@media (max-width: 900px) {
  .monitor-sidebar { width: 12rem; flex-basis: 12rem; }
  .monitor-main { padding-inline: .9rem; }
  .monitor-filterbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .monitor-page .monitor-search-panel { grid-column: 1 / -1; }
  .monitor-page .monitor-filterbar > section.mb-5 { min-height: 5rem; }
  .monitor-machine-cards { grid-template-columns: repeat(4, minmax(7.5rem, 1fr)) minmax(5rem, .6fr); }
}
@media (max-width: 760px) {
  .monitor-page { display: block; overflow: visible; }
  .monitor-sidebar { position: relative; width: 100%; height: auto; min-height: 0; flex-direction: row; align-items: center; gap: .5rem; border-right: 0; border-bottom: 1px solid #1e293b; padding: .55rem .7rem; }
  .monitor-sidebar-brand { padding: 0; }
  .monitor-sidebar-brand .brand-mark { width: 2.2rem !important; height: 2.2rem !important; }
  .monitor-sidebar-brand strong { font-size: .8rem; }
  .monitor-sidebar-brand span,
  .monitor-sidebar-nav,
  .monitor-sidebar-account > div { display: none; }
  .monitor-sidebar-account { margin-left: auto; border: 0; padding: 0; }
  .monitor-sidebar-account button { width: 2rem; height: 2rem; }
  .monitor-main { overflow: visible; padding: .85rem .65rem 1rem; }
  .monitor-topbar { align-items: flex-start; }
  .monitor-topbar h1 { font-size: 1.1rem; }
  .monitor-online { display: none; }
  .monitor-filterbar { grid-template-columns: minmax(0, 1fr); }
  .monitor-page .monitor-search-panel { grid-column: auto; }
  .monitor-page .monitor-filterbar > section.mb-5 > div:last-child { display: flex; flex-wrap: nowrap; }
  .monitor-machine-cards { grid-template-columns: repeat(2, minmax(7.3rem, 1fr)); }
  .monitor-machine-cards:has(.monitor-more-card:not(.monitor-less-card)) { grid-template-columns: repeat(2, minmax(7.3rem, 1fr)); }
  .monitor-more-card { min-height: 5rem; }
  .monitor-status-legend { gap: .55rem .8rem; }
  .monitor-status-legend small { width: 100%; margin-left: 0; }
}


@media (max-width: 760px) {
  .monitor-machine-board { grid-template-columns: minmax(0, 1fr); padding: .6rem; }
  .monitor-machine-lanes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
