/*!*************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************/
/* ====================================================================
   KiranCNC dashboard — AdiLogiX-similar light industrial theme
   - Dark sidebar (slate)
   - Light bg, white panels, rounded corners
   - Bright KPI tiles, gauge dials, status timelines, alarm grids
   ==================================================================== */

:root {
  --bg: #e0e3e9;
  --panel: #172b5d;
  --panel-soft: #45578b;
  --line: #e4e8f3;
  --text: #f1f5f9;
  --text-soft: #94a3b8;
  --muted: #64748b;
  --primary: #3b82f6;
  --primary-soft: rgba(59, 130, 246, 0.15);
  --header: #0554ff;
  --green: #10b981;
  --green-soft: rgba(16, 185, 129, 0.15);
  --yellow: #f59e0b;
  --yellow-soft: rgba(245, 158, 11, 0.15);
  --red: #ef4444;
  --red-soft: rgba(239, 68, 68, 0.15);
  --orange: #f97316;
  --cyan: #06b6d4;
  --violet: #8b5cf6;
  --rose: #e11d48;
  --slate-900: #0b0f19;
  --slate-800: #111827;
  --slate-700: #1a1f2e;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  --radius: 10px;
  --radius-sm: 6px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  cursor: pointer;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

.muted {
  color: var(--muted);
}

.good-text {
  color: var(--green);
}

.warn-text {
  color: var(--yellow);
}

.bad-text {
  color: var(--red);
}

/* ============== APP SHELL ============== */

.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 0.22s ease;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 64px minmax(0, 1fr);
}

/* ============== SIDEBAR ============== */

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100vh;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  overflow-y: auto;
  overflow-x: hidden;
  align-self: start;
  background: var(--panel);
  /* background: linear-gradient(180deg, var(--slate-900), var(--slate-800)); */
  color: #ffffff;
  padding: 16px 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  transition: padding 0.22s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 2px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  min-height: 52px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  min-width: 36px;
  display: grid;
  place-items: center;
  background: #1e293b;
  color: #38bdf8;
  border: 1px solid #334155;
  border-radius: 8px;
  font-weight: 800;
  font-size: 13px;
}

.brand-text {
  flex: 1 1;
  min-width: 0;
  overflow: hidden;
}

.brand h1 {
  font-size: 18px;
  color: #e2e8f0;
  font-weight: 800;
  white-space: nowrap;
}

.brand h1 span {
  color: #38bdf8;
}

.brand p {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
}

.sidebar-toggle {
  margin-left: auto;
  min-width: 26px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #94a3b8;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}

.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
}

.nav {
  display: grid;
  grid-gap: 1px;
  gap: 1px;
}

.nav-group {
  display: grid;
}

.nav-button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 8px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: #ffffff;
  text-align: left;
  font-size: 13.5px;
  transition: background .15s, border-color .15s;
  white-space: nowrap;
  overflow: hidden;
}

.nav-button:hover {
  background: rgba(255, 255, 255, 0.04);
}

.nav-button.active {
  background: #2563eb;
  color: #fff;
  border-color: #1d4ed8;
}

/* Icon inside nav button */
.nav-icon {
  width: 18px;
  height: 18px;
  min-width: 18px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  opacity: 0.85;
}

.nav-icon svg {
  width: 18px;
  height: 18px;
}

.nav-button.active .nav-icon {
  opacity: 1;
}

.nav-label {
  flex: 1 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Collapsed: centre the icon */
.sidebar-collapsed .nav-button {
  justify-content: center;
  padding: 9px 0;
}

.sidebar-collapsed .sidebar-toggle {
  margin-left: 0;
}

.sidebar-collapsed .brand {
  justify-content: center;
}

.nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38bdf8;
  flex-shrink: 0;
}

.nav-dot.warn {
  background: var(--orange);
  animation: pulse 1.6s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: .35
  }
}

.nav-caret {
  margin-left: auto;
  opacity: 0.6;
  font-size: 10px;
}

.danger-link {
  color: #fda4af;
}

/* Badge for alarm count in collapsed mode */
.nav-badge {
  position: absolute;
  top: -4px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  background: #ef4444;
  color: #fff;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
  line-height: 1;
}

.machine-subnav {
  display: grid;
  grid-gap: 1px;
  gap: 1px;
  margin: 4px 0 4px 22px;
  border-left: 2px solid #334155;
  padding-left: 8px;
}

.machine-subnav button {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: #cbd5e1;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  text-align: left;
  font-size: 12.5px;
}

.machine-subnav button:hover {
  background: rgba(255, 255, 255, 0.05);
}

.machine-subnav button.active {
  background: #1e40af;
  color: #fff;
}

.sidebar-footer {
  display: grid;
  grid-gap: 1px;
  gap: 1px;
  margin-top: auto;
}

/* ============== TITLEBAR / TOPBAR ============== */

.main {
  background: var(--bg);
  min-width: 0;
}

.scada-titlebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  min-height: 56px;
}

.title-brand strong {
  font-size: 22px;
  color: var(--header);
  letter-spacing: 0.5px;
}

.title-brand strong span {
  color: var(--orange);
  margin-left: 1px;
  font-style: italic;
}

.title-brand p {
  font-size: 11px;
}

.title-info {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-soft);
  font-size: 13px;
}

@keyframes status-pulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }

  50% {
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
}

@keyframes status-spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.status-bell {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.status-bell:hover {
  transform: scale(1.1);
}

.status-bell.status-live {
  background: #10b981;
  animation: status-pulse 2s infinite;
}

.status-bell.status-connecting {
  background: #f59e0b;
  animation: status-spin 1.5s linear infinite;
}

.status-bell.status-error {
  background: #ef4444;
}

.status-bell.status-closed {
  background: #6b7280;
}

.status-bell.status-stale {
  background: #f59e0b;
  animation: status-pulse 1s infinite;
}

.status-bell i {
  display: block;
  width: 10px;
  height: 10px;
  background: #fff;
  -webkit-clip-path: polygon(50% 0, 100% 70%, 80% 70%, 80% 100%, 20% 100%, 20% 70%, 0 70%);
          clip-path: polygon(50% 0, 100% 70%, 80% 70%, 80% 100%, 20% 100%, 20% 70%, 0 70%);
  pointer-events: none;
}

.win-tool {
  width: 26px;
  height: 26px;
  border: 0;
  background: #06b6d4;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}

.win-tool.danger {
  background: #dc2626;
}

/* ====== DARK TOPBAR (brand | clock | user) ====== */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  height: 64px;
  background: var(--panel);
  border-bottom: 1px solid #2a3142;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 100;
  -webkit-backdrop-filter: blur(12px);
          backdrop-filter: blur(12px);
  gap: 16px;
  flex-shrink: 0;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.topbar-logo {
  width: 36px;
  height: 36px;
  min-width: 36px;
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
  color: #fff;
  box-shadow: 0 0 18px rgba(59, 130, 246, 0.3);
}

.topbar-brand-text h1 {
  font-size: 17px;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.topbar-brand-text span {
  font-size: 11px;
  color: #ffffff;
  font-weight: 500;
}

.topbar-center {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1 1;
  justify-content: center;
}

.topbar-shift-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.12), rgba(6, 182, 212, 0.12));
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #06b6d4;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.topbar-shift-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #06b6d4;
  animation: topbar-pulse 2s infinite;
}

@keyframes topbar-pulse {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: 0.3
  }
}

.topbar-clock {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  color: #ffffff;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.topbar-user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: #e5e7eb;
  border: 1px solid #fefeff;
  border-radius: 20px;
  font-size: 12px;
  color: #02204a;
}

.topbar-user-icon {
  font-size: 13px;
}

.topbar-signout {
  height: 32px;
  padding: 0 12px;
  border: 1px solid #ef4444;
  border-radius: 6px;
  background: transparent;
  color: #ef4444;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.topbar-signout:hover {
  background: #ef4444;
  color: #f1f5f9;
}

/* Sub-toolbar (shown for non-machine views) */
.topbar-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--bg);
  /* background: #111827;  */
  /* border-bottom: 1px solid #2a3142; */
}

.topbar-page-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #000000;
  font-weight: 600;
  white-space: nowrap;
}

.topbar-page-title strong {
  color: #19232d;
  font-size: 20px;
  display: block;
  margin-top: 2px;
  letter-spacing: 0;
  text-transform: none;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.toolbar label {
  display: flex;
  flex-direction: row;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
  gap: 8px;
}

.toolbar input,
.toolbar select {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-soft);
  color: var(--text);
  min-width: 130px;
}

.topbar h2 {
  font-size: 22px;
  font-weight: 700;
}

.topbar .eyebrow {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ============== BUTTONS ============== */

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  height: 34px;
  padding: 0 14px;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.primary-button {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.primary-button:hover {
  background: #2563eb;
}

.secondary-button {
  background: var(--panel-soft);
  color: var(--text);
  border-color: var(--line);
}

.secondary-button:hover {
  background: #222838;
}

.ghost-button {
  background: transparent;
  color: var(--text-soft);
  border-color: var(--line);
  padding: 0 10px;
  height: 30px;
}

.ghost-button:hover {
  background: var(--panel-soft);
}

.ghost-button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.ghost-button:disabled:hover {
  background: transparent;
}

.ghost-button.danger {
  color: var(--red);
  border-color: var(--red-soft);
}

.danger-button {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

.danger-button:hover {
  background: #b91c1c;
}

.primary-button.block,
.danger-button.block {
  width: 100%;
  justify-content: center;
  margin-top: 6px;
}

/* ============== GENERIC PANEL ============== */

.view {
  display: grid;
  grid-gap: 14px;
  gap: 14px;
  padding: 0 18px 28px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  height: max-content;
}

.panel>* {
  padding-left: 16px;
  padding-right: 16px;
}

.panel>canvas,
.panel>.alarm-table-wrap,
.panel>table.report-table,
.panel>.arch-diagram,
.panel>.scheduler-form,
.panel>.trending-grid,
.panel>.donut-row,
.panel>.health-cards,
.panel>.machine-details {
  padding: 12px 16px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--panel-soft);
  color: #fff;
  font-weight: 600;
  border-radius: var(--radius);
}

.panel-header h3 {
  font-size: 14px;
  font-weight: 600;
}

.panel-header span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  display: flex;
  gap: 6px;
  align-items: center;
}

.panel-header.status-banner {
  background: linear-gradient(90deg, #16a34a, #22c55e);
}

/* ============== KPI TILES (Company / Operator) ============== */

.kpi-grid {
  display: grid;
  grid-gap: 14px;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.kpi-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.kpi-row.five {
  display: grid;
  grid-gap: 14px;
  gap: 14px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.kpi-tile {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.kpi-tile span {
  color: var(--muted);
  font-size: 12px;
}

.kpi-tile strong {
  font-size: 26px;
  display: block;
  line-height: 1.1;
}

.kpi-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 50%;
  font-size: 22px;
}

.trend {
  font-size: 11px;
  font-weight: 600;
}

.trend.up {
  color: var(--green);
}

.trend.down {
  color: var(--red);
}

.metric-tile {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

.metric-tile span {
  color: var(--muted);
  font-size: 12px;
  display: block;
}

.metric-tile strong {
  font-size: 22px;
}

.metric-tile .ico {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--primary-soft);
}

.metric-tile .ico.parts {
  background: linear-gradient(135deg, #38bdf8, #2563eb);
}

.metric-tile .ico.target {
  background: linear-gradient(135deg, #f97316, #ea580c);
}

.metric-tile .ico.cycle {
  background: linear-gradient(135deg, #06b6d4, #0891b2);
}

.metric-tile .ico.oee {
  background: linear-gradient(135deg, #6366f1, #4338ca);
}

.metric-tile .ico.perf {
  background: linear-gradient(135deg, #10b981, #047857);
}

/* ============== LEGEND + STATUS ============== */

.legend {
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 12px;
}

.legend.mini {
  font-size: 11px;
  gap: 8px;
  flex-wrap: wrap;
}

.legend.mini.wrap {
  padding: 8px 0;
}

.legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 4px;
  background: var(--primary);
  vertical-align: -1px;
}

.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #94a3b8;
  margin-right: 6px;
}

.status-dot.running {
  background: var(--green);
}

.status-dot.idle {
  background: var(--yellow);
}

.status-dot.stopped {
  background: var(--red);
}

.status-dot.disconnected {
  background: #64748b;
}

.status-dot.ack {
  background: var(--cyan);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-soft);
  text-transform: uppercase;
}

.status-pill.running {
  background: var(--green-soft);
  color: #6ee7b7;
}

.status-pill.idle {
  background: var(--yellow-soft);
  color: #fcd34d;
}

.status-pill.stopped {
  background: var(--red-soft);
  color: #fca5a5;
}

.status-pill.disconnected {
  background: rgba(100, 116, 139, 0.18);
  color: #cbd5e1;
}

.status-pill.ack {
  background: rgba(6, 182, 212, 0.15);
  color: #67e8f9;
}

.settings-machine-list {
  display: grid;
  grid-gap: 10px;
  gap: 10px;
  padding: 0 16px 16px;
}

.settings-machine-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(104px, auto) minmax(124px, auto);
  grid-gap: 18px;
  gap: 18px;
  align-items: center;
  min-height: 72px;
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-left: 4px solid rgba(34, 197, 94, 0.75);
  border-radius: 8px;
  background: #0b1220;
}

.settings-machine-row.inactive {
  border-left-color: rgba(248, 113, 113, 0.82);
  background: #0a1020;
}

.settings-machine-main {
  min-width: 0;
}

.settings-machine-main strong {
  display: block;
  overflow: hidden;
  color: #f8fafc;
  font-size: 18px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-machine-main div {
  margin-top: 4px;
  overflow: hidden;
  color: #93c5fd;
  font-size: 13px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.machine-active-badge {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 104px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.machine-active-badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.machine-active-badge.active {
  background: rgba(16, 185, 129, 0.16);
  color: #6ee7b7;
}

.machine-active-badge.active i {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.14);
}

.machine-active-badge.inactive {
  background: rgba(248, 113, 113, 0.14);
  color: #fca5a5;
}

.machine-active-badge.inactive i {
  background: #f87171;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.12);
}

.machine-active-toggle {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 116px;
  margin: 0;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.machine-active-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.machine-active-track {
  position: relative;
  width: 44px;
  height: 24px;
  flex: 0 0 auto;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
  transition: background 160ms ease, border-color 160ms ease;
}

.machine-active-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #e2e8f0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  transition: transform 160ms ease;
}

.machine-active-toggle input:checked + .machine-active-track {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(16, 185, 129, 0.42);
}

.machine-active-toggle input:checked + .machine-active-track .machine-active-thumb {
  transform: translateX(20px);
}

.machine-active-toggle input:focus-visible + .machine-active-track {
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
}

.machine-active-text {
  min-width: 42px;
}

/* ============== COMPANY DASHBOARD GRID ============== */

.grid-2-1 {
  display: grid;
  grid-gap: 14px;
  gap: 14px;
  grid-template-columns: 2fr 1fr;
}

.grid-2 {
  display: grid;
  grid-gap: 14px;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  display: grid;
  grid-gap: 14px;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.machine-grid {
  display: grid;
  grid-gap: 12px;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.machine-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  display: grid;
  grid-gap: 10px;
  gap: 10px;
}

.machine-card-bar {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 4px;
  background: var(--green);
}

.machine-card.state-idle .machine-card-bar {
  background: var(--yellow);
}

.machine-card.state-stopped .machine-card-bar {
  background: var(--red);
}

.machine-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-top: 4px;
}

.machine-card-header h3 {
  font-size: 14px;
  font-weight: 700;
}

.machine-strips {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-gap: 6px;
  gap: 6px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}

.machine-strips span {
  font-size: 10.5px;
  color: var(--muted);
  display: block;
}

.machine-strips strong {
  font-size: 13px;
}

.machine-times {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--muted);
}

.machine-state-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 6px;
  background: var(--green-soft);
  color: #6ee7b7;
  font-weight: 600;
  font-size: 13px;
}

.machine-state-chip.idle {
  background: var(--yellow-soft);
  color: #fcd34d;
}

.machine-state-chip.stopped {
  background: var(--red-soft);
  color: #fca5a5;
}

.machine-state-chip.disconnected {
  background: rgba(100, 116, 139, 0.18);
  color: #cbd5e1;
}

.status-timeline {
  display: flex;
  gap: 1px;
  height: 22px;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
}

.status-timeline span {
  display: block;
}

.tl-running {
  background: var(--green);
}

.tl-idle {
  background: var(--yellow);
}

.tl-stopped {
  background: var(--red);
}

.pareto {
  display: flex;
  flex-direction: column;
}

/* ============== OPERATOR DASHBOARD ============== */

.operator-band {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 18px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.operator-band h3 {
  font-size: 22px;
}

.active-time {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 6px;
}

.active-time span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.active-time strong {
  font-size: 16px;
}

.machine-details {
  display: grid;
  grid-gap: 6px;
  gap: 6px;
  padding: 8px 0;
}

.machine-details .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed var(--line);
  padding: 4px 0;
  font-size: 13px;
}

.machine-details .row span {
  color: var(--shadow);
}

.machine-details .row strong {
  font-weight: 600;
}

/* ============== MACHINE DASHBOARD ============== */

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 4px 0;
}

.detail-header .eyebrow {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.detail-header h3 {
  font-size: 18px;
}

.machine-kpi-row {
  display: grid;
  grid-gap: 14px;
  gap: 14px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.kpi-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
  border-top-width: 4px;
}

.kpi-card.border-cyan {
  border-top-color: var(--cyan);
}

.kpi-card.border-amber {
  border-top-color: var(--orange);
}

.kpi-card.border-rose {
  border-top-color: var(--rose);
}

.kpi-card.border-violet {
  border-top-color: var(--violet);
}

.kpi-card.border-blue {
  border-top-color: var(--primary);
}

.kpi-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
  font-weight: 600;
}

.kpi-stats {
  display: grid;
  grid-gap: 4px;
  gap: 4px;
}

.kpi-stats div {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.kpi-stats span {
  color: var(--muted);
}

.kpi-stats strong {
  font-weight: 700;
}

.kpi-big {
  font-size: 30px;
  font-weight: 800;
}

.kpi-foot {
  color: var(--muted);
  font-size: 11px;
}

.donut-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  padding: 10px;
}

.donut,
.gauge {
  display: block;
}

.axis-pos {
  border-top: 1px solid var(--line);
  padding: 10px;
  font-size: 12px;
}

.axis-pos>span {
  color: var(--muted);
  display: block;
}

.axis-pos>div {
  display: flex;
  gap: 14px;
  padding-top: 4px;
}

.tool-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.tool-table th,
.tool-table td {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
}

.tool-table th {
  color: var(--muted);
  font-weight: 600;
}

.progress-bar {
  background: var(--line);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #10b981, #059669);
}

/* ============== PREDICTIVE MAINTENANCE ============== */

.health-cards {
  display: grid;
  grid-gap: 14px;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.health-card {
  background: var(--panel);
  color: #e2e8f0;
  border: 1px solid #1e293b;
  border-radius: var(--radius);
  padding: 12px 14px;
  display: grid;
  grid-gap: 10px;
  gap: 10px;
}

.health-card .hc-header strong {
  color: #fff;
  font-size: 14px;
}

.health-card.tone-good {
  border-left: 4px solid var(--green);
}

.health-card.tone-warn {
  border-left: 4px solid var(--yellow);
}

.health-card.tone-bad {
  border-left: 4px solid var(--red);
}

.hc-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 10px;
  gap: 10px;
  align-items: center;
}

.hc-gauge {
  text-align: center;
}

.band-label {
  font-size: 11px;
  font-weight: 700;
  margin-top: 4px;
  color: #fbbf24;
}

.band-label.tone-good {
  color: #4ade80;
}

.band-label.tone-warn {
  color: #fbbf24;
}

.band-label.tone-bad {
  color: #f87171;
}

.hc-tool-state,
.hc-vibration {
  background: #0f1c2e;
  border-radius: 6px;
  padding: 8px 10px;
  display: grid;
  grid-gap: 4px;
  gap: 4px;
}

.hc-title {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.hc-tool-row,
.hc-vib-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
}

.hc-tool-row strong,
.hc-vib-row strong {
  color: #e2e8f0;
}

.vib-status {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 0;
  text-align: center;
  border-top: 1px solid #1e293b;
  margin-top: 6px;
  color: #fbbf24;
}

.vib-status.tone-good {
  color: #4ade80;
}

.vib-status.tone-bad {
  color: #f87171;
}

.risk-pill {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: capitalize;
}

.risk-pill.risk-low {
  background: var(--green-soft);
  color: #6ee7b7;
}

.risk-pill.risk-medium {
  background: var(--yellow-soft);
  color: #fcd34d;
}

.risk-pill.risk-high {
  background: var(--red-soft);
  color: #fca5a5;
}

/* ============== REPORTS ============== */

.report-card-header {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 12px 16px;
  border-radius: var(--radius);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.report-card-header h3 {
  font-size: 18px;
}

.report-card-header span {
  color: var(--muted);
  font-size: 12px;
}

.report-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}

.report-section-title {
  background: #1e3a8a;
  color: #fff;
  padding: 8px 12px;
  margin: -14px -16px 12px;
  font-weight: 600;
  font-size: 13px;
}

.report-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-gap: 8px;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}

.report-detail-grid div {
  display: grid;
  grid-gap: 2px;
  gap: 2px;
  font-size: 13px;
}

.report-detail-grid span {
  color: var(--muted);
  font-size: 11px;
}

.metric-cards-grid {
  display: grid;
  grid-gap: 10px;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card-flat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.metric-card-flat span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.metric-card-flat strong {
  font-size: 22px;
}

.metric-card-flat.large strong {
  font-size: 30px;
}

.metric-card-flat.large {
  padding: 20px;
}

.metric-card-flat.large.border-cyan {
  border-top: 4px solid var(--cyan);
}

.metric-card-flat.large.border-blue {
  border-top: 4px solid var(--primary);
}

.metric-card-flat.large.border-rose {
  border-top: 4px solid var(--rose);
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--panel);
}

.report-table th,
.report-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.report-table th {
  background: #1e3a8a;
  color: #fff;
  font-weight: 600;
}

.report-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.03);
}

.status-timeline-block {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
  padding: 12px 0;
}

.status-timeline-label {
  font-weight: 700;
  font-size: 13px;
}

.timeline-axis {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
}

/* ============== ALARMS ============== */

.alarm-tabs {
  display: flex;
  gap: 0;
  background: #1e3a8a;
  padding: 4px;
  border-radius: 6px;
  margin-bottom: 0;
}

.alarm-tabs button {
  flex: 1 1;
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.7);
  padding: 8px;
  cursor: pointer;
  font-weight: 600;
  border-radius: 4px;
}

.alarm-tabs button.active {
  background: #3b82f6;
  color: #fff;
}

.alarm-panel {
  background: #1e293b;
  color: #cbd5e1;
}

.alarm-panel .alarm-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  background: #1a1f2e;
  color: var(--text);
}

.alarm-panel .alarm-toolbar input[type="text"],
.alarm-panel .alarm-toolbar input[type="date"],
.alarm-panel .alarm-toolbar input:not([type="checkbox"]) {
  height: 32px;
  border: 1px solid #2a3142;
  border-radius: 4px;
  background: #111827;
  color: #f1f5f9;
  padding: 0 8px;
}

.alarm-panel .alarm-toolbar input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  cursor: pointer;
}

.alarm-toolbar label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.alarm-toolbar .check {
  gap: 4px;
}

.alarm-toolbar-actions {
  display: flex;
  gap: 12px;
  margin-left: auto;
  align-items: center;
  flex-wrap: wrap;
}

.alarm-table-wrap {
  background: #1e293b;
  color: #e2e8f0;
  padding: 0 !important;
  overflow-x: auto;
}

.alarm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  background: #1e293b;
  color: #e2e8f0;
}

.alarm-table th,
.alarm-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #334155;
  text-align: left;
}

.alarm-table thead th {
  background: #475569;
  color: #fff;
  font-weight: 600;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
}

.alarm-table tbody tr.row-high {
  background: rgba(220, 38, 38, 0.18);
}

.alarm-table tbody tr.row-medium {
  background: rgba(202, 138, 4, 0.14);
}

.alarm-table tbody tr.row-low {
  background: rgba(15, 118, 110, 0.14);
}

.alarm-table tbody tr.severity-critical,
.alarm-table tbody tr.threshold-hit {
  background: rgba(220, 38, 38, 0.24);
  color: #fecaca;
}

.alarm-table tbody tr.severity-high {
  background: rgba(239, 68, 68, 0.16);
}

.alarm-table tbody tr.severity-medium {
  background: rgba(245, 158, 11, 0.14);
}

.alarm-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

.alarm-table .mono {
  font-family: ui-monospace, SFMono-Regular, monospace;
  background: none;
  padding: 0;
  border-radius: 0;
}

.alarm-table .muted {
  color: #94a3b8;
}

.user-management-table th:last-child,
.user-management-table td:last-child {
  width: 360px;
}

.operator-assignment {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 64px;
  grid-gap: 10px;
  gap: 10px;
  align-items: center;
  max-width: 380px;
}

.operator-assignment-select {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 34px 0 12px;
  border: 1px solid #64748b;
  border-radius: 6px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 12.5px;
  outline: none;
}

.operator-assignment-select:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.18);
}

.operator-assignment-select option {
  background: #0f172a;
  color: #e2e8f0;
}

.operator-assignment-save {
  height: 36px;
  padding: 0 12px;
}

@media (max-width: 900px) {
  .user-management-table th:last-child,
  .user-management-table td:last-child {
    width: 280px;
  }

  .operator-assignment {
    grid-template-columns: 1fr;
    max-width: 260px;
  }
}

.alarm-records {
  padding: 8px 16px;
  background: var(--panel-soft);
  color: var(--text-soft);
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.alarm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 16px;
  background: var(--panel-soft);
  border-top: 1px solid var(--line);
}

.severity-critical {
  border-color: rgba(220, 38, 38, 0.55);
  box-shadow: inset 3px 0 0 #dc2626;
}

.severity-pill {
  display: inline-flex;
  align-items: center;
  min-width: 72px;
  justify-content: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.severity-pill.severity-critical,
.severity-pill.severity-high {
  background: #dc2626;
  color: #fff;
}

.severity-pill.severity-medium {
  background: #f59e0b;
  color: #111827;
}

.severity-pill.severity-low {
  background: #0d9488;
  color: #fff;
}

.production-trend-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
  grid-gap: 14px;
  gap: 14px;
  padding: 12px 16px;
}

.report-table.compact th,
.report-table.compact td {
  padding: 7px 8px;
}

.report-table tr.loss-row td {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  font-weight: 700;
}

.live-production {
  display: grid;
  grid-gap: 16px;
  gap: 16px;
}

.live-prod-titlebar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 14px 16px;
}

.live-prod-titlebar h2 {
  font-size: 24px;
  line-height: 1.1;
  color: var(--text);
}

.live-prod-titlebar label {
  color: var(--muted);
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 12px;
  display: grid;
  grid-gap: 4px;
  gap: 4px;
  min-width: 240px;
  font-size: 12px;
}

.live-prod-titlebar select {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px;
  background: var(--panel-soft);
  color: var(--text);
}

.live-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  grid-gap: 12px;
  gap: 12px;
}

.live-kpi-card,
.live-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.live-kpi-card {
  min-height: 112px;
  padding: 18px 20px;
  display: grid;
  align-content: center;
  border-left: 4px solid var(--primary);
}

.live-kpi-card:nth-child(2) {
  border-left-color: var(--green);
}

.live-kpi-card:nth-child(3) {
  border-left-color: var(--violet);
}

.live-kpi-card:nth-child(4) {
  border-left-color: var(--orange);
}

.live-kpi-card span {
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
}

.live-kpi-card strong {
  font-size: clamp(28px, 3vw, 36px);
  color: var(--text);
  margin-top: 10px;
  letter-spacing: 0;
}

.live-prod-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(440px, 1.55fr) minmax(220px, 0.75fr);
  grid-gap: 14px;
  gap: 14px;
  align-items: stretch;
}

.live-panel {
  padding: 12px 16px;
  min-height: 250px;
}

.live-panel h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.target-bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 52px;
  height: 230px;
}

.target-bar-group {
  display: grid;
  justify-items: center;
  grid-gap: 8px;
  gap: 8px;
}

.bar-pair {
  height: 174px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.bar {
  width: 30px;
  display: block;
  position: relative;
}

.bar.target {
  background: #3b82f6;
}

.bar.actual {
  background: #10b981;
}

.bar em {
  position: absolute;
  top: -22px;
  left: -5px;
  color: #6b7280;
  font-style: normal;
  font-size: 14px;
}

.hourly-panel {
  grid-column: span 2;
}

.hourly-bars {
  height: 220px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-gap: 8px;
  gap: 8px;
  align-items: flex-end;
  border-bottom: 1px dotted #cbd5e1;
  padding: 20px 8px 32px;
}

.hour-slot {
  position: relative;
  height: 100%;
  display: grid;
  align-items: flex-end;
  justify-items: center;
}

.hour-bar {
  width: min(32px, 70%);
  background: #10b981;
  border-radius: 4px 4px 0 0;
  position: relative;
  display: block;
}

.hour-bar em {
  position: absolute;
  top: -20px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 12px;
  font-style: normal;
  color: #475569;
}

.hour-slot strong {
  position: absolute;
  bottom: -28px;
  transform: rotate(-90deg);
  font-size: 11px;
  color: #64748b;
}

.target-line {
  position: absolute;
  left: 6px;
  right: 6px;
  height: 3px;
  background: #1d3f9f;
  color: #475569;
  font-size: 12px;
  text-align: center;
}

.alarm-summary {
  display: grid;
  grid-gap: 18px;
  gap: 18px;
  align-content: center;
}

.alarm-stat {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  display: grid;
  grid-gap: 12px;
  gap: 12px;
  background: var(--panel-soft);
}

.alarm-stat span {
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
}

.alarm-stat strong {
  font-size: 34px;
  color: var(--text);
}

.alarm-analysis {
  grid-column: span 1;
}

.alarm-bar-row {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  grid-gap: 10px;
  gap: 10px;
  margin: 11px 0;
}

.alarm-bar-row strong {
  display: block;
  min-width: 26%;
  background: var(--violet);
  color: #fff;
  padding: 8px 10px;
  font-size: 12px;
  text-align: right;
  border-radius: 4px;
}

.alarm-bar-row:first-of-type strong {
  background: var(--green);
}

.loss-panel {
  grid-column: span 2;
}

/* ============== COMPANY DASHBOARD ============== */

.company-dashboard {
  display: grid;
  grid-gap: 16px;
  gap: 16px;
}

.company-kpi-row-top {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-gap: 12px;
  gap: 12px;
  align-items: stretch;
}

.company-kpi-row-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  grid-gap: 12px;
  gap: 12px;
  align-items: stretch;
}

.company-kpi-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ckpi-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ckpi-icon {
  font-size: 16px;
}

.ckpi-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
}

.ckpi-value {
  font-size: 38px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.ckpi-unit {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-soft);
}

.ckpi-sparkline {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 36px;
  margin: 2px 0;
}

.ckpi-trend {
  font-size: 12px;
  font-weight: 600;
}

.ckpi-gauge-labels {
  display: flex;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
  margin-top: -4px;
}

.ckpi-machine-legend {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: var(--text-soft);
  align-items: center;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 3px;
}

.ckpi-machine-counts {
  display: flex;
  gap: 16px;
  font-size: 26px;
  font-weight: 800;
}

.company-downtime-card {
  grid-column: span 1;
}

.downtime-bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1;
}

.downtime-bar-row {
  display: grid;
  grid-template-columns: 44px 1fr 32px;
  align-items: center;
  grid-gap: 6px;
  gap: 6px;
}

.dt-label {
  font-size: 11px;
  color: var(--text-soft);
  font-weight: 600;
}

.dt-bar-wrap {
  height: 10px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 4px;
  overflow: hidden;
}

.dt-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 4px;
  transition: width 0.4s;
}

.dt-val {
  font-size: 11px;
  color: var(--muted);
  text-align: right;
}

/* Machine cards grid */
.company-machine-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-gap: 12px;
  gap: 12px;
}

.co-machine-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow 0.15s;
}

.co-machine-card:hover {
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
}

.co-machine-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.co-machine-name {
  font-size: 14px;
  font-weight: 700;
  display: block;
}

.co-machine-prog {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-top: 2px;
}

.co-machine-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-gap: 4px;
  gap: 4px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}

.co-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.co-stat span {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.2;
}

.co-stat strong {
  font-size: 11px;
  font-weight: 700;
}

.co-machine-bar-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 22px;
}

.co-machine-id {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.co-machine-bar {
  flex: 1 1;
  height: 22px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  position: relative;
  overflow: hidden;
}

.co-bar-label {
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  opacity: 0.9;
}

/* Responsive */
@media (max-width: 1200px) {
  .company-kpi-row-top {
    grid-template-columns: 1fr 1fr;
  }

  .company-kpi-row-bottom {
    grid-template-columns: 1fr 1fr;
  }

  .company-downtime-card {
    grid-column: span 2;
  }

  .company-machine-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .company-kpi-row-top {
    grid-template-columns: 1fr;
  }

  .company-kpi-row-bottom {
    grid-template-columns: 1fr;
  }

  .company-downtime-card {
    grid-column: unset;
  }

  .company-machine-grid {
    grid-template-columns: 1fr;
  }
}

.cnc-black-panel {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 12px;
  display: grid;
  grid-gap: 14px;
  gap: 14px;
}

.cnc-info-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-gap: 8px;
  gap: 8px;
}

.cnc-black-tile {
  min-height: 54px;
  border: 1px solid var(--line);
  border-left: 3px solid #60a5fa;
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 8px;
  display: grid;
  align-content: center;
  grid-gap: 5px;
  gap: 5px;
}

.cnc-black-tile:first-child {
  grid-column: span 2;
}

.cnc-black-tile span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.cnc-black-tile strong {
  color: var(--text);
  font-size: clamp(15px, 1.4vw, 18px);
  font-weight: 900;
  overflow-wrap: anywhere;
}

.cnc-black-tile:nth-child(14) strong,
.cnc-black-tile:nth-child(15) strong,
.cnc-black-tile:nth-child(16) strong {
  color: #f59e0b;
}

.cnc-black-bottom {
  display: grid;
  grid-template-columns: repeat(4, minmax(118px, 150px)) minmax(320px, 1fr);
  grid-gap: 20px;
  gap: 20px;
  align-items: center;
}

.cnc-hourly-dark {
  min-height: 260px;
  padding: 8px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.cnc-hourly-dark h3 {
  text-align: center;
  font-weight: 700;
  color: var(--text-soft);
  font-size: 14px;
}

.cnc-hour-bars {
  height: 190px;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  grid-gap: 10px;
  gap: 10px;
  align-items: flex-end;
  border-left: 1px solid #94a3b8;
  border-bottom: 1px solid #94a3b8;
  padding: 10px 10px 28px;
}

.cnc-hour {
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  position: relative;
}

.cnc-hour span {
  width: 14px;
  display: block;
}

.cnc-hour .cyan,
.cnc-dark-legend .cyan {
  background: var(--cyan);
}

.cnc-hour .orange,
.cnc-dark-legend .orange {
  background: var(--orange);
}

.cnc-hour em {
  position: absolute;
  bottom: -25px;
  color: var(--muted);
  font-size: 10px;
  transform: rotate(30deg);
  font-style: normal;
}

.cnc-dark-legend {
  display: flex;
  gap: 22px;
  justify-content: center;
  margin-top: 8px;
  font-size: 12px;
}

.cnc-dark-legend i {
  width: 12px;
  height: 12px;
  display: inline-block;
  margin-right: 6px;
}

/* alarm panel for audit-style use too */
.panel .alarm-toolbar {
  background: var(--panel-soft);
  color: var(--text);
}

.panel .alarm-toolbar input[type="text"],
.panel .alarm-toolbar input[type="date"],
.panel .alarm-toolbar input:not([type="checkbox"]) {
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  color: var(--text);
  padding: 0 8px;
  font-size: 12px;
}

.panel .alarm-toolbar input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  cursor: pointer;
}

/* ============== SCHEDULER ============== */

.scheduler-form {
  display: grid;
  grid-gap: 14px;
  gap: 14px;
  background: var(--panel);
}

.scheduler-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
}

.scheduler-section-title {
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-soft);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.row-grid {
  display: grid;
  grid-gap: 10px;
  gap: 10px;
}

.row-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.row-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.row-grid label {
  display: grid;
  grid-gap: 4px;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.row-grid input,
.row-grid select {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-soft);
  color: var(--text);
}

.recipient-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 13px;
}

.recipient-table th {
  background: var(--panel-soft);
  text-align: left;
  padding: 8px;
  border-bottom: 1px solid var(--line);
}

.recipient-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
}

.recipient-table input,
.recipient-table select {
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel-soft);
  color: var(--text);
  width: 100%;
}

.scheduler-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ============== ARCHITECTURE ============== */

.arch-panel {
  padding-bottom: 0;
}

.arch-diagram {
  display: grid;
  grid-gap: 16px;
  gap: 16px;
  padding: 24px 0 32px !important;
}

.arch-row {
  display: flex;
  justify-content: space-around;
  gap: 14px;
  flex-wrap: wrap;
}

.arch-row.gateways {
  gap: 18px;
}

.arch-bus {
  height: 2px;
  background: var(--cyan);
  margin: 0 24px;
  position: relative;
}

.arch-bus::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -10px;
  transform: translateX(-50%);
  border: solid var(--cyan);
  border-width: 0 2px 2px 0;
  width: 8px;
  height: 8px;
  transform: translateX(-50%) rotate(45deg);
}

.arch-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-soft);
}

.arch-node.terminal .arch-icon.screen {
  width: 60px;
  height: 44px;
  background: linear-gradient(180deg, #0f172a 60%, #475569 60%, #475569 70%, #cbd5e1 70%);
  border: 2px solid #334155;
  border-radius: 4px;
}

.arch-node.engine .arch-icon.server {
  width: 80px;
  height: 60px;
  background: linear-gradient(180deg, #1e293b, #475569);
  border: 2px solid #1f2937;
  border-radius: 4px;
  position: relative;
}

.arch-node.engine .arch-icon.server::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  right: 4px;
  height: 4px;
  background: #38bdf8;
  border-radius: 1px;
}

.arch-node.engine strong {
  font-size: 13px;
}

.arch-node.engine em {
  font-style: italic;
  color: var(--muted);
  font-size: 11px;
}

.arch-node.gateway {
  border: 1px dashed var(--line);
  padding: 8px;
  border-radius: 6px;
  background: #fff;
  min-width: 110px;
}

.arch-status {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
}

.arch-status.on {
  background: var(--green-soft);
  color: #166534;
}

.arch-status.off {
  background: var(--red-soft);
  color: #991b1b;
}

.arch-icon.plc {
  width: 60px;
  height: 30px;
  background: linear-gradient(180deg, #94a3b8 50%, #1e293b 50%);
  border: 1px solid #475569;
  border-radius: 2px;
}

.arch-icon.machine {
  width: 60px;
  height: 40px;
  background: linear-gradient(180deg, #64748b 60%, #0f172a 60%);
  border: 1px solid #475569;
  border-radius: 2px;
  position: relative;
}

.arch-icon.machine::after {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 6px;
  background: #38bdf8;
  border-radius: 2px 2px 0 0;
}

/* ============== TRENDING ============== */

.trending-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  grid-gap: 14px;
  gap: 14px;
  padding: 12px 16px !important;
}

.trending-side {
  display: grid;
  grid-gap: 12px;
  gap: 12px;
}

.trending-block {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  display: grid;
  grid-gap: 8px;
  gap: 8px;
  font-size: 12px;
}

.trending-block-title {
  font-weight: 700;
  color: var(--text-soft);
}

.trending-block input,
.trending-block select {
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 8px;
  background: var(--panel-soft);
  color: var(--text);
}

.plc-tags {
  max-height: 320px;
  overflow-y: auto;
  display: grid;
  grid-gap: 2px;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 6px;
  background: var(--panel-soft);
}

.plc-tag-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  padding: 2px 4px;
  border-radius: 2px;
}

.plc-tag-row:hover {
  background: var(--panel-soft);
}

.trending-main {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
}

.trending-options {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
  background: var(--panel-soft);
  padding: 8px 10px;
  border-radius: 6px;
}

.trending-options .check {
  display: flex;
  gap: 4px;
  align-items: center;
}

/* ============== REPORT TILES ============== */

.report-grid {
  display: grid;
  grid-gap: 14px;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.report-tile {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  display: grid;
  grid-gap: 8px;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}

.report-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.report-tile span {
  font-size: 11px;
  color: var(--primary);
  text-transform: uppercase;
  font-weight: 700;
}

.report-tile h3 {
  font-size: 15px;
}

.report-tile p {
  color: var(--muted);
  font-size: 12.5px;
}

/* ============== REPORT BUILDER ============== */

.report-builder-v2 {
  padding: 16px;
  display: grid;
  grid-gap: 14px;
  gap: 14px;
}

.rb-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  padding: 14px;
  background: var(--panel-soft);
  border-radius: 8px;
  border: 1px solid var(--line);
}

.rb-row label {
  display: grid;
  grid-gap: 4px;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
  min-width: 120px;
  flex: 1 1;
}

.rb-row input,
.rb-row select {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  font-size: 13px;
}

.rb-row input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  cursor: pointer;
}

.rb-metrics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--panel-soft);
  border-radius: 8px;
  border: 1px solid var(--line);
}

.rb-metrics-label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 4px;
}

.rb-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
}

.rb-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--primary);
}

.rb-generate {
  margin-left: auto;
  white-space: nowrap;
}

.custom-report {
  padding: 12px 16px;
}

.report-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-gap: 12px;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}

.report-summary span {
  font-size: 11px;
}

.report-summary strong {
  font-size: 14px;
}

.export-row {
  display: flex;
  gap: 8px;
  padding: 8px 0;
}

/* ============== DIALOGS ============== */

.dialog-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  display: grid;
  place-items: center;
  z-index: 50;
}

.dialog-card {
  background: var(--panel);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  width: min(520px, 92vw);
  display: grid;
  grid-gap: 10px;
  gap: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.dialog-card.wide {
  width: min(900px, 95vw);
}

.dialog-card label {
  display: grid;
  grid-gap: 4px;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
  padding: 0 16px;
}

.dialog-card input,
.dialog-card select,
.dialog-card textarea {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: var(--panel-soft);
  font-size: 13px;
  color: var(--text);
}

.dialog-card .user-active-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border: 1px solid rgba(226, 232, 240, 0.35);
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.28);
  margin: 0 16px;
}

.dialog-card .user-active-row span {
  display: grid;
  grid-gap: 3px;
  gap: 3px;
}

.dialog-card .user-active-row strong {
  color: var(--text);
}

.dialog-card .user-active-row small {
  color: var(--text-soft);
  font-size: 12px;
}

.dialog-card .user-active-row input {
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  accent-color: var(--primary);
}

.dialog-card textarea {
  resize: vertical;
}

.dialog-header {
  background: var(--panel-soft);
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.dialog-header h3 {
  font-size: 14px;
}

.dialog-header-blue {
  background: var(--header);
  color: #fff;
}

.dialog-header-blue h3 {
  color: #fff;
}

.dialog-header-red {
  background: var(--red);
  color: #fff;
}

.dialog-header-red h3 {
  color: #fff;
}

.dialog-subheader {
  background: #1e293b;
  color: #fff;
  text-align: center;
  padding: 8px;
  font-weight: 600;
  font-size: 13px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 16px 14px;
  border-top: 1px solid var(--line);
}

.dialog-card .primary-button:not(.block) {
  margin: 0 16px 16px;
}

.role-tabs {
  display: flex;
  border-bottom: 2px solid var(--line);
  margin: 0 16px;
}

.role-tabs button {
  flex: 1 1;
  padding: 8px 10px;
  background: transparent;
  border: 0;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-weight: 600;
  color: var(--muted);
}

.role-tabs button.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.rights-table {
  width: calc(100% - 32px);
  margin: 10px 16px;
  border-collapse: collapse;
  font-size: 12.5px;
}

.rights-table th,
.rights-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.rights-table th:nth-child(2),
.rights-table td:nth-child(2) {
  text-align: left;
}

.rights-table th {
  background: var(--panel-soft);
  color: var(--text-soft);
}

.check-cell input {
  transform: scale(1.1);
}

/* ============== AI ASSISTANT ============== */

.ai-fab {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  color: #fff;
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
  z-index: 40;
  transition: transform 0.15s, box-shadow 0.15s;
}

.ai-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.ai-panel {
  position: fixed;
  right: 12px;
  bottom: 12px;
  width: 340px;
  max-height: 520px;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  z-index: 40;
}

.ai-header {
  display: flex;
  justify-content: space-between;
  background: linear-gradient(90deg, #2563eb, #38bdf8);
  color: #fff;
  padding: 8px 12px;
  border-radius: var(--radius) var(--radius) 0 0;
}

.ai-header span {
  font-size: 11px;
  opacity: 0.85;
  display: block;
}

.ai-header strong {
  font-size: 13px;
}

.ai-header button {
  width: 26px;
  height: 26px;
  border: 0;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
}

.ai-messages {
  flex: 1 1;
  min-height: 0;
  overflow-y: auto;
  padding: 10px;
  display: grid;
  grid-gap: 6px;
  gap: 6px;
}

.ai-message {
  font-size: 12.5px;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--panel-soft);
  color: var(--text);
  display: grid;
  grid-gap: 6px;
  gap: 6px;
}

.ai-message.user {
  background: var(--primary-soft);
}

.ai-message.pending {
  opacity: 0.6;
}

.ai-message-text {
  white-space: pre-wrap;
  line-height: 1.45;
}

.ai-message-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 10.5px;
  color: var(--muted);
  border-top: 1px dashed var(--line);
  padding-top: 4px;
}

.ai-route {
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--panel-soft);
}

.ai-route.intent {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
}

.ai-route.llm {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
}

.ai-route.fallback {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
}

.ai-sources {
  font-family: ui-monospace, SFMono-Regular, monospace;
}

.ai-suggestions {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.ai-suggestions.starter {
  padding: 6px 0;
}

.ai-chip {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  color: var(--text-soft);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11.5px;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}

.ai-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.ai-input {
  display: flex;
  gap: 6px;
  padding: 10px;
  border-top: 1px solid var(--line);
}

.ai-input input {
  flex: 1 1;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 12.5px;
  background: var(--panel-soft);
  color: var(--text);
}

/* ============== ICONS (CSS-only placeholders) ============== */

.ic {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #cbd5e1;
}

.ic.ic-parts {
  background: var(--primary);
}

.ic.ic-availability {
  background: var(--cyan);
}

.ic.ic-quality {
  background: var(--rose);
}

.ic.ic-oee {
  background: var(--violet);
}

.ic.ic-time {
  background: var(--orange);
}

.ic.ic-cycle {
  background: var(--green);
}

.ic.ic-perf {
  background: #6366f1;
}

.ic.ic-spindle {
  background: #94a3b8;
}

.ic.ic-tool {
  background: #fbbf24;
}

.ic.ic-tool {
  background: var(--yellow);
}

/* ============== CANVAS DEFAULTS ============== */

canvas {
  width: 100%;
  max-width: 100%;
}

.gauge {
  width: auto;
}

.donut {
  width: auto;
  color: red !important;
  text-align: center;
  font-size: 100px;
  font-weight: 700;
  color: var(--text);
}

/* ============================================================
   MACHINE DASHBOARD REDESIGN — Dark Industrial Theme
   Scoped to .mdash-* so it doesn't affect other views
   ============================================================ */

.mdash-view {
  display: grid;
  grid-gap: 14px;
  gap: 14px;
  padding: 0 18px 28px;
}

/* Controls bar */
.mdash-controls-bar {
  display: flex;
  flex-direction: column;
  /* gap: 10px; */
  background: var(--bg);
  /* border: 1px solid #f2f2f2; */
  border-radius: 10px;
  padding: 12px 0px;
}

.mdash-controls-row1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.mdash-controls-row2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  /* border-top: 1px solid #263048; */
  /* padding-top: 10px; */
}

.mdash-controls-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mdash-ctrl-label {
  font-size: 11px;
  color: #000000;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.mdash-select {
  background: var(--cyan);
  border: 1px solid #2a3142;
  color: #f1f5f9;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
  min-width: 130px;
  outline: none;
}

.mdash-select:focus {
  border-color: #3b82f6;
}

.mdash-btn-primary {
  padding: 7px 14px;
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.mdash-btn-primary:hover {
  opacity: 0.88;
}

.mdash-btn-ghost {
  padding: 7px 14px;
  background: transparent;
  color: #94a3b8;
  border: 1px solid #2a3142;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.mdash-btn-ghost:hover {
  background: #1a1f2e;
  color: #f1f5f9;
}

.mdash-time-filters {
  display: flex;
  background: #1a1f2e;
  border: 1px solid #2a3142;
  border-radius: 6px;
  overflow: hidden;
}

.mdash-time-filters button {
  padding: 6px 12px;
  background: none;
  border: none;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  white-space: nowrap;
}

.mdash-time-filters button:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.04);
}

.mdash-time-filters button.active {
  background: #3b82f6;
  color: #fff;
}

.mdash-sample-count {
  font-size: 12px;
  color: #64748b;
  font-family: ui-monospace, monospace;
}

/* Status bar */
.mdash-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: var(--panel);
  /* border: 1px solid #2a3142; */
  border-radius: 10px;
}

.mdash-machine-info {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.mdash-machine-id {
  font-family: ui-monospace, monospace;
  font-size: 14px;
  color: #94a3b8;
}

.mdash-program-tag {
  font-family: ui-monospace, monospace;
  font-size: 13px;
  color: #06b6d4;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.2);
  padding: 3px 10px;
  border-radius: 6px;
}

.mdash-status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mdash-status-indicator::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  animation: mdash-blink 1.5s infinite;
}

@keyframes mdash-blink {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: 0.3
  }
}

.mdash-status-running {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.mdash-status-idle {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.mdash-status-stopped {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.mdash-status-alarm {
  background: rgba(239, 68, 68, 0.18);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.mdash-status-disconnected {
  background: rgba(100, 116, 139, 0.14);
  color: #cbd5e1;
  border: 1px solid rgba(100, 116, 139, 0.35);
}

.mdash-status-right {
  display: flex;
  gap: 18px;
  font-size: 12px;
  color: #64748b;
}

.mdash-status-right strong {
  color: #f1f5f9;
  font-family: ui-monospace, monospace;
}

/* Section titles */
.mdash-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #64748b;
  font-weight: 600;
  margin-top: 4px;
}

.mdash-section-title::after {
  content: '';
  flex: 1 1;
  height: 1px;
  background: linear-gradient(90deg, #2a3142, transparent);
}

/* Cards */
.mdash-card {
  background: var(--panel);
  border: 1px solid #2a3142;
  border-radius: 10px;
  overflow: hidden;
}

.mdash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #2a3142;
}

.mdash-card-header h3 {
  font-size: 13px;
  font-weight: 600;
  color: #fafafa;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}

.mdash-card-meta {
  font-size: 11px;
  color: #ffffff;
}

.mdash-card-body {
  padding: 14px 16px;
}

.mdash-live-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #10b981;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.mdash-live-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  animation: mdash-pulse 2s infinite;
}

@keyframes mdash-pulse {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: 0.4
  }
}

/* OEE Gauges */
.mdash-gauge-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 20px;
  gap: 20px;
  padding: 20px;
  justify-items: center;
}

.mdash-gauge-item {
  text-align: center;
}

.mdash-gauge-wrapper {
  position: relative;
  width: 140px;
  height: 82px;
  margin: 0 auto 8px;
}

.mdash-gauge-svg {
  width: 140px;
  height: 80px;
  display: block;
}

.mdash-gauge-value {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  font-size: 26px;
  font-weight: 700;
  font-family: ui-monospace, monospace;
  color: #10b981;
}

.mdash-gauge-label {
  font-size: 11px;
  color: #f4f4f4;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

/* KPI Grids */
.mdash-kpi-grid-6 {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-gap: 12px;
  gap: 12px;
}

.mdash-kpi-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-gap: 12px;
  gap: 12px;
}

.mdash-kpi-card {
  background: var(--panel);
  border: 1px solid #2a3142;
  border-top: 3px solid var(--kc, #3b82f6);
  border-radius: 10px;
  padding: 14px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.mdash-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.1);
}

.mdash-kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.mdash-kpi-label {
  font-size: 11px;
  color: #ffffff;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mdash-kpi-icon {
  font-size: 18px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  color: var(--kc, #3b82f6);
}

.mdash-kpi-value {
  font-size: 26px;
  font-weight: 700;
  color: #f1f5f9;
  font-family: ui-monospace, monospace;
  line-height: 1;
  margin-bottom: 6px;
}

.mdash-kpi-sm {
  font-size: 20px;
}

.mdash-kpi-sub {
  font-size: 12px;
  color: #ffffff;
}

.mdash-kpi-sub strong {
  color: #94a3b8;
  font-weight: 600;
}

/* Layout grids */
.mdash-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 14px;
  gap: 14px;
}

.mdash-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-gap: 14px;
  gap: 14px;
}

/* Charts */
.mdash-chart-body {
  padding: 8px 8px 4px;
}

/* Machine State */
.mdash-state-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.mdash-state-badge.mdash-state-running {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.25);
}

.mdash-state-badge.mdash-state-idle {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.25);
}

.mdash-donut-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  padding: 10px 0 6px;
}

.mdash-axis-section {
  border-top: 1px solid #2a3142;
  padding-top: 12px;
  margin-top: 8px;
}

.mdash-axis-title {
  font-size: 11px;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
  font-weight: 600;
}

.mdash-axis-row {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.mdash-axis-box {
  text-align: center;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid #2a3142;
  border-radius: 8px;
  min-width: 68px;
}

.mdash-axis-label {
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 3px;
}

.mdash-axis-value {
  font-family: ui-monospace, monospace;
  font-size: 18px;
  font-weight: 700;
  color: #06b6d4;
}

/* Job Details */
.mdash-job-rows {
  display: grid;
  grid-gap: 0;
  gap: 0;
}

.mdash-job-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 16px;
  border-bottom: 1px solid #2a3142;
  font-size: 13px;
}

.mdash-job-row:last-child {
  border-bottom: none;
}

.mdash-job-row span {
  color: #ffffff;
  font-size: 12px;
}

.mdash-job-row strong {
  color: #f1f5f9;
  font-weight: 600;
}

/* Utility colors */
.mdash-cyan {
  color: #06b6d4 !important;
}

.mdash-green {
  color: #10b981 !important;
}

.mdash-amber {
  color: #f59e0b !important;
}

.mdash-red {
  color: #ef4444 !important;
}

.mdash-muted {
  color: #f9fcff !important;
}

.mdash-mono {
  font-family: ui-monospace, monospace;
}

/* Hourly Breakdown Table */
.mdash-table-scroll {
  overflow-y: auto;
  max-height: 380px;
}

.mdash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.mdash-table th {
  text-align: left;
  padding: 9px 12px;
  font-size: 11px;
  font-weight: 600;
  color: #fcfdff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid #2a3142;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
}

.mdash-table td {
  padding: 9px 12px;
  border-bottom: 1px solid #2a3142;
  color: #ffffff;
  font-family: ui-monospace, monospace;
}

.mdash-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
  color: #f1f5f9;
}

.mdash-table tr:last-child td {
  border-bottom: none;
}

/* Badges */
.mdash-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  font-family: inherit;
}

.mdash-badge-red {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.mdash-badge-amber {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}

.mdash-badge-green {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}

/* Tool Life */
.mdash-tool-rows {
  display: grid;
  grid-gap: 0;
  gap: 0;
}

.mdash-tool-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid #2a3142;
}

.mdash-tool-row:last-child {
  border-bottom: none;
}

.mdash-tool-info {
  min-width: 180px;
}

.mdash-tool-name {
  font-size: 13px;
  font-weight: 600;
  color: #f1f5f9;
}

.mdash-tool-meta {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

.mdash-progress-track {
  flex: 1 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
}

.mdash-progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s ease;
}

.mdash-progress-value {
  min-width: 44px;
  text-align: right;
  font-family: ui-monospace, monospace;
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
}

/* Primary Metrics Grid (22-tile data grid) */
.mdash-metrics-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-gap: 8px;
  gap: 8px;
}

.mdash-metric-tile {
  min-height: 58px;
  border: 1px solid #2a3142;
  border-left: 3px solid #3b82f6;
  border-radius: 8px;
  background: var(--bg);
  padding: 9px 12px;
  display: grid;
  align-content: center;
  grid-gap: 4px;
  gap: 4px;
  transition: border-color 0.15s;
}

.mdash-metric-tile:hover {
  border-color: #3b82f6;
}

.mdash-metric-tile.span2 {
  grid-column: span 2;
}

.mdash-metric-tile.accent-blue {
  border-left-color: #3b82f6;
}

.mdash-metric-tile.accent-cyan {
  border-left-color: #06b6d4;
}

.mdash-metric-tile.accent-green {
  border-left-color: #10b981;
}

.mdash-metric-tile.accent-amber {
  border-left-color: #f59e0b;
}

.mdash-metric-tile.accent-red {
  border-left-color: #ef4444;
}

.mdash-metric-tile.accent-purple {
  border-left-color: #8b5cf6;
}

.mdash-metric-label {
  font-size: 10.5px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.mdash-metric-value {
  font-size: clamp(14px, 1.2vw, 17px);
  font-weight: 800;
  color: #000000;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  overflow-wrap: anywhere;
}

.mdash-metric-value.amber {
  color: #f59e0b;
}

.mdash-metric-value.cyan {
  color: #06b6d4;
}

.mdash-metric-value.green {
  color: #10b981;
}

.mdash-metric-value.red {
  color: #ef4444;
}

/* Responsive overrides */
@media (max-width: 1400px) {
  .mdash-kpi-grid-6 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .mdash-gauge-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .mdash-metrics-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .mdash-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mdash-kpi-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {

  .mdash-kpi-grid-6,
  .mdash-kpi-grid-4,
  .mdash-grid-2,
  .mdash-grid-3 {
    grid-template-columns: 1fr;
  }

  .mdash-gauge-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .mdash-controls-row1,
  .mdash-controls-row2 {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ============== MEDIA ============== */

@media (max-width: 1280px) {
  .machine-kpi-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .machine-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .health-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kpi-row.five {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .live-prod-grid {
    grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.4fr);
  }

  .hourly-panel,
  .loss-panel {
    grid-column: span 1;
  }

  .alarm-summary,
  .alarm-analysis {
    min-height: 220px;
  }

  .cnc-info-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .cnc-black-bottom {
    grid-template-columns: repeat(4, minmax(112px, 1fr));
  }

  .cnc-hourly-dark {
    grid-column: 1 / -1;
  }
}

@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 64px 1fr;
  }

  .sidebar {
    padding: 12px 6px;
  }

  .brand-text,
  .nav-label,
  .nav-caret {
    display: none;
  }

  .nav-button {
    justify-content: center;
    padding: 9px 0;
  }

  .sidebar-toggle {
    margin-left: 0;
  }

  .machine-kpi-row,
  .machine-grid,
  .health-cards,
  .grid-2-1,
  .grid-2,
  .grid-3,
  .kpi-grid.four,
  .kpi-row.five,
  .metric-cards-grid {
    grid-template-columns: 1fr;
  }

  .ai-panel {
    width: 90vw;
    right: 5vw;
  }

  .live-prod-titlebar {
    align-items: stretch;
    flex-direction: column;
  }

  .live-prod-titlebar label {
    min-width: 0;
    width: 100%;
  }

  .live-kpi-row,
  .live-prod-grid,
  .cnc-info-grid,
  .cnc-black-bottom {
    grid-template-columns: 1fr;
  }

  .cnc-black-tile:first-child,
  .cnc-hourly-dark {
    grid-column: auto;
  }

  .hourly-bars {
    overflow-x: auto;
    grid-template-columns: repeat(12, minmax(42px, 1fr));
  }

  .target-bars {
    gap: 28px;
  }
}

/* ============== PLACEHOLDER GRID ============== */

.placeholder-grid {
  padding: 12px 16px;
}

/* ============== SETTINGS / SHIFTS ============== */

.shift-grid {
  display: grid;
  grid-gap: 14px;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  padding: 14px 16px;
}

.shift-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  display: grid;
  grid-gap: 12px;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

.shift-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.shift-card-header strong {
  font-size: 16px;
}

.shift-card-header p {
  font-size: 12px;
}

.shift-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 6px;
  gap: 6px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}

.shift-stats>div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12.5px;
}

.shift-stats span {
  color: var(--muted);
}

.shift-breaks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.break-chip {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--text-soft);
  border: 1px solid var(--line);
}

.break-chip.kind-tea {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.break-chip.kind-lunch {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}

.break-chip.kind-changeover {
  background: #ede9fe;
  color: #5b21b6;
  border-color: #ddd6fe;
}

.settings-rows {
  display: grid;
  grid-gap: 4px;
  gap: 4px;
  padding: 12px 16px;
}

.settings-rows .row {
  display: grid;
  grid-template-columns: 220px 1fr;
  grid-gap: 10px;
  gap: 10px;
  border-bottom: 1px dashed var(--line);
  padding: 8px 0;
  font-size: 13px;
}

.settings-rows .row span {
  color: var(--muted);
}

.settings-rows code,
.mono {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 12px;
  background: var(--panel-soft);
  padding: 1px 6px;
  border-radius: 4px;
}

/* shift indicator pill in titlebar */
.shift-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(90deg, #2563eb, #38bdf8);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}

.shift-pill strong {
  font-weight: 700;
}

.shift-pill .in-break {
  background: #fde68a;
  color: #78350f;
  padding: 1px 6px;
  border-radius: 999px;
}

