/* ============================================================
   FactoryCore Design System - Modern SaaS ERP
   Primary #00AFC6 · Black #000000 · BG #F8FAFC · Accent #0284C7
   ============================================================ */

/* Hide Google / browser translate overlays if a browser still injects them */
.goog-te-banner-frame,
.goog-te-balloon-frame,
.goog-te-ftab-frame,
.skiptranslate,
#google_translate_element,
#goog-gt-tt,
#gtx-trans,
iframe[src*="translate.google"],
iframe[src*="translate.googleapis"] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
html.translated-ltr body,
html.translated-rtl body,
body {
  top: 0 !important;
}

:root {
  /* Brand */
  --fc-primary: #00AFC6;
  --fc-primary-hover: #009BB0;
  --fc-primary-deep: #007A8A;
  --fc-primary-50: #E8F8FB;
  --fc-primary-100: #D1F1F6;
  --fc-accent: #0284C7;
  --fc-accent-hover: #0369A1;
  --fc-accent-50: #F0F9FF;
  --fc-black: #000000;
  --fc-bg: #F8FAFC;
  --fc-surface: #FFFFFF;
  --fc-border: #E8EEF3;
  --fc-border-strong: #D5DEE7;
  --fc-text: #0F172A;
  /* Secondary / muted: professional slate, readable on light BG */
  --fc-text-secondary: #334155;
  --fc-muted: #475569;
  --fc-text-muted: #475569;
  --fc-success: #00AFC6;
  --fc-success-50: #E8F8FB;
  --fc-warning: #64748B;
  --fc-warning-50: #F1F5F9;
  --fc-danger: #EF4444;
  --fc-danger-50: #FEF2F2;
  --fc-info: #0284C7;
  --fc-info-50: #F0F9FF;

  /* Layout */
  --fc-sidebar-w: 272px;
  --fc-sidebar-collapsed: 80px;
  --fc-header-h: 68px;
  --fc-bottom-nav-h: 3.35rem;
  --fc-radius: 16px;
  --fc-radius-sm: 10px;
  --fc-radius-xs: 8px;
  --fc-shadow: 0 6px 22px rgba(15, 23, 42, 0.1), 0 2px 8px rgba(15, 23, 42, 0.05);
  --fc-shadow-lg: 0 14px 40px rgba(15, 23, 42, 0.14), 0 4px 12px rgba(15, 23, 42, 0.06);
  --fc-shadow-primary: 0 8px 24px rgba(0, 175, 198, 0.28);
  --fc-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  /* Dark-mode ready tokens (light sidebar matching main) */
  --fc-sidebar-bg: #FFFFFF;
  --fc-sidebar-text: #334155;
  --fc-sidebar-text-active: #007A8A;
  --fc-sidebar-border: #E8EEF3;
  --fc-sidebar-hover: #E8F8FB;
  --fc-sidebar-muted: #475569;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: auto;
  overflow-x: clip;
}

$body {
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--fc-bg);
  color: var(--fc-text);
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-size: 0.9375rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  max-width: 100vw;
}

/* Super-admin text style (Settings → Branding) */
html[data-text-style="sharp"] body,
html[data-text-style="sharp"] {
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: unset;
  text-rendering: geometricPrecision;
}
html[data-text-style="smooth"] body,
html[data-text-style="smooth"] {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
html[data-text-style="crisp"] body,
html[data-text-style="crisp"] {
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
  text-rendering: optimizeSpeed;
  letter-spacing: 0.01em;
}
html[data-text-style="readable"] body,
html[data-text-style="readable"] {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-size: 1rem;
  line-height: 1.65;
  letter-spacing: 0.015em;
}
html[data-text-style="bold"] body,
html[data-text-style="bold"] {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-weight: 500;
}
html[data-text-style="bold"] .fw-normal,
html[data-text-style="bold"] .btn,
html[data-text-style="bold"] .form-control,
html[data-text-style="bold"] .form-select,
html[data-text-style="bold"] .nav-link {
  font-weight: 500;
}
html[data-text-style="default"] body,
html[data-text-style="default"] {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: auto;
  text-rendering: auto;
}

/* Amharic UI fonts (local files only) */
body.locale-am,
html[data-ui-font="noto_sans"] body.locale-am {
  font-family: 'Noto Sans Ethiopic', Inter, system-ui, sans-serif;
}
html[data-ui-font="abyssinica"] body.locale-am {
  font-family: 'Abyssinica SIL', 'Noto Sans Ethiopic', Inter, system-ui, serif;
}
html[data-ui-font="noto_serif"] body.locale-am {
  font-family: 'Noto Serif Ethiopic', 'Noto Sans Ethiopic', Georgia, serif;
}
html[data-ui-font="system"] body.locale-am {
  font-family: 'Segoe UI', Nyala, 'Ebrima', 'Noto Sans Ethiopic', system-ui, sans-serif;
}

body.locale-am h1,
body.locale-am h2,
body.locale-am h3,
body.locale-am h4,
body.locale-am h5,
body.locale-am h6 {
  font-family: inherit;
  letter-spacing: 0;
}

.fc-lang-switch {
  margin: 0;
  flex-shrink: 0;
}

.fc-lang-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 2rem;
  padding: 0 0.55rem;
  border: 1px solid var(--fc-border);
  border-radius: 999px;
  background: var(--fc-surface);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition:
    border-color var(--fc-transition),
    box-shadow var(--fc-transition),
    background var(--fc-transition),
    transform 0.15s ease;
}

.fc-lang-btn:hover,
.fc-lang-btn:focus-visible {
  border-color: var(--fc-primary);
  background: var(--fc-primary-50);
  box-shadow: 0 0 0 3px rgba(0, 175, 198, 0.14);
  outline: none;
}

.fc-lang-btn:active {
  transform: scale(0.97);
}

.fc-lang-side {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.7rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--fc-muted);
  transition: background var(--fc-transition), color var(--fc-transition);
}

.fc-lang-side.is-active {
  background: var(--fc-primary);
  color: #fff;
}

.fc-lang-divider {
  width: 1px;
  height: 0.85rem;
  background: var(--fc-border-strong);
  opacity: 0.7;
}

.auth-card .fc-lang-btn {
  background: #fff;
}

/* Bootstrap muted helpers — match readable app gray */
.text-muted,
.form-text,
.small.text-muted,
small.text-muted {
  color: var(--fc-text-muted) !important;
}

h1, h2, h3, h4, h5, h6 {
  font-family: Inter, system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--fc-black);
  margin: 0;
}

a { color: var(--fc-primary); text-decoration: none; transition: color var(--fc-transition); }
a:hover { color: var(--fc-primary-deep); }

/* ---- Bootstrap brand overrides ---- */
.btn {
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: var(--fc-radius-xs);
  padding: 0.55rem 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: transform var(--fc-transition), box-shadow var(--fc-transition), background var(--fc-transition), border-color var(--fc-transition);
}

.btn-primary {
  --bs-btn-bg: var(--fc-primary);
  --bs-btn-border-color: var(--fc-primary);
  --bs-btn-hover-bg: var(--fc-primary-hover);
  --bs-btn-hover-border-color: var(--fc-primary-hover);
  --bs-btn-active-bg: var(--fc-primary-deep);
  --bs-btn-active-border-color: var(--fc-primary-deep);
  --bs-btn-disabled-bg: var(--fc-primary);
  box-shadow: 0 4px 14px rgba(0, 175, 198, 0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--fc-shadow-primary); }

.btn-outline-primary {
  --bs-btn-color: var(--fc-primary);
  --bs-btn-border-color: var(--fc-primary);
  --bs-btn-hover-bg: var(--fc-primary);
  --bs-btn-hover-border-color: var(--fc-primary);
  background: var(--fc-surface);
}
.btn-outline-primary:hover { transform: translateY(-1px); }

.btn-accent {
  background: var(--fc-accent);
  border: 1px solid var(--fc-accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.28);
}
.btn-accent:hover {
  background: var(--fc-accent-hover);
  border-color: var(--fc-accent-hover);
  color: #fff;
  transform: translateY(-1px);
}

/* No green action buttons — map Bootstrap success to brand aqua */
.btn-success,
.btn.btn-success {
  --bs-btn-bg: var(--fc-primary);
  --bs-btn-border-color: var(--fc-primary);
  --bs-btn-hover-bg: var(--fc-primary-hover);
  --bs-btn-hover-border-color: var(--fc-primary-hover);
  --bs-btn-active-bg: var(--fc-primary-deep);
  --bs-btn-active-border-color: var(--fc-primary-deep);
  background-color: var(--fc-primary) !important;
  border-color: var(--fc-primary) !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(0, 175, 198, 0.3);
}
.btn-success:hover,
.btn.btn-success:hover,
.btn-success:focus,
.btn.btn-success:focus {
  background-color: var(--fc-primary-hover) !important;
  border-color: var(--fc-primary-hover) !important;
  color: #fff !important;
}
.btn-outline-success,
.btn.btn-outline-success {
  --bs-btn-color: var(--fc-primary-deep);
  --bs-btn-border-color: var(--fc-primary);
  --bs-btn-hover-bg: var(--fc-primary);
  --bs-btn-hover-border-color: var(--fc-primary);
  --bs-btn-hover-color: #fff;
  color: var(--fc-primary-deep) !important;
  border-color: var(--fc-primary) !important;
  background: var(--fc-surface) !important;
}
.btn-outline-success:hover,
.btn.btn-outline-success:hover {
  background: var(--fc-primary) !important;
  border-color: var(--fc-primary) !important;
  color: #fff !important;
}

/* Reactivate target — real green (not theme teal success) */
.btn.fc-btn-reactivate,
.btn-success.fc-btn-reactivate {
  --bs-btn-bg: #16a34a;
  --bs-btn-border-color: #16a34a;
  --bs-btn-hover-bg: #15803d;
  --bs-btn-hover-border-color: #15803d;
  background-color: #16a34a !important;
  border-color: #16a34a !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.28);
}
.btn.fc-btn-reactivate:hover,
.btn.fc-btn-reactivate:focus,
.btn-success.fc-btn-reactivate:hover,
.btn-success.fc-btn-reactivate:focus {
  background-color: #15803d !important;
  border-color: #15803d !important;
  color: #fff !important;
}

.btn-danger {
  --bs-btn-bg: var(--fc-danger);
  --bs-btn-border-color: var(--fc-danger);
  --bs-btn-hover-bg: #DC2626;
}
.btn-outline-danger {
  --bs-btn-color: var(--fc-danger);
  --bs-btn-border-color: #FECACA;
  --bs-btn-hover-bg: var(--fc-danger);
  background: var(--fc-surface);
}
.btn-light, .btn-outline-secondary {
  background: var(--fc-surface);
  border-color: var(--fc-border-strong);
  color: var(--fc-text-secondary);
}
.btn-light:hover, .btn-outline-secondary:hover {
  background: var(--fc-bg);
  border-color: var(--fc-border-strong);
  color: var(--fc-text);
}
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; border-radius: 7px; }
.btn-lg { padding: 0.75rem 1.4rem; font-size: 0.95rem; border-radius: 12px; }
.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 12px;
  background: var(--fc-surface);
  border: 1px solid var(--fc-border);
  color: var(--fc-text-secondary);
}
.btn-icon:hover {
  background: var(--fc-primary-50);
  color: var(--fc-primary);
  border-color: var(--fc-primary-100);
}

.form-control, .form-select {
  border-radius: var(--fc-radius-xs);
  border: 1.5px solid var(--fc-border);
  padding: 0.7rem 0.95rem;
  background: var(--fc-surface);
  font-size: 0.9rem;
  transition: border-color var(--fc-transition), box-shadow var(--fc-transition);
}
.form-control:focus, .form-select:focus {
  border-color: var(--fc-primary);
  box-shadow: 0 0 0 4px rgba(0, 175, 198, 0.12);
}
.form-control-lg { padding: 0.85rem 1.1rem; border-radius: 12px; }
.form-label {
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--fc-text-secondary);
  margin-bottom: 0.4rem;
}
.form-check-input:checked {
  background-color: var(--fc-primary);
  border-color: var(--fc-primary);
}

/* ---- File inputs (Choose file) — project-wide ---- */
input[type="file"],
.form-control[type="file"] {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 0.4rem 0.55rem;
  color: var(--fc-text-secondary);
  background: var(--fc-surface);
  border: 1.5px solid var(--fc-border);
  border-radius: var(--fc-radius-xs);
  font-size: 0.875rem;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color var(--fc-transition), box-shadow var(--fc-transition), background var(--fc-transition);
}
input[type="file"]:hover,
.form-control[type="file"]:hover {
  border-color: rgba(0, 175, 198, 0.55);
  background: var(--fc-primary-50);
}
input[type="file"]:focus,
input[type="file"]:focus-visible,
.form-control[type="file"]:focus,
.form-control[type="file"]:focus-visible {
  outline: none;
  border-color: var(--fc-primary);
  box-shadow: 0 0 0 4px rgba(0, 175, 198, 0.12);
}
input[type="file"]:disabled,
.form-control[type="file"]:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  background: #f8fafc;
}

input[type="file"]::file-selector-button,
.form-control[type="file"]::file-selector-button {
  margin-inline-end: 0.75rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid rgba(0, 175, 198, 0.35);
  border-radius: 8px;
  background: linear-gradient(180deg, #E8F8FB 0%, #D1F1F6 100%);
  color: var(--fc-primary-deep);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background var(--fc-transition), border-color var(--fc-transition), color var(--fc-transition), box-shadow var(--fc-transition);
}
input[type="file"]::-webkit-file-upload-button,
.form-control[type="file"]::-webkit-file-upload-button {
  margin-inline-end: 0.75rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid rgba(0, 175, 198, 0.35);
  border-radius: 8px;
  background: linear-gradient(180deg, #E8F8FB 0%, #D1F1F6 100%);
  color: var(--fc-primary-deep);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: 0.01em;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: background var(--fc-transition), border-color var(--fc-transition), color var(--fc-transition), box-shadow var(--fc-transition);
}

input[type="file"]:hover::file-selector-button,
.form-control[type="file"]:hover::file-selector-button {
  background: linear-gradient(180deg, #D1F1F6 0%, #B8E8F0 100%);
  border-color: var(--fc-primary);
  color: var(--fc-primary-deep);
  box-shadow: 0 2px 8px rgba(0, 175, 198, 0.18);
}
input[type="file"]:hover::-webkit-file-upload-button,
.form-control[type="file"]:hover::-webkit-file-upload-button {
  background: linear-gradient(180deg, #D1F1F6 0%, #B8E8F0 100%);
  border-color: var(--fc-primary);
  color: var(--fc-primary-deep);
  box-shadow: 0 2px 8px rgba(0, 175, 198, 0.18);
}

.form-control-sm[type="file"],
input.form-control-sm[type="file"] {
  padding: 0.28rem 0.4rem;
  font-size: 0.8rem;
}
.form-control-sm[type="file"]::file-selector-button,
input.form-control-sm[type="file"]::file-selector-button {
  padding: 0.3rem 0.7rem;
  font-size: 0.72rem;
  margin-inline-end: 0.55rem;
}
.form-control-sm[type="file"]::-webkit-file-upload-button,
input.form-control-sm[type="file"]::-webkit-file-upload-button {
  padding: 0.3rem 0.7rem;
  font-size: 0.72rem;
  margin-inline-end: 0.55rem;
}

/* Input with icon */
.input-icon {
  position: relative;
}
.input-icon > i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--fc-muted);
  z-index: 2;
  font-size: 1rem;
}
.input-icon .form-control,
.input-icon .form-select {
  padding-left: 2.5rem;
}
.input-icon-password .form-control {
  padding-right: 2.75rem;
}
.password-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  background: transparent;
  color: var(--fc-muted);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}
.password-toggle:hover,
.password-toggle:focus-visible {
  color: var(--fc-primary-deep, #0284c7);
  background: rgba(0, 175, 198, 0.08);
  outline: none;
}
.password-toggle:focus-visible {
  box-shadow: 0 0 0 2px rgba(0, 175, 198, 0.35);
}
.fc-add-material-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}
.fc-add-material-btn.active {
  background: var(--fc-primary);
  border-color: var(--fc-primary);
  color: #fff;
}

/* Floating label field */
.field-float {
  position: relative;
}
.field-float .form-control {
  padding-top: 1.35rem;
  padding-bottom: 0.45rem;
}
.field-float label {
  position: absolute;
  left: 0.95rem;
  top: 0.35rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--fc-muted);
  margin: 0;
  pointer-events: none;
  z-index: 2;
}

.dropdown-menu {
  border: 1px solid var(--fc-border);
  border-radius: 14px;
  box-shadow: var(--fc-shadow-lg);
  padding: 0.5rem;
  min-width: 220px;
}
.dropdown-item {
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
}
.dropdown-item:hover, .dropdown-item:focus {
  background: var(--fc-primary-50);
  color: var(--fc-primary-deep);
}
.dropdown-item.text-danger:hover {
  background: var(--fc-danger-50);
  color: var(--fc-danger);
}

.alert {
  border: none;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.85rem 1rem;
}
.alert-success { background: var(--fc-success-50); color: var(--fc-primary-deep); }
.alert-danger { background: var(--fc-danger-50); color: #B91C1C; }
.alert-warning { background: var(--fc-warning-50); color: #334155; }
.alert-info { background: var(--fc-primary-50); color: var(--fc-primary-deep); }

/* Top pop-out flash toasts (all pages) */
.fc-flash-stack {
  position: fixed;
  top: calc(0.75rem + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 1090;
  width: min(32rem, calc(100vw - 1.25rem));
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.fc-flash-toast {
  pointer-events: auto;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
  box-shadow: 0 0.65rem 1.5rem rgba(15, 23, 42, 0.16);
  border: 1px solid rgba(15, 23, 42, 0.06);
  padding: 0.85rem 1rem;
  animation: fc-flash-in 0.28s ease-out;
}
.fc-flash-toast.alert-dismissible {
  padding-right: 1rem;
}
.fc-flash-toast.alert-dismissible .btn-close {
  position: static;
  top: auto;
  right: auto;
  z-index: auto;
  flex-shrink: 0;
  margin: 0;
  padding: 0.35rem;
  align-self: center;
  opacity: 0.55;
}
.fc-flash-toast.alert-dismissible .btn-close:hover {
  opacity: 0.85;
}
.fc-flash-toast-icon {
  flex-shrink: 0;
  font-size: 1.15rem;
  line-height: 1;
  margin-top: 0;
}
.fc-flash-toast-body {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.4;
  word-break: break-word;
}
.fc-flash-toast-success {
  border-color: rgba(0, 175, 198, 0.25);
}
.fc-flash-toast-danger {
  border-color: rgba(185, 28, 28, 0.2);
}
@keyframes fc-flash-in {
  from {
    opacity: 0;
    transform: translateY(-0.6rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 767.98px) {
  .fc-flash-stack {
    top: calc(0.5rem + env(safe-area-inset-top, 0px));
    width: calc(100vw - 1rem);
  }
}

.text-primary { color: var(--fc-primary) !important; }
.bg-primary { background-color: var(--fc-primary) !important; }

/* ============================================================
   APP SHELL
   ============================================================ */
.app-shell {
  display: flex;
  min-height: 100vh;
  background: var(--fc-bg);
}

/* ---- Sidebar (light, matches main aqua ERP theme) ---- */
.sidebar {
  width: var(--fc-sidebar-w);
  background: var(--fc-sidebar-bg);
  color: var(--fc-sidebar-text);
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1060;
  display: flex;
  flex-direction: column;
  transition: width var(--fc-transition), transform var(--fc-transition);
  border-right: 1px solid var(--fc-sidebar-border);
  box-shadow: 4px 0 24px rgba(15, 23, 42, 0.04);
}

.sidebar.collapsed {
  width: var(--fc-sidebar-collapsed);
}
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-section,
.sidebar.collapsed .nav-group,
.sidebar.collapsed .brand-text,
.sidebar.collapsed .sidebar-user-meta {
  display: none !important;
}
.sidebar.collapsed .sidebar-credit {
  justify-content: center;
  padding: 0.2rem 0;
}
.sidebar.collapsed .sidebar-user-short {
  display: grid;
}
.sidebar.collapsed .sidebar-nav > a {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}
.sidebar.collapsed .sidebar-brand {
  justify-content: center;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}
.sidebar.collapsed .sidebar-user {
  justify-content: center;
  padding: 0.65rem;
}

.sidebar-brand {
  height: var(--fc-header-h);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.55rem 1.25rem;
  border-bottom: 1px solid var(--fc-sidebar-border);
  background: linear-gradient(180deg, #F8FCFD 0%, #FFFFFF 100%);
  flex-shrink: 0;
}
.sidebar-brand-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}
.sidebar-brand.has-company .sidebar-brand-main {
  justify-content: center;
  position: relative;
}
.sidebar-brand.has-company .sidebar-brand-main .sidebar-close-btn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 0;
}
.sidebar-company-name {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  min-width: 0;
  text-align: center;
  padding: 0.15rem 0.25rem 0;
}
.sidebar-company-label {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.03em;
  color: var(--fc-primary);
  line-height: 1.25;
  text-align: center;
}
.sidebar.collapsed .sidebar-company-name {
  display: none;
}

.sidebar-close-btn {
  display: none;
  margin-left: auto;
  flex: 0 0 auto;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--fc-sidebar-border, #e2e8f0);
  border-radius: 10px;
  background: #fff;
  color: #64748b;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.sidebar-close-btn i {
  font-size: 1rem;
  line-height: 1;
  pointer-events: none;
}
.sidebar-close-btn:hover,
.sidebar-close-btn:focus-visible {
  color: #0f172a;
  background: #f8fafc;
  border-color: #cbd5e1;
  outline: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(145deg, #00C4DE, var(--fc-primary));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 175, 198, 0.28);
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.brand-text strong {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
  color: var(--fc-black);
}
.brand-text small {
  font-size: 0.65rem;
  color: var(--fc-sidebar-muted);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  overflow-anchor: none;
  padding: 0 0.75rem 0.85rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 175, 198, 0.25) transparent;
  overscroll-behavior: contain;
}

.nav-section {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fc-primary);
  opacity: 0.75;
  padding: 0.85rem 0.85rem 0.35rem;
}
.nav-section-home {
  display: block;
  opacity: 1;
  margin: 0 -0.75rem;
  padding: 0.65rem 0.75rem 0.25rem;
  background: transparent;
}
.nav-section-home .nav-section-label {
  display: block;
  opacity: 0.75;
  letter-spacing: 0.08em;
}
.sidebar-nav-search-wrap {
  flex: 0 0 auto;
  margin: 0;
  padding: 0.35rem 0.75rem 0.45rem;
  background: var(--fc-sidebar-bg);
  border-bottom: 0;
  box-shadow: none;
  z-index: 3;
}
.sidebar-nav-search {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0.2rem 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--fc-sidebar-muted);
  opacity: 1;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 500;
  cursor: text;
  box-shadow: none;
}
.sidebar-nav-search i {
  flex: 0 0 auto;
  font-size: 0.75rem;
  opacity: 0.7;
  pointer-events: none;
}
.sidebar-nav-search-input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--fc-sidebar-text);
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.2;
  padding: 0;
  box-shadow: none;
}
.sidebar-nav-search-input::placeholder {
  color: var(--fc-primary);
  opacity: 0.85;
  font-weight: 650;
}
.sidebar-nav-search:focus-within {
  border: 0;
  box-shadow: none;
}
.sidebar-company-exit {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 0 0.5rem 0.35rem;
}
.sidebar-nav-empty {
  display: none;
  margin: 0.35rem 0.5rem 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: #f8fafc;
  color: var(--fc-sidebar-muted);
  font-size: 0.78rem;
  font-weight: 500;
  text-align: center;
}
.sidebar-nav-empty:not([hidden]) {
  display: block;
}
.sidebar-nav > .nav-section.is-nav-filtered-out,
.sidebar-nav > .nav-group.is-nav-filtered-out,
.sidebar-nav > a.is-nav-filtered-out {
  display: none !important;
}
.sidebar.collapsed .sidebar-nav-search-wrap,
.sidebar.collapsed .sidebar-nav-search,
.sidebar.collapsed .sidebar-nav-empty {
  display: none !important;
}
.nav-group {
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fc-sidebar-muted);
  padding: 0.55rem 0.85rem 0.2rem;
  margin-top: 0.15rem;
}
.nav-section + .nav-group {
  padding-top: 0.35rem;
}

.sidebar-nav > a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.65rem 0.85rem;
  margin-bottom: 2px;
  border: none;
  background: transparent;
  color: var(--fc-sidebar-text);
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background var(--fc-transition), color var(--fc-transition), box-shadow var(--fc-transition);
  position: relative;
}

.sidebar-nav > a i {
  font-size: 1.1rem;
  width: 1.35rem;
  text-align: center;
  color: #7AA8B3;
  flex-shrink: 0;
  transition: color var(--fc-transition);
}

.sidebar-nav > a:hover {
  background: var(--fc-sidebar-hover);
  color: var(--fc-primary-deep);
}
.sidebar-nav > a:hover i {
  color: var(--fc-primary);
}

.sidebar-nav > a.active {
  background: var(--fc-primary-50);
  color: var(--fc-primary-deep);
  box-shadow: inset 3px 0 0 var(--fc-primary);
  font-weight: 600;
}
.sidebar-nav > a.active i { color: var(--fc-primary); }
.sidebar-nav > a:focus,
.sidebar-nav > a:focus-visible {
  outline: none;
  scroll-margin: 0;
}
.sidebar-nav > a.active:focus,
.sidebar-nav > a.active:focus-visible {
  background: var(--fc-primary-50);
  color: var(--fc-primary-deep);
}

.nav-label { flex: 1; white-space: nowrap; }
.nav-count {
  margin-left: auto;
  flex-shrink: 0;
  min-width: 1.85rem;
  height: 1.85rem;
  padding: 0 0.5rem;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--fc-accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  box-shadow: 0 2px 8px rgba(15, 118, 110, 0.28);
}
.sidebar-nav > a.active .nav-count,
.sidebar-nav > a:hover .nav-count {
  background: var(--fc-primary);
  box-shadow: 0 2px 8px rgba(0, 175, 198, 0.3);
}
.sidebar.collapsed .nav-count {
  position: absolute;
  top: 0.15rem;
  right: 0.2rem;
  margin-left: 0;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.28rem;
  font-size: 0.68rem;
  font-weight: 800;
  z-index: 1;
}

.sidebar-footer {
  border-top: 1px solid var(--fc-sidebar-border);
  padding: 0.85rem;
  flex-shrink: 0;
  background: #FAFCFD;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  background: var(--fc-primary-50);
  border: 1px solid var(--fc-primary-100);
  text-decoration: none;
  color: inherit;
  transition: background var(--fc-transition), border-color var(--fc-transition), box-shadow var(--fc-transition);
}
.sidebar-user:hover {
  background: #E6F8FB;
  border-color: var(--fc-primary-100);
  color: inherit;
  box-shadow: 0 4px 12px rgba(0, 175, 198, 0.1);
}
a.sidebar-user.active {
  background: #DFF5F9;
  border-color: rgba(0, 175, 198, 0.35);
}
.sidebar-user-short {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fff;
  color: var(--fc-primary-deep);
  border: 1px solid var(--fc-primary-100);
  place-items: center;
  font-weight: 650;
  font-size: 0.85rem;
  overflow: hidden;
  flex-shrink: 0;
}
.sidebar-user-meta {
  min-width: 0;
  flex: 1;
}
.sidebar-user-meta strong {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--fc-black);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-meta span {
  display: block;
  font-size: 0.68rem;
  color: var(--fc-sidebar-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-credit {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.1rem 0.25rem 0;
  user-select: none;
  line-height: 1.2;
}
.sidebar-credit-name {
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.03em;
  color: #64748b;
}
.sidebar-credit-ver {
  font-size: 0.58rem;
  font-weight: 550;
  color: #94a3b8;
}

/* ---- Main wrap ---- */
.main-wrap {
  flex: 1;
  margin-left: var(--fc-sidebar-w);
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: margin-left var(--fc-transition);
}
body.sidebar-collapsed .main-wrap {
  margin-left: var(--fc-sidebar-collapsed);
}

/* ---- Topbar ---- */
.topbar {
  height: var(--fc-header-h);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--fc-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 1020;
  gap: 1rem;
  overflow: visible;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.topbar-title-wrap { min-width: 0; }
.topbar-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-date {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.1rem;
  font-size: 0.72rem;
  font-weight: 550;
  color: var(--fc-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}
.topbar-date i {
  font-size: 0.78rem;
  color: var(--fc-primary);
  flex-shrink: 0;
}
.topbar-shifts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.25rem;
  max-width: 100%;
}
.topbar-shift-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 650;
  line-height: 1.3;
  color: var(--fc-muted);
  background: #f1f5f9;
  border: 1px solid var(--fc-border, #e2e8f0);
  white-space: nowrap;
}
.topbar-shift-chip.is-current {
  color: #007a8a;
  background: #e8f8fb;
  border-color: rgba(0, 175, 198, 0.35);
}
.topbar-shift-now {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.08rem;
  min-width: 0;
  max-width: 100%;
}
.topbar-shift-now.is-title {
  margin-top: 0;
}
.topbar-shift-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem;
  margin: 0;
  white-space: normal;
}
.topbar-shift-name {
  font-size: inherit;
  font-weight: 700;
  color: inherit;
  line-height: 1.2;
}
.topbar-shift-period {
  font-size: 0.85em;
  font-weight: 650;
  color: #007a8a;
  line-height: 1.2;
}
.topbar-shift-time {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.65rem;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--fc-muted);
  line-height: 1.2;
  max-width: 100%;
}
.topbar-shift-now-clock {
  font-weight: 700;
  color: var(--fc-text, #0f172a);
}
.topbar-shift-range {
  color: var(--fc-muted);
}
.topbar-shift-time-solo {
  margin-top: 0.15rem;
}
@media (max-width: 575.98px) {
  .topbar-shift-period {
    font-size: 0.8em;
  }
  .topbar-shift-time {
    font-size: 0.58rem;
  }
}
@media (max-width: 767.98px) {
  .topbar-title {
    font-size: 0.95rem;
    letter-spacing: -0.015em;
    line-height: 1.25;
  }
  .breadcrumb-fc {
    font-size: 0.68rem;
  }
  .topbar-left {
    gap: 0.45rem;
    flex: 1;
    min-width: 0;
  }
  .topbar-title-wrap {
    flex: 1;
    min-width: 0;
  }
}
@media (max-width: 575.98px) {
  :root {
    --fc-header-h: 3.25rem;
  }
  .topbar-title {
    font-size: 0.86rem;
    max-width: 100%;
  }
  .breadcrumb-fc {
    display: none;
  }
  .topbar {
    padding-left: max(0.65rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.65rem, env(safe-area-inset-right, 0px));
    gap: 0.4rem;
  }
  .page-toolbar {
    align-items: stretch;
    gap: 0.55rem;
  }
  .page-toolbar > .d-flex.flex-wrap.gap-2 {
    width: 100%;
  }
  .page-toolbar .btn {
    flex: 1 1 auto;
    justify-content: center;
    font-size: 0.8rem;
    padding: 0.45rem 0.7rem;
  }
  .machine-status-chips {
    gap: 0.35rem;
  }
}

.breadcrumb-fc {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--fc-muted);
  margin: 0;
  padding: 0;
  list-style: none;
}
.breadcrumb-fc a { color: var(--fc-muted); }
.breadcrumb-fc a:hover { color: var(--fc-primary); }
.breadcrumb-fc .sep { opacity: 0.4; }
.breadcrumb-fc .current { color: var(--fc-text-secondary); font-weight: 550; }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
  overflow: visible;
}

.notif-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--fc-border);
  background: var(--fc-surface);
  color: var(--fc-text-secondary);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  transition: all var(--fc-transition);
  overflow: visible;
}
.notif-btn:hover {
  background: var(--fc-primary-50);
  color: var(--fc-primary);
  border-color: var(--fc-primary-100);
}
.notif-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 9px;
  height: 9px;
  background: var(--fc-danger);
  border-radius: 50%;
  border: 2px solid #fff;
  z-index: 2;
  pointer-events: none;
}
.notif-count {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  background: var(--fc-danger);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  display: inline-grid;
  place-items: center;
  text-align: center;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(239, 68, 68, 0.35);
  z-index: 2;
  box-sizing: border-box;
  pointer-events: none;
}
.notif-btn:has(.notif-count:not(.d-none)) .notif-dot {
  display: none;
}

/* Notifications preview modal */
.fc-notif-modal {
  border: 0;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
}
.fc-notif-header {
  border-bottom: 1px solid var(--fc-border);
  padding: 1.1rem 1.25rem 0.9rem;
  align-items: flex-start;
}
.fc-notif-header .modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
}
.fc-notif-subtitle {
  font-size: 0.78rem;
  color: var(--fc-text-muted);
  margin-top: 0.2rem;
  padding-left: 1.85rem;
}
.fc-notif-footer {
  border-top: 1px solid var(--fc-border);
  background: #F8FAFC;
  padding: 0.75rem 1rem;
}
.fc-notif-empty {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--fc-text-muted);
}
.fc-notif-empty .empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 0.85rem;
  border-radius: 16px;
  background: var(--fc-primary-50);
  color: var(--fc-primary);
  display: grid;
  place-items: center;
  font-size: 1.4rem;
}
.fc-notif-empty h6 {
  margin: 0 0 0.35rem;
  color: var(--fc-text);
  font-weight: 600;
}
.fc-notif-empty p {
  margin: 0;
  font-size: 0.85rem;
}
.fc-notif-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1.15rem;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--fc-border);
  transition: background 0.15s ease, border-color 0.15s ease;
  position: relative;
}
.fc-notif-item:last-child {
  border-bottom: 0;
}
.fc-notif-item:hover {
  background: var(--fc-primary-50);
}
/* Unopened — aqua blue */
.fc-notif-item.is-unread {
  background: rgba(0, 175, 198, 0.14);
  border-left: 3px solid var(--fc-primary);
}
.fc-notif-item.is-unread:hover {
  background: rgba(0, 175, 198, 0.22);
}
.fc-notif-item.is-unread .fc-notif-item-title {
  color: var(--fc-primary-deep);
}
.fc-notif-item.is-unread .fc-notif-item-icon {
  background: var(--fc-primary);
  color: #fff;
}
/* Opened / read — muted */
.fc-notif-item.is-opened {
  background: #F8FAFC;
  opacity: 0.92;
}
.fc-notif-item.is-opened:hover {
  background: #F1F5F9;
}
.fc-notif-item.is-opened .fc-notif-item-title {
  font-weight: 500;
  color: var(--fc-text-secondary);
}
.fc-notif-item.is-opened .fc-notif-item-icon {
  background: #E2E8F0;
  color: var(--fc-muted);
}
.fc-notif-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #F1F5F9;
  color: var(--fc-text-secondary);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 1rem;
}
.fc-notif-item-body {
  min-width: 0;
  flex: 1;
}
.fc-notif-item-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--fc-text);
  line-height: 1.3;
}
.fc-notif-item-msg {
  font-size: 0.8rem;
  color: var(--fc-text-secondary);
  margin-top: 0.15rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fc-notif-item-time {
  font-size: 0.72rem;
  color: var(--fc-text-muted);
  margin-top: 0.3rem;
}
.fc-notif-item-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fc-primary);
  flex-shrink: 0;
  margin-top: 0.45rem;
  box-shadow: 0 0 0 3px rgba(0, 175, 198, 0.25);
}
#fcNotifModal .modal-dialog {
  max-width: 420px;
}
#fcNotifModal .modal-body {
  max-height: min(60vh, 420px);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.3rem 0.65rem 0.3rem 0.3rem !important;
  border-radius: 12px !important;
  border: 1px solid var(--fc-border) !important;
  background: var(--fc-surface) !important;
}
.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--fc-primary-50), var(--fc-primary-100));
  color: var(--fc-primary-deep);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
  overflow: hidden;
  flex-shrink: 0;
}
.user-avatar.has-photo,
.profile-hero-avatar.has-photo,
.profile-avatar-preview.has-photo,
.sidebar-user-short.has-photo {
  padding: 0;
  background: #e2e8f0;
}
.user-avatar img,
.profile-hero-avatar img,
.profile-avatar-preview img,
.sidebar-user-short img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  margin: auto;
}
.profile-avatar-preview {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: linear-gradient(145deg, #00C4DE, var(--fc-primary));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

/* Small table / list thumbs: keep original aspect, never stretch */
.fc-table-thumb,
.fc-target-model-img,
.fc-entry-await-thumb,
.fc-entry-product-thumb,
.fc-cover-thumb,
.fc-dispatch-product-img,
.table-fc img[data-fc-image-preview],
.table-responsive img[data-fc-image-preview],
.table-responsive-cards img[data-fc-image-preview] {
  width: auto !important;
  height: auto !important;
  max-width: 40px;
  max-height: 40px;
  object-fit: contain;
  object-position: center;
  flex-shrink: 0;
  background: #F1F5F9;
  border-radius: 0.4rem;
  display: block;
}
.profile-photo-thumb {
  width: auto !important;
  height: auto !important;
  max-width: 120px;
  max-height: 120px;
  object-fit: contain;
  object-position: center;
  display: block;
  background: #F1F5F9;
}

.page-content {
  padding: 1.5rem;
  padding-bottom: 2rem;
  flex: 1;
  animation: pageIn 0.35s ease;
  min-width: 0;
  max-width: 100%;
}

/* ============================================================
   CARDS & PANELS
   ============================================================ */
.kpi-card {
  background: var(--fc-surface);
  border: 1px solid var(--fc-border);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  box-shadow: var(--fc-shadow);
  height: 100%;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
  overflow: hidden;
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
a.kpi-card:hover,
a.kpi-card:focus {
  color: inherit;
  text-decoration: none;
  transform: translateY(-4px);
  box-shadow: var(--fc-shadow-lg);
  border-color: rgba(0, 175, 198, 0.35);
  outline: none;
}
a.kpi-card:active {
  transform: translateY(-1px);
}
.kpi-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--fc-shadow-lg);
}
.kpi-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--fc-primary), #5FD4E3);
  opacity: 0;
  transition: opacity 0.3s;
}
.kpi-card:hover::after,
a.kpi-card:focus::after { opacity: 1; }
.kpi-card.is-accent::after {
  background: linear-gradient(90deg, var(--fc-accent), var(--fc-primary));
  opacity: 1;
}

.kpi-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.55rem;
  gap: 0.35rem;
}
.kpi-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 1rem;
  background: var(--fc-primary-50);
  color: var(--fc-primary);
  flex-shrink: 0;
}
.kpi-card.is-accent .kpi-icon {
  background: var(--fc-accent-50);
  color: var(--fc-accent);
}
.kpi-card.is-warning {
  border-color: rgba(220, 38, 38, 0.35);
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.12);
}
.kpi-card.is-warning .kpi-icon {
  background: var(--fc-danger-50, #FEF2F2);
  color: #DC2626;
}
.kpi-card.is-warning .kpi-value {
  color: #DC2626;
}

/* Dashboard warning alert cards */
.dash-warn-row {
  --dash-warn-gap: 0.5rem;
}
.dash-warn-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0.9rem 1rem;
  border-radius: var(--fc-radius, 14px);
  border: 1px solid var(--fc-border, #e2e8f0);
  background: #fff;
  text-decoration: none !important;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  min-width: 0;
}
.dash-warn-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--fc-shadow-lg, 0 10px 28px rgba(15, 23, 42, 0.08));
  border-color: rgba(220, 38, 38, 0.35);
  color: inherit;
}
.dash-warn-card.has-warning {
  border-color: rgba(220, 38, 38, 0.4);
  background: linear-gradient(180deg, #FFF7F7 0%, #fff 70%);
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.08);
}
.dash-warn-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}
.dash-warn-icon {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  background: #F1F5F9;
  color: var(--fc-muted, #64748b);
  font-size: 1rem;
}
.dash-warn-card.has-warning .dash-warn-icon {
  background: #FEF2F2;
  color: #DC2626;
}
.dash-warn-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 1.45rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  background: #DC2626;
  color: #fff;
}
.dash-warn-badge.is-ok {
  background: #E2E8F0;
  color: #475569;
}
.dash-warn-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--fc-muted, #64748b);
  margin-bottom: 0.2rem;
}
.dash-warn-count {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--fc-text, #0f172a);
}
.dash-warn-card.has-warning .dash-warn-count {
  color: #DC2626;
}
.dash-warn-hint {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--fc-muted, #64748b);
  line-height: 1.3;
}
@media (max-width: 767.98px) {
  .dash-warn-card {
    padding: 0.8rem 0.85rem;
  }
  .dash-warn-count {
    font-size: 1.4rem;
  }
}

.kpi-trend {
  font-size: 0.65rem;
  font-weight: 650;
  padding: 0.15rem 0.4rem;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  line-height: 1.2;
  white-space: nowrap;
}
.kpi-trend.up { background: var(--fc-primary-50); color: var(--fc-primary-deep); }
.kpi-trend.down { background: var(--fc-danger-50); color: #DC2626; }
.kpi-trend.flat { background: #F1F5F9; color: var(--fc-muted); }

.kpi-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--fc-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.2rem;
  line-height: 1.25;
}
.kpi-value {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--fc-black);
}
.kpi-card.is-accent .kpi-value { color: var(--fc-accent); }
.kpi-desc {
  font-size: 0.7rem;
  color: var(--fc-muted);
  margin-top: 0.25rem;
  line-height: 1.3;
}

@media (min-width: 1200px) {
  .kpi-row.row-cols-xl-5 .kpi-desc,
  .kpi-row.row-cols-xl-6 .kpi-desc {
    font-size: 0.62rem;
  }
}

/* Dense KPI strip — fit 5–6 cards on one desktop row */
.kpi-row-compact {
  --bs-gutter-x: 0.5rem;
  --bs-gutter-y: 0.5rem;
}
.kpi-row-compact .kpi-card {
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
}
.kpi-row-compact .kpi-top {
  margin-bottom: 0.3rem;
}
.kpi-row-compact .kpi-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 0.85rem;
}
.kpi-row-compact .kpi-trend {
  font-size: 0.58rem;
  padding: 0.1rem 0.32rem;
}
.kpi-row-compact .kpi-label {
  font-size: 0.58rem;
  margin-bottom: 0.1rem;
  letter-spacing: 0.02em;
}
.kpi-row-compact .kpi-value {
  font-size: 1.15rem;
}
.kpi-row-compact .kpi-desc {
  font-size: 0.6rem;
  margin-top: 0.15rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (min-width: 1200px) {
  .kpi-row-compact .kpi-desc {
    -webkit-line-clamp: 1;
  }
}

/* Compact KPI cards on mobile */
@media (max-width: 767.98px) {
  .kpi-card {
    padding: 0.75rem 0.85rem;
    border-radius: 12px;
  }
  .kpi-top { margin-bottom: 0.45rem; }
  .kpi-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    font-size: 0.9rem;
  }
  .kpi-trend {
    font-size: 0.6rem;
    padding: 0.15rem 0.4rem;
  }
  .kpi-label {
    font-size: 0.62rem;
    margin-bottom: 0.15rem;
    letter-spacing: 0.02em;
  }
  .kpi-value {
    font-size: 1.25rem;
  }
  .kpi-desc {
    font-size: 0.65rem;
    margin-top: 0.2rem;
    line-height: 1.3;
  }
  .row.kpi-row {
    --bs-gutter-x: 0.6rem;
    --bs-gutter-y: 0.6rem;
  }
}

.panel {
  background: var(--fc-surface);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius);
  box-shadow: var(--fc-shadow);
  margin-bottom: 1.25rem;
  overflow: hidden;
  transition: box-shadow 0.3s;
}
/* Sticky tabs need a non-clipping ancestor */
.panel:has(> .fc-tabs),
.panel.production-tabs-panel {
  overflow: visible;
}
.panel:hover { box-shadow: var(--fc-shadow-lg); }

/* Shared card elevation — all project cards */
.kpi-card,
.stat-card,
.auth-card,
.table-wrap,
.ko-order-card,
.fc-shift-card,
.fc-machine-card,
.fc-request-update,
.fc-entry-group.panel,
.card {
  box-shadow: var(--fc-shadow);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.35rem;
  border-bottom: 1px solid var(--fc-border);
  gap: 0.75rem;
  flex-wrap: wrap;
  background: var(--fc-surface);
}
.panel-header h5 {
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
}
.panel-header h5 .ph-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--fc-primary-50);
  color: var(--fc-primary);
  display: grid;
  place-items: center;
  font-size: 0.95rem;
}
.panel-body { padding: 1.35rem; }

/* Legacy alias for older views */
.stat-card {
  background: var(--fc-surface);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius);
  padding: 1.25rem;
  box-shadow: var(--fc-shadow);
  height: 100%;
  transition: transform 0.3s, box-shadow 0.3s;
}
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--fc-shadow-lg); }
.stat-label { font-size: 0.78rem; color: var(--fc-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.stat-value { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.03em; }
.stat-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center; font-size: 1.2rem;
  background: var(--fc-primary-50); color: var(--fc-primary);
}
.stat-card.accent .stat-icon { background: var(--fc-accent-50); color: var(--fc-accent); }
.stat-card.accent .stat-value { color: var(--fc-accent); }

/* Compact KPI strips (Entries / Targets) */
.fc-stat-mini-row {
  --bs-gutter-x: 0.5rem;
  --bs-gutter-y: 0.4rem;
}
.stat-card.fc-stat-mini {
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  box-shadow: var(--fc-shadow);
}
.stat-card.fc-stat-mini:hover {
  transform: none;
  box-shadow: var(--fc-shadow-lg);
}
.stat-card.fc-stat-mini .stat-label {
  font-size: 0.58rem;
  margin-bottom: 0.1rem;
  letter-spacing: 0.04em;
}
.stat-card.fc-stat-mini .stat-value {
  font-size: 1.05rem;
  line-height: 1.15;
}
.stat-card.fc-stat-mini .stat-value small {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--fc-muted);
}
.stat-card.fc-stat-mini .stat-hint {
  font-size: 0.65rem;
  margin-top: 0.1rem;
  color: var(--fc-muted);
}
.stat-card.fc-stat-mini .fc-progress-wrap {
  margin-top: 0.25rem !important;
  gap: 0.3rem;
}
.stat-card.fc-stat-mini .progress-target {
  height: 5px;
}
.stat-card.fc-stat-mini .fc-progress-pct {
  font-size: 0.68rem;
}

/* ============================================================
   TABLES
   ============================================================ */
.table-wrap {
  background: var(--fc-surface);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius);
  box-shadow: var(--fc-shadow);
  overflow: hidden;
  margin-bottom: 1.25rem;
}
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--fc-border);
}
.table-search {
  position: relative;
  min-width: 200px;
  flex: 1;
  max-width: 280px;
}
.table-search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--fc-muted);
}
.table-search input {
  padding-left: 2.25rem;
  border-radius: 10px;
  border: 1.5px solid var(--fc-border);
  height: 40px;
  width: 100%;
  font-size: 0.85rem;
}
.table-search input:focus {
  outline: none;
  border-color: var(--fc-primary);
  box-shadow: 0 0 0 3px rgba(0, 175, 198, 0.12);
}

.table-fc {
  margin: 0;
  font-size: 0.875rem;
  width: 100%;
}
.table-fc thead th {
  background: #F4F7FA;
  color: var(--fc-muted);
  font-weight: 650;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: none;
  border-bottom: 1px solid var(--fc-border);
  white-space: nowrap;
  padding: 0.85rem 1.15rem;
}
.table-fc tfoot td {
  border-top: 2px solid var(--fc-border);
  background: rgba(15, 23, 42, 0.03);
  font-weight: 600;
  vertical-align: middle;
}
.table-fc td {
  padding: 0.95rem 1.15rem;
  vertical-align: middle;
  border-color: var(--fc-border);
  border-style: solid;
  border-width: 0 0 1px 0;
  color: var(--fc-text-secondary);
}
.table-fc tbody tr {
  transition: background 0.15s;
  background: var(--fc-surface);
}
.table-fc tbody tr:hover { background: rgba(0, 175, 198, 0.03); }
.table-fc tbody tr:last-child td { border-bottom: none; }
.table-fc .fw-semibold { color: var(--fc-text); }

.badge-status {
  font-weight: 600;
  font-size: 0.7rem;
  padding: 0.4em 0.75em;
  letter-spacing: 0.02em;
  border-radius: 20px;
  border: none;
}
.badge-status-sm {
  font-size: 0.62rem;
  padding: 0.2em 0.5em;
  letter-spacing: 0.01em;
  border-radius: 999px;
  font-weight: 600;
}

/* Kitchen order detail header */
.ko-order-card {
  overflow: hidden;
  border: 1px solid var(--fc-border);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}
.ko-order-card::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--fc-primary) 0%, #38bdf8 55%, #67e8f9 100%);
}
.ko-order-card .panel-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.05rem 1.1rem 1.15rem !important;
}
.ko-order-dates {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}
.ko-date-chip {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  min-width: 0;
  padding: 0.8rem 0.8rem 0.75rem;
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid #e8eef3;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.ko-date-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}
.ko-date-chip.is-plan {
  background: linear-gradient(160deg, #effafc 0%, #f8fcfd 100%);
  border-color: #d2f0f5;
}
.ko-date-chip.is-issued {
  background: linear-gradient(160deg, #f8fafc 0%, #ffffff 100%);
  border-color: #e2e8f0;
}
.ko-date-chip.is-received {
  background: linear-gradient(160deg, #f0fdf7 0%, #ffffff 100%);
  border-color: #c6f0db;
}
.ko-date-chip.is-pending {
  background: linear-gradient(160deg, #f8fafc 0%, #ffffff 100%);
  border-color: #e2e8f0;
}
.ko-date-chip-icon {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: inline-grid;
  place-items: center;
  border-radius: 11px;
  font-size: 0.95rem;
  background: #fff;
  color: var(--fc-primary-deep);
  border: 1px solid rgba(0, 175, 198, 0.18);
  box-shadow: 0 4px 10px rgba(0, 175, 198, 0.08);
}
.ko-date-chip.is-issued .ko-date-chip-icon {
  color: #475569;
  border-color: #e2e8f0;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.04);
}
.ko-date-chip.is-received .ko-date-chip-icon {
  color: #059669;
  border-color: #bbf7d0;
  box-shadow: 0 4px 10px rgba(5, 150, 105, 0.1);
}
.ko-date-chip.is-pending .ko-date-chip-icon {
  color: #64748b;
  border-color: #e2e8f0;
  box-shadow: none;
}
.ko-date-chip-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}
.ko-date-chip-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  line-height: 1.2;
}
body.locale-am .ko-date-chip-label {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.72rem;
  font-weight: 600;
}
.ko-date-chip-value {
  font-size: 0.86rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.35;
  word-break: break-word;
}
.ko-order-head {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border: 1px solid #eef2f6;
}
.ko-order-code-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
}
.ko-order-code {
  font-size: 1.28rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.035em;
  line-height: 1.15;
}
.ko-order-plan {
  font-size: 0.94rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.4;
}
.ko-order-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.ko-meta-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ko-order-who {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.7rem;
  margin-top: 0.15rem;
}
.ko-order-cook {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem 0.3rem 0.45rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #e8f8fb 0%, #f0f9ff 100%);
  color: var(--fc-primary-deep);
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid #c9eef4;
  box-shadow: 0 2px 8px rgba(0, 175, 198, 0.08);
}
.ko-order-cook .bi {
  width: 1.25rem;
  height: 1.25rem;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #fff;
  font-size: 0.75rem;
  color: var(--fc-primary);
}
.ko-order-hint {
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 500;
}
.ko-order-note {
  font-size: 0.8rem;
  color: #64748b;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px dashed #dbe3ec;
  line-height: 1.45;
}

@media (max-width: 767.98px) {
  .ko-order-dates {
    grid-template-columns: 1fr;
  }
  .ko-order-code {
    font-size: 1.15rem;
  }
}
@media (min-width: 768px) and (max-width: 991.98px) {
  .ko-order-dates {
    grid-template-columns: 1fr;
  }
}
.badge-status.bg-success,
.badge.bg-success { background: var(--fc-primary-50) !important; color: var(--fc-primary-deep) !important; }
.badge-status.bg-warning,
.badge.bg-warning { background: var(--fc-warning-50) !important; color: #334155 !important; }
.badge-status.bg-danger,
.badge.bg-danger { background: var(--fc-danger-50) !important; color: #DC2626 !important; }
.badge-status.bg-info,
.badge.bg-info { background: var(--fc-info-50) !important; color: #2563EB !important; }
.badge-status.bg-primary,
.badge.bg-primary { background: var(--fc-primary-50) !important; color: var(--fc-primary-deep) !important; }
.badge-status.bg-secondary,
.badge.bg-secondary { background: #F1F5F9 !important; color: #64748B !important; }
.badge.bg-dark { background: #0F172A !important; color: #fff !important; }

.fc-request-updates {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.fc-request-update {
  border: 1px solid var(--fc-border);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  background: #F8FAFC;
  box-shadow: var(--fc-shadow);
}
.fc-request-update-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.5rem;
  font-size: 0.78rem;
  margin-bottom: 0.35rem;
}
.fc-request-update-body {
  font-size: 0.92rem;
  color: var(--fc-text);
  white-space: pre-wrap;
}

.text-primary { color: var(--fc-primary) !important; }
.btn.btn-primary {
  background-color: var(--fc-primary) !important;
  border-color: var(--fc-primary) !important;
  color: #fff !important;
}
.btn.btn-primary:hover, .btn.btn-primary:focus {
  background-color: var(--fc-primary-hover) !important;
  border-color: var(--fc-primary-hover) !important;
  color: #fff !important;
}

/* Mobile table → cards (ALL .table-responsive with .table-fc — no horizontal scroll) */
@media (max-width: 767.98px) {
  .panel:has(.table-responsive),
  .panel:has(.fc-target-row),
  .panel.production-tabs-panel,
  .table-wrap {
    overflow: visible;
    max-width: 100%;
  }
  .table-responsive,
  .table-responsive.table-responsive-cards,
  .table-responsive-cards {
    overflow-x: visible !important;
    overflow-y: visible !important;
    padding: 0.75rem 0.7rem 0.85rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    -webkit-overflow-scrolling: auto;
  }
  .table-responsive .table-fc thead,
  .table-responsive-cards .table-fc thead { display: none; }
  .table-responsive .table-fc,
  .table-responsive .table-fc tbody,
  .table-responsive .table-fc tfoot,
  .table-responsive .table-fc tr,
  .table-responsive .table-fc td,
  .table-responsive-cards .table-fc,
  .table-responsive-cards .table-fc tbody,
  .table-responsive-cards .table-fc tfoot,
  .table-responsive-cards .table-fc tr,
  .table-responsive-cards .table-fc td {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .table-responsive .table-fc,
  .table-responsive-cards .table-fc {
    margin: 0;
  }
  .table-responsive .table-fc tbody,
  .table-responsive .table-fc tfoot,
  .table-responsive-cards .table-fc tbody,
  .table-responsive-cards .table-fc tfoot {
    padding: 0;
  }
  .table-responsive .table-fc tfoot tr,
  .table-responsive-cards .table-fc tfoot tr {
    background: rgba(15, 23, 42, 0.04);
  }
  .table-responsive .table-fc tfoot td[data-label=""]:empty,
  .table-responsive-cards .table-fc tfoot td[data-label=""]:empty {
    display: none;
  }
  .table-responsive .table-fc tr,
  .table-responsive-cards .table-fc tr {
    margin: 0 0 0.75rem;
    padding: 0.8rem 0.85rem;
    border: 1px solid var(--fc-border);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--fc-shadow);
  }
  .table-responsive .table-fc tr:last-child,
  .table-responsive-cards .table-fc tr:last-child {
    margin-bottom: 0;
  }
  .table-responsive .table-fc td,
  .table-responsive-cards .table-fc td {
    padding: 0.4rem 0;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    border-bottom: 1px solid #F1F5F9;
    min-width: 0 !important;
    white-space: normal;
  }
  .table-responsive .table-fc td > *,
  .table-responsive-cards .table-fc td > * {
    min-width: 0;
    max-width: 65%;
    text-align: right;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .table-responsive .table-fc td:last-child,
  .table-responsive-cards .table-fc td:last-child {
    border-bottom: none;
    padding-top: 0.65rem;
    justify-content: flex-end;
  }
  .table-responsive .table-fc td:last-child:not([data-label]),
  .table-responsive .table-fc td[data-label=""],
  .table-responsive-cards .table-fc td:last-child:not([data-label]),
  .table-responsive-cards .table-fc td[data-label=""] {
    justify-content: flex-end;
  }
  .table-responsive .table-fc td:last-child:not([data-label]) > *,
  .table-responsive .table-fc td[data-label=""] > *,
  .table-responsive-cards .table-fc td:last-child:not([data-label]) > *,
  .table-responsive-cards .table-fc td[data-label=""] > * {
    max-width: 100%;
  }
  .table-responsive .table-fc td::before,
  .table-responsive-cards .table-fc td::before {
    content: attr(data-label);
    font-size: 0.7rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--fc-muted);
    flex-shrink: 0;
    max-width: 38%;
    text-align: left;
  }
  .table-responsive .table-fc td:last-child:not([data-label])::before,
  .table-responsive .table-fc td[data-label=""]::before,
  .table-responsive-cards .table-fc td:last-child:not([data-label])::before,
  .table-responsive-cards .table-fc td[data-label=""]::before {
    content: none;
  }
  /* Empty / colspan rows stay one block */
  .table-responsive .table-fc td[colspan],
  .table-responsive-cards .table-fc td[colspan] {
    display: block;
    text-align: center;
    border-bottom: none;
    padding: 1rem 0.25rem;
  }
  .table-responsive .table-fc td[colspan]::before,
  .table-responsive-cards .table-fc td[colspan]::before {
    content: none;
  }
  .table-responsive .table-fc td[colspan] > *,
  .table-responsive-cards .table-fc td[colspan] > * {
    max-width: 100%;
    text-align: center;
  }
  .table-responsive .table-fc td[style*="min-width"],
  .table-responsive-cards .table-fc td[style*="min-width"] {
    min-width: 0 !important;
  }

  /* Targets list: compact card — # + name | progress | target, then machine */
  .table-responsive .table-fc tr.fc-target-row,
  .table-responsive-cards .table-fc tr.fc-target-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(3rem, 26%) auto;
    align-items: start;
    column-gap: 0.35rem;
    row-gap: 0.2rem;
    cursor: pointer;
    margin-bottom: 0.55rem;
    padding: 0.55rem 0.65rem;
    background: #fff !important;
    border-color: var(--fc-border);
    box-shadow:
      0 6px 16px rgba(15, 23, 42, 0.1),
      0 2px 6px rgba(15, 23, 42, 0.06);
    -webkit-user-select: none !important;
    user-select: none !important;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    outline: none;
    color: var(--fc-text);
  }
  .table-responsive .table-fc tr.fc-target-row *,
  .table-responsive-cards .table-fc tr.fc-target-row *,
  .table-responsive .table-fc tr.fc-target-row *::before,
  .table-responsive-cards .table-fc tr.fc-target-row *::before,
  .table-responsive .table-fc tr.fc-target-row *::after,
  .table-responsive-cards .table-fc tr.fc-target-row *::after {
    -webkit-user-select: none !important;
    user-select: none !important;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
  }
  .table-responsive .table-fc tr.fc-target-row::selection,
  .table-responsive-cards .table-fc tr.fc-target-row::selection,
  .table-responsive .table-fc tr.fc-target-row *::selection,
  .table-responsive-cards .table-fc tr.fc-target-row *::selection,
  .table-responsive .table-fc tr.fc-target-row::-moz-selection,
  .table-responsive-cards .table-fc tr.fc-target-row::-moz-selection,
  .table-responsive .table-fc tr.fc-target-row *::-moz-selection,
  .table-responsive-cards .table-fc tr.fc-target-row *::-moz-selection {
    background: transparent !important;
    color: inherit !important;
  }
  .table-responsive .table-fc tr.fc-target-row > td,
  .table-responsive-cards .table-fc tr.fc-target-row > td,
  .table-responsive .table-fc tr.fc-target-row:hover,
  .table-responsive-cards .table-fc tr.fc-target-row:hover,
  .table-responsive .table-fc tr.fc-target-row:hover > td,
  .table-responsive-cards .table-fc tr.fc-target-row:hover > td,
  .table-responsive .table-fc tr.fc-target-row:active,
  .table-responsive-cards .table-fc tr.fc-target-row:active,
  .table-responsive .table-fc tr.fc-target-row:active > td,
  .table-responsive-cards .table-fc tr.fc-target-row:active > td,
  .table-responsive .table-fc tr.fc-target-row:focus,
  .table-responsive-cards .table-fc tr.fc-target-row:focus,
  .table-responsive .table-fc tr.fc-target-row:focus-visible,
  .table-responsive-cards .table-fc tr.fc-target-row:focus-visible,
  .table-responsive .table-fc tr.fc-target-row:focus > td,
  .table-responsive-cards .table-fc tr.fc-target-row:focus > td,
  .table-responsive .table-fc tr.fc-target-row:focus-visible > td,
  .table-responsive-cards .table-fc tr.fc-target-row:focus-visible > td,
  .table-responsive .table-fc tr.fc-row-link.fc-target-row:hover > td,
  .table-responsive-cards .table-fc tr.fc-row-link.fc-target-row:hover > td,
  .table-responsive .table-fc tr.fc-row-link.fc-target-row:focus > td,
  .table-responsive-cards .table-fc tr.fc-row-link.fc-target-row:focus > td,
  .table-responsive .table-fc tr.fc-row-link.fc-target-row:focus-visible > td,
  .table-responsive-cards .table-fc tr.fc-row-link.fc-target-row:focus-visible > td,
  .table-responsive .table-fc tr.fc-target-row.is-open,
  .table-responsive-cards .table-fc tr.fc-target-row.is-open,
  .table-responsive .table-fc tr.fc-target-row.is-open > td,
  .table-responsive-cards .table-fc tr.fc-target-row.is-open > td {
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
  }
  .table-responsive .table-fc tr.fc-target-row.is-open,
  .table-responsive-cards .table-fc tr.fc-target-row.is-open {
    background: #fff !important;
    box-shadow:
      0 6px 16px rgba(15, 23, 42, 0.1),
      0 2px 6px rgba(15, 23, 42, 0.06) !important;
  }
  .table-responsive .table-fc tr.fc-target-row .fc-target-fold::before,
  .table-responsive-cards .table-fc tr.fc-target-row .fc-target-fold::before {
    color: #64748B;
  }
  .table-responsive .table-fc tr.fc-target-row,
  .table-responsive-cards .table-fc tr.fc-target-row,
  .table-responsive .table-fc tr.fc-target-row a,
  .table-responsive-cards .table-fc tr.fc-target-row a {
    -webkit-tap-highlight-color: transparent;
  }
  .table-responsive .table-fc tr.fc-target-row a,
  .table-responsive-cards .table-fc tr.fc-target-row a {
    color: inherit;
  }
  .table-responsive .table-fc tr.fc-target-row.is-cancelled,
  .table-responsive-cards .table-fc tr.fc-target-row.is-cancelled,
  .table-responsive .table-fc tr.fc-target-row.is-cancelled.is-open,
  .table-responsive-cards .table-fc tr.fc-target-row.is-cancelled.is-open,
  .table-responsive .table-fc tr.fc-target-row.is-cancelled:hover,
  .table-responsive-cards .table-fc tr.fc-target-row.is-cancelled:hover,
  .table-responsive .table-fc tr.fc-target-row.is-cancelled:active,
  .table-responsive-cards .table-fc tr.fc-target-row.is-cancelled:active,
  .table-responsive .table-fc tr.fc-target-row.is-cancelled:focus,
  .table-responsive-cards .table-fc tr.fc-target-row.is-cancelled:focus,
  .table-responsive .table-fc tr.fc-target-row.is-cancelled:focus-visible,
  .table-responsive-cards .table-fc tr.fc-target-row.is-cancelled:focus-visible,
  .table-responsive .table-fc tr.fc-entry-row.is-cancelled,
  .table-responsive-cards .table-fc tr.fc-entry-row.is-cancelled,
  .table-responsive .table-fc tr.fc-entry-row.is-cancelled:hover,
  .table-responsive-cards .table-fc tr.fc-entry-row.is-cancelled:hover,
  .table-responsive .table-fc tr.fc-entry-row.is-cancelled:active,
  .table-responsive-cards .table-fc tr.fc-entry-row.is-cancelled:active,
  .table-responsive .table-fc tr.fc-entry-row.is-cancelled:focus,
  .table-responsive-cards .table-fc tr.fc-entry-row.is-cancelled:focus,
  .table-responsive .table-fc tr.fc-entry-row.is-cancelled:focus-visible,
  .table-responsive-cards .table-fc tr.fc-entry-row.is-cancelled:focus-visible {
    background: #fff !important;
    border-color: #CA8A04;
    border-width: 2px;
    box-shadow:
      0 6px 16px rgba(15, 23, 42, 0.08),
      0 2px 6px rgba(15, 23, 42, 0.05) !important;
  }
  .table-responsive .table-fc tr.fc-entry-row.is-approved,
  .table-responsive-cards .table-fc tr.fc-entry-row.is-approved,
  .table-responsive .table-fc tr.fc-entry-row.is-approved:hover,
  .table-responsive-cards .table-fc tr.fc-entry-row.is-approved:hover,
  .table-responsive .table-fc tr.fc-entry-row.is-approved:focus-visible,
  .table-responsive-cards .table-fc tr.fc-entry-row.is-approved:focus-visible {
    background: #fff !important;
    border-color: #00AFC6;
    border-width: 2px;
    box-shadow:
      0 6px 16px rgba(15, 23, 42, 0.08),
      0 2px 6px rgba(15, 23, 42, 0.05) !important;
  }
  .table-responsive .table-fc tr.fc-entry-row.is-pending,
  .table-responsive-cards .table-fc tr.fc-entry-row.is-pending,
  .table-responsive .table-fc tr.fc-entry-row.is-pending:hover,
  .table-responsive-cards .table-fc tr.fc-entry-row.is-pending:hover,
  .table-responsive .table-fc tr.fc-entry-row.is-pending:focus-visible,
  .table-responsive-cards .table-fc tr.fc-entry-row.is-pending:focus-visible {
    background: #fff !important;
    border-color: #D97706;
    border-width: 2px;
    box-shadow:
      0 6px 16px rgba(15, 23, 42, 0.08),
      0 2px 6px rgba(15, 23, 42, 0.05) !important;
  }
  .table-responsive .table-fc tr.fc-entry-row.is-awaiting,
  .table-responsive-cards .table-fc tr.fc-entry-row.is-awaiting,
  .table-responsive .table-fc tr.fc-entry-row.is-awaiting:hover,
  .table-responsive-cards .table-fc tr.fc-entry-row.is-awaiting:hover,
  .table-responsive .table-fc tr.fc-entry-row.is-awaiting:focus-visible,
  .table-responsive-cards .table-fc tr.fc-entry-row.is-awaiting:focus-visible {
    background: #fff !important;
    border-color: #0284C7;
    border-width: 2px;
    box-shadow:
      0 6px 16px rgba(15, 23, 42, 0.08),
      0 2px 6px rgba(15, 23, 42, 0.05) !important;
  }
  /* Process step: border color only on mobile cards */
  .table-responsive .table-fc tr.fc-entry-row.is-process-rose,
  .table-responsive-cards .table-fc tr.fc-entry-row.is-process-rose,
  .table-responsive .table-fc tr.fc-entry-row.is-process-rose:hover,
  .table-responsive-cards .table-fc tr.fc-entry-row.is-process-rose:hover {
    background: #fff !important;
    border-color: #E11D48;
    border-width: 2px;
  }
  .table-responsive .table-fc tr.fc-entry-row.is-process-teal,
  .table-responsive-cards .table-fc tr.fc-entry-row.is-process-teal,
  .table-responsive .table-fc tr.fc-entry-row.is-process-teal:hover,
  .table-responsive-cards .table-fc tr.fc-entry-row.is-process-teal:hover {
    background: #fff !important;
    border-color: #0D9488;
    border-width: 2px;
  }
  .table-responsive .table-fc tr.fc-entry-row.is-process-sky,
  .table-responsive-cards .table-fc tr.fc-entry-row.is-process-sky,
  .table-responsive .table-fc tr.fc-entry-row.is-process-sky:hover,
  .table-responsive-cards .table-fc tr.fc-entry-row.is-process-sky:hover {
    background: #fff !important;
    border-color: #0284C7;
    border-width: 2px;
  }
  .table-responsive .table-fc tr.fc-entry-row.is-process-amber,
  .table-responsive-cards .table-fc tr.fc-entry-row.is-process-amber,
  .table-responsive .table-fc tr.fc-entry-row.is-process-amber:hover,
  .table-responsive-cards .table-fc tr.fc-entry-row.is-process-amber:hover {
    background: #fff !important;
    border-color: #D97706;
    border-width: 2px;
  }
  .table-responsive .table-fc tr.fc-entry-row.is-process-orange,
  .table-responsive-cards .table-fc tr.fc-entry-row.is-process-orange,
  .table-responsive .table-fc tr.fc-entry-row.is-process-orange:hover,
  .table-responsive-cards .table-fc tr.fc-entry-row.is-process-orange:hover {
    background: #fff !important;
    border-color: #EA580C;
    border-width: 2px;
  }
  .table-responsive .table-fc tr.fc-entry-row.is-process-slate,
  .table-responsive-cards .table-fc tr.fc-entry-row.is-process-slate,
  .table-responsive .table-fc tr.fc-entry-row.is-process-slate:hover,
  .table-responsive-cards .table-fc tr.fc-entry-row.is-process-slate:hover {
    background: #fff !important;
    border-color: #64748B;
    border-width: 2px;
  }
  .table-responsive .table-fc tr.fc-entry-row.is-process-green,
  .table-responsive-cards .table-fc tr.fc-entry-row.is-process-green,
  .table-responsive .table-fc tr.fc-entry-row.is-process-green:hover,
  .table-responsive-cards .table-fc tr.fc-entry-row.is-process-green:hover {
    background: #fff !important;
    border-color: #16A34A;
    border-width: 2px;
  }
  .table-responsive .table-fc tr.fc-entry-row.is-approved > td,
  .table-responsive-cards .table-fc tr.fc-entry-row.is-approved > td,
  .table-responsive .table-fc tr.fc-entry-row.is-pending > td,
  .table-responsive-cards .table-fc tr.fc-entry-row.is-pending > td,
  .table-responsive .table-fc tr.fc-entry-row.is-awaiting > td,
  .table-responsive-cards .table-fc tr.fc-entry-row.is-awaiting > td,
  .table-responsive .table-fc tr.fc-entry-row.is-cancelled > td,
  .table-responsive-cards .table-fc tr.fc-entry-row.is-cancelled > td,
  .table-responsive .table-fc tr.fc-entry-row[class*="is-process-"] > td,
  .table-responsive-cards .table-fc tr.fc-entry-row[class*="is-process-"] > td {
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
  }
  .table-responsive .table-fc tr.fc-target-row.is-cancelled > td,
  .table-responsive-cards .table-fc tr.fc-target-row.is-cancelled > td,
  .table-responsive .table-fc tr.fc-target-row.is-cancelled:hover > td,
  .table-responsive-cards .table-fc tr.fc-target-row.is-cancelled:hover > td,
  .table-responsive .table-fc tr.fc-target-row.is-cancelled:active > td,
  .table-responsive-cards .table-fc tr.fc-target-row.is-cancelled:active > td,
  .table-responsive .table-fc tr.fc-target-row.is-cancelled:focus > td,
  .table-responsive-cards .table-fc tr.fc-target-row.is-cancelled:focus > td,
  .table-responsive .table-fc tr.fc-target-row.is-cancelled:focus-visible > td,
  .table-responsive-cards .table-fc tr.fc-target-row.is-cancelled:focus-visible > td,
  .table-responsive .table-fc tr.fc-target-row.is-cancelled.is-open > td,
  .table-responsive-cards .table-fc tr.fc-target-row.is-cancelled.is-open > td,
  .table-responsive .table-fc tr.fc-entry-row.is-cancelled > td,
  .table-responsive-cards .table-fc tr.fc-entry-row.is-cancelled > td,
  .table-responsive .table-fc tr.fc-entry-row.is-cancelled:hover > td,
  .table-responsive-cards .table-fc tr.fc-entry-row.is-cancelled:hover > td,
  .table-responsive .table-fc tr.fc-entry-row.is-cancelled:active > td,
  .table-responsive-cards .table-fc tr.fc-entry-row.is-cancelled:active > td,
  .table-responsive .table-fc tr.fc-entry-row.is-cancelled:focus-visible > td,
  .table-responsive-cards .table-fc tr.fc-entry-row.is-cancelled:focus-visible > td {
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
  }
  .table-responsive .table-fc tr.fc-target-row.is-cancelled .fc-target-fold-toggle,
  .table-responsive-cards .table-fc tr.fc-target-row.is-cancelled .fc-target-fold-toggle {
    background: rgba(255, 255, 255, 0.55);
    border-color: rgba(202, 138, 4, 0.35);
  }
  .table-responsive .table-fc tr.fc-target-row.is-open,
  .table-responsive-cards .table-fc tr.fc-target-row.is-open {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .table-responsive .table-fc tr.fc-target-row:last-child,
  .table-responsive-cards .table-fc tr.fc-target-row:last-child {
    margin-bottom: 0.25rem;
  }
  .table-responsive:has(.fc-target-row),
  .table-responsive-cards:has(.fc-target-row) {
    padding: 0.55rem 0.55rem 1.1rem;
  }
  .table-responsive .table-fc tr.fc-target-row:not(.is-open) .fc-target-fold,
  .table-responsive-cards .table-fc tr.fc-target-row:not(.is-open) .fc-target-fold {
    display: none !important;
  }
  .table-responsive .table-fc tr.fc-target-row .fc-target-rowno,
  .table-responsive-cards .table-fc tr.fc-target-row .fc-target-rowno {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    width: auto;
    padding: 0;
    border-bottom: none;
    font-size: 0.75rem;
    font-weight: 650;
    min-width: 1.1rem;
  }
  .table-responsive .table-fc tr.fc-target-row .fc-target-model,
  .table-responsive-cards .table-fc tr.fc-target-row .fc-target-model {
    grid-column: 2;
    grid-row: 1;
    width: auto;
    max-width: 100%;
    align-items: center;
    gap: 0.35rem;
    border-bottom: none;
    padding: 0;
  }
  .table-responsive .table-fc tr.fc-target-row:not(.is-open) .fc-target-progress,
  .table-responsive-cards .table-fc tr.fc-target-row:not(.is-open) .fc-target-progress {
    grid-column: 3;
    grid-row: 1;
    width: auto;
    max-width: 100%;
    min-width: 0 !important;
    padding: 0;
    border-bottom: none;
    align-self: center;
    justify-content: center;
    align-items: center;
  }
  .table-responsive .table-fc tr.fc-target-row:not(.is-open) .fc-target-progress::before,
  .table-responsive-cards .table-fc tr.fc-target-row:not(.is-open) .fc-target-progress::before {
    content: none;
  }
  .table-responsive .table-fc tr.fc-target-row:not(.is-open) .fc-target-progress > *,
  .table-responsive-cards .table-fc tr.fc-target-row:not(.is-open) .fc-target-progress > * {
    max-width: 100%;
    width: 100%;
    text-align: center;
  }
  .table-responsive .table-fc tr.fc-target-row:not(.is-open) .fc-target-progress .fc-progress-wrap,
  .table-responsive-cards .table-fc tr.fc-target-row:not(.is-open) .fc-target-progress .fc-progress-wrap {
    width: 100%;
    gap: 0.2rem;
    flex-direction: column;
    align-items: stretch;
  }
  .table-responsive .table-fc tr.fc-target-row:not(.is-open) .fc-target-progress .progress-target,
  .table-responsive-cards .table-fc tr.fc-target-row:not(.is-open) .fc-target-progress .progress-target {
    width: 100%;
    min-width: 0;
    height: 0.45rem;
  }
  .table-responsive .table-fc tr.fc-target-row:not(.is-open) .fc-target-progress .fc-progress-pct,
  .table-responsive-cards .table-fc tr.fc-target-row:not(.is-open) .fc-target-progress .fc-progress-pct {
    font-size: 0.62rem;
    min-width: 0;
    text-align: center;
  }
  .table-responsive .table-fc tr.fc-target-row .fc-target-qty,
  .table-responsive-cards .table-fc tr.fc-target-row .fc-target-qty {
    grid-column: 4;
    grid-row: 1;
    width: auto;
    max-width: none;
    padding: 0;
    border-bottom: none;
    align-self: center;
    justify-content: flex-end;
    text-align: right;
  }
  .table-responsive .table-fc tr.fc-target-row.is-open .fc-target-qty,
  .table-responsive-cards .table-fc tr.fc-target-row.is-open .fc-target-qty {
    grid-column: 3;
  }
  .table-responsive .table-fc tr.fc-target-row .fc-target-machine,
  .table-responsive-cards .table-fc tr.fc-target-row .fc-target-machine {
    grid-column: 1 / -1;
    grid-row: 2;
    padding: 0.15rem 0 0;
  }
  .table-responsive .table-fc tr.fc-target-row .fc-target-fold,
  .table-responsive-cards .table-fc tr.fc-target-row .fc-target-fold {
    grid-column: 1 / -1;
  }
  .table-responsive .table-fc tr.fc-target-row.is-open .fc-target-progress,
  .table-responsive-cards .table-fc tr.fc-target-row.is-open .fc-target-progress {
    grid-column: 1 / -1;
    grid-row: auto;
    width: 100%;
    max-width: 100%;
    min-width: 0 !important;
    order: 10;
    justify-content: space-between;
    align-items: flex-start;
  }
  .table-responsive .table-fc tr.fc-target-row.is-open .fc-target-fold,
  .table-responsive-cards .table-fc tr.fc-target-row.is-open .fc-target-fold {
    order: 10;
  }
  .table-responsive .table-fc tr.fc-target-row .fc-target-summary::before,
  .table-responsive-cards .table-fc tr.fc-target-row .fc-target-summary::before {
    content: none;
  }
  .table-responsive .table-fc tr.fc-target-row .fc-target-summary,
  .table-responsive-cards .table-fc tr.fc-target-row .fc-target-summary {
    justify-content: flex-start;
  }
  .table-responsive .table-fc tr.fc-target-row .fc-target-summary > *,
  .table-responsive-cards .table-fc tr.fc-target-row .fc-target-summary > * {
    max-width: none;
    text-align: left;
  }
  .table-responsive .table-fc tr.fc-target-row .fc-target-color-under,
  .table-responsive-cards .table-fc tr.fc-target-row .fc-target-color-under {
    display: none;
  }
  .table-responsive .table-fc tr.fc-target-row .fc-target-qty > *,
  .table-responsive-cards .table-fc tr.fc-target-row .fc-target-qty > * {
    max-width: none;
    text-align: right;
  }
  .table-responsive .table-fc tr.fc-target-row .fc-target-qty,
  .table-responsive-cards .table-fc tr.fc-target-row .fc-target-qty {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.05rem;
    font-size: inherit;
    line-height: 1.2;
  }
  .table-responsive .table-fc tr.fc-target-row .fc-target-qty-label,
  .table-responsive-cards .table-fc tr.fc-target-row .fc-target-qty-label {
    display: block;
    font-size: 0.62rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--fc-muted);
    line-height: 1.1;
  }
  .table-responsive .table-fc tr.fc-target-row .fc-target-qty-val,
  .table-responsive-cards .table-fc tr.fc-target-row .fc-target-qty-val {
    font-size: 0.98rem;
    font-weight: 800;
    color: var(--fc-accent);
    line-height: 1.15;
  }
  .table-responsive .table-fc tr.fc-target-row .fc-target-qty-color,
  .table-responsive-cards .table-fc tr.fc-target-row .fc-target-qty-color {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--fc-muted);
    line-height: 1.15;
  }
  .table-responsive .table-fc tr.fc-target-row:not(.is-open) .fc-target-machine,
  .table-responsive-cards .table-fc tr.fc-target-row:not(.is-open) .fc-target-machine {
    border-bottom: none;
  }
  .table-responsive .table-fc tr.fc-target-row.is-open .fc-target-machine,
  .table-responsive-cards .table-fc tr.fc-target-row.is-open .fc-target-machine {
    border-bottom-color: var(--fc-border);
    padding-bottom: 0.4rem;
    margin-bottom: 0.1rem;
  }
  .table-responsive .table-fc tr.fc-target-row.is-open .fc-target-actions-cell,
  .table-responsive-cards .table-fc tr.fc-target-row.is-open .fc-target-actions-cell {
    border-bottom: none;
    padding-top: 0.65rem;
    margin-top: 0.15rem;
    width: 100%;
    max-width: 100%;
    white-space: normal;
    justify-content: stretch;
    display: block;
  }
  .table-responsive .table-fc tr.fc-target-row .fc-target-actions-cell .fc-row-actions,
  .table-responsive-cards .table-fc tr.fc-target-row .fc-target-actions-cell .fc-row-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    max-width: 100%;
    gap: 0.4rem;
    justify-content: stretch;
    align-items: stretch;
  }
  .table-responsive .table-fc tr.fc-target-row .fc-target-actions-cell .fc-row-actions:has(> :nth-child(2):last-child),
  .table-responsive-cards .table-fc tr.fc-target-row .fc-target-actions-cell .fc-row-actions:has(> :nth-child(2):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .table-responsive .table-fc tr.fc-target-row .fc-target-actions-cell .fc-row-actions:has(> :only-child),
  .table-responsive-cards .table-fc tr.fc-target-row .fc-target-actions-cell .fc-row-actions:has(> :only-child) {
    grid-template-columns: 1fr;
  }
  .table-responsive .table-fc tr.fc-target-row .fc-target-actions-cell .fc-row-action-form,
  .table-responsive-cards .table-fc tr.fc-target-row .fc-target-actions-cell .fc-row-action-form {
    display: block;
    width: 100%;
    min-width: 0;
  }
  .table-responsive .table-fc tr.fc-target-row .fc-target-actions-cell .fc-row-action,
  .table-responsive-cards .table-fc tr.fc-target-row .fc-target-actions-cell .fc-row-action {
    width: 100%;
    min-width: 0;
    height: 2.4rem;
    padding: 0 0.35rem;
    gap: 0.25rem;
  }
  .table-responsive .table-fc tr.fc-target-row .fc-target-actions-cell .fc-row-action-label,
  .table-responsive-cards .table-fc tr.fc-target-row .fc-target-actions-cell .fc-row-action-label {
    display: inline;
    font-size: 0.7rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .table-responsive .table-fc tr.fc-target-row .fc-target-model-main,
  .table-responsive-cards .table-fc tr.fc-target-row .fc-target-model-main {
    flex: 1;
    min-width: 0;
    gap: 0.35rem !important;
  }
  .table-responsive .table-fc tr.fc-target-row .fc-target-machine,
  .table-responsive-cards .table-fc tr.fc-target-row .fc-target-machine {
    color: var(--fc-muted);
    font-size: 0.82rem;
  }
  .table-responsive .table-fc tr.fc-target-row .fc-target-fold-toggle,
  .table-responsive-cards .table-fc tr.fc-target-row .fc-target-fold-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    border: 1px solid var(--fc-border);
    border-radius: 7px;
    background: #fff;
    color: var(--fc-muted);
    flex-shrink: 0;
  }
  .table-responsive .table-fc tr.fc-target-row.is-open .fc-target-fold-toggle .bi,
  .table-responsive-cards .table-fc tr.fc-target-row.is-open .fc-target-fold-toggle .bi {
    transform: rotate(90deg);
  }
  .table-responsive .table-fc tr.fc-target-row .fc-target-fold-toggle .bi,
  .table-responsive-cards .table-fc tr.fc-target-row .fc-target-fold-toggle .bi {
    transition: transform 0.15s ease;
    font-size: 0.78rem;
  }
  .table-responsive .table-fc tr.fc-target-row .fc-target-model-img,
  .table-responsive-cards .table-fc tr.fc-target-row .fc-target-model-img {
    max-width: 30px;
    max-height: 30px;
  }
  .table-responsive .table-fc tr.fc-target-row .fc-target-model-name,
  .table-responsive-cards .table-fc tr.fc-target-row .fc-target-model-name {
    font-size: 0.92rem;
    line-height: 1.2;
  }

  .production-tabs-panel .tab-content {
    overflow: visible;
  }
  .page-content,
  .main-wrap,
  .app-shell {
    overflow-x: clip;
    max-width: 100%;
  }
}

/* Row action toolbar (targets list) — compact icon-only */
.fc-row-actions {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.3rem;
  max-width: 100%;
}
.fc-row-actions .fc-row-action-form {
  display: inline-flex;
  margin: 0;
  padding: 0;
  border: 0;
}
.fc-row-actions .fc-row-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 1.85rem;
  min-width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  border-radius: 7px;
  line-height: 1;
  flex: 0 0 auto;
  box-shadow: none !important;
  white-space: nowrap;
  transform: none !important;
}
.fc-row-actions .fc-row-action .bi {
  font-size: 0.88rem;
  line-height: 1;
}
.fc-row-actions .fc-row-action-label {
  display: none;
}
.fc-target-actions-cell,
.fc-entry-actions-cell {
  width: 1%;
  white-space: nowrap;
  vertical-align: middle !important;
}
.fc-entry-desktop-table .fc-entry-actions-cell .fc-row-actions {
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 0.35rem;
}
@media (min-width: 768px) {
  .fc-entry-desktop-table .fc-entry-actions-cell {
    white-space: normal;
  }
  .fc-entry-desktop-table .fc-entry-actions-cell .fc-row-action {
    flex-direction: column;
    width: auto;
    min-width: 2.35rem;
    max-width: 3.1rem;
    height: auto;
    min-height: 2.35rem;
    padding: 0.22rem 0.18rem 0.18rem;
    gap: 0.12rem;
  }
  .fc-entry-desktop-table .fc-entry-actions-cell .fc-row-action .bi {
    font-size: 0.9rem;
  }
  .fc-entry-desktop-table .fc-entry-actions-cell .fc-row-action-label {
    display: block;
    font-size: 0.52rem;
    font-weight: 650;
    line-height: 1.1;
    letter-spacing: 0.01em;
    text-align: center;
    white-space: normal;
    word-break: break-word;
    max-width: 100%;
    opacity: 0.92;
  }
}
@media (max-width: 767.98px) {
  .fc-entry-desktop-table .fc-entry-actions-cell .fc-row-action-label {
    display: none;
  }
  /* Card actions: equal full-width buttons in one row */
  .table-responsive .table-fc tr.fc-target-row .fc-target-actions-cell,
  .table-responsive-cards .table-fc tr.fc-target-row .fc-target-actions-cell {
    width: 100% !important;
    white-space: normal !important;
  }
  .table-responsive .table-fc tr.fc-target-row .fc-target-actions-cell .fc-row-actions .fc-row-action-label,
  .table-responsive-cards .table-fc tr.fc-target-row .fc-target-actions-cell .fc-row-actions .fc-row-action-label {
    display: inline !important;
  }
  .table-responsive .table-fc tr.fc-target-row .fc-target-actions-cell .fc-row-actions .fc-row-action,
  .table-responsive-cards .table-fc tr.fc-target-row .fc-target-actions-cell .fc-row-actions .fc-row-action {
    width: 100% !important;
    min-width: 0 !important;
    height: 2.4rem;
    padding: 0 0.35rem !important;
    gap: 0.25rem;
  }
}

/* Targets fold toggle: desktop stays flat table (no chevron) */
.fc-target-fold-toggle {
  display: none;
}
.fc-target-code {
  margin-top: 0.05rem;
  font-size: 0.58rem;
  font-weight: 600;
  line-height: 1.15;
  color: var(--fc-muted);
  letter-spacing: 0.01em;
}
.fc-target-code a {
  color: inherit;
}
.fc-target-code a:hover {
  color: var(--fc-primary-deep);
}
.fc-target-qty-label,
.fc-target-qty-color {
  display: none;
}
.table-fc tbody tr.fc-target-row.is-cancelled {
  background: #FDE68A !important;
}
.table-fc tbody tr.fc-entry-row.is-cancelled {
  background: transparent !important;
  box-shadow: inset 3px 0 0 #CA8A04;
}
.table-fc tbody tr.fc-target-row.is-cancelled > td,
.table-fc tbody tr.fc-entry-row.is-cancelled > td,
.table-fc tbody tr.fc-target-row.is-cancelled:hover > td,
.table-fc tbody tr.fc-entry-row.is-cancelled:hover > td,
.fc-row-link.fc-target-row.is-cancelled:hover > td,
.fc-row-link.fc-target-row.is-cancelled:focus-visible > td,
.fc-row-link.fc-entry-row.is-cancelled:hover > td,
.fc-row-link.fc-entry-row.is-cancelled:focus-visible > td {
  background: transparent !important;
}
.table-fc tbody tr.fc-target-row.is-cancelled:hover,
.fc-row-link.fc-target-row.is-cancelled:hover,
.fc-row-link.fc-target-row.is-cancelled:focus-visible {
  background: #FDE68A !important;
}
.table-fc tbody tr.fc-entry-row.is-cancelled:hover,
.fc-row-link.fc-entry-row.is-cancelled:hover,
.fc-row-link.fc-entry-row.is-cancelled:focus-visible {
  background: transparent !important;
  box-shadow: inset 3px 0 0 #CA8A04;
}
@media (max-width: 767.98px) {
  .table-responsive .table-fc tr.fc-row-link.fc-target-row:hover > td,
  .table-responsive-cards .table-fc tr.fc-row-link.fc-target-row:hover > td,
  .table-responsive .table-fc tr.fc-row-link.fc-target-row:focus-visible > td,
  .table-responsive-cards .table-fc tr.fc-row-link.fc-target-row:focus-visible > td,
  .table-responsive .table-fc tr.fc-row-link.fc-target-row:focus-visible,
  .table-responsive-cards .table-fc tr.fc-row-link.fc-target-row:focus-visible {
    background: transparent !important;
    outline: none !important;
  }
  .table-responsive .table-fc tr.fc-row-link.fc-target-row.is-cancelled:hover,
  .table-responsive-cards .table-fc tr.fc-row-link.fc-target-row.is-cancelled:hover,
  .table-responsive .table-fc tr.fc-row-link.fc-target-row.is-cancelled:focus-visible,
  .table-responsive-cards .table-fc tr.fc-row-link.fc-target-row.is-cancelled:focus-visible {
    background: #FDE68A !important;
  }
}
.panel.is-cancelled,
.panel.fc-entry-detail.is-cancelled {
  background: #FDE68A;
  border-color: rgba(202, 138, 4, 0.45);
}
.panel.is-completed {
  background: #F0FDF4;
  border-color: rgba(22, 163, 74, 0.35);
}
.panel.is-completed .panel-header {
  background: transparent;
}
.panel.is-cancelled .panel-header,
.panel.fc-entry-detail.is-cancelled .panel-header {
  background: transparent;
  border-bottom-color: rgba(202, 138, 4, 0.28);
}
.panel.is-cancelled .form-control,
.panel.is-cancelled .form-select {
  background-color: rgba(255, 255, 255, 0.75);
}

#convertModal .fc-conv-locked,
#convertModal .form-control.fc-conv-locked,
#convertModal .form-select.fc-conv-locked {
  background-color: #F1F5F9;
  cursor: default;
  opacity: 1;
  color: var(--fc-text);
}
#convertModal .form-check-input.fc-conv-locked {
  pointer-events: none;
}

/* Recycled page: checkbox shadow + modal batch summary */
#failedProductsTable .fc-recycle-check {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.15rem;
  cursor: pointer;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.18),
    0 2px 8px rgba(15, 23, 42, 0.12);
  border-color: rgba(15, 23, 42, 0.28);
}
#failedProductsTable .fc-recycle-check:checked {
  box-shadow:
    0 0 0 0.15rem rgba(13, 110, 253, 0.2),
    0 2px 8px rgba(13, 110, 253, 0.28);
}
#failedProductsTable .fc-recycle-check:focus {
  box-shadow:
    0 0 0 0.2rem rgba(13, 110, 253, 0.25),
    0 2px 8px rgba(15, 23, 42, 0.14);
}

.fc-recycle-sum {
  border: 1px solid var(--fc-border, #e2e8f0);
  border-radius: 0.5rem;
  background: #f8fafc;
  padding: 0.65rem 0.75rem;
}
.fc-recycle-sum__totals {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 0.55rem;
  font-size: 0.8125rem;
  font-weight: 650;
}
.fc-recycle-sum__list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 9.5rem;
  overflow-y: auto;
}
.fc-recycle-sum__list li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.28rem 0;
  border-top: 1px solid rgba(148, 163, 184, 0.35);
  font-size: 0.8rem;
}
.fc-recycle-sum__list li:first-child {
  border-top: 0;
  padding-top: 0;
}
.fc-recycle-sum__name {
  min-width: 0;
  flex: 1 1 auto;
  overflow-wrap: anywhere;
}
.fc-recycle-sum__qty {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  color: var(--fc-text-secondary, #64748b);
  white-space: nowrap;
}

/* Today breakdown — models with nested colors */
.fc-today-breakdown {
  overflow: hidden;
  border-color: rgba(2, 132, 199, 0.28);
  box-shadow:
    0 8px 22px rgba(2, 88, 150, 0.22),
    0 3px 8px rgba(15, 23, 42, 0.1);
}
.fc-today-breakdown-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 0.9rem;
  user-select: none;
  background: linear-gradient(180deg, #F0F9FF 0%, #fff 100%);
}
.fc-today-breakdown-summary::-webkit-details-marker { display: none; }
.fc-today-breakdown-fold {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid var(--fc-border);
  background: #fff;
  color: var(--fc-text-secondary);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 0.7rem;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.fc-today-breakdown[open] .fc-today-breakdown-fold {
  transform: rotate(90deg);
  background: var(--fc-primary-50);
  color: var(--fc-primary-deep);
  border-color: var(--fc-primary-100);
}
.fc-today-breakdown-title {
  display: inline-flex;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 750;
  color: var(--fc-text);
  flex: 1;
  min-width: 0;
}
.fc-today-breakdown[open] > .fc-today-breakdown-summary {
  border-bottom: 1px solid var(--fc-border);
}
.fc-today-breakdown-count {
  font-size: 0.72rem;
  font-weight: 750;
  color: var(--fc-muted);
  background: #F1F5F9;
  border-radius: 999px;
  padding: 0.12rem 0.55rem;
  flex-shrink: 0;
}
.fc-breakdown-num {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.fc-breakdown-target {
  color: var(--fc-accent);
}
.fc-breakdown-achieved.is-low { color: #64748B; }
.fc-breakdown-achieved.is-mid { color: var(--fc-primary-deep); }
.fc-breakdown-achieved.is-high { color: var(--fc-accent); }
.fc-breakdown-achieved.is-full { color: #059669; }
.fc-breakdown-color-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}
.fc-breakdown-swatch {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 4px;
  border: 1px solid rgba(15, 23, 42, 0.18);
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}
.fc-today-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.fc-today-group {
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--fc-border);
  background: #fff;
}
.fc-today-group:first-child {
  border-top: none;
}
.fc-today-group-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem 1rem;
  align-items: start;
}
.fc-today-group-main {
  min-width: 0;
}
.fc-today-group-name {
  font-size: 0.95rem;
  font-weight: 750;
  color: var(--fc-text);
  line-height: 1.3;
  word-break: break-word;
}
.fc-today-group-meta {
  margin-top: 0.2rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--fc-muted);
}
.fc-today-group-stats {
  display: flex;
  gap: 0.85rem;
  flex-shrink: 0;
  align-items: flex-start;
}
.fc-today-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.05rem;
  min-width: 4.25rem;
}
.fc-today-stat-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #94A3B8;
}
.fc-today-group-progress {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.fc-today-group-progress .progress-target {
  flex: 1;
  min-width: 0;
}
.fc-today-color-list {
  list-style: none;
  margin: 0.65rem 0 0;
  padding: 0.45rem 0 0 0.75rem;
  border-top: 1px dashed #E2E8F0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.fc-today-color-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.35rem 0.55rem;
  border-radius: 0.55rem;
  background: #F8FAFC;
  border: 1px solid #F1F5F9;
  min-width: 0;
}
.fc-today-color-name {
  font-size: 0.82rem;
  font-weight: 650;
  color: #334155;
  min-width: 0;
}
.fc-today-color-name > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fc-today-color-nums {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
  font-size: 0.82rem;
}
.fc-today-color-sep {
  color: #CBD5E1;
  font-weight: 600;
}
@media (max-width: 575.98px) {
  .fc-today-group {
    padding: 0.75rem 0.8rem;
  }
  .fc-today-group-head {
    gap: 0.45rem 0.65rem;
  }
  .fc-today-group-stats {
    gap: 0.55rem;
  }
  .fc-today-stat {
    min-width: 3.6rem;
  }
  .fc-today-color-list {
    padding-left: 0.35rem;
  }
  .fc-today-breakdown {
    box-shadow:
      0 8px 22px rgba(2, 88, 150, 0.28),
      0 3px 8px rgba(15, 23, 42, 0.12);
  }
}
@media (min-width: 768px) {
  .fc-today-breakdown-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .fc-today-group {
    border-top: none;
    border-right: 1px solid var(--fc-border);
    border-bottom: 1px solid var(--fc-border);
  }
  .fc-today-group:nth-child(2n) {
    border-right: none;
  }
  .fc-today-breakdown-list:has(> .fc-today-group:only-child) {
    grid-template-columns: 1fr;
  }
  .fc-today-breakdown-list:has(> .fc-today-group:only-child) .fc-today-group {
    border-right: none;
  }
}

.fc-machine-cell {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  line-height: 1.25;
}
.fc-machine-name {
  font-weight: 700;
  color: var(--fc-text);
}
.fc-entry-code {
  font-size: 0.58rem;
  font-weight: 600;
  color: var(--fc-muted);
  letter-spacing: 0.01em;
  line-height: 1.2;
}
.fc-entry-codes {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  flex-wrap: nowrap;
  gap: 0.2rem;
  max-width: 100%;
  min-width: 0;
  width: max-content;
}
.fc-entry-codes-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  min-width: 0;
  white-space: nowrap;
}
.fc-entry-code-group {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: #92400E;
  background: linear-gradient(180deg, #FEF3C7 0%, #FDE68A 100%);
  border: 1px solid #F59E0B;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  flex-shrink: 0;
  vertical-align: middle;
}
.fc-entry-desktop-table .fc-entry-code-group {
  min-width: 1.2rem;
  height: 1.2rem;
  font-size: 0.64rem;
  padding: 0 0.3rem;
}
.fc-entry-desktop-table th.fc-entry-col-rowno,
.fc-entry-desktop-table td.fc-entry-col-rowno {
  width: 1.65rem;
  min-width: 1.65rem;
  max-width: 2rem;
  padding-left: 0.35rem !important;
  padding-right: 0.2rem !important;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  font-size: 0.72rem;
}
.fc-entry-desktop-table th.fc-entry-col-code,
.fc-entry-desktop-table td.fc-entry-col-code {
  width: 1%;
  max-width: 7.5rem;
  padding-left: 0.3rem !important;
  padding-right: 0.3rem !important;
  white-space: nowrap;
  vertical-align: middle;
}
.fc-entry-desktop-table td.fc-entry-col-code .fc-entry-codes {
  width: auto;
  max-width: 7.5rem;
  gap: 0.12rem;
  white-space: nowrap;
}
.fc-entry-desktop-table td.fc-entry-col-code .fc-entry-codes-primary {
  gap: 0.15rem;
}
.fc-entry-desktop-table td.fc-entry-col-code .fc-entry-code,
.fc-entry-desktop-table td.fc-entry-col-code .fc-entry-code.is-shop,
.fc-entry-desktop-table td.fc-entry-col-code a.fc-entry-code.is-shop {
  font-size: 0.68rem;
  padding: 0.04rem 0.28rem;
  line-height: 1.15;
  max-width: 100%;
}
.fc-entry-desktop-table td.fc-entry-col-code .fc-entry-code.is-secondary {
  font-size: 0.62rem;
  padding: 0.02rem 0.22rem;
}
.fc-entry-code-shop-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 0.35rem;
  background: #FEF9C3;
  border: 1px solid #FDE68A;
  color: #A16207;
  font-size: 0.7rem;
  flex-shrink: 0;
}
.fc-entry-code.is-secondary {
  color: var(--fc-muted);
  font-weight: 600;
  background: transparent;
  border: 1px dashed var(--fc-border, #E5E7EB);
  border-radius: 0.35rem;
  padding: 0.08rem 0.32rem;
}
.fc-entry-desktop-table .fc-entry-code.is-secondary {
  font-size: 0.72rem;
  color: #64748B;
  white-space: nowrap;
}
.fc-entry-codes.is-glow,
.fc-entry-row.is-shop-followup td[data-label] .fc-entry-codes,
.fc-entry-item-fold.is-shop-followup .fc-entry-codes {
  animation: fc-shop-followup-glow 1.6s ease-in-out infinite;
}
.fc-entry-row.is-shop-followup,
.fc-entry-item-fold.is-shop-followup {
  box-shadow: inset 3px 0 0 #F59E0B;
}
@keyframes fc-shop-followup-glow {
  0%, 100% {
    filter: drop-shadow(0 0 0 transparent);
  }
  50% {
    filter: drop-shadow(0 0 0.35rem rgba(245, 158, 11, 0.85));
  }
}
@media (prefers-reduced-motion: reduce) {
  .fc-entry-codes.is-glow,
  .fc-entry-row.is-shop-followup td[data-label] .fc-entry-codes,
  .fc-entry-item-fold.is-shop-followup .fc-entry-codes {
    animation: none;
    outline: 2px solid #F59E0B;
    outline-offset: 2px;
    border-radius: 0.35rem;
  }
}
.fc-entry-status {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.12rem;
  max-width: 4.8rem;
  text-align: center;
}
.fc-entry-status-text {
  font-size: 0.58rem;
  font-weight: 650;
  line-height: 1.15;
  color: var(--fc-muted, #64748B);
  word-break: break-word;
  max-width: 100%;
}
.fc-entry-status.is-approved .fc-entry-status-text { color: #15803D; }
.fc-entry-status.is-pending .fc-entry-status-text { color: #B45309; }
.fc-entry-status.is-awaiting .fc-entry-status-text,
.fc-entry-status.is-progress .fc-entry-status-text { color: #1D4ED8; }
.fc-entry-status.is-store .fc-entry-status-text { color: #A16207; }
.fc-entry-status.is-cancelled .fc-entry-status-text { color: #B91C1C; }
.fc-entry-status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}
.fc-entry-status-icon.is-progress {
  color: #1D4ED8;
  background: #DBEAFE;
}
.fc-entry-status-icon.is-store {
  color: #A16207;
  background: #FEF9C3;
}
.fc-entry-status-icon.is-approved {
  color: #15803D;
  background: #DCFCE7;
}
.fc-entry-status-icon.is-pending {
  color: #B45309;
  background: #FEF3C7;
}
.fc-entry-status-icon.is-awaiting {
  color: #1D4ED8;
  background: #DBEAFE;
}
.fc-entry-status-icon.is-cancelled {
  color: #B91C1C;
  background: #FEE2E2;
}
.fc-entry-status-icon.is-muted {
  color: var(--fc-muted);
  background: var(--fc-surface-2, #F3F4F6);
}
.fc-entry-desktop-table td[data-label] .fc-entry-code,
.fc-entry-desktop-table .fc-entry-code {
  font-size: 0.78rem;
  font-weight: 700;
  color: #0E7490;
  white-space: nowrap;
}
.fc-entry-code.is-shop,
.fc-entry-desktop-table .fc-entry-code.is-shop,
a.fc-entry-code.is-shop {
  color: #A16207;
  background: #FEF9C3;
  border: 1px solid #FDE68A;
  border-radius: 0.4rem;
  padding: 0.12rem 0.4rem;
  display: inline-block;
  line-height: 1.25;
  font-weight: 750;
}
.fc-entry-item-sub .fc-entry-code.is-shop {
  font-size: 0.68rem;
}
.fc-entry-model-cell {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  min-width: 0;
  line-height: 1.25;
}
.fc-entry-model-cell:has(.fc-entry-await-thumb),
.fc-entry-model-cell:has(.fc-entry-product-thumb) {
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
}
.fc-entry-await-thumb,
.fc-entry-product-thumb {
  max-width: 40px;
  max-height: 40px;
  width: auto;
  height: auto;
  border-radius: 0.45rem;
  object-fit: contain;
  object-position: center;
  flex-shrink: 0;
  background: #F1F5F9;
}
.fc-entry-model-name {
  font-weight: 750;
  color: var(--fc-text);
  font-size: 0.9rem;
}
.fc-entry-model-color {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--fc-muted);
}
.fc-entry-model-cell .fc-entry-code {
  margin-top: 0;
  margin-bottom: 0.02rem;
  color: #0E7490;
  font-weight: 650;
}
.fc-entry-shop-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  min-width: 0;
  line-height: 1.25;
}
.fc-entry-shop-code {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--fc-text);
}
.fc-entry-shop-name {
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--fc-text);
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fc-entry-shop-ordered-by {
  font-size: 0.68rem;
  font-weight: 550;
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fc-shop-priority {
  display: inline-flex;
  align-items: center;
  padding: 0.08rem 0.4rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.2;
  border: 1px solid transparent;
}
.fc-shop-priority.is-high {
  color: #991b1b;
  background: #fee2e2;
  border-color: #fecaca;
}
.fc-shop-priority.is-medium {
  color: #92400e;
  background: #fef3c7;
  border-color: #fde68a;
}
.fc-shop-priority.is-low {
  color: #166534;
  background: #dcfce7;
  border-color: #bbf7d0;
}
.fc-shop-priority-edit {
  max-width: 100%;
}
.fc-shop-priority-edit .form-select {
  width: auto;
  min-width: 7.5rem;
  max-width: 100%;
}
.fc-ep-lead-code {
  font-size: 0.78rem !important;
  color: #0E7490 !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em;
}
.fc-ep-title-row .fc-ep-lead-code {
  flex-shrink: 0;
}
.table-fc tbody tr.fc-entry-row.is-awaiting,
.fc-row-link.fc-entry-row.is-awaiting {
  background: #F0F9FF;
}
.table-fc tbody tr.fc-entry-row.is-awaiting:hover,
.fc-row-link.fc-entry-row.is-awaiting:hover,
.fc-row-link.fc-entry-row.is-awaiting:focus-visible {
  background: #E0F2FE;
}
.fc-entry-row.is-awaiting.is-static {
  cursor: default;
}
.fc-outcome {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  line-height: 1.2;
}
.fc-outcome strong {
  font-size: 0.78rem;
  font-weight: 700;
}
.fc-outcome small {
  font-size: 0.68rem;
  font-weight: 600;
}
.fc-outcome-over strong { color: var(--fc-accent); }
.fc-outcome-over small { color: var(--fc-accent); opacity: 0.9; }
.fc-outcome-under strong { color: var(--fc-text-secondary); }
.fc-outcome-under small { color: var(--fc-muted); }
.fc-outcome-hit {
  align-items: flex-start;
  gap: 0.25rem;
}
.fc-outcome-hit .fc-target-meta {
  display: block;
  font-size: 0.68rem;
  font-weight: 650;
  color: var(--fc-text-secondary);
}
.fc-target-cell {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 7.5rem;
  max-width: 14rem;
}
.fc-target-cell .fc-progress-wrap {
  width: 100%;
}
.fc-target-cell .progress-target {
  flex: 1;
  min-width: 0;
}

@media (max-width: 767.98px) {
  .table-responsive .table-fc td[data-label="Progress"] > *,
  .table-responsive-cards .table-fc td[data-label="Progress"] > * {
    max-width: 100%;
    text-align: right;
  }
  .table-responsive .table-fc td[data-label="Progress"] .fc-progress-wrap,
  .table-responsive-cards .table-fc td[data-label="Progress"] .fc-progress-wrap {
    width: 100%;
    max-width: 180px;
    margin-left: auto;
  }
  .table-responsive .table-fc td[data-label="Machine"] > *,
  .table-responsive-cards .table-fc td[data-label="Machine"] > * {
    max-width: 100%;
    text-align: right;
  }
  .table-responsive .table-fc td[data-label="Machine"] .fc-machine-cell,
  .table-responsive-cards .table-fc td[data-label="Machine"] .fc-machine-cell {
    align-items: flex-end;
  }
  .table-responsive .table-fc td[data-label="Target"] > *,
  .table-responsive-cards .table-fc td[data-label="Target"] > * {
    max-width: 100%;
    text-align: right;
  }
  .table-responsive .table-fc td[data-label="Target"] .fc-outcome,
  .table-responsive-cards .table-fc td[data-label="Target"] .fc-outcome {
    align-items: flex-end;
  }
  .table-responsive .table-fc td[data-label="Target"] .fc-target-cell,
  .table-responsive-cards .table-fc td[data-label="Target"] .fc-target-cell {
    max-width: 100%;
    width: 100%;
    align-items: stretch;
  }
  .table-responsive .table-fc td[data-label="Target"] .fc-target-cell > *,
  .table-responsive-cards .table-fc td[data-label="Target"] .fc-target-cell > * {
    max-width: 100%;
  }
}

/* ============================================================
   AUTH
   ============================================================ */
.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background:
    radial-gradient(circle at 12% 18%, rgba(0, 175, 198, 0.12), transparent 42%),
    radial-gradient(circle at 88% 82%, rgba(15, 118, 110, 0.1), transparent 40%),
    var(--fc-bg);
}
.auth-page-simple {
  box-sizing: border-box;
}
.auth-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--fc-surface);
  border-radius: 20px;
  padding: 1.75rem 1.5rem;
  box-shadow: var(--fc-shadow-lg);
  border: 1px solid var(--fc-border);
  animation: pageIn 0.35s ease;
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.35rem;
}
.auth-brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(145deg, #00C4DE, var(--fc-primary));
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.3rem;
  box-shadow: var(--fc-shadow-primary);
  flex-shrink: 0;
}
.auth-brand-logo {
  width: auto;
  max-width: min(100%, 380px);
  height: 108px;
  object-fit: contain;
  border-radius: 0;
  background: transparent;
  border: 0;
  flex-shrink: 0;
  padding: 0;
}
.auth-brand.has-logo {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.45rem;
  width: 100%;
}
.auth-brand-tagline {
  margin: 0;
  color: var(--fc-muted);
  font-size: 0.82rem;
}
.auth-brand h1 {
  font-size: 1.35rem;
  margin: 0;
  line-height: 1.2;
}
.auth-brand p {
  margin: 0.15rem 0 0;
  color: var(--fc-muted);
  font-size: 0.8rem;
}
.auth-lead {
  color: var(--fc-muted);
  font-size: 0.9rem;
  margin-bottom: 1.15rem;
}
.auth-credit {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 1.35rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  user-select: none;
  line-height: 1.2;
}
.auth-credit-name {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  color: #64748b;
}
.auth-credit-ver {
  font-size: 0.66rem;
  font-weight: 550;
  color: #94a3b8;
}
.auth-side {
  display: none !important;
}
.auth-demo {
  margin-top: 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: var(--fc-bg);
  font-size: 0.74rem;
  color: var(--fc-text-secondary);
  line-height: 1.55;
}
@media (max-width: 575.98px) {
  .auth-page {
    padding: 0.85rem;
    align-items: stretch;
  }
  .auth-card {
    max-width: none;
    margin: auto 0;
    padding: 1.35rem 1.1rem;
    border-radius: 16px;
  }
  .auth-brand h1 {
    font-size: 1.15rem;
  }
  .auth-brand-logo {
    height: 88px;
    max-width: min(100%, 320px);
  }
}

.brand-logo {
  width: auto;
  max-width: 220px;
  height: 56px;
  object-fit: contain;
  border-radius: 0;
  background: transparent;
  border: 0;
  flex-shrink: 1;
  padding: 0;
}
.sidebar-brand.has-logo {
  height: auto;
  min-height: 84px;
  padding-right: 1rem;
  padding-top: 0.65rem;
  padding-bottom: 0.55rem;
}
.sidebar-brand.has-company:not(.has-logo) {
  height: auto;
  min-height: calc(var(--fc-header-h) + 1.1rem);
}
.sidebar.collapsed .sidebar-brand.has-logo,
.sidebar.collapsed .sidebar-brand.has-company {
  height: var(--fc-header-h);
  min-height: var(--fc-header-h);
  padding-top: 0;
  padding-bottom: 0;
  justify-content: center;
}
.sidebar.collapsed .brand-logo {
  max-width: 44px;
  height: 44px;
  object-fit: contain;
  object-position: left center;
}
.settings-logo-preview {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.settings-logo-preview img {
  max-width: 180px;
  max-height: 90px;
  object-fit: contain;
  border: 1px solid var(--fc-border);
  border-radius: 12px;
  padding: 0.65rem;
  background: #fff;
}
.settings-logo-fallback {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: linear-gradient(145deg, #00C4DE, var(--fc-primary));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.1rem;
}

/* ============================================================
   MISC
   ============================================================ */
.progress-target {
  height: 8px;
  border-radius: 99px;
  background: #E8EEF3;
  overflow: hidden;
  flex: 1;
  min-width: 64px;
}
.progress-target .bar {
  height: 100%;
  border-radius: 99px;
  transition: width 0.5s ease, background 0.3s ease;
  background: #94A3B8;
}
.progress-target.is-low .bar { background: linear-gradient(90deg, #94A3B8, #64748B); }
.progress-target.is-mid .bar { background: linear-gradient(90deg, var(--fc-primary), #38BDF8); }
.progress-target.is-high .bar { background: linear-gradient(90deg, var(--fc-accent), var(--fc-primary)); }
.progress-target.is-full .bar { background: linear-gradient(90deg, var(--fc-primary-deep), var(--fc-primary)); }

.fc-progress-wrap {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}
.fc-progress-pct {
  font-size: 0.78rem;
  font-weight: 800;
  flex-shrink: 0;
  min-width: 2.4rem;
  text-align: right;
  color: var(--fc-muted);
}
.fc-progress-pct.is-low { color: #64748B; }
.fc-progress-pct.is-mid { color: var(--fc-primary-deep); }
.fc-progress-pct.is-high { color: var(--fc-accent); }
.fc-progress-pct.is-full { color: var(--fc-primary-deep); }

/* Production entries — foldable machine groups */
.fc-entry-groups {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.fc-entry-group.panel {
  overflow: hidden;
  margin-bottom: 0;
}
.fc-entry-group-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.55rem 1rem;
  padding: 0.65rem 0.85rem;
  background: linear-gradient(180deg, #FAFCFD 0%, #fff 100%);
  border-bottom: 1px solid transparent;
  user-select: none;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.fc-entry-group-summary::-webkit-details-marker { display: none; }
.fc-entry-group[open] .fc-entry-group-summary {
  background: linear-gradient(180deg, #D1F1F6 0%, #E8F8FB 55%, #F0FBFD 100%);
  border-bottom: 1px solid var(--fc-primary-100, #D1F1F6);
  box-shadow: inset 0 -1px 0 rgba(0, 175, 198, 0.12);
}
.fc-entry-group[open] .fc-entry-group-heading strong,
.fc-entry-group[open] .fc-entry-group-title strong {
  color: var(--fc-primary-deep, #007A8A);
}
.fc-entry-group[open] .fc-entry-group-date,
.fc-entry-group[open] .fc-entry-group-count {
  color: var(--fc-primary-deep, #007A8A);
  opacity: 0.85;
}
.fc-entry-group[open] .fc-entry-group-body {
  background: #fff;
}
.fc-entry-group-main {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  min-width: 0;
  flex: 1 1 12rem;
}
.fc-entry-group-fold {
  width: 24px;
  height: 24px;
  margin-top: 0.1rem;
  border-radius: 6px;
  border: 1px solid var(--fc-border);
  background: #fff;
  color: var(--fc-text-secondary);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 0.7rem;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.fc-entry-group[open] .fc-entry-group-fold {
  transform: rotate(90deg);
  background: var(--fc-primary-50);
  color: var(--fc-primary-deep);
  border-color: var(--fc-primary-100);
}
.fc-entry-group-state {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  border: 1px solid transparent;
  max-width: 100%;
  align-self: center;
}
.fc-entry-group-state > .bi {
  font-size: 0.85rem;
  line-height: 1;
}
.fc-entry-group-state-label {
  white-space: nowrap;
}
.fc-entry-group-state.is-completed {
  color: #15803D;
  background: transparent;
  border-color: transparent;
  padding: 0.05rem;
}
.fc-entry-group-state.is-completed > .bi {
  color: #16A34A;
  font-size: 1.05rem;
}
.fc-entry-group-state.is-completed .fc-entry-group-state-label {
  display: none;
}
.fc-entry-group-state.is-pending {
  color: #92400E;
  background: #FEF3C7;
  border-color: #FCD34D;
}
.fc-entry-group-state.is-pending > .bi {
  color: #D97706;
}
.fc-entry-group-state.is-in_progress {
  color: #0369A1;
  background: #E0F2FE;
  border-color: #7DD3FC;
}
.fc-entry-group-state.is-in_progress > .bi {
  color: #0284C7;
}
.fc-entry-group-state.is-store_wait {
  color: #0F766E;
  background: #CCFBF1;
  border-color: #5EEAD4;
}
.fc-entry-group-state.is-store_wait > .bi {
  color: #0D9488;
}
.fc-entry-group-title {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
  flex: 1;
}
.fc-entry-group-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  min-width: 0;
}
.fc-entry-group-heading strong {
  font-size: 0.9rem;
  font-weight: 750;
  color: var(--fc-text);
  line-height: 1.25;
  min-width: 0;
}
.fc-entry-group-title strong {
  font-size: 0.9rem;
  color: var(--fc-text);
  line-height: 1.25;
}
.fc-entry-group-date {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--fc-text-secondary);
  line-height: 1.3;
}
.fc-entry-date-section {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0.85rem 0 0.45rem;
  min-width: 0;
  max-width: 100%;
}
.fc-entry-date-section:first-child {
  margin-top: 0.15rem;
}
.fc-entry-date-section::after {
  content: '';
  flex: 1 1 auto;
  height: 1px;
  background: var(--fc-border, #E2E8F0);
  min-width: 1rem;
}
.fc-entry-date-section-label {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
  font-size: 0.82rem;
  font-weight: 750;
  color: var(--fc-text, #0f172a);
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.fc-entry-date-section-sub {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--fc-muted, #64748B);
}
.fc-entry-group-count {
  font-size: 0.68rem;
  font-weight: 650;
  color: var(--fc-text-muted);
  line-height: 1.3;
}
.fc-entry-group-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.55rem 1rem;
  flex: 0 1 auto;
  justify-content: flex-end;
  min-width: 0;
}
.fc-entry-group-metrics {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 0.55rem 0.85rem;
  min-width: 0;
  max-width: 100%;
}
.fc-entry-group-stat {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 3.2rem;
}
.fc-entry-group-stat .label {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fc-text-muted);
  line-height: 1.2;
}
.fc-entry-group-stat .value {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--fc-text);
  line-height: 1.15;
}
.fc-entry-group-stat .value.is-good { color: var(--fc-primary-deep); }
.fc-entry-group-stat .value.is-fail { color: #DC2626; }
.fc-entry-group:not([open]) .fc-entry-stats-open {
  display: none !important;
}
.fc-entry-group[open] .fc-entry-stats-folded {
  display: none !important;
}
.fc-entry-group-statuses {
  min-width: 0;
  max-width: 100%;
}
.fc-entry-group-statuses .fc-process-chip,
.fc-entry-group-statuses .fc-entry-status-chip {
  max-width: 100%;
}
.fc-entry-group-process {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.fc-entry-group-process > .label {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fc-text-muted);
}
.fc-entry-process-progress {
  margin-top: 0;
}
.fc-entry-process-progress .fc-process-chip {
  font-size: 0.65rem;
}
.fc-entry-status-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  justify-content: flex-end;
}
.fc-entry-status-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
}
.fc-entry-status-chip.is-approved {
  background: var(--fc-primary-50);
  color: var(--fc-primary-deep);
}
.fc-entry-status-chip.is-pending {
  background: #FEF3C7;
  color: #92400E;
}
.fc-entry-status-chip.is-awaiting {
  background: #E0F2FE;
  color: #075985;
}
.fc-entry-status-chip.is-cancelled {
  background: #FDE68A;
  color: #78350F;
}
.fc-entry-status-chip.is-muted {
  background: #F1F5F9;
  color: #64748B;
}

.fc-entry-process {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.fc-process-chip,
.fc-entry-process-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
}
.fc-process-chip.is-muted,
.fc-entry-process-chip.is-muted {
  background: #F1F5F9;
  color: #64748B;
  font-weight: 600;
}
.fc-process-chip.is-teal { background: #CCFBF1; color: #0F766E; }
.fc-process-chip.is-violet { background: #F3E8FF; color: #7E22CE; }
.fc-process-chip.is-indigo { background: #E0E7FF; color: #4338CA; }
.fc-process-chip.is-sky { background: #E0F2FE; color: #0369A1; }
.fc-process-chip.is-amber { background: #FEF3C7; color: #B45309; }
.fc-process-chip.is-orange { background: #FFEDD5; color: #C2410C; }
.fc-process-chip.is-slate { background: #E2E8F0; color: #334155; }
.fc-process-chip.is-green { background: #BBF7D0; color: #166534; font-weight: 800; }
.fc-process-chip.is-rose { background: #FFE4E6; color: #BE123C; }

.fc-process-hero {
  border-left: 4px solid #94A3B8;
}
.fc-process-hero.is-rose { border-left-color: #E11D48; }
.fc-process-hero.is-violet { border-left-color: #9333EA; }
.fc-process-hero.is-indigo { border-left-color: #4F46E5; }
.fc-process-hero.is-teal { border-left-color: #0D9488; }
.fc-process-hero.is-sky { border-left-color: #0284C7; }
.fc-process-hero.is-amber { border-left-color: #D97706; }
.fc-process-hero.is-orange { border-left-color: #EA580C; }
.fc-process-hero.is-slate { border-left-color: #475569; }
.fc-process-hero.is-green { border-left-color: #15803D; }
.fc-process-hero-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #F1F5F9;
  color: #334155;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.fc-process-hero-icon-sm {
  width: 2rem;
  height: 2rem;
  font-size: 1rem;
  border-radius: 0.5rem;
}

/* Entry process page: modern layout, wide on desktop */
.fc-ep-page {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding-bottom: 0.5rem;
}
.fc-ep-page.has-float-actions {
  padding-bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px));
}
@media (max-width: 991.98px) {
  .fc-ep-page {
    max-width: 100%;
  }
  .fc-ep-page.has-float-actions {
    padding-bottom: calc(5.25rem + var(--fc-bottom-nav-h, 3.35rem) + env(safe-area-inset-bottom, 0px));
  }
}
.fc-ep-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}
.fc-ep-shell {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.fc-ep-tracker-wrap {
  padding: 0.65rem 0.8rem 0.7rem;
  border: 1px solid #E8EEF2;
  border-radius: 0.75rem;
  background: #fff;
}
.fc-ep-track-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.55rem;
}
.fc-ep-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  min-width: 0;
}
.fc-ep-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  letter-spacing: -0.01em;
  color: #0F172A;
}
.fc-ep-color {
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748B;
}
.fc-ep-title-row .badge-status,
.fc-ep-title-row .badge {
  font-size: 0.65rem;
  padding: 0.15rem 0.45rem;
}
.fc-ep-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.55rem;
  margin-top: 0.2rem;
  font-size: 0.72rem;
  color: #94A3B8;
  font-weight: 550;
}
.fc-ep-meta-line .fc-entry-code {
  font-size: 0.72rem;
  color: #0E7490;
  font-weight: 650;
}
.fc-ep-track-count {
  font-size: 0.9rem;
  font-weight: 750;
  color: #0F172A;
  line-height: 1;
  flex-shrink: 0;
}
.fc-ep-track-count span {
  font-size: 0.7rem;
  font-weight: 600;
  color: #94A3B8;
}
.fc-ep-tracker-rail {
  margin-top: 0.15rem;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.fc-ep-tracker-rail::-webkit-scrollbar { display: none; }
.fc-ep-tracker {
  list-style: none;
  margin: 0;
  padding: 0.45rem 0 0;
  display: flex;
  align-items: flex-start;
  gap: 0;
  position: relative;
  width: 100%;
  min-width: max(100%, calc(var(--ep-steps, 7) * 3.1rem));
}
.fc-ep-tracker-progress {
  position: absolute;
  left: calc(100% / (2 * var(--ep-steps, 7)));
  right: calc(100% / (2 * var(--ep-steps, 7)));
  top: 0.95rem;
  height: 3px;
  border-radius: 99px;
  background: #E2E8F0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
  list-style: none;
  margin: 0;
  padding: 0;
}
.fc-ep-tracker-fill {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #22C55E, #15803D);
  transition: width 0.25s ease;
}
.fc-ep-tracker-item {
  position: relative;
  flex: 1 1 0;
  min-width: 2.85rem;
  z-index: 1;
}
.fc-ep-tracker-item.is-active {
  z-index: 2;
}
.fc-ep-tracker-item:not(:last-child)::after {
  display: none;
}
.fc-ep-tracker-btn {
  position: relative;
  z-index: 1;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0.15rem 0.1rem 0.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.28rem;
  cursor: pointer;
  color: #64748B;
}
.fc-ep-tracker-name {
  width: 100%;
  font-size: 0.58rem;
  font-weight: 650;
  line-height: 1.15;
  text-align: center;
  color: #94A3B8;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 1.35em;
  opacity: 0.85;
  transition: color 0.15s ease, opacity 0.15s ease;
}
.fc-ep-tracker-item.is-active .fc-ep-tracker-name {
  color: #0F172A;
  font-weight: 800;
  opacity: 1;
}
.fc-ep-tracker-item.is-done .fc-ep-tracker-name,
.fc-ep-tracker-item.is-done.is-active .fc-ep-tracker-name {
  color: #166534;
  font-weight: 750;
  opacity: 0.95;
}
.fc-ep-tracker-dot {
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 800;
  background: #F8FAFC;
  color: #64748B;
  border: 1.5px solid #E2E8F0;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.15s ease;
}
.fc-ep-tracker-item.is-active:not(.is-done) .fc-ep-tracker-dot {
  width: 1.55rem;
  height: 1.55rem;
  font-size: 0.7rem;
}
.fc-ep-tracker-item.is-active.is-done .fc-ep-tracker-dot {
  width: 1.4rem;
  height: 1.4rem;
}
.fc-ep-tracker-item.is-rose .fc-ep-tracker-dot { background: #FFE4E6; border-color: #FECDD3; color: #BE123C; }
.fc-ep-tracker-item.is-violet .fc-ep-tracker-dot { background: #F3E8FF; border-color: #E9D5FF; color: #7E22CE; }
.fc-ep-tracker-item.is-indigo .fc-ep-tracker-dot { background: #E0E7FF; border-color: #C7D2FE; color: #4338CA; }
.fc-ep-tracker-item.is-teal .fc-ep-tracker-dot { background: #CCFBF1; border-color: #99F6E4; color: #0F766E; }
.fc-ep-tracker-item.is-sky .fc-ep-tracker-dot { background: #E0F2FE; border-color: #BAE6FD; color: #0369A1; }
.fc-ep-tracker-item.is-amber .fc-ep-tracker-dot { background: #FEF3C7; border-color: #FDE68A; color: #B45309; }
.fc-ep-tracker-item.is-orange .fc-ep-tracker-dot { background: #FFEDD5; border-color: #FED7AA; color: #C2410C; }
.fc-ep-tracker-item.is-slate .fc-ep-tracker-dot { background: #E2E8F0; border-color: #CBD5E1; color: #334155; }
.fc-ep-tracker-item.is-green .fc-ep-tracker-dot { background: #DCFCE7; border-color: #BBF7D0; color: #15803D; }
.fc-ep-tracker-item.is-done .fc-ep-tracker-dot,
.fc-ep-tracker-item.is-done.is-rose .fc-ep-tracker-dot,
.fc-ep-tracker-item.is-done.is-violet .fc-ep-tracker-dot,
.fc-ep-tracker-item.is-done.is-indigo .fc-ep-tracker-dot,
.fc-ep-tracker-item.is-done.is-teal .fc-ep-tracker-dot,
.fc-ep-tracker-item.is-done.is-sky .fc-ep-tracker-dot,
.fc-ep-tracker-item.is-done.is-amber .fc-ep-tracker-dot,
.fc-ep-tracker-item.is-done.is-orange .fc-ep-tracker-dot,
.fc-ep-tracker-item.is-done.is-slate .fc-ep-tracker-dot,
.fc-ep-tracker-item.is-done.is-green .fc-ep-tracker-dot {
  background: #16A34A;
  border-color: #15803D;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.22);
}
.fc-ep-tracker-item.is-done .fc-ep-tracker-name,
.fc-ep-tracker-item.is-done.is-rose .fc-ep-tracker-name,
.fc-ep-tracker-item.is-done.is-violet .fc-ep-tracker-name,
.fc-ep-tracker-item.is-done.is-indigo .fc-ep-tracker-name,
.fc-ep-tracker-item.is-done.is-teal .fc-ep-tracker-name,
.fc-ep-tracker-item.is-done.is-sky .fc-ep-tracker-name,
.fc-ep-tracker-item.is-done.is-amber .fc-ep-tracker-name,
.fc-ep-tracker-item.is-done.is-orange .fc-ep-tracker-name,
.fc-ep-tracker-item.is-done.is-slate .fc-ep-tracker-name,
.fc-ep-tracker-item.is-done.is-green .fc-ep-tracker-name {
  color: #166534;
  font-weight: 750;
}
@keyframes fc-ep-glow-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 2px rgba(255, 255, 255, 0.95),
      0 0 0 5px var(--ep-glow, rgba(14, 165, 233, 0.3)),
      0 0 12px 2px var(--ep-glow-soft, rgba(14, 165, 233, 0.35));
  }
  50% {
    box-shadow:
      0 0 0 3px rgba(255, 255, 255, 1),
      0 0 0 7px var(--ep-glow, rgba(14, 165, 233, 0.18)),
      0 0 16px 4px var(--ep-glow-soft, rgba(14, 165, 233, 0.42));
  }
}
.fc-ep-tracker-item.is-active:not(.is-done) .fc-ep-tracker-dot {
  animation: fc-ep-glow-pulse 1.8s ease-in-out infinite;
}
.fc-ep-tracker-item.is-active.is-done .fc-ep-tracker-dot {
  animation: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95), 0 0 0 4px rgba(22, 163, 74, 0.28);
}
.fc-ep-tracker-item.is-active.is-rose {
  --ep-glow: rgba(225, 29, 72, 0.4);
  --ep-glow-soft: rgba(225, 29, 72, 0.55);
}
.fc-ep-tracker-item.is-active.is-violet {
  --ep-glow: rgba(147, 51, 234, 0.4);
  --ep-glow-soft: rgba(147, 51, 234, 0.55);
}
.fc-ep-tracker-item.is-active.is-indigo {
  --ep-glow: rgba(79, 70, 229, 0.4);
  --ep-glow-soft: rgba(79, 70, 229, 0.55);
}
.fc-ep-tracker-item.is-active.is-teal {
  --ep-glow: rgba(13, 148, 136, 0.4);
  --ep-glow-soft: rgba(13, 148, 136, 0.55);
}
.fc-ep-tracker-item.is-active.is-sky {
  --ep-glow: rgba(2, 132, 199, 0.4);
  --ep-glow-soft: rgba(2, 132, 199, 0.55);
}
.fc-ep-tracker-item.is-active.is-amber {
  --ep-glow: rgba(217, 119, 6, 0.4);
  --ep-glow-soft: rgba(217, 119, 6, 0.55);
}
.fc-ep-tracker-item.is-active.is-orange {
  --ep-glow: rgba(234, 88, 12, 0.4);
  --ep-glow-soft: rgba(234, 88, 12, 0.55);
}
.fc-ep-tracker-item.is-active.is-slate {
  --ep-glow: rgba(71, 85, 105, 0.4);
  --ep-glow-soft: rgba(71, 85, 105, 0.5);
}
.fc-ep-tracker-item.is-active.is-green,
.fc-ep-tracker-item.is-done.is-active {
  --ep-glow: rgba(22, 163, 74, 0.45);
  --ep-glow-soft: rgba(22, 163, 74, 0.6);
}
.fc-ep-tracker-item.is-active.is-rose .fc-ep-tracker-dot { background: #E11D48; border-color: #E11D48; color: #fff; }
.fc-ep-tracker-item.is-active.is-violet .fc-ep-tracker-dot { background: #9333EA; border-color: #9333EA; color: #fff; }
.fc-ep-tracker-item.is-active.is-indigo .fc-ep-tracker-dot { background: #4F46E5; border-color: #4F46E5; color: #fff; }
.fc-ep-tracker-item.is-active.is-teal .fc-ep-tracker-dot { background: #0D9488; border-color: #0D9488; color: #fff; }
.fc-ep-tracker-item.is-active.is-sky .fc-ep-tracker-dot { background: #0284C7; border-color: #0284C7; color: #fff; }
.fc-ep-tracker-item.is-active.is-amber .fc-ep-tracker-dot { background: #D97706; border-color: #D97706; color: #fff; }
.fc-ep-tracker-item.is-active.is-orange .fc-ep-tracker-dot { background: #EA580C; border-color: #EA580C; color: #fff; }
.fc-ep-tracker-item.is-active.is-slate .fc-ep-tracker-dot { background: #475569; border-color: #475569; color: #fff; }
.fc-ep-tracker-item.is-active.is-green .fc-ep-tracker-dot,
.fc-ep-tracker-item.is-done.is-active .fc-ep-tracker-dot,
.fc-ep-tracker-item.is-done.is-active.is-rose .fc-ep-tracker-dot,
.fc-ep-tracker-item.is-done.is-active.is-violet .fc-ep-tracker-dot,
.fc-ep-tracker-item.is-done.is-active.is-indigo .fc-ep-tracker-dot,
.fc-ep-tracker-item.is-done.is-active.is-teal .fc-ep-tracker-dot,
.fc-ep-tracker-item.is-done.is-active.is-sky .fc-ep-tracker-dot,
.fc-ep-tracker-item.is-done.is-active.is-amber .fc-ep-tracker-dot,
.fc-ep-tracker-item.is-done.is-active.is-orange .fc-ep-tracker-dot,
.fc-ep-tracker-item.is-done.is-active.is-slate .fc-ep-tracker-dot,
.fc-ep-tracker-item.is-done.is-active.is-green .fc-ep-tracker-dot {
  background: #15803D;
  border-color: #166534;
  color: #fff;
  font-weight: 800;
}
.fc-ep-done-note {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 750;
  color: #166534;
  background: #DCFCE7;
  border: 1px solid #86EFAC;
  border-radius: 0.65rem;
  padding: 0.55rem 0.7rem;
}
.fc-ep-card {
  border: 1px solid #E8EEF2;
  border-radius: 1rem;
  background: #fff;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
}
.fc-ep-tab-panel { display: none; padding: 1rem 1.15rem 1.15rem; border-top: 3px solid transparent; }
.fc-ep-tab-panel.is-active { display: block; }
.fc-ep-tab-panel.is-active.is-rose { border-top-color: #E11D48; }
.fc-ep-tab-panel.is-active.is-violet { border-top-color: #9333EA; }
.fc-ep-tab-panel.is-active.is-indigo { border-top-color: #4F46E5; }
.fc-ep-tab-panel.is-active.is-teal { border-top-color: #0D9488; }
.fc-ep-tab-panel.is-active.is-sky { border-top-color: #0284C7; }
.fc-ep-tab-panel.is-active.is-amber { border-top-color: #D97706; }
.fc-ep-tab-panel.is-active.is-orange { border-top-color: #EA580C; }
.fc-ep-tab-panel.is-active.is-slate { border-top-color: #475569; }
.fc-ep-tab-panel.is-active.is-green { border-top-color: #16A34A; }
@media (min-width: 992px) {
  .fc-ep-step-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
  }
  .fc-ep-step-form > .fc-ep-assign {
    width: 100%;
  }
  .fc-ep-step-form > .fc-ep-failed {
    margin-top: 0;
    align-self: flex-start;
  }
  .fc-ep-op-list {
    max-height: 18rem;
  }
}
.fc-ep-step-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
}
.fc-ep-undo-inline {
  margin: 0 0 0 auto;
  flex-shrink: 0;
}
.fc-ep-undo-inline .fc-ep-undo-btn,
.fc-ep-step-head > .fc-ep-undo-btn {
  white-space: nowrap;
}
.fc-ep-step-icon {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #F1F5F9;
  color: #334155;
  font-size: 0.85rem;
}
.fc-ep-step-icon.is-rose { background: #FFE4E6; color: #BE123C; }
.fc-ep-step-icon.is-violet { background: #F3E8FF; color: #7E22CE; }
.fc-ep-step-icon.is-indigo { background: #E0E7FF; color: #4338CA; }
.fc-ep-step-icon.is-teal { background: #CCFBF1; color: #0F766E; }
.fc-ep-step-icon.is-sky { background: #E0F2FE; color: #0369A1; }
.fc-ep-step-icon.is-amber { background: #FEF3C7; color: #B45309; }
.fc-ep-step-icon.is-orange { background: #FFEDD5; color: #C2410C; }
.fc-ep-step-icon.is-slate { background: #E2E8F0; color: #334155; }
.fc-ep-step-icon.is-green { background: #BBF7D0; color: #166534; }
.fc-ep-step-kicker {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #94A3B8;
  line-height: 1.1;
}
.fc-ep-step-kicker.is-done {
  color: #166534;
  font-weight: 800;
}
.fc-ep-tab-panel.is-active.is-done,
.fc-ep-tab-panel.is-active.is-green {
  border-top-color: #15803D;
}
.fc-ep-tab-panel.is-active.is-done .fc-ep-step-name,
.fc-ep-tab-panel.is-active.is-green .fc-ep-step-name {
  color: #166534;
  font-weight: 800;
}
.fc-ep-tab-panel.is-active.is-done .fc-ep-step-icon,
.fc-ep-tab-panel.is-active.is-green .fc-ep-step-icon {
  background: #16A34A;
  color: #fff;
}
.fc-ep-step-name {
  font-size: 0.92rem;
  font-weight: 750;
  line-height: 1.2;
}
.fc-ep-step-hint {
  display: none;
}
.fc-ep-assign {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.fc-ep-assign-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
}
.fc-ep-mode-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  background: #F1F5F9;
  color: #475569;
}
.fc-ep-qty-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.65rem;
}
.fc-ep-qty-row label {
  margin: 0;
  font-size: 0.78rem;
  color: #64748B;
  font-weight: 600;
}
.fc-ep-qty-row .form-control,
.fc-ep-target-input {
  width: 7.5rem;
  text-align: right;
  font-weight: 750;
}
.fc-ep-qty-edit {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  justify-self: end;
}
.fc-ep-qty-view {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.fc-ep-qty-view .fc-ep-qty-value,
.fc-ep-qty-view strong.fc-ep-qty-value {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  min-width: 1.5rem;
  text-align: right;
}
.fc-ep-qty-fields {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}
.fc-ep-qty-edit-btn,
.fc-ep-qty-clear-btn,
.fc-ep-qty-done-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  padding: 0;
  border: 1px solid #E2E8F0;
  border-radius: 0.45rem;
  background: #fff;
  color: #64748B;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 1;
}
.fc-ep-qty-edit-btn:hover,
.fc-ep-qty-done-btn:hover {
  background: #F8FAFC;
  color: #0F172A;
  border-color: #CBD5E1;
}
.fc-ep-qty-clear-btn:hover {
  background: #FEF2F2;
  color: #B91C1C;
  border-color: #FECACA;
}
.fc-ep-qty-edit.is-ind .fc-ep-qty-fields .fc-ep-ind-qty {
  width: 4.5rem;
}
.fc-ep-qty-edit.is-ind .fc-ep-op-qty:empty {
  display: none;
}
.fc-ep-target-readout {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748B;
}
.fc-ep-target-readout strong {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.fc-ep-op-box {
  border: 1px solid #E8EEF2;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #FBFCFD;
}
.fc-ep-op-cols {
  display: grid;
  grid-template-columns: 1fr;
}
.fc-ep-op-cols > .fc-ep-op-section.is-assigned-sec {
  order: -1;
  border-top: 0;
}
.fc-ep-op-cols > .fc-ep-op-section.is-available-sec {
  border-top: 1px solid #EEF2F6;
}
@media (min-width: 768px) {
  .fc-ep-op-cols {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .fc-ep-op-cols > .fc-ep-op-section.is-available-sec {
    order: 0;
    border-top: 0;
    border-right: 1px solid #EEF2F6;
  }
  .fc-ep-op-cols > .fc-ep-op-section.is-assigned-sec {
    order: 1;
    border-top: 0;
  }
  .fc-ep-op-list,
  .fc-ep-op-list.is-assigned {
    max-height: 16rem;
  }
}
.fc-ep-op-toolbar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.45rem;
  border-bottom: 1px solid #EEF2F6;
  background: #fff;
}
.fc-ep-op-search {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.4rem;
}
.fc-ep-op-search i {
  color: #94A3B8;
  font-size: 0.8rem;
}
.fc-ep-op-search .form-control {
  border: 0;
  box-shadow: none;
  padding: 0.2rem 0;
  background: transparent;
  font-size: 0.82rem;
}
.fc-ep-op-section {
  border-top: 1px solid #EEF2F6;
}
.fc-ep-op-section:first-of-type {
  border-top: 0;
}
.fc-ep-op-section-title {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.65rem 0.2rem;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #64748B;
}
.fc-ep-op-count {
  margin-left: auto;
  min-width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  background: #E2E8F0;
  color: #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 750;
}
.fc-ep-op-list {
  max-height: 11rem;
  overflow: auto;
  padding: 0.25rem 0.35rem 0.45rem;
}
.fc-ep-op-list.is-assigned {
  max-height: 8.5rem;
  background: #F8FFFB;
}
.fc-ep-op-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  padding: 0.4rem 0.45rem;
  border-radius: 0.5rem;
  cursor: pointer;
}
.fc-ep-op-item:hover { background: #F1F5F9; }
.fc-ep-op-item.is-available {
  border: 1px solid transparent;
}
.fc-ep-op-item.is-available.is-selected {
  background: #ECFDF5;
  border-color: #99F6E4;
  box-shadow: inset 3px 0 0 #0D9488;
}
.fc-ep-op-item.is-available.is-selected .fc-ep-op-name {
  color: #0F766E;
  font-weight: 700;
}
.fc-ep-op-item.is-assigned {
  background: #fff;
  border: 1px solid #E2E8F0;
  margin-bottom: 0.3rem;
}
.fc-ep-op-item.is-assigned.is-picked {
  border-color: #CBD5E1;
  background: #F8FAFC;
  box-shadow: inset 3px 0 0 #64748B;
}
.fc-ep-op-item.is-assigned.is-picked .fc-ep-op-name {
  color: #334155;
  font-weight: 700;
}
.fc-ep-op-pick {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.fc-ep-op-item input[type="checkbox"] {
  margin: 0;
  flex-shrink: 0;
}
.fc-ep-op-name {
  flex: 1;
  min-width: 0;
  font-size: 0.82rem;
  font-weight: 550;
  color: #0F172A;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fc-ep-op-qty {
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 800;
  color: #64748B;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: #F1F5F9;
}
.fc-ep-ind-qty {
  width: 4.5rem;
  flex-shrink: 0;
  font-weight: 750;
  text-align: right;
}

/* Step-tone colors for Assigned + targets */
.fc-ep-assign.is-rose {
  --ep-tone: #E11D48;
  --ep-tone-soft: #FFF1F2;
  --ep-tone-mid: #FFE4E6;
  --ep-tone-border: #FECDD3;
  --ep-tone-ink: #BE123C;
}
.fc-ep-assign.is-violet {
  --ep-tone: #9333EA;
  --ep-tone-soft: #FAF5FF;
  --ep-tone-mid: #F3E8FF;
  --ep-tone-border: #E9D5FF;
  --ep-tone-ink: #7E22CE;
}
.fc-ep-assign.is-indigo {
  --ep-tone: #4F46E5;
  --ep-tone-soft: #EEF2FF;
  --ep-tone-mid: #E0E7FF;
  --ep-tone-border: #C7D2FE;
  --ep-tone-ink: #4338CA;
}
.fc-ep-assign.is-teal {
  --ep-tone: #0D9488;
  --ep-tone-soft: #F0FDFA;
  --ep-tone-mid: #CCFBF1;
  --ep-tone-border: #99F6E4;
  --ep-tone-ink: #0F766E;
}
.fc-ep-assign.is-sky {
  --ep-tone: #0284C7;
  --ep-tone-soft: #F0F9FF;
  --ep-tone-mid: #E0F2FE;
  --ep-tone-border: #BAE6FD;
  --ep-tone-ink: #0369A1;
}
.fc-ep-assign.is-amber {
  --ep-tone: #D97706;
  --ep-tone-soft: #FFFBEB;
  --ep-tone-mid: #FEF3C7;
  --ep-tone-border: #FDE68A;
  --ep-tone-ink: #B45309;
}
.fc-ep-assign.is-orange {
  --ep-tone: #EA580C;
  --ep-tone-soft: #FFF7ED;
  --ep-tone-mid: #FFEDD5;
  --ep-tone-border: #FED7AA;
  --ep-tone-ink: #C2410C;
}
.fc-ep-assign.is-slate {
  --ep-tone: #475569;
  --ep-tone-soft: #F8FAFC;
  --ep-tone-mid: #E2E8F0;
  --ep-tone-border: #CBD5E1;
  --ep-tone-ink: #334155;
}
.fc-ep-assign.is-green {
  --ep-tone: #15803D;
  --ep-tone-soft: #F0FDF4;
  --ep-tone-mid: #BBF7D0;
  --ep-tone-border: #86EFAC;
  --ep-tone-ink: #166534;
}
.fc-ep-assign.is-rose .fc-ep-mode-chip,
.fc-ep-assign.is-violet .fc-ep-mode-chip,
.fc-ep-assign.is-indigo .fc-ep-mode-chip,
.fc-ep-assign.is-teal .fc-ep-mode-chip,
.fc-ep-assign.is-sky .fc-ep-mode-chip,
.fc-ep-assign.is-amber .fc-ep-mode-chip,
.fc-ep-assign.is-orange .fc-ep-mode-chip,
.fc-ep-assign.is-slate .fc-ep-mode-chip,
.fc-ep-assign.is-green .fc-ep-mode-chip {
  background: var(--ep-tone-mid);
  color: var(--ep-tone-ink);
}
.fc-ep-assign.is-rose .fc-ep-target-input,
.fc-ep-assign.is-violet .fc-ep-target-input,
.fc-ep-assign.is-indigo .fc-ep-target-input,
.fc-ep-assign.is-teal .fc-ep-target-input,
.fc-ep-assign.is-sky .fc-ep-target-input,
.fc-ep-assign.is-amber .fc-ep-target-input,
.fc-ep-assign.is-orange .fc-ep-target-input,
.fc-ep-assign.is-slate .fc-ep-target-input,
.fc-ep-assign.is-green .fc-ep-target-input {
  color: var(--ep-tone-ink);
  border-color: var(--ep-tone-border);
  background: var(--ep-tone-soft);
  box-shadow: 0 0 0 1px var(--ep-tone-border);
}
.fc-ep-assign.is-rose .fc-ep-target-input:focus { border-color: #E11D48; box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.2); }
.fc-ep-assign.is-teal .fc-ep-target-input:focus { border-color: #0D9488; box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.22); }
.fc-ep-assign.is-sky .fc-ep-target-input:focus { border-color: #0284C7; box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.22); }
.fc-ep-assign.is-amber .fc-ep-target-input:focus { border-color: #D97706; box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.22); }
.fc-ep-assign.is-orange .fc-ep-target-input:focus { border-color: #EA580C; box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.22); }
.fc-ep-assign.is-slate .fc-ep-target-input:focus { border-color: #475569; box-shadow: 0 0 0 3px rgba(71, 85, 105, 0.22); }
.fc-ep-assign.is-green .fc-ep-target-input:focus { border-color: #16A34A; box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.22); }
.fc-ep-assign.is-rose .fc-ep-qty-view .fc-ep-qty-value,
.fc-ep-assign.is-violet .fc-ep-qty-view .fc-ep-qty-value,
.fc-ep-assign.is-indigo .fc-ep-qty-view .fc-ep-qty-value,
.fc-ep-assign.is-teal .fc-ep-qty-view .fc-ep-qty-value,
.fc-ep-assign.is-sky .fc-ep-qty-view .fc-ep-qty-value,
.fc-ep-assign.is-amber .fc-ep-qty-view .fc-ep-qty-value,
.fc-ep-assign.is-orange .fc-ep-qty-view .fc-ep-qty-value,
.fc-ep-assign.is-slate .fc-ep-qty-view .fc-ep-qty-value,
.fc-ep-assign.is-green .fc-ep-qty-view .fc-ep-qty-value {
  color: var(--ep-tone-ink);
}
.fc-ep-assign.is-rose .fc-ep-qty-edit-btn,
.fc-ep-assign.is-violet .fc-ep-qty-edit-btn,
.fc-ep-assign.is-indigo .fc-ep-qty-edit-btn,
.fc-ep-assign.is-teal .fc-ep-qty-edit-btn,
.fc-ep-assign.is-sky .fc-ep-qty-edit-btn,
.fc-ep-assign.is-amber .fc-ep-qty-edit-btn,
.fc-ep-assign.is-orange .fc-ep-qty-edit-btn,
.fc-ep-assign.is-slate .fc-ep-qty-edit-btn,
.fc-ep-assign.is-green .fc-ep-qty-edit-btn {
  border-color: var(--ep-tone-border);
  color: var(--ep-tone-ink);
  background: var(--ep-tone-soft);
}
.fc-ep-assign.is-rose .is-assigned-sec .fc-ep-op-section-title,
.fc-ep-assign.is-violet .is-assigned-sec .fc-ep-op-section-title,
.fc-ep-assign.is-indigo .is-assigned-sec .fc-ep-op-section-title,
.fc-ep-assign.is-teal .is-assigned-sec .fc-ep-op-section-title,
.fc-ep-assign.is-sky .is-assigned-sec .fc-ep-op-section-title,
.fc-ep-assign.is-amber .is-assigned-sec .fc-ep-op-section-title,
.fc-ep-assign.is-orange .is-assigned-sec .fc-ep-op-section-title,
.fc-ep-assign.is-slate .is-assigned-sec .fc-ep-op-section-title,
.fc-ep-assign.is-green .is-assigned-sec .fc-ep-op-section-title {
  color: var(--ep-tone-ink);
}
.fc-ep-assign.is-rose .is-assigned-sec .fc-ep-op-count,
.fc-ep-assign.is-violet .is-assigned-sec .fc-ep-op-count,
.fc-ep-assign.is-indigo .is-assigned-sec .fc-ep-op-count,
.fc-ep-assign.is-teal .is-assigned-sec .fc-ep-op-count,
.fc-ep-assign.is-sky .is-assigned-sec .fc-ep-op-count,
.fc-ep-assign.is-amber .is-assigned-sec .fc-ep-op-count,
.fc-ep-assign.is-orange .is-assigned-sec .fc-ep-op-count,
.fc-ep-assign.is-slate .is-assigned-sec .fc-ep-op-count,
.fc-ep-assign.is-green .is-assigned-sec .fc-ep-op-count {
  background: var(--ep-tone);
  color: #fff;
}
.fc-ep-assign.is-rose .fc-ep-op-list.is-assigned,
.fc-ep-assign.is-violet .fc-ep-op-list.is-assigned,
.fc-ep-assign.is-indigo .fc-ep-op-list.is-assigned,
.fc-ep-assign.is-teal .fc-ep-op-list.is-assigned,
.fc-ep-assign.is-sky .fc-ep-op-list.is-assigned,
.fc-ep-assign.is-amber .fc-ep-op-list.is-assigned,
.fc-ep-assign.is-orange .fc-ep-op-list.is-assigned,
.fc-ep-assign.is-slate .fc-ep-op-list.is-assigned,
.fc-ep-assign.is-green .fc-ep-op-list.is-assigned {
  background: var(--ep-tone-soft);
}
.fc-ep-assign.is-rose .fc-ep-op-item.is-assigned,
.fc-ep-assign.is-violet .fc-ep-op-item.is-assigned,
.fc-ep-assign.is-indigo .fc-ep-op-item.is-assigned,
.fc-ep-assign.is-teal .fc-ep-op-item.is-assigned,
.fc-ep-assign.is-sky .fc-ep-op-item.is-assigned,
.fc-ep-assign.is-amber .fc-ep-op-item.is-assigned,
.fc-ep-assign.is-orange .fc-ep-op-item.is-assigned,
.fc-ep-assign.is-slate .fc-ep-op-item.is-assigned,
.fc-ep-assign.is-green .fc-ep-op-item.is-assigned {
  border-color: var(--ep-tone-border);
  background: #fff;
  box-shadow: inset 3px 0 0 var(--ep-tone);
}
.fc-ep-assign.is-rose .fc-ep-op-item.is-available.is-selected,
.fc-ep-assign.is-violet .fc-ep-op-item.is-available.is-selected,
.fc-ep-assign.is-indigo .fc-ep-op-item.is-available.is-selected,
.fc-ep-assign.is-teal .fc-ep-op-item.is-available.is-selected,
.fc-ep-assign.is-sky .fc-ep-op-item.is-available.is-selected,
.fc-ep-assign.is-amber .fc-ep-op-item.is-available.is-selected,
.fc-ep-assign.is-orange .fc-ep-op-item.is-available.is-selected,
.fc-ep-assign.is-slate .fc-ep-op-item.is-available.is-selected,
.fc-ep-assign.is-green .fc-ep-op-item.is-available.is-selected {
  background: var(--ep-tone-soft);
  border-color: var(--ep-tone-border);
  box-shadow: inset 3px 0 0 var(--ep-tone);
}
.fc-ep-assign.is-rose .fc-ep-op-item.is-available.is-selected .fc-ep-op-name,
.fc-ep-assign.is-violet .fc-ep-op-item.is-available.is-selected .fc-ep-op-name,
.fc-ep-assign.is-indigo .fc-ep-op-item.is-available.is-selected .fc-ep-op-name,
.fc-ep-assign.is-teal .fc-ep-op-item.is-available.is-selected .fc-ep-op-name,
.fc-ep-assign.is-sky .fc-ep-op-item.is-available.is-selected .fc-ep-op-name,
.fc-ep-assign.is-amber .fc-ep-op-item.is-available.is-selected .fc-ep-op-name,
.fc-ep-assign.is-orange .fc-ep-op-item.is-available.is-selected .fc-ep-op-name,
.fc-ep-assign.is-slate .fc-ep-op-item.is-available.is-selected .fc-ep-op-name,
.fc-ep-assign.is-green .fc-ep-op-item.is-available.is-selected .fc-ep-op-name {
  color: var(--ep-tone-ink);
}
.fc-ep-assign.is-rose .fc-ep-op-item.is-assigned.is-picked,
.fc-ep-assign.is-violet .fc-ep-op-item.is-assigned.is-picked,
.fc-ep-assign.is-indigo .fc-ep-op-item.is-assigned.is-picked,
.fc-ep-assign.is-teal .fc-ep-op-item.is-assigned.is-picked,
.fc-ep-assign.is-sky .fc-ep-op-item.is-assigned.is-picked,
.fc-ep-assign.is-amber .fc-ep-op-item.is-assigned.is-picked,
.fc-ep-assign.is-orange .fc-ep-op-item.is-assigned.is-picked,
.fc-ep-assign.is-slate .fc-ep-op-item.is-assigned.is-picked,
.fc-ep-assign.is-green .fc-ep-op-item.is-assigned.is-picked {
  background: #F8FAFC;
  border-color: #CBD5E1;
  box-shadow: inset 3px 0 0 #64748B;
}
.fc-ep-assign.is-rose .fc-ep-op-item.is-assigned .fc-ep-op-qty,
.fc-ep-assign.is-violet .fc-ep-op-item.is-assigned .fc-ep-op-qty,
.fc-ep-assign.is-indigo .fc-ep-op-item.is-assigned .fc-ep-op-qty,
.fc-ep-assign.is-teal .fc-ep-op-item.is-assigned .fc-ep-op-qty,
.fc-ep-assign.is-sky .fc-ep-op-item.is-assigned .fc-ep-op-qty,
.fc-ep-assign.is-amber .fc-ep-op-item.is-assigned .fc-ep-op-qty,
.fc-ep-assign.is-orange .fc-ep-op-item.is-assigned .fc-ep-op-qty,
.fc-ep-assign.is-slate .fc-ep-op-item.is-assigned .fc-ep-op-qty,
.fc-ep-assign.is-green .fc-ep-op-item.is-assigned .fc-ep-op-qty {
  background: var(--ep-tone-mid);
  color: var(--ep-tone-ink);
}
.fc-ep-assign.is-rose .fc-ep-op-item.is-assigned .fc-ep-ind-qty,
.fc-ep-assign.is-violet .fc-ep-op-item.is-assigned .fc-ep-ind-qty,
.fc-ep-assign.is-indigo .fc-ep-op-item.is-assigned .fc-ep-ind-qty,
.fc-ep-assign.is-teal .fc-ep-op-item.is-assigned .fc-ep-ind-qty,
.fc-ep-assign.is-sky .fc-ep-op-item.is-assigned .fc-ep-ind-qty,
.fc-ep-assign.is-amber .fc-ep-op-item.is-assigned .fc-ep-ind-qty,
.fc-ep-assign.is-orange .fc-ep-op-item.is-assigned .fc-ep-ind-qty,
.fc-ep-assign.is-slate .fc-ep-op-item.is-assigned .fc-ep-ind-qty,
.fc-ep-assign.is-green .fc-ep-op-item.is-assigned .fc-ep-ind-qty {
  color: var(--ep-tone-ink);
  border-color: var(--ep-tone-border);
  background: var(--ep-tone-soft);
}
.fc-ep-assign.is-rose .fc-ep-chip-list li,
.fc-ep-assign.is-violet .fc-ep-chip-list li,
.fc-ep-assign.is-indigo .fc-ep-chip-list li,
.fc-ep-assign.is-teal .fc-ep-chip-list li,
.fc-ep-assign.is-sky .fc-ep-chip-list li,
.fc-ep-assign.is-amber .fc-ep-chip-list li,
.fc-ep-assign.is-orange .fc-ep-chip-list li,
.fc-ep-assign.is-slate .fc-ep-chip-list li,
.fc-ep-assign.is-green .fc-ep-chip-list li {
  background: var(--ep-tone-soft);
  border: 1px solid var(--ep-tone-border);
  color: var(--ep-tone-ink);
}
.fc-ep-assign.is-rose .fc-ep-chip-list em,
.fc-ep-assign.is-violet .fc-ep-chip-list em,
.fc-ep-assign.is-indigo .fc-ep-chip-list em,
.fc-ep-assign.is-teal .fc-ep-chip-list em,
.fc-ep-assign.is-sky .fc-ep-chip-list em,
.fc-ep-assign.is-amber .fc-ep-chip-list em,
.fc-ep-assign.is-orange .fc-ep-chip-list em,
.fc-ep-assign.is-slate .fc-ep-chip-list em,
.fc-ep-assign.is-green .fc-ep-chip-list em {
  background: var(--ep-tone-mid);
  color: var(--ep-tone-ink);
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  font-size: 0.7rem;
}
.fc-ep-op-empty,
.fc-ep-empty,
.fc-ep-muted {
  font-size: 0.75rem;
  color: #94A3B8;
  padding: 0.35rem 0.25rem;
}
.fc-ep-op-empty.is-static {
  padding: 0.45rem 0.55rem 0.65rem;
}
.fc-ep-float .btn-primary {
  background: #0D9488;
  border-color: #0D9488;
  color: #fff;
}
.fc-ep-float .btn-primary:hover {
  background: #0F766E;
  border-color: #0F766E;
  color: #fff;
}
.fc-ep-float .btn-danger {
  background: #DC2626;
  border-color: #DC2626;
  color: #fff;
}
.fc-ep-float .btn-danger:hover {
  background: #B91C1C;
  border-color: #B91C1C;
  color: #fff;
}
.fc-ep-chip-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.fc-ep-chip-list li {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: #F1F5F9;
  font-size: 0.75rem;
  font-weight: 600;
}
.fc-ep-chip-list em {
  font-style: normal;
  color: #64748B;
  font-weight: 700;
}
.fc-ep-failed {
  margin-top: 0;
  margin-bottom: 0.15rem;
  padding: 0.35rem 0.55rem;
  border-radius: 0.55rem;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  max-width: 100%;
}
.fc-ep-failed label {
  display: inline;
  font-size: 0.72rem;
  font-weight: 700;
  color: #B91C1C;
  margin: 0;
  white-space: nowrap;
}
.fc-ep-failed .form-control {
  max-width: 5.5rem;
  padding: 0.2rem 0.4rem;
  font-size: 0.8rem;
  height: auto;
  min-height: 1.85rem;
  border-color: #FECACA;
  color: #991B1B;
  font-weight: 700;
}
.fc-ep-failed .form-control:focus {
  border-color: #DC2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.18);
}
.fc-ep-failed .fc-ep-muted {
  display: none;
}
.fc-ep-store-send {
  margin: 0.15rem 0 0.35rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid #BBF7D0;
  border-radius: 12px;
  background: linear-gradient(180deg, #F0FDF4 0%, #FFFFFF 100%);
  max-width: 100%;
}
.fc-ep-store-send-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.fc-ep-store-send-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #166534;
}
.fc-ep-store-send-qty {
  font-size: 1.35rem;
  font-weight: 800;
  color: #14532D;
  letter-spacing: 0.01em;
}
.fc-ep-store-confirm {
  margin-top: 0.7rem;
  display: grid;
  gap: 0.35rem;
  max-width: 16rem;
}
.fc-ep-store-confirm label {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: #166534;
}
.fc-ep-store-confirm .form-control {
  font-weight: 700;
  min-height: 2.35rem;
  border-color: #86EFAC;
}
.fc-ep-store-confirm .form-control:focus {
  border-color: #22C55E;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}
.fc-ep-store-confirm .form-control.is-valid {
  border-color: #16A34A;
}
.fc-ep-store-confirm .form-control.is-invalid {
  border-color: #DC2626;
}
.fc-ep-store-confirm-hint,
.fc-ep-store-send-note {
  margin: 0;
  font-size: 0.75rem;
  color: #4D7C0F;
  line-height: 1.35;
}
.fc-ep-store-send-note {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: var(--fc-muted);
}
.fc-ep-store-send-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  margin: 0.25rem 0 0.5rem;
}
.fc-ep-store-partial {
  margin: 0.65rem 0 0.4rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid #fde68a;
  border-radius: 10px;
  background: #fffbeb;
}
.fc-ep-store-partial-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.fc-ep-store-partial-copy {
  flex: 1 1 12rem;
  min-width: 0;
}
.fc-ep-store-partial-title {
  display: block;
  font-weight: 650;
  font-size: 0.9rem;
  color: #92400e;
  line-height: 1.25;
}
.fc-ep-store-partial-hint {
  margin: 0.3rem 0 0;
  line-height: 1.35;
}
.fc-ep-onoff {
  position: relative;
  flex: 0 0 auto;
  margin-left: auto;
}
.fc-ep-onoff-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}
.fc-ep-onoff-btn {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  min-width: 6.5rem;
  height: 2.1rem;
  margin: 0;
  padding: 0.15rem;
  border: 1px solid #d6d3d1;
  border-radius: 999px;
  background: #f5f5f4;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.fc-ep-onoff-opt {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #78716c;
  transition: color 0.15s ease;
}
.fc-ep-onoff-knob {
  position: absolute;
  top: 0.15rem;
  left: 0.15rem;
  width: calc(50% - 0.15rem);
  height: calc(100% - 0.3rem);
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e7e5e4;
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.12);
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
  z-index: 0;
}
.fc-ep-onoff-input:checked + .fc-ep-onoff-btn {
  border-color: rgba(0, 175, 198, 0.55);
  background: #e8f8fb;
}
.fc-ep-onoff-input:checked + .fc-ep-onoff-btn .fc-ep-onoff-knob {
  transform: translateX(100%);
  background: var(--fc-primary, #00afc6);
  border-color: transparent;
  box-shadow: 0 1px 3px rgba(0, 122, 138, 0.28);
}
.fc-ep-onoff-input:not(:checked) + .fc-ep-onoff-btn .is-off,
.fc-ep-onoff-input:checked + .fc-ep-onoff-btn .is-on {
  color: #1c1917;
}
.fc-ep-onoff-input:checked + .fc-ep-onoff-btn .is-on {
  color: #fff;
}
.fc-ep-onoff-input:focus-visible + .fc-ep-onoff-btn {
  outline: 2px solid rgba(0, 175, 198, 0.45);
  outline-offset: 2px;
}
.fc-ep-store-partial-qty {
  margin: 0.5rem 0;
}
.fc-ep-store-partial-qty label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.fc-ep-store-partial-qty-hint {
  margin-top: 0.35rem;
}
.fc-ep-store-confirm-error {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: #B91C1C;
  line-height: 1.35;
}
.fc-ep-enter-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-top: 0.35rem;
}
@media (min-width: 768px) {
  .fc-ep-enter-fields {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .fc-ep-enter-notes {
    grid-column: 1 / -1;
  }
}
.fc-ep-meta-target {
  font-weight: 750;
  color: #0F766E;
}
.fc-ep-enter-target-badge {
  display: inline-flex;
  flex-direction: row;
  align-items: baseline;
  gap: 0.35rem;
  margin-left: auto;
  padding: 0.28rem 0.55rem;
  border-radius: 0.55rem;
  background: #F0FDFA;
  border: 1px solid #99F6E4;
  flex-shrink: 0;
  line-height: 1.15;
  white-space: nowrap;
}
.fc-ep-enter-target-badge .label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #0F766E;
}
.fc-ep-enter-target-badge strong {
  font-size: 0.95rem;
  font-weight: 800;
  color: #134E4A;
  letter-spacing: -0.02em;
}
.fc-ep-enter-qty.is-good .form-control {
  border-color: #BBF7D0;
  font-weight: 700;
}
.fc-ep-enter-qty.is-fail .form-control {
  border-color: #FECACA;
  color: #991B1B;
  font-weight: 700;
}
.fc-ep-enter-readonly {
  margin-top: 0.5rem;
  display: grid;
  gap: 0.55rem;
}
.fc-ep-enter-read-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.9rem;
}
.fc-ep-enter-read-row span { color: var(--fc-muted); font-weight: 600; }
.fc-ep-enter-read-notes {
  font-size: 0.85rem;
  color: var(--fc-text-secondary);
  white-space: pre-wrap;
}
.fc-ep-enter-thumb {
  width: auto;
  max-width: min(100%, 220px);
  max-height: 160px;
  height: auto;
  object-fit: contain;
  object-position: center;
  border-radius: 0.65rem;
  background: #F1F5F9;
}
.fc-ep-float {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  z-index: 1040;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: min(72rem, calc(100vw - 2.5rem));
  max-width: calc(100% - 2rem);
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.fc-ep-float-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  width: 100%;
}
@media (max-width: 991.98px) {
  .fc-ep-float {
    bottom: calc(0.65rem + var(--fc-bottom-nav-h, 3.35rem) + env(safe-area-inset-bottom, 0px));
  }
}
.fc-ep-float .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 700;
  font-size: 0.8rem;
  border-radius: 0.55rem;
  padding: 0.38rem 0.7rem;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}
.fc-ep-float .btn.btn-sm {
  font-size: 0.78rem;
  padding: 0.35rem 0.65rem;
  line-height: 1.25;
}
.fc-ep-float-hint {
  font-size: 0.72rem;
  color: #64748B;
  margin: 0;
  max-width: 28rem;
  line-height: 1.3;
  text-align: center;
  font-weight: 600;
}
.fc-ep-undo-form {
  display: inline-flex;
  margin: 0;
}
.fc-ep-undo-locked {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  max-width: 12rem;
}
.fc-ep-float .btn:disabled,
.fc-process-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.15);
}
.fc-ep-undo-lock-hint {
  font-size: 0.62rem;
  line-height: 1.25;
  color: #94A3B8;
  text-align: center;
  font-weight: 600;
}

@media (max-width: 767.98px) {
  .fc-ep-page {
    max-width: 100%;
    width: 100%;
  }
  .fc-ep-shell {
    gap: 0.55rem;
  }
  .fc-ep-title { font-size: 0.9rem; }
  .fc-ep-meta-line { font-size: 0.68rem; }
  .fc-ep-track-banner {
    gap: 0.45rem;
  }
  .fc-ep-tracker-wrap {
    padding: 0.55rem 0.55rem 0.6rem;
    border-radius: 0.85rem;
  }
  .fc-ep-tracker-item {
    flex: 1 1 0;
    min-width: 2.45rem;
  }
  .fc-ep-tracker-item.is-active {
    flex: 1 1 0;
    min-width: 2.45rem;
  }
  .fc-ep-tracker {
    min-width: max(100%, calc(var(--ep-steps, 7) * 2.7rem));
    padding-top: 0.4rem;
  }
  .fc-ep-tracker-progress {
    top: 0.85rem;
  }
  .fc-ep-tracker-name {
    font-size: 0.52rem;
  }
  .fc-ep-tracker-item.is-active .fc-ep-tracker-name {
    font-size: 0.58rem;
  }
  .fc-ep-tracker-dot {
    width: 1.15rem;
    height: 1.15rem;
    font-size: 0.52rem;
  }
  .fc-ep-tracker-item.is-active:not(.is-done) .fc-ep-tracker-dot {
    width: 1.4rem;
    height: 1.4rem;
    font-size: 0.64rem;
  }
  .fc-ep-tracker-item.is-active.is-done .fc-ep-tracker-dot {
    width: 1.25rem;
    height: 1.25rem;
  }
  .fc-ep-card {
    border-radius: 0.85rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .fc-ep-tab-panel.is-active {
    padding: 0.75rem 0.7rem 0.85rem;
  }
  .fc-ep-op-box,
  .fc-ep-assign,
  .fc-ep-step-form {
    max-width: 100%;
  }
  .fc-ep-float {
    width: calc(100vw - 1.25rem);
  }
  .fc-ep-float .btn span { display: inline; }
  .fc-ep-float .btn { padding: 0.35rem 0.6rem; font-size: 0.76rem; }
  .fc-ep-float-hint {
    display: block;
    font-size: 0.68rem;
    max-width: 100%;
    padding: 0 0.35rem;
  }
  .fc-ep-op-list { max-height: 9.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .fc-ep-tracker-item.is-active .fc-ep-tracker-dot {
    animation: none;
  }
}

.fc-process-check-list {
  max-height: 16rem;
  overflow: auto;
  border: 1px solid var(--fc-border, #E2E8F0);
  border-radius: 0.5rem;
  padding: 0.65rem 0.75rem;
}
.fc-process-assign-list .fc-process-assign-item,
.fc-entry-process-op-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.45rem 0;
  border-bottom: 1px solid #F1F5F9;
}
.fc-process-assign-list .fc-process-assign-item:last-child,
.fc-entry-process-op-row:last-child {
  border-bottom: 0;
}
.fc-entry-process-ind-qty {
  width: 5.5rem;
  max-width: 100%;
}

.fc-process-btn {
  border: 1px solid transparent;
  font-weight: 700;
}
.fc-process-btn.is-violet {
  background: #9333EA;
  border-color: #9333EA;
  color: #fff;
}
.fc-process-btn.is-indigo {
  background: #4F46E5;
  border-color: #4F46E5;
  color: #fff;
}
.fc-process-btn.is-teal {
  background: #0D9488;
  border-color: #0D9488;
  color: #fff;
}
.fc-process-btn.is-sky {
  background: #0284C7;
  border-color: #0284C7;
  color: #fff;
}
.fc-process-btn.is-amber {
  background: #D97706;
  border-color: #D97706;
  color: #fff;
}
.fc-process-btn.is-orange {
  background: #EA580C;
  border-color: #EA580C;
  color: #fff;
}
.fc-process-btn.is-slate {
  background: #475569;
  border-color: #475569;
  color: #fff;
}
.fc-process-btn.is-green {
  background: #15803D;
  border-color: #166534;
  color: #fff;
  font-weight: 800;
}
.fc-process-btn.is-rose {
  background: #E11D48;
  border-color: #E11D48;
  color: #fff;
}
.fc-process-btn:hover {
  filter: brightness(1.05);
  color: #fff;
}
.fc-entry-process-form {
  margin: 0;
}
.fc-process-failed-field {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0;
  font-size: 0.7rem;
  font-weight: 650;
  color: var(--fc-text-secondary);
}
.fc-process-failed-label {
  white-space: nowrap;
}
.fc-process-failed-input {
  width: 4.25rem;
  min-width: 4.25rem;
  padding: 0.2rem 0.35rem;
  font-weight: 700;
}

/* Unfolded entry rows — status / process color on border only (no body fill) */
.table-fc tbody tr.fc-entry-row.is-approved,
.table-fc tbody tr.fc-entry-row.is-approved:hover,
.fc-row-link.fc-entry-row.is-approved:hover,
.fc-row-link.fc-entry-row.is-approved:focus-visible {
  background: transparent !important;
  box-shadow: inset 3px 0 0 #00AFC6;
}
.table-fc tbody tr.fc-entry-row.is-pending,
.table-fc tbody tr.fc-entry-row.is-pending:hover,
.fc-row-link.fc-entry-row.is-pending:hover,
.fc-row-link.fc-entry-row.is-pending:focus-visible {
  background: transparent !important;
  box-shadow: inset 3px 0 0 #D97706;
}
.table-fc tbody tr.fc-entry-row.is-approved > td,
.table-fc tbody tr.fc-entry-row.is-approved:hover > td,
.fc-row-link.fc-entry-row.is-approved:hover > td,
.fc-row-link.fc-entry-row.is-approved:focus-visible > td,
.table-fc tbody tr.fc-entry-row.is-pending > td,
.table-fc tbody tr.fc-entry-row.is-pending:hover > td,
.fc-row-link.fc-entry-row.is-pending:hover > td,
.fc-row-link.fc-entry-row.is-pending:focus-visible > td {
  background: transparent !important;
}

.table-fc tbody tr.fc-entry-row.is-process-rose,
.table-fc tbody tr.fc-entry-row.is-process-rose:hover,
.fc-row-link.fc-entry-row.is-process-rose:hover,
.fc-row-link.fc-entry-row.is-process-rose:focus-visible {
  background: transparent !important;
  box-shadow: inset 3px 0 0 #E11D48;
}
.table-fc tbody tr.fc-entry-row.is-process-teal,
.table-fc tbody tr.fc-entry-row.is-process-teal:hover,
.fc-row-link.fc-entry-row.is-process-teal:hover,
.fc-row-link.fc-entry-row.is-process-teal:focus-visible {
  background: transparent !important;
  box-shadow: inset 3px 0 0 #0D9488;
}
.table-fc tbody tr.fc-entry-row.is-process-sky,
.table-fc tbody tr.fc-entry-row.is-process-sky:hover,
.fc-row-link.fc-entry-row.is-process-sky:hover,
.fc-row-link.fc-entry-row.is-process-sky:focus-visible {
  background: transparent !important;
  box-shadow: inset 3px 0 0 #0284C7;
}
.table-fc tbody tr.fc-entry-row.is-process-amber,
.table-fc tbody tr.fc-entry-row.is-process-amber:hover,
.fc-row-link.fc-entry-row.is-process-amber:hover,
.fc-row-link.fc-entry-row.is-process-amber:focus-visible {
  background: transparent !important;
  box-shadow: inset 3px 0 0 #D97706;
}
.table-fc tbody tr.fc-entry-row.is-process-orange,
.table-fc tbody tr.fc-entry-row.is-process-orange:hover,
.fc-row-link.fc-entry-row.is-process-orange:hover,
.fc-row-link.fc-entry-row.is-process-orange:focus-visible {
  background: transparent !important;
  box-shadow: inset 3px 0 0 #EA580C;
}
.table-fc tbody tr.fc-entry-row.is-process-slate,
.table-fc tbody tr.fc-entry-row.is-process-slate:hover,
.fc-row-link.fc-entry-row.is-process-slate:hover,
.fc-row-link.fc-entry-row.is-process-slate:focus-visible {
  background: transparent !important;
  box-shadow: inset 3px 0 0 #64748B;
}
.table-fc tbody tr.fc-entry-row.is-process-green,
.table-fc tbody tr.fc-entry-row.is-process-green:hover,
.fc-row-link.fc-entry-row.is-process-green:hover,
.fc-row-link.fc-entry-row.is-process-green:focus-visible {
  background: transparent !important;
  box-shadow: inset 3px 0 0 #16A34A;
}
.table-fc tbody tr.fc-entry-row[class*="is-process-"] > td,
.table-fc tbody tr.fc-entry-row[class*="is-process-"]:hover > td,
.fc-row-link.fc-entry-row[class*="is-process-"]:hover > td,
.fc-row-link.fc-entry-row[class*="is-process-"]:focus-visible > td {
  background: transparent !important;
}

/* Entries page: no hover body tint */
.table-fc tbody tr.fc-entry-row:hover,
.fc-row-link.fc-entry-row:hover,
.fc-row-link.fc-entry-row:focus-visible {
  background-color: transparent;
}
.table-fc tbody tr.fc-entry-row:hover > td,
.fc-row-link.fc-entry-row:hover > td,
.fc-row-link.fc-entry-row:focus-visible > td {
  background-color: transparent;
}

.fc-entry-group-progress {
  min-width: 8rem;
  max-width: 12rem;
  flex: 0 1 10rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  align-items: stretch;
}
.fc-entry-group-target-hint {
  font-size: 0.68rem;
  font-weight: 650;
  color: var(--fc-text-secondary);
  white-space: nowrap;
  line-height: 1.25;
}
.fc-entry-group-body {
  padding: 0;
}
.fc-entry-group-body .table-responsive {
  border-radius: 0;
  border: none;
  box-shadow: none;
}
.fc-entry-mobile-folds {
  display: none;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.55rem 0.55rem 0.7rem;
  max-width: 100%;
}
.fc-entry-item-fold {
  margin: 0;
  border: 1px solid var(--fc-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--fc-shadow);
  overflow: hidden;
  max-width: 100%;
}
.fc-entry-item-fold.is-pending { border-color: #f59e0b; }
.fc-entry-item-fold.is-approved { border-color: #10b981; }
.fc-entry-item-fold.is-awaiting { border-color: #94a3b8; }
.fc-entry-item-fold.is-cancelled { border-color: #cbd5e1; opacity: 0.92; }
.fc-entry-item-summary {
  list-style: none;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "fold main"
    "actions actions";
  gap: 0.35rem 0.45rem;
  align-items: start;
  padding: 0.55rem 0.6rem;
  cursor: pointer;
}
@media (min-width: 400px) {
  .fc-entry-item-summary {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "fold main actions";
    align-items: center;
  }
  .fc-entry-item-actions {
    justify-content: flex-end;
    max-width: 9.5rem;
  }
}
.fc-entry-item-summary::-webkit-details-marker { display: none; }
.fc-entry-item-fold-icon {
  grid-area: fold;
  width: 1.35rem;
  height: 1.35rem;
  margin-top: 0.1rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #f1f5f9;
  color: var(--fc-muted);
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.fc-entry-item-fold[open] .fc-entry-item-fold-icon {
  transform: rotate(90deg);
}
.fc-entry-item-summary-main {
  grid-area: main;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.fc-entry-item-summary-text {
  min-width: 0;
  flex: 1;
}
.fc-entry-item-cover {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--fc-text, #0f172a);
  word-break: break-word;
}
.fc-entry-item-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.4rem;
  margin-top: 0.2rem;
}
.fc-entry-item-actions {
  grid-area: actions;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  max-width: 100%;
}
.fc-entry-item-actions .btn {
  font-size: 0.72rem;
  padding: 0.28rem 0.55rem;
  line-height: 1.2;
  border-radius: 0.45rem;
}
.fc-entry-item-actions form {
  margin: 0;
}
.fc-entry-item-body {
  padding: 0 0.6rem 0.65rem;
  border-top: 1px solid var(--fc-border);
}
.fc-entry-item-meta {
  display: grid;
  gap: 0.4rem;
  padding-top: 0.55rem;
}
.fc-entry-item-meta > div {
  display: grid;
  grid-template-columns: minmax(4.5rem, 34%) minmax(0, 1fr);
  gap: 0.35rem 0.5rem;
  align-items: start;
}
.fc-entry-item-meta .label {
  font-size: 0.65rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fc-muted);
  padding-top: 0.1rem;
}
.fc-entry-item-meta .value {
  font-size: 0.82rem;
  line-height: 1.3;
  min-width: 0;
  word-break: break-word;
}
.fc-entry-item-open-link {
  margin-top: 0.55rem;
}
.fc-entry-item-open-link .btn {
  font-size: 0.75rem;
  padding: 0.35rem 0.6rem;
}

@media (min-width: 768px) {
  .fc-entry-mobile-folds {
    display: none !important;
  }
}
@media (max-width: 767.98px) {
  .fc-entry-mobile-folds {
    display: flex;
  }
  .fc-entry-desktop-table {
    display: none !important;
  }
}

.fc-entry-machine-targets {
  border-bottom: 1px solid var(--fc-border);
  background: linear-gradient(180deg, #F7FBFC 0%, #fff 100%);
}
.fc-entry-machine-targets-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  padding: 0.65rem 0.85rem 0.2rem;
  font-size: 0.8rem;
}
.fc-entry-machine-targets-head i {
  color: var(--fc-accent);
}
.fc-entry-machine-targets .table-responsive {
  padding-top: 0.35rem;
}
.fc-entry-group-empty {
  padding: 0.85rem 1rem 1rem;
  font-size: 0.85rem;
}
.fc-entries-filters .filters {
  margin-bottom: 0.65rem;
}

/* Foldable filters — closed on mobile, open on desktop */
.fc-filters-fold {
  overflow: hidden;
}
.fc-filters-fold-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.85rem;
  user-select: none;
  background: linear-gradient(180deg, #FAFCFD 0%, #fff 100%);
}
.fc-filters-fold-summary::-webkit-details-marker { display: none; }
.fc-filters-fold-title {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--fc-text);
  flex-shrink: 0;
}
.fc-filters-fold-hint {
  flex: 1;
  min-width: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--fc-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fc-filters-fold-chevron {
  margin-left: auto;
  color: var(--fc-muted);
  font-size: 0.85rem;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.fc-filters-fold[open] .fc-filters-fold-chevron {
  transform: rotate(180deg);
}
.fc-filters-fold[open] .fc-filters-fold-summary {
  border-bottom: 1px solid var(--fc-border);
}
@media (min-width: 768px) {
  /* All filter folds stay foldable on desktop (default closed). */
  .fc-filters-fold > .fc-filters-fold-summary {
    display: flex !important;
  }
  .fc-filters-fold:not([open]) > .panel-body {
    display: none !important;
  }
  .fc-filters-fold[open] > .panel-body {
    display: block !important;
  }
}

.fc-entries-filter-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.85rem;
  align-items: flex-end;
}
.fc-entries-filter-grid .fc-inv-label {
  flex: 1 1 9rem;
  max-width: 16rem;
}
.fc-roles-matrix-bar {
  background: var(--fc-bg, #f8fafc);
  padding: 0.75rem 0;
  margin-bottom: 0.75rem;
  z-index: 5;
}
.fc-role-perm-panel {
  overflow: hidden;
}
.fc-role-perm-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.85rem 1.1rem;
}
.fc-role-perm-summary::-webkit-details-marker { display: none; }
.fc-role-perm-summary-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  min-width: 0;
}
.fc-role-perm-panel .fc-entry-group-fold {
  display: inline-flex;
  transition: transform 0.15s ease;
}
.fc-role-perm-panel[open] .fc-entry-group-fold {
  transform: rotate(90deg);
}
.fc-role-perm-module h6 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--fc-muted, #64748b);
}
.fc-role-perm-module .fc-perm-check {
  align-items: flex-start;
  gap: 0.45rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--fc-border, #e2e8f0);
  border-radius: 0.5rem;
  background: #fff;
  height: 100%;
}
.fc-role-perm-module .fc-perm-check .form-check-input {
  margin-top: 0.2rem;
}
.fc-role-perm-module .form-check-label {
  cursor: pointer;
}
.stat-hint {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--fc-text-muted);
  margin-top: 0.2rem;
}

.fc-entry-target-panel {
  border: 1px solid var(--fc-border);
  border-radius: 14px;
  background: linear-gradient(180deg, #FAFCFD 0%, #fff 100%);
  padding: 0.85rem 1rem;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}
.fc-entry-target-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem 0.75rem;
  align-items: start;
}
@media (max-width: 575.98px) {
  .fc-entry-target-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.fc-entry-metric {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  padding: 0.35rem 0.45rem;
  border-radius: 10px;
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid rgba(226, 232, 240, 0.9);
}
.fc-entry-metric .label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fc-text-muted);
}
.fc-entry-metric strong {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--fc-text);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.fc-entry-metric strong.is-good { color: var(--fc-primary-deep); }
.fc-entry-metric strong.is-fail { color: #DC2626; }
.fc-entry-target-panel .fc-progress-wrap {
  margin-top: 0.65rem;
}
.fc-entry-target-hint {
  font-size: 0.75rem;
  color: var(--fc-text-muted);
  line-height: 1.35;
}
.fc-ep-enter-form + .fc-ep-float,
.fc-entry-target-panel + .fc-ep-enter-form {
  margin-top: 0.15rem;
}
.fc-ep-tab-panel .fc-entry-target-panel {
  margin-top: 0.5rem;
}

/* Good / Failed quantity fields on entry form */
.fc-entry-qty-field {
  height: 100%;
  padding: 0.65rem 0.75rem 0.7rem;
  border-radius: 10px;
  border: 1px solid transparent;
}
.fc-entry-qty-field .form-label {
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.fc-entry-qty-field .form-text {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  line-height: 1.35;
  font-weight: 600;
}
.fc-entry-qty-field.is-good {
  background: #ECFDF5;
  border-color: #A7F3D0;
}
.fc-entry-qty-field.is-good .form-label {
  color: #047857;
}
.fc-entry-qty-field.is-good .form-control {
  border-color: #6EE7B7;
  background: #fff;
  color: #065F46;
  font-weight: 700;
}
.fc-entry-qty-field.is-good .form-control:focus {
  border-color: #10B981;
  box-shadow: 0 0 0 0.2rem rgba(16, 185, 129, 0.2);
}
.fc-entry-qty-field.is-good .form-text {
  color: #059669;
}
.fc-entry-qty-field.is-fail {
  background: #FEF2F2;
  border-color: #FECACA;
}
.fc-entry-qty-field.is-fail .form-label {
  color: #B91C1C;
}
.fc-entry-qty-field.is-fail .form-control {
  border-color: #FCA5A5;
  background: #FFF7F7;
  color: #991B1B;
  font-weight: 700;
}
.fc-entry-qty-field.is-fail .form-control[readonly] {
  opacity: 1;
  cursor: default;
}
.fc-entry-qty-field.is-fail.is-manual {
  background: #FFF7ED;
  border-color: #FDBA74;
}
.fc-entry-qty-field.is-fail.is-manual .form-label {
  color: #C2410C;
}
.fc-entry-qty-field.is-fail.is-manual .form-control {
  border-color: #FB923C;
  background: #fff;
  color: #9A3412;
}
.fc-entry-qty-field.is-fail.is-manual .form-control:focus {
  border-color: #EA580C;
  box-shadow: 0 0 0 0.2rem rgba(234, 88, 12, 0.2);
}
.fc-entry-qty-field.is-fail.is-manual .form-text {
  color: #EA580C;
}
.fc-entry-qty-field.is-fail .form-text {
  color: #DC2626;
}

/* Qty + boxes: color-coded pcs / full boxes / loose */
.fc-qty-boxes {
  display: inline-block;
  line-height: 1.25;
}
.fc-qty-boxes__pcs {
  font-weight: 700;
  color: #047857;
}
.fc-qty-boxes__detail {
  margin-top: 0.15rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
}
.fc-qty-boxes__boxes {
  color: var(--fc-primary-deep);
}
.fc-qty-boxes__loose {
  color: #C2410C;
}
.fc-qty-boxes__sep {
  color: #94A3B8;
  font-weight: 500;
}
.fc-stock-boxes-cell .fc-qty-boxes__boxes {
  font-size: 1rem;
  font-weight: 700;
}
.fc-cover-pending-panel > .panel-header {
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.fc-cover-select-all {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fc-text, #0F172A);
  cursor: pointer;
  user-select: none;
}
.fc-cover-select-all .form-check-input {
  margin-top: 0;
  cursor: pointer;
}
.fc-cover-bulk-accept {
  max-width: 100%;
}
.fc-cover-bulk-accept .fc-cover-select-all {
  flex: 1 1 auto;
}
.fc-cover-deliveries {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-width: 100%;
}
.fc-cover-delivery {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 0.55rem 0.65rem;
  align-items: start;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--fc-border, #E2E8F0);
  border-radius: 0.85rem;
  background: #fff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
  max-width: 100%;
  overflow: hidden;
}
.fc-cover-delivery.is-joint {
  border-color: #FBBF24;
}
.fc-cover-delivery-lines {
  list-style: none;
  margin: 0.1rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  max-width: 100%;
}
.fc-cover-delivery-lines li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  font-size: 0.78rem;
  line-height: 1.25;
  padding: 0.18rem 0.4rem;
  border-radius: 0.4rem;
  background: rgba(15, 23, 42, 0.03);
}
.fc-cover-line-color {
  font-weight: 650;
  color: var(--fc-text, #0f172a);
  min-width: 0;
}
.fc-cover-line-qty {
  font-weight: 700;
  color: var(--fc-accent, #0E7490);
  white-space: nowrap;
}
.fc-cover-delivery-qty-joint {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #A16207;
}
.fc-cover-delivery-check {
  display: flex;
  align-items: center;
  padding-top: 0.35rem;
  margin: 0;
  cursor: pointer;
}
.fc-cover-delivery-thumb {
  width: auto !important;
  height: auto !important;
  max-width: 44px;
  max-height: 44px;
  object-fit: contain;
  object-position: center;
  border-radius: 0.55rem;
  background: #F1F5F9;
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.fc-cover-delivery-body {
  grid-column: 3;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}
.fc-cover-delivery:not(:has(.fc-cover-delivery-check)):not(:has(.fc-cover-delivery-thumb)) .fc-cover-delivery-body,
.fc-cover-delivery:has(.fc-cover-delivery-check):not(:has(.fc-cover-delivery-thumb)) .fc-cover-delivery-body {
  grid-column: 2 / -1;
}
.fc-cover-delivery:not(:has(.fc-cover-delivery-check)):has(.fc-cover-delivery-thumb) {
  grid-template-columns: auto 1fr;
}
.fc-cover-delivery:not(:has(.fc-cover-delivery-check)):has(.fc-cover-delivery-thumb) .fc-cover-delivery-body {
  grid-column: 2;
}
.fc-cover-delivery-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 0.5rem;
  min-width: 0;
}
.fc-cover-delivery-title {
  font-size: 0.95rem;
  font-weight: 750;
  line-height: 1.2;
  color: var(--fc-text, #0f172a);
  word-break: break-word;
}
.fc-cover-delivery-color {
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--fc-muted, #64748B);
}
.fc-cover-delivery-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  min-width: 0;
}
.fc-cover-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  max-width: 100%;
  padding: 0.12rem 0.42rem;
  border-radius: 999px;
  background: #F1F5F9;
  color: #334155;
  font-size: 0.68rem;
  font-weight: 650;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fc-cover-chip.is-shop {
  background: #FEF9C3;
  color: #A16207;
  border: 1px solid #FDE68A;
}
.fc-cover-delivery-shop-sub {
  font-size: 0.7rem;
  font-weight: 550;
  color: var(--fc-muted, #64748B);
  line-height: 1.3;
  word-break: break-word;
}
.fc-cover-delivery-fails {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}
.fc-cover-fail-label {
  font-size: 0.65rem;
  font-weight: 750;
  color: #B91C1C;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.fc-cover-fail-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.08rem 0.38rem;
  border-radius: 0.4rem;
  background: #FEF2F2;
  color: #B91C1C;
  border: 1px solid #FECACA;
  font-size: 0.66rem;
  font-weight: 650;
  line-height: 1.25;
}
.fc-cover-delivery-qty {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.55rem;
  margin-top: 0.1rem;
}
.fc-cover-delivery-qty-main {
  font-size: 0.84rem;
  font-weight: 750;
  color: var(--fc-text, #0f172a);
}
.fc-cover-delivery-qty-boxes {
  font-size: 0.72rem;
}
.fc-cover-delivery-actions {
  grid-column: 1 / -1;
  padding-top: 0.15rem;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
}
.fc-cover-accept-qty {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}
.fc-cover-accept-qty label {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  margin: 0;
  font-size: 0.68rem;
  font-weight: 650;
  color: var(--fc-muted, #64748B);
}
.fc-cover-accept-qty .form-control {
  font-size: 0.82rem;
}
@media (min-width: 768px) {
  .fc-cover-delivery {
    grid-template-columns: auto auto minmax(0, 1fr) minmax(9.5rem, 11.5rem);
    align-items: center;
  }
  .fc-cover-delivery-body {
    grid-column: auto;
  }
  .fc-cover-delivery-actions {
    grid-column: auto;
    border-top: 0;
    padding-top: 0;
  }
  .fc-cover-delivery:not(:has(.fc-cover-delivery-check)):has(.fc-cover-delivery-thumb) {
    grid-template-columns: auto minmax(0, 1fr) minmax(9.5rem, 11.5rem);
  }
  .fc-cover-delivery:has(.fc-cover-delivery-check):not(:has(.fc-cover-delivery-thumb)) {
    grid-template-columns: auto minmax(0, 1fr) minmax(9.5rem, 11.5rem);
  }
  .fc-cover-delivery:has(.fc-cover-delivery-check):not(:has(.fc-cover-delivery-thumb)) .fc-cover-delivery-body {
    grid-column: auto;
  }
}
.fc-cover-color-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  font-weight: 600;
}
.fc-cover-color-swatch {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 4px;
  border: 1px solid rgba(15, 23, 42, 0.18);
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}
.fc-stock-color-under {
  margin-top: 0.15rem;
  font-size: 0.78rem;
}
.fc-cover-delivery.is-incomplete {
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.04);
}
.fc-stock-color-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: center;
}
.fc-stock-color-count {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  max-width: 100%;
}
.fc-stock-color-count__label {
  min-width: 0;
  word-break: break-word;
}
.fc-stock-color-detail-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.fc-stock-color-detail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  padding: 0.45rem 0.6rem;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
}
.fc-stock-color-detail__main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  min-width: 0;
}
@media (max-width: 767.98px) {
  .table-responsive .table-fc tr.fc-stock-row td.fc-stock-color-col,
  .table-responsive-cards .table-fc tr.fc-stock-row td.fc-stock-color-col {
    display: none;
  }
  .table-responsive .table-fc tr.fc-stock-row td.fc-stock-product-col > *,
  .table-responsive-cards .table-fc tr.fc-stock-row td.fc-stock-product-col > * {
    max-width: 100%;
    text-align: left;
  }
}
.fc-entry-target-hint {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--fc-text-secondary);
}

/* Entry target custom dropdown */
.fc-entry-target-dd {
  position: relative;
}
.fc-entry-target-dd-native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.fc-entry-target-dd-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.75rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--fc-border-strong);
  border-radius: 10px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.fc-entry-target-dd-toggle:hover {
  border-color: var(--fc-primary);
}
.fc-entry-target-dd.is-open .fc-entry-target-dd-toggle {
  border-color: var(--fc-primary);
  box-shadow: 0 0 0 3px rgba(0, 175, 198, 0.15);
}
.fc-entry-target-dd-placeholder {
  flex: 1;
  color: var(--fc-muted);
  font-weight: 600;
  font-size: 0.9rem;
}
.fc-entry-target-dd-value {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}
.fc-entry-target-dd-chevron {
  color: var(--fc-muted);
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.fc-entry-target-dd.is-open .fc-entry-target-dd-chevron {
  transform: rotate(180deg);
}
.fc-entry-target-dd-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  max-height: min(22rem, 70vh);
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--fc-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
}
.fc-entry-target-dd-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--fc-border);
  background: #f8fafc;
}
.fc-entry-target-dd-search > .bi {
  color: var(--fc-muted);
  flex-shrink: 0;
  font-size: 0.95rem;
}
.fc-entry-target-dd-search .form-control {
  border: 0;
  box-shadow: none;
  background: transparent;
  padding: 0;
  min-width: 0;
  font-size: 0.875rem;
  font-weight: 600;
}
.fc-entry-target-dd-search .form-control:focus {
  box-shadow: none;
}
.fc-entry-target-dd-list {
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.35rem;
  max-height: none;
  flex: 1 1 auto;
  min-height: 0;
}
.fc-entry-target-dd-empty {
  padding: 0.85rem 0.75rem;
  font-size: 0.85rem;
  text-align: center;
}
.fc-entry-target-dd-option[hidden] {
  display: none !important;
}
.fc-entry-target-dd-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.55rem 0.65rem;
  border: 0;
  border-radius: 9px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.fc-entry-target-dd-option:hover,
.fc-entry-target-dd-option.is-selected {
  background: var(--fc-primary-50);
}
.fc-etd-main {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}
.fc-etd-machine {
  font-size: 0.88rem;
  font-weight: 750;
  color: var(--fc-text);
  line-height: 1.2;
}
.fc-etd-cover {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--fc-muted);
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.fc-etd-shop {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin-top: 0.1rem;
  min-width: 0;
}
.fc-etd-shop-badge {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  line-height: 1.2;
  white-space: nowrap;
  background: #DBEAFE;
  color: #1E40AF;
}
.fc-etd-shop-detail {
  font-size: 0.72rem;
  font-weight: 600;
  color: #1E40AF;
  line-height: 1.25;
  overflow-wrap: anywhere;
  min-width: 0;
}
.fc-entry-target-dd-option.is-from-shop {
  border-left: 3px solid #3B82F6;
}
.fc-etd-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
  flex-shrink: 0;
}
.fc-etd-qty {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--fc-accent);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.fc-etd-status {
  font-size: 0.65rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  line-height: 1.2;
  white-space: nowrap;
}
.fc-etd-status.is-done {
  background: #DCFCE7;
  color: #166534;
}
.fc-etd-status.is-progress {
  background: #E0F2FE;
  color: #075985;
}
.fc-etd-status.is-cancelled {
  background: #F3F4F6;
  color: #4B5563;
}
.fc-entry-target-dd-option.is-cancelled {
  opacity: 0.72;
}
.fc-entry-target-dd-option.is-done .fc-etd-machine {
  color: #166534;
}
@media (max-width: 575.98px) {
  .fc-entry-target-dd-option,
  .fc-entry-target-dd-value {
    align-items: flex-start;
  }
}

/* Universal table tools + sortable headers */
.fc-table-tools {
  margin: 0;
  border-bottom: 1px solid var(--fc-border);
}
.panel-header > .fc-table-tools-inline {
  margin-left: auto;
  border-bottom: 0;
  padding: 0;
  flex: 1 1 auto;
  min-width: 0;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 0.65rem;
}
.panel-header > .fc-table-tools-inline .table-search {
  flex: 0 1 220px;
  min-width: 140px;
  max-width: 240px;
}
.panel-header > .fc-table-tools-inline .table-search input {
  height: 34px;
  font-size: 0.8rem;
}
.panel-header > .fc-table-tools-inline .fc-table-tools-hint {
  white-space: nowrap;
}
.fc-table-tools-hint {
  font-size: 0.72rem;
  font-weight: 600;
}
@media (max-width: 575.98px) {
  .panel-header > .fc-table-tools-inline {
    flex: 1 1 100%;
    margin-left: 0;
    justify-content: stretch;
    flex-wrap: wrap;
  }
  .panel-header > .fc-table-tools-inline .table-search {
    flex: 1 1 100%;
    max-width: none;
  }
}
.fc-sortable-th {
  cursor: pointer;
  user-select: none;
  position: relative;
  padding-right: 1.35rem !important;
}
.fc-sortable-th:hover {
  color: var(--fc-primary-deep);
}
.fc-sortable-th::after {
  content: '⇅';
  position: absolute;
  right: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.65rem;
  opacity: 0.35;
}
.fc-sortable-th.is-sorted-asc::after {
  content: '↑';
  opacity: 1;
  color: var(--fc-primary-deep);
}
.fc-sortable-th.is-sorted-desc::after {
  content: '↓';
  opacity: 1;
  color: var(--fc-primary-deep);
}

@media (max-width: 767.98px) {
  /* Compact folded row — full machine name + full date visible */
  .fc-entry-group:not([open]) .fc-entry-group-summary {
    flex-wrap: wrap;
    align-items: flex-start;
    padding: 0.4rem 0.5rem;
    gap: 0.3rem 0.4rem;
  }
  .fc-entry-group:not([open]) .fc-entry-group-main {
    flex: 1 1 100%;
    max-width: 100%;
    min-width: 0;
    gap: 0.4rem;
  }
  .fc-entry-group:not([open]) .fc-entry-group-fold {
    margin-top: 0.15rem;
  }
  .fc-entry-group:not([open]) .fc-entry-group-heading {
    gap: 0.3rem 0.4rem;
  }
  .fc-entry-group:not([open]) .fc-entry-group-state {
    padding: 0.12rem 0.35rem;
    gap: 0.2rem;
  }
  .fc-entry-group:not([open]) .fc-entry-group-state > .bi {
    font-size: 0.8rem;
  }
  /* Completed: green check only */
  .fc-entry-group:not([open]) .fc-entry-group-state.is-completed {
    background: transparent;
    border-color: transparent;
    padding: 0;
  }
  .fc-entry-group:not([open]) .fc-entry-group-state.is-completed .fc-entry-group-state-label {
    display: none;
  }
  .fc-entry-group:not([open]) .fc-entry-group-state.is-completed > .bi {
    font-size: 1.1rem;
  }
  /* Pending / in progress / store wait: keep short label visible */
  .fc-entry-group:not([open]) .fc-entry-group-state.is-pending .fc-entry-group-state-label,
  .fc-entry-group:not([open]) .fc-entry-group-state.is-in_progress .fc-entry-group-state-label,
  .fc-entry-group:not([open]) .fc-entry-group-state.is-store_wait .fc-entry-group-state-label {
    display: inline;
    font-size: 0.58rem;
  }
  .fc-entry-group:not([open]) .fc-entry-group-title {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 0.1rem;
    min-width: 0;
    flex: 1;
  }
  .fc-entry-group:not([open]) .fc-entry-group-heading strong,
  .fc-entry-group:not([open]) .fc-entry-group-title strong {
    font-size: 0.82rem;
    line-height: 1.25;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    max-width: none;
    word-break: break-word;
  }
  .fc-entry-group:not([open]) .fc-entry-group-date {
    font-size: 0.65rem;
    line-height: 1.2;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: break-word;
  }
  /* Folded mobile: same totals as desktop (good/failed, entries/targets, progress) */
  .fc-entry-group:not([open]) .fc-entry-group-count.fc-entry-stats-folded {
    display: block !important;
    font-size: 0.68rem;
    line-height: 1.25;
    color: var(--fc-text-muted);
    white-space: normal;
  }

  .fc-entry-group:not([open]) .fc-entry-group-stats,
  .fc-entry-group:not([open]) .fc-entry-stats-folded {
    flex: 1 1 100%;
    min-width: 0;
    width: 100%;
    max-width: none;
    justify-content: flex-start;
  }
  .fc-entry-group:not([open]) .fc-entry-stats-folded {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.45rem 0.75rem;
  }
  .fc-entry-group:not([open]) .fc-entry-stats-folded .fc-entry-group-metrics {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.45rem 0.75rem;
    min-width: 0;
    max-width: 100%;
  }
  .fc-entry-group:not([open]) .fc-entry-stats-folded .fc-entry-group-process {
    display: contents;
  }
  .fc-entry-group:not([open]) .fc-entry-stats-folded .fc-entry-group-stat {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    min-width: 3rem;
  }
  .fc-entry-group:not([open]) .fc-entry-stats-folded .fc-entry-group-stat .label {
    display: block !important;
    font-size: 0.52rem;
  }
  .fc-entry-group:not([open]) .fc-entry-stats-folded .fc-entry-group-stat .value {
    font-size: 0.88rem;
    line-height: 1.1;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
  }
  .fc-entry-group:not([open]) .fc-entry-stats-folded .fc-entry-group-stat .value.is-good {
    color: var(--fc-primary-deep, #0f766e);
  }
  .fc-entry-group:not([open]) .fc-entry-stats-folded .fc-entry-group-stat .value.is-fail {
    color: #DC2626;
  }
  .fc-entry-group:not([open]) .fc-entry-stats-folded .fc-entry-group-statuses {
    display: flex !important;
    flex-direction: column;
    gap: 0.05rem;
    min-width: 0;
  }
  .fc-entry-group:not([open]) .fc-entry-stats-folded .fc-entry-group-statuses > .label {
    display: block !important;
  }
  .fc-entry-group:not([open]) .fc-entry-stats-folded .fc-entry-status-chips,
  .fc-entry-group:not([open]) .fc-entry-stats-folded .fc-entry-process-progress {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
  }
  .fc-entry-group:not([open]) .fc-entry-stats-folded .fc-process-chip,
  .fc-entry-group:not([open]) .fc-entry-stats-folded .fc-entry-status-chip {
    font-size: 0.58rem;
    padding: 0.08rem 0.35rem;
    line-height: 1.15;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .fc-entry-group:not([open]) .fc-entry-stats-folded .fc-entry-group-progress {
    flex: 1 1 100%;
    width: 100%;
    max-width: none;
    min-width: 0;
    gap: 0.15rem;
  }
  .fc-entry-group:not([open]) .fc-entry-stats-folded .fc-progress-wrap {
    gap: 0.3rem;
  }
  .fc-entry-group:not([open]) .fc-entry-stats-folded .progress-target {
    height: 0.35rem;
    border-radius: 99px;
  }
  .fc-entry-group:not([open]) .fc-entry-stats-folded .fc-progress-pct {
    font-size: 0.68rem;
    min-width: 2rem;
  }
  .fc-entry-group:not([open]) .fc-entry-stats-folded .fc-entry-group-target-hint {
    display: block !important;
    font-size: 0.62rem;
    line-height: 1.25;
    white-space: normal;
  }

  /* Unfolded: clean two-column header */
  .fc-entry-group[open] .fc-entry-group-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    column-gap: 0.75rem;
    row-gap: 0.45rem;
    padding: 0.65rem 0.7rem;
  }
  .fc-entry-group[open] .fc-entry-group-main {
    grid-column: 1;
    flex: none;
    max-width: none;
    min-width: 0;
    width: 100%;
    align-items: flex-start;
  }
  .fc-entry-group[open] .fc-entry-group-fold {
    margin-top: 0.12rem;
  }
  .fc-entry-group[open] .fc-entry-group-heading {
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem 0.4rem;
  }
  .fc-entry-group[open] .fc-entry-group-heading strong,
  .fc-entry-group[open] .fc-entry-group-title strong {
    font-size: 0.88rem;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: break-word;
  }
  .fc-entry-group[open] .fc-entry-group-date {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
  .fc-entry-group[open] .fc-entry-group-stats.fc-entry-stats-open {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 0.35rem;
    flex: none;
    min-width: 6.5rem;
    max-width: 9.5rem;
    width: auto;
  }
  .fc-entry-group[open] .fc-entry-group-stats.fc-entry-stats-open .fc-entry-group-metrics {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 0.55rem;
    width: 100%;
  }
  .fc-entry-group[open] .fc-entry-group-stats.fc-entry-stats-open .fc-entry-group-stat {
    min-width: 0;
    align-items: flex-end;
    text-align: right;
  }
  .fc-entry-group[open] .fc-entry-group-stats.fc-entry-stats-open .fc-entry-group-statuses {
    display: none;
  }
  .fc-entry-group[open] .fc-entry-group-stats.fc-entry-stats-open .fc-entry-group-stat .value {
    font-size: 1.05rem;
  }
  .fc-entry-group[open] .fc-entry-group-stats.fc-entry-stats-open .fc-entry-group-progress {
    flex: none;
    width: 100%;
    min-width: 0;
    max-width: none;
    align-items: stretch;
  }
  .fc-entry-group[open] .fc-entry-group-stats.fc-entry-stats-open .fc-progress-wrap {
    width: 100%;
  }
  .fc-entry-group[open] .fc-entry-group-stats.fc-entry-stats-open .fc-entry-group-target-hint {
    text-align: right;
    white-space: nowrap;
    font-size: 0.62rem;
  }
  .fc-entry-group-stats {
    flex: 1 1 0;
    min-width: 0;
    justify-content: flex-end;
  }
  .fc-entry-group-progress {
    flex: 1 1 auto;
    max-width: none;
    min-width: 0;
  }
  .fc-entries-filter-grid .fc-inv-label {
    flex: 1 1 calc(50% - 0.4rem);
    max-width: none;
  }
}

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--fc-muted);
}
.empty-state .empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: var(--fc-primary-50);
  color: var(--fc-primary);
  display: grid;
  place-items: center;
  font-size: 1.75rem;
  margin: 0 auto 1rem;
}
.empty-state h6 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
  color: var(--fc-text);
}
.empty-state p { font-size: 0.85rem; margin: 0; }

.chart-wrap { position: relative; height: 280px; }

.page-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.page-toolbar .filters {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.filter-chip {
  padding: 0.4rem 0.85rem;
  border-radius: 99px;
  border: 1.5px solid var(--fc-border);
  background: var(--fc-surface);
  color: var(--fc-text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  transition: all var(--fc-transition);
}
.filter-chip:hover, .filter-chip.active {
  background: var(--fc-primary);
  border-color: var(--fc-primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 175, 198, 0.25);
}

.fc-inv-toolbar {
  align-items: flex-start;
  gap: 0.85rem;
}
.fc-inv-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem 0.85rem;
  flex: 1;
  min-width: 0;
}
.fc-inv-selects {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: flex-end;
}
.fc-inv-label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin: 0;
  min-width: 0;
}
.fc-inv-label > span {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--fc-text-muted);
}
.fc-inv-label .form-select {
  min-width: 9.5rem;
  max-width: 100%;
}
@media (max-width: 575.98px) {
  .fc-inv-controls .table-search {
    max-width: none;
    width: 100%;
    min-width: 0;
  }
  .fc-inv-selects {
    width: 100%;
  }
  .fc-inv-label {
    flex: 1 1 calc(50% - 0.3rem);
  }
  .fc-inv-label .form-select {
    min-width: 0;
    width: 100%;
  }
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--fc-border);
}
.status-row:last-child { border-bottom: none; padding-bottom: 0; }
.status-row:first-child { padding-top: 0; }

.mini-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--fc-border);
}
.mini-list-item:last-child { border-bottom: none; }

code {
  background: var(--fc-primary-50);
  color: var(--fc-primary-deep);
  padding: 0.15em 0.45em;
  border-radius: 6px;
  font-size: 0.82em;
  font-weight: 550;
}

.modal-content {
  border: none;
  border-radius: 20px;
  box-shadow: var(--fc-shadow-lg);
}
.modal-header {
  border-bottom: 1px solid var(--fc-border);
  padding: 1.15rem 1.35rem;
}
.modal-title { font-weight: 700; font-size: 1.05rem; }
.modal-body { padding: 1.35rem; }
.modal-footer { border-top: 1px solid var(--fc-border); padding: 1rem 1.35rem; }

.list-group-item {
  border-color: var(--fc-border);
  padding: 1rem 1.25rem;
}
.list-group-item.bg-light {
  background: var(--fc-primary-50) !important;
  border-left: 3px solid var(--fc-primary);
}

/* Bottom nav — compact, fits any phone width */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100vw;
  height: calc(var(--fc-bottom-nav-h) + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--fc-border);
  z-index: 1080;
  padding: 0.2rem 0.15rem calc(0.2rem + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -4px 18px rgba(15, 23, 42, 0.08);
  align-items: stretch;
  justify-content: space-between;
  gap: 0;
  overflow: visible;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}
.bottom-nav a {
  flex: 1 1 0;
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.08rem;
  padding: 0.2rem 0.1rem;
  color: var(--fc-text-secondary);
  font-size: 0.58rem;
  font-weight: 650;
  line-height: 1.1;
  border-radius: 8px;
  transition: color var(--fc-transition), background var(--fc-transition);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.bottom-nav a i {
  font-size: 1.05rem;
  line-height: 1;
  flex-shrink: 0;
}
.bottom-nav a.active {
  color: var(--fc-primary-deep);
  background: var(--fc-primary-50);
}
.bottom-nav a {
  position: relative;
}
.bottom-nav .nav-count {
  position: absolute;
  top: 0.05rem;
  right: max(0.15rem, calc(50% - 1.35rem));
  margin-left: 0;
  min-width: 1rem;
  height: 1rem;
  padding: 0 0.22rem;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: none;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(11, 18, 32, 0.5);
  backdrop-filter: blur(3px);
  z-index: 1050;
  opacity: 0;
  transition: opacity var(--fc-transition);
}
.sidebar-overlay.show {
  display: block;
  opacity: 1;
}

/* Mobile open sidebar sits above bottom nav (bottom-nav is 1080) */
body.sidebar-open .sidebar-overlay {
  z-index: 1085;
}
body.sidebar-open .sidebar {
  z-index: 1090;
}
body.sidebar-open .bottom-nav {
  z-index: 1070;
  pointer-events: none;
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, #EEF2F6 25%, #F8FAFC 50%, #EEF2F6 75%);
  background-size: 200% 100%;
  animation: skeleton 1.4s ease infinite;
  border-radius: 8px;
}
@keyframes skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Animations */
@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.anim-fade-up { animation: pageIn 0.35s ease both; }
@media (prefers-reduced-motion: reduce) {
  .anim-fade-up { animation: none; }
}
.content-lazy {
  content-visibility: auto;
  contain-intrinsic-size: 1px 240px;
}
.anim-delay-1 { animation-delay: 0.05s; }
.anim-delay-2 { animation-delay: 0.1s; }
.anim-delay-3 { animation-delay: 0.15s; }
.anim-delay-4 { animation-delay: 0.2s; }

/* Responsive */
@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
    width: var(--fc-sidebar-w) !important;
  }
  .sidebar.open {
    transform: translateX(0);
    z-index: 1090;
  }
  .sidebar-overlay.show {
    z-index: 1085;
  }
  .sidebar-close-btn {
    display: inline-flex;
  }
  .sidebar-brand {
    padding-right: 0.75rem;
  }
  .sidebar-brand.has-logo {
    padding-right: 0.75rem;
  }
  .sidebar-brand .brand-logo,
  .sidebar-brand .brand-text {
    min-width: 0;
  }
  .sidebar.collapsed { width: var(--fc-sidebar-w) !important; }
  .sidebar.collapsed .nav-label,
  .sidebar.collapsed .nav-section,
  .sidebar.collapsed .nav-group,
  .sidebar.collapsed .brand-text,
  .sidebar.collapsed .sidebar-user-meta {
    display: block !important;
  }
  .main-wrap { margin-left: 0 !important; }
  body.sidebar-collapsed .main-wrap { margin-left: 0 !important; }
  .bottom-nav {
    display: flex !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: none !important;
  }
  .page-content {
    padding: 1rem 0.85rem;
    padding-bottom: calc(var(--fc-bottom-nav-h) + env(safe-area-inset-bottom, 0px) + 2.75rem);
  }
  .topbar {
    padding: 0 max(0.75rem, env(safe-area-inset-right, 0px)) 0 max(0.75rem, env(safe-area-inset-left, 0px));
  }
  .topbar-actions {
    gap: 0.4rem;
    padding-right: 0.15rem;
  }
  .notif-btn {
    width: 38px;
    height: 38px;
    font-size: 1rem;
    border-radius: 10px;
  }
  .user-chip {
    padding: 0.2rem 0.4rem 0.2rem 0.2rem !important;
  }
  .user-avatar {
    width: 30px;
    height: 30px;
    font-size: 0.78rem;
  }
}

@media (min-width: 1200px) {
  .page-content { padding: 1.75rem 2rem; }
}

/* Impersonation notice in sidebar */
.sidebar-impersonation {
  margin: 0.65rem 0.75rem 0;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  background: linear-gradient(145deg, #E8F8FB, #D1F1F6);
  border: 1px solid var(--fc-primary-100);
  flex-shrink: 0;
}
.sidebar-impersonation-exit {
  font-size: 0.72rem !important;
  font-weight: 650;
  padding: 0.35rem 0.5rem !important;
  border: none !important;
  color: var(--fc-primary-deep) !important;
  background: #fff !important;
}
.sidebar.collapsed .sidebar-impersonation-exit .nav-label {
  display: none !important;
}
.sidebar.collapsed .sidebar-impersonation {
  padding: 0.45rem;
}

/* Production / FC Tabs */
.production-tabs-panel .panel-header { display: none; }
.fc-tabs {
  display: flex;
  gap: 0.35rem;
  padding: 0.75rem 0.85rem 0;
  border-bottom: 1px solid var(--fc-border);
  background: linear-gradient(180deg, #FAFCFD 0%, #fff 100%);
  overflow: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  position: sticky;
  top: var(--fc-header-h);
  z-index: 1010;
  border-radius: var(--fc-radius) var(--fc-radius) 0 0;
  box-shadow: 0 1px 0 var(--fc-border);
}
.fc-tabs::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.fc-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 1rem;
  border: none;
  background: transparent;
  color: var(--fc-muted);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: 10px 10px 0 0;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}
.fc-tab i { font-size: 1rem; color: #7AA8B3; }
.fc-tab:hover {
  color: var(--fc-primary-deep);
  background: var(--fc-primary-50);
}
.fc-tab:hover i { color: var(--fc-primary); }
.fc-tab.active {
  color: var(--fc-primary-deep);
  background: #fff;
  box-shadow: 0 -1px 0 #fff;
}
.fc-tab.active::after {
  content: '';
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: -1px;
  height: 2.5px;
  border-radius: 2px 2px 0 0;
  background: var(--fc-primary);
}
.fc-tab.active i { color: var(--fc-primary); }
.fc-tab-count {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 99px;
  background: #F1F5F9;
  color: var(--fc-muted);
}
.fc-tab.active .fc-tab-count {
  background: var(--fc-primary-50);
  color: var(--fc-primary-deep);
}
.fc-tab-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fc-accent);
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.25);
}
@media (max-width: 767.98px) {
  .fc-tab {
    font-weight: 700;
    color: var(--fc-text-secondary);
  }
  .fc-tab span:not(.fc-tab-count) {
    font-weight: 700;
  }
  .fc-tab-count {
    font-size: 0.8rem;
    font-weight: 800;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.4rem;
    line-height: 1.5rem;
    text-align: center;
    background: #E2E8F0;
    color: #0F172A;
  }
  .fc-tab.active .fc-tab-count {
    background: var(--fc-primary);
    color: #fff;
  }
  .notif-count {
    top: 2px;
    right: 2px;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 0.25rem;
    font-size: 0.65rem;
    font-weight: 800;
    line-height: 1;
  }
  .fc-shift-staff-count {
    font-size: 0.8rem;
    min-width: 1.5rem;
    height: 1.5rem;
    font-weight: 800;
  }
}
@media (max-width: 575.98px) {
  :root {
    --fc-bottom-nav-h: 3.15rem;
  }
  .fc-tabs {
    gap: 0.25rem;
    padding: 0.55rem 0.45rem 0;
  }
  .fc-tab {
    flex: 1 1 0;
    justify-content: center;
    padding: 0.65rem 0.4rem;
    font-size: 0.86rem;
    gap: 0.35rem;
  }
  .fc-tab i {
    font-size: 1rem;
    color: #5E8A96;
  }
  .fc-tab span:not(.fc-tab-count) {
    display: inline;
    letter-spacing: -0.01em;
  }
  .fc-tab-count {
    font-size: 0.88rem;
    min-width: 1.65rem;
    height: 1.65rem;
    line-height: 1.65rem;
  }
  .fc-tab.active {
    color: var(--fc-primary-deep);
  }
  .fc-tab.active::after {
    left: 0.45rem;
    right: 0.45rem;
  }
  .notif-btn {
    width: 36px;
    height: 36px;
    font-size: 0.95rem;
  }
  .notif-count {
    top: 1px;
    right: 1px;
    min-width: 1.05rem;
    height: 1.05rem;
    font-size: 0.62rem;
    line-height: 1;
  }
  .bottom-nav a {
    font-size: 0.52rem;
    padding: 0.15rem 0.05rem;
  }
  .bottom-nav a i {
    font-size: 1rem;
  }
}

/* Very narrow phones */
@media (max-width: 359.98px) {
  .bottom-nav a {
    font-size: 0;
    gap: 0;
    padding: 0.25rem 0;
  }
  .bottom-nav a i {
    font-size: 1.15rem;
  }
  .topbar-actions .user-chip .d-none {
    display: none !important;
  }
}

/* Confirm modal */
.fc-confirm-modal {
  border: none;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
}
.fc-confirm-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
}
.fc-confirm-icon.is-primary {
  background: var(--fc-primary-50);
  color: var(--fc-primary);
}
.fc-confirm-icon.is-accent {
  background: var(--fc-accent-50);
  color: var(--fc-accent);
}
.fc-confirm-icon.is-danger {
  background: var(--fc-danger-50);
  color: var(--fc-danger);
}
.fc-confirm-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
  color: var(--fc-black);
}
.fc-confirm-text {
  font-size: 0.9rem;
  color: var(--fc-text-secondary);
  margin: 0;
  line-height: 1.45;
}
#fcConfirmModal .modal-dialog {
  max-width: 360px;
}

/* Profile */
.profile-hero {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  border-radius: 16px;
  background: linear-gradient(135deg, #F0FBFD 0%, #FFFFFF 55%, #F8FAFC 100%);
  border: 1px solid var(--fc-border);
}
.profile-hero-avatar {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(145deg, #00C4DE, var(--fc-primary));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(0, 175, 198, 0.25);
  overflow: hidden;
}
.profile-hero-avatar.has-photo {
  background: #e2e8f0;
}
.profile-hero-name {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.15rem;
  color: var(--fc-text);
}
.profile-hero-sub,
.profile-hero-email {
  font-size: 0.82rem;
  color: var(--fc-text-secondary);
}
.profile-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Editable sections: locked until Edit */
.fc-editable-header {
  gap: 0.75rem;
}
.fc-editable-toolbar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
}

/* Foldable settings / panels */
.fc-fold-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.fc-fold-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid var(--fc-border, #e2e8f0);
  border-radius: 0.5rem;
  background: #fff;
  color: var(--fc-muted, #64748b);
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.18s ease, background 0.15s ease, color 0.15s ease;
}
.fc-fold-toggle:hover {
  background: #f8fafc;
  color: var(--fc-text, #0f172a);
}
.fc-fold-toggle .bi {
  transition: transform 0.18s ease;
  font-size: 1rem;
}
.fc-fold.is-folded .fc-fold-toggle .bi {
  transform: rotate(-90deg);
}
.fc-fold-title {
  cursor: pointer;
  user-select: none;
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}
.fc-fold.is-folded > [data-fc-fold-body],
.fc-fold.is-folded > .panel-body {
  display: none !important;
}
.fc-fold.is-folded .panel-header {
  border-bottom: none;
  margin-bottom: 0;
}
.fc-fold-counter {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 1.85rem;
}
.fc-fold.is-folded .fc-fold-counter {
  display: inline-flex;
}

/* Shop orders dashboard: keep pending counter visible in header */
.fc-shop-orders-dash .fc-fold-counter,
.fc-shop-orders-dash .fc-shop-orders-count {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 1.6rem;
  height: 1.6rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.25);
}
.fc-shop-orders-dash .fc-fold-header {
  gap: 0.5rem;
  align-items: center;
}
.fc-shop-orders-dash .fc-fold-title {
  margin-inline-end: 0.15rem;
}
.fc-shop-orders-dash .fc-shop-dash-sender {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.fc-shop-orders-dash .fc-shop-dash-code {
  margin-top: 0.12rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--fc-muted, #64748b);
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.fc-editable.is-locked .fc-btn-cancel,
.fc-editable.is-locked .fc-editable-actions {
  display: none !important;
}
.fc-editable.is-editing .fc-btn-edit {
  display: none !important;
}
.fc-editable.is-create .fc-btn-edit,
.fc-editable.is-create .fc-btn-cancel,
.fc-editable[data-fc-editable-open] .fc-btn-edit,
.fc-editable[data-fc-editable-open] .fc-btn-cancel {
  display: none !important;
}
.fc-editable.is-locked input:not([type="hidden"]),
.fc-editable.is-locked select,
.fc-editable.is-locked textarea {
  background: #F8FAFC !important;
  color: var(--fc-text);
  cursor: default;
  opacity: 1;
  border-color: var(--fc-border);
  box-shadow: none;
}
/* Permission boxes stay enabled for selected display; block toggling while locked */
.fc-editable.is-locked [data-perm-box],
.fc-editable.is-locked .fc-perm-check label {
  pointer-events: none;
  cursor: default;
}
.fc-editable.is-editing {
  box-shadow: 0 0 0 1px rgba(0, 175, 198, 0.25), var(--fc-shadow);
}
.fc-user-gen-preview {
  border: 1px solid var(--fc-border, #e2e8f0);
  border-radius: 12px;
  background: var(--fc-primary-50, #E8F8FB);
  padding: 0.85rem 1rem;
}
.fc-user-gen-preview-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--fc-primary-deep, #007A8A);
  margin-bottom: 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.fc-user-gen-preview-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.55rem;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}
.fc-user-gen-preview-row code {
  color: var(--fc-primary-deep, #007A8A);
  background: rgba(255, 255, 255, 0.7);
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
  word-break: break-all;
}
.fc-editable-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

@media (max-width: 575.98px) {
  .profile-hero {
    align-items: flex-start;
  }
  .profile-meta-grid {
    grid-template-columns: 1fr;
  }
}

/* Permission grids */
.fc-perm-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.fc-perm-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.fc-perm-pill,
.fc-perm-tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.65rem;
  font-weight: 650;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  line-height: 1.2;
}
.fc-perm-pill.is-role,
.fc-perm-tag.is-role {
  background: var(--fc-primary-50);
  color: var(--fc-primary-deep);
}
.fc-perm-pill.is-grant,
.fc-perm-tag.is-grant {
  background: var(--fc-primary-50);
  color: var(--fc-primary-deep);
}
.fc-perm-pill.is-deny,
.fc-perm-tag.is-deny {
  background: #FEF2F2;
  color: #B91C1C;
}
.fc-perm-check {
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--fc-border);
  border-radius: 10px;
  height: 100%;
  background: #fff;
}
.fc-perm-check.is-grant {
  border-color: var(--fc-primary-100);
  background: #F8FCFD;
}
.fc-perm-check.is-deny {
  border-color: #FECACA;
  background: #FFF7F7;
}
.fc-perm-check.is-role {
  border-color: var(--fc-primary-100);
  background: #F8FCFD;
}
.fc-perm-readonly .fc-perm-check {
  opacity: 0.9;
}
.fc-perm-module .panel-header {
  background: #FAFCFD;
}
.fc-perm-selected-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  max-height: 9rem;
  overflow-y: auto;
}
.fc-perm-selected-panel {
  position: sticky;
  top: 0.5rem;
  z-index: 2;
}
.fc-perm-selected-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--fc-primary-100);
  background: var(--fc-primary-50);
  color: var(--fc-primary-deep);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.25;
}
.fc-perm-selected-chip:hover {
  background: var(--fc-primary-100);
  color: var(--fc-primary-deep);
}
/* Highlight permission cards when their checkbox is selected (locked or editing) */
[data-perm-item][data-perm-selected="1"] .fc-perm-check,
[data-perm-item]:has([data-perm-box]:checked) .fc-perm-check {
  border-color: var(--fc-primary);
  background: var(--fc-primary-50);
  box-shadow: inset 0 0 0 1px rgba(0, 175, 198, 0.2);
}
[data-perm-item][data-perm-selected="1"] .fc-perm-check strong,
[data-perm-item]:has([data-perm-box]:checked) .fc-perm-check strong {
  color: var(--fc-primary-deep);
}
.fc-perm-filter-bar .btn-group .btn {
  min-width: 5.5rem;
}


/* ============================================================
   Shift board (dashboard timetable)
   ============================================================ */
.fc-shift-board .panel-header {
  align-items: center;
  gap: 0.75rem;
}
.fc-shift-board-date {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.78rem;
  font-weight: 550;
  color: var(--fc-muted);
  letter-spacing: 0;
  text-transform: none;
}
.fc-shift-board-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem 0.75rem;
  margin-left: auto;
}
.fc-shift-quick-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.fc-shift-quick-actions .btn {
  white-space: nowrap;
}
.fc-now-clock {
  flex-shrink: 0;
  width: 4.75rem;
  height: 4.75rem;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.05rem;
  background: radial-gradient(circle at 35% 30%, #E8F8FB 0%, #fff 55%, #D5F4F8 100%);
  border: 3px solid var(--fc-primary, #00AFC6);
  box-shadow: 0 2px 0 rgba(0, 175, 198, 0.12);
  color: var(--fc-primary-deep, #007A8A);
  line-height: 1;
  margin: 0.15rem 0;
}
.fc-now-clock-time {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.fc-now-clock-ampm {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--fc-muted, #64748b);
  text-transform: none;
  max-width: 5.5rem;
  line-height: 1.15;
  text-align: center;
}
.fc-shift-timeline {
  margin-bottom: 1rem;
}
.fc-shift-timeline-track {
  position: relative;
  height: 10px;
  margin-top: 1.35rem;
  overflow: visible;
}
.fc-shift-timeline-fill {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #E2E8F0;
  overflow: hidden;
  z-index: 1;
}
/* Color-coded horizontal period bars */
.fc-shift-seg {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  opacity: 0.95;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
  padding: 0 0.2rem;
}
.fc-shift-seg-label {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  color: #fff;
  text-shadow: 0 1px 1px rgba(15, 23, 42, 0.35);
  pointer-events: none;
}
.fc-shift-seg.is-work {
  background: var(--seg-color, #00AFC6);
}
.fc-shift-seg.is-tea {
  background: #F59E0B;
}
.fc-shift-seg.is-lunch {
  background: #0284C7;
}
.fc-shift-seg.is-dinner {
  background: #6366F1;
}
.fc-shift-seg.is-rest {
  background: #64748B;
}
/* White separators — same height as the bar */
.fc-shift-day-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #fff;
  transform: translateX(-50%);
  z-index: 3;
  pointer-events: none;
}
.fc-shift-line-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  margin-top: 0.45rem;
  font-size: 0.65rem;
  font-weight: 650;
  color: var(--fc-muted);
}
.fc-shift-line-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.fc-shift-line-legend i {
  display: inline-block;
  width: 0.85rem;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
}
.fc-shift-line-legend .is-work i { background: #00AFC6; }
.fc-shift-line-legend .is-tea i { background: #F59E0B; }
.fc-shift-line-legend .is-lunch i { background: #0284C7; }
.fc-shift-line-legend .is-dinner i { background: #6366F1; }
.fc-shift-line-legend .is-rest i { background: #64748B; }
/* Only current time is a circle — sits above the bar */
.fc-shift-timeline-now {
  position: absolute;
  top: 50%;
  width: 22px;
  height: 22px;
  margin-left: -11px;
  margin-top: -11px;
  transform: none;
  z-index: 5;
  pointer-events: auto;
  cursor: default;
}
.fc-shift-timeline-now-dot {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--fc-primary, #00AFC6);
  border: 3px solid #fff;
  box-shadow: 0 0 0 3px rgba(0, 175, 198, 0.35);
}
.fc-shift-timeline-now-label {
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translateX(-50%);
  margin-bottom: 8px;
  white-space: nowrap;
  font-size: 0.62rem;
  font-weight: 700;
  color: #0F172A;
  background: #fff;
  border: 1px solid var(--fc-border, #e2e8f0);
  border-radius: 999px;
  padding: 0.12rem 0.4rem;
  line-height: 1.2;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  z-index: 6;
}
.fc-shift-timeline-now:hover .fc-shift-timeline-now-label,
.fc-shift-timeline-now:focus-within .fc-shift-timeline-now-label {
  opacity: 1;
  visibility: visible;
}
.fc-shift-timeline-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.45rem;
  font-size: 0.68rem;
  color: var(--fc-muted);
  font-weight: 600;
}
.fc-shift-timeline-labels-shift {
  position: relative;
  display: block;
  height: 1.15rem;
  margin-top: 0.4rem;
}
.fc-shift-timeline-tick {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 0.62rem;
  font-weight: 650;
  color: var(--fc-muted);
  line-height: 1.2;
}
.fc-shift-timeline-tick:first-child {
  transform: translateX(0);
}
.fc-shift-timeline-tick:last-child {
  transform: translateX(-100%);
}

/* Slim period rows (dot — connector — dot + label) */
.fc-period-rail {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 0.75rem;
}
.fc-period-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.15rem 0;
}
.fc-period-spine {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  width: 2.1rem;
  gap: 0;
}
.fc-period-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--shift-bar, var(--fc-primary));
  flex-shrink: 0;
  z-index: 1;
}
.fc-period-connector {
  flex: 1;
  height: 2px;
  background: var(--shift-bar, var(--fc-primary));
  opacity: 0.45;
  min-width: 0.55rem;
}
.fc-period-row.is-tea .fc-period-dot,
.fc-period-row.is-lunch .fc-period-dot {
  border-color: var(--fc-accent);
}
.fc-period-row.is-tea .fc-period-connector,
.fc-period-row.is-lunch .fc-period-connector {
  background: var(--fc-accent);
  opacity: 0.55;
  background-image: repeating-linear-gradient(
    90deg,
    var(--fc-accent),
    var(--fc-accent) 3px,
    transparent 3px,
    transparent 5px
  );
}
.fc-period-copy {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
  flex: 1;
  line-height: 1.25;
}
.fc-period-copy strong {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--shift-text, var(--fc-text));
  white-space: nowrap;
}
.fc-period-copy span {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--fc-muted);
  white-space: nowrap;
  text-align: right;
}
.fc-period-row.is-tea .fc-period-copy strong,
.fc-period-row.is-lunch .fc-period-copy strong {
  color: var(--fc-accent);
}

.fc-shift-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}
.fc-shift-card {
  background: var(--shift-bg, #F8FAFC);
  border: 1px solid var(--fc-border);
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  border-top: 3px solid var(--shift-bar, var(--fc-primary));
  min-width: 0;
  box-shadow: var(--fc-shadow);
}
.fc-shift-card.is-current {
  box-shadow: var(--fc-shadow-lg);
  border-color: rgba(0, 175, 198, 0.35);
}
.fc-shift-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}
.fc-shift-card-name {
  font-weight: 700;
  color: var(--shift-text, var(--fc-text));
  font-size: 0.88rem;
  line-height: 1.2;
}
.fc-shift-card-hours {
  font-size: 0.7rem;
  color: var(--fc-muted);
  margin-top: 0.1rem;
  line-height: 1.2;
}
.fc-shift-card-meta {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}
.fc-shift-now-pill {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  background: var(--shift-bar, var(--fc-primary));
  color: #fff;
}
.fc-shift-staff-count {
  font-size: 0.68rem;
  font-weight: 700;
  min-width: 1.25rem;
  height: 1.25rem;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #fff;
  color: var(--shift-text, var(--fc-text));
  border: 1px solid var(--fc-border);
}
.fc-shift-empty {
  font-size: 0.72rem;
  color: var(--fc-muted);
  padding: 0.15rem 0 0;
}
.fc-shift-staff-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.fc-shift-staff-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem;
  padding: 0.15rem 0;
  border: 0;
  background: transparent;
  border-radius: 0;
  min-width: 0;
}
.fc-shift-person-name {
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--fc-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.fc-shift-person-role {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--fc-muted);
  flex-shrink: 0;
}
.fc-shift-person,
.fc-shift-avatar,
.fc-shift-person-meta,
.fc-shift-machines {
  display: none;
}

@media (max-width: 991.98px) {
  .fc-shift-cards {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }
  .fc-shift-timeline {
    margin-bottom: 0.55rem;
  }
  .fc-shift-timeline-track {
    height: 8px;
    margin-top: 1.05rem;
  }
  .fc-shift-seg {
    padding: 0 0.1rem;
  }
  .fc-shift-seg-label {
    font-size: 0.42rem;
    letter-spacing: 0;
  }
  .fc-shift-day-line {
    width: 1px;
  }
  .fc-shift-timeline-now {
    width: 16px;
    height: 16px;
    margin-left: -8px;
    margin-top: -8px;
  }
  .fc-shift-timeline-now-dot {
    width: 16px;
    height: 16px;
    border-width: 2px;
    box-shadow: 0 0 0 2px rgba(0, 175, 198, 0.35);
  }
  .fc-shift-timeline-now-label {
    font-size: 0.52rem;
    padding: 0.06rem 0.28rem;
    margin-bottom: 5px;
  }
  .fc-shift-timeline-labels {
    font-size: 0.58rem;
    margin-top: 0.28rem;
  }
  .fc-shift-timeline-labels-shift {
    height: 1rem;
  }
  .fc-shift-timeline-tick {
    font-size: 0.52rem;
  }
  .fc-shift-line-legend {
    font-size: 0.58rem;
    gap: 0.28rem 0.5rem;
    margin-top: 0.28rem;
  }
  .fc-shift-line-legend i {
    width: 0.65rem;
    height: 3px;
  }
  .fc-shift-card {
    padding: 0.55rem 0.65rem;
  }
  .fc-shift-card-name {
    font-size: 0.82rem;
  }
  .fc-shift-card-hours {
    font-size: 0.68rem;
  }
  .fc-shift-staff-list li {
    padding: 0.1rem 0;
  }
}

@media (max-width: 575.98px) {
  .fc-shift-timeline-track {
    height: 5px;
    margin-top: 0.9rem;
  }
  .fc-shift-seg-label {
    display: none;
  }
  .fc-shift-timeline-now {
    width: 14px;
    height: 14px;
    margin-left: -7px;
    margin-top: -7px;
  }
  .fc-shift-timeline-now-dot {
    width: 14px;
    height: 14px;
    border-width: 2px;
  }
  .fc-shift-timeline-now-label {
    font-size: 0.48rem;
    margin-bottom: 3px;
  }
  .fc-shift-board .panel-header {
    align-items: flex-start;
    gap: 0.5rem;
  }
  .fc-shift-board-actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }
  .fc-shift-quick-actions {
    width: 100%;
  }
  .fc-shift-quick-actions .btn {
    flex: 1 1 calc(50% - 0.35rem);
    justify-content: center;
  }
  .fc-now-clock {
    margin-left: auto;
    width: 3.85rem;
    height: 3.85rem;
  }
  .fc-now-clock-time {
    font-size: 0.88rem;
  }
  .fc-now-clock-ampm {
    font-size: 0.55rem;
  }
  .fc-shift-card-head {
    margin-bottom: 0.3rem;
  }
}

/* Rest times editor */
.rest-break-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.rest-break-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--fc-text, #1e293b);
  background: #f1f5f9;
  border: 1px solid var(--fc-border, #e2e8f0);
  border-radius: 6px;
  padding: 0.28rem 0.55rem;
}
.rest-break-chip strong {
  font-weight: 600;
  color: var(--fc-muted, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.65rem;
}
.fc-editable.is-editing .rest-break-summary {
  display: none;
}
.fc-editable.is-locked #restTimesForm {
  display: none;
}
.fc-editable.is-locked .rest-times-intro {
  display: none;
}
.rest-break-row .form-text {
  font-size: 0.7rem;
  margin-top: 0.15rem;
}

/* Compact rest panel on Shifts list */
.fc-rest-panel {
  margin-bottom: 0.85rem !important;
}
.fc-rest-panel .panel-header {
  padding: 0.45rem 0.75rem;
  min-height: 0;
}
.fc-rest-panel .panel-header h5 {
  font-size: 0.78rem;
  gap: 0.35rem;
}
.fc-rest-panel .panel-header h5 .ph-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-size: 0.72rem;
}
.fc-rest-panel .fc-btn-edit,
.fc-rest-panel .fc-btn-cancel {
  padding: 0.15rem 0.45rem;
  font-size: 0.7rem;
  line-height: 1.2;
}
.fc-rest-panel .panel-body {
  padding: 0.45rem 0.75rem 0.55rem;
}
.fc-rest-panel .rest-break-summary {
  gap: 0.28rem;
}
.fc-rest-panel .rest-break-chip {
  font-size: 0.68rem;
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  gap: 0.25rem;
}
.fc-rest-panel .rest-break-chip strong {
  font-size: 0.58rem;
}
.fc-rest-panel .rest-times-intro {
  font-size: 0.72rem;
  margin-bottom: 0.55rem !important;
}
.fc-rest-panel .rest-break-row {
  margin-bottom: 0.35rem !important;
}
.fc-rest-panel .rest-break-row .form-label {
  font-size: 0.68rem;
  margin-bottom: 0.15rem;
}
.fc-rest-panel .rest-break-row .form-control {
  font-size: 0.78rem;
  padding: 0.25rem 0.45rem;
  min-height: 0;
}
.fc-rest-panel .rest-break-row .form-text {
  font-size: 0.62rem;
}
.fc-rest-panel .fc-editable-actions .btn {
  font-size: 0.72rem;
  padding: 0.25rem 0.55rem;
}

.machine-people-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.machine-people-list li {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--fc-text);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 14rem;
}
.machines-table td[data-label="Supervisors"],
.machines-table td[data-label="Operators"] {
  min-width: 8rem;
  vertical-align: top;
}
.fc-row-link {
  cursor: pointer;
  transition: background-color 0.12s ease;
}
.fc-row-link:hover > td,
.fc-row-link:focus-visible > td {
  background-color: rgba(0, 175, 198, 0.06);
}
/* Fold cards: no hover / focus / selection flash. */
[data-fc-emp-fold],
[data-fc-payroll-fold],
[data-fc-emp-fold] *,
[data-fc-payroll-fold] * {
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
  -webkit-tap-highlight-color: transparent !important;
}
[data-fc-emp-fold]::selection,
[data-fc-payroll-fold]::selection,
[data-fc-emp-fold] *::selection,
[data-fc-payroll-fold] *::selection,
[data-fc-emp-fold]::-moz-selection,
[data-fc-payroll-fold]::-moz-selection,
[data-fc-emp-fold] *::-moz-selection,
[data-fc-payroll-fold] *::-moz-selection {
  background: transparent !important;
  color: inherit !important;
}
.fc-row-link[data-fc-emp-fold],
.fc-row-link[data-fc-payroll-fold],
tr[data-fc-emp-fold],
tr[data-fc-payroll-fold] {
  transition: none !important;
  outline: none !important;
  -webkit-tap-highlight-color: transparent !important;
}
.fc-row-link[data-fc-emp-fold]:hover > td,
.fc-row-link[data-fc-emp-fold]:focus > td,
.fc-row-link[data-fc-emp-fold]:focus-visible > td,
.fc-row-link[data-fc-emp-fold]:active > td,
.fc-row-link[data-fc-payroll-fold]:hover > td,
.fc-row-link[data-fc-payroll-fold]:focus > td,
.fc-row-link[data-fc-payroll-fold]:focus-visible > td,
.fc-row-link[data-fc-payroll-fold]:active > td,
tr[data-fc-emp-fold]:hover > td,
tr[data-fc-emp-fold]:focus > td,
tr[data-fc-emp-fold]:focus-visible > td,
tr[data-fc-emp-fold]:active > td,
tr[data-fc-payroll-fold]:hover > td,
tr[data-fc-payroll-fold]:focus > td,
tr[data-fc-payroll-fold]:focus-visible > td,
tr[data-fc-payroll-fold]:active > td {
  background-color: transparent !important;
  background: transparent !important;
  outline: none !important;
  box-shadow: none !important;
}
.fc-row-link[data-fc-emp-fold]:hover,
.fc-row-link[data-fc-emp-fold]:focus,
.fc-row-link[data-fc-emp-fold]:focus-visible,
.fc-row-link[data-fc-emp-fold]:active,
.fc-row-link[data-fc-payroll-fold]:hover,
.fc-row-link[data-fc-payroll-fold]:focus,
.fc-row-link[data-fc-payroll-fold]:focus-visible,
.fc-row-link[data-fc-payroll-fold]:active,
tr[data-fc-emp-fold]:hover,
tr[data-fc-emp-fold]:focus,
tr[data-fc-emp-fold]:focus-visible,
tr[data-fc-emp-fold]:active,
tr[data-fc-payroll-fold]:hover,
tr[data-fc-payroll-fold]:focus,
tr[data-fc-payroll-fold]:focus-visible,
tr[data-fc-payroll-fold]:active {
  outline: none !important;
  box-shadow: none !important;
}
.fc-emp-fold-btn:focus,
.fc-emp-fold-btn:focus-visible,
.fc-emp-fold-btn:active,
.fc-payroll-fold-btn:focus,
.fc-payroll-fold-btn:focus-visible,
.fc-payroll-fold-btn:active {
  outline: none !important;
  box-shadow: none !important;
}
.list-group-item.fc-row-link:hover,
.list-group-item.fc-row-link:focus-visible,
.fc-shift-card.fc-row-link:hover,
.fc-shift-card.fc-row-link:focus-visible {
  background-color: rgba(0, 175, 198, 0.06);
}
.fc-row-link:focus-visible {
  outline: 2px solid rgba(0, 175, 198, 0.45);
  outline-offset: -2px;
}
.fc-row-link-text:hover {
  color: var(--fc-primary-deep, #0284c7) !important;
}

/* Machine detail — compact meta */
.machine-detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.45rem;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--fc-text, #1e293b);
}
.machine-detail-k {
  font-weight: 600;
  color: var(--fc-muted, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.62rem;
}
.machine-detail-meta code {
  font-size: 0.7rem;
  padding: 0.05rem 0.28rem;
  background: #f1f5f9;
  border-radius: 3px;
}
.machine-detail-sep {
  color: #cbd5e1;
  font-weight: 400;
}
.machine-detail-notes {
  margin-top: 0.45rem;
  font-size: 0.78rem;
  color: var(--fc-muted);
  line-height: 1.4;
}
.machine-status-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
  padding: 0.55rem 0.7rem;
  margin-top: 0.55rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #f8fafc;
}
.machine-status-bar .form-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
  white-space: nowrap;
}
.machine-status-bar .form-select {
  width: auto;
  min-width: 8.5rem;
  max-width: 100%;
}
@media (max-width: 575.98px) {
  .machine-detail-meta {
    flex-direction: column;
    gap: 0.15rem;
  }
  .machine-detail-sep {
    display: none;
  }
}

/* Shift detail — compact meta (no cards) */
.shift-detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.45rem;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--fc-text, #1e293b);
}
.shift-detail-k {
  font-weight: 600;
  color: var(--fc-muted, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.62rem;
}
.shift-detail-meta code {
  font-size: 0.7rem;
  padding: 0.05rem 0.28rem;
  background: #f1f5f9;
  border-radius: 3px;
}
.shift-detail-sep {
  color: #cbd5e1;
  font-weight: 400;
}
.fc-multi-people {
  min-height: 11rem;
}
.fc-multi-people option {
  padding: 0.25rem 0.4rem;
}
.shift-people-checks {
  max-height: 14rem;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.25rem 0.5rem;
  background: #f8fafc;
}
.shift-multi-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  user-select: none;
}
.shift-multi-toggle-input {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  accent-color: var(--fc-primary, #00AFC6);
  cursor: pointer;
  flex-shrink: 0;
}
.shift-person-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  padding: 0.45rem 0.2rem;
  border-bottom: 1px solid #eef2f7;
}
.shift-person-row:last-child {
  border-bottom: 0;
}
.shift-person-cb {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  accent-color: var(--fc-primary, #00AFC6);
  cursor: pointer;
  flex-shrink: 0;
}
.shift-person-row label {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 500;
  color: #0f172a;
  cursor: pointer;
  flex: 1;
  line-height: 1.2;
}
@media (max-width: 575.98px) {
  .shift-detail-meta {
    flex-direction: column;
    gap: 0.15rem;
  }
  .shift-detail-sep {
    display: none;
  }
}

/* Inventory category summary — compact chips */
.fc-inv-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.fc-inv-summary-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--fc-border);
  background: var(--fc-surface);
  color: inherit;
  text-decoration: none;
  font-size: 0.78rem;
  line-height: 1.2;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.fc-inv-summary-chip:hover,
.fc-inv-summary-chip:focus {
  border-color: rgba(0, 175, 198, 0.45);
  background: rgba(0, 175, 198, 0.06);
  color: inherit;
  text-decoration: none;
  outline: none;
}
.fc-inv-summary-chip.is-active {
  border-color: var(--fc-primary);
  background: rgba(0, 175, 198, 0.12);
  color: var(--fc-primary);
}
.fc-inv-summary-name {
  font-weight: 600;
  letter-spacing: 0.01em;
}
.fc-inv-summary-meta {
  color: var(--fc-muted, #6b7280);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.fc-inv-summary-chip.is-active .fc-inv-summary-meta {
  color: inherit;
  opacity: 0.85;
}
.fc-inv-summary-meta strong {
  font-weight: 700;
  color: inherit;
}
.fc-inv-summary-dot {
  opacity: 0.5;
  margin: 0 0.05rem;
}
@media (max-width: 575.98px) {
  .fc-inv-summary-chip {
    font-size: 0.72rem;
    padding: 0.24rem 0.55rem;
  }
}

/* Inventory page — professional compact layout */
.fc-inv-page {
  max-width: 1100px;
}
.fc-inv-panel {
  overflow: hidden;
}
.fc-inv-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--fc-border);
  background: linear-gradient(180deg, rgba(0, 175, 198, 0.04), transparent);
}
.fc-inv-bar-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  flex: 1 1 auto;
  min-width: 0;
}
.fc-inv-search {
  flex: 1 1 12rem;
  min-width: 10rem;
  max-width: 18rem;
  margin: 0;
}
.fc-inv-search input {
  height: 2rem;
  font-size: 0.85rem;
}
.fc-inv-select {
  width: auto;
  min-width: 6.5rem;
  height: 2rem;
  font-size: 0.8rem;
  padding-top: 0.2rem;
  padding-bottom: 0.2rem;
}
.fc-inv-add {
  white-space: nowrap;
}
.fc-inv-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.65rem 0.9rem 0.35rem;
}
.fc-inv-cat {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--fc-border);
  background: #fff;
  color: #334155;
  text-decoration: none;
  font-size: 0.75rem;
  line-height: 1.25;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.fc-inv-cat:hover,
.fc-inv-cat:focus {
  border-color: rgba(0, 175, 198, 0.5);
  background: rgba(0, 175, 198, 0.06);
  color: inherit;
  text-decoration: none;
  outline: none;
}
.fc-inv-cat.is-active {
  border-color: var(--fc-primary);
  background: var(--fc-primary);
  color: #fff;
}
.fc-inv-cat-name {
  font-weight: 600;
}
.fc-inv-cat-meta {
  opacity: 0.72;
  font-variant-numeric: tabular-nums;
}
.fc-inv-cat.is-active .fc-inv-cat-meta {
  opacity: 0.9;
}
.fc-inv-count {
  padding: 0 0.9rem 0.55rem;
  font-size: 0.72rem;
  color: #64748b;
}
.fc-inv-table-wrap {
  border-top: 1px solid var(--fc-border);
}
.fc-inv-table-wrap .table-fc thead th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  font-weight: 600;
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
  background: #f8fafc;
}
.fc-inv-table-wrap .table-fc td {
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
  vertical-align: middle;
  font-size: 0.875rem;
}
.fc-inv-code {
  font-size: 0.75rem;
  background: #f1f5f9;
  color: #475569;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}
.fc-inv-pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
}
.fc-inv-unit {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-left: 0.15rem;
}
.fc-inv-stock-low {
  color: var(--fc-danger);
  font-weight: 700;
}
.fc-inv-low {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fc-danger);
  background: rgba(220, 53, 69, 0.1);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  vertical-align: middle;
}
@media (max-width: 767.98px) {
  .fc-inv-bar {
    padding: 0.65rem 0.75rem;
  }
  .fc-inv-search {
    max-width: none;
    flex-basis: 100%;
  }
  .fc-inv-add {
    width: 100%;
  }
}


/* Mobile: compact stats side-by-side (no big stacked cards) */
@media (max-width: 767.98px) {
  .stat-card {
    padding: 0.4rem 0.5rem;
    border-radius: 8px;
    box-shadow: none;
  }
  .stat-card:hover {
    transform: none;
    box-shadow: none;
  }
  .stat-label {
    font-size: 0.58rem;
    margin-bottom: 0.08rem;
    letter-spacing: 0.03em;
  }
  .stat-value {
    font-size: 1rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
  }
  .stat-value.fs-5,
  .stat-card .fs-5,
  .stat-card .fs-6,
  .stat-value .fs-6 {
    font-size: 0.9rem !important;
  }
  .stat-icon {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
    border-radius: 8px;
  }
  .kpi-card {
    padding: 0.45rem 0.55rem;
    border-radius: 8px;
  }
  .kpi-card:hover,
  a.kpi-card:hover,
  a.kpi-card:focus {
    transform: none;
  }
  .kpi-value {
    font-size: 1.05rem !important;
  }
  .kpi-label {
    font-size: 0.65rem;
  }
  .kpi-desc {
    font-size: 0.65rem;
  }
  .row.g-3 {
    --bs-gutter-x: 0.5rem;
    --bs-gutter-y: 0.5rem;
  }
}

/* Shop order status flow */
.fc-order-flow {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0 0;
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.fc-order-flow-step {
  position: relative;
  flex: 1 1 0;
  min-width: 5.5rem;
  text-align: center;
  padding: 0 0.35rem 0.15rem;
}
.fc-order-flow-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 1.05rem;
  left: calc(50% + 1.1rem);
  right: calc(-50% + 1.1rem);
  height: 3px;
  border-radius: 99px;
  background: #E2E8F0;
  z-index: 0;
}
.fc-order-flow-step.is-done:not(:last-child)::after,
.fc-order-flow-step.is-current:not(:last-child)::after {
  background: linear-gradient(90deg, var(--fc-primary), rgba(0, 175, 198, 0.35));
}
.fc-order-flow-dot {
  position: relative;
  z-index: 1;
  width: 2.15rem;
  height: 2.15rem;
  margin: 0 auto 0.45rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  background: #F1F5F9;
  color: #94A3B8;
  border: 2px solid #E2E8F0;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.fc-order-flow-step.is-done .fc-order-flow-dot {
  background: var(--fc-primary);
  border-color: var(--fc-primary);
  color: #fff;
}
.fc-order-flow-step.is-current .fc-order-flow-dot {
  background: #fff;
  border-color: var(--fc-primary);
  color: var(--fc-primary-deep);
  box-shadow: 0 0 0 4px rgba(0, 175, 198, 0.18);
  animation: fc-order-pulse 1.6s ease-in-out infinite;
}
.fc-order-flow-step.is-failed .fc-order-flow-dot {
  background: #FEE2E2;
  border-color: #F87171;
  color: #B91C1C;
}
.fc-order-flow-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.fc-order-flow-meta strong {
  font-size: 0.78rem;
  font-weight: 650;
  color: #64748B;
  line-height: 1.2;
}
.fc-order-flow-step.is-done .fc-order-flow-meta strong,
.fc-order-flow-step.is-current .fc-order-flow-meta strong {
  color: var(--fc-ink, #0F172A);
}
.fc-order-flow-meta span {
  font-size: 0.68rem;
  color: #94A3B8;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fc-order-flow--failed {
  justify-content: flex-start;
}
.fc-order-flow--failed .fc-order-flow-step {
  flex: 0 1 auto;
  text-align: left;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 0;
}
.fc-order-flow--failed .fc-order-flow-dot {
  margin: 0;
  flex-shrink: 0;
}
.fc-order-flow--failed .fc-order-flow-meta {
  text-align: left;
}
@keyframes fc-order-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(0, 175, 198, 0.16); }
  50% { box-shadow: 0 0 0 7px rgba(0, 175, 198, 0.08); }
}
@media (max-width: 576px) {
  .fc-order-flow-step {
    min-width: 4.75rem;
  }
  .fc-order-flow-meta strong {
    font-size: 0.7rem;
  }
  .fc-order-flow-meta span {
    font-size: 0.62rem;
  }
}

/* Shop order cover lines: compact table-like cards on mobile */
.fc-shop-lines .table-fc.table-sm > :not(caption) > * > * {
  padding: 0.45rem 0.55rem;
}
@media (max-width: 767.98px) {
  .fc-shop-lines.table-responsive,
  .fc-shop-lines.table-responsive-cards {
    padding: 0.35rem 0.45rem 0.5rem;
  }
  .fc-shop-lines .table-fc tr:not(.fc-shop-lines-empty) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "model qty"
      "code code";
    align-items: center;
    column-gap: 0.65rem;
    row-gap: 0.05rem;
    margin: 0 0 0.35rem;
    padding: 0.4rem 0.55rem;
    border: 1px solid var(--fc-border);
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
  }
  .fc-shop-lines .table-fc tr:not(.fc-shop-lines-empty):last-child {
    margin-bottom: 0;
  }
  .fc-shop-lines .table-fc tr:not(.fc-shop-lines-empty) td {
    display: block;
    width: auto;
    max-width: none;
    padding: 0;
    border: none;
    font-size: 0.8rem;
    line-height: 1.25;
  }
  .fc-shop-lines .table-fc tr:not(.fc-shop-lines-empty) td::before {
    display: none !important;
    content: none !important;
  }
  .fc-shop-lines .table-fc tr:not(.fc-shop-lines-empty) td > * {
    max-width: 100%;
    text-align: inherit;
  }
  .fc-shop-lines .fc-shop-line-model {
    grid-area: model;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--fc-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .fc-shop-lines .fc-shop-line-code {
    grid-area: code;
    font-size: 0.7rem;
    color: var(--fc-muted, #64748b);
  }
  .fc-shop-lines .fc-shop-line-code code {
    font-size: inherit;
    color: inherit;
    background: transparent;
    padding: 0;
  }
  .fc-shop-lines .fc-shop-line-qty {
    grid-area: qty;
    text-align: right !important;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--fc-accent, #00afc6);
    white-space: nowrap;
  }
  .fc-shop-lines .fc-shop-line-total {
    grid-area: line;
    text-align: right !important;
    font-size: 0.7rem;
    color: var(--fc-muted, #64748b);
    white-space: nowrap;
  }
  .fc-shop-lines .fc-shop-lines-empty,
  .fc-shop-lines .fc-shop-lines-empty td {
    display: block;
    width: 100%;
    border: none;
    box-shadow: none;
    padding: 0.75rem 0.5rem;
    text-align: center;
    font-size: 0.8rem;
  }
  .fc-shop-lines .fc-shop-lines-empty td::before {
    display: none !important;
  }
}

/* HR attendance employee searchable picker */
.fc-emp-picker {
  position: relative;
  max-width: 100%;
}
.fc-emp-picker-toggle {
  display: flex;
  align-items: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fc-emp-picker-panel {
  position: absolute;
  z-index: 30;
  top: calc(100% + 0.25rem);
  left: 0;
  right: 0;
  max-width: 100%;
  background: var(--bs-body-bg, #fff);
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1.25rem rgba(15, 23, 42, 0.12);
  overflow: hidden;
}
.fc-emp-picker-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--bs-border-color, #dee2e6);
}
.fc-emp-picker-search i {
  color: #6c757d;
  flex-shrink: 0;
}
.fc-emp-picker-search .form-control {
  border: 0;
  box-shadow: none;
  padding-left: 0;
}
.fc-emp-picker-list {
  max-height: min(18rem, 55vh);
  overflow-y: auto;
  overflow-x: hidden;
}
.fc-emp-picker-group {
  padding: 0.4rem 0.75rem 0.25rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #6c757d;
  background: rgba(15, 23, 42, 0.03);
  position: sticky;
  top: 0;
  z-index: 1;
}
.fc-emp-option {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 0.75rem;
  text-align: left;
  border: 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  background: transparent;
  padding: 0.55rem 0.75rem;
  cursor: pointer;
  max-width: 100%;
}
.fc-emp-option:hover,
.fc-emp-option.is-active,
.fc-emp-option.is-selected {
  background: rgba(0, 175, 198, 0.1);
}
.fc-emp-option.is-current .fc-emp-option-main strong {
  color: #0b7285;
}
.fc-emp-option-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
  min-width: 0;
}
.fc-emp-option-shift {
  font-size: 0.75rem;
  max-width: 100%;
}
.fc-emp-picker-empty {
  padding: 0.75rem;
  font-size: 0.875rem;
}
.fc-emp-option[hidden],
.fc-emp-picker-group[hidden] {
  display: none !important;
}

/* Model picker inside input-group (target form) */
.input-group > .fc-model-picker {
  position: relative;
  flex: 1 1 auto;
  width: 1%;
  min-width: 0;
}
.input-group > .fc-model-picker:not(:last-child) > .fc-emp-picker-toggle {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.fc-model-picker-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Design picker with thumbnail */
.fc-design-picker {
  width: 100%;
}
.fc-design-picker-selected {
  display: inline-flex;
  align-items: center;
  flex-direction: row;
  gap: 0.4rem;
  min-width: 0;
  max-width: 100%;
}
.fc-design-picker-thumb {
  width: auto;
  height: auto;
  max-width: 22px;
  max-height: 22px;
  object-fit: contain;
  object-position: center;
  flex-shrink: 0;
  background: #fff;
  border-radius: 0.25rem;
}
.fc-design-picker-selected > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.25;
}
.fc-design-opt {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.45rem;
  text-align: left;
  border: 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  background: transparent;
  padding: 0.35rem 0.65rem;
  min-height: 2rem;
  cursor: pointer;
  max-width: 100%;
}
.fc-design-opt:hover,
.fc-design-opt.is-active,
.fc-design-opt.is-selected {
  background: rgba(0, 175, 198, 0.1);
}
.fc-design-opt-thumb,
.fc-design-opt-ph {
  border-radius: 0.25rem;
  flex-shrink: 0;
  border: 1px solid var(--bs-border-color, #dee2e6);
  background: #fff;
}
.fc-design-opt-ph {
  width: 22px;
  height: 22px;
}
.fc-design-opt-thumb {
  width: auto;
  height: auto;
  max-width: 22px;
  max-height: 22px;
  object-fit: contain;
  object-position: center;
  cursor: zoom-in;
}
.fc-design-opt-ph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 0.7rem;
  background: #f8fafc;
}
.fc-design-opt-label {
  min-width: 0;
  flex: 1 1 auto;
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fc-design-picker .fc-emp-picker-panel {
  min-width: min(100%, 16rem);
}
.fc-design-picker .fc-emp-picker-toggle:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

/* ── Payroll board ─────────────────────────────────────────── */
.fc-payroll-page .fc-payroll-kpis .fc-pay-kpi {
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.fc-payroll-page .fc-payroll-kpis .fc-pay-kpi small {
  font-size: 0.65em;
  font-weight: 600;
  color: var(--fc-muted);
}
.fc-payroll-kpi-paid .stat-value { color: #0f766e; }
.fc-payroll-kpi-unpaid .stat-value { color: #b45309; }

.fc-payroll-panel {
  overflow: hidden;
}
.fc-payroll-period-pill {
  display: inline-flex;
  align-items: center;
  margin-left: 0.5rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: var(--fc-accent);
  background: var(--fc-accent-50);
  vertical-align: middle;
}
.fc-payroll-bulk {
  display: none;
}
.fc-payroll-markbar {
  width: 100%;
  max-width: 100%;
  padding: 0.65rem 0.85rem 0.15rem;
}
.fc-payroll-select-hint {
  color: var(--fc-muted);
}
.fc-payroll-markbar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #f0fdfa 0%, #f0f9ff 100%);
  border: 1px solid #99f6e4;
  box-shadow: 0 8px 24px rgba(15, 118, 110, 0.08);
}
.fc-payroll-markbar-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}
.fc-payroll-markbar-icon {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ccfbf1;
  color: #0f766e;
  flex-shrink: 0;
}
.fc-payroll-markbar-meta strong {
  display: block;
  font-size: 0.88rem;
  color: var(--fc-text);
  line-height: 1.2;
}
.fc-payroll-markbar-hint {
  font-size: 0.7rem;
  color: var(--fc-muted);
  margin-top: 0.1rem;
}
.fc-payroll-markbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.fc-payroll-mark-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-radius: 9px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  border: 1px solid transparent;
  box-shadow: none;
  min-height: 2rem;
}
.fc-payroll-mark-btn:hover,
.fc-payroll-mark-btn:focus {
  transform: none;
  box-shadow: none;
}
.fc-payroll-mark-btn.is-paid {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}
.fc-payroll-mark-btn.is-paid:hover,
.fc-payroll-mark-btn.is-paid:focus {
  background: #0d9488;
  border-color: #0d9488;
  color: #fff;
}
.fc-payroll-mark-btn.is-unpaid {
  background: #fff;
  border-color: #f59e0b;
  color: #92400e;
}
.fc-payroll-mark-btn.is-unpaid:hover,
.fc-payroll-mark-btn.is-unpaid:focus {
  background: #fffbeb;
  border-color: #d97706;
  color: #78350f;
}
.fc-payroll-mark-btn.is-select-all {
  background: #fff;
  border-color: #99f6e4;
  color: #0f766e;
}
.fc-payroll-mark-btn.is-select-all:hover,
.fc-payroll-mark-btn.is-select-all:focus {
  background: #f0fdfa;
  border-color: #2dd4bf;
  color: #115e59;
}
.fc-payroll-mark-btn.is-clear {
  width: 2rem;
  min-width: 2rem;
  padding: 0;
  justify-content: center;
  background: #fff;
  border-color: #cbd5e1;
  color: #64748b;
}
.fc-payroll-mark-btn.is-clear:hover,
.fc-payroll-mark-btn.is-clear:focus {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}
body.fc-payroll-marking .fc-payroll-panel {
  outline: 1px solid color-mix(in srgb, #14b8a6 35%, transparent);
}

.fc-payroll-rowno-col {
  width: 1.6rem;
  min-width: 1.6rem;
  max-width: 2rem;
  padding-left: 0.25rem !important;
  padding-right: 0.15rem !important;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-size: 0.72rem;
  color: var(--fc-muted);
  white-space: nowrap;
}
.fc-payroll-pager {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.fc-payroll-pager-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
}
.fc-payroll-pager-btns {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.fc-payroll-pager-btns .btn.disabled {
  pointer-events: none;
  opacity: 0.55;
}
.fc-payroll-pager-meta {
  white-space: nowrap;
}
.fc-payroll-table-wrap {
  border-top: 1px solid var(--fc-border);
}
.fc-payroll-table {
  --fc-pay-row-pad-y: 0.45rem;
  --fc-pay-row-pad-x: 0.4rem;
  table-layout: fixed;
  width: 100%;
}
.fc-payroll-table thead th {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  color: #64748b;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.5rem var(--fc-pay-row-pad-x);
  position: sticky;
  top: 0;
  z-index: 2;
  white-space: nowrap;
}
.fc-payroll-table td {
  padding: var(--fc-pay-row-pad-y) var(--fc-pay-row-pad-x);
  color: var(--fc-text-secondary);
  vertical-align: middle;
}
.fc-payroll-table tbody tr.fc-payroll-row {
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
  border-left: 3px solid transparent;
}
.fc-payroll-table tbody tr.fc-payroll-row.is-paid {
  border-left-color: #14b8a6;
  background: #f0fdfa !important;
}
.fc-payroll-table tbody tr.fc-payroll-row.is-unpaid {
  border-left-color: #f59e0b;
  background: #fffbeb !important;
}
.fc-payroll-table tbody tr.fc-payroll-row.is-paid:hover {
  background: #ccfbf1 !important;
}
.fc-payroll-table tbody tr.fc-payroll-row.is-unpaid:hover {
  background: #fef3c7 !important;
}
.fc-payroll-table tbody tr.fc-payroll-row.is-selected {
  background: color-mix(in srgb, var(--fc-accent, #0284C7) 12%, #fff) !important;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fc-accent, #0284C7) 22%, transparent);
}
.fc-payroll-table tbody tr.fc-payroll-row.is-paid.is-selected {
  background: color-mix(in srgb, #14b8a6 14%, #f0fdfa) !important;
}
.fc-payroll-table tbody tr.fc-payroll-row.is-unpaid.is-selected {
  background: color-mix(in srgb, #f59e0b 14%, #fffbeb) !important;
}
.fc-payroll-check-col {
  width: 1.5rem;
  min-width: 1.5rem;
  max-width: 1.75rem;
  padding-left: 0.15rem !important;
  padding-right: 0.15rem !important;
  text-align: center;
  vertical-align: middle !important;
}
.fc-payroll-check-col .form-check-input {
  width: 0.9rem;
  height: 0.9rem;
  margin: 0;
  vertical-align: middle;
}
.fc-payroll-emp-col {
  width: 20%;
}
.fc-payroll-leave-col {
  width: 5rem;
}
.fc-payroll-status-col {
  width: 6rem;
}
.fc-payroll-date-col {
  width: 8rem;
  white-space: nowrap;
}
.fc-payroll-action-col {
  width: 7.5rem;
  white-space: nowrap;
}

.fc-payroll-emp {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  min-width: 0;
  max-width: 100%;
}
.fc-payroll-avatar {
  flex: 0 0 auto;
  width: 1.7rem;
  height: 1.7rem;
  margin-top: 0.1rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #0e7490;
  background: linear-gradient(145deg, #e0f7fa 0%, #cffafe 100%);
  border: 1px solid #a5f3fc;
}
.fc-payroll-emp-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12rem;
  min-width: 0;
}
.fc-payroll-name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.28rem 0.4rem;
  min-width: 0;
  max-width: 100%;
}
.fc-payroll-emp-meta strong,
.fc-payroll-name-row strong {
  color: var(--fc-text);
  font-weight: 650;
  font-size: 0.82rem;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.fc-payroll-name-row .fc-payroll-dept {
  flex: 0 1 auto;
  min-width: 0;
}
.fc-payroll-code {
  font-size: 0.66rem;
  color: var(--fc-muted);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.fc-payroll-dept {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.08rem 0.4rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid transparent;
}
.fc-payroll-dept.is-empty {
  color: var(--fc-muted);
  background: #f8fafc;
  border-color: #e2e8f0;
  font-weight: 550;
}
.fc-payroll-dept.is-tone-0 { color: #0f766e; background: #ccfbf1; border-color: #99f6e4; }
.fc-payroll-dept.is-tone-1 { color: #0369a1; background: #e0f2fe; border-color: #bae6fd; }
.fc-payroll-dept.is-tone-2 { color: #b45309; background: #ffedd5; border-color: #fed7aa; }
.fc-payroll-dept.is-tone-3 { color: #be123c; background: #ffe4e6; border-color: #fecdd3; }
.fc-payroll-dept.is-tone-4 { color: #047857; background: #d1fae5; border-color: #a7f3d0; }
.fc-payroll-dept.is-tone-5 { color: #1d4ed8; background: #dbeafe; border-color: #bfdbfe; }
.fc-payroll-dept.is-tone-6 { color: #a16207; background: #fef9c3; border-color: #fde68a; }
.fc-payroll-dept.is-tone-7 { color: #334155; background: #e2e8f0; border-color: #cbd5e1; }

/* Same shop order → shared row tint (targets + entries) */
.table-fc tbody tr.fc-entry-row[class*="is-shop-tone-"],
.table-fc tbody tr.fc-target-row[class*="is-shop-tone-"],
.fc-row-link.fc-entry-row[class*="is-shop-tone-"],
.fc-row-link.fc-target-row[class*="is-shop-tone-"] {
  background-clip: padding-box;
}
.table-fc tbody tr.fc-entry-row.is-shop-tone-0,
.table-fc tbody tr.fc-target-row.is-shop-tone-0 { background-color: #ecfdf8 !important; box-shadow: inset 4px 0 0 #14b8a6; }
.table-fc tbody tr.fc-entry-row.is-shop-tone-1,
.table-fc tbody tr.fc-target-row.is-shop-tone-1 { background-color: #eff8ff !important; box-shadow: inset 4px 0 0 #0ea5e9; }
.table-fc tbody tr.fc-entry-row.is-shop-tone-2,
.table-fc tbody tr.fc-target-row.is-shop-tone-2 { background-color: #fff7ed !important; box-shadow: inset 4px 0 0 #f97316; }
.table-fc tbody tr.fc-entry-row.is-shop-tone-3,
.table-fc tbody tr.fc-target-row.is-shop-tone-3 { background-color: #fff1f2 !important; box-shadow: inset 4px 0 0 #f43f5e; }
.table-fc tbody tr.fc-entry-row.is-shop-tone-4,
.table-fc tbody tr.fc-target-row.is-shop-tone-4 { background-color: #ecfdf5 !important; box-shadow: inset 4px 0 0 #10b981; }
.table-fc tbody tr.fc-entry-row.is-shop-tone-5,
.table-fc tbody tr.fc-target-row.is-shop-tone-5 { background-color: #eff6ff !important; box-shadow: inset 4px 0 0 #3b82f6; }
.table-fc tbody tr.fc-entry-row.is-shop-tone-6,
.table-fc tbody tr.fc-target-row.is-shop-tone-6 { background-color: #fefce8 !important; box-shadow: inset 4px 0 0 #eab308; }
.table-fc tbody tr.fc-entry-row.is-shop-tone-7,
.table-fc tbody tr.fc-target-row.is-shop-tone-7 { background-color: #f1f5f9 !important; box-shadow: inset 4px 0 0 #64748b; }

.table-fc tbody tr.fc-entry-row[class*="is-shop-tone-"] > td,
.table-fc tbody tr.fc-target-row[class*="is-shop-tone-"] > td,
.table-fc tbody tr.fc-entry-row[class*="is-shop-tone-"]:hover > td,
.table-fc tbody tr.fc-target-row[class*="is-shop-tone-"]:hover > td,
.fc-row-link.fc-entry-row[class*="is-shop-tone-"]:hover > td,
.fc-row-link.fc-target-row[class*="is-shop-tone-"]:hover > td,
.fc-row-link.fc-entry-row[class*="is-shop-tone-"]:focus-visible > td,
.fc-row-link.fc-target-row[class*="is-shop-tone-"]:focus-visible > td {
  background-color: transparent !important;
}
.table-fc tbody tr.fc-entry-row[class*="is-shop-tone-"]:hover,
.table-fc tbody tr.fc-target-row[class*="is-shop-tone-"]:hover,
.fc-row-link.fc-entry-row[class*="is-shop-tone-"]:hover,
.fc-row-link.fc-target-row[class*="is-shop-tone-"]:hover,
.fc-row-link.fc-entry-row[class*="is-shop-tone-"]:focus-visible,
.fc-row-link.fc-target-row[class*="is-shop-tone-"]:focus-visible {
  filter: brightness(0.985);
}
.table-fc tbody tr.fc-entry-row.is-cancelled[class*="is-shop-tone-"],
.table-fc tbody tr.fc-target-row.is-cancelled[class*="is-shop-tone-"] {
  box-shadow: inset 4px 0 0 #94a3b8;
  background-color: #f8fafc;
  opacity: 0.92;
}

@media (max-width: 767.98px) {
  .table-responsive-cards .table-fc tr.fc-entry-row[class*="is-shop-tone-"],
  .table-responsive-cards .table-fc tr.fc-target-row[class*="is-shop-tone-"] {
    border-left-width: 4px;
    border-left-style: solid;
  }
  .table-responsive-cards .table-fc tr.fc-entry-row.is-shop-tone-0,
  .table-responsive-cards .table-fc tr.fc-target-row.is-shop-tone-0 { border-left-color: #14b8a6; background-color: #ecfdf8 !important; }
  .table-responsive-cards .table-fc tr.fc-entry-row.is-shop-tone-1,
  .table-responsive-cards .table-fc tr.fc-target-row.is-shop-tone-1 { border-left-color: #0ea5e9; background-color: #eff8ff !important; }
  .table-responsive-cards .table-fc tr.fc-entry-row.is-shop-tone-2,
  .table-responsive-cards .table-fc tr.fc-target-row.is-shop-tone-2 { border-left-color: #f97316; background-color: #fff7ed !important; }
  .table-responsive-cards .table-fc tr.fc-entry-row.is-shop-tone-3,
  .table-responsive-cards .table-fc tr.fc-target-row.is-shop-tone-3 { border-left-color: #f43f5e; background-color: #fff1f2 !important; }
  .table-responsive-cards .table-fc tr.fc-entry-row.is-shop-tone-4,
  .table-responsive-cards .table-fc tr.fc-target-row.is-shop-tone-4 { border-left-color: #10b981; background-color: #ecfdf5 !important; }
  .table-responsive-cards .table-fc tr.fc-entry-row.is-shop-tone-5,
  .table-responsive-cards .table-fc tr.fc-target-row.is-shop-tone-5 { border-left-color: #3b82f6; background-color: #eff6ff !important; }
  .table-responsive-cards .table-fc tr.fc-entry-row.is-shop-tone-6,
  .table-responsive-cards .table-fc tr.fc-target-row.is-shop-tone-6 { border-left-color: #eab308; background-color: #fefce8 !important; }
  .table-responsive-cards .table-fc tr.fc-entry-row.is-shop-tone-7,
  .table-responsive-cards .table-fc tr.fc-target-row.is-shop-tone-7 { border-left-color: #64748b; background-color: #f1f5f9 !important; }
}

.fc-emp-fold-name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 0.4rem;
  min-width: 0;
  max-width: 100%;
}
.fc-emp-fold-name-row .fc-emp-fold-name {
  min-width: 0;
}
.fc-emp-fold-name-row .fc-payroll-dept {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
}

.fc-pay-money {
  display: inline-flex;
  align-items: baseline;
  gap: 0.15rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.fc-pay-money .fc-pay-amt {
  font-weight: 650;
  font-size: 0.78rem;
  color: var(--fc-text);
}
.fc-pay-money .fc-pay-cur {
  font-size: 0.55rem;
  font-weight: 600;
  color: var(--fc-muted);
  letter-spacing: 0.02em;
}
.fc-pay-money.is-muted .fc-pay-amt {
  font-weight: 550;
  color: var(--fc-text-secondary);
}
.fc-pay-money.is-total .fc-pay-amt {
  font-size: 0.84rem;
  font-weight: 750;
  color: var(--fc-text);
}
.fc-payroll-num {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--fc-text-secondary);
}
.fc-payroll-subnum {
  font-size: 0.62rem;
  color: var(--fc-muted);
  font-variant-numeric: tabular-nums;
  margin-top: 0.08rem;
}

.fc-payroll-status {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12rem;
}
.fc-payroll-pay-method {
  font-size: 0.68rem;
  font-weight: 650;
  line-height: 1.2;
  color: var(--fc-muted, #64748B);
  max-width: 9rem;
  word-break: break-word;
}
.fc-pay-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  padding: 0.16rem 0.42rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
}
.fc-pay-status-pill.is-paid {
  color: #0f766e;
  background: #ccfbf1;
  border: 1px solid #99f6e4;
}
.fc-pay-status-pill.is-unpaid {
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fde68a;
}
.fc-payroll-paid-at {
  font-size: 0.58rem;
  color: var(--fc-muted);
  line-height: 1.2;
  max-width: 6.2rem;
  white-space: normal;
}
.fc-payroll-date {
  display: block;
  font-size: 0.74rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--fc-text);
  line-height: 1.25;
  white-space: normal;
}

.fc-payroll-row-action {
  margin: 0;
  display: inline-flex;
}
.fc-payroll-row-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.22rem 0.5rem;
  border-radius: 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  border: 1px solid transparent;
}
.fc-payroll-row-btn i {
  font-size: 0.8rem;
}
.fc-payroll-row-btn.is-paid {
  color: #0f766e;
  background: #f0fdfa;
  border-color: #99f6e4;
}
.fc-payroll-row-btn.is-paid:hover,
.fc-payroll-row-btn.is-paid:focus {
  color: #fff;
  background: #0d9488;
  border-color: #0d9488;
}
.fc-payroll-row-btn.is-unpaid {
  color: #92400e;
  background: #fffbeb;
  border-color: #fde68a;
}
.fc-payroll-row-btn.is-unpaid:hover,
.fc-payroll-row-btn.is-unpaid:focus {
  color: #fff;
  background: #d97706;
  border-color: #d97706;
}

.fc-payroll-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  padding: 1rem 1.15rem;
  border-top: 1px solid var(--fc-border);
  background: #f8fafc;
}
.fc-payroll-summary-main {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 10rem;
}
.fc-payroll-summary-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}
.fc-payroll-summary-grand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  line-height: 1.1;
}
.fc-payroll-summary-grand .fc-pay-amt {
  font-size: 1.35rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
  letter-spacing: -0.02em;
}
.fc-payroll-summary-grand .fc-pay-cur {
  font-size: 0.72rem;
  font-weight: 650;
  color: #64748b;
}
.fc-payroll-summary-pay {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: #64748b;
}
.fc-payroll-summary-pay strong {
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}
.fc-payroll-summary-pay .is-paid {
  color: #0f766e;
}
.fc-payroll-summary-pay .is-unpaid {
  color: #b45309;
}
.fc-payroll-summary-pay .is-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #cbd5e1;
}
.fc-payroll-summary-metrics {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.55rem;
}
.fc-payroll-summary-metric {
  min-width: 6.5rem;
  padding: 0.45rem 0.7rem;
  border-radius: 0.65rem;
  background: #fff;
  border: 1px solid #e2e8f0;
}
.fc-payroll-summary-k {
  display: block;
  font-size: 0.62rem;
  font-weight: 650;
  color: #94a3b8;
  letter-spacing: 0.02em;
  margin-bottom: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 8.5rem;
}
.fc-payroll-summary-v {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #334155;
  line-height: 1.2;
}
.fc-payroll-summary-v small {
  display: inline;
  margin-left: 0.25rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: #94a3b8;
}

.fc-payroll-empty {
  text-align: center !important;
  padding: 2.75rem 1rem !important;
  color: var(--fc-muted);
}
.fc-payroll-empty i {
  display: block;
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  opacity: 0.55;
  color: var(--fc-primary);
}

body.fc-payroll-ot-off .fc-payroll-ot-col {
  opacity: 0.42;
}
body.fc-payroll-ot-off .fc-payroll-ot-col .fc-pay-amt,
body.fc-payroll-ot-off .fc-payroll-ot-col .fc-payroll-num {
  text-decoration: line-through;
}
body.fc-payroll-reward-off .fc-payroll-reward-col {
  opacity: 0.42;
}
body.fc-payroll-reward-off .fc-payroll-reward-col .fc-pay-amt,
body.fc-payroll-reward-off .fc-payroll-reward-col .fc-payroll-num,
body.fc-payroll-reward-off .fc-payroll-reward-col .fc-payroll-summary-v {
  text-decoration: line-through;
}

/* ── Attendance queue board ────────────────────────────────── */
.fc-queue-table tbody tr.fc-queue-row {
  border-left: 3px solid transparent;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.fc-queue-table tbody tr.fc-queue-row.is-need_in {
  border-left-color: #d97706;
  background: #fffbeb !important;
}
.fc-queue-table tbody tr.fc-queue-row.is-need_in:hover {
  background: #fef3c7 !important;
}
.fc-queue-table tbody tr.fc-queue-row.is-need_out {
  border-left-color: var(--fc-accent, #0284C7);
  background: #f0f9ff !important;
}
.fc-queue-table tbody tr.fc-queue-row.is-need_out:hover {
  background: #e0f2fe !important;
}
.fc-queue-table tbody tr.fc-queue-row.is-done {
  border-left-color: #0f766e;
  background: #f0fdfa !important;
}
.fc-queue-table tbody tr.fc-queue-row.is-done:hover {
  background: #ccfbf1 !important;
}
.fc-queue-table tbody tr.fc-queue-row.is-current-shift {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #06b6d4 28%, transparent);
}
.fc-queue-table tbody tr.fc-queue-row.is-current-shift.is-need_in {
  border-left-color: #0891b2;
  background: linear-gradient(90deg, #ecfeff 0%, #fffbeb 42%) !important;
}
.fc-queue-table tbody tr.fc-queue-row.is-current-shift.is-need_in:hover {
  background: linear-gradient(90deg, #cffafe 0%, #fef3c7 42%) !important;
}
.fc-queue-table tbody tr.fc-queue-row.is-current-shift.is-need_out {
  border-left-color: #0284c7;
  background: linear-gradient(90deg, #ecfeff 0%, #f0f9ff 42%) !important;
}
.fc-queue-table tbody tr.fc-queue-row.is-current-shift.is-need_out:hover {
  background: linear-gradient(90deg, #cffafe 0%, #e0f2fe 42%) !important;
}
.fc-queue-table tbody tr.fc-queue-row.is-current-shift.is-done {
  border-left-color: #0e7490;
  background: linear-gradient(90deg, #ecfeff 0%, #f0fdfa 42%) !important;
}
.fc-queue-table tbody tr.fc-queue-row.is-current-shift.is-done:hover {
  background: linear-gradient(90deg, #cffafe 0%, #ccfbf1 42%) !important;
}
.fc-queue-group-row td {
  background: #f1f5f9 !important;
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
  border-bottom: 1px solid var(--fc-border, #e8eef3) !important;
}
.fc-queue-actions {
  white-space: nowrap;
}
.fc-queue-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  padding: 0.22rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  border-radius: 7px;
  border: 1px solid transparent;
  box-shadow: none;
  min-height: 1.7rem;
  white-space: nowrap;
}
.fc-queue-btn i {
  font-size: 0.78rem;
  line-height: 1;
}
.fc-queue-btn:hover,
.fc-queue-btn:focus {
  transform: none;
  box-shadow: none;
}
.fc-queue-btn-in {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}
.fc-queue-btn-in:hover,
.fc-queue-btn-in:focus {
  background: #0d9488;
  border-color: #0d9488;
  color: #fff;
}
.fc-queue-btn-out {
  background: var(--fc-accent, #0284C7);
  border-color: var(--fc-accent, #0284C7);
  color: #fff;
}
.fc-queue-btn-out:hover,
.fc-queue-btn-out:focus {
  background: var(--fc-accent-hover, #0369A1);
  border-color: var(--fc-accent-hover, #0369A1);
  color: #fff;
}
.fc-queue-btn-edit {
  background: #fff;
  border-color: #cbd5e1;
  color: #475569;
}
.fc-queue-btn-edit:hover,
.fc-queue-btn-edit:focus {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}
.fc-queue-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
}
.fc-queue-pill.is-waiting {
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fde68a;
}
.fc-queue-active-now {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.35rem;
  max-width: 100%;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #0e7490;
  background: #ecfeff;
  border: 1px solid #a5f3fc;
  line-height: 1.3;
}
.fc-queue-active-now strong {
  font-weight: 750;
  color: #0f766e;
}
.fc-queue-active-now .text-muted {
  color: #64748b !important;
  font-weight: 550;
}

.fc-queue-pill.is-done {
  color: #0f766e;
  background: #ccfbf1;
  border: 1px solid #99f6e4;
}
.fc-queue-shift.is-current {
  background: color-mix(in srgb, var(--fc-primary, #00AFC6) 10%, #fff);
}
.fc-queue-shift-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  font-weight: 650;
  color: var(--fc-text-secondary);
}
.fc-queue-shift-pill.is-current {
  color: #0e7490;
  font-weight: 750;
}
.fc-queue-shift-now {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #0f766e;
  background: #ccfbf1;
  border: 1px solid #99f6e4;
}

@media (max-width: 767.98px) {
  .fc-queue-group-row td {
    display: block;
    width: 100%;
  }
  .fc-queue-table tbody tr.fc-queue-row {
    border-radius: 12px;
    border-left-width: 4px;
  }
  .fc-queue-table tbody tr.fc-queue-row.is-current-shift {
    box-shadow: 0 0 0 1px color-mix(in srgb, #06b6d4 32%, transparent), var(--fc-shadow);
  }
  .fc-queue-shift.is-current {
    background: transparent;
  }
  .fc-queue-btn {
    width: 100%;
  }
}

.fc-payroll-fold-btn {
  display: none;
}

.fc-emp-fold-btn {
  display: none;
}

@media (max-width: 767.98px) {
  .fc-emp-fold-btn {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 1.45rem;
    height: 1.45rem;
    margin-left: auto;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #64748b;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-user-select: none !important;
    user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
  }
  .fc-emp-fold-btn i {
    font-size: 0.7rem;
    pointer-events: none;
    transition: none !important;
  }
  [data-fc-emp-fold].is-open .fc-emp-fold-btn i {
    transform: rotate(180deg);
  }
  /* Instant fold: no transitions / animations on these cards. */
  [data-fc-emp-fold],
  [data-fc-emp-fold] *,
  [data-fc-payroll-fold],
  [data-fc-payroll-fold] * {
    transition: none !important;
    animation: none !important;
  }
  [data-fc-emp-fold] {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "emp emp"
      "status meta";
    gap: 0.2rem 0.45rem;
    align-items: center;
    padding: 0.5rem 0.6rem;
    touch-action: manipulation;
    -webkit-user-select: none !important;
    user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none !important;
  }
  [data-fc-emp-fold] > td.fc-emp-fold-head {
    display: block !important;
    width: auto !important;
    max-width: none !important;
    padding: 0 !important;
    border: none !important;
    border-bottom: none !important;
  }
  [data-fc-emp-fold] > td.fc-emp-fold-head::before {
    display: none !important;
  }
  [data-fc-emp-fold] > td.fc-emp-fold-head > * {
    width: auto !important;
    max-width: 100%;
  }
  [data-fc-emp-fold] > .fc-emp-fold-emp {
    grid-area: emp;
  }
  [data-fc-emp-fold] > .fc-emp-fold-status {
    grid-area: status;
  }
  [data-fc-emp-fold] > .fc-emp-fold-meta {
    grid-area: meta;
    justify-self: end;
    text-align: right !important;
  }
  [data-fc-emp-fold] > td.fc-emp-fold-detail {
    display: none !important;
  }
  [data-fc-emp-fold].is-open > td.fc-emp-fold-detail {
    display: flex !important;
    grid-column: 1 / -1;
    width: 100% !important;
    max-width: 100% !important;
  }
  [data-fc-emp-fold] .fc-emp-fold-main {
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    min-width: 0;
  }
  [data-fc-emp-fold] .fc-emp-fold-text {
    min-width: 0;
    flex: 1 1 auto;
  }
  [data-fc-emp-fold] .fc-emp-fold-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 0.35rem;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  [data-fc-emp-fold] .fc-emp-fold-name {
    display: block;
    font-size: 0.74rem;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1 1 auto;
    text-align: left;
  }
  [data-fc-emp-fold] .fc-emp-fold-name-row .fc-payroll-dept {
    flex: 0 0 auto;
    margin-left: auto;
    max-width: 48%;
    font-size: 0.55rem;
    padding: 0.04rem 0.3rem;
    text-align: right;
  }
  [data-fc-emp-fold] .fc-emp-fold-sub {
    display: none;
    font-size: 0.58rem;
  }
  [data-fc-emp-fold].is-open .fc-emp-fold-sub {
    display: block;
  }
  [data-fc-emp-fold] .fc-emp-fold-meta-text {
    font-size: 0.66rem;
    font-weight: 600;
    color: var(--fc-text-secondary);
    white-space: nowrap;
  }
  [data-fc-emp-fold] .fc-emp-fold-meta-sub {
    display: none;
    font-size: 0.56rem;
    color: var(--fc-muted);
  }
  [data-fc-emp-fold].is-open .fc-emp-fold-meta-sub {
    display: block;
  }
  [data-fc-emp-fold] .fc-emp-fold-pill,
  [data-fc-emp-fold] .fc-pay-status-pill,
  [data-fc-emp-fold] .fc-queue-pill,
  [data-fc-emp-fold] .badge-status {
    transform-origin: left center;
    scale: 0.92;
  }
  [data-fc-emp-fold] td,
  [data-fc-emp-fold] td *,
  [data-fc-payroll-fold] td,
  [data-fc-payroll-fold] td * {
    -webkit-user-select: none !important;
    user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none !important;
  }
  [data-fc-emp-fold]:hover,
  [data-fc-emp-fold]:focus,
  [data-fc-emp-fold]:focus-visible,
  [data-fc-emp-fold]:active,
  [data-fc-emp-fold].is-open,
  [data-fc-emp-fold].is-open:hover,
  [data-fc-emp-fold].is-open:active,
  [data-fc-payroll-fold]:hover,
  [data-fc-payroll-fold]:focus,
  [data-fc-payroll-fold]:focus-visible,
  [data-fc-payroll-fold]:active,
  [data-fc-payroll-fold].is-open,
  [data-fc-payroll-fold].is-open:hover,
  [data-fc-payroll-fold].is-open:active {
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
  }
  [data-fc-emp-fold]:hover > td,
  [data-fc-emp-fold]:focus > td,
  [data-fc-emp-fold]:focus-visible > td,
  [data-fc-emp-fold]:active > td,
  [data-fc-emp-fold].is-open > td,
  [data-fc-payroll-fold]:hover > td,
  [data-fc-payroll-fold]:focus > td,
  [data-fc-payroll-fold]:focus-visible > td,
  [data-fc-payroll-fold]:active > td,
  [data-fc-payroll-fold].is-open > td {
    background: transparent !important;
    background-color: transparent !important;
    outline: none !important;
    box-shadow: none !important;
  }
  [data-fc-emp-fold]::selection,
  [data-fc-emp-fold] *::selection,
  [data-fc-payroll-fold]::selection,
  [data-fc-payroll-fold] *::selection,
  [data-fc-emp-fold]::-moz-selection,
  [data-fc-emp-fold] *::-moz-selection,
  [data-fc-payroll-fold]::-moz-selection,
  [data-fc-payroll-fold] *::-moz-selection {
    background: transparent !important;
    color: inherit !important;
  }
  .fc-payroll-table tbody tr.fc-payroll-row {
    border-left-width: 4px;
    border-radius: 12px;
    -webkit-user-select: none !important;
    user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none !important;
    outline: none !important;
    touch-action: manipulation;
    /* Color code only on the left edge, not the full card. */
    background: #fff !important;
  }
  .fc-payroll-table tbody tr.fc-payroll-row.is-paid,
  .fc-payroll-table tbody tr.fc-payroll-row.is-unpaid,
  .fc-payroll-table tbody tr.fc-payroll-row.is-paid:hover,
  .fc-payroll-table tbody tr.fc-payroll-row.is-unpaid:hover,
  .fc-payroll-table tbody tr.fc-payroll-row.is-paid:active,
  .fc-payroll-table tbody tr.fc-payroll-row.is-unpaid:active,
  .fc-payroll-table tbody tr.fc-payroll-row.is-paid.is-selected,
  .fc-payroll-table tbody tr.fc-payroll-row.is-unpaid.is-selected {
    background: #fff !important;
  }
  .fc-payroll-table tbody tr.fc-payroll-row.is-paid {
    border-left: 4px solid #14b8a6 !important;
  }
  .fc-payroll-table tbody tr.fc-payroll-row.is-unpaid {
    border-left: 4px solid #f59e0b !important;
  }
  .fc-payroll-table tbody tr.fc-payroll-row.is-selected {
    box-shadow:
      0 6px 16px rgba(15, 23, 42, 0.1),
      0 2px 6px rgba(15, 23, 42, 0.06),
      inset 0 0 0 1px color-mix(in srgb, var(--fc-accent, #0284C7) 22%, transparent);
  }
  .fc-payroll-table tbody tr.fc-payroll-row *,
  .fc-payroll-table tbody tr.fc-payroll-row *::before,
  .fc-payroll-table tbody tr.fc-payroll-row *::after {
    -webkit-user-select: none !important;
    user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none !important;
  }
  .fc-payroll-table tbody tr.fc-payroll-row:focus,
  .fc-payroll-table tbody tr.fc-payroll-row:focus-visible,
  .fc-payroll-table tbody tr.fc-payroll-row:active,
  .fc-payroll-table tbody tr.fc-payroll-row *:focus,
  .fc-payroll-table tbody tr.fc-payroll-row *:focus-visible,
  .fc-payroll-table tbody tr.fc-payroll-row *:active {
    outline: none !important;
    box-shadow: none !important;
  }
  .fc-payroll-table tbody tr.fc-payroll-row .fc-payroll-emp-meta strong,
  .fc-payroll-table tbody tr.fc-payroll-row .fc-payroll-emp-meta strong:active,
  .fc-payroll-table tbody tr.fc-payroll-row .fc-payroll-emp-meta strong:focus,
  .fc-payroll-table tbody tr.fc-payroll-row .fc-payroll-code,
  .fc-payroll-table tbody tr.fc-payroll-row .fc-payroll-code:active,
  .fc-payroll-table tbody tr.fc-payroll-row .fc-pay-amt,
  .fc-payroll-table tbody tr.fc-payroll-row .fc-pay-amt:active,
  .fc-payroll-table tbody tr.fc-payroll-row .fc-payroll-date,
  .fc-payroll-table tbody tr.fc-payroll-row .fc-payroll-num {
    -webkit-user-select: none !important;
    user-select: none !important;
    background: transparent !important;
  }
  .fc-payroll-table tbody tr.fc-payroll-row .fc-payroll-emp-meta strong:active,
  .fc-payroll-table tbody tr.fc-payroll-row .fc-payroll-emp-meta strong:focus {
    color: var(--fc-text) !important;
  }
  .fc-payroll-table tbody tr.fc-payroll-row::selection,
  .fc-payroll-table tbody tr.fc-payroll-row *::selection,
  .fc-payroll-table tbody tr.fc-payroll-row::-moz-selection,
  .fc-payroll-table tbody tr.fc-payroll-row *::-moz-selection {
    background: transparent !important;
    color: inherit !important;
  }
  .fc-payroll-table td.text-end {
    text-align: left !important;
  }
  .fc-payroll-emp {
    max-width: none;
    width: 100%;
  }
  .fc-payroll-fold-btn {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    margin-left: auto;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #64748b;
    align-self: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent !important;
    touch-action: manipulation;
    position: relative;
    z-index: 2;
  }
  .fc-payroll-fold-btn:focus,
  .fc-payroll-fold-btn:focus-visible,
  .fc-payroll-fold-btn:active {
    outline: none !important;
    box-shadow: none !important;
    background: #f8fafc;
    color: #475569;
  }
  .fc-payroll-fold-btn i {
    font-size: 0.9rem;
    pointer-events: none;
    transition: none;
  }
  .fc-payroll-row.is-open .fc-payroll-fold-btn i {
    transform: rotate(180deg);
  }

  /* Keep a stable summary bar; only details expand. */
  .fc-payroll-table tbody tr.fc-payroll-row[data-fc-payroll-fold] {
    display: grid !important;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    grid-template-areas:
      "rowno check emp emp"
      "rowno check status salary";
    gap: 0.2rem 0.4rem;
    align-items: center;
    padding: 0.5rem 0.6rem;
  }
  .fc-payroll-table tbody tr.fc-payroll-row[data-fc-payroll-fold]:not(:has(.fc-payroll-check-col)) {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "rowno emp emp"
      "rowno status salary";
  }
  .fc-payroll-table tbody tr.fc-payroll-row[data-fc-payroll-fold] > td.fc-payroll-fold-head {
    display: block !important;
    width: auto !important;
    max-width: none !important;
    padding: 0 !important;
    border: none !important;
    border-bottom: none !important;
  }
  .fc-payroll-table tbody tr.fc-payroll-row[data-fc-payroll-fold] > td.fc-payroll-fold-head::before {
    display: none !important;
  }
  .fc-payroll-table tbody tr.fc-payroll-row[data-fc-payroll-fold] > td.fc-payroll-fold-head > * {
    width: auto !important;
    max-width: 100%;
    justify-content: flex-start !important;
  }
  .fc-payroll-table tbody tr.fc-payroll-row[data-fc-payroll-fold] > .fc-payroll-rowno-col {
    grid-area: rowno;
    align-self: center;
    min-width: 1.15rem;
    width: auto;
    max-width: 1.6rem;
    padding: 0 !important;
    font-weight: 600;
    font-size: 0.7rem;
  }
  .fc-payroll-table tbody tr.fc-payroll-row[data-fc-payroll-fold] > .fc-payroll-check-col {
    grid-area: check;
    align-self: center;
    padding: 0 !important;
    min-width: 1.1rem;
    width: auto;
  }
  .fc-payroll-table tbody tr.fc-payroll-row[data-fc-payroll-fold] > .fc-payroll-check-col .form-check-input {
    width: 0.85rem;
    height: 0.85rem;
    margin: 0;
  }
  .fc-payroll-table tbody tr.fc-payroll-row[data-fc-payroll-fold] > .fc-payroll-emp-col {
    grid-area: emp;
  }
  .fc-payroll-table tbody tr.fc-payroll-row[data-fc-payroll-fold] > .fc-payroll-status-col {
    grid-area: status;
  }
  .fc-payroll-table tbody tr.fc-payroll-row[data-fc-payroll-fold] > .fc-payroll-salary-col {
    grid-area: salary;
    justify-self: end;
    text-align: right !important;
  }
  .fc-payroll-table tbody tr.fc-payroll-row[data-fc-payroll-fold] .fc-payroll-emp {
    gap: 0.3rem;
  }
  .fc-payroll-table tbody tr.fc-payroll-row[data-fc-payroll-fold] .fc-payroll-avatar {
    width: 1.35rem;
    height: 1.35rem;
    margin-top: 0;
    border-radius: 6px;
    font-size: 0.52rem;
  }
  .fc-payroll-table tbody tr.fc-payroll-row[data-fc-payroll-fold] .fc-payroll-emp-meta {
    gap: 0.05rem;
    flex: 1 1 auto;
    min-width: 0;
  }
  .fc-payroll-table tbody tr.fc-payroll-row[data-fc-payroll-fold] .fc-payroll-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    flex-wrap: nowrap;
    width: 100%;
  }
  .fc-payroll-table tbody tr.fc-payroll-row[data-fc-payroll-fold] .fc-payroll-emp-meta strong,
  .fc-payroll-table tbody tr.fc-payroll-row[data-fc-payroll-fold] .fc-payroll-name-row strong {
    font-size: 0.72rem;
    font-weight: 650;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    text-align: left;
  }
  .fc-payroll-table tbody tr.fc-payroll-row[data-fc-payroll-fold] .fc-payroll-code {
    font-size: 0.58rem;
  }
  .fc-payroll-table tbody tr.fc-payroll-row[data-fc-payroll-fold] .fc-payroll-dept {
    display: inline-flex !important;
    font-size: 0.55rem;
    padding: 0.04rem 0.3rem;
    flex: 0 0 auto;
    margin-left: auto;
    min-width: 0;
    max-width: 48%;
    text-align: right;
  }
  .fc-payroll-table tbody tr.fc-payroll-row[data-fc-payroll-fold] .fc-pay-status-pill {
    padding: 0.1rem 0.32rem;
    font-size: 0.55rem;
    gap: 0.15rem;
  }
  .fc-payroll-table tbody tr.fc-payroll-row[data-fc-payroll-fold] .fc-pay-status-pill i {
    font-size: 0.58rem;
  }
  .fc-payroll-table tbody tr.fc-payroll-row[data-fc-payroll-fold] .fc-payroll-salary-col .fc-pay-money {
    gap: 0.12rem;
  }
  .fc-payroll-table tbody tr.fc-payroll-row[data-fc-payroll-fold] .fc-payroll-salary-col .fc-pay-money .fc-pay-amt {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--fc-text);
  }
  .fc-payroll-table tbody tr.fc-payroll-row[data-fc-payroll-fold] .fc-payroll-salary-col .fc-pay-money .fc-pay-cur {
    font-size: 0.5rem;
  }
  .fc-payroll-fold-btn {
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 6px;
  }
  .fc-payroll-fold-btn i {
    font-size: 0.72rem;
  }
  /* Dept stays beside name when folded; code only when open. */
  .fc-payroll-table tbody tr.fc-payroll-row[data-fc-payroll-fold]:not(.is-open) .fc-payroll-code {
    display: none;
  }
  .fc-payroll-table tbody tr.fc-payroll-row[data-fc-payroll-fold].is-open .fc-payroll-code {
    display: block;
  }

  /* Instant fold (no max-height animation). */
  .fc-payroll-table tbody tr.fc-payroll-row[data-fc-payroll-fold] > td.fc-payroll-fold-detail {
    display: none !important;
  }
  .fc-payroll-table tbody tr.fc-payroll-row[data-fc-payroll-fold].is-open > td.fc-payroll-fold-detail {
    display: flex !important;
    grid-column: 1 / -1;
    width: 100% !important;
    max-width: 100% !important;
    padding-top: 0.45rem !important;
    padding-bottom: 0.45rem !important;
    border-bottom: 1px solid #F1F5F9 !important;
  }
  .fc-payroll-table tbody tr.fc-payroll-row[data-fc-payroll-fold].is-open > td.fc-payroll-fold-detail:last-child {
    border-bottom: none !important;
    padding-top: 0.65rem !important;
  }
  .fc-payroll-markbar-inner {
    align-items: stretch;
  }
  .fc-payroll-markbar-actions {
    width: 100%;
  }
  .fc-payroll-mark-btn.is-paid,
  .fc-payroll-mark-btn.is-unpaid {
    flex: 1 1 auto;
    justify-content: center;
  }
  .fc-payroll-summary {
    flex-direction: column;
    align-items: stretch;
  }
  .fc-payroll-summary-metrics {
    width: 100%;
  }
  .fc-payroll-summary-metric {
    flex: 1 1 calc(50% - 0.55rem);
    min-width: 0;
  }
  .fc-payroll-action-col .fc-payroll-row-btn {
    width: 100%;
    justify-content: center;
  }
}

@media print {
  #hrPayrollBulkBar,
  #hrPayrollSelectAll,
  .fc-payroll-select,
  .fc-payroll-markbar,
  .fc-payroll-check-col {
    display: none !important;
  }
  .fc-payroll-table tbody tr.fc-payroll-row {
    border-left: none;
    break-inside: avoid;
  }
}

/* -- Public DB setup / upgrade ------------------------------- */
.fc-setup-body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1000px 480px at 10% -10%, rgba(0,175,198,.14), transparent 55%),
    radial-gradient(800px 400px at 100% 0%, rgba(2,132,199,.10), transparent 50%),
    var(--fc-bg, #F8FAFC);
}
.fc-setup-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}
.fc-setup-card {
  width: min(100%, 560px);
  background: #fff;
  border: 1px solid var(--fc-border, #e2e8f0);
  border-radius: 18px;
  padding: 1.5rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .06);
}
.fc-setup-brand {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1.15rem;
}
.fc-setup-mark {
  flex: 0 0 auto;
  width: 3rem;
  height: 3rem;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--fc-primary, #00AFC6);
  background: rgba(0, 175, 198, 0.12);
}
.fc-setup-brand h1 {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
  line-height: 1.25;
}
.fc-setup-conn {
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  margin-bottom: 1rem;
}
.fc-setup-section {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid #e2e8f0;
}
.fc-setup-section h2 {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}
.fc-setup-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.fc-setup-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.78rem;
}
.fc-setup-list code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 70%;
}
.fc-setup-foot {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.75rem;
  color: #94a3b8;
}

/* Global image lightbox */
.fc-image-lightbox {
  z-index: 1080;
}
.fc-image-lightbox .fc-image-lightbox-img,
.fc-image-lightbox-img {
  max-width: 100%;
  max-height: min(70vh, 560px);
  width: auto;
  height: auto;
  object-fit: contain;
  background: #fff;
}
[data-fc-image-preview],
[data-fc-cover-preview] {
  cursor: zoom-in;
}
button[data-fc-image-preview],
button[data-fc-cover-preview] {
  padding: 0;
  border: 0;
  background: transparent;
  line-height: 0;
  border-radius: 0.35rem;
}
button[data-fc-image-preview]:focus-visible,
button[data-fc-cover-preview]:focus-visible,
img[data-fc-image-preview]:focus-visible {
  outline: 2px solid var(--bs-primary, #0d6efd);
  outline-offset: 2px;
}

.fc-upload-preview-wrap .fc-upload-preview-btn {
  display: inline-block;
  max-width: 100%;
}
.fc-upload-preview-img {
  width: auto !important;
  height: auto !important;
  max-width: min(180px, 100%);
  max-height: 140px;
  object-fit: contain;
  object-position: center;
  background: #F1F5F9;
  display: block;
}
.fc-design-preview {
  display: inline-block;
  max-width: 100%;
}
.fc-design-preview img[data-fc-image-preview] {
  display: block;
  width: auto;
  height: auto;
  max-width: min(100%, 160px);
  max-height: 120px;
  object-fit: contain;
  object-position: center;
}

/* Ultra Admin console */
.ultra-home .ultra-kpi-row .stat-card.fc-stat-mini {
  padding: 0.35rem 0.45rem;
}
.ultra-company-card {
  border: 1px solid var(--fc-border, #e2e8f0);
  border-radius: 8px;
  box-shadow: none;
  transition: border-color 0.15s ease;
}
.ultra-company-card:hover {
  border-color: rgba(0, 175, 198, 0.4);
  box-shadow: none;
}
.ultra-company-card > .panel-body {
  min-height: 0;
  padding: 0.4rem 0.5rem 0.45rem;
  gap: 0.28rem;
}
.ultra-company-card.has-warnings {
  border-color: rgba(220, 38, 38, 0.35);
}
.ultra-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.3rem;
  min-width: 0;
}
.ultra-card-title {
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.15;
  color: #0f172a;
}
.ultra-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 0.4rem;
  margin-top: 0.05rem;
  min-width: 0;
  font-size: 0.66rem;
  color: #64748b;
}
.ultra-card-meta code {
  font-size: 0.64rem;
  padding: 0.02rem 0.22rem;
  border-radius: 3px;
  background: #f1f5f9;
  color: #475569;
}
.ultra-card-place {
  min-width: 0;
  max-width: 100%;
}
.ultra-card-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: #64748b;
  line-height: 1.2;
}
.ultra-card-counts .bi {
  margin-right: 0.15rem;
  color: var(--fc-primary-deep, #007A8A);
}
.ultra-card-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.22rem;
}
.ultra-metric {
  border: 1px solid var(--fc-border, #e2e8f0);
  border-radius: 6px;
  padding: 0.22rem 0.35rem;
  background: #f8fafc;
  min-width: 0;
}
.ultra-metric.is-required {
  border-color: rgba(0, 175, 198, 0.4);
  background: var(--fc-primary-50, #E8F8FB);
}
.ultra-metric.is-warn {
  border-color: rgba(220, 38, 38, 0.3);
  background: #fef2f2;
}
.ultra-metric.is-ok {
  border-color: rgba(0, 175, 198, 0.35);
  background: #eef9fb;
}
.ultra-metric-label {
  display: inline-flex;
  align-items: center;
  gap: 0.18rem;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0;
  line-height: 1.15;
}
.ultra-metric-label .bi {
  font-size: 0.62rem;
  color: var(--fc-primary-deep, #007A8A);
  opacity: 0.9;
}
.ultra-metric.is-warn .ultra-metric-label .bi {
  color: #b91c1c;
}
.ultra-metric-value {
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.2;
  color: #0f172a;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.35rem;
}
.ultra-metric.is-warn > .ultra-metric-value {
  color: #b91c1c;
}
.ultra-metric-inline {
  font-size: 0.62rem;
  font-weight: 600;
  color: #64748b;
  line-height: 1.2;
}
.ultra-metric.is-warn .ultra-metric-inline {
  color: #991b1b;
}
.ultra-metric-sub {
  font-size: 0.6rem;
  color: #64748b;
  margin-top: 0.04rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.ultra-metric--quality {
  grid-column: 1 / -1;
}
.ultra-inline-pair {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 0.35rem;
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.25;
  color: #334155;
}
.ultra-inline-pair strong {
  font-weight: 800;
}
.ultra-inline-pair .is-fail,
.ultra-inline-pair .is-fail strong {
  color: #b91c1c;
}
.ultra-inline-pair .is-ok,
.ultra-inline-pair .is-ok strong {
  color: var(--fc-primary-deep, #007A8A);
}
.ultra-inline-sep {
  color: #94a3b8;
  font-weight: 600;
}
.ultra-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding-top: 0.05rem;
}
.ultra-card-actions .btn {
  padding: 0.2rem 0.45rem;
  font-size: 0.7rem;
  line-height: 1.15;
}
.ultra-stat-quality {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.ultra-stat-quality .stat-label {
  margin-bottom: 0.1rem;
}
.ultra-stat-quality.is-warn {
  border-color: rgba(220, 38, 38, 0.28);
}
.ultra-kpi-row {
  --bs-gutter-x: 0.35rem;
  --bs-gutter-y: 0.35rem;
}
.ultra-company-grid {
  --bs-gutter-x: 0.35rem;
  --bs-gutter-y: 0.35rem;
}
@media (max-width: 575.98px) {
  .ultra-company-card > .panel-body {
    padding: 0.4rem 0.45rem 0.45rem;
  }
  .ultra-card-metrics {
    gap: 0.2rem;
  }
  .ultra-metric {
    padding: 0.2rem 0.3rem;
  }
  .ultra-metric-value,
  .ultra-inline-pair {
    font-size: 0.76rem;
  }
}

.app-shell.ultra-console .sidebar-brand-tag {
  opacity: 0.85;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Ultra Admin exit control under brand company name */
.sidebar-company-name > form {
  margin: 0;
}
.sidebar-factory-chip-exit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  flex-shrink: 0;
  border: 0;
  border-radius: 8px;
  padding: 0.28rem 0.45rem;
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: #0f172a;
  cursor: pointer;
}
.sidebar-factory-chip-exit:hover {
  background: #1e293b;
}
.sidebar.collapsed .sidebar-factory-chip-exit .nav-label {
  display: none;
}

.fc-ep-finish-checklist {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--fc-border);
  background: #F8FAFC;
  display: grid;
  gap: 0.35rem;
}
.fc-ep-finish-checklist li {
  position: relative;
  padding-left: 1.35rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--fc-text);
}
.fc-ep-finish-checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: var(--fc-primary);
}

/* Employee targets page */
.fc-et-page-head {
  margin-bottom: 0.75rem;
  align-items: flex-start;
}
.fc-et-page-head-text {
  min-width: 0;
}
.fc-et-page-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--fc-text, #0F172A);
}
.fc-et-page-hint {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
  font-weight: 500;
  color: var(--fc-text-muted, #64748B);
}
.fc-emp-targets {
  max-width: 100%;
  overflow-x: clip;
}
.fc-et-layout {
  display: grid;
  gap: 1rem;
  max-width: 100%;
  align-items: start;
}
.fc-et-nav {
  min-width: 0;
  max-width: 100%;
}
.fc-et-nav-mobile {
  display: grid;
  gap: 0.35rem;
  margin: 0;
}
.fc-et-nav-mobile-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--fc-text-muted, #64748B);
}
.fc-et-nav-mobile-label .bi {
  font-size: 1rem;
  color: var(--fc-primary-deep, #007A8A);
}
.fc-et-select-wrap {
  position: relative;
  display: block;
  max-width: 100%;
  z-index: 5;
}
.fc-et-stage-trigger {
  position: relative;
  width: 100%;
  min-height: 2.85rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 2.5rem 0.55rem 0.7rem;
  border: 1px solid var(--fc-border, #E2E8F0);
  border-radius: 12px;
  background: #fff;
  color: var(--fc-text, #0F172A);
  text-align: left;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.fc-et-stage-trigger:hover,
.fc-et-nav-mobile.is-open .fc-et-stage-trigger {
  border-color: var(--fc-primary, #00AFC6);
  box-shadow: 0 0 0 3px rgba(0, 175, 198, 0.12);
}
.fc-et-trigger-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  border-radius: 10px;
  background: var(--fc-primary-50, #E8F8FB);
  color: var(--fc-primary-deep, #007A8A);
  font-size: 1rem;
}
.fc-et-trigger-text {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
}
.fc-et-select-icon {
  position: absolute;
  top: 50%;
  right: 0.85rem;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--fc-primary-deep, #007A8A);
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.15s ease;
}
.fc-et-nav-mobile.is-open .fc-et-select-icon {
  transform: translateY(-50%) rotate(180deg);
}
.fc-et-dropdown-menu {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0.4rem;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  display: grid;
  gap: 0.2rem;
  max-height: min(22rem, 70vh);
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid var(--fc-border, #E2E8F0);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  z-index: 20;
}
.fc-et-dropdown-menu[hidden] {
  display: none !important;
}
.fc-et-dropdown-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  padding: 0.65rem 0.7rem;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--fc-text, #0F172A);
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.fc-et-dropdown-option:hover {
  background: #F8FAFC;
  border-color: #E2E8F0;
}
.fc-et-dropdown-option.is-active {
  background: var(--fc-primary-50, #E8F8FB);
  border-color: rgba(0, 175, 198, 0.35);
  color: var(--fc-primary-deep, #007A8A);
}
.fc-et-dropdown-option .fc-et-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  border-radius: 10px;
  background: var(--fc-primary-50, #E8F8FB);
  color: var(--fc-primary-deep, #007A8A);
  font-size: 1rem;
}
.fc-et-dropdown-option.is-active .fc-et-nav-icon {
  background: var(--fc-primary, #00AFC6);
  color: #fff;
}
.fc-et-option-check {
  flex: 0 0 auto;
  width: 1.1rem;
  color: var(--fc-primary, #00AFC6);
  font-size: 1rem;
  line-height: 1;
}
.fc-et-stage-trigger.is-sky .fc-et-trigger-icon,
.fc-et-dropdown-option.is-sky .fc-et-nav-icon { background: #E0F2FE; color: #0369A1; }
.fc-et-stage-trigger.is-violet .fc-et-trigger-icon,
.fc-et-dropdown-option.is-violet .fc-et-nav-icon { background: #EDE9FE; color: #6D28D9; }
.fc-et-stage-trigger.is-teal .fc-et-trigger-icon,
.fc-et-dropdown-option.is-teal .fc-et-nav-icon { background: #CCFBF1; color: #0F766E; }
.fc-et-stage-trigger.is-green .fc-et-trigger-icon,
.fc-et-dropdown-option.is-green .fc-et-nav-icon { background: #DCFCE7; color: #15803D; }
.fc-et-stage-trigger.is-indigo .fc-et-trigger-icon,
.fc-et-dropdown-option.is-indigo .fc-et-nav-icon { background: #E0E7FF; color: #4338CA; }
.fc-et-stage-trigger.is-amber .fc-et-trigger-icon,
.fc-et-dropdown-option.is-amber .fc-et-nav-icon { background: #FEF3C7; color: #B45309; }
.fc-et-stage-trigger.is-orange .fc-et-trigger-icon,
.fc-et-dropdown-option.is-orange .fc-et-nav-icon { background: #FFEDD5; color: #C2410C; }
.fc-et-stage-trigger.is-slate .fc-et-trigger-icon,
.fc-et-dropdown-option.is-slate .fc-et-nav-icon { background: #E2E8F0; color: #334155; }
.fc-et-dropdown-option.is-sky.is-active { background: #E0F2FE; border-color: #7DD3FC; color: #0369A1; }
.fc-et-dropdown-option.is-violet.is-active { background: #EDE9FE; border-color: #C4B5FD; color: #6D28D9; }
.fc-et-dropdown-option.is-teal.is-active { background: #CCFBF1; border-color: #5EEAD4; color: #0F766E; }
.fc-et-dropdown-option.is-green.is-active { background: #DCFCE7; border-color: #86EFAC; color: #15803D; }
.fc-et-dropdown-option.is-indigo.is-active { background: #E0E7FF; border-color: #A5B4FC; color: #4338CA; }
.fc-et-dropdown-option.is-amber.is-active { background: #FEF3C7; border-color: #FCD34D; color: #B45309; }
.fc-et-dropdown-option.is-orange.is-active { background: #FFEDD5; border-color: #FDBA74; color: #C2410C; }
.fc-et-dropdown-option.is-slate.is-active { background: #E2E8F0; border-color: #CBD5E1; color: #334155; }
.fc-et-dropdown-option.is-sky.is-active .fc-et-nav-icon { background: #0EA5E9; color: #fff; }
.fc-et-dropdown-option.is-violet.is-active .fc-et-nav-icon { background: #8B5CF6; color: #fff; }
.fc-et-dropdown-option.is-teal.is-active .fc-et-nav-icon { background: #14B8A6; color: #fff; }
.fc-et-dropdown-option.is-green.is-active .fc-et-nav-icon { background: #22C55E; color: #fff; }
.fc-et-dropdown-option.is-indigo.is-active .fc-et-nav-icon { background: #6366F1; color: #fff; }
.fc-et-dropdown-option.is-amber.is-active .fc-et-nav-icon { background: #F59E0B; color: #fff; }
.fc-et-dropdown-option.is-orange.is-active .fc-et-nav-icon { background: #F97316; color: #fff; }
.fc-et-dropdown-option.is-slate.is-active .fc-et-nav-icon { background: #64748B; color: #fff; }
.fc-et-nav-list {
  display: none;
}
.fc-et-nav-title {
  margin: 0 0 0.55rem;
  padding: 0 0.15rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fc-text-muted, #64748B);
}
.fc-et-nav-items {
  list-style: none;
  margin: 0;
  padding: 0.35rem;
  display: grid;
  gap: 0.25rem;
  border: 1px solid var(--fc-border, #E2E8F0);
  border-radius: 16px;
  background: #fff;
}
.fc-et-nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  padding: 0.65rem 0.7rem;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--fc-text, #0F172A);
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.fc-et-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  border-radius: 10px;
  background: var(--fc-primary-50, #E8F8FB);
  color: var(--fc-primary-deep, #007A8A);
  font-size: 1rem;
}
.fc-et-nav-text {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 0.1rem;
}
.fc-et-nav-name {
  font-size: 0.88rem;
  font-weight: 750;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fc-et-nav-meta {
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--fc-text-muted, #64748B);
}
.fc-et-nav-chevron {
  flex: 0 0 auto;
  color: #94A3B8;
  font-size: 0.85rem;
  opacity: 0;
  transform: translateX(-2px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.fc-et-nav-item:hover {
  background: #F8FAFC;
  border-color: #E2E8F0;
}
.fc-et-nav-item.is-active {
  background: var(--fc-primary-50, #E8F8FB);
  border-color: rgba(0, 175, 198, 0.35);
  color: var(--fc-primary-deep, #007A8A);
}
.fc-et-nav-item.is-active .fc-et-nav-icon {
  background: var(--fc-primary, #00AFC6);
  color: #fff;
}
.fc-et-nav-item.is-active .fc-et-nav-meta {
  color: var(--fc-primary-deep, #007A8A);
}
.fc-et-nav-item.is-active .fc-et-nav-chevron {
  opacity: 1;
  transform: none;
  color: var(--fc-primary, #00AFC6);
}
.fc-et-nav-item.is-sky .fc-et-nav-icon { background: #E0F2FE; color: #0369A1; }
.fc-et-nav-item.is-violet .fc-et-nav-icon { background: #EDE9FE; color: #6D28D9; }
.fc-et-nav-item.is-teal .fc-et-nav-icon { background: #CCFBF1; color: #0F766E; }
.fc-et-nav-item.is-green .fc-et-nav-icon { background: #DCFCE7; color: #15803D; }
.fc-et-nav-item.is-indigo .fc-et-nav-icon { background: #E0E7FF; color: #4338CA; }
.fc-et-nav-item.is-amber .fc-et-nav-icon { background: #FEF3C7; color: #B45309; }
.fc-et-nav-item.is-orange .fc-et-nav-icon { background: #FFEDD5; color: #C2410C; }
.fc-et-nav-item.is-slate .fc-et-nav-icon { background: #E2E8F0; color: #334155; }
.fc-et-nav-item.is-sky.is-active { background: #E0F2FE; border-color: #7DD3FC; color: #0369A1; }
.fc-et-nav-item.is-violet.is-active { background: #EDE9FE; border-color: #C4B5FD; color: #6D28D9; }
.fc-et-nav-item.is-teal.is-active { background: #CCFBF1; border-color: #5EEAD4; color: #0F766E; }
.fc-et-nav-item.is-green.is-active { background: #DCFCE7; border-color: #86EFAC; color: #15803D; }
.fc-et-nav-item.is-indigo.is-active { background: #E0E7FF; border-color: #A5B4FC; color: #4338CA; }
.fc-et-nav-item.is-amber.is-active { background: #FEF3C7; border-color: #FCD34D; color: #B45309; }
.fc-et-nav-item.is-orange.is-active { background: #FFEDD5; border-color: #FDBA74; color: #C2410C; }
.fc-et-nav-item.is-slate.is-active { background: #E2E8F0; border-color: #CBD5E1; color: #334155; }
.fc-et-nav-item.is-sky.is-active .fc-et-nav-icon,
.fc-et-nav-item.is-violet.is-active .fc-et-nav-icon,
.fc-et-nav-item.is-teal.is-active .fc-et-nav-icon,
.fc-et-nav-item.is-green.is-active .fc-et-nav-icon,
.fc-et-nav-item.is-indigo.is-active .fc-et-nav-icon,
.fc-et-nav-item.is-amber.is-active .fc-et-nav-icon,
.fc-et-nav-item.is-orange.is-active .fc-et-nav-icon,
.fc-et-nav-item.is-slate.is-active .fc-et-nav-icon {
  color: #fff;
}
.fc-et-nav-item.is-sky.is-active .fc-et-nav-icon { background: #0EA5E9; }
.fc-et-nav-item.is-violet.is-active .fc-et-nav-icon { background: #8B5CF6; }
.fc-et-nav-item.is-teal.is-active .fc-et-nav-icon { background: #14B8A6; }
.fc-et-nav-item.is-green.is-active .fc-et-nav-icon { background: #22C55E; }
.fc-et-nav-item.is-indigo.is-active .fc-et-nav-icon { background: #6366F1; }
.fc-et-nav-item.is-amber.is-active .fc-et-nav-icon { background: #F59E0B; }
.fc-et-nav-item.is-orange.is-active .fc-et-nav-icon { background: #F97316; }
.fc-et-nav-item.is-slate.is-active .fc-et-nav-icon { background: #64748B; }

.fc-et-main {
  min-width: 0;
  max-width: 100%;
}
.fc-et-stage {
  max-width: 100%;
}
.fc-et-stage-head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--fc-border, #E2E8F0);
  border-radius: 14px;
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
}
.fc-et-stage-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  flex: 0 0 auto;
  border-radius: 12px;
  background: var(--fc-primary-50, #E8F8FB);
  color: var(--fc-primary-deep, #007A8A);
  font-size: 1.15rem;
}
.fc-et-stage-icon.is-sky { background: #E0F2FE; color: #0369A1; }
.fc-et-stage-icon.is-violet { background: #EDE9FE; color: #6D28D9; }
.fc-et-stage-icon.is-teal { background: #CCFBF1; color: #0F766E; }
.fc-et-stage-icon.is-green { background: #DCFCE7; color: #15803D; }
.fc-et-stage-icon.is-indigo { background: #E0E7FF; color: #4338CA; }
.fc-et-stage-icon.is-amber { background: #FEF3C7; color: #B45309; }
.fc-et-stage-icon.is-orange { background: #FFEDD5; color: #C2410C; }
.fc-et-stage-icon.is-slate { background: #E2E8F0; color: #334155; }
.fc-et-stage-title {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.25;
}
.fc-et-stage-hint,
.fc-et-stage-note {
  margin: 0;
  color: var(--fc-text-muted, #64748B);
  font-size: 0.82rem;
  line-height: 1.4;
}
.fc-et-stage-note {
  margin-top: 0.45rem;
  font-weight: 700;
  color: var(--fc-text, #0F172A);
}
.fc-et-task-list {
  display: grid;
  gap: 0.65rem;
  max-width: 100%;
}
.fc-et-task {
  margin-bottom: 0 !important;
  max-width: 100%;
  overflow: hidden;
}
.fc-et-task .panel-header {
  gap: 0.45rem;
  padding: 0.55rem 0.75rem;
}
.fc-et-task .panel-body {
  padding: 0.65rem 0.75rem 0.75rem;
}
.fc-et-task-title {
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.25;
}
.fc-et-task .fc-ep-step-icon {
  width: 1.85rem;
  height: 1.85rem;
  font-size: 0.9rem;
  border-radius: 8px;
}
.fc-et-task .badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.22rem 0.45rem;
}
.fc-et-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.45rem 0.75rem;
  margin: 0 0 0.55rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--fc-border, #E2E8F0);
  border-radius: 10px;
  background: #F8FAFC;
  max-width: 100%;
}
.fc-et-meta-field {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
  margin: 0;
}
.fc-et-meta-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--fc-text-muted, #64748B);
  line-height: 1.2;
}
.fc-et-qty-input {
  width: 5.5rem;
  max-width: 100%;
  min-height: 1.9rem;
  font-size: 0.84rem;
  font-weight: 750;
  padding: 0.2rem 0.45rem;
}
.fc-et-meta .fc-ep-mode-chip {
  min-height: 1.9rem;
  padding: 0.2rem 0.55rem;
  align-items: center;
  font-size: 0.72rem;
}
.fc-et-meta-field.is-switch .form-check {
  min-height: 1.9rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding-left: 2.1rem;
}
.fc-et-meta-field.is-switch .form-check-input {
  width: 1.7rem;
  height: 0.95rem;
  margin-top: 0;
}
.fc-et-meta-field.is-switch .form-check-label {
  font-size: 0.78rem;
  font-weight: 650;
  white-space: nowrap;
}
.fc-et-incentive {
  margin: 0 0 0.55rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid #FDE68A;
  border-radius: 10px;
  background: #FFFBEB;
  max-width: 100%;
}
.fc-et-incentive-title {
  font-size: 0.72rem;
  font-weight: 800;
  color: #92400E;
  margin: 0 0 0.35rem;
}
.fc-et-incentive-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.65rem;
  align-items: end;
}
.fc-et-money-input {
  width: 5.75rem;
  max-width: 100%;
  min-height: 1.9rem;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.2rem 0.4rem;
}
.fc-et-money-group {
  width: auto;
  max-width: 100%;
  flex-wrap: nowrap;
}
.fc-et-money-group .fc-et-money-input {
  width: 5.5rem;
  min-width: 0;
}
.fc-et-money-group .input-group-text {
  font-size: 0.68rem;
  font-weight: 750;
  color: #92400E;
  background: #FEF3C7;
  border-color: #FDE68A;
  padding: 0.2rem 0.4rem;
}
.fc-et-incentive-hint {
  margin: 0.35rem 0 0;
  font-size: 0.7rem;
  color: #A16207;
  line-height: 1.3;
}
.fc-et-task .fc-et-assign {
  gap: 0.3rem;
  margin-top: 0;
}
.fc-et-task .fc-ep-assign-head {
  font-size: 0.72rem;
  margin: 0;
}
.fc-et-task .fc-ep-op-box {
  max-width: 100%;
  border-radius: 10px;
}
.fc-et-task .fc-ep-op-toolbar {
  padding: 0.25rem 0.35rem;
}
.fc-et-task .fc-ep-op-search .form-control {
  font-size: 0.78rem;
}
.fc-et-task .fc-ep-op-section-title {
  padding: 0.3rem 0.5rem 0.1rem;
  font-size: 0.66rem;
}
.fc-et-task .fc-ep-op-list,
.fc-et-task .fc-ep-op-list.is-assigned {
  max-height: 9.5rem;
}
.fc-et-task .fc-ep-op-item {
  padding: 0.28rem 0.45rem;
  font-size: 0.8rem;
}
.fc-et-task .fc-ep-op-name {
  font-size: 0.8rem;
}
.fc-et-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.55rem;
}
.fc-et-actions .btn {
  min-height: 1.95rem;
  padding: 0.25rem 0.7rem;
  font-size: 0.8rem;
}
.fc-et-task .row.g-3 > [class*="col-"] {
  min-width: 0;
}

@media (min-width: 992px) {
  .fc-et-layout {
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
    gap: 1.25rem;
  }
  .fc-et-nav-mobile {
    display: none;
  }
  .fc-et-nav-list {
    display: block;
    position: sticky;
    top: 1rem;
  }
}

@media (max-width: 767.98px) {
  .fc-et-page-head,
  .fc-et-page-hint,
  .page-toolbar + .fc-emp-targets {
    max-width: 100%;
  }
  .fc-et-page-title {
    font-size: 0.98rem;
  }
  .fc-et-page-hint {
    font-size: 0.74rem;
  }
  .fc-et-stage-head {
    padding: 0.75rem 0.8rem;
    gap: 0.6rem;
  }
  .fc-et-stage-title {
    font-size: 0.98rem;
  }
  .fc-et-stage-hint,
  .fc-et-stage-note {
    font-size: 0.78rem;
  }
  .fc-et-task .panel-header {
    flex-wrap: wrap;
  }
  .fc-et-meta {
    gap: 0.4rem 0.55rem;
  }
  .fc-et-meta-field.is-switch {
    flex: 1 1 100%;
  }
  .fc-et-task .fc-ep-op-list,
  .fc-et-task .fc-ep-op-list.is-assigned {
    max-height: 8rem;
  }
  .fc-et-task .fc-ep-op-search .form-control,
  .fc-et-task .form-control {
    max-width: 100%;
  }
  .fc-et-actions .btn {
    width: 100%;
  }
}
