/* MESCam soft UI experiment — glass / soft tiles / Scrolltide-inspired motion */
:root {
  --soft-bg0: #f7f1f3;
  --soft-bg1: #fde8e4;
  --soft-bg2: #e8eefc;
  --soft-ink: #1c1917;
  --soft-muted: #78716c;
  --soft-line: rgba(255, 255, 255, 0.55);
  --soft-glass: rgba(255, 255, 255, 0.58);
  --soft-glass-strong: rgba(255, 255, 255, 0.78);
  --soft-accent: #fb7185;
  --soft-accent-2: #a78bfa;
  --soft-accent-ink: #fff;
  --soft-glow: rgba(251, 113, 133, 0.32);
  --soft-glow-2: rgba(167, 139, 250, 0.28);
  --soft-shadow-rgb: 28, 25, 23;
  --soft-shadow: 0 18px 48px rgba(var(--soft-shadow-rgb), 0.08);
  --soft-shadow-sm: 0 10px 28px rgba(var(--soft-shadow-rgb), 0.06);
  --soft-shadow-lift: 0 28px 64px rgba(var(--soft-shadow-rgb), 0.14);
  --soft-radius: 32px;
  --soft-radius-sm: 22px;
  --soft-radius-xs: 16px;
  --soft-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --soft-pink: #f472b6;
  --soft-coral: #fb7185;
  --soft-violet: #a78bfa;
  --soft-blue: #60a5fa;
  --soft-cyan: #22d3ee;
  --soft-dur: 420ms;
  --soft-blob-a: rgba(251, 113, 133, 0.45);
  --soft-blob-b: rgba(96, 165, 250, 0.35);
  --soft-surface-solid: #ffffff;
  --soft-mesh: none;
}

/* Background tint presets — Scrolltide-inspired + palette sync */
body[data-soft-tint="rose"] {
  --soft-bg0: #f7f1f3; --soft-blob-a: rgba(251, 113, 133, 0.48); --soft-blob-b: rgba(244, 114, 182, 0.28);
  --soft-accent: #fb7185; --soft-accent-2: #f472b6; --soft-glow: rgba(251, 113, 133, 0.36); --soft-glow-2: rgba(244, 114, 182, 0.28);
  --soft-shadow-rgb: 136, 48, 72;
  --soft-mesh: radial-gradient(ellipse 80% 60% at 20% 30%, rgba(251,113,133,0.22), transparent 55%),
    radial-gradient(ellipse 70% 50% at 80% 70%, rgba(190,24,93,0.12), transparent 50%);
}
body[data-soft-tint="lilac"] {
  --soft-bg0: #f3f0f8; --soft-blob-a: rgba(167, 139, 250, 0.42); --soft-blob-b: rgba(96, 165, 250, 0.28);
  --soft-accent: #8b5cf6; --soft-accent-2: #60a5fa; --soft-glow: rgba(139, 92, 246, 0.34); --soft-glow-2: rgba(96, 165, 250, 0.26);
  --soft-shadow-rgb: 76, 48, 128;
  --soft-mesh: radial-gradient(ellipse 75% 55% at 25% 25%, rgba(167,139,250,0.24), transparent 55%),
    radial-gradient(ellipse 65% 50% at 75% 75%, rgba(99,102,241,0.14), transparent 50%);
}
body[data-soft-tint="sky"] {
  --soft-bg0: #eef3f9; --soft-blob-a: rgba(56, 189, 248, 0.4); --soft-blob-b: rgba(99, 102, 241, 0.28);
  --soft-accent: #0ea5e9; --soft-accent-2: #6366f1; --soft-glow: rgba(14, 165, 233, 0.34); --soft-glow-2: rgba(99, 102, 241, 0.26);
  --soft-shadow-rgb: 36, 72, 120;
  --soft-mesh: radial-gradient(ellipse 80% 55% at 30% 20%, rgba(56,189,248,0.22), transparent 55%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(99,102,241,0.16), transparent 50%);
}
body[data-soft-tint="mint"] {
  --soft-bg0: #eef7f4; --soft-blob-a: rgba(45, 212, 191, 0.38); --soft-blob-b: rgba(52, 211, 153, 0.28);
  --soft-accent: #14b8a6; --soft-accent-2: #34d399; --soft-glow: rgba(20, 184, 166, 0.34); --soft-glow-2: rgba(52, 211, 153, 0.26);
  --soft-shadow-rgb: 24, 88, 72;
  --soft-mesh: radial-gradient(ellipse 75% 55% at 20% 40%, rgba(45,212,191,0.2), transparent 55%),
    radial-gradient(ellipse 65% 50% at 85% 65%, rgba(52,211,153,0.14), transparent 50%);
}
body[data-soft-tint="sand"] {
  --soft-bg0: #f6f1ea; --soft-blob-a: rgba(251, 146, 60, 0.35); --soft-blob-b: rgba(251, 113, 133, 0.22);
  --soft-accent: #f59e0b; --soft-accent-2: #fb7185; --soft-glow: rgba(245, 158, 11, 0.34); --soft-glow-2: rgba(251, 113, 133, 0.24);
  --soft-shadow-rgb: 120, 72, 24;
  --soft-mesh: radial-gradient(ellipse 70% 55% at 25% 30%, rgba(251,146,60,0.22), transparent 55%),
    radial-gradient(ellipse 60% 45% at 80% 70%, rgba(253,186,116,0.16), transparent 50%);
}
body[data-soft-tint="slate"] {
  --soft-bg0: #eef1f5; --soft-blob-a: rgba(100, 116, 139, 0.28); --soft-blob-b: rgba(59, 130, 246, 0.22);
  --soft-accent: #64748b; --soft-accent-2: #3b82f6; --soft-glow: rgba(100, 116, 139, 0.3); --soft-glow-2: rgba(59, 130, 246, 0.22);
  --soft-shadow-rgb: 48, 64, 88;
  --soft-mesh: radial-gradient(ellipse 70% 50% at 30% 25%, rgba(148,163,184,0.2), transparent 55%),
    radial-gradient(ellipse 60% 45% at 75% 75%, rgba(59,130,246,0.12), transparent 50%);
}
body[data-soft-tint="sunset"] {
  --soft-bg0: #faf0eb; --soft-blob-a: rgba(249, 115, 22, 0.4); --soft-blob-b: rgba(168, 85, 247, 0.28);
  --soft-accent: #f97316; --soft-accent-2: #a855f7; --soft-glow: rgba(249, 115, 22, 0.36); --soft-glow-2: rgba(168, 85, 247, 0.28);
  --soft-shadow-rgb: 140, 56, 40;
  --soft-mesh: radial-gradient(ellipse 85% 60% at 15% 80%, rgba(249,115,22,0.28), transparent 55%),
    radial-gradient(ellipse 70% 55% at 70% 20%, rgba(244,63,94,0.18), transparent 50%),
    radial-gradient(ellipse 50% 40% at 90% 60%, rgba(168,85,247,0.16), transparent 45%);
}
body[data-soft-tint="ocean"] {
  --soft-bg0: #e8f4f4; --soft-blob-a: rgba(13, 148, 136, 0.4); --soft-blob-b: rgba(6, 182, 212, 0.3);
  --soft-accent: #0d9488; --soft-accent-2: #06b6d4; --soft-glow: rgba(13, 148, 136, 0.36); --soft-glow-2: rgba(6, 182, 212, 0.28);
  --soft-shadow-rgb: 16, 72, 80;
  --soft-mesh: radial-gradient(ellipse 80% 55% at 20% 30%, rgba(13,148,136,0.24), transparent 55%),
    radial-gradient(ellipse 65% 50% at 85% 70%, rgba(6,182,212,0.18), transparent 50%);
}
body[data-soft-tint="neon"] {
  --soft-bg0: #f4f5f8; --soft-blob-a: rgba(236, 72, 153, 0.35); --soft-blob-b: rgba(34, 211, 238, 0.3);
  --soft-accent: #ec4899; --soft-accent-2: #22d3ee; --soft-glow: rgba(236, 72, 153, 0.38); --soft-glow-2: rgba(34, 211, 238, 0.3);
  --soft-shadow-rgb: 88, 24, 72;
  --soft-mesh: radial-gradient(ellipse 60% 50% at 20% 40%, rgba(236,72,153,0.2), transparent 50%),
    radial-gradient(ellipse 55% 45% at 75% 25%, rgba(132,204,22,0.16), transparent 45%),
    radial-gradient(ellipse 50% 40% at 80% 80%, rgba(34,211,238,0.18), transparent 45%);
}
body[data-soft-tint="aurora"] {
  --soft-bg0: #eef2f6; --soft-blob-a: rgba(52, 211, 153, 0.35); --soft-blob-b: rgba(139, 92, 246, 0.32);
  --soft-accent: #10b981; --soft-accent-2: #8b5cf6; --soft-glow: rgba(16, 185, 129, 0.34); --soft-glow-2: rgba(139, 92, 246, 0.3);
  --soft-shadow-rgb: 32, 64, 88;
  --soft-mesh: radial-gradient(ellipse 90% 40% at 30% 20%, rgba(52,211,153,0.22), transparent 50%),
    radial-gradient(ellipse 70% 50% at 70% 60%, rgba(139,92,246,0.18), transparent 50%),
    radial-gradient(ellipse 50% 35% at 50% 90%, rgba(56,189,248,0.12), transparent 45%);
}
body[data-soft-tint="mocha"] {
  --soft-bg0: #f5efe8; --soft-blob-a: rgba(180, 120, 80, 0.35); --soft-blob-b: rgba(214, 184, 150, 0.3);
  --soft-accent: #a16207; --soft-accent-2: #b45309; --soft-glow: rgba(161, 98, 7, 0.3); --soft-glow-2: rgba(180, 120, 80, 0.24);
  --soft-shadow-rgb: 88, 56, 32;
  --soft-mesh: radial-gradient(ellipse 75% 55% at 25% 35%, rgba(180,120,80,0.22), transparent 55%),
    radial-gradient(ellipse 60% 45% at 80% 70%, rgba(214,184,150,0.2), transparent 50%);
}
body[data-soft-tint="candy"] {
  --soft-bg0: #fdf2f8; --soft-blob-a: rgba(244, 114, 182, 0.4); --soft-blob-b: rgba(125, 211, 252, 0.32);
  --soft-accent: #f472b6; --soft-accent-2: #38bdf8; --soft-glow: rgba(244, 114, 182, 0.36); --soft-glow-2: rgba(56, 189, 248, 0.28);
  --soft-shadow-rgb: 120, 48, 96;
  --soft-mesh: radial-gradient(ellipse 65% 50% at 20% 30%, rgba(244,114,182,0.24), transparent 50%),
    radial-gradient(ellipse 55% 45% at 75% 25%, rgba(125,211,252,0.2), transparent 45%),
    radial-gradient(ellipse 50% 40% at 60% 85%, rgba(253,224,71,0.14), transparent 45%);
}

/* Dark soft theme */
body.soft-theme-dark {
  --soft-bg0: #0c0e14;
  --soft-ink: #f5f5f4;
  --soft-muted: #c4c0b8;
  --soft-line: rgba(255, 255, 255, 0.1);
  --soft-glass: rgba(22, 24, 32, 0.82);
  --soft-glass-strong: rgba(30, 33, 44, 0.94);
  --soft-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  --soft-shadow-sm: 0 10px 28px rgba(0, 0, 0, 0.35);
  --soft-shadow-lift: 0 28px 64px rgba(0, 0, 0, 0.55);
  --soft-surface-solid: #222633;
  --soft-blob-a: rgba(251, 113, 133, 0.22);
  --soft-blob-b: rgba(96, 165, 250, 0.18);
  --soft-shadow-rgb: 0, 0, 0;
  --c-ink: #f5f5f4;
  color-scheme: dark;
}
body.soft-theme-dark[data-soft-tint="rose"] {
  --soft-bg0: #140e12; --soft-blob-a: rgba(251, 113, 133, 0.28); --soft-blob-b: rgba(244, 114, 182, 0.16);
  --soft-accent: #fb7185; --soft-accent-2: #f472b6; --soft-glow: rgba(251, 113, 133, 0.4); --soft-glow-2: rgba(244, 114, 182, 0.3);
}
body.soft-theme-dark[data-soft-tint="lilac"] {
  --soft-bg0: #100e18; --soft-blob-a: rgba(167, 139, 250, 0.26); --soft-blob-b: rgba(96, 165, 250, 0.14);
  --soft-accent: #a78bfa; --soft-accent-2: #60a5fa; --soft-glow: rgba(167, 139, 250, 0.38); --soft-glow-2: rgba(96, 165, 250, 0.28);
}
body.soft-theme-dark[data-soft-tint="sky"] {
  --soft-bg0: #0c1018; --soft-blob-a: rgba(56, 189, 248, 0.22); --soft-blob-b: rgba(99, 102, 241, 0.16);
  --soft-accent: #38bdf8; --soft-accent-2: #818cf8; --soft-glow: rgba(56, 189, 248, 0.36); --soft-glow-2: rgba(129, 140, 248, 0.28);
}
body.soft-theme-dark[data-soft-tint="mint"] {
  --soft-bg0: #0c1412; --soft-blob-a: rgba(45, 212, 191, 0.2); --soft-blob-b: rgba(52, 211, 153, 0.14);
  --soft-accent: #2dd4bf; --soft-accent-2: #34d399; --soft-glow: rgba(45, 212, 191, 0.34); --soft-glow-2: rgba(52, 211, 153, 0.26);
}
body.soft-theme-dark[data-soft-tint="sand"] {
  --soft-bg0: #14110c; --soft-blob-a: rgba(251, 146, 60, 0.2); --soft-blob-b: rgba(251, 113, 133, 0.12);
  --soft-accent: #fb923c; --soft-accent-2: #fb7185; --soft-glow: rgba(251, 146, 60, 0.34); --soft-glow-2: rgba(251, 113, 133, 0.24);
}
body.soft-theme-dark[data-soft-tint="slate"] {
  --soft-bg0: #0e1116; --soft-blob-a: rgba(148, 163, 184, 0.18); --soft-blob-b: rgba(59, 130, 246, 0.14);
  --soft-accent: #94a3b8; --soft-accent-2: #60a5fa; --soft-glow: rgba(148, 163, 184, 0.3); --soft-glow-2: rgba(96, 165, 250, 0.24);
}
body.soft-theme-dark[data-soft-tint="sunset"] {
  --soft-bg0: #160e0c; --soft-blob-a: rgba(249, 115, 22, 0.24); --soft-blob-b: rgba(168, 85, 247, 0.18);
  --soft-accent: #fb923c; --soft-accent-2: #c084fc; --soft-glow: rgba(249, 115, 22, 0.38); --soft-glow-2: rgba(168, 85, 247, 0.3);
}
body.soft-theme-dark[data-soft-tint="ocean"] {
  --soft-bg0: #0a1214; --soft-blob-a: rgba(13, 148, 136, 0.22); --soft-blob-b: rgba(6, 182, 212, 0.16);
  --soft-accent: #2dd4bf; --soft-accent-2: #22d3ee; --soft-glow: rgba(45, 212, 191, 0.36); --soft-glow-2: rgba(34, 211, 238, 0.28);
}
body.soft-theme-dark[data-soft-tint="neon"] {
  --soft-bg0: #0a0a10; --soft-blob-a: rgba(236, 72, 153, 0.28); --soft-blob-b: rgba(34, 211, 238, 0.22);
  --soft-accent: #f472b6; --soft-accent-2: #22d3ee; --soft-glow: rgba(236, 72, 153, 0.42); --soft-glow-2: rgba(34, 211, 238, 0.34);
}
body.soft-theme-dark[data-soft-tint="aurora"] {
  --soft-bg0: #080c12; --soft-blob-a: rgba(52, 211, 153, 0.22); --soft-blob-b: rgba(139, 92, 246, 0.2);
  --soft-accent: #34d399; --soft-accent-2: #a78bfa; --soft-glow: rgba(52, 211, 153, 0.36); --soft-glow-2: rgba(167, 139, 250, 0.32);
}
body.soft-theme-dark[data-soft-tint="mocha"] {
  --soft-bg0: #120e0a; --soft-blob-a: rgba(180, 120, 80, 0.2); --soft-blob-b: rgba(214, 184, 150, 0.12);
  --soft-accent: #d97706; --soft-accent-2: #b45309; --soft-glow: rgba(217, 119, 6, 0.32); --soft-glow-2: rgba(180, 120, 80, 0.24);
}
body.soft-theme-dark[data-soft-tint="candy"] {
  --soft-bg0: #140c12; --soft-blob-a: rgba(244, 114, 182, 0.24); --soft-blob-b: rgba(125, 211, 252, 0.16);
  --soft-accent: #f9a8d4; --soft-accent-2: #7dd3fc; --soft-glow: rgba(244, 114, 182, 0.4); --soft-glow-2: rgba(125, 211, 252, 0.3);
}

/* Derived tokens — declared on body so they pick up the tint's --soft-accent, not :root's */
body {
  --soft-accent-soft: color-mix(in srgb, var(--soft-accent) 14%, transparent);
  --soft-accent-line: color-mix(in srgb, var(--soft-accent) 38%, transparent);
  --soft-hover: rgba(255, 255, 255, 0.72);
  --soft-focus-ring: 0 0 0 3px color-mix(in srgb, var(--soft-accent) 45%, transparent);
}
body.soft-theme-dark {
  --soft-hover: rgba(148, 163, 184, 0.12);
  --soft-focus-ring: 0 0 0 3px color-mix(in srgb, var(--soft-accent) 60%, transparent);
}

:is(button, a, [role="button"], [tabindex], summary):focus-visible {
  outline: none;
  box-shadow: var(--soft-focus-ring), var(--soft-shadow-sm);
}
:where(input, select, textarea):focus-visible {
  outline: none;
  box-shadow: var(--soft-focus-ring);
}

/* Motion kept; filter:blur removed — blurring a board of decoded SOP photos cooked the GPU */
@keyframes soft-fade-up {
  from { opacity: 0; transform: translateY(18px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
@keyframes soft-shell-in {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: none; }
}
@keyframes soft-modal-in {
  from { opacity: 0; transform: translateY(24px) scale(0.94); }
  to { opacity: 1; transform: none; }
}
@keyframes soft-tile-pop {
  0% { transform: scale(0.92); }
  60% { transform: scale(1.04); }
  100% { transform: scale(1); }
}
@keyframes soft-blob {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(2%, -3%, 0) scale(1.05); }
}

html, body {
  background: var(--soft-mesh), var(--soft-bg0) !important;
  background-attachment: fixed !important;
  color: var(--soft-ink) !important;
  transition: background-color 320ms ease;
}

body::before,
body::after {
  content: '';
  position: fixed;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  filter: blur(40px);
  animation: soft-blob 14s ease-in-out infinite;
}
body::before {
  width: min(70vw, 720px);
  height: min(70vw, 720px);
  top: -18%;
  right: -8%;
  background: radial-gradient(circle, var(--soft-blob-a) 0%, transparent 70%);
}
body::after {
  width: min(55vw, 560px);
  height: min(55vw, 560px);
  bottom: -12%;
  left: -6%;
  background: radial-gradient(circle, var(--soft-blob-b) 0%, transparent 70%);
  animation-delay: -4s;
}

.app-container {
  position: relative;
  z-index: 1;
  background: transparent !important;
  padding: 14px;
  gap: 14px;
  animation: soft-shell-in 560ms var(--soft-ease) both;
}

/* ——— Glass sidebar ——— */
.sidebar {
  width: 292px !important;
  background: var(--soft-glass) !important;
  color: var(--soft-ink) !important;
  border: 1px solid rgba(255, 255, 255, 0.7) !important;
  border-radius: var(--soft-radius) !important;
  box-shadow: var(--soft-shadow) !important;
  backdrop-filter: blur(22px) saturate(1.2);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  padding: 18px 14px 14px !important;
  transition: width 320ms var(--soft-ease), opacity 280ms ease, padding 280ms ease, transform 320ms var(--soft-ease);
  min-height: 0;
}
body.soft-theme-dark .sidebar {
  border-color: rgba(255, 255, 255, 0.08) !important;
}
.sidebar-brand-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.soft-icon-btn {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--soft-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--soft-shadow-sm);
  transition: transform 180ms var(--soft-ease), background 180ms ease;
  font-family: inherit;
  padding: 0;
}
.soft-icon-btn .material-symbols-rounded { font-size: 20px; }
.soft-icon-btn:hover {
  transform: translateY(-1px);
  background: var(--soft-surface-solid);
  box-shadow: 0 10px 24px var(--soft-glow), 0 0 0 1px rgba(255, 255, 255, 0.55);
  filter: brightness(1.03);
}
.soft-icon-btn:active {
  transform: translateY(0) scale(0.96);
  box-shadow: 0 4px 12px var(--soft-glow);
}
.soft-sidebar-reopen:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px var(--soft-glow), 0 0 0 1px rgba(255, 255, 255, 0.55);
  filter: brightness(1.03);
}
.soft-sidebar-reopen:active { transform: translateY(0) scale(0.96); }
body.soft-theme-dark .soft-icon-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #f5f5f4;
}

/* Collapse sidebar */
body.sidebar-collapsed .sidebar {
  width: 0 !important;
  min-width: 0 !important;
  padding: 0 !important;
  opacity: 0;
  pointer-events: none;
  border: none !important;
  margin: 0 !important;
  overflow: hidden !important;
  transform: translateX(-12px);
}
.soft-sidebar-reopen {
  display: none;
  position: fixed;
  top: 22px;
  left: 18px;
  z-index: 80;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 16px;
  background: var(--soft-glass-strong);
  color: var(--soft-ink);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(16px);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: transform 180ms var(--soft-ease), box-shadow 200ms ease, filter 160ms ease;
}
.soft-sidebar-reopen .material-symbols-rounded { font-size: 22px; }
body.sidebar-collapsed .soft-sidebar-reopen { display: inline-flex; }

.sidebar-brand {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 6px 12px !important;
  border-bottom: none !important;
  margin-bottom: 0 !important;
}
.sidebar-brand .sidebar-mescam .mes { color: var(--soft-ink) !important; }
.sidebar-brand .sidebar-mescam .suf { color: #3b82f6 !important; }
.sidebar-brand .tag {
  color: var(--soft-muted) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  max-width: 160px;
}

.sidebar-factory {
  display: none !important; /* metrics replace chip density */
}

.sidebar-user {
  background: transparent !important;
  border: none !important;
  margin: 0 !important;
  padding: 0 !important;
  width: auto;
  flex: 0 0 auto;
}
.sidebar-user .av {
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  background: linear-gradient(145deg, #fb7185, #a78bfa) !important;
  box-shadow: 0 10px 24px rgba(244, 114, 182, 0.35);
}
.sidebar-user .meta { display: none; }

.soft-side-metrics {
  display: grid;
  gap: 10px;
  margin: 8px 6px 16px;
}
.soft-side-metrics .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.soft-side-metrics .lbl {
  font-size: 12px;
  font-weight: 700;
  color: var(--soft-muted);
}
.soft-side-metrics .val {
  font-size: 18px;
  font-weight: 800;
  color: var(--soft-ink);
  letter-spacing: -0.03em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.soft-side-metrics .val .arrow {
  font-size: 14px;
  font-weight: 900;
}
.soft-side-metrics .val.up .arrow { color: #10b981; }
.soft-side-metrics .val.down .arrow { color: #f43f5e; }

.soft-quick-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--soft-muted);
  padding: 0 8px 8px;
}

.soft-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 0 4px 12px;
}
.soft-tile {
  aspect-ratio: 1;
  border: 0;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.35);
  color: #a8a29e;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition:
    transform var(--soft-dur) var(--soft-ease),
    background var(--soft-dur) var(--soft-ease),
    box-shadow var(--soft-dur) var(--soft-ease),
    color var(--soft-dur) var(--soft-ease);
  font-family: inherit;
  padding: 8px 4px;
}
.soft-tile .material-symbols-rounded { font-size: 22px; }
.soft-tile-dash { color: #3b82f6; }
.soft-tile-dash .material-symbols-rounded { color: #2563eb; }
.soft-tile-aat { color: #e11d48; }
.soft-tile-aat .material-symbols-rounded { color: #e11d48; }
.soft-tile-equip { color: #0284c7; }
.soft-tile-equip .material-symbols-rounded { color: #0284c7; }
.soft-tile-route { color: #059669; }
.soft-tile-route .material-symbols-rounded { color: #059669; }
.soft-tile-people { color: #7c3aed; }
.soft-tile-people .material-symbols-rounded { color: #7c3aed; }
.soft-tile-orders { color: #0d9488; }
.soft-tile-orders .material-symbols-rounded { color: #0d9488; }
.soft-tile.active.soft-tile-dash { color: #1d4ed8; box-shadow: 0 18px 40px rgba(37,99,235,0.28), var(--soft-shadow-lift); }
.soft-tile.active.soft-tile-aat { color: #be123c; box-shadow: 0 18px 40px rgba(225,29,72,0.28), var(--soft-shadow-lift); }
.soft-tile.active.soft-tile-equip { color: #0369a1; box-shadow: 0 18px 40px rgba(2,132,199,0.28), var(--soft-shadow-lift); }
.soft-tile.active.soft-tile-route { color: #047857; box-shadow: 0 18px 40px rgba(5,150,105,0.28), var(--soft-shadow-lift); }
.soft-tile.active.soft-tile-people { color: #6d28d9; box-shadow: 0 18px 40px rgba(124,58,237,0.28), var(--soft-shadow-lift); }
.soft-tile.active.soft-tile-orders { color: #0f766e; box-shadow: 0 18px 40px rgba(13,148,136,0.28), var(--soft-shadow-lift); }
.soft-tile .t {
  font-size: 10px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 1;
  max-height: 28px;
  color: inherit;
}
.soft-tile:hover {
  transform: translateY(-3px) scale(1.03);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 28px var(--soft-glow), var(--soft-shadow-sm);
}
.soft-tile.active {
  background: #fff;
  box-shadow: 0 18px 40px var(--soft-glow), var(--soft-shadow-lift);
  transform: scale(1.06);
  animation: soft-tile-pop 420ms var(--soft-ease);
  z-index: 2;
}
.soft-tile.active .t {
  color: var(--soft-ink);
}
.soft-tile.active .material-symbols-rounded {
  filter: drop-shadow(0 2px 5px color-mix(in srgb, currentColor 45%, transparent));
}

.nav-menu {
  gap: 2px !important;
  padding: 0 2px !important;
}
.nav-category {
  color: #a8a29e !important;
  padding: 12px 10px 4px !important;
  letter-spacing: 0.08em !important;
}
.nav-btn {
  color: #78716c !important;
  border-radius: 16px !important;
  padding: 8px 10px !important;
  background: transparent !important;
  border: none !important;
}
.nav-btn:hover {
  background: rgba(255, 255, 255, 0.72) !important;
  color: var(--soft-ink) !important;
  transform: translateX(3px) !important;
  box-shadow: 0 10px 24px var(--soft-glow) !important;
}
.nav-btn:hover .nav-icon-wrap {
  transform: scale(1.06);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--soft-accent) 35%, transparent);
}
.nav-btn.active {
  background: #fff !important;
  color: var(--soft-ink) !important;
  box-shadow: var(--soft-shadow-sm) !important;
}
.nav-btn.active::before {
  background: linear-gradient(180deg, #fb7185, #a78bfa) !important;
}
.nav-icon-wrap {
  background: rgba(255, 255, 255, 0.55) !important;
  color: #78716c !important;
  border-radius: 12px !important;
}
.nav-accent-blue .nav-icon-wrap { color: #3b82f6 !important; background: rgba(59, 130, 246, 0.12) !important; }
.nav-accent-red .nav-icon-wrap { color: #e11d48 !important; background: rgba(225, 29, 72, 0.1) !important; }
.nav-accent-green .nav-icon-wrap { color: #059669 !important; background: rgba(5, 150, 105, 0.1) !important; }
.nav-accent-cyan .nav-icon-wrap { color: #0284c7 !important; background: rgba(2, 132, 199, 0.1) !important; }
.nav-accent-violet .nav-icon-wrap { color: #7c3aed !important; background: rgba(124, 58, 237, 0.12) !important; }
.nav-accent-amber .nav-icon-wrap { color: #d97706 !important; background: rgba(245, 158, 11, 0.14) !important; }
.nav-accent-teal .nav-icon-wrap { color: #0d9488 !important; background: rgba(13, 148, 136, 0.12) !important; }
.nav-accent-indigo .nav-icon-wrap { color: #4f46e5 !important; background: rgba(79, 70, 229, 0.12) !important; }
.nav-accent-rose .nav-icon-wrap { color: #e11d48 !important; background: rgba(244, 63, 94, 0.12) !important; }
.nav-accent-slate .nav-icon-wrap { color: #64748b !important; background: rgba(100, 116, 139, 0.14) !important; }
.nav-accent-stone .nav-icon-wrap { color: #78716c !important; background: rgba(120, 113, 108, 0.14) !important; }
.nav-btn.active .nav-icon-wrap {
  background: linear-gradient(145deg, #a78bfa, #60a5fa) !important;
  color: #fff !important;
}
.sidebar .mes-mark .mes,
.sidebar .nav-btn.active .mes-mark .mes,
.sidebar .nav-btn:hover .mes-mark .mes {
  color: var(--soft-ink) !important;
}
.sidebar .mes-mark--mescam .suf,
.sidebar .nav-btn.active .mes-mark--mescam .suf { color: #3b82f6 !important; }
.sidebar .mes-mark--mesaat .suf,
.sidebar .nav-btn.active .mes-mark--mesaat .suf { color: #e11d48 !important; }
.sidebar .mes-mark--mesequip .suf,
.sidebar .nav-btn.active .mes-mark--mesequip .suf { color: #0284c7 !important; }
.mes-mark--mesroute .suf { color: #059669 !important; }
.mes-mark--mescore .suf { color: #0d9488 !important; }
.mes-mark--mesmap .suf { color: #ea580c !important; }
.ph-brand-line {
  display: flex !important;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px 14px;
}
.ph-brand-sub {
  font-family: var(--brand-font, 'Orbitron', sans-serif) !important;
  font-weight: 700 !important;
  font-size: 0.72em !important;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--soft-muted) !important;
}
.sidebar .mes-mark--tech .suf,
.sidebar .nav-btn.active .mes-mark--tech .suf { color: #7c3aed !important; }
.nav-item-sub, .mesaat-sub { color: #a8a29e !important; }

/* Sticky foot: apps popover + auth — не мешает скроллу nav */
.soft-side-foot {
  flex-shrink: 0;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.45);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  z-index: 5;
}
body.soft-theme-dark .soft-side-foot {
  border-top-color: rgba(255, 255, 255, 0.08);
}
.soft-apps-pop {
  position: relative;
}
.soft-apps-pop > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: var(--soft-shadow-sm);
  color: var(--soft-ink);
  font-weight: 800;
  font-size: 12px;
  transition: background 180ms ease, transform 180ms var(--soft-ease);
}
.soft-apps-pop > summary::-webkit-details-marker { display: none; }
.soft-apps-pop > summary:hover {
  background: var(--soft-surface-solid);
  transform: translateY(-1px);
}
.soft-apps-pop > summary img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}
.soft-apps-pop > summary .chev {
  margin-left: auto;
  font-size: 18px;
  color: var(--soft-muted);
  transition: transform 220ms var(--soft-ease);
}
.soft-apps-pop[open] > summary .chev { transform: rotate(180deg); }
.soft-apps-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 8px);
  padding: 8px;
  border-radius: 18px;
  background: var(--soft-glass-strong);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: var(--soft-shadow-lift);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: soft-fade-up 280ms var(--soft-ease) both;
  z-index: 20;
}
.soft-apps-panel a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  border-radius: 14px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.35);
  color: var(--soft-ink);
  transition: background 160ms ease, transform 160ms ease;
}
.soft-apps-panel a:hover {
  background: var(--soft-surface-solid);
  transform: translateX(2px);
}
.soft-apps-panel a.on {
  background: var(--soft-surface-solid);
  box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.35);
}
.soft-apps-panel a img { width: 32px; height: 32px; border-radius: 10px; }
.soft-apps-panel .sw-title { font-size: 12px; font-weight: 800; }
.soft-apps-panel .sw-sub { font-size: 10px; font-weight: 600; color: var(--soft-muted); margin-top: 2px; }

.sidebar .btn-secondary {
  background: rgba(255, 255, 255, 0.55) !important;
  color: var(--soft-ink) !important;
  border: 1px solid rgba(255, 255, 255, 0.8) !important;
  border-radius: 999px !important;
  box-shadow: var(--soft-shadow-sm);
}
body.soft-theme-dark .sidebar .btn-secondary {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}
body.soft-theme-dark .nav-btn.active {
  background: rgba(255, 255, 255, 0.1) !important;
}
body.soft-theme-dark .soft-tile {
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
body.soft-theme-dark .soft-tile:hover {
  background: rgba(148, 163, 184, 0.14);
}
body.soft-theme-dark .soft-tile .t { color: #cbd5e1; }
body.soft-theme-dark .soft-tile-dash .material-symbols-rounded { color: #60a5fa; }
body.soft-theme-dark .soft-tile-aat .material-symbols-rounded { color: #fb7185; }
body.soft-theme-dark .soft-tile-equip .material-symbols-rounded { color: #38bdf8; }
body.soft-theme-dark .soft-tile-route .material-symbols-rounded { color: #34d399; }
body.soft-theme-dark .soft-tile-people .material-symbols-rounded { color: #a78bfa; }
body.soft-theme-dark .soft-tile-orders .material-symbols-rounded { color: #2dd4bf; }
body.soft-theme-dark .soft-tile.active {
  background: color-mix(in srgb, currentColor 22%, #1c1f2a);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 45%, transparent), 0 18px 40px rgba(0, 0, 0, 0.45);
}
body.soft-theme-dark .soft-tile.active .t { color: #f8fafc; }
body.soft-theme-dark .soft-tile-dash { color: #60a5fa; }
body.soft-theme-dark .soft-tile-aat { color: #fb7185; }
body.soft-theme-dark .soft-tile-equip { color: #38bdf8; }
body.soft-theme-dark .soft-tile-route { color: #34d399; }
body.soft-theme-dark .soft-tile-people { color: #a78bfa; }
body.soft-theme-dark .soft-tile-orders { color: #2dd4bf; }
body.soft-theme-dark .soft-pulse,
body.soft-theme-dark .card,
body.soft-theme-dark .dash-stat-box {
  background: var(--soft-glass-strong) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: var(--soft-ink);
}
body.soft-theme-dark .soft-collapse > summary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--soft-ink);
}
body.soft-theme-dark .ph-actions .btn,
body.soft-theme-dark .ph-actions .btn-secondary {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #f5f5f4 !important;
}
body.soft-theme-dark .ph-actions .btn-primary {
  background: linear-gradient(135deg, var(--soft-accent), var(--soft-accent-2)) !important;
  color: #fff !important;
}
body.soft-theme-dark .ph-actions .btn-danger {
  background: linear-gradient(135deg, #fb7185, #f43f5e) !important;
  color: #fff !important;
}
body.soft-theme-dark .ph-actions .btn-success {
  background: linear-gradient(135deg, #34d399, #059669) !important;
  color: #fff !important;
}
body.soft-theme-dark .soft-apps-pop > summary,
body.soft-theme-dark .soft-apps-panel a {
  background: rgba(255, 255, 255, 0.06);
}
body.soft-theme-dark .soft-apps-panel {
  border-color: rgba(255, 255, 255, 0.1);
}

/* Tint swatches in settings */
.soft-tint-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 14px;
}
.soft-tint-swatch {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 2px solid transparent;
  cursor: pointer;
  box-shadow: var(--soft-shadow-sm);
  padding: 0;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.soft-tint-swatch:hover { transform: scale(1.08); }
.soft-tint-swatch[data-tint="rose"] { background: linear-gradient(135deg, #fda4af, #f7f1f3); }
.soft-tint-swatch[data-tint="lilac"] { background: linear-gradient(135deg, #c4b5fd, #f3f0f8); }
.soft-tint-swatch[data-tint="sky"] { background: linear-gradient(135deg, #7dd3fc, #eef3f9); }
.soft-tint-swatch[data-tint="mint"] { background: linear-gradient(135deg, #6ee7b7, #eef7f4); }
.soft-tint-swatch[data-tint="sand"] { background: linear-gradient(135deg, #fdba74, #f6f1ea); }
.soft-tint-swatch[data-tint="slate"] { background: linear-gradient(135deg, #94a3b8, #eef1f5); }
.soft-tint-swatch[data-tint="sunset"] { background: linear-gradient(135deg, #fb923c, #c084fc 55%, #fda4af); }
.soft-tint-swatch[data-tint="ocean"] { background: linear-gradient(135deg, #2dd4bf, #06b6d4, #0e7490); }
.soft-tint-swatch[data-tint="neon"] { background: linear-gradient(135deg, #ec4899, #a3e635 45%, #22d3ee); }
.soft-tint-swatch[data-tint="aurora"] { background: linear-gradient(135deg, #34d399, #818cf8 50%, #0ea5e9); }
.soft-tint-swatch[data-tint="mocha"] { background: linear-gradient(135deg, #b45309, #d6b896, #f5efe8); }
.soft-tint-swatch[data-tint="candy"] { background: linear-gradient(135deg, #f9a8d4, #7dd3fc 50%, #fde047); }
.soft-tint-swatch.on {
  border-color: var(--soft-accent);
  box-shadow: 0 0 0 3px var(--soft-glow);
}
.soft-theme-toggle {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  margin-bottom: 12px;
}
.soft-theme-toggle button {
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 800;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  background: transparent;
  color: var(--soft-muted);
}
.soft-theme-toggle button.on {
  background: var(--soft-surface-solid);
  color: var(--soft-ink);
  box-shadow: var(--soft-shadow-sm);
}

/* Theme icon, top-right of the window */
.soft-theme-dock {
  position: fixed;
  top: 16px;
  right: 18px;
  left: auto;
  bottom: auto;
  z-index: 9002;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.soft-theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  font-family: inherit;
  cursor: pointer;
  color: var(--soft-ink);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.14), inset 0 1px 0 rgba(255,255,255,0.8);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  transition: transform 180ms var(--soft-ease), box-shadow 180ms ease;
}
.soft-theme-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px var(--soft-glow);
}
.soft-theme-btn .material-symbols-rounded {
  font-size: 20px;
  color: var(--soft-accent);
}
.soft-theme-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(340px, calc(100vw - 32px));
  max-height: min(70vh, 520px);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  padding: 14px 14px 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.18), inset 0 1px 0 rgba(255,255,255,0.85);
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
}
.soft-theme-panel[hidden] { display: none !important; }
.soft-theme-panel::-webkit-scrollbar { width: 0; height: 0; display: none; }
.soft-theme-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.soft-theme-panel-head strong {
  font-size: 14px;
  font-weight: 900;
  color: var(--soft-ink);
}
.soft-theme-panel-x {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(255,255,255,0.7);
  color: var(--soft-muted);
  box-shadow: var(--soft-shadow-sm);
}
.soft-theme-panel label {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--soft-muted);
  margin: 10px 0 6px;
}
.soft-motion-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
  color: var(--soft-ink);
  cursor: pointer;
}
.soft-motion-row input { width: 16px; height: 16px; min-height: 0; margin: 0; accent-color: var(--soft-accent); }
.soft-theme-panel-hint {
  margin-top: 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--soft-muted);
  line-height: 1.4;
}
.soft-theme-panel .soft-theme-font,
.soft-theme-panel select#setUiFontDock {
  width: 100%;
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.88);
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--soft-ink);
  font-family: inherit;
  box-sizing: border-box;
}
body.soft-theme-dark .soft-theme-panel .soft-theme-font,
body.soft-theme-dark .soft-theme-panel select#setUiFontDock {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(255, 255, 255, 0.14);
  color: #f8fafc;
}
.soft-theme-panel .soft-skin-toggle {
  margin-bottom: 4px;
}
body.soft-theme-dark .soft-theme-btn,
body.soft-theme-dark .soft-theme-panel {
  background: rgba(32, 34, 48, 0.78);
  border-color: rgba(255, 255, 255, 0.12);
  color: #f5f5f4;
}
body.soft-theme-dark .soft-theme-panel-head strong { color: #f8fafc; }
@media (max-width: 700px) {
  .soft-theme-dock { top: max(10px, env(safe-area-inset-top)); right: 12px; }
}

/* Shell scrollbars stay usable, the bars themselves stay hidden */
html, body, .sidebar, .content-area, .tab-content, .content {
  scrollbar-width: none;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar,
.sidebar::-webkit-scrollbar,
.content-area::-webkit-scrollbar,
.tab-content::-webkit-scrollbar,
.content::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}
.sidebar { overflow-x: hidden; }

/* ——— Tab morph (View Transitions, switchTab in renderer.js) ——— */
@media (min-width: 901px) {
  .content-area { view-transition-name: mes-content; }
}
::view-transition-old(root),
::view-transition-new(root) { animation: none; }
::view-transition-group(mes-content) { animation-duration: 420ms; animation-timing-function: var(--soft-ease); }
::view-transition-old(mes-content) {
  animation: mes-vt-out 200ms ease both;
}
::view-transition-new(mes-content) {
  animation: soft-fade-up 460ms var(--soft-ease) both;
}
@keyframes mes-vt-out {
  to { opacity: 0; transform: translateY(-10px) scale(0.99); }
}
@media (prefers-reduced-motion: reduce) {
  body::before,
  body::after { animation: none !important; }
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}
html.mes-vt .tab-content,
html.mes-vt .tab-content.active,
html.mes-vt .tab-content.soft-reveal { animation: none !important; }

/* ——— Main content ——— */
.content-area {
  background: transparent !important;
  border-radius: var(--soft-radius);
  overflow: hidden;
  background-image: none !important;
}
.content-area .tab-content {
  padding: 18px 22px 88px !important;
}
.content-area .tab-content.active {
  animation: soft-fade-up 480ms var(--soft-ease) both;
}
.tab-content {
  animation: soft-fade-up var(--soft-dur) var(--soft-ease) both;
}
.tab-content.soft-reveal {
  animation: soft-fade-up 480ms var(--soft-ease) both;
}

.page-header-dark {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 14px !important;
  flex-wrap: wrap !important;
  background: rgba(255, 255, 255, 0.36) !important;
  border: 1px solid rgba(255, 255, 255, 0.58) !important;
  box-shadow:
    0 14px 36px rgba(15, 23, 42, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.72) !important;
  backdrop-filter: blur(18px) saturate(1.4) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.4) !important;
  padding: 14px 16px !important;
  margin-bottom: 14px !important;
  border-radius: 22px !important;
}
.page-header-dark::before { display: none !important; }
body.soft-theme-dark .page-header-dark {
  background: rgba(30, 34, 48, 0.55) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255,255,255,0.08) !important;
}
.page-header-dark .ph-kicker {
  color: var(--soft-muted) !important;
  letter-spacing: 0.04em !important;
}
.page-header-dark .ph-title {
  font-size: 34px !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
  color: var(--soft-ink) !important;
}
.page-header-dark .ph-desc {
  color: var(--soft-muted) !important;
  max-width: 42ch;
  font-size: 14px !important;
  font-weight: 600 !important;
}
.ph-actions .btn {
  border-radius: 999px !important;
  background: #fff !important;
  color: var(--soft-ink) !important;
  border: none !important;
  box-shadow: var(--soft-shadow-sm) !important;
}
.ph-actions .btn-secondary .material-symbols-rounded {
  color: var(--soft-accent);
}

.btn {
  border-radius: 999px !important;
}
.btn-primary {
  background: linear-gradient(135deg, var(--soft-accent), var(--soft-accent-2)) !important;
  color: #fff !important;
  box-shadow: 0 14px 32px var(--soft-glow) !important;
  border: none !important;
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.9) !important;
  border-radius: 999px !important;
  box-shadow: var(--soft-shadow-sm);
}
.btn-danger {
  background: linear-gradient(135deg, #fb7185, #f43f5e) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 999px !important;
}
.btn-success {
  background: linear-gradient(135deg, #34d399, #059669) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 999px !important;
}
.btn-primary,
.btn-danger,
.btn-success,
.btn.btn-primary,
.btn.btn-danger,
.btn.btn-success {
  color: #fff !important;
}
.btn-primary .material-symbols-rounded,
.btn-danger .material-symbols-rounded,
.btn-success .material-symbols-rounded {
  color: #fff !important;
}
.ph-actions .btn-primary,
.ph-actions .btn-danger,
.ph-actions .btn-success {
  background: linear-gradient(135deg, var(--soft-accent), var(--soft-accent-2)) !important;
  color: #fff !important;
  box-shadow: 0 12px 28px var(--soft-glow) !important;
}
.ph-actions .btn-danger {
  background: linear-gradient(135deg, #fb7185, #f43f5e) !important;
}
.ph-actions .btn-success {
  background: linear-gradient(135deg, #34d399, #059669) !important;
}
.ph-actions .btn-primary .material-symbols-rounded,
.ph-actions .btn-danger .material-symbols-rounded,
.ph-actions .btn-success .material-symbols-rounded {
  color: #fff !important;
}
.btn.soft-mech-call,
.btn-danger.soft-mech-call {
  background: #e11d48 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 999px !important;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.92),
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 14px 32px rgba(225, 29, 72, 0.38) !important;
}
.btn.soft-mech-call:hover,
.btn-danger.soft-mech-call:hover {
  background: #be123c !important;
  color: #fff !important;
  filter: none !important;
  box-shadow:
    inset 0 0 0 2px #fff,
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 16px 36px rgba(225, 29, 72, 0.45) !important;
}

.card {
  background: var(--soft-glass-strong) !important;
  border: 1px solid rgba(255, 255, 255, 0.85) !important;
  border-radius: var(--soft-radius-sm) !important;
  box-shadow: var(--soft-shadow-sm) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* ——— Soft gradient KPI rail (Expanded Cards vibe) ——— */
.soft-hero-rail {
  display: flex;
  gap: 14px;
  align-items: stretch;
  overflow-x: auto;
  padding: 4px 4px 18px;
  margin-bottom: 8px;
  scrollbar-width: none;
}
.soft-hero-rail::-webkit-scrollbar { display: none; }

.soft-hero-card {
  flex: 1 1 0;
  min-width: 168px;
  max-width: 240px;
  min-height: 196px;
  border: 0;
  border-radius: 28px;
  padding: 18px 16px;
  color: #fff;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--soft-shadow);
  transition:
    flex-grow var(--soft-dur) var(--soft-ease),
    transform var(--soft-dur) var(--soft-ease),
    box-shadow var(--soft-dur) var(--soft-ease),
    filter 220ms ease;
  font-family: inherit;
  position: relative;
  overflow: hidden;
}
.soft-hero-card::after {
  content: '';
  position: absolute;
  inset: auto -20% -30% auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  pointer-events: none;
}
.soft-hero-rail:hover .soft-hero-card { flex-grow: 0.85; filter: saturate(0.92); }
.soft-hero-rail .soft-hero-card:hover {
  flex-grow: 1.35;
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--soft-shadow-lift);
  filter: saturate(1.05);
  z-index: 2;
}
.soft-hero-card .ico {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}
.soft-hero-card .ico .material-symbols-rounded { font-size: 22px; color: #fff; }
.soft-hero-card .lbl {
  font-size: 12px;
  font-weight: 700;
  opacity: 0.92;
  margin-top: 18px;
  line-height: 1.3;
}
.soft-hero-card .val {
  font-size: clamp(18px, 2.2vw, 28px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-top: 8px;
  word-break: break-word;
  max-width: 100%;
}
.soft-hero-card.g-pink { --hero-grad: linear-gradient(160deg, #fb7185 0%, #fda4af 55%, #fecdd3 100%); --hero-ink: #e11d48; }
.soft-hero-card.g-violet { --hero-grad: linear-gradient(160deg, #8b5cf6 0%, #a78bfa 50%, #c4b5fd 100%); --hero-ink: #7c3aed; }
.soft-hero-card.g-blue { --hero-grad: linear-gradient(160deg, #2563eb 0%, #60a5fa 55%, #93c5fd 100%); --hero-ink: #2563eb; }
.soft-hero-card.g-teal { --hero-grad: linear-gradient(160deg, #0d9488 0%, #2dd4bf 55%, #99f6e4 100%); --hero-ink: #0d9488; }
.soft-hero-card.g-coral { --hero-grad: linear-gradient(160deg, #f43f5e 0%, #fb7185 45%, #fdba74 100%); --hero-ink: #e11d48; }
.soft-hero-card.g-amber { --hero-grad: linear-gradient(160deg, #f59e0b 0%, #fbbf24 50%, #fde68a 100%); --hero-ink: #b45309; color: #422006; }
.soft-hero-card[class*="g-"] { background: var(--hero-grad); }
.soft-hero-card.g-amber .ico .material-symbols-rounded { color: #422006; }

/* Soft skin: glass KPI cards, colour lives in the icon chip; saturated cards stay in Course */
body[data-soft-skin="soft"] .soft-hero-card[class*="g-"] {
  background: var(--soft-glass);
  color: var(--soft-ink);
  border: 1px solid var(--soft-line);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
}
body[data-soft-skin="soft"] .soft-hero-card::after {
  background: var(--hero-grad, rgba(255, 255, 255, 0.18));
  opacity: 0.16;
  filter: blur(6px);
}
body[data-soft-skin="soft"] .soft-hero-card .ico {
  background: var(--hero-grad);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--hero-ink, #64748b) 32%, transparent);
}
body[data-soft-skin="soft"] .soft-hero-card .ico .material-symbols-rounded { color: #fff; }
body[data-soft-skin="soft"] .soft-hero-card .lbl { color: var(--soft-muted); opacity: 1; }
body[data-soft-skin="soft"] .soft-hero-card:hover { box-shadow: 0 22px 48px color-mix(in srgb, var(--hero-ink, #64748b) 22%, transparent), var(--soft-shadow-lift); }
.soft-hero-card[data-state="ok"] .val { color: #059669; }
.soft-hero-card[data-state="warn"] .val { color: #d97706; }
.soft-hero-card[data-state="bad"] .val { color: #e11d48; }
.soft-hero-card[data-state="empty"] .val { color: var(--soft-muted); }
body.soft-theme-dark .soft-hero-card[data-state="ok"] .val { color: #34d399; }
body.soft-theme-dark .soft-hero-card[data-state="warn"] .val { color: #fbbf24; }
body.soft-theme-dark .soft-hero-card[data-state="bad"] .val { color: #fb7185; }
body[data-soft-skin="course"] .soft-hero-card[data-state] .val { color: inherit; }
.soft-hero-card .hint {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.88;
  margin-top: 6px;
}

.soft-pulse-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.soft-pulse {
  background: var(--soft-glass-strong);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 22px;
  padding: 16px 14px;
  box-shadow: var(--soft-shadow-sm);
  backdrop-filter: blur(12px);
  transition: transform 220ms var(--soft-ease), box-shadow 220ms var(--soft-ease);
}
.soft-pulse:hover {
  transform: translateY(-3px);
  box-shadow: var(--soft-shadow);
}
.soft-pulse .k {
  font-size: 11px;
  font-weight: 800;
  color: var(--soft-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.soft-pulse .v {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-top: 6px;
  color: var(--soft-ink);
}
.soft-pulse .h {
  font-size: 11px;
  font-weight: 600;
  color: #a8a29e;
  margin-top: 4px;
}

.soft-section-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  color: var(--soft-ink);
}

.soft-collapse {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin-bottom: 16px !important;
}
.soft-collapse > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--soft-shadow-sm);
  font-weight: 800;
  color: var(--soft-ink);
  margin-bottom: 12px;
  transition: transform 180ms var(--soft-ease), box-shadow 180ms ease;
}
.soft-collapse > summary::-webkit-details-marker { display: none; }
.soft-collapse > summary:hover {
  transform: translateY(-1px);
  box-shadow: var(--soft-shadow);
}
.soft-collapse[open] > summary {
  background: #fff;
}
.soft-collapse .soft-collapse-body {
  animation: soft-fade-up 360ms var(--soft-ease) both;
}

/* Hide dense legacy KPI grid when soft hero present */
#dashboard-tab .kpi-grid { display: none !important; }

.dash-stat-box {
  background: rgba(255, 255, 255, 0.72) !important;
  border: 1px solid rgba(255, 255, 255, 0.9) !important;
  border-radius: 20px !important;
  box-shadow: var(--soft-shadow-sm) !important;
}
.dash-rollout {
  border: none !important;
  border-radius: var(--soft-radius-sm) !important;
  background: var(--soft-glass-strong) !important;
  box-shadow: var(--soft-shadow-sm) !important;
}
.dash-rollout-head {
  background: linear-gradient(90deg, rgba(244, 114, 182, 0.12), rgba(167, 139, 250, 0.12), rgba(96, 165, 250, 0.12)) !important;
  border-bottom-color: transparent !important;
}

/* MESaat / floor soft surfaces */
.sl-card {
  border-radius: 24px !important;
  border: 1px solid rgba(255, 255, 255, 0.9) !important;
  box-shadow: var(--soft-shadow-sm) !important;
  background: rgba(255, 255, 255, 0.82) !important;
  backdrop-filter: blur(10px);
  transition: transform 220ms var(--soft-ease), box-shadow 220ms var(--soft-ease) !important;
}
.sl-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--soft-shadow) !important;
}
/* ——— MESequip Soft Course cards ——— */
.eq-soft-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.9fr);
  gap: 18px;
  align-items: start;
}
.eq-soft-main {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 28px;
  padding: 18px 18px 22px;
  box-shadow: var(--soft-shadow-sm);
  backdrop-filter: blur(12px);
}
.eq-soft-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.eq-soft-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--soft-muted);
}
.eq-soft-title {
  margin: 4px 0 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--soft-ink);
}
.eq-soft-fab {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(145deg, #3b82f6, #2563eb);
  color: #fff;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.4);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 180ms var(--soft-ease), box-shadow 180ms ease;
}
.eq-soft-fab:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.48);
}
.eq-soft-fab .material-symbols-rounded { font-size: 26px; }
.eq-soft-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.eq-soft-legend span {
  font-size: 11px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.7);
  color: var(--soft-muted);
}
.eq-soft-legend .t-blue { color: #1d4ed8; background: rgba(59,130,246,0.12); }
.eq-soft-legend .t-purple { color: #6d28d9; background: rgba(167,139,250,0.16); }
.eq-soft-legend .t-yellow { color: #a16207; background: rgba(251,191,36,0.18); }
.eq-soft-legend .t-coral { color: #be123c; background: rgba(251,113,133,0.16); }
body.soft-theme-dark .eq-soft-legend span { background: rgba(255,255,255,0.06); }
body.soft-theme-dark .eq-soft-legend .t-blue { color: #93c5fd; background: rgba(59,130,246,0.2); }
body.soft-theme-dark .eq-soft-legend .t-purple { color: #c4b5fd; background: rgba(167,139,250,0.2); }
body.soft-theme-dark .eq-soft-legend .t-yellow { color: #fcd34d; background: rgba(251,191,36,0.16); }
body.soft-theme-dark .eq-soft-legend .t-coral { color: #fda4af; background: rgba(251,113,133,0.2); }
.eq-soft-feed {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.eq-soft-zone {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.eq-soft-zone-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 4px;
}
.eq-soft-zone-h strong {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--soft-muted);
}
.eq-soft-zone-h em {
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,0.75);
  color: var(--soft-ink);
  box-shadow: var(--soft-shadow-sm);
}
.eq-soft-cards {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 6px 4px 14px;
  scrollbar-width: thin;
  cursor: grab;
}
.eq-soft-cards.is-dragging { cursor: grabbing; }
.eq-soft-cards::-webkit-scrollbar { height: 8px; }
.eq-soft-cards::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.45);
  border-radius: 999px;
}
.eq-soft-floor {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 12px 8px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.65), 0 12px 28px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.eq-soft-floor-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 6px 2px;
}
.eq-soft-floor-h strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--soft-ink);
}
.eq-soft-floor-h strong .material-symbols-rounded {
  font-size: 20px;
  color: #0284c7;
}
.eq-soft-floor-h em {
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.78);
  color: var(--soft-ink);
  box-shadow: var(--soft-shadow-sm);
}
.eq-soft-cards .cam-machine.eq-card {
  flex: 0 0 min(320px, 78vw);
  width: min(320px, 78vw);
  max-width: 320px;
  scroll-snap-align: start;
}

/* Soft Course machine card */
.cam-machine.eq-card {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 78px;
  gap: 14px;
  align-items: center;
  border: 0 !important;
  border-left: 0 !important;
  border-radius: 26px !important;
  padding: 16px 16px 16px 14px !important;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: #fff !important;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.22) !important;
  transition: transform 200ms var(--soft-ease), box-shadow 200ms ease, filter 160ms ease !important;
  background: linear-gradient(135deg, #4c8dff 0%, #3b82f6 55%, #2563eb 100%) !important;
  animation: none !important;
}
.cam-machine.eq-card::after {
  content: '';
  position: absolute;
  right: -20%;
  top: -40%;
  width: 55%;
  height: 140%;
  background: radial-gradient(circle, rgba(255,255,255,0.18), transparent 65%);
  pointer-events: none;
}
.cam-machine.eq-card:hover {
  transform: translateY(-3px) scale(1.01) !important;
  filter: brightness(1.03);
}
.cam-machine.eq-card.selected {
  box-shadow: 0 0 0 3px rgba(255,255,255,0.85), 0 18px 40px rgba(37,99,235,0.35) !important;
}
.cam-machine.eq-card.tone-blue {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 50%, #2563eb 100%) !important;
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.28) !important;
}
.cam-machine.eq-card.tone-purple {
  background: linear-gradient(135deg, #c4b5fd 0%, #a78bfa 45%, #8b5cf6 100%) !important;
  box-shadow: 0 16px 36px rgba(139, 92, 246, 0.3) !important;
}
.cam-machine.eq-card.tone-yellow {
  background: linear-gradient(135deg, #fde047 0%, #fbbf24 50%, #f59e0b 100%) !important;
  box-shadow: 0 16px 36px rgba(245, 158, 11, 0.28) !important;
  color: #422006 !important;
}
.cam-machine.eq-card.tone-coral {
  background: linear-gradient(135deg, #fb7185 0%, #f43f5e 50%, #e11d48 100%) !important;
  box-shadow: 0 16px 36px rgba(225, 29, 72, 0.3) !important;
}
.cam-machine.eq-card.tone-slate {
  background: linear-gradient(135deg, #94a3b8 0%, #64748b 55%, #475569 100%) !important;
  box-shadow: 0 16px 36px rgba(71, 85, 105, 0.28) !important;
  opacity: 0.92;
}
.cam-machine.eq-card.tone-orange {
  background: linear-gradient(135deg, #fdba74 0%, #fb923c 50%, #ea580c 100%) !important;
  box-shadow: 0 16px 36px rgba(234, 88, 12, 0.28) !important;
  color: #431407 !important;
}

/* Status inner contour glow on floor cards */
.cam-machine.eq-card.ok {
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.88),
    inset 0 0 22px rgba(255, 255, 255, 0.18),
    0 16px 36px rgba(37, 99, 235, 0.28) !important;
}
.cam-machine.eq-card.broken {
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.95),
    inset 0 0 28px rgba(255, 255, 255, 0.22),
    0 16px 36px rgba(225, 29, 72, 0.38) !important;
}
.cam-machine.eq-card.accepted,
.cam-machine.eq-card.downtime {
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.9),
    inset 0 0 26px rgba(255, 255, 255, 0.2),
    0 16px 36px rgba(124, 58, 237, 0.32) !important;
}
.cam-machine.eq-card.idle,
.cam-machine.eq-card.assembly {
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.92),
    inset 0 0 24px rgba(255, 255, 255, 0.28),
    0 16px 36px rgba(245, 158, 11, 0.3) !important;
}
.cam-machine.eq-card.reserved {
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.9),
    inset 0 0 24px rgba(255, 255, 255, 0.22),
    0 16px 36px rgba(139, 92, 246, 0.32) !important;
}
.cam-machine.eq-card.decommissioned {
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.55),
    inset 0 0 18px rgba(255, 255, 255, 0.1),
    0 12px 28px rgba(71, 85, 105, 0.28) !important;
}
.cam-machine.eq-card.selected {
  box-shadow:
    inset 0 0 0 2px #fff,
    inset 0 0 20px rgba(255, 255, 255, 0.25),
    0 0 0 3px rgba(255, 255, 255, 0.9),
    0 18px 40px rgba(15, 23, 42, 0.28) !important;
}

.eq-card-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: rgba(255,255,255,0.22);
  border: 1px solid rgba(255,255,255,0.35);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), 0 8px 18px rgba(0,0,0,0.08);
  position: relative;
  z-index: 1;
}
.eq-card-icon img {
  width: 78%;
  height: 78%;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.18));
}
.eq-card-icon .material-symbols-rounded {
  font-size: 32px;
  color: #fff;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
}
.cam-machine.eq-card.tone-yellow .eq-card-icon .material-symbols-rounded,
.cam-machine.eq-card.tone-orange .eq-card-icon .material-symbols-rounded {
  color: #422006;
}
.eq-card-body {
  min-width: 0;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.eq-card-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.eq-card-sub {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.88;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.eq-card-bar {
  height: 5px;
  border-radius: 999px;
  background: rgba(255,255,255,0.28);
  overflow: hidden;
  margin-top: 4px;
  max-width: 220px;
}
.eq-card-bar > i {
  display: block;
  height: 100%;
  width: var(--eq-p, 40%);
  border-radius: inherit;
  background: rgba(255,255,255,0.95);
  box-shadow: 0 0 10px rgba(255,255,255,0.45);
  transition: width 320ms var(--soft-ease);
}
.cam-machine.eq-card.tone-yellow .eq-card-bar,
.cam-machine.eq-card.tone-orange .eq-card-bar {
  background: rgba(66, 32, 6, 0.18);
}
.cam-machine.eq-card.tone-yellow .eq-card-bar > i,
.cam-machine.eq-card.tone-orange .eq-card-bar > i {
  background: rgba(66, 32, 6, 0.75);
  box-shadow: none;
}
.eq-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 800;
  opacity: 0.9;
}
.eq-card-cta .material-symbols-rounded { font-size: 16px; }

.eq-card-kpi {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #fff;
  color: #0f172a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}
.eq-card-kpi strong {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #0f172a;
}
.eq-card-kpi em,
.eq-card-kpi .cam-status {
  font-style: normal;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #64748b;
  margin-top: 2px;
  max-width: 62px;
  text-align: center;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cam-machine.eq-card .cam-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  display: none;
  align-items: center;
  gap: 3px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  backdrop-filter: blur(6px);
}
.cam-machine.eq-card.broken .cam-badge,
.cam-machine.eq-card.downtime .cam-badge,
.cam-machine.eq-card.accepted .cam-badge,
.cam-machine.eq-card.assembly .cam-badge,
.cam-machine.eq-card.idle .cam-badge,
.cam-machine.eq-card.reserved .cam-badge,
.cam-machine.eq-card.decommissioned .cam-badge {
  display: inline-flex;
}

/* Side panels + round rings */
.eq-soft-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.eq-soft-panel {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  padding: 16px;
  box-shadow: var(--soft-shadow-sm);
  backdrop-filter: blur(12px);
}
.eq-soft-panel h3 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--soft-ink);
}
.eq-soft-hint,
.eq-soft-empty {
  font-size: 12px;
  color: var(--soft-muted);
  line-height: 1.45;
  margin: 0 0 10px;
}
.eq-soft-detail {
  font-size: 13px;
  color: var(--soft-ink);
  line-height: 1.5;
}

.eq-ring {
  --eq-ring-c: #3b82f6;
  --eq-ring-p: 0;
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}
.eq-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.eq-ring circle {
  fill: none;
  stroke-width: 3.2;
  cx: 18;
  cy: 18;
  r: 15.2;
}
.eq-ring .eq-ring-bg { stroke: rgba(148, 163, 184, 0.28); }
.eq-ring .eq-ring-fg {
  stroke: var(--eq-ring-c);
  stroke-linecap: round;
  stroke-dasharray: calc(var(--eq-ring-p) * 0.955) 100;
  transition: stroke-dasharray 360ms var(--soft-ease);
}
.eq-ring span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  color: var(--soft-ink);
  letter-spacing: -0.02em;
}

.eq-learn-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  border-radius: 14px;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms var(--soft-ease);
}
.eq-learn-row:hover {
  background: rgba(255,255,255,0.65);
  transform: translateX(2px);
}
.eq-learn-ico {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 8px 16px rgba(15,23,42,0.12);
}
.eq-learn-ico .material-symbols-rounded { font-size: 18px; }
.eq-learn-txt { flex: 1; min-width: 0; }
.eq-learn-txt b {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: var(--soft-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.eq-learn-txt em {
  display: block;
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  color: var(--soft-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.eq-loc-chip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(255,255,255,0.9);
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--soft-ink);
  box-shadow: var(--soft-shadow-sm);
}

body.soft-theme-dark .eq-soft-main,
body.soft-theme-dark .eq-soft-panel {
  background: rgba(28, 30, 40, 0.82);
  border-color: rgba(255,255,255,0.08);
}
body.soft-theme-dark .eq-card-kpi { background: rgba(15, 23, 42, 0.55); }
body.soft-theme-dark .eq-learn-row:hover { background: rgba(255,255,255,0.06); }

@media (max-width: 980px) {
  .eq-soft-layout { grid-template-columns: 1fr; }
  .cam-machine.eq-card {
    grid-template-columns: 56px minmax(0, 1fr) 64px;
    gap: 10px;
    padding: 12px !important;
    border-radius: 22px !important;
  }
  .eq-card-icon { width: 52px; height: 52px; border-radius: 16px; }
  .eq-card-kpi { width: 60px; height: 60px; }
  .eq-card-kpi strong { font-size: 18px; }
  .eq-card-title { font-size: 14px; }
}

/* Modal reveal — iOS glass (base; detailed rules below) */
.modal-backdrop:not(.hidden) {
  animation: soft-fade-up 280ms var(--soft-ease) both;
}
.modal-backdrop:not(.hidden) .modal-window {
  animation: soft-modal-in 420ms var(--soft-ease) both;
}

/* Login soft polish */
#startupScreen.mes-login-shell {
  background:
    radial-gradient(720px 420px at 85% -10%, rgba(251, 113, 133, 0.35), transparent 55%),
    radial-gradient(640px 380px at 10% 110%, rgba(96, 165, 250, 0.28), transparent 55%),
    linear-gradient(180deg, #f7f1f3 0%, #fde8e4 100%) !important;
}
#startupScreen.mes-login-shell .login-gate-card {
  border-radius: 36px !important;
  background: rgba(255, 255, 255, 0.72) !important;
  backdrop-filter: blur(20px);
  box-shadow: var(--soft-shadow-lift) !important;
  border: 1px solid rgba(255, 255, 255, 0.85) !important;
}
#startupScreen.mes-login-shell .login-role-btn {
  border-radius: 22px !important;
  box-shadow: var(--soft-shadow-sm);
  transition: transform 220ms var(--soft-ease), box-shadow 220ms ease !important;
}
#startupScreen.mes-login-shell .login-role-btn:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--soft-shadow);
}

@media (max-width: 1100px) {
  .soft-pulse-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .soft-hero-card { min-width: 150px; max-width: 200px; min-height: 180px; }
}
@media (max-width: 900px) {
  .app-container { padding: 0 !important; gap: 0 !important; }
  .sidebar {
    border-radius: 0 var(--soft-radius) var(--soft-radius) 0 !important;
    /* drawer: Soft width/collapse не должны обнулять меню на телефоне */
    width: min(86vw, 300px) !important;
    min-width: 0 !important;
    max-width: 100vw !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    margin: 0 !important;
    transform: translateX(-105%) !important;
  }
  body.nav-open .sidebar,
  body.sidebar-collapsed.nav-open .sidebar {
    transform: translateX(0) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    width: min(86vw, 300px) !important;
  }
  /* prefs с ПК (sidebarCollapsed) не прячут drawer на mobile */
  body.sidebar-collapsed .sidebar {
    width: min(86vw, 300px) !important;
    min-width: 0 !important;
    padding: 18px 14px 14px !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    border: 1px solid rgba(255, 255, 255, 0.7) !important;
    transform: translateX(-105%) !important;
  }
  body.sidebar-collapsed .soft-sidebar-reopen { display: none !important; }
  .sidebar-brand-tools > .soft-icon-btn { display: none !important; }
  .content-area {
    overflow: visible !important;
    height: auto !important;
    min-height: 0 !important;
  }
  .content-area .tab-content {
    padding: 12px 12px 96px !important;
  }
  /* MESaat: на телефоне не height:100%/overflow:hidden — иначе пустой экран */
  #shift-live-tab.mesaat-layout.active,
  #shift-live-tab.mesaat-layout {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }
  #shift-live-tab .shift-live-shell,
  #shift-live-tab .shift-live-scroll {
    flex: none !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }
  .soft-quick-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ——— MESaat: sticky header, collapsible meta, scrolling cards ——— */
#shift-live-tab.mesaat-layout.active,
#shift-live-tab.mesaat-layout {
  display: flex !important;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  padding-top: 12px !important;
  padding-bottom: 0 !important;
}
#shift-live-tab.mesaat-layout:not(.active) { display: none !important; }
.mesaat-sticky-head {
  flex-shrink: 0 !important;
  margin-bottom: 8px !important;
  padding-bottom: 10px !important;
}
#shift-live-tab .shift-live-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
#shift-live-tab .mesaat-meta-collapse {
  flex-shrink: 0;
  margin: 0 0 10px !important;
}
#shift-live-tab .mesaat-meta-collapse > summary {
  width: 100%;
  box-sizing: border-box;
}
.mesaat-meta-mini {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  color: var(--soft-muted);
}
.mesaat-meta-mini b { color: var(--soft-ink); font-weight: 800; }
.mesaat-meta-body {
  padding: 12px;
  border-radius: 20px;
  background: var(--soft-glass-strong);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--soft-shadow-sm);
}
#shift-live-tab .shift-live-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
#shift-live-tab .shift-live-body { padding: 4px 2px 28px; }

/* ——— Soft custom selects ——— */
select.soft-select-native {
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}
.soft-select {
  position: relative;
  display: block;
  width: 100%;
  min-width: 140px;
  max-width: 100%;
  vertical-align: middle;
  font-family: var(--ui-font, 'Manrope', system-ui, sans-serif);
}
.soft-select-trigger { box-sizing: border-box; }
.soft-select.is-disabled { opacity: 0.55; pointer-events: none; }
.soft-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  background: var(--soft-glass-strong);
  color: var(--soft-ink);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: var(--soft-shadow-sm);
  backdrop-filter: blur(10px);
  transition: transform 160ms var(--soft-ease), box-shadow 180ms ease, background 180ms ease;
  text-align: left;
}
.soft-select-trigger:hover {
  transform: translateY(-1px);
  box-shadow: var(--soft-shadow);
  background: var(--soft-surface-solid);
}
.soft-select.open .soft-select-trigger {
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.28), var(--soft-shadow-sm);
}
.soft-select-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.soft-select-label.is-empty { color: var(--soft-muted); font-weight: 600; }
.soft-select-chev {
  font-size: 18px !important;
  color: var(--soft-muted);
  transition: transform 200ms var(--soft-ease);
}
.soft-select.open .soft-select-chev { transform: rotate(180deg); }
.soft-select-menu {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 30000;
  max-height: 240px;
  overflow: auto;
  padding: 6px;
  border-radius: 16px;
  background: var(--soft-glass-strong);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--soft-shadow-lift);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  animation: soft-fade-up 220ms var(--soft-ease) both;
}
.soft-select.open .soft-select-menu,
.soft-select-menu.soft-select-portal-open {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
body > .soft-select-menu.soft-select-portal-open {
  position: fixed;
  z-index: 40000;
}
.soft-select-option {
  border: 0;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  color: var(--soft-ink);
  cursor: pointer;
  transition: background 140ms ease, transform 140ms ease;
}
.soft-select-option:hover {
  background: rgba(167, 139, 250, 0.14);
  transform: translateX(2px);
}
.soft-select-option.selected {
  background: linear-gradient(135deg, color-mix(in srgb, var(--soft-accent) 22%, transparent), color-mix(in srgb, var(--soft-accent-2) 22%, transparent));
  color: var(--soft-ink);
}
.soft-select-option.disabled { opacity: 0.4; cursor: not-allowed; }
body.soft-theme-dark .soft-select-trigger,
body.soft-theme-dark .soft-select-menu {
  border-color: rgba(255, 255, 255, 0.1);
}
body.soft-theme-dark .soft-select-option:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* ——— Button hover glow ——— */
.btn, .btn-strict, .soft-icon-btn, .soft-tile, .nav-btn, .login-role-btn {
  transition: transform 180ms var(--soft-ease), box-shadow 200ms ease, filter 160ms ease, background 180ms ease !important;
}
.btn:hover {
  transform: translateY(-2px) !important;
  filter: brightness(1.04);
  box-shadow: 0 12px 28px var(--soft-glow), 0 0 0 1px rgba(255, 255, 255, 0.5) !important;
}
.btn-primary {
  background: linear-gradient(135deg, var(--soft-accent), var(--soft-accent-2)) !important;
  border-color: transparent !important;
  color: var(--soft-accent-ink) !important;
  box-shadow: 0 10px 24px var(--soft-glow) !important;
}
.btn-primary:hover {
  box-shadow: 0 14px 32px var(--soft-glow), 0 0 24px var(--soft-glow-2) !important;
}
.btn-secondary:hover {
  background: var(--soft-surface-solid) !important;
  box-shadow: 0 12px 28px var(--soft-glow) !important;
}
.btn-danger:hover {
  box-shadow: 0 14px 32px rgba(244, 63, 94, 0.4) !important;
}
.btn-success:hover {
  box-shadow: 0 14px 32px rgba(16, 185, 129, 0.35) !important;
}

/* ——— Soft modals — iOS frosted glass ——— */
.modal-backdrop:not(.hidden) {
  background: rgba(15, 23, 42, 0.22) !important;
  backdrop-filter: blur(22px) saturate(1.35) !important;
  -webkit-backdrop-filter: blur(22px) saturate(1.35) !important;
  padding: 24px !important;
}
.modal-backdrop:not(.hidden) .modal-window,
.modal-window.soft-modal {
  border-radius: 28px !important;
  background: #fff !important;
  color: #1c1917 !important;
  border: 1px solid rgba(255, 255, 255, 0.72) !important;
  box-shadow:
    0 28px 64px rgba(15, 23, 42, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.75) !important;
  backdrop-filter: blur(28px) saturate(1.4) !important;
  -webkit-backdrop-filter: blur(28px) saturate(1.4) !important;
  overflow: hidden;
  max-width: min(920px, 100%);
}
.modal-header {
  background: #fff !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35) !important;
  padding: 18px 22px !important;
  border-radius: 28px 28px 0 0 !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.modal-header h3 {
  font-size: 16px !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em;
  text-transform: none !important;
  color: var(--soft-ink) !important;
}
.modal-body {
  padding: 20px 22px !important;
  background: transparent !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
.modal-body::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}
.modal-backdrop:not(.hidden) .modal-window,
.modal-window.soft-modal {
  position: relative;
}
.soft-scroll-hint {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 6;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.72);
  color: var(--soft-ink, #334155);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 200ms ease, transform 200ms ease;
}
.soft-scroll-hint.show {
  display: inline-flex;
  opacity: 0.92;
  animation: soft-scroll-bob 1.6s ease-in-out infinite;
}
.soft-scroll-hint .material-symbols-rounded { font-size: 18px; }
@keyframes soft-scroll-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}
.soft-scroll-hint.dir-up { animation-name: soft-scroll-bob-up; }
@keyframes soft-scroll-bob-up {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
.modal-footer {
  background: #fff !important;
  border-top: 1px solid rgba(255, 255, 255, 0.3) !important;
  padding: 14px 22px !important;
  border-radius: 0 0 28px 28px !important;
  gap: 10px !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.modal-close {
  border-radius: 999px !important;
  width: 36px !important;
  height: 36px !important;
  background: #fff !important;
  color: #1c1917 !important;
  border: 1px solid rgba(28, 25, 23, 0.18) !important;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.16), inset 0 0 0 1px rgba(255, 255, 255, 0.8) !important;
  transition: transform 160ms var(--soft-ease), box-shadow 160ms ease, background 160ms ease !important;
}
.modal-close .material-symbols-rounded { color: #1c1917 !important; font-size: 20px; }
.modal-close:hover {
  transform: scale(1.08) !important;
  background: #fff1f2 !important;
  border-color: #e11d48 !important;
  box-shadow: 0 8px 18px rgba(225, 29, 72, 0.28) !important;
}
.modal-close:hover .material-symbols-rounded { color: #e11d48 !important; }
body.soft-theme-dark .modal-backdrop:not(.hidden) .modal-window,
body.soft-theme-dark .modal-window.soft-modal,
body.soft-theme-dark .sheet-card {
  background: #fff !important;
  border-color: rgba(28, 25, 23, 0.08) !important;
  color: #1c1917 !important;
}
body.soft-theme-dark .modal-header,
body.soft-theme-dark .modal-footer {
  background: #fff !important;
  border-color: rgba(28, 25, 23, 0.08) !important;
}

/* ——— Card Folder (Scrolltide-inspired) for MEScore launch ——— */
.soft-folder-section {
  margin: 8px 0 22px;
}
.soft-folder-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.soft-folder-gains {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.soft-folder-gains .g {
  background: var(--soft-glass-strong);
  border-radius: 16px;
  padding: 12px;
  box-shadow: var(--soft-shadow-sm);
  border: 1px solid rgba(255, 255, 255, 0.7);
}
.soft-folder-gains .g b { display: block; font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.soft-folder-gains .g span { font-size: 10px; font-weight: 800; color: var(--soft-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.soft-folder-gains .g.up b { color: #059669; }
.soft-folder-rail {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 8px 4px 28px;
  scrollbar-width: thin;
}
.soft-folder-rail::-webkit-scrollbar { height: 8px; }
.soft-folder-empty {
  padding: 28px;
  text-align: center;
  color: var(--soft-muted);
  font-weight: 700;
  background: var(--soft-glass-strong);
  border-radius: 24px;
}

.soft-folder {
  --folder-w: 210px;
  position: relative;
  flex: 0 0 var(--folder-w);
  width: var(--folder-w);
  height: 250px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  perspective: 800px;
}
.soft-folder-tab {
  position: absolute;
  left: 18px;
  top: 0;
  width: 72px;
  height: 28px;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(180deg, #f8e7c8, #edd5a8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  z-index: 2;
  transition: transform 420ms var(--soft-ease), background 320ms ease;
}
.soft-folder-face {
  position: absolute;
  left: 0;
  right: 0;
  top: 18px;
  bottom: 0;
  border-radius: 18px;
  background: linear-gradient(165deg, #fff7e8 0%, #f3e0b8 55%, #e8d0a0 100%);
  box-shadow: var(--soft-shadow);
  z-index: 3;
  padding: 16px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  transition: transform 420ms var(--soft-ease), box-shadow 420ms ease;
}
.soft-folder-glow {
  position: absolute;
  inset: 28px 8px 8px;
  border-radius: 16px;
  background: linear-gradient(135deg, #fb7185, #a78bfa 40%, #60a5fa 75%, #2dd4bf);
  opacity: 0.55;
  z-index: 1;
  transform: translateY(18px) scale(0.96);
  filter: blur(0.2px);
  transition: transform 420ms var(--soft-ease), opacity 320ms ease;
}
.soft-folder-cutout {
  position: absolute;
  right: 18px;
  bottom: 28px;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 10px 24px rgba(28, 25, 23, 0.18);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transform: translateY(28px) scale(0.85);
  opacity: 0.35;
  transition: transform 480ms var(--soft-ease), opacity 320ms ease;
}
.soft-folder-cutout img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.soft-folder-cutout .material-symbols-rounded {
  font-size: 28px;
  color: #7c3aed;
}
.soft-folder:hover .soft-folder-tab {
  transform: translateY(14px);
  background: linear-gradient(180deg, #ffe4ec, #fbcfe8);
}
.soft-folder:hover .soft-folder-face {
  transform: translateY(-6px);
  box-shadow: var(--soft-shadow-lift);
}
.soft-folder:hover .soft-folder-glow {
  transform: translateY(0) scale(1);
  opacity: 0.85;
}
.soft-folder:hover .soft-folder-cutout {
  transform: translateY(-8px) scale(1);
  opacity: 1;
}
.soft-folder .op {
  font-size: 11px;
  font-weight: 800;
  color: #92400e;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.soft-folder .name {
  font-size: 14px;
  font-weight: 800;
  color: #1c1917;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.soft-folder .meta {
  margin-top: auto;
  font-size: 11px;
  font-weight: 700;
  color: #78716c;
  line-height: 1.35;
}
.soft-folder .badge {
  display: inline-flex;
  align-self: flex-start;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: #7c3aed;
  border: 1px solid rgba(255, 255, 255, 0.9);
}
.soft-folder.is-overdue .badge { color: #b91c1c; background: #fef2f2; }
.soft-folder.is-today .badge { color: #166534; background: #dcfce7; }

@media (max-width: 900px) {
  .soft-folder-gains { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .soft-folder { --folder-w: 180px; height: 230px; }
}

/* ——— Widget Board (Scrolltide u-widget-board vibe) ——— */
.soft-widget-board {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
  margin: 6px 0 28px;
  align-items: stretch;
}
.sw-card {
  grid-column: span 4;
  background: var(--soft-glass-strong);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 24px;
  padding: 16px 16px 14px;
  box-shadow: var(--soft-shadow-sm);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform 220ms var(--soft-ease), box-shadow 220ms ease;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: soft-fade-up 420ms var(--soft-ease) both;
}
.sw-card:nth-child(2) { animation-delay: 40ms; }
.sw-card:nth-child(3) { animation-delay: 80ms; }
.sw-card:nth-child(4) { animation-delay: 120ms; }
.sw-card:nth-child(5) { animation-delay: 160ms; }
.sw-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--soft-shadow);
}
.sw-span-3 { grid-column: span 3; }
.sw-span-4 { grid-column: span 4; }
.sw-span-6 { grid-column: span 6; }
.sw-span-8 { grid-column: span 8; }
.sw-span-12 { grid-column: span 12; }
.sw-accent-rose {
  background: linear-gradient(160deg, rgba(251,113,133,0.16), rgba(255,255,255,0.82) 55%);
}
.sw-day-carousel-card { overflow: hidden; }
.sw-day-rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 2px 8px;
  margin: 0 -4px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}
.sw-day-rail::-webkit-scrollbar { display: none; }
.sw-day-slide {
  flex: 0 0 72%;
  scroll-snap-align: start;
  border-radius: 18px;
  padding: 14px 14px 12px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--soft-shadow-sm);
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  transition: transform 180ms var(--soft-ease);
}
.sw-day-slide:hover { transform: translateY(-2px); }
.sw-day-slide.s-fact { background: linear-gradient(160deg, rgba(251,113,133,0.28), rgba(255,255,255,0.7)); }
.sw-day-slide.s-plan { background: linear-gradient(160deg, rgba(59,130,246,0.2), rgba(255,255,255,0.7)); }
.sw-day-slide.s-pct { background: linear-gradient(160deg, rgba(16,185,129,0.2), rgba(255,255,255,0.7)); }
.sw-day-slide.s-def { background: linear-gradient(160deg, rgba(245,158,11,0.22), rgba(255,255,255,0.7)); }
body.soft-theme-dark .sw-accent-rose {
  background: linear-gradient(160deg, rgba(251,113,133,0.14), var(--soft-glass-strong) 55%);
}
body.soft-theme-dark .sw-day-slide { border-color: rgba(255,255,255,0.08); }
body.soft-theme-dark .sw-day-slide.s-fact { background: linear-gradient(160deg, rgba(251,113,133,0.26), rgba(255,255,255,0.04)); }
body.soft-theme-dark .sw-day-slide.s-plan { background: linear-gradient(160deg, rgba(59,130,246,0.24), rgba(255,255,255,0.04)); }
body.soft-theme-dark .sw-day-slide.s-pct { background: linear-gradient(160deg, rgba(16,185,129,0.22), rgba(255,255,255,0.04)); }
body.soft-theme-dark .sw-day-slide.s-def { background: linear-gradient(160deg, rgba(245,158,11,0.22), rgba(255,255,255,0.04)); }
.sw-day-ico {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.7);
  color: var(--soft-ink);
}
.sw-day-ico .material-symbols-rounded { font-size: 18px; }
.sw-day-slide em {
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--soft-muted);
}
.sw-day-slide strong {
  display: block;
  margin-top: 4px;
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--soft-ink);
}
.sw-day-slide .sw-sub { margin-top: 6px; }
body.soft-theme-dark .sw-day-slide {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}
body.soft-theme-dark .sw-day-ico { background: rgba(255,255,255,0.1); color: #f5f5f4; }
.sw-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.sw-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--soft-muted);
}
.sw-big {
  font-size: clamp(34px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--soft-ink);
}
.sw-mid {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--soft-ink);
}
.sw-mid.sm { font-size: 22px; }
.sw-sub, .sw-hint {
  font-size: 12px;
  font-weight: 600;
  color: var(--soft-muted);
}
.sw-row3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 4px;
}
.sw-row3 span {
  display: block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--soft-muted);
}
.sw-row3 b {
  font-size: 16px;
  font-weight: 800;
  color: var(--soft-ink);
}
.sw-danger { color: #e11d48 !important; }
.sw-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: center;
  flex: 1;
}
.sw-leader { text-align: center; }
.sw-avatar {
  width: 48px;
  height: 48px;
  margin: 0 auto 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #fb7185, #a78bfa);
  box-shadow: 0 10px 22px rgba(244, 114, 182, 0.35);
}
.sw-date {
  border: 0;
  background: rgba(255,255,255,0.7);
  border-radius: 999px;
  padding: 6px 10px;
  font-family: inherit;
  font-weight: 700;
  font-size: 12px;
  color: var(--soft-ink);
  box-shadow: var(--soft-shadow-sm);
  cursor: pointer;
}
/* beats the inline `.mes-forms input:not(...)` full-width field rule in index.html */
#softWidgetBoard .sw-date {
  width: auto;
  flex: 0 0 auto;
  min-height: 0;
  border: 0;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.7);
}
body.soft-theme-dark #softWidgetBoard .sw-date { background: rgba(255, 255, 255, 0.06); color: var(--soft-ink); }
.sw-date::-webkit-calendar-picker-indicator { opacity: 0.55; cursor: pointer; }
.sw-date:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--soft-glow), var(--soft-shadow-sm); }
.sw-reorderable .sw-card-top { padding-right: 40px; }
.sw-chart {
  flex: 1;
  min-height: 180px;
  position: relative;
}
.sw-chart.sm { min-height: 140px; }
.sw-lollipop {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 36px;
}
.sw-lollipop i {
  display: block;
  width: 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fb7185, #a78bfa);
  opacity: 0.45;
}
.sw-lollipop i.on { opacity: 1; box-shadow: 0 0 0 2px rgba(167,139,250,0.25); }
.sw-avatar-stack {
  display: flex;
  padding-left: 6px;
  margin-bottom: 6px;
}
.sw-av {
  width: 34px;
  height: 34px;
  margin-left: -8px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--soft-shadow-sm);
  transition: transform 180ms var(--soft-ease);
}
.sw-av:hover { transform: translateY(-4px) scale(1.08); z-index: 2; }
.sw-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  flex: 1;
}
.sw-tile {
  background: rgba(255,255,255,0.55);
  border-radius: 14px;
  padding: 10px;
}
.sw-tile span {
  display: block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--soft-muted);
}
.sw-tile b {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.sw-click { cursor: pointer; }
.sw-tone-orders {
  background: linear-gradient(155deg, rgba(59,130,246,0.2), rgba(255,255,255,0.88) 48%, rgba(14,165,233,0.12)) !important;
  border-color: rgba(147,197,253,0.7) !important;
  box-shadow: 0 16px 36px rgba(37,99,235,0.14), inset 0 0 0 1px rgba(255,255,255,0.75) !important;
}
.sw-tone-orders .sw-kicker { color: #1d4ed8; }
.sw-tone-orders .sw-tile.t-all { background: rgba(219,234,254,0.9); }
.sw-tone-orders .sw-tile.t-open { background: rgba(254,243,199,0.95); }
.sw-tone-orders .sw-tile.t-way { background: rgba(224,242,254,0.95); }
.sw-tone-orders .sw-tile.t-done { background: rgba(220,252,231,0.95); }
.sw-tone-orders .sw-tile.t-all b { color: #1d4ed8; }
.sw-tone-orders .sw-tile.t-open b { color: #b45309; }
.sw-tone-orders .sw-tile.t-way b { color: #0284c7; }
.sw-tone-orders .sw-tile.t-done b { color: #059669; }

.sw-tone-mescore {
  background: linear-gradient(155deg, rgba(13,148,136,0.22), rgba(255,255,255,0.9) 50%, rgba(45,212,191,0.14)) !important;
  border-color: rgba(153,246,228,0.75) !important;
  box-shadow: 0 16px 36px rgba(13,148,136,0.16), inset 0 0 0 1px rgba(255,255,255,0.8) !important;
}
.sw-tone-mescore .sw-kicker { color: #0f766e; }
.sw-tone-mescore .sw-tile.t-wait { background: rgba(254,243,199,0.95); }
.sw-tone-mescore .sw-tile.t-work { background: rgba(204,251,241,0.95); }
.sw-tone-mescore .sw-tile.t-review { background: rgba(237,233,254,0.95); }
.sw-tone-mescore .sw-tile.t-wait b { color: #b45309; }
.sw-tone-mescore .sw-tile.t-work b { color: #0f766e; }
.sw-tone-mescore .sw-tile.t-review b { color: #6d28d9; }

/* SOP catalog cards — compact metrics + right actions */
.sop-wide {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) minmax(148px, 168px);
  gap: 14px;
  align-items: stretch;
  background: linear-gradient(145deg, rgba(13, 148, 136, 0.12), rgba(255, 255, 255, 0.94) 46%);
  border: 1px solid rgba(13, 148, 136, 0.28);
  border-left: 4px solid #0d9488;
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: 0 8px 24px rgba(15,23,42,0.05), inset 0 0 0 1px rgba(255,255,255,0.85);
  transition: box-shadow 200ms ease, border-color 180ms ease, transform 180ms var(--soft-ease);
}
.sop-wide:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(15,23,42,0.08), inset 0 0 0 1px rgba(255,255,255,0.9);
}
.sop-wide.has-order.order-sent {
  border-color: #99f6e4;
  background: linear-gradient(135deg, #f0fdfa 0%, #ffffff 45%);
  box-shadow: 0 12px 28px rgba(13,148,136,0.12), inset 0 0 0 2px rgba(13,148,136,0.28);
}
.sop-wide.has-order.order-accepted {
  border-color: #bfdbfe;
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 45%);
  box-shadow: 0 12px 28px rgba(37,99,235,0.12), inset 0 0 0 2px rgba(37,99,235,0.28);
}
.sop-wide.has-order.order-review {
  border-color: #ddd6fe;
  background: linear-gradient(135deg, #f5f3ff 0%, #ffffff 45%);
  box-shadow: 0 12px 28px rgba(124,58,237,0.12), inset 0 0 0 2px rgba(124,58,237,0.28);
}
.sop-wide-thumb { min-width: 0; }
.sop-wide-ph {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.sop-wide-main { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.sop-wide-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-start;
}
.sop-wide-num {
  display: flex;
  gap: 8px;
  align-items: center;
}
.sop-wide-num span {
  font-size: 12px;
  color: #64748b;
  font-weight: 800;
}
.sop-wide-num .catOpNum {
  width: 88px;
  font-weight: 900;
  font-size: 18px;
  margin: 0;
}
.sop-wide-name {
  font-weight: 800;
  font-size: 16px;
  color: #0f172a;
  margin-top: 4px;
  line-height: 1.3;
}
.sop-wide-status { display: flex; gap: 6px; flex-wrap: wrap; }
.sop-wide-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(72px, 110px));
  gap: 8px;
  width: max-content;
  max-width: 100%;
}
.sop-metric {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 8px 10px;
  min-width: 0;
  box-shadow: inset 0 1px 0 #fff;
}
.sop-metric-l {
  font-size: 10px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  white-space: nowrap;
}
.sop-metric input,
.sop-metric-v {
  font-size: 18px;
  font-weight: 900;
  border: none;
  background: transparent;
  width: 100%;
  padding: 0;
  box-shadow: none;
  color: #0f172a;
}
.sop-order-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 700;
}
.sop-order-banner .material-symbols-rounded { font-size: 20px; }
.sop-order-banner b { display: block; font-size: 13px; font-weight: 800; }
.sop-order-banner em {
  display: block;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  opacity: 0.8;
  margin-top: 2px;
}
.sop-order-banner.order-sent {
  background: #ccfbf1;
  color: #0f766e;
  border: 1px solid #99f6e4;
}
.sop-order-banner.order-accepted {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}
.sop-order-banner.order-review {
  background: #ede9fe;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
}
.sop-wide-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: flex-start;
}
.sop-act {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  color: #fff !important;
  box-shadow: var(--soft-shadow-sm);
  transition: transform 160ms var(--soft-ease), filter 160ms ease, box-shadow 180ms ease;
}
.sop-act .material-symbols-rounded { font-size: 16px; color: #fff !important; }
.sop-act:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}
.sop-act-chrono {
  background: linear-gradient(135deg, #60a5fa, #2563eb);
  box-shadow: 0 10px 22px rgba(37,99,235,0.28);
}
.sop-act-print {
  background: linear-gradient(135deg, #fb7185, #e11d48);
  box-shadow: 0 10px 22px rgba(225,29,72,0.28);
}
.sop-act-order {
  background: linear-gradient(135deg, #2dd4bf, #0d9488);
  box-shadow: 0 10px 22px rgba(13,148,136,0.28);
}
@media (max-width: 900px) {
  .sop-wide {
    grid-template-columns: 72px minmax(0, 1fr);
  }
  .sop-wide-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .sop-act { width: auto; flex: 1 1 140px; }
  .sop-wide-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }
}

.sw-table { max-height: 220px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.6); }
.sw-mech-list { font-size: 13px; line-height: 1.45; flex: 1; overflow: auto; max-height: 180px; }
.sw-folder-wrap { padding-bottom: 8px; }
.sw-photo-stack {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0;
  height: 168px;
  margin: 4px 0 0;
  padding: 8px 4px 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  scrollbar-width: none;
}
.sw-photo-stack::-webkit-scrollbar { display: none; }
.sw-photo-stack.is-dragging { cursor: grabbing; }
.sw-stack-card-item {
  position: relative;
  flex: 0 0 78%;
  width: 78%;
  min-width: 140px;
  height: 140px;
  margin-right: -18%;
  border: 0;
  border-radius: 20px;
  padding: 16px 16px 14px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: var(--soft-ink);
  background: linear-gradient(165deg, #ffffff 0%, #fce7f3 55%, #fbcfe8 100%);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.9) inset,
    0 12px 28px rgba(190, 24, 93, 0.16);
  transform: rotate(var(--rot, -2deg)) translateZ(0);
  transition: transform 220ms var(--soft-ease), box-shadow 200ms ease, margin 200ms ease, filter 160ms ease;
  scroll-snap-align: center;
  pointer-events: auto;
  z-index: var(--z, 1);
}
.sw-stack-card-item:last-child { margin-right: 0; }
.sw-stack-card-item:hover,
.sw-stack-card-item:focus-visible,
.sw-stack-card-item.is-on {
  transform: rotate(0deg) translateY(-10px) scale(1.04);
  z-index: 40 !important;
  margin-right: 6px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.95) inset,
    0 18px 36px rgba(190, 24, 93, 0.28);
  outline: none;
  filter: brightness(1.03);
}
.sw-stack-card-item .d { font-size: 12px; font-weight: 800; color: var(--soft-muted); }
.sw-stack-card-item .f { display: block; font-size: 32px; font-weight: 800; letter-spacing: -0.03em; margin-top: 6px; }
.sw-stack-card-item .m { font-size: 11px; font-weight: 600; color: var(--soft-muted); margin-top: 4px; }
.sw-stack-empty {
  padding: 28px;
  text-align: center;
  color: var(--soft-muted);
  font-weight: 700;
  width: 100%;
}
.sw-empty-state {
  flex: 1;
  width: 100%;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 18px 12px;
  text-align: center;
  color: var(--soft-muted);
  animation: soft-fade-up 420ms var(--soft-ease) both;
}
.sw-empty-state > .material-symbols-rounded {
  font-size: 22px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  margin-bottom: 6px;
  background: var(--soft-accent-soft);
  color: var(--soft-accent);
}
.sw-empty-state strong { font-size: 13px; font-weight: 800; color: var(--soft-ink); }
.sw-empty-state .sub { font-size: 11px; font-weight: 600; max-width: 220px; line-height: 1.35; }
.sw-empty-action {
  margin-top: 10px;
  border: 0;
  border-radius: 999px;
  padding: 7px 14px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  color: var(--soft-accent-ink);
  background: linear-gradient(135deg, var(--soft-accent), var(--soft-accent-2));
  box-shadow: 0 8px 20px var(--soft-glow);
  transition: transform 180ms var(--soft-ease), box-shadow 180ms ease;
}
.sw-empty-action:hover { transform: translateY(-1px); box-shadow: 0 12px 26px var(--soft-glow); }
body.soft-theme-dark .sw-card {
  border-color: rgba(255,255,255,0.08);
}
body.soft-theme-dark .sw-tile,
body.soft-theme-dark .sw-date {
  background: rgba(255,255,255,0.06);
}
body.soft-theme-dark .sw-stack-card-item {
  background: linear-gradient(160deg, #1c1f2a, #2a2030);
  color: #f5f5f4;
}
body.soft-theme-dark .sw-av { border-color: #1c1f2a; }

@media (max-width: 1100px) {
  .sw-span-4, .sw-span-3, .sw-span-8, .sw-span-6 { grid-column: span 6; }
  .sw-span-12 { grid-column: span 12; }
}
@media (max-width: 700px) {
  .soft-widget-board { grid-template-columns: 1fr; }
  .sw-span-4, .sw-span-3, .sw-span-8, .sw-span-6, .sw-span-12 { grid-column: span 1; }
}

/* ——— Apps launch (FAB + bottom rail only; sidebar launch stays hidden) ——— */
.soft-apps-launch {
  display: none !important;
}
.soft-apps-fab { display: none !important; }
.soft-apps-fab {
  position: fixed;
  right: 18px;
  bottom: 78px;
  z-index: 9001;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--soft-accent), var(--soft-accent-2));
  color: #fff;
  box-shadow: 0 14px 32px var(--soft-glow), inset 0 0 0 2px rgba(255,255,255,0.35);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 180ms var(--soft-ease), box-shadow 180ms ease;
}
.soft-apps-fab:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 18px 40px var(--soft-glow), 0 0 24px var(--soft-glow-2);
}
.soft-apps-fab .material-symbols-rounded { font-size: 24px; color: #fff; }
.soft-tab-pill.soft-tab-apps {
  background: rgba(255,255,255,0.45);
  color: var(--soft-ink);
}
.soft-tab-pill.soft-tab-apps .material-symbols-rounded { color: var(--soft-accent); }
.soft-apps-launch-hidden {
  width: 100%;
  display: none;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 16px;
  padding: 10px;
  background: rgba(255,255,255,0.55);
  box-shadow: var(--soft-shadow-sm);
  cursor: pointer;
  font-family: inherit;
  color: var(--soft-ink);
  text-align: left;
  transition: transform 180ms var(--soft-ease), box-shadow 180ms ease;
}
.soft-apps-launch:hover {
  transform: translateY(-2px);
  box-shadow: var(--soft-shadow);
  background: var(--soft-surface-solid);
}
.soft-apps-launch-stack {
  position: relative;
  width: 42px;
  height: 36px;
  flex-shrink: 0;
}
.soft-apps-launch-stack img {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 2px solid #fff;
  box-shadow: var(--soft-shadow-sm);
}
.soft-apps-launch-stack img:nth-child(1) { left: 0; top: 4px; z-index: 3; }
.soft-apps-launch-stack img:nth-child(2) { left: 10px; top: 0; z-index: 2; transform: rotate(6deg); }
.soft-apps-launch-stack img:nth-child(3) { left: 18px; top: 8px; z-index: 1; transform: rotate(-8deg); }
.soft-apps-launch-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.soft-apps-launch-txt strong { font-size: 12px; font-weight: 800; }
.soft-apps-launch-txt em { font-style: normal; font-size: 10px; font-weight: 700; color: var(--soft-muted); }
body.soft-theme-dark .soft-apps-launch { background: rgba(255,255,255,0.06); }

/* ——— Soft tab rail (always-on nav) ——— */
.soft-tab-rail {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px 10px;
  max-width: min(920px, calc(100vw - 24px));
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 16px 40px rgba(28, 25, 23, 0.1);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  overflow: visible;
}
.soft-tab-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  color: var(--soft-muted);
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms var(--soft-ease);
}
.soft-tab-pill .material-symbols-rounded { font-size: 18px; }
.soft-tab-dash .material-symbols-rounded { color: #2563eb; }
.soft-tab-aat .material-symbols-rounded { color: #e11d48; }
.soft-tab-equip .material-symbols-rounded { color: #0284c7; }
.soft-tab-route .material-symbols-rounded { color: #059669; }
.soft-tab-orders .material-symbols-rounded { color: #0d9488; }
.soft-tab-hist .material-symbols-rounded { color: #64748b; }
.soft-tab-rep .material-symbols-rounded { color: #3b82f6; }
.soft-tab-set .material-symbols-rounded { color: #78716c; }
.soft-tab-pill:hover {
  color: var(--soft-ink);
  background: rgba(255,255,255,0.55);
  transform: translateY(-1px);
}
.soft-tab-pill.on {
  color: var(--soft-accent-ink);
  background: linear-gradient(135deg, var(--soft-accent), var(--soft-accent-2));
  box-shadow: 0 8px 20px var(--soft-glow);
}
.soft-tab-pill.on .material-symbols-rounded { color: #fff !important; }
body.soft-theme-dark .soft-tab-rail {
  background: rgba(28, 30, 40, 0.42);
  border-color: rgba(255, 255, 255, 0.12);
}
body.soft-theme-dark .soft-tab-pill:hover { background: rgba(255,255,255,0.08); }
body.sidebar-collapsed .soft-tab-rail { bottom: 16px; }
.nav-btn[aria-current="page"] .nav-title { font-weight: 800; }
@media (max-width: 900px) {
  .soft-tab-rail {
    gap: 3px;
    padding: 7px 8px;
    max-width: calc(100vw - 16px);
    overflow: visible;
  }
  .soft-tab-pill { padding: 8px 10px; font-size: 0; }
  .soft-tab-pill .material-symbols-rounded { font-size: 20px; }
}

/* ——— Apps stack popover (lightweight, no fullscreen) ——— */
.apps-stack-pop {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 16px 88px;
  background: transparent;
  pointer-events: none;
  opacity: 0;
  transition: opacity 160ms ease;
}
.apps-stack-pop[hidden] { display: none !important; }
.apps-stack-pop.open {
  opacity: 1;
  pointer-events: auto;
  background: rgba(28, 25, 23, 0.18);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.apps-stack-panel {
  width: min(380px, 100%);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 24px 56px rgba(15, 23, 42, 0.16), inset 0 1px 0 rgba(255,255,255,0.7);
  backdrop-filter: blur(28px) saturate(1.4);
  -webkit-backdrop-filter: blur(28px) saturate(1.4);
  padding: 14px;
  transform: translateY(18px) scale(0.96);
  transition: transform 200ms var(--soft-ease);
  will-change: transform;
  overflow-x: hidden;
}
.apps-stack-pop.open .apps-stack-panel {
  transform: translateY(0) scale(1);
}
.apps-stack-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 0 4px;
}
.apps-stack-head strong {
  font-size: 13px;
  font-weight: 800;
  color: var(--soft-ink);
}
.apps-stack-x {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 10px;
  background: rgba(255,255,255,0.55);
  color: var(--soft-ink);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.apps-stack-x:hover { background: var(--soft-surface-solid); box-shadow: 0 8px 18px var(--soft-glow); }
.apps-stack-deck {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 4px 0 12px;
  overflow: visible;
}
.apps-stack-card {
  position: relative;
  left: auto;
  top: auto;
  width: 88px;
  height: 88px;
  margin-left: 0;
  border: 0;
  border-radius: 20px;
  padding: 10px 8px 8px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 24px rgba(15,23,42,0.1), inset 0 0 0 1px rgba(255,255,255,0.7), 0 0 0 2px color-mix(in srgb, var(--accent, var(--soft-accent)) 28%, transparent);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transform: translateY(0);
  transition: transform 180ms var(--soft-ease), box-shadow 180ms ease;
  font-family: inherit;
  color: var(--soft-ink);
}
.apps-stack-card img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
}
.apps-stack-card .t { font-size: 11px; font-weight: 800; line-height: 1.1; }
.apps-stack-card .s { font-size: 9px; font-weight: 700; color: var(--soft-muted); }
.apps-stack-card:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 16px 32px var(--soft-glow), 0 0 0 2px var(--accent, var(--soft-accent));
}
.apps-stack-list {
  display: none !important;
}
.apps-stack-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.55);
  cursor: pointer;
  font-family: inherit;
  color: var(--soft-ink);
  text-align: left;
  transition: transform 140ms var(--soft-ease), box-shadow 140ms ease, background 140ms ease;
}
.apps-stack-row img { width: 28px; height: 28px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.apps-stack-row span { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.apps-stack-row b { font-size: 13px; font-weight: 800; }
.apps-stack-row em { font-style: normal; font-size: 11px; font-weight: 600; color: var(--soft-muted); }
.apps-stack-row .material-symbols-rounded { color: var(--soft-muted); font-size: 20px; }
.apps-stack-row:hover {
  transform: translateX(3px);
  background: var(--soft-surface-solid);
  box-shadow: 0 10px 22px var(--soft-glow);
}
body.soft-theme-dark .apps-stack-row { background: rgba(255,255,255,0.06); }
body.soft-theme-dark .apps-stack-x { background: rgba(255,255,255,0.08); color: #f5f5f4; }
body.soft-theme-dark .apps-stack-card { background: #1c1f2a; }

/* ——— Soft modal color accents ——— */
.modal-window.soft-modal {
  border-top: none !important;
}
.modal-window.soft-modal::before {
  content: none;
  display: none;
}
.modal-window.soft-modal.accent-blue { --modal-accent: #3b82f6; --modal-accent-2: #60a5fa; }
.modal-window.soft-modal.accent-red { --modal-accent: #ef4444; --modal-accent-2: #fb7185; }
.modal-window.soft-modal.accent-amber { --modal-accent: #f59e0b; --modal-accent-2: #fbbf24; }
.modal-window.soft-modal.accent-orange { --modal-accent: #ea580c; --modal-accent-2: #fb923c; }
.modal-window.soft-modal.accent-teal { --modal-accent: #0d9488; --modal-accent-2: #2dd4bf; }
.modal-window.soft-modal.accent-violet { --modal-accent: #7c3aed; --modal-accent-2: #a78bfa; }
.modal-window.soft-modal.accent-slate { --modal-accent: #64748b; --modal-accent-2: #94a3b8; }
.modal-window.soft-modal.accent-green { --modal-accent: #10b981; --modal-accent-2: #34d399; }
.modal-window.soft-modal.accent-cyan { --modal-accent: #0284c7; --modal-accent-2: #38bdf8; }
.modal-window.soft-modal .modal-header h3 {
  color: var(--modal-accent, var(--soft-ink)) !important;
}
.modal-window.soft-modal .modal-header {
  background: #fff !important;
}
.modal-window.soft-modal .modal-body {
  background: transparent !important;
}

/* ——— Soft skin picker (settings) ——— */
.soft-skin-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 6px 0 16px;
}
.soft-skin-card {
  border: 2px solid transparent;
  border-radius: 18px;
  padding: 12px;
  background: rgba(255,255,255,0.65);
  box-shadow: var(--soft-shadow-sm);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: var(--soft-ink);
  transition: transform 160ms var(--soft-ease), box-shadow 160ms ease, border-color 160ms ease;
}
.soft-skin-card:hover { transform: translateY(-2px); box-shadow: var(--soft-shadow); }
.soft-skin-card.on {
  border-color: var(--soft-accent);
  box-shadow: 0 0 0 3px var(--soft-glow), var(--soft-shadow-sm);
}
.soft-skin-card strong { display: block; font-size: 13px; font-weight: 800; margin-top: 8px; }
.soft-skin-card em { display: block; font-style: normal; font-size: 11px; font-weight: 600; color: var(--soft-muted); margin-top: 2px; line-height: 1.35; }
.soft-skin-preview {
  display: block;
  height: 44px;
  border-radius: 12px;
  overflow: hidden;
}
.soft-skin-preview--soft {
  background:
    linear-gradient(135deg, rgba(251,113,133,0.35), transparent 55%),
    linear-gradient(225deg, rgba(167,139,250,0.3), transparent 50%),
    #f7f1f3;
}
.soft-skin-preview--course {
  background:
    linear-gradient(90deg, #3b82f6 0 25%, #a78bfa 25% 50%, #fbbf24 50% 75%, #fb7185 75% 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.4);
}
body.soft-theme-dark .soft-skin-card { background: rgba(255,255,255,0.06); }

/* Soft skin (default): MESequip cards as glass, not loud Course colors */
body[data-soft-skin="soft"] .cam-machine.eq-card,
body:not([data-soft-skin]) .cam-machine.eq-card {
  background: var(--soft-glass-strong) !important;
  color: var(--soft-ink) !important;
  box-shadow: var(--soft-shadow) !important;
  border: 1px solid var(--soft-line) !important;
}
body[data-soft-skin="soft"] .cam-machine.eq-card::after,
body:not([data-soft-skin]) .cam-machine.eq-card::after { opacity: 0.35; }
body[data-soft-skin="soft"] .eq-card-icon,
body:not([data-soft-skin]) .eq-card-icon {
  background: color-mix(in srgb, var(--soft-accent) 18%, #fff);
  border-color: transparent;
}
body[data-soft-skin="soft"] .eq-card-icon .material-symbols-rounded,
body:not([data-soft-skin]) .eq-card-icon .material-symbols-rounded {
  color: var(--soft-accent);
  filter: none;
}
body[data-soft-skin="soft"] .eq-card-bar,
body:not([data-soft-skin]) .eq-card-bar {
  background: rgba(15, 23, 42, 0.08);
}
body[data-soft-skin="soft"] .eq-card-bar > i,
body:not([data-soft-skin]) .eq-card-bar > i {
  background: linear-gradient(90deg, var(--soft-accent), var(--soft-accent-2));
  box-shadow: none;
}
body[data-soft-skin="soft"] .eq-card-cta,
body:not([data-soft-skin]) .eq-card-cta { opacity: 0.75; }
body[data-soft-skin="soft"] .cam-machine.eq-card.tone-blue { box-shadow: 0 14px 32px rgba(59,130,246,0.16) !important; }
body[data-soft-skin="soft"] .cam-machine.eq-card.tone-purple { box-shadow: 0 14px 32px rgba(139,92,246,0.16) !important; }
body[data-soft-skin="soft"] .cam-machine.eq-card.tone-yellow { box-shadow: 0 14px 32px rgba(245,158,11,0.16) !important; color: var(--soft-ink) !important; }
body[data-soft-skin="soft"] .cam-machine.eq-card.tone-coral { box-shadow: 0 14px 32px rgba(244,63,94,0.18) !important; }
body[data-soft-skin="soft"] .cam-machine.eq-card.tone-orange { box-shadow: 0 14px 32px rgba(234,88,12,0.16) !important; color: var(--soft-ink) !important; }
body[data-soft-skin="soft"] .cam-machine.eq-card.tone-slate { box-shadow: var(--soft-shadow-sm) !important; opacity: 0.85; }
body[data-soft-skin="soft"] .eq-soft-main,
body:not([data-soft-skin]) .eq-soft-main {
  background: var(--soft-glass);
}
body[data-soft-skin="soft"] .eq-soft-fab,
body:not([data-soft-skin]) .eq-soft-fab {
  background: linear-gradient(135deg, var(--soft-accent), var(--soft-accent-2));
  box-shadow: 0 14px 28px var(--soft-glow);
}

/* ——— Soft Course skin: whole app ——— */
body[data-soft-skin="course"] {
  --soft-bg0: #f4f6fb;
  --soft-glass: rgba(255, 255, 255, 0.92);
  --soft-glass-strong: #ffffff;
  --soft-shadow: 0 16px 40px rgba(37, 99, 235, 0.08);
  --soft-shadow-sm: 0 10px 24px rgba(15, 23, 42, 0.06);
  --soft-shadow-lift: 0 22px 48px rgba(37, 99, 235, 0.14);
  --soft-accent: #3b82f6;
  --soft-accent-2: #60a5fa;
  --soft-glow: rgba(59, 130, 246, 0.32);
  --soft-glow-2: rgba(167, 139, 250, 0.24);
  --soft-mesh: radial-gradient(ellipse 70% 50% at 10% 0%, rgba(59,130,246,0.08), transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 10%, rgba(167,139,250,0.08), transparent 50%);
}
body[data-soft-skin="course"].soft-theme-dark {
  --soft-bg0: #0b1020;
  --soft-glass: rgba(22, 26, 40, 0.88);
  --soft-glass-strong: #161a28;
  --soft-accent: #60a5fa;
  --soft-accent-2: #a78bfa;
  --soft-glow: rgba(96, 165, 250, 0.35);
}
body[data-soft-skin="course"] .sidebar {
  background: #ffffff !important;
  border: none !important;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.06) !important;
}
body[data-soft-skin="course"].soft-theme-dark .sidebar {
  background: #121624 !important;
}
body[data-soft-skin="course"] .nav-btn.active,
body[data-soft-skin="course"] .soft-tile.active {
  background: #eff6ff !important;
  color: #2563eb !important;
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.22) !important;
}
body[data-soft-skin="course"] .soft-tile.active {
  color: #2563eb !important;
}
body[data-soft-skin="course"] .btn-primary {
  background: linear-gradient(145deg, #3b82f6, #2563eb) !important;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.35) !important;
}
body[data-soft-skin="course"] .soft-tab-pill.on {
  background: linear-gradient(145deg, #3b82f6, #2563eb);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}
body[data-soft-skin="course"] .soft-apps-fab,
body[data-soft-skin="course"] .eq-soft-fab {
  background: linear-gradient(145deg, #3b82f6, #2563eb);
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.4);
  border-radius: 16px;
}
body[data-soft-skin="course"] .soft-hero-card {
  border-radius: 26px !important;
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.18) !important;
}
body[data-soft-skin="course"] .soft-hero-card .val {
  font-size: 28px;
  font-weight: 900;
}
body[data-soft-skin="course"] .page-header-dark .ph-title {
  letter-spacing: -0.04em;
}
body[data-soft-skin="course"] .card,
body[data-soft-skin="course"] .dash-stat-box,
body[data-soft-skin="course"] .sl-card,
body[data-soft-skin="course"] .sw-stack-card-item {
  border-radius: 22px !important;
  border: none !important;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06) !important;
  background: #fff !important;
}
body[data-soft-skin="course"] .eq-soft-main,
body[data-soft-skin="course"] .eq-soft-panel {
  background: #fff;
  border: none;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
}
body[data-soft-skin="course"] .eq-learn-ico {
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.18);
}
body[data-soft-skin="course"] .modal-backdrop:not(.hidden) .modal-window {
  border-radius: 28px !important;
  box-shadow: 0 24px 64px rgba(37, 99, 235, 0.18) !important;
}
body[data-soft-skin="course"] .content-area .tab-content.active {
  animation: soft-fade-up 360ms var(--soft-ease) both;
}

/* Course: keep colorful MESequip cards (base eq-card styles already colorful) */
body[data-soft-skin="course"] .cam-machine.eq-card.tone-blue {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 50%, #2563eb 100%) !important;
  color: #fff !important;
  border: 0 !important;
}
body[data-soft-skin="course"] .cam-machine.eq-card.tone-purple {
  background: linear-gradient(135deg, #c4b5fd 0%, #a78bfa 45%, #8b5cf6 100%) !important;
  color: #fff !important;
  border: 0 !important;
}
body[data-soft-skin="course"] .cam-machine.eq-card.tone-yellow {
  background: linear-gradient(135deg, #fde047 0%, #fbbf24 50%, #f59e0b 100%) !important;
  color: #422006 !important;
  border: 0 !important;
}
body[data-soft-skin="course"] .cam-machine.eq-card.tone-coral {
  background: linear-gradient(135deg, #fb7185 0%, #f43f5e 50%, #e11d48 100%) !important;
  color: #fff !important;
  border: 0 !important;
}
body[data-soft-skin="course"] .cam-machine.eq-card.tone-orange {
  background: linear-gradient(135deg, #fdba74 0%, #fb923c 50%, #ea580c 100%) !important;
  color: #431407 !important;
  border: 0 !important;
}
body[data-soft-skin="course"] .eq-card-icon {
  background: rgba(255,255,255,0.22);
}
body[data-soft-skin="course"] .eq-card-icon .material-symbols-rounded { color: #fff; }
body[data-soft-skin="course"] .cam-machine.eq-card.tone-yellow .eq-card-icon .material-symbols-rounded,
body[data-soft-skin="course"] .cam-machine.eq-card.tone-orange .eq-card-icon .material-symbols-rounded {
  color: #422006;
}
body[data-soft-skin="course"] .eq-card-bar { background: rgba(255,255,255,0.28); }
body[data-soft-skin="course"] .eq-card-bar > i {
  background: rgba(255,255,255,0.95);
  box-shadow: 0 0 10px rgba(255,255,255,0.45);
}

@media (max-width: 700px) {
  .soft-skin-toggle { grid-template-columns: 1fr; }
}

/* ——— Dark theme: surfaces + readable muted text ——— */
body.soft-theme-dark .content-area,
body.soft-theme-dark .tab-content,
body.soft-theme-dark .page-header-dark,
body.soft-theme-dark .cam-board,
body.soft-theme-dark .cam-zone,
body.soft-theme-dark .cam-side,
body.soft-theme-dark .settings-panels .card,
body.soft-theme-dark .settings-group,
body.soft-theme-dark .settings-block,
body.soft-theme-dark .guide-hub .guide-card,
body.soft-theme-dark .kpi-card,
body.soft-theme-dark .table-scroll-container,
body.soft-theme-dark .shift-live-shell,
body.soft-theme-dark .sl-card,
body.soft-theme-dark .sl-insight,
body.soft-theme-dark .sl-thumb,
body.soft-theme-dark .sop-mod,
body.soft-theme-dark .sop-kpi,
body.soft-theme-dark .sop-step-cell,
body.soft-theme-dark .dash-rollout,
body.soft-theme-dark .dash-rollout-card,
body.soft-theme-dark .orders-toolbar,
body.soft-theme-dark .cam-order-card,
body.soft-theme-dark .eq-soft-main,
body.soft-theme-dark .eq-soft-panel,
body.soft-theme-dark .soft-skin-card,
body.soft-theme-dark .soft-theme-toggle,
body.soft-theme-dark .apps-stack-panel,
body.soft-theme-dark .soft-tab-rail {
  background: var(--soft-glass-strong) !important;
  background-color: var(--soft-surface-solid) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: var(--soft-ink) !important;
}

body.soft-theme-dark .page-header-dark .ph-title,
body.soft-theme-dark .page-header-dark .ph-title .mes,
body.soft-theme-dark h2, body.soft-theme-dark h3,
body.soft-theme-dark .cam-num,
body.soft-theme-dark .eq-soft-title,
body.soft-theme-dark label,
body.soft-theme-dark .soft-skin-card strong {
  color: var(--soft-ink) !important;
}

body.soft-theme-dark .page-header-dark .ph-kicker,
body.soft-theme-dark .page-header-dark .ph-desc,
body.soft-theme-dark .eq-soft-kicker,
body.soft-theme-dark .eq-soft-hint,
body.soft-theme-dark .eq-soft-empty,
body.soft-theme-dark .cam-op,
body.soft-theme-dark .cam-legend,
body.soft-theme-dark .kpi-title,
body.soft-theme-dark .kpi-sub,
body.soft-theme-dark .guide-card p,
body.soft-theme-dark .co-meta,
body.soft-theme-dark th,
body.soft-theme-dark .nav-category,
body.soft-theme-dark .sidebar-factory,
body.soft-theme-dark .soft-skin-card em {
  color: var(--soft-muted) !important;
}

/* Hardcoded slate grays from legacy inline/CSS */
body.soft-theme-dark [style*="color:#64748b"],
body.soft-theme-dark [style*="color: #64748b"],
body.soft-theme-dark [style*="color:#94a3b8"],
body.soft-theme-dark [style*="color: #94a3b8"],
body.soft-theme-dark [style*="color:#475569"],
body.soft-theme-dark [style*="color: #475569"],
body.soft-theme-dark [style*="color:#78716c"],
body.soft-theme-dark [style*="color: #78716c"] {
  color: var(--soft-muted) !important;
}

body.soft-theme-dark [style*="background:#f8fafc"],
body.soft-theme-dark [style*="background: #f8fafc"],
body.soft-theme-dark [style*="background:#fff"],
body.soft-theme-dark [style*="background: #fff"],
body.soft-theme-dark [style*="background:#ffffff"],
body.soft-theme-dark [style*="background: #ffffff"],
body.soft-theme-dark [style*="background:white"],
body.soft-theme-dark [style*="background: white"],
body.soft-theme-dark [style*="background:#f1f5f9"],
body.soft-theme-dark [style*="background: #f1f5f9"],
body.soft-theme-dark [style*="background:#f7f8fc"],
body.soft-theme-dark [style*="background: #f7f8fc"] {
  background: var(--soft-surface-solid) !important;
  color: var(--soft-ink) !important;
}

body.soft-theme-dark input,
body.soft-theme-dark select,
body.soft-theme-dark textarea,
body.soft-theme-dark .soft-select-trigger,
body.soft-theme-dark .soft-select-menu,
body.soft-theme-dark .btn-secondary,
body.soft-theme-dark .sl-actions button,
body.soft-theme-dark .sl-copy,
body.soft-theme-dark .orders-chip,
body.soft-theme-dark .eq-loc-chip {
  background: rgba(255, 255, 255, 0.07) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: var(--soft-ink) !important;
}
body.soft-theme-dark input::placeholder,
body.soft-theme-dark textarea::placeholder {
  color: #9ca3af !important;
  opacity: 1;
}
body.soft-theme-dark table,
body.soft-theme-dark td,
body.soft-theme-dark tr {
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: var(--soft-ink);
}
body.soft-theme-dark th {
  background: rgba(255, 255, 255, 0.06) !important;
}
body.soft-theme-dark .modal-header,
body.soft-theme-dark .modal-footer,
body.soft-theme-dark .modal-body {
  background: #fff !important;
  color: #1c1917 !important;
}
body.soft-theme-dark .modal-backdrop:not(.hidden) .modal-window,
body.soft-theme-dark .sheet-card {
  background: #fff !important;
  color: #1c1917 !important;
}
body.soft-theme-dark .modal-window h2,
body.soft-theme-dark .modal-window h3,
body.soft-theme-dark .modal-window label,
body.soft-theme-dark .modal-window p,
body.soft-theme-dark .modal-window li,
body.soft-theme-dark .modal-window td,
body.soft-theme-dark .modal-window th,
body.soft-theme-dark .sheet-card h2,
body.soft-theme-dark .sheet-card h3,
body.soft-theme-dark .sheet-card label,
body.soft-theme-dark .sheet-card p {
  color: #1c1917 !important;
}
.modal-window input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]),
.modal-window select,
.modal-window textarea,
.sheet-card input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]),
.sheet-card select,
.sheet-card textarea,
.sheet input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]),
.sheet select,
.sheet textarea,
.modal-content input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]),
.modal-content select,
.modal-content textarea,
body.soft-theme-dark .modal-window input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]),
body.soft-theme-dark .modal-window select,
body.soft-theme-dark .modal-window textarea,
body.soft-theme-dark .sheet-card input,
body.soft-theme-dark .sheet-card select,
body.soft-theme-dark .sheet-card textarea {
  background: #f4f4f5 !important;
  color: #1c1917 !important;
  border: 1px solid #d4d4d8 !important;
  box-shadow: none !important;
}
body.soft-theme-dark .soft-collapse[open] > summary,
body.soft-theme-dark .soft-collapse > summary {
  background: rgba(255, 255, 255, 0.08) !important;
  color: var(--soft-ink) !important;
}
body.soft-theme-dark .sl-card,
body.soft-theme-dark .dash-stat-box,
body.soft-theme-dark .card {
  background: var(--soft-surface-solid) !important;
  color: var(--soft-ink) !important;
}
body.soft-theme-dark .btn-secondary {
  color: #e7e5e4 !important;
}
body.soft-theme-dark .ph-actions .btn .material-symbols-rounded {
  color: var(--soft-accent) !important;
}

/* Soft skin glass cards in dark */
body.soft-theme-dark[data-soft-skin="soft"] .cam-machine.eq-card,
body.soft-theme-dark:not([data-soft-skin="course"]) .cam-machine.eq-card {
  background: var(--soft-surface-solid) !important;
  color: var(--soft-ink) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}
body.soft-theme-dark[data-soft-skin="soft"] .eq-card-sub,
body.soft-theme-dark:not([data-soft-skin="course"]) .eq-card-sub,
body.soft-theme-dark[data-soft-skin="soft"] .eq-card-cta,
body.soft-theme-dark:not([data-soft-skin="course"]) .eq-card-cta {
  color: var(--soft-muted) !important;
  opacity: 1;
}
body.soft-theme-dark .eq-card-kpi {
  background: #2a2f3d !important;
  color: #f5f5f4 !important;
}
body.soft-theme-dark .eq-card-kpi strong { color: #f8fafc !important; }
body.soft-theme-dark .eq-card-kpi em,
body.soft-theme-dark .eq-card-kpi .cam-status { color: #cbd5e1 !important; }

/* Course skin must not force white in dark */
body.soft-theme-dark[data-soft-skin="course"] {
  --soft-bg0: #0b1020;
  --soft-glass: rgba(18, 22, 36, 0.9);
  --soft-glass-strong: #161a28;
  --soft-surface-solid: #1a1f30;
  --soft-muted: #c7cdd8;
}
body.soft-theme-dark[data-soft-skin="course"] .sidebar,
body.soft-theme-dark[data-soft-skin="course"] .card,
body.soft-theme-dark[data-soft-skin="course"] .dash-stat-box,
body.soft-theme-dark[data-soft-skin="course"] .sl-card,
body.soft-theme-dark[data-soft-skin="course"] .sw-stack-card-item,
body.soft-theme-dark[data-soft-skin="course"] .eq-soft-main,
body.soft-theme-dark[data-soft-skin="course"] .eq-soft-panel {
  background: var(--soft-surface-solid) !important;
  color: var(--soft-ink) !important;
}
body.soft-theme-dark[data-soft-skin="course"] .nav-btn.active,
body.soft-theme-dark[data-soft-skin="course"] .soft-tile.active {
  background: rgba(59, 130, 246, 0.22) !important;
  color: #93c5fd !important;
}

body.soft-theme-dark .settings-nav-btn {
  color: var(--soft-muted) !important;
}
body.soft-theme-dark .settings-nav-btn.active {
  background: rgba(255, 255, 255, 0.1) !important;
  color: var(--soft-ink) !important;
}
body.soft-theme-dark .soft-tab-pill { color: #b8b4ac; }
body.soft-theme-dark .soft-tab-pill:hover { color: #f5f5f4; }
body.soft-theme-dark .nav-btn { color: #d6d3d1 !important; }
body.soft-theme-dark .nav-title { color: inherit !important; }

/* ——— Soft Orders hub (MEScam) ——— */
.soft-orders { display: flex; flex-direction: column; gap: 14px; }
.soft-orders-note {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: 22px;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.75);
  box-shadow: var(--soft-shadow-sm);
  backdrop-filter: blur(14px);
}
.soft-orders-note .material-symbols-rounded { font-size: 22px; color: #0d9488; }
.soft-orders-note b { display: block; font-size: 14px; font-weight: 800; color: var(--soft-ink); }
.soft-orders-note em { display: block; font-style: normal; font-size: 12px; font-weight: 600; color: var(--soft-muted); margin-top: 2px; }

.soft-orders-kpi {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 10px;
}
.soft-orders-kpi-tile {
  border-radius: 20px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.8);
  box-shadow: 0 12px 28px rgba(15,23,42,0.06), inset 0 1px 0 #fff;
  backdrop-filter: blur(12px);
  transition: transform 180ms var(--soft-ease);
}
.soft-orders-kpi-tile:hover { transform: translateY(-2px); }
.soft-orders-kpi-tile span {
  display: block; font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--soft-muted);
}
.soft-orders-kpi-tile b {
  display: block; margin-top: 4px; font-size: 24px; font-weight: 900;
  letter-spacing: -0.03em; color: var(--soft-ink);
}
.soft-orders-kpi-tile.k-cons b { color: #059669; }
.soft-orders-kpi-tile.k-parts b { color: #7c3aed; }
.soft-orders-kpi-tile.k-tpl b { color: #0d9488; }
.soft-orders-kpi-tile.k-open b { color: #2563eb; }
.soft-orders-kpi-tile.k-way b { color: #d97706; }
.soft-orders-kpi-tile.k-done b { color: #047857; }
.soft-orders-kpi-tile.k-cons { background: linear-gradient(160deg, rgba(16,185,129,0.14), rgba(255,255,255,0.7)); }
.soft-orders-kpi-tile.k-parts { background: linear-gradient(160deg, rgba(124,58,237,0.14), rgba(255,255,255,0.7)); }
.soft-orders-kpi-tile.k-tpl { background: linear-gradient(160deg, rgba(13,148,136,0.16), rgba(255,255,255,0.7)); }

.soft-orders-toolbar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
}
.soft-orders-pills { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.soft-orders-pill {
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; border-radius: 999px; padding: 8px 12px;
  font-family: inherit; font-size: 12px; font-weight: 800;
  color: var(--soft-muted); background: rgba(255,255,255,0.5);
  box-shadow: var(--soft-shadow-sm); cursor: pointer;
  transition: transform 160ms var(--soft-ease), background 160ms ease, color 160ms ease;
}
.soft-orders-pill em {
  font-style: normal; font-size: 10px; font-weight: 800;
  padding: 2px 7px; border-radius: 999px;
  background: rgba(15,23,42,0.06); color: inherit;
}
.soft-orders-pill:hover { transform: translateY(-1px); color: var(--soft-ink); }
.soft-orders-pill.on {
  color: #fff;
  background: linear-gradient(135deg, var(--soft-accent), var(--soft-accent-2));
  box-shadow: 0 10px 24px var(--soft-glow);
}
.soft-orders-pill.on em { background: rgba(255,255,255,0.22); color: #fff; }
.soft-orders-search {
  flex: 1; min-width: 200px; border: 0; border-radius: 999px;
  padding: 10px 16px; font: inherit; font-size: 13px; font-weight: 600;
  background: rgba(255,255,255,0.65); color: var(--soft-ink);
  box-shadow: var(--soft-shadow-sm); backdrop-filter: blur(10px);
}

.soft-orders-list { display: flex; flex-direction: column; gap: 12px; }
.soft-order-card {
  border-radius: 24px; overflow: hidden;
  background: rgba(255,255,255,0.62);
  border: 1px solid rgba(255,255,255,0.8);
  box-shadow: 0 16px 36px rgba(15,23,42,0.08), inset 0 1px 0 #fff;
  backdrop-filter: blur(14px);
  transition: transform 200ms var(--soft-ease), box-shadow 220ms ease;
  animation: soft-fade-up 360ms var(--soft-ease) both;
}
.soft-order-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 48px rgba(15,23,42,0.12), inset 0 1px 0 #fff;
}
.soft-order-card.tone-cons { box-shadow: 0 16px 36px rgba(5,150,105,0.1), inset 0 0 0 1px rgba(255,255,255,0.75), inset 0 0 28px rgba(5,150,105,0.04); }
.soft-order-card.tone-parts { box-shadow: 0 16px 36px rgba(124,58,237,0.1), inset 0 0 0 1px rgba(255,255,255,0.75), inset 0 0 28px rgba(124,58,237,0.04); }
.soft-order-card.tone-tpl { box-shadow: 0 16px 36px rgba(13,148,136,0.1), inset 0 0 0 1px rgba(255,255,255,0.75), inset 0 0 28px rgba(13,148,136,0.04); }

.soft-order-top {
  width: 100%; display: grid;
  grid-template-columns: 52px minmax(0,1fr) auto;
  gap: 12px; align-items: center;
  padding: 14px 16px; border: 0; background: transparent;
  text-align: left; cursor: pointer; font-family: inherit; color: inherit;
}
.soft-order-ico {
  width: 48px; height: 48px; border-radius: 16px;
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 10px 20px rgba(15,23,42,0.12);
}
.soft-order-card.tone-cons .soft-order-ico { background: linear-gradient(135deg, #34d399, #059669); }
.soft-order-card.tone-parts .soft-order-ico { background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.soft-order-card.tone-tpl .soft-order-ico { background: linear-gradient(135deg, #2dd4bf, #0d9488); }
.soft-order-kind {
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--soft-muted);
}
.soft-order-title {
  font-size: 15px; font-weight: 800; color: var(--soft-ink);
  margin-top: 2px; letter-spacing: -0.02em;
}
.soft-order-meta {
  font-size: 12px; font-weight: 600; color: var(--soft-muted);
  margin-top: 3px; line-height: 1.35;
}
.soft-order-side {
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
}
.soft-order-status {
  font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 999px;
}
.soft-order-status.formed { background: #eff6ff; color: #1d4ed8; }
.soft-order-status.ordered, .soft-order-status.wait { background: #fffbeb; color: #b45309; }
.soft-order-status.arrived, .soft-order-status.accepted { background: #ecfdf5; color: #047857; }
.soft-order-status.review { background: #fff7ed; color: #c2410c; }
.soft-order-side strong { font-size: 12px; font-weight: 800; color: var(--soft-ink); }
.soft-order-side .chev { color: var(--soft-muted); font-size: 20px; }

.soft-order-body {
  display: none; padding: 0 16px 16px;
  border-top: 1px dashed rgba(148,163,184,0.35);
}
.soft-order-card.open .soft-order-body { display: block; padding-top: 12px; }
.soft-order-lines { display: flex; flex-direction: column; gap: 2px; }
.soft-order-line {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid rgba(241,245,249,0.9);
  font-size: 12px; font-weight: 600; color: var(--soft-ink);
}
.soft-order-line em { font-style: normal; color: var(--soft-muted); }
.soft-order-line.muted { color: var(--soft-muted); border: 0; }
.soft-order-actions {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px;
}
.soft-order-hint { font-size: 12px; font-weight: 700; color: var(--soft-muted); }
.soft-orders-empty {
  text-align: center; padding: 36px 16px; border-radius: 24px;
  background: rgba(255,255,255,0.5); border: 1px solid rgba(255,255,255,0.75);
  box-shadow: var(--soft-shadow-sm);
}
.soft-orders-empty .material-symbols-rounded {
  font-size: 36px; color: var(--soft-muted); opacity: 0.55; display: block; margin: 0 auto 8px;
}
.soft-orders-empty b { display: block; font-size: 15px; font-weight: 800; color: var(--soft-ink); }
.soft-orders-empty em { display: block; margin-top: 6px; font-style: normal; font-size: 12px; font-weight: 600; color: var(--soft-muted); }

body.soft-theme-dark .soft-orders-note,
body.soft-theme-dark .soft-orders-kpi-tile,
body.soft-theme-dark .soft-order-card,
body.soft-theme-dark .soft-orders-empty,
body.soft-theme-dark .soft-orders-pill,
body.soft-theme-dark .soft-orders-search {
  background: rgba(28,30,40,0.72);
  border-color: rgba(255,255,255,0.1);
  color: var(--soft-ink);
}

/* ——— Soft folder cutout: MEScore logo fallback ——— */
.soft-folder-cutout img.mescore-fallback {
  object-fit: contain;
  padding: 10px;
  background: linear-gradient(145deg, rgba(13,148,136,0.12), rgba(255,255,255,0.85));
}

/* ——— Archive Soft UI ——— */
.arch-soft-feed {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 28px;
}
.arch-soft-card {
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 26px;
  padding: 16px 16px 12px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255,255,255,0.75);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
}
.arch-soft-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.45);
}
.arch-soft-head-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.arch-soft-ico {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #60a5fa, #2563eb);
  color: #fff;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.32), inset 0 1px 0 rgba(255,255,255,0.35);
}
.arch-soft-ico .material-symbols-rounded { font-size: 22px; }
.arch-soft-title {
  font-size: 16px;
  font-weight: 900;
  color: var(--soft-ink);
  letter-spacing: -0.02em;
}
.arch-soft-sub {
  font-size: 12px;
  font-weight: 700;
  color: var(--soft-muted);
  margin-top: 2px;
}
.arch-soft-master {
  text-align: right;
}
.arch-soft-master span {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--soft-muted);
}
.arch-soft-master b {
  font-size: 14px;
  font-weight: 800;
  color: var(--soft-ink);
}
.arch-soft-table-wrap {
  max-height: 360px;
  overflow: auto;
  border-radius: 18px;
  background: rgba(255,255,255,0.35);
  border: 1px solid rgba(255,255,255,0.5);
}
.arch-soft-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.arch-soft-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(248, 250, 252, 0.92);
  backdrop-filter: blur(8px);
  padding: 10px 8px;
  text-align: left;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--soft-muted);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}
.arch-soft-table tbody td {
  padding: 8px;
  border-bottom: 1px dashed rgba(226, 232, 240, 0.85);
  vertical-align: middle;
}
.arch-soft-table tbody tr:hover td {
  background: rgba(255,255,255,0.45);
}
body.soft-theme-dark .arch-soft-table tbody tr:hover td {
  background: rgba(148, 163, 184, 0.14) !important;
}
.arch-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 0;
  border-radius: 999px;
  padding: 6px 11px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms var(--soft-ease), box-shadow 180ms ease, filter 140ms ease;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.75) inset,
    0 8px 16px rgba(15, 23, 42, 0.1);
}
.arch-chip:hover {
  transform: translateY(-1px) scale(1.03);
  filter: brightness(1.04);
}
.arch-chip:active { transform: translateY(0) scale(0.98); }
.arch-chip-op {
  color: #1e40af;
  background: linear-gradient(160deg, #dbeafe 0%, #93c5fd 48%, #60a5fa 100%);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.8) inset,
    0 8px 18px rgba(37, 99, 235, 0.28);
}
.arch-chip-name {
  color: #0f766e;
  background: linear-gradient(160deg, #ccfbf1 0%, #5eead4 50%, #2dd4bf 100%);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.8) inset,
    0 8px 18px rgba(13, 148, 136, 0.26);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.arch-metric {
  display: inline-flex;
  min-width: 52px;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 12px;
  font-weight: 900;
  font-size: 13px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.65), 0 4px 10px rgba(15,23,42,0.06);
}
.arch-metric-plan {
  background: linear-gradient(160deg, #f8fafc, #e2e8f0);
  color: #475569;
}
.arch-metric-fact {
  background: linear-gradient(160deg, #e0f2fe, #7dd3fc);
  color: #0c4a6e;
}
.arch-metric-eff {
  background: linear-gradient(160deg, #dbeafe, #93c5fd);
  color: #1d4ed8;
}
.arch-metric-pay {
  background: linear-gradient(160deg, #d1fae5, #6ee7b7);
  color: #047857;
}
.arch-def {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 11px;
  background: #fee2e2;
  color: #dc2626;
}
.arch-def-zero { color: #94a3b8; font-weight: 700; }
.arch-act-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 6px 8px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255,255,255,0.7) inset, 0 6px 14px rgba(15,23,42,0.08);
  transition: transform 150ms ease, filter 140ms ease;
}
.arch-act-btn:hover { transform: translateY(-1px); filter: brightness(1.03); }
.arch-act-edit {
  color: #b45309;
  background: linear-gradient(160deg, #fffbeb, #fde68a);
}
.arch-act-del {
  color: #b91c1c;
  background: linear-gradient(160deg, #fef2f2, #fecaca);
}
body.soft-theme-dark .arch-soft-card,
body.soft-theme-dark .arch-soft-table-wrap {
  background: rgba(32, 34, 48, 0.62);
  border-color: rgba(255,255,255,0.12);
}
body.soft-theme-dark .arch-soft-table thead th {
  background: rgba(28, 30, 40, 0.92);
  color: #a8a29e;
}
body.soft-theme-dark .eq-soft-floor {
  background: rgba(32, 34, 48, 0.55);
  border-color: rgba(255,255,255,0.1);
}

/* Dark: kill light-row / light-chip hovers across MEScam tables & lists */
body.soft-theme-dark tbody tr:hover,
body.soft-theme-dark tbody tr:hover td,
body.soft-theme-dark tbody tr:not(.broken-machine):hover {
  background-color: rgba(148, 163, 184, 0.12) !important;
  background: rgba(148, 163, 184, 0.12) !important;
}
body.soft-theme-dark .sl-actions button:hover,
body.soft-theme-dark .settings-nav-btn:hover,
body.soft-theme-dark .soft-orders-pill:hover,
body.soft-theme-dark .eq-learn-row:hover,
body.soft-theme-dark .sw-day-slide:hover,
body.soft-theme-dark .sop-wide:hover,
body.soft-theme-dark .soft-order-card:hover {
  background: rgba(255, 255, 255, 0.08) !important;
}
body.soft-theme-dark .eq-card-kpi {
  background: rgba(15, 23, 42, 0.55) !important;
  color: #e2e8f0 !important;
}
body.soft-theme-dark .emp-photo-btn:hover {
  background: rgba(59, 130, 246, 0.25) !important;
}

/* ——— Settings grouped nav ——— */
.settings-nav-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.settings-nav-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--soft-muted);
  padding: 0 6px 2px;
}
.settings-nav-btn {
  background: rgba(255,255,255,0.55) !important;
  border: 1px solid rgba(255,255,255,0.65) !important;
  border-radius: 14px !important;
  box-shadow: var(--soft-shadow-sm);
  backdrop-filter: blur(10px);
  transition: transform 160ms var(--soft-ease), box-shadow 180ms ease, background 160ms ease;
}
.settings-nav-btn:hover {
  transform: translateX(3px);
  box-shadow: 0 10px 22px var(--soft-glow);
}
.settings-nav-btn.active {
  background: linear-gradient(145deg, #1e293b, #0f172a) !important;
  color: #fff !important;
  border-color: transparent !important;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.28) !important;
}
.settings-group.settings-block {
  background: rgba(255,255,255,0.52) !important;
  border: 1px solid rgba(255,255,255,0.6) !important;
  border-radius: 24px !important;
  box-shadow: 0 16px 36px rgba(15,23,42,0.08), inset 0 1px 0 rgba(255,255,255,0.7) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  padding: 18px !important;
}


/* ——— Dashboard reorder + leaders/outsiders + modern trend ——— */
.sw-board-hint {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--soft-muted);
  margin: -2px 0 2px;
  opacity: 1;
}
.sw-board-hint .material-symbols-rounded { font-size: 16px; }
.sw-drag-handle {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  background: rgba(255,255,255,0.55);
  color: var(--soft-muted);
  box-shadow: var(--soft-shadow-sm);
  opacity: 0.55;
  transition: opacity 160ms ease, background 160ms ease;
}
.sw-card { position: relative; }
.sw-card:hover .sw-drag-handle,
.sw-card:focus-within .sw-drag-handle { opacity: 1; }
.sw-drag-handle:active { cursor: grabbing; }
.sw-drag-handle .material-symbols-rounded { font-size: 18px; }
.sw-card.sw-dragging {
  opacity: 0.55;
  transform: scale(0.98);
  box-shadow: 0 18px 40px rgba(15,23,42,0.18);
}
.sw-card.sw-drag-over {
  outline: 2px dashed rgba(37,99,235,0.45);
  outline-offset: 2px;
}

.sw-people-rail-card { overflow: hidden; min-height: 280px; }
.sw-people-rail {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 2px 10px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.sw-people-rail::-webkit-scrollbar { display: none; }

/* Widgets adapt to their own column width, not the viewport */
.soft-widget-board > .sw-card { container-type: inline-size; }
@container (min-width: 620px) {
  .sw-people-rail { scroll-snap-type: none; }
  .sw-people-pack { flex: 1 1 0; min-width: 0; }
  .sw-day-slide { flex-basis: calc(50% - 5px); }
}
@container (max-width: 300px) {
  .sw-day-slide { flex-basis: 88%; }
  .sw-people-pack { flex-basis: 94%; }
}
.sw-people-pack {
  flex: 0 0 min(420px, 88%);
  scroll-snap-align: start;
  border-radius: 20px;
  padding: 12px;
  background: rgba(255,255,255,0.5);
  border: 1px solid rgba(255,255,255,0.7);
  box-shadow: var(--soft-shadow-sm);
  min-height: 220px;
}
.sw-people-pack.is-lead {
  background: linear-gradient(160deg, rgba(16,185,129,0.18), rgba(255,255,255,0.7) 55%);
}
.sw-people-pack.is-out {
  background: linear-gradient(160deg, rgba(244,63,94,0.14), rgba(255,255,255,0.7) 55%);
}
body.soft-theme-dark .sw-people-pack {
  background: rgba(30, 41, 59, 0.55);
  border-color: rgba(255, 255, 255, 0.1);
}
body.soft-theme-dark .sw-people-pack.is-lead {
  background: linear-gradient(160deg, rgba(16,185,129,0.22), rgba(30,41,59,0.55) 55%);
}
body.soft-theme-dark .sw-people-pack.is-out {
  background: linear-gradient(160deg, rgba(244,63,94,0.2), rgba(30,41,59,0.55) 55%);
}
.sw-people-pack-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.sw-people-pack-head em {
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
  color: var(--soft-muted);
}
.sw-pack-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff;
}
.sw-pack-badge .material-symbols-rounded { font-size: 16px; }
.sw-pack-badge.lead {
  background: linear-gradient(135deg, #34d399, #059669);
  box-shadow: 0 8px 18px rgba(5,150,105,0.28), inset 0 1px 0 rgba(255,255,255,0.35);
}
.sw-pack-badge.out {
  background: linear-gradient(135deg, #fb7185, #e11d48);
  box-shadow: 0 8px 18px rgba(225,29,72,0.28), inset 0 1px 0 rgba(255,255,255,0.35);
}
.sw-people-cols {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.sw-person-card {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 10px 8px 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(255,255,255,0.75);
  box-shadow: 0 10px 22px rgba(15,23,42,0.06), inset 0 1px 0 rgba(255,255,255,0.8);
  cursor: pointer;
  transition: transform 160ms var(--soft-ease);
}
.sw-person-card:hover { transform: translateY(-3px); }
.sw-person-photo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  background: #e2e8f0;
  box-shadow:
    0 10px 22px rgba(15,23,42,0.18),
    inset 0 1px 0 rgba(255,255,255,0.5),
    0 0 0 3px rgba(255,255,255,0.85);
}
.sw-person-photo.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, #60a5fa, #2563eb);
}
.sw-person-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-top: -14px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(145deg, #fbbf24, #d97706);
  box-shadow:
    0 8px 16px rgba(217,119,6,0.35),
    inset 0 1px 0 rgba(255,255,255,0.45),
    0 0 0 2px rgba(255,255,255,0.7);
  transform: translateZ(0);
}
.sw-person-badge.out {
  background: linear-gradient(145deg, #94a3b8, #475569);
  box-shadow: 0 8px 16px rgba(71,85,105,0.3), inset 0 1px 0 rgba(255,255,255,0.35), 0 0 0 2px rgba(255,255,255,0.7);
}
.sw-person-badge .material-symbols-rounded { font-size: 12px; }
.sw-person-name {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--soft-ink);
  max-width: 100%;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sw-person-pct {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
}
.sw-person-pct.is-over { color: #059669; }
.sw-person-pct.is-under { color: #e11d48; }
.sw-person-sub {
  font-size: 10px;
  font-weight: 700;
  color: var(--soft-muted);
}
.sw-people-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  font-size: 12px;
  font-weight: 700;
  color: var(--soft-muted);
}
.sw-factory-gap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(15,23,42,0.04);
  font-size: 12px;
  font-weight: 700;
  color: var(--soft-muted);
}
.sw-factory-gap b {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--soft-ink);
}

.sw-trend-modern .sw-chart-glow {
  position: relative;
  border-radius: 18px;
  background:
    radial-gradient(420px 120px at 20% 0%, rgba(16,185,129,0.16), transparent 60%),
    radial-gradient(380px 100px at 90% 100%, rgba(59,130,246,0.12), transparent 55%),
    rgba(255,255,255,0.35);
  border: 1px solid rgba(255,255,255,0.55);
  padding: 8px 6px 4px;
  overflow: hidden;
}
.sw-trend-meta {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 700;
  color: var(--soft-muted);
}

.emp-photo-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 4px;
}
.emp-photo-preview {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: #e2e8f0;
  box-shadow: 0 6px 14px rgba(15,23,42,0.12), 0 0 0 2px #fff;
}
.emp-photo-btn {
  border: 0;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 10px;
  font-weight: 800;
  border-radius: 999px;
  padding: 4px 8px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.emp-photo-btn:hover { background: #dbeafe; }

body.soft-theme-dark .sw-people-pack,
body.soft-theme-dark .sw-person-card {
  background: rgba(30,41,59,0.55);
  border-color: rgba(255,255,255,0.1);
}
body.soft-theme-dark .sw-drag-handle {
  background: rgba(15,23,42,0.7);
  color: #cbd5e1;
}
body.soft-theme-dark .sw-trend-modern .sw-chart-glow {
  background:
    radial-gradient(420px 120px at 20% 0%, rgba(16,185,129,0.18), transparent 60%),
    rgba(15,23,42,0.35);
  border-color: rgba(255,255,255,0.1);
}
body.soft-theme-dark .sw-factory-gap { background: rgba(255,255,255,0.06); }
body.soft-theme-dark .sw-person-name { color: #f1f5f9; }

/* Scroll-hint host — avoid inline style.position thrashing */
.soft-scroll-host { position: relative; }

/* MESaat operation cards — stripe tint; dark keeps light text (index.html sets #0f172a on children) */
.sl-card {
  background: linear-gradient(155deg, color-mix(in srgb, var(--sl-stripe, #2563eb) 16%, #fff), #fff 58%) !important;
  border-color: color-mix(in srgb, var(--sl-stripe, #2563eb) 28%, #e2e8f0) !important;
}
body.soft-theme-dark .sl-card,
body.soft-theme-dark .sl-copy-pair .sl-card,
body.soft-theme-dark .sl-copy-pair .sl-card.is-copy-pair-src,
body.soft-theme-dark .sl-copy-pair .sl-card.is-copy-pair-dup {
  background: linear-gradient(155deg, color-mix(in srgb, var(--sl-stripe, #60a5fa) 34%, #161922), #1c2030 62%) !important;
  border-color: color-mix(in srgb, var(--sl-stripe, #60a5fa) 55%, transparent) !important;
  color: var(--soft-ink) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28), inset 0 0 0 1px color-mix(in srgb, var(--sl-stripe, #60a5fa) 35%, transparent) !important;
}
body.soft-theme-dark .sl-card.is-hot {
  background: linear-gradient(155deg, rgba(16, 185, 129, 0.38), #14241e 64%) !important;
  border-color: rgba(52, 211, 153, 0.55) !important;
}
body.soft-theme-dark .sl-card.is-low,
body.soft-theme-dark .sl-card.is-call {
  background: linear-gradient(155deg, rgba(244, 63, 94, 0.34), #241418 64%) !important;
  border-color: rgba(251, 113, 133, 0.5) !important;
}
body.soft-theme-dark .sl-card.is-way {
  background: linear-gradient(155deg, rgba(59, 130, 246, 0.34), #141c2e 64%) !important;
}
body.soft-theme-dark .sl-card.is-fix,
body.soft-theme-dark .sl-card.is-long {
  background: linear-gradient(155deg, rgba(245, 158, 11, 0.32), #261c10 64%) !important;
}
body.soft-theme-dark .sl-card.is-parts {
  background: linear-gradient(155deg, rgba(139, 92, 246, 0.34), #1a1428 64%) !important;
}
body.soft-theme-dark .sl-opname,
body.soft-theme-dark .sl-fact,
body.soft-theme-dark .sl-step,
body.soft-theme-dark .sl-insight,
body.soft-theme-dark .sl-insight b,
body.soft-theme-dark .sl-copy-note,
body.soft-theme-dark .sl-details label {
  color: #f8fafc !important;
}
body.soft-theme-dark .sl-opnum,
body.soft-theme-dark .sl-meta { color: #cbd5e1 !important; }
body.soft-theme-dark .sl-fact,
body.soft-theme-dark .sl-step,
body.soft-theme-dark .sl-insight,
body.soft-theme-dark .sl-thumb,
body.soft-theme-dark .sl-thumb img {
  background: rgba(255, 255, 255, 0.07) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}
body.soft-theme-dark .sl-insight.grow {
  background: rgba(16, 185, 129, 0.16) !important;
  border-color: rgba(52, 211, 153, 0.35) !important;
}
body.soft-theme-dark .sl-insight.warn {
  background: rgba(245, 158, 11, 0.16) !important;
  border-color: rgba(251, 191, 36, 0.4) !important;
}
body.soft-theme-dark .sl-plan-chip,
body.soft-theme-dark .sl-plan-chip .sl-plan-val {
  background: rgba(59, 130, 246, 0.18) !important;
  border-color: rgba(147, 197, 253, 0.35) !important;
  color: #bfdbfe !important;
}
body.soft-theme-dark .sl-copy-pair {
  background: linear-gradient(160deg, rgba(37, 99, 235, 0.22), rgba(22, 25, 34, 0.7)) !important;
  border-color: rgba(96, 165, 250, 0.45) !important;
}
body.soft-theme-dark .sl-copy-pair-hint { color: #93c5fd !important; }

/* SOP catalog cards in dark */
body.soft-theme-dark .sop-wide,
body.soft-theme-dark .sop-wide:hover {
  background: linear-gradient(145deg, rgba(45, 212, 191, 0.16), #1c2030 55%) !important;
  border-color: rgba(45, 212, 191, 0.35) !important;
  color: var(--soft-ink) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28) !important;
}
body.soft-theme-dark .sop-wide.has-order.order-sent {
  background: linear-gradient(145deg, rgba(13, 148, 136, 0.32), #142420 58%) !important;
  border-color: rgba(45, 212, 191, 0.45) !important;
}
body.soft-theme-dark .sop-wide.has-order.order-accepted {
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.28), #141c2c 58%) !important;
  border-color: rgba(147, 197, 253, 0.4) !important;
}
body.soft-theme-dark .sop-wide.has-order.order-review {
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.28), #1a1428 58%) !important;
  border-color: rgba(196, 181, 253, 0.4) !important;
}
body.soft-theme-dark .sop-wide-name,
body.soft-theme-dark .sop-metric input,
body.soft-theme-dark .sop-metric-v,
body.soft-theme-dark .sop-wide-num .catOpNum {
  color: #f8fafc !important;
}
body.soft-theme-dark .sop-wide-num span,
body.soft-theme-dark .sop-metric-l {
  color: #cbd5e1 !important;
}
body.soft-theme-dark .sop-metric,
body.soft-theme-dark .sop-wide-ph {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: none !important;
}

/* Status pulse — contour only, no blur */
@keyframes soft-status-pulse {
  0%, 100% { outline-color: transparent; }
  50% { outline-color: var(--pulse, #e11d48); }
}
.sl-card.is-call,
.sl-card.is-way,
.sl-card.is-fix,
.sl-card.is-long,
.sl-card.is-parts,
.sl-mech-badge.show,
.persistent-notif,
.repair-timer-badge,
.soft-hero-card[data-state="bad"],
.soft-hero-card[data-state="warn"] {
  outline: 2px solid transparent;
  outline-offset: 3px;
  animation: soft-status-pulse 2.6s ease-in-out infinite;
}
.sl-card.is-call,
.sl-mech-badge.show,
.persistent-notif,
.soft-hero-card[data-state="bad"] { --pulse: #e11d48; }
.sl-card.is-way { --pulse: #2563eb; }
.sl-card.is-fix,
.sl-card.is-long,
.repair-timer-badge,
.soft-hero-card[data-state="warn"] { --pulse: #d97706; }
.sl-card.is-parts { --pulse: #7c3aed; }

.sw-widget-off { display: none !important; }
.sw-board-tools {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.sw-picker { position: relative; }
.sw-picker-btn,
.sw-picker-reset {
  border: 0;
  border-radius: 999px;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  color: var(--soft-ink);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--soft-shadow-sm);
}
.sw-picker-btn { display: inline-flex; align-items: center; gap: 4px; }
.sw-picker-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
  width: min(280px, 70vw);
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--soft-shadow-lift);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sw-picker-panel[hidden] { display: none !important; }
.sw-picker-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #1c1917;
  cursor: pointer;
}
.sw-picker-row:hover { background: rgba(148, 163, 184, 0.12); }
.sw-picker-reset { margin-top: 6px; background: transparent; box-shadow: none; color: var(--soft-muted); }
body.soft-theme-dark .sw-picker-btn { background: rgba(255, 255, 255, 0.08); }

/* ——— Command palette (⌘K) ——— */
.soft-cmdk-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  width: calc(100% - 8px);
  margin: 0 4px 12px;
  padding: 9px 10px 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.42);
  color: var(--soft-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 180ms ease, box-shadow 180ms ease, transform 180ms var(--soft-ease);
}
.soft-cmdk-trigger:hover {
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 24px var(--soft-glow);
  transform: translateY(-1px);
}
.soft-cmdk-trigger .material-symbols-rounded { font-size: 18px; color: var(--soft-accent); }
.soft-cmdk-trigger .lbl { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.soft-cmdk-trigger kbd,
.mes-cmdk kbd {
  font-family: inherit;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(var(--soft-shadow-rgb), 0.07);
  color: var(--soft-muted);
}
body.soft-theme-dark .soft-cmdk-trigger {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}
body.soft-theme-dark .soft-cmdk-trigger:hover { background: rgba(148, 163, 184, 0.14); }
body.soft-theme-dark .soft-cmdk-trigger kbd,
body.soft-theme-dark .mes-cmdk kbd { background: rgba(255, 255, 255, 0.08); }

.mes-cmdk {
  width: min(560px, calc(100vw - 32px));
  max-height: min(70vh, 560px);
  margin: 12vh auto auto;
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: transparent;
  color: var(--soft-ink);
  overflow: visible;
}
.mes-cmdk::backdrop {
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.mes-cmdk[open] .mes-cmdk-box { animation: soft-modal-in 320ms var(--soft-ease) both; }
.mes-cmdk-box {
  display: flex;
  flex-direction: column;
  max-height: min(70vh, 560px);
  border-radius: 24px;
  background: #fff;
  color: #1c1917;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--soft-shadow-lift);
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  overflow: hidden;
}
.mes-cmdk-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(var(--soft-shadow-rgb), 0.08);
}
.mes-cmdk-search .material-symbols-rounded { color: var(--soft-accent); font-size: 22px; }
.mes-cmdk-search input {
  flex: 1;
  border: 0 !important;
  outline: none;
  background: transparent !important;
  box-shadow: none !important;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  color: var(--soft-ink);
  padding: 4px 0 !important;
  margin: 0 !important;
  min-height: 0;
}
.mes-cmdk-list {
  list-style: none;
  margin: 0;
  padding: 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.mes-cmdk-group {
  padding: 10px 12px 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--soft-muted);
}
.mes-cmdk-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 120ms ease;
}
.mes-cmdk-item .material-symbols-rounded {
  font-size: 20px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(var(--soft-shadow-rgb), 0.06);
  color: var(--soft-muted);
}
.mes-cmdk-item .lbl { flex: 1; }
.mes-cmdk-item .grp { font-size: 11px; font-weight: 700; color: var(--soft-muted); }
.mes-cmdk-item.on { background: color-mix(in srgb, var(--soft-accent) 12%, transparent); }
.mes-cmdk-item.on .material-symbols-rounded {
  background: linear-gradient(135deg, var(--soft-accent), var(--soft-accent-2));
  color: #fff;
}
.mes-cmdk-empty { padding: 22px 12px; text-align: center; color: var(--soft-muted); font-weight: 700; }
.mes-cmdk-foot {
  display: flex;
  gap: 16px;
  padding: 10px 16px;
  border-top: 1px solid rgba(var(--soft-shadow-rgb), 0.08);
  font-size: 11px;
  font-weight: 700;
  color: var(--soft-muted);
}
.mes-cmdk-foot kbd { margin-right: 3px; }
body.soft-theme-dark .mes-cmdk::backdrop { background: rgba(2, 6, 23, 0.55); }
body.soft-theme-dark .mes-cmdk-box { border-color: rgba(255, 255, 255, 0.1); }
body.soft-theme-dark .mes-cmdk-search,
body.soft-theme-dark .mes-cmdk-foot { border-color: rgba(255, 255, 255, 0.08); }
body.soft-theme-dark .mes-cmdk-item .material-symbols-rounded { background: rgba(255, 255, 255, 0.06); }
body.soft-theme-dark .mes-cmdk-item.on { background: rgba(148, 163, 184, 0.14); }

/* Status pulse — contour only, no blur */
@keyframes soft-status-pulse {
  0%, 100% { outline-color: transparent; }
  50% { outline-color: var(--pulse, #e11d48); }
}
.sl-card.is-call,
.sl-card.is-way,
.sl-card.is-fix,
.sl-card.is-long,
.sl-card.is-parts,
.sl-mech-badge.show,
.persistent-notif,
.repair-timer-badge,
.soft-hero-card[data-state="bad"],
.soft-hero-card[data-state="warn"] {
  outline: 2px solid transparent;
  outline-offset: 3px;
  animation: soft-status-pulse 2.6s ease-in-out infinite;
}
.sl-card.is-call,
.sl-mech-badge.show,
.persistent-notif,
.soft-hero-card[data-state="bad"] { --pulse: #e11d48; }
.sl-card.is-way { --pulse: #2563eb; }
.sl-card.is-fix,
.sl-card.is-long,
.repair-timer-badge,
.soft-hero-card[data-state="warn"] { --pulse: #d97706; }
.sl-card.is-parts { --pulse: #7c3aed; }

.sw-widget-off { display: none !important; }
.sw-board-tools {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.sw-picker { position: relative; margin-left: auto; flex: 0 0 auto; }
.sw-picker-btn,
.sw-picker-reset {
  border: 0;
  border-radius: 999px;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  color: #1c1917 !important;
  background: #fff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
}
.sw-picker-btn { display: inline-flex; align-items: center; gap: 4px; }
.sw-picker-btn .material-symbols-rounded { font-size: 16px; color: #1c1917 !important; }
.sw-picker-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 40;
  width: min(320px, 78vw);
  overflow: visible;
  padding: 8px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(28, 25, 23, 0.08);
  box-shadow: var(--soft-shadow-lift);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.sw-picker-panel[hidden] { display: none !important; }
.sw-picker-row {
  display: flex !important;
  align-items: flex-start;
  gap: 8px;
  margin: 0 !important;
  padding: 7px 8px;
  border-radius: 10px;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  line-height: 1.25;
  color: #1c1917 !important;
  cursor: pointer;
}
.sw-picker-row input {
  width: 15px !important;
  height: 15px !important;
  min-height: 0 !important;
  flex: 0 0 15px;
  margin: 1px 0 0 !important;
  padding: 0 !important;
  accent-color: #e11d48;
}
.sw-picker-row span { color: #1c1917 !important; }
.sw-picker-row:hover { background: rgba(148, 163, 184, 0.14); }
.sw-picker-reset {
  grid-column: 1 / -1;
  margin-top: 2px;
  background: transparent;
  box-shadow: none;
  color: #57534e !important;
}
body.soft-theme-dark .sw-picker-btn,
body.soft-theme-dark .sw-picker-btn .material-symbols-rounded,
body.soft-theme-dark .sw-picker-row,
body.soft-theme-dark .sw-picker-row span,
body.soft-theme-dark .sw-picker-reset {
  color: #1c1917 !important;
}
body.soft-theme-dark .sw-picker-btn { background: #fff; }

/* Mobile drawer stays on the viewport. A leftover transform on .app-container
   made position:fixed menus and dialogs follow the growing page after data load. */
@media (max-width: 900px) {
  .app-container,
  .app {
    animation: none !important;
    transform: none !important;
  }
  .menu-toggle {
    display: inline-flex !important;
    position: fixed !important;
    top: max(10px, env(safe-area-inset-top)) !important;
    left: max(10px, env(safe-area-inset-left)) !important;
    z-index: 90 !important;
    width: 44px !important;
    height: 44px !important;
    align-items: center !important;
    justify-content: center !important;
    pointer-events: auto !important;
  }
  .sidebar-backdrop { z-index: 70 !important; }
  body.nav-open .sidebar-backdrop { display: block !important; }
  .sidebar,
  body.sidebar-collapsed .sidebar,
  body.mes-forms .sidebar,
  body.mes-forms.sidebar-collapsed .sidebar,
  body.sidebar-collapsed.mes-forms .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    width: min(86vw, 300px) !important;
    min-width: 0 !important;
    max-width: 86vw !important;
    flex: none !important;
    margin: 0 !important;
    padding: 18px 14px calc(18px + env(safe-area-inset-bottom)) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    transform: translateX(-105%) !important;
    z-index: 80 !important;
  }
  body.nav-open .sidebar,
  body.sidebar-collapsed.nav-open .sidebar,
  body.mes-forms.nav-open .sidebar,
  body.mes-forms.sidebar-collapsed.nav-open .sidebar,
  body.sidebar-collapsed.mes-forms.nav-open .sidebar {
    transform: translateX(0) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    width: min(86vw, 300px) !important;
    max-width: 86vw !important;
    flex: none !important;
  }
  .modal-backdrop:not(.hidden) {
    position: fixed !important;
    inset: 0 !important;
    height: 100dvh !important;
    transform: none !important;
    align-items: flex-start !important;
    overflow-y: auto !important;
  }
  .modal-backdrop:not(.hidden) .modal-window {
    transform: none !important;
    margin-top: 8px !important;
    max-height: calc(100dvh - 24px) !important;
  }
}
