/* AKFA Command Center — Enterprise UI (v1.1)
   Цель: минимум кликов, максимум ясности. */

/* --------------------- Design Tokens --------------------- */
:root{
  --bg: #0b1220;
  --bg-2: #111a2e;
  --surface: #ffffff;
  --surface-2: #f6f7fb;
  --surface-3: #eef2ff;
  --panel: #ffffff;
  --panel-2: #f6f9ff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e5e7eb;

  --primary: #2563eb;
  --accent: #315efb;
  --primary-700: #1d4ed8;
  --danger: #dc2626;
  --warning: #d97706;
  --success: #16a34a;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 6px 18px rgba(15, 23, 42, 0.10);

  --radius: 14px;
  --radius-sm: 10px;

  --sidebar-w: 280px;
  --content-max: 1440px;
}

/* Theme system (enterprise) */
html[data-theme="dark"]{
  --surface: #0f172a;
  --surface-2: #0b1220;
  --surface-3: #111a2e;
  --panel: #0f172a;
  --panel-2: #101a31;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --border: rgba(148,163,184,0.18);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.35);
  --shadow-md: 0 10px 28px rgba(0,0,0,0.45);
}

@media (prefers-color-scheme: dark){
  html[data-theme="system"]{
    --surface: #0f172a;
    --surface-2: #0b1220;
    --surface-3: #111a2e;
    --panel: #0f172a;
    --panel-2: #101a31;
    --text: #e5e7eb;
    --muted: #94a3b8;
    --border: rgba(148,163,184,0.18);
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.35);
    --shadow-md: 0 10px 28px rgba(0,0,0,0.45);
  }
}


/* --------------------- Base Reset --------------------- */
*{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--surface-2);
  color: var(--text);
}
a{ color: inherit; text-decoration: none; }
a:hover{ text-decoration: none; }
img{ max-width: 100%; }
code, .code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

/* Accessible focus */
:focus-visible{
  outline: 3px solid rgba(37, 99, 235, 0.35);
  outline-offset: 2px;
  border-radius: 8px;
}

/* --------------------- Layout --------------------- */
.skip-link{
  position:absolute;
  left:-999px;
  top: 8px;
  background: var(--primary);
  color: #fff;
  padding: 10px 12px;
  border-radius: 10px;
  z-index: 9999;
}
.skip-link:focus{ left: 10px; }

.app-shell{
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.sidebar{
  width: var(--sidebar-w);
  background: var(--bg);
  color: rgba(255,255,255,0.92);
  padding: 14px 14px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  border-right: 1px solid rgba(255,255,255,0.06);
}

.sidebar-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 6px 14px;
}

.brand{
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.brand-mark{
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(37,99,235,1), rgba(99,102,241,1));
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.28);
  flex: 0 0 auto;
}
.brand-text{ min-width: 0; }
.brand-title{
  font-weight: 800;
  font-size: 14px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-sub{
  font-size: 12px;
  color: rgba(255,255,255,0.72);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-nav{
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px;
}
.nav-item{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 12px;
  color: rgba(255,255,255,0.86);
  opacity: 0.92;
  border: 1px solid transparent;
}
.nav-item:hover{
  background: rgba(255,255,255,0.07);
  opacity: 1;
}
.nav-item.active{
  background: rgba(37, 99, 235, 0.22);
  border-color: rgba(37, 99, 235, 0.35);
  opacity: 1;
}
.nav-icon{
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  opacity: 0.95;
}
.nav-label{ font-size: 14px; font-weight: 600; }

.sidebar-footer{
  margin-top: 14px;
  padding: 12px 10px;
  border-top: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.70);
  font-size: 12px;
}
.sidebar-footer .pill{
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.88);
  border: 1px solid rgba(255,255,255,0.10);
}

.main{
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
html[data-theme="dark"] .topbar{ background: rgba(15, 23, 42, 0.80); }
@media (prefers-color-scheme: dark){
  html[data-theme="system"] .topbar{ background: rgba(15, 23, 42, 0.80); }
}
.topbar-inner{
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.topbar-left{
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.topbar-right{
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.topbar-tools{
  display:flex;
  align-items:center;
  gap:8px;
  padding:4px;
  border:1px solid rgba(148,163,184,0.18);
  border-radius:16px;
  background: rgba(255,255,255,0.62);
  box-shadow: var(--shadow-sm);
}
html[data-theme="dark"] .topbar-tools{ background: rgba(15,23,42,0.72); }
@media (prefers-color-scheme: dark){
  html[data-theme="system"] .topbar-tools{ background: rgba(15,23,42,0.72); }
}

.hamburger{
  display: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
@media (max-width: 1024px){
  .sidebar{ position: fixed; left: -110%; top: 0; z-index: 100; transition: left 180ms ease; }
  body.sidebar-open .sidebar{ left: 0; }
  .hamburger{ display: inline-flex; align-items: center; gap: 8px; }
  .main{ width: 100%; }
}

.breadcrumbs{
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-chip{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-size: 13px;
  color: var(--text);
}
.user-chip .dot{
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--success);
}

.content{
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 18px 16px 28px;
}

/* --------------------- Typography --------------------- */
h1{ font-size: 22px; margin: 0; letter-spacing: -0.01em; }
h2{ font-size: 18px; margin: 0; letter-spacing: -0.01em; }
h3{ font-size: 15px; margin: 0; letter-spacing: -0.01em; }
p{ margin: 0; }
.muted{ color: var(--muted); }
.small{ font-size: 12px; }
.hr{ height: 1px; background: var(--border); margin: 14px 0; border: 0; }

/* --------------------- Page Header --------------------- */
.page-header{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.page-header .title-wrap{
  min-width: 0;
}
.page-header .subtitle{
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.page-header .actions{
  display: inline-flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* --------------------- Cards & Grids --------------------- */
.card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card + .card{ margin-top: 14px; }
.card-header{
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-title{ font-weight: 800; font-size: 14px; }
.card-subtitle{ margin-top: 2px; font-size: 12px; color: var(--muted); }
.card-body{ padding: 16px; }
.card-footer{
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}



/* --------------------- Rules / Cards Layout helpers (v1.4.1) --------------------- */
.card-head{ min-width: 0; }
.card-actions{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.card-actions .input{ max-width: 280px; }

.section-title{
  margin: 18px 0 10px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.rules-grid{
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
}
@media (max-width: 560px){
  .rules-grid{ grid-template-columns: 1fr; }
}

/* Collapsible advanced blocks (imports etc.) */
.details{
  margin-top: 12px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(99,102,241,0.04);
}
.details > summary{
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}
.details > summary::-webkit-details-marker{ display:none; }
.details > summary:after{
  content: "▾";
  float: right;
  color: var(--muted);
}
.details[open] > summary:after{ content: "▴"; }
.details[open]{ background: rgba(99,102,241,0.06); }

.grid{
  display: grid;
  gap: 14px;
}
.grid-2{ grid-template-columns: 1fr 1fr; }
.grid-3{ grid-template-columns: 1fr 1fr 1fr; }
.grid-4{ grid-template-columns: 1fr 1fr 1fr 1fr; }
@media (max-width: 1200px){
  .grid-4{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1024px){
  .grid-2, .grid-3, .grid-4{ grid-template-columns: 1fr; }
}

/* KPI cards */
.kpi{
  padding: 14px 16px;
}
.kpi-label{ font-size: 12px; color: var(--muted); }
.kpi-value{
  margin-top: 6px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.kpi-meta{
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

/* --------------------- Buttons --------------------- */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
  user-select: none;
  transition: transform 60ms ease, background 120ms ease, border-color 120ms ease, opacity 120ms ease;
}
.btn:active{ transform: translateY(1px); }
.btn-primary{
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
}
.btn-primary:hover{ background: var(--primary-700); }
.btn-secondary{
  background: var(--bg-2);
  color: rgba(255,255,255,0.92);
  border-color: rgba(255,255,255,0.10);
}
.btn-secondary:hover{ background: #0f1a35; }
.btn-ghost{
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover{ background: rgba(99,102,241,0.08); }
.btn-danger{
  background: rgba(220,38,38,0.10);
  color: var(--danger);
  border-color: rgba(220,38,38,0.22);
}
.btn-danger:hover{ background: rgba(220,38,38,0.16); }
.btn:disabled, .btn[aria-disabled="true"]{
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* Old class aliases (for backward compatibility if needed) */
.btn.light{ background: rgba(37,99,235,0.10); color: var(--primary); border-color: rgba(37,99,235,0.18); }
.btn.secondary{ background: var(--bg-2); color: rgba(255,255,255,0.92); }
.btn.light:hover{ background: rgba(37,99,235,0.14); }

/* --------------------- Badges / Chips --------------------- */
.badge, .chip{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid var(--border);
  background: rgba(148,163,184,0.10);
  color: var(--text);
  white-space: nowrap;
}
.badge.ok, .chip.ok{ background: rgba(22,163,74,0.12); color: var(--success); border-color: rgba(22,163,74,0.22); }
.badge.warn, .chip.warn{ background: rgba(217,119,6,0.12); color: var(--warning); border-color: rgba(217,119,6,0.22); }
.badge.err, .chip.err{ background: rgba(220,38,38,0.12); color: var(--danger); border-color: rgba(220,38,38,0.22); }

.pill{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(37,99,235,0.12);
  color: var(--primary);
  border: 1px solid rgba(37,99,235,0.18);
}
.pill-btn{
  cursor: pointer;
}
.pill-btn:hover{ background: rgba(37,99,235,0.16); }

/* --------------------- Alerts --------------------- */
.alert{
  border-radius: var(--radius);
  padding: 12px 14px;
  border: 1px solid var(--border);
  background: rgba(148,163,184,0.10);
}
.alert.info{ border-color: rgba(37,99,235,0.22); background: rgba(37,99,235,0.10); }
.alert.warn{ border-color: rgba(217,119,6,0.22); background: rgba(217,119,6,0.10); }
.alert.err{ border-color: rgba(220,38,38,0.22); background: rgba(220,38,38,0.10); }

/* --------------------- Forms --------------------- */
.form{
  display: grid;
  gap: 12px;
}
.form-row{ display: grid; gap: 6px; }
label{ font-size: 12px; font-weight: 800; color: var(--muted); }
.input, input[type="text"], input[type="date"], input[type="file"], input[type="search"], select, textarea{
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
textarea{ min-height: 96px; resize: vertical; }
select{ cursor: pointer; }
.help{ font-size: 12px; color: var(--muted); line-height: 1.35; }
.checkbox{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text);
}
.checkbox input{ transform: translateY(1px); }

/* File drop zone */
.file-drop{
  position: relative;
  border: 1px dashed rgba(148,163,184,0.55);
  background: rgba(148,163,184,0.10);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}
.file-drop:hover{ background: rgba(37,99,235,0.10); border-color: rgba(37,99,235,0.35); }
.file-drop.dragover{ background: rgba(37,99,235,0.14); border-color: rgba(37,99,235,0.45); }
.file-drop input[type="file"]{
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.file-drop .meta{ min-width: 0; }
.file-drop .title{ font-weight: 900; font-size: 13px; }
.file-drop .desc{ margin-top: 4px; font-size: 12px; color: var(--muted); }
.file-drop .file-name{
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 42vw;
}
@media (max-width: 680px){
  .file-drop{ flex-direction: column; align-items: flex-start; }
  .file-drop .file-name{ max-width: 100%; }
}

/* --------------------- Tables --------------------- */
.table-wrap{ overflow: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table{
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th, td{
  padding: 10px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
th{
  font-size: 12px;
  color: var(--muted);
  font-weight: 900;
  background: rgba(148,163,184,0.06);
  position: sticky;
  top: 0;
  z-index: 2;
}
tr:hover td{ background: rgba(37,99,235,0.05); }
td .code{
  background: rgba(148,163,184,0.12);
  border: 1px solid rgba(148,163,184,0.18);
  padding: 3px 7px;
  border-radius: 10px;
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Sortable headers */
th.sortable{ cursor: pointer; }
th.sortable:hover{ background: rgba(37,99,235,0.10); }
th .sort-ind{ opacity: 0.55; margin-left: 6px; font-weight: 900; }

/* --------------------- Stepper --------------------- */
.steps{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.step{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(148,163,184,0.08);
  color: var(--muted);
  font-weight: 900;
  font-size: 12px;
}
.step.done{
  background: rgba(22,163,74,0.10);
  color: var(--success);
  border-color: rgba(22,163,74,0.22);
}
.step.current{
  background: rgba(37,99,235,0.12);
  color: var(--primary);
  border-color: rgba(37,99,235,0.22);
}

/* --------------------- Utilities --------------------- */
.row{ display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.right{ text-align: right; }
.inline{ display: inline; }
.stack{ display: grid; gap: 10px; }
.toolbar{ display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer{ flex: 1 1 auto; }
.tag{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(148,163,184,0.10);
  border: 1px solid rgba(148,163,184,0.18);
  font-size: 12px;
  color: var(--muted);
}

/* --------------------- Toasts --------------------- */
.toast-host{
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: grid;
  gap: 10px;
  z-index: 999;
}
.toast{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  padding: 12px 14px;
  min-width: 260px;
  max-width: 360px;
}
.toast .t-title{ font-weight: 900; font-size: 13px; }
.toast .t-desc{ margin-top: 4px; font-size: 12px; color: var(--muted); }
.toast.info{ border-color: rgba(37,99,235,0.22); }
.toast.ok{ border-color: rgba(22,163,74,0.22); }
.toast.warn{ border-color: rgba(217,119,6,0.22); }
.toast.err{ border-color: rgba(220,38,38,0.22); }

/* Sidebar overlay (mobile) */
.sidebar-overlay{
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(2,6,23,0.55);
  z-index: 90;
}
body.sidebar-open .sidebar-overlay{ display: block; }
@media (min-width: 1025px){
  .sidebar-overlay{ display: none !important; }
}

/* --------------------- Tabs (Run detail) --------------------- */
.tabs{
  margin-top: 14px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding: 8px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(148,163,184,0.08);
}
.tab{
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 900;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.tab:hover{
  background: rgba(37,99,235,0.10);
  color: var(--text);
  border-color: rgba(37,99,235,0.18);
}
.tab.active{
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.tab .badge{
  padding: 4px 8px;
  font-size: 11px;
}

.tab-panels{
  margin-top: 14px;
}
.tab-panel[hidden]{ display: none; }

/* --------------------- Action bar (fixed bottom) --------------------- */
body.has-action-bar .content{
  padding-bottom: 120px;
}
body.has-action-bar .toast-host{
  bottom: 92px;
}

.action-bar{
  position: fixed;
  left: var(--sidebar-w);
  right: 0;
  bottom: 0;
  z-index: 60;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(12px);
}
html[data-theme="dark"] .action-bar{ background: rgba(15, 23, 42, 0.80); }
@media (prefers-color-scheme: dark){
  html[data-theme="system"] .action-bar{ background: rgba(15, 23, 42, 0.80); }
}
@media (max-width: 1024px){
  .action-bar{ left: 0; }
}
.action-bar-inner{
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* --------------------- Bulk panel (exceptions) --------------------- */
.bulk-panel{
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(148,163,184,0.06);
  padding: 12px;
}
.bulk-panel .btn{
  padding: 9px 10px;
}
.exc-select{
  width: 18px;
  height: 18px;
}


.btn-disabled{ opacity: 0.55; cursor: not-allowed; pointer-events: none; }


/* --------------------- Icons --------------------- */
.icon{
  width: 18px;
  height: 18px;
  display: inline-block;
  color: currentColor;
}
.btn-icon{ display: inline-flex; }
.btn-icon .icon{ width: 18px; height: 18px; }

.icon-btn{
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  transition: transform 60ms ease, background 120ms ease, border-color 120ms ease;
}
.icon-btn:hover{ background: rgba(37,99,235,0.08); border-color: rgba(37,99,235,0.22); }
.icon-btn:active{ transform: translateY(1px); }

.desktop-only{ display: inline-grid; }
@media (max-width: 1024px){
  .desktop-only{ display: none !important; }
}

/* --------------------- Sidebar collapse (desktop) --------------------- */
:root{
  --sidebar-w-expanded: 280px;
  --sidebar-w-collapsed: 78px;
}
html.sidebar-collapsed{
  --sidebar-w: var(--sidebar-w-collapsed);
}
html.sidebar-collapsed .brand-text{ display: none; }
html.sidebar-collapsed .sidebar{ padding-left: 10px; padding-right: 10px; }
html.sidebar-collapsed .sidebar-footer{ display: none; }
html.sidebar-collapsed .nav-item{ justify-content: center; padding: 10px 8px; }
html.sidebar-collapsed .nav-label{ display: none; }
html.sidebar-collapsed .nav-icon{ width: 22px; height: 22px; }

/* --------------------- Density modes --------------------- */
html[data-density="compact"] .content{ padding: 12px 12px 18px; }
html[data-density="compact"] .card-body{ padding: 12px; }
html[data-density="compact"] .card-header{ padding: 12px 12px; }
html[data-density="compact"] .kpi{ padding: 12px 12px; }
html[data-density="compact"] .btn{ padding: 8px 10px; border-radius: 10px; }
html[data-density="compact"] th, html[data-density="compact"] td{ padding: 8px 8px; }
html[data-density="compact"] .tabs{ padding: 6px; }
html[data-density="compact"] .tab{ padding: 8px 10px; border-radius: 10px; }
html[data-density="compact"] .file-drop{ padding: 12px; }

/* --------------------- Command palette --------------------- */
.cmdk{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1000;
}
.cmdk.open{ display: block; }
.cmdk-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(2,6,23,0.55);
}
.cmdk-dialog{
  position: relative;
  max-width: 720px;
  margin: 9vh auto 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.cmdk-head{
  padding: 14px 16px 10px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}
.cmdk-title{ font-weight: 900; }
.cmdk-hint{ font-size: 12px; color: var(--muted); }
.cmdk-input{
  width: 100%;
  border: 0;
  outline: none;
  padding: 14px 16px;
  font-size: 14px;
  background: var(--surface);
  color: var(--text);
}
.cmdk-list{
  max-height: 52vh;
  overflow: auto;
  padding: 8px;
  display: grid;
  gap: 6px;
}
.cmdk-item{
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  color: var(--text);
  background: rgba(148,163,184,0.06);
}
.cmdk-item:hover{
  background: rgba(37,99,235,0.10);
  border-color: rgba(37,99,235,0.18);
}
.cmdk-item.active{
  background: rgba(37,99,235,0.12);
  border-color: rgba(37,99,235,0.22);
}

/* Alerts: OK state */
.alert.ok{ border-color: rgba(22,163,74,0.22); background: rgba(22,163,74,0.10); }

/* Reduce motion */
@media (prefers-reduced-motion: reduce){
  *{ scroll-behavior: auto !important; transition: none !important; }
}


/* --------------------- Rules meta helpers (v1.5.0) --------------------- */
.rule-meta{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px 0;
}
.btn-small{
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 12px;
}
.flash{
  outline: 2px solid rgba(37, 99, 235, 0.35);
  outline-offset: 2px;
}



/* Mini cards (Rules quick actions) */
.mini{border:1px solid var(--border); background:var(--surface); border-radius:14px; padding:10px; box-shadow: var(--shadow-sm);}
.mini-title{font-weight:700; font-size:13px; color:var(--text);}
.mini-desc{font-size:12px; color:var(--muted); margin-top:2px;}
.mini-actions{margin-top:10px; display:flex; gap:8px; flex-wrap:wrap;}
.details summary{cursor:pointer;}


/* --------------------- Subcard (embedded form blocks) --------------------- */
.subcard{
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.subcard-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.subcard-title{
  font-weight: 900;
  letter-spacing: -0.01em;
}
.subcard-actions{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}
.subcard .help{
  background: var(--surface-2);
}

/* --------------------- Rule tiles (Rules UX) --------------------- */
.rule-tiles{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.rule-tile{
  padding: 14px;
}
.rule-tile-title{
  font-weight: 900;
  letter-spacing: -0.01em;
}
.rule-tile-desc{
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.rule-tile-actions{
  margin-top: 12px;
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}
.rule-tile .badge{
  margin-right: 8px;
}

/* --------------------- Dashboard polish --------------------- */
.kpi-value{
  font-size: 26px;
}
.table-wrap table tbody tr:hover{
  background: rgba(37,99,235,0.04);
}



/* --------------------- Order entry cards --------------------- */
.order-list{
  display: grid;
  gap: 12px;
}
.order-item{
  border: 1px solid var(--border);
  background: rgba(148,163,184,0.06);
  border-radius: 16px;
  padding: 12px;
}
.order-item-grid{
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 2fr) minmax(160px, 1.2fr) repeat(4, minmax(110px, 1fr));
}
.order-item-grid.order-item-grid-wide{
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}
.order-item .field.field-span-2{
  grid-column: 1 / -1;
}
.order-item .field{
  display: grid;
  gap: 6px;
  min-width: 0;
}
.order-item .field.field-full{
  grid-column: 1 / -1;
}
.order-item-actions{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.order-item-meta{
  font-size: 12px;
  color: var(--muted);
}
.order-layout-stack{
  display: grid;
  gap: 14px;
}
.order-layout-stack .card.compact-card .card-body{
  padding: 12px 16px;
}
@media (max-width: 1280px){
  .order-item-grid,
  .order-item-grid.order-item-grid-wide{
    grid-template-columns: repeat(3, minmax(140px, 1fr));
  }
  .order-item .field.field-span-2{
    grid-column: span 2;
  }
}
@media (max-width: 900px){
  .order-item-grid,
  .order-item-grid.order-item-grid-wide{
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }
}
@media (max-width: 640px){
  .order-item-grid,
  .order-item-grid.order-item-grid-wide{
    grid-template-columns: 1fr;
  }
}


.order-issues{
  margin: 12px 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(245,158,11,0.08);
  padding: 12px 14px;
}
.order-issues.error{
  background: rgba(239,68,68,0.08);
}
.order-issues-title{
  font-weight: 900;
  margin-bottom: 6px;
}
.order-issues-list{
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
}
.order-inline-toolbar{
  display:flex;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  margin: 10px 0 0 0;
}
.order-current-meta{
  display:grid;
  gap:6px;
}
.muted-box{
  padding: 10px 12px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: rgba(148,163,184,0.05);
}
.card-aside-note{
  margin-top:8px;
  font-size:12px;
  color:var(--muted);
}


/* --------------------- Calendar dashboard --------------------- */
.plan-calendar-wrap{
  overflow:auto;
  border:1px solid var(--border);
  border-radius:18px;
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}
.plan-calendar{
  width:100%;
  min-width: 1120px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}
.plan-calendar thead th{
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--panel-2);
  color: var(--text);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .02em;
  text-transform: uppercase;
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  min-width: 140px;
}
.plan-calendar tbody td{
  vertical-align: top;
  padding: 0;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.01);
}
.plan-calendar tbody tr:last-child td{
  border-bottom: 0;
}
.plan-calendar th:last-child,
.plan-calendar td:last-child{
  border-right: 0;
}
.plan-calendar .sticky-col{
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 220px;
  width: 220px;
}
.plan-calendar thead .sticky-col{
  z-index: 4;
  background: linear-gradient(180deg, var(--panel-2), rgba(148,163,184,0.12));
}
.plan-line-head{
  background: linear-gradient(180deg, rgba(148,163,184,0.10), rgba(148,163,184,0.05));
  padding: 12px 14px;
}
.plan-line-title{
  font-weight: 900;
  font-size: 14px;
  margin-bottom: 4px;
}
.line-disabled .plan-line-head{
  opacity: 0.78;
}
.line-disabled .plan-cell{
  background: rgba(148,163,184,0.05);
}
.plan-cell{
  min-height: 118px;
  padding: 8px;
  display:flex;
  flex-direction:column;
  gap:8px;
  background: rgba(148,163,184,0.03);
}
.plan-cell.has-plan{
  background: linear-gradient(180deg, rgba(37,99,235,0.06), rgba(37,99,235,0.02));
}
.plan-chip{
  display:grid;
  gap:6px;
  padding:10px 11px;
  border-radius: 14px;
  border:1px solid rgba(37,99,235,0.16);
  background: var(--panel);
  box-shadow: 0 6px 18px rgba(15,23,42,0.06);
}
.plan-chip-top,
.plan-meta{
  display:flex;
  justify-content:space-between;
  gap:8px;
  flex-wrap:wrap;
}
.plan-warehouse{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:2px 8px;
  font-size:11px;
  font-weight:800;
  letter-spacing:.02em;
  text-transform:uppercase;
  background: rgba(37,99,235,0.10);
  color: var(--accent);
}
.plan-window,
.plan-meta,
.plan-meta span{
  font-size:11px;
  color: var(--muted);
}
.plan-profile{
  font-size:13px;
  line-height:1.35;
  font-weight:800;
  color: var(--text);
}
.plan-empty{
  min-height: 94px;
  display:flex;
  align-items:center;
  justify-content:center;
  color: var(--muted);
  font-size: 18px;
}
@media (max-width: 900px){
  .plan-calendar .sticky-col{
    min-width: 180px;
    width: 180px;
  }
  .plan-calendar thead th{
    min-width: 120px;
  }
  .plan-cell{
    min-height: 104px;
  }
}


/* --------------------- v1.16.0 AI cockpit + layout fixes --------------------- */
.main,
.content{
  min-width: 0;
}
.table-wrap,
.plan-calendar-wrap{
  max-width: 100%;
}
.ai-page .content{
  max-width: none;
}
.ai-hero{
  display:grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap:14px;
  align-items:stretch;
}
.ai-hero-score,
.ai-hero-main,
.ai-inline-card{
  position:relative;
  overflow:hidden;
}
.ai-hero-score::before,
.ai-hero-main::before,
.ai-inline-card::before{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(135deg, rgba(37,99,235,0.08), transparent 55%);
  pointer-events:none;
}
.ai-eyebrow{
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:var(--muted);
  font-weight:700;
  margin-bottom:6px;
}
.ai-score{
  font-size:48px;
  line-height:1;
  font-weight:900;
  color:var(--text);
}
.ai-score-label{
  margin-top:6px;
  font-size:14px;
  font-weight:700;
  color:var(--text);
}
.ai-risk-line{
  margin-top:8px;
  font-size:13px;
  color:var(--muted);
}
.ai-mode-chip{
  display:inline-flex;
  align-items:center;
  padding:8px 12px;
  border-radius:999px;
  background: rgba(37,99,235,0.10);
  color: var(--primary);
  font-size:13px;
  font-weight:800;
  margin-top:12px;
}
.ai-headline{
  font-size:15px;
  font-weight:700;
  color:var(--muted);
  margin-bottom:4px;
}
.ai-summary{
  font-size:28px;
  line-height:1.2;
  font-weight:850;
  color:var(--text);
}
.ai-shift-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap:10px;
}
.ai-shift-card{
  border:1px solid var(--border);
  border-radius:16px;
  padding:14px;
  background: var(--surface-2);
}
.ai-shift-label{
  font-size:13px;
  font-weight:700;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:.04em;
}
.ai-shift-value{
  font-size:30px;
  line-height:1;
  font-weight:900;
  margin-top:8px;
}
.ai-checklist{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.ai-check-item{
  display:flex;
  gap:10px;
  align-items:flex-start;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:12px;
  background: var(--surface-2);
}
.ai-check-item::before{
  content:"✓";
  font-weight:900;
  color: var(--success);
  margin-top:1px;
}
.ai-action-list,
.ai-scenario-list,
.ai-risk-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.ai-action-card,
.ai-scenario-card,
.ai-risk-card{
  display:block;
  border:1px solid var(--border);
  border-radius:16px;
  padding:14px;
  background: var(--surface-2);
  box-shadow: var(--shadow-sm);
}
.ai-action-card:hover,
.ai-scenario-card:hover,
.ai-risk-card:hover{
  border-color: rgba(37,99,235,0.35);
  box-shadow: var(--shadow-md);
}
.ai-action-top,
.ai-risk-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}
.ai-action-title,
.ai-scenario-title,
.ai-risk-title{
  font-size:16px;
  font-weight:850;
  color:var(--text);
}
.ai-inline-grid{
  display:grid;
  grid-template-columns: 160px minmax(0, 1fr) auto;
  gap:16px;
  align-items:center;
}
.ai-inline-score{
  border-right:1px solid var(--border);
  padding-right:14px;
}
.ai-inline-value{
  font-size:34px;
  font-weight:900;
  line-height:1;
  margin:4px 0;
}
.ai-risk-card .tag,
.ai-scenario-card .tag{
  background: rgba(37,99,235,0.08);
}
@media (max-width: 1100px){
  .ai-hero,
  .ai-inline-grid{
    grid-template-columns: 1fr;
  }
  .ai-inline-score{
    border-right:none;
    padding-right:0;
    border-bottom:1px solid var(--border);
    padding-bottom:10px;
  }
}
@media (max-width: 900px){
  .ai-summary{
    font-size:22px;
  }
}


.dashboard-meta,
.copilot-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}

/* --------------------- 2026 visual refresh --------------------- */
:root{
  --bg: #0a1326;
  --bg-2: #111d36;
  --surface: #ffffff;
  --surface-2: #f3f6fb;
  --surface-3: #eef4ff;
  --text: #0d172b;
  --muted: #62718d;
  --border: #d8e2f0;
  --primary: #315efb;
  --primary-700: #2548d9;
  --danger: #d63d4d;
  --warning: #c98512;
  --success: #12956c;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 8px 20px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 20px 40px rgba(15, 23, 42, 0.10);
  --content-max: 1560px;
}

body{
  background:
    radial-gradient(circle at top right, rgba(49,94,251,0.09), transparent 26%),
    radial-gradient(circle at top left, rgba(18,149,108,0.06), transparent 20%),
    var(--surface-2);
}

.sidebar{
  background: linear-gradient(180deg, #091226 0%, #0d1730 55%, #0b1327 100%);
}

.topbar{
  background: rgba(255,255,255,0.9);
  border-bottom-color: rgba(142, 156, 183, 0.18);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.03);
}

.content{
  max-width: 1600px;
  padding: 22px 20px 34px;
}

.page-header{ margin-bottom: 18px; }
.page-header .subtitle{ max-width: 980px; line-height: 1.45; }

.card{
  border-color: rgba(148,163,184,0.18);
  box-shadow: var(--shadow-sm);
}
.card-header{
  padding: 16px 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(248,250,255,0.9));
  border-bottom-color: rgba(148,163,184,0.16);
}
.card-body,
.card-footer{ padding: 18px; }

.kpi{
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(245,248,255,0.94));
}
.kpi-value{ font-size: 26px; }

.btn{
  border-radius: 14px;
  min-height: 40px;
}
.btn-primary{
  box-shadow: 0 12px 24px rgba(49,94,251,0.22);
}
.btn-ghost:hover{ background: rgba(49,94,251,0.08); }
.btn-sm,
.btn.btn-sm,
.btn-small{
  padding: 8px 10px;
  min-height: 34px;
  border-radius: 10px;
  font-size: 12px;
}

.stack{ display:grid; gap:14px; }

.plan-calendar thead th{
  background: linear-gradient(180deg, #f8faff, #f2f6ff);
}
.plan-calendar .sticky-col{
  background: linear-gradient(180deg, #fbfcff, #f6f8fd);
}
.plan-chip{
  border-radius: 14px;
  border-color: rgba(49,94,251,0.14);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(241,246,255,0.95));
}

.tech-page .content{ max-width: 1680px; }
.tech-header .actions .input{ min-width: 280px; }
.tech-layout{ grid-template-columns: minmax(560px, 760px) minmax(320px, 1fr); }
@media (max-width: 1200px){
  .tech-layout{ grid-template-columns: 1fr; }
}
.tech-form-card,
.tech-guide-card,
.tech-preview-card{
  box-shadow: var(--shadow-md);
}
.tech-form-card .card-body{ padding: 20px; }
.tech-section-title{
  margin: 16px 0 10px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.tech-line-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 8px;
}
.tech-line-chip{
  display:flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(245,248,255,0.95));
  cursor:pointer;
  font-size:12px;
  font-weight:700;
}
.tech-line-chip input{ margin:0; }
.tech-line-chip.is-disabled{
  opacity:0.62;
  background: linear-gradient(180deg, rgba(248,248,248,0.96), rgba(241,241,241,0.96));
}
.tech-preview-list,
.tech-guide-card .ai-checklist{ display:grid; gap:10px; }
.tech-preview-card .badge{ margin-right:6px; }

.tech-line-hub{ margin-top: 14px; }
.tech-line-summary{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap:12px;
  margin-bottom:14px;
}
@media (max-width: 1100px){
  .tech-line-summary{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px){
  .tech-line-summary{ grid-template-columns: 1fr; }
}
.tech-line-metric{
  padding: 14px 16px;
  border: 1px solid rgba(148,163,184,0.18);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(244,248,255,0.94));
}
.tech-line-metric .value{
  margin-top: 6px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.tech-line-metric .meta{
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}
.tech-line-toolbar{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  justify-content:space-between;
  margin-bottom:12px;
}
.tech-line-toolbar .card-actions{ margin-left:auto; }
.line-hub-table tbody td{ vertical-align: middle; }
.line-hub-table .line-code{ display:inline-flex; align-items:center; gap:8px; font-weight:900; }
.line-window-input{ min-width: 180px; }
.line-inline-note{ display:grid; gap:4px; }
.line-status-flag{ display:inline-flex; align-items:center; gap:6px; font-size:12px; color:var(--muted); }
.line-status-flag .dot{ width:8px; height:8px; border-radius:999px; background: var(--success); }
.line-status-flag.off .dot{ background: var(--danger); }
.card-header .dashboard-meta{ margin-left:auto; }

.ai-copilot-panel{ margin-top: 14px; }
.ai-prompt-pills{ display:flex; flex-wrap:wrap; gap:8px; }
.ai-thread{
  display:flex;
  flex-direction:column;
  gap:10px;
  max-height: 420px;
  overflow:auto;
  margin-bottom:12px;
  padding-right:4px;
}
.ai-msg{
  max-width: 92%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,0.18);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
}
.ai-msg.assistant{
  align-self: flex-start;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(244,248,255,0.96));
}
.ai-msg.user{
  align-self: flex-end;
  background: linear-gradient(180deg, rgba(49,94,251,0.96), rgba(37,72,217,0.96));
  color: #fff;
  border-color: rgba(49,94,251,0.28);
}
.ai-msg.user .ai-msg-meta{ color: rgba(255,255,255,0.86); }
.ai-msg-meta{
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.ai-msg-body{
  white-space: pre-wrap;
  line-height: 1.5;
  font-size: 13px;
}
.ai-msg-links,
.ai-msg-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px;
}
.ai-chat-input{
  min-height: 92px;
  resize: vertical;
}
.ai-copilot-panel.is-loading{
  opacity: 0.96;
}

.table-wrap table.table thead th,
.table-wrap table thead th{
  background: linear-gradient(180deg, #f8faff, #f1f5fd);
}

@media (max-width: 900px){
  .content{ padding: 18px 14px 28px; }
  .ai-msg{ max-width: 100%; }
}

/* ===================== v1.20 UI finish ===================== */
.desktop-only{
  display: inline-flex;
  align-items: center;
}
.topbar-inner{
  min-height: 72px;
}
.topbar-right{
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.topbar-tools{
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

body.has-action-bar .content{
  padding-bottom: 148px;
}
body.has-action-bar .toast-host{
  bottom: 116px;
}
.action-bar{
  left: calc(var(--sidebar-w) + 18px);
  right: 18px;
  bottom: max(14px, env(safe-area-inset-bottom));
  padding: 10px 14px;
  border: 1px solid rgba(148,163,184,0.18);
  border-radius: 20px;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(16px);
}
html[data-theme="dark"] .action-bar{
  background: rgba(15, 23, 42, 0.92);
}
@media (prefers-color-scheme: dark){
  html[data-theme="system"] .action-bar{ background: rgba(15, 23, 42, 0.92); }
}
@media (max-width: 1024px){
  .action-bar{
    left: 12px;
    right: 12px;
    bottom: 12px;
  }
}
.action-bar-inner{
  min-height: 52px;
  justify-content: flex-start;
}
.action-bar .inline,
.action-bar form{
  margin: 0;
}

.auth-screen{
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(49,94,251,0.14), transparent 30%),
    radial-gradient(circle at bottom right, rgba(22,163,74,0.10), transparent 28%),
    linear-gradient(180deg, #f7faff 0%, #eef3fb 100%);
}
.auth-shell{
  max-width: 1480px;
  margin: 0 auto;
  padding: 20px;
}
.auth-topbar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 6px 0 20px;
}
.auth-topbar-actions{
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.auth-main{
  display: grid;
  grid-template-columns: minmax(420px, 1.1fr) minmax(380px, 560px);
  gap: 28px;
  align-items: stretch;
}
@media (max-width: 1100px){
  .auth-main{ grid-template-columns: 1fr; }
}
.auth-hero{
  min-height: 680px;
  border-radius: 28px;
  padding: 42px;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(9,18,38,0.98) 0%, rgba(14,28,59,0.96) 48%, rgba(30,64,175,0.90) 100%);
  box-shadow: 0 32px 60px rgba(15,23,42,0.22);
  position: relative;
  overflow: hidden;
}
.auth-hero::after{
  content: "";
  position: absolute;
  inset: auto -8% -18% auto;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255,255,255,0.18), transparent 68%);
}
.auth-kicker{
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.14);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.auth-hero h1{
  margin-top: 18px;
  font-size: 42px;
  line-height: 1.06;
  letter-spacing: -0.03em;
}
.auth-hero-subtitle{
  margin-top: 16px;
  max-width: 700px;
  color: rgba(255,255,255,0.82);
  font-size: 17px;
  line-height: 1.6;
}
.auth-feature-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 34px;
}
@media (max-width: 780px){
  .auth-feature-grid{ grid-template-columns: 1fr; }
}
.auth-feature-card{
  position: relative;
  z-index: 1;
  padding: 18px 18px 16px;
  border-radius: 20px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
}
.auth-feature-title{
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.auth-feature-text{
  margin-top: 8px;
  color: rgba(255,255,255,0.78);
  font-size: 14px;
  line-height: 1.55;
}
.auth-panel-wrap{
  display: flex;
  align-items: center;
}
.auth-card{
  width: 100%;
  padding: 28px;
  border-radius: 28px;
  border: 1px solid rgba(148,163,184,0.18);
  background: rgba(255,255,255,0.94);
  box-shadow: 0 28px 56px rgba(15, 23, 42, 0.12);
}
.auth-card-head{ margin-bottom: 18px; }
.auth-card-kicker{
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.auth-card h2{
  margin-top: 8px;
  font-size: 30px;
  line-height: 1.1;
}
.auth-card-subtitle{
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.6;
}
.auth-form .form-row + .form-row{ margin-top: 12px; }
.auth-form-actions{
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.auth-note{
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(148,163,184,0.18);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
@media (max-width: 720px){
  .auth-shell{ padding: 14px; }
  .auth-topbar{ padding-bottom: 14px; }
  .auth-topbar-actions{ display:none; }
  .auth-hero{ min-height: auto; padding: 24px; }
  .auth-hero h1{ font-size: 32px; }
  .auth-card{ padding: 22px; }
}

.exception-summary-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
@media (max-width: 980px){
  .exception-summary-grid{ grid-template-columns: 1fr; }
}
.exception-summary-card{
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(148,163,184,0.18);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,249,255,0.96));
  box-shadow: var(--shadow-sm);
}
.exception-summary-card .value{
  margin-top: 8px;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.03em;
}
.exception-summary-card .meta{
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.exception-blocker-list{
  display: grid;
  gap: 10px;
}
.exception-blocker-item{
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(220,38,38,0.14);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(252,245,246,0.96));
}
.exception-blocker-item .head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}
.exception-blocker-item .title{
  font-weight: 800;
}
.exception-blocker-item .meta,
.exception-inline-note{
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.exception-inline-note{ display:grid; gap:6px; }
.exception-fix-hint{
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(49,94,251,0.06);
  border: 1px dashed rgba(49,94,251,0.16);
}
.exception-impact{
  display: inline-flex;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(15,23,42,0.06);
}
.exception-impact.blocking{
  background: rgba(220,38,38,0.10);
  color: #b91c1c;
}
.exception-impact.review{
  background: rgba(217,119,6,0.12);
  color: #b45309;
}
.exception-impact.info{
  background: rgba(37,99,235,0.10);
  color: #1d4ed8;
}
.ai-settings-card .card-body{ padding: 18px; }

/* ===================== v1.21 layout polish ===================== */
.topbar-inner{
  min-height: 64px;
  padding: 8px 20px;
}
@media (min-width: 1280px){
  .topbar-right{ flex-wrap: nowrap; }
}
.content{
  max-width: 1660px;
  padding: 16px 20px 38px;
}
.page-header{
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding: 16px 18px;
  border: 1px solid rgba(148,163,184,0.18);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(245,248,255,0.9));
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}
html[data-theme="dark"] .page-header{
  background: linear-gradient(180deg, rgba(15,23,42,0.92), rgba(17,26,46,0.94));
}
@media (prefers-color-scheme: dark){
  html[data-theme="system"] .page-header{
    background: linear-gradient(180deg, rgba(15,23,42,0.92), rgba(17,26,46,0.94));
  }
}
.page-header .title-wrap{
  display: grid;
  gap: 6px;
}
.page-header .actions{
  gap: 8px;
}
.page-header .actions .input{
  min-width: min(320px, 100%);
}
@media (max-width: 900px){
  .page-header{
    padding: 14px;
    border-radius: 18px;
  }
  .page-header .actions{
    width: 100%;
    justify-content: flex-start;
  }
  .page-header .actions .input{
    min-width: 0;
    width: 100%;
  }
}

.card-body > .table,
.table-wrap table,
.table{
  width: 100%;
}
.table-wrap{
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid rgba(148,163,184,0.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.55);
}
.table-wrap table thead th,
.table-wrap table.table thead th,
.table thead th{
  position: sticky;
  top: 0;
  z-index: 2;
  backdrop-filter: blur(8px);
}
.table-wrap table tbody td,
.table tbody td{
  vertical-align: top;
}
.table-wrap table tbody tr:hover,
.table tbody tr:hover{
  background: rgba(49,94,251,0.05);
}
.alert{
  padding: 14px 16px;
}
.toolbar{
  gap: 10px;
}

body.has-action-bar .content{
  padding-bottom: 168px;
}
body.has-action-bar .toast-host{
  bottom: 124px;
}
.action-bar{
  left: calc(var(--sidebar-w) + 20px);
  right: 20px;
  bottom: max(16px, env(safe-area-inset-bottom));
  padding: 12px 14px;
  border-radius: 22px;
  box-shadow: 0 20px 38px rgba(15, 23, 42, 0.16);
}
@media (max-width: 1024px){
  .content{ padding: 14px 14px 34px; }
  body.has-action-bar .content{ padding-bottom: 184px; }
  .action-bar{
    left: 12px;
    right: 12px;
    bottom: 12px;
  }
}

/* --------------------- v1.24.0 Onboarding + layout kit --------------------- */
.mb-14{ margin-bottom:14px; }
.mb-12{ margin-bottom:12px; }
.mb-10{ margin-bottom:10px; }
.mb-8{ margin-bottom:8px; }
.mt-10{ margin-top:10px; }
.mt-8{ margin-top:8px; }
.mt-6{ margin-top:6px; }
.max-w-820{ max-width: 820px; }
.page-section{ margin-top: 14px; }
.align-start{ align-items: start; }
.toolbar-end{ justify-content: flex-end; }
.toolbar-start{ justify-content: flex-start; }
.toolbar-between{ justify-content: space-between; }
.wrap-gap{ gap: 12px; flex-wrap: wrap; }
.meta-wrap{ gap: 8px; flex-wrap: wrap; }
.kpi-value-sm{ font-size: 20px; }
.filter-card{ margin: 0 0 14px 0; }
.filter-toolbar{ gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.filter-col{ margin: 0; }
.filter-col-wide{ min-width: 220px; }
.filter-col-narrow{ width: 120px; }
.page-actions-wrap{ gap: 10px; flex-wrap: wrap; }
.stack-gap-12{ display:flex; flex-direction:column; gap:12px; }
.form-inline-wrap{ display:flex; gap:16px; align-items:flex-end; flex-wrap:wrap; }
.form-inline-wrap .grow{ flex:1 1 320px; }
.form-actions-vertical{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.upload-grid{ display:grid; gap:14px; }
.upload-grid.two-cols{ grid-template-columns: 1fr 1fr; }
.upload-card{
  border:1px dashed rgba(37,99,235,.25);
  border-radius: 16px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(49,94,251,.04), rgba(255,255,255,0));
  display:flex;
  flex-direction:column;
  gap:12px;
}
html[data-theme="dark"] .upload-card{
  background: linear-gradient(180deg, rgba(49,94,251,.08), rgba(15,23,42,.06));
}
@media (prefers-color-scheme: dark){
  html[data-theme="system"] .upload-card{
    background: linear-gradient(180deg, rgba(49,94,251,.08), rgba(15,23,42,.06));
  }
}
.upload-card-inline{ flex-direction: row; align-items:flex-end; justify-content: space-between; flex-wrap: wrap; }
.upload-card-title{ font-weight: 800; font-size: 14px; }
.upload-card-text{ color: var(--muted); line-height: 1.5; font-size: 13px; }
.upload-card-actions{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.checklist-card{
  border:1px solid var(--border);
  border-radius: 16px;
  background: var(--panel-2);
  padding: 16px;
}
.checklist-title{ font-weight:800; margin-bottom:8px; }
.plain-list{ margin:0; padding-left:18px; }
.compact-list li + li{ margin-top: 4px; }
.compact-alert{ margin:0; }
.setup-banner{
  margin: 0 0 14px 0;
  padding: 18px 20px;
  border-radius: 18px;
  border:1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}
.setup-banner.compact{ padding: 16px 18px; }
.setup-banner-info{ background: linear-gradient(180deg, rgba(49,94,251,.08), rgba(49,94,251,.02)); }
.setup-banner-warn{ background: linear-gradient(180deg, rgba(217,119,6,.10), rgba(217,119,6,.03)); }
.setup-banner-ok{ background: linear-gradient(180deg, rgba(22,163,74,.10), rgba(22,163,74,.03)); }
.setup-banner-head{
  display:flex; justify-content:space-between; gap:16px; align-items:flex-start; flex-wrap:wrap;
}
.setup-banner-kicker{ font-size:11px; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); margin-bottom:6px; }
.setup-banner-title{ font-size:20px; font-weight:900; margin-bottom:4px; }
.setup-banner-text{ color: var(--muted); max-width: 900px; line-height: 1.5; }
.setup-banner-actions{ display:flex; gap:10px; flex-wrap:wrap; }
.setup-progress-row{ display:grid; grid-template-columns: 180px 1fr 56px; align-items:center; gap:12px; margin-top:14px; }
.setup-progress-meta{ font-size:12px; color: var(--muted); }
.setup-progress-track{ height:10px; border-radius:999px; background: rgba(148,163,184,.18); overflow:hidden; }
.setup-progress-track span{ display:block; height:100%; border-radius:999px; background: linear-gradient(90deg, var(--primary), var(--accent)); }
.setup-progress-value{ font-size:12px; font-weight:800; text-align:right; }
.setup-banner-grid{ display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap:12px; margin-top:14px; }
.setup-metric{ background: rgba(255,255,255,.55); border:1px solid rgba(148,163,184,.14); border-radius:14px; padding:12px 14px; }
html[data-theme="dark"] .setup-metric{ background: rgba(15,23,42,.44); }
@media (prefers-color-scheme: dark){
  html[data-theme="system"] .setup-metric{ background: rgba(15,23,42,.44); }
}
.setup-metric-value{ display:block; font-size:24px; font-weight:900; }
.setup-metric-label{ display:block; font-size:12px; color: var(--muted); margin-top:2px; }
.setup-blockers{ margin-top:14px; padding-top:14px; border-top:1px solid var(--border); }
.setup-blockers-title{ font-weight:800; margin-bottom:8px; }
.onboarding-page .content{ max-width: var(--content-max); }
.onboarding-hero{ overflow:hidden; }
.onboarding-hero-head{ display:flex; justify-content:space-between; gap:18px; align-items:flex-start; flex-wrap:wrap; }
.onboarding-kicker{ font-size:11px; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); margin-bottom:6px; }
.onboarding-title{ font-size:24px; font-weight:900; margin-bottom:6px; }
.onboarding-subtitle{ color: var(--muted); line-height:1.6; max-width: 900px; }
.onboarding-progress-ring{
  min-width: 132px; min-height: 132px; border-radius: 999px; border: 10px solid rgba(49,94,251,.14);
  display:grid; place-items:center; text-align:center; background: linear-gradient(180deg, rgba(49,94,251,.05), rgba(255,255,255,0));
}
.onboarding-progress-value{ font-size: 30px; font-weight: 900; line-height: 1; }
.onboarding-stat-grid{ display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap:12px; margin-top:18px; }
.metric-card{ border-radius: 16px; }
.metric-label{ font-size:12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.metric-value{ font-size: 28px; font-weight: 900; margin-top: 4px; }
.metric-meta{ color: var(--muted); font-size: 13px; }
.step-grid{ display:grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap:12px; }
.step-card{
  border:1px solid var(--border); border-radius:16px; padding:14px; background: var(--panel);
  box-shadow: var(--shadow-sm); display:flex; flex-direction:column; gap:10px; min-height: 154px;
}
.step-card:hover{ transform: translateY(-1px); box-shadow: var(--shadow-md); }
.step-card-head{ display:flex; justify-content:space-between; gap:8px; align-items:center; flex-wrap:wrap; }
.step-status-badge{ font-size:11px; font-weight:800; padding:6px 10px; border-radius:999px; background: rgba(148,163,184,.14); }
.step-card.step-done .step-status-badge{ background: rgba(22,163,74,.16); color: var(--success); }
.step-card.step-warning .step-status-badge{ background: rgba(217,119,6,.14); color: var(--warning); }
.step-card.step-missing .step-status-badge{ background: rgba(220,38,38,.12); color: var(--danger); }
.step-card.step-optional .step-status-badge{ background: rgba(49,94,251,.10); color: var(--primary); }
.step-metric{ font-size:12px; color:var(--muted); }
.step-title{ font-weight:800; font-size:15px; }
.step-note{ color:var(--muted); line-height:1.5; font-size:13px; }
.onboarding-grid{ display:grid; gap:14px; grid-template-columns: 1fr 1fr; }
.onboarding-panel{ min-height: 100%; }
@media (max-width: 1180px){
  .upload-grid.two-cols,
  .onboarding-grid,
  .step-grid,
  .onboarding-stat-grid,
  .setup-banner-grid{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px){
  .setup-progress-row{ grid-template-columns: 1fr; }
  .upload-card-inline,
  .form-inline-wrap,
  .toolbar-between,
  .onboarding-hero-head{ align-items:stretch; }
  .upload-grid.two-cols,
  .onboarding-grid,
  .step-grid,
  .onboarding-stat-grid,
  .setup-banner-grid{ grid-template-columns: 1fr; }
  .onboarding-progress-ring{ width: 100%; min-height: 108px; border-width: 8px; }
}

/* --------------------- Onboarding preview + bulk import --------------------- */
.onboarding-bulk-grid,
.preview-hero-grid,
.preview-meta-grid{
  display:grid;
  gap:14px;
}
.onboarding-bulk-grid{
  grid-template-columns: 1.35fr minmax(320px, 1fr);
  align-items:center;
}
.preview-hero-grid{
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.preview-grid{
  display:grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  gap:16px;
}
.preview-meta-grid{
  grid-template-columns: 1fr;
}
.issue-stack{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.preview-issue{
  border:1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  background: var(--panel);
  display:flex;
  flex-direction:column;
  gap:8px;
}
.preview-issue-error{
  border-color: rgba(220,38,38,.22);
  background: rgba(220,38,38,.03);
}
.preview-issue-warning{
  border-color: rgba(217,119,6,.22);
  background: rgba(217,119,6,.04);
}
.preview-issue-head,
.preflight-issue-head{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.preview-issue-title,
.preflight-issue-title{
  font-weight:700;
}
.preview-issue-count,
.preflight-issue-count{
  margin-left:auto;
  font-size:12px;
  color:var(--muted);
}
.chip-cloud{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:8px;
}
.page-block{ margin: 0 0 14px 0; }
.top-gap-6{ margin-top:6px; }
.top-gap-8{ margin-top:8px; }
.scroll-x{ overflow:auto; }

/* --------------------- Run preflight --------------------- */
.preflight-card .card-body{
  display:flex;
  flex-direction:column;
  gap:14px;
}
.preflight-hero{
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:flex-start;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--panel-2);
}
.preflight-hero.ok{
  border-color: rgba(22,163,74,.22);
  background: rgba(22,163,74,.04);
}
.preflight-hero.warn{
  border-color: rgba(217,119,6,.22);
  background: rgba(217,119,6,.04);
}
.preflight-title{
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 4px;
}
.preflight-stats{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:8px;
}
.preflight-issue-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:12px;
}
.preflight-issue-card{
  border:1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  background: var(--panel);
}
.preflight-issue-card.severity-error{
  border-color: rgba(220,38,38,.18);
}
.preflight-issue-card.severity-warning{
  border-color: rgba(217,119,6,.18);
}

@media (max-width: 1100px){
  .preview-hero-grid,
  .preflight-issue-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .preview-grid,
  .onboarding-bulk-grid{
    grid-template-columns: 1fr;
  }
}
@media (max-width: 720px){
  .preview-hero-grid,
  .preflight-issue-grid{
    grid-template-columns: 1fr;
  }
  .preflight-hero{
    flex-direction:column;
  }
  .preflight-stats{
    justify-content:flex-start;
  }
}

/* --------------------- Publish preflight --------------------- */
.publish-preflight-shell .card-body,
.publish-preflight-inline .card-body{
  display:flex;
  flex-direction:column;
  gap:14px;
}
.publish-grid{
  display:grid;
  gap:14px;
}
.publish-grid-2{
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.panel-card.slim-card .card-body,
.panel-card .card-body{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.card-header.compact{
  padding-bottom: 0;
}
.check-item{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  border:1px solid var(--border);
  border-radius:14px;
  padding:12px 14px;
  background: var(--panel);
}
.check-item.check-done{
  border-color: rgba(22,163,74,.20);
  background: rgba(22,163,74,.04);
}
.check-item.check-warning{
  border-color: rgba(217,119,6,.20);
  background: rgba(217,119,6,.04);
}
.check-item.check-missing{
  border-color: rgba(220,38,38,.18);
  background: rgba(220,38,38,.03);
}
.check-title{
  font-weight: 700;
}
.brief-box{
  width:100%;
  min-height: 280px;
  border:1px solid var(--border);
  border-radius:14px;
  background: var(--panel-2);
  color: var(--text);
  padding:14px 16px;
  resize:vertical;
  font: 13px/1.55 var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
}
.publish-risk-grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap:12px;
}
.risk-mini-card{
  border:1px solid var(--border);
  border-radius:14px;
  padding:14px 16px;
  background: var(--panel);
}
.risk-mini-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-bottom:6px;
}
.risk-mini-title{
  font-weight:800;
}
@media (max-width: 1100px){
  .publish-grid-2,
  .publish-risk-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 720px){
  .publish-grid-2,
  .publish-risk-grid{
    grid-template-columns: 1fr;
  }
  .check-item{
    flex-direction:column;
  }
}

/* v1.27.0 — action plan + line hub quick add */
.line-hub-grid{display:grid;grid-template-columns:1.1fr 1fr;gap:14px;margin-bottom:14px;align-items:start}
.line-hub-panel{padding:14px;border:1px solid var(--border);border-radius:18px;background:var(--panel)}
.line-hub-panel .panel-title{font-weight:900;margin-bottom:10px}
.line-quick-grid{gap:10px}
.line-row-actions{white-space:nowrap;vertical-align:top}
.action-plan-card .card-body{padding-top:14px}
.action-plan-hero{display:flex;justify-content:space-between;gap:14px;align-items:flex-start;padding:16px;border-radius:18px;border:1px solid var(--border);background:var(--panel-2)}
.action-plan-hero.ready{border-color:rgba(76,113,255,.35);background:rgba(76,113,255,.08)}
.action-plan-hero.done{border-color:rgba(47,125,90,.28);background:rgba(47,125,90,.08)}
.action-plan-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.action-plan-item{padding:14px;border:1px solid var(--border);border-radius:16px;background:var(--panel)}
.action-plan-item.state-ready{border-color:rgba(76,113,255,.28);background:rgba(76,113,255,.05)}
.action-plan-item.state-done{border-color:rgba(47,125,90,.22);background:rgba(47,125,90,.06)}
.action-plan-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;margin-bottom:8px}
.action-plan-title{font-weight:800;line-height:1.35}
.run-gate-reasons{display:grid;gap:6px;margin:10px 0 0}
@media (max-width: 1200px){
  .line-hub-grid,.action-plan-grid{grid-template-columns:1fr}
}

/* --------------------- Executive dashboard (v1.32.0) --------------------- */
.executive-dashboard-page .content{
  max-width: none;
  padding: 20px 22px 30px;
}
.exec-dashboard-shell{
  display: grid;
  gap: 14px;
}
.exec-hero{
  display: grid;
  grid-template-columns: minmax(340px, .72fr) minmax(720px, 1.28fr);
  gap: 18px;
  padding: 18px;
  background:
    radial-gradient(circle at 4% 0%, rgba(37,99,235,0.10), transparent 30%),
    linear-gradient(135deg, var(--surface), var(--panel-2));
}
.exec-hero-title h1{
  margin: 5px 0 6px;
  font-size: clamp(26px, 2.2vw, 38px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}
.exec-hero-title p{
  margin: 0;
  color: var(--muted);
  max-width: 700px;
}
.exec-filter-panel{
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 10px;
  align-items: end;
}
.exec-filter-field{
  display: grid;
  gap: 5px;
  min-width: 0;
}
.exec-filter-field span{
  font-size: 11px;
  font-weight: 900;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.exec-filter-field.search{ grid-column: span 2; }
.exec-filter-actions{
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}
.exec-kpi-row{
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
}
.exec-kpi{
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: center;
  padding: 15px;
  min-height: 92px;
  overflow: hidden;
}
.exec-kpi-icon{
  width: 42px;
  height: 42px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  font-weight: 950;
  font-size: 20px;
  border: 1px solid currentColor;
  background: rgba(255,255,255,.56);
}
html[data-theme="dark"] .exec-kpi-icon{ background: rgba(15,23,42,.55); }
.exec-kpi-label{ color: var(--muted); font-size: 12px; font-weight: 800; }
.exec-kpi-value{ margin-top: 4px; font-size: 24px; font-weight: 950; letter-spacing: -.04em; }
.exec-kpi-share{ margin-top: 2px; font-size: 12px; font-weight: 950; }
.exec-kpi.green{ color: #16a34a; }
.exec-kpi.blue{ color: #2563eb; }
.exec-kpi.purple{ color: #7c3aed; }
.exec-kpi.orange{ color: #f97316; }
.exec-kpi.red{ color: #ef4444; }
.exec-kpi .exec-kpi-label,
.exec-kpi .exec-kpi-value{ color: var(--text); }
.exec-main-grid{
  display: grid;
  grid-template-columns: minmax(640px, 1.04fr) minmax(560px, .96fr);
  gap: 14px;
  align-items: stretch;
}
.exec-chart-stack{
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 14px;
}
.exec-plan-card{ min-width: 0; }
.exec-table-wrap{ max-height: 520px; overflow: auto; border-radius: 0 0 var(--radius) var(--radius); border-left: 0; border-right: 0; border-bottom: 0; }
.exec-table th,
.exec-table td{ white-space: nowrap; }
.exec-table td:nth-child(3){ white-space: normal; min-width: 180px; }
.link-strong{ color: var(--primary); font-weight: 900; }
.strong{ font-weight: 900; }
.empty-cell{ text-align: center; color: var(--muted); padding: 26px !important; }
.exec-product-chip{
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  border: 1px solid rgba(148,163,184,.18);
}
.exec-product-chip.ok{ color:#15803d; background: rgba(22,163,74,.10); }
.exec-product-chip.lam{ color:#1d4ed8; background: rgba(37,99,235,.10); }
.exec-chart-card .card-header.compact{ padding: 12px 14px; }
.exec-svg-chart{ position: relative; padding: 8px 12px 20px; }
.exec-svg-chart svg{ width: 100%; height: 200px; display: block; overflow: visible; }
.exec-axis{ stroke: rgba(100,116,139,.45); stroke-width: 1; }
.exec-grid-line{ stroke: rgba(148,163,184,.22); stroke-width: 1; }
.exec-line{ stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 4px 6px rgba(15,23,42,.12)); }
.exec-line.local{ stroke:#2563eb; }
.exec-line.export{ stroke:#ef4444; }
.exec-chart-scale{ position:absolute; right:18px; top:4px; font-size:11px; color:var(--muted); font-weight:800; }
.exec-chart-ticks{ position: relative; height: 18px; margin: -10px 30px 0; color: var(--muted); font-size: 10px; }
.exec-chart-ticks span{ position: absolute; transform: translateX(-50%); white-space: nowrap; }
.exec-legend{ display:flex; gap:10px; align-items:center; justify-content:center; color:var(--muted); font-size:12px; font-weight:800; }
.exec-legend span{ width: 18px; height: 5px; border-radius: 999px; display:inline-block; margin-left:8px; }
.exec-legend .local{ background:#2563eb; }
.exec-legend .export{ background:#ef4444; }
.exec-legend .ok{ background:#16a34a; }
.exec-legend .lam{ background:#2563eb; }
.exec-bars{
  height: 208px;
  padding: 12px 12px 22px;
  display:flex;
  align-items:flex-end;
  gap: min(8px, .6vw);
  border-bottom: 1px solid rgba(148,163,184,.20);
  margin: 0 12px;
}
.exec-bar-col{ flex:1; min-width:6px; height:100%; display:flex; flex-direction:column; justify-content:flex-end; align-items:center; gap:4px; }
.exec-bar-stack{ width:100%; height:170px; display:flex; align-items:flex-end; justify-content:center; gap:2px; }
.exec-bar-stack span{ display:block; width:45%; min-height:1px; border-radius: 6px 6px 0 0; }
.exec-bar-stack .ok{ background:#16a34a; }
.exec-bar-stack .lam{ background:#2563eb; }
.exec-bar-col small{ color:var(--muted); font-size:9px; transform: rotate(-45deg); transform-origin:center; white-space:nowrap; }
.exec-lower-grid{
  display: grid;
  grid-template-columns: minmax(420px, .95fr) minmax(420px, .95fr) minmax(340px, .72fr);
  gap: 14px;
  align-items: stretch;
}
.exec-compact-table .table th,
.exec-compact-table .table td{ padding: 9px 10px; }
.exec-load,
.exec-hbar{
  position: relative;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148,163,184,.16);
  min-width: 90px;
}
.exec-load span,
.exec-hbar span{
  position:absolute;
  inset:0 auto 0 0;
  border-radius: inherit;
}
.exec-load span.ok,
.exec-hbar span.green{ background:#16a34a; }
.exec-load span.warn{ background:#f59e0b; }
.exec-load span.danger{ background:#ef4444; }
.exec-hbar span.blue{ background:#2563eb; }
.exec-hbar span.purple{ background:#7c3aed; }
.exec-structure-body{
  display:grid;
  grid-template-columns: minmax(220px, .92fr) minmax(220px, 1fr);
  gap: 18px;
  align-items:center;
}
.exec-donut-wrap{
  display:flex;
  align-items:center;
  gap: 16px;
}
.exec-donut{
  width: 142px;
  height: 142px;
  border-radius: 50%;
  display:grid;
  place-items:center;
  flex: 0 0 auto;
  background:
    conic-gradient(
      #16a34a 0 calc(var(--export-ok, 0) * 1%),
      #2563eb calc(var(--export-ok, 0) * 1%) calc((var(--export-ok, 0) + var(--export-lam, 0)) * 1%),
      #7c3aed calc((var(--export-ok, 0) + var(--export-lam, 0)) * 1%) 100%
    );
  box-shadow: inset 0 0 0 1px rgba(148,163,184,.18), 0 12px 26px rgba(15,23,42,.10);
}
.exec-donut-center{
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--surface);
  display:grid;
  place-items:center;
  align-content:center;
  border: 1px solid rgba(148,163,184,.20);
  text-align:center;
}
.exec-donut-center b{ font-size: 18px; line-height: 1; }
.exec-donut-center span{ color: var(--muted); font-size: 12px; font-weight: 800; }
.exec-structure-list{ display:grid; gap: 9px; min-width: 0; }
.exec-structure-list div{ display:grid; grid-template-columns: auto 1fr; gap: 4px 8px; align-items:center; font-size: 12px; }
.exec-structure-list span:last-child{ grid-column: 2; color: var(--muted); }
.exec-dot{ width:10px; height:10px; border-radius:50%; display:inline-block; }
.exec-dot.green{ background:#16a34a; }
.exec-dot.blue{ background:#2563eb; }
.exec-dot.purple{ background:#7c3aed; }
.exec-product-bars{ display:grid; gap: 13px; }
.exec-product-bar-row{ display:grid; gap:6px; }
.exec-product-bar-label{ display:flex; align-items:center; justify-content:space-between; gap:12px; font-size:12px; }
.exec-product-bar-label span{ color: var(--muted); font-weight: 800; }
.exec-risk-list{ display:grid; gap: 10px; }
.exec-risk-row{
  display:grid;
  grid-template-columns: 42px 1fr auto;
  gap: 10px;
  align-items:center;
  padding: 11px;
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,.18);
  background: rgba(148,163,184,.06);
}
.exec-risk-icon{
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display:grid;
  place-items:center;
  font-weight: 950;
  border:1px solid currentColor;
}
.exec-risk-text{ display:grid; gap:2px; min-width:0; }
.exec-risk-text b{ font-size: 13px; }
.exec-risk-text span{ color: var(--muted); font-size: 12px; line-height:1.25; }
.exec-risk-count{
  min-width: 34px;
  height: 30px;
  border-radius: 999px;
  display:grid;
  place-items:center;
  font-weight: 950;
  background: rgba(255,255,255,.8);
  border: 1px solid rgba(148,163,184,.18);
}
html[data-theme="dark"] .exec-risk-count{ background: rgba(15,23,42,.75); }
.exec-risk-row.red{ color:#ef4444; background: rgba(239,68,68,.07); }
.exec-risk-row.orange{ color:#f97316; background: rgba(249,115,22,.07); }
.exec-risk-row.yellow{ color:#d97706; background: rgba(217,119,6,.07); }
.exec-risk-row.blue{ color:#2563eb; background: rgba(37,99,235,.07); }
.exec-summary-card{ margin-bottom: 8px; }
.exec-direction-grid{ display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.exec-direction-card{
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(148,163,184,.18);
  background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(247,250,255,.92));
}
html[data-theme="dark"] .exec-direction-card{ background: linear-gradient(135deg, rgba(15,23,42,.96), rgba(17,26,46,.92)); }
.exec-direction-card.green{ box-shadow: inset 4px 0 0 #16a34a; }
.exec-direction-card.blue{ box-shadow: inset 4px 0 0 #2563eb; }
.exec-direction-card.purple{ box-shadow: inset 4px 0 0 #7c3aed; }
.exec-direction-title{ font-weight: 950; font-size: 15px; }
.exec-direction-volume{ margin-top: 10px; font-size: 28px; font-weight: 950; letter-spacing: -.04em; }
.exec-direction-volume span{ font-size: 13px; color: var(--muted); letter-spacing: 0; }
.exec-direction-share{ margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 800; }
.exec-direction-split{ display:grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(148,163,184,.18); }
.exec-direction-split div{ display:grid; gap: 4px; }
.exec-direction-split span{ color: var(--muted); font-size: 12px; }
.exec-direction-split b{ font-size: 13px; }
@media (max-width: 1480px){
  .exec-kpi-row{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .exec-hero{ grid-template-columns: 1fr; }
  .exec-filter-panel{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .exec-filter-field.search{ grid-column: span 2; }
}
@media (max-width: 1180px){
  .exec-main-grid,
  .exec-lower-grid{ grid-template-columns: 1fr; }
  .exec-chart-stack{ grid-template-rows: auto; }
  .exec-direction-grid{ grid-template-columns: 1fr; }
}
@media (max-width: 780px){
  .exec-kpi-row{ grid-template-columns: 1fr; }
  .exec-filter-panel{ grid-template-columns: 1fr; }
  .exec-filter-field.search{ grid-column: auto; }
  .exec-filter-actions{ justify-content:flex-start; flex-wrap:wrap; }
  .exec-structure-body,
  .exec-donut-wrap{ grid-template-columns: 1fr; flex-direction:column; align-items:flex-start; }
  .exec-direction-split{ grid-template-columns: 1fr; }
}

/* --------------------- Lamination workshop dashboard (v1.33.0) --------------------- */
.lamination-dashboard-page .content{
  max-width: none;
  padding: 20px 22px 30px;
}
.lam-shell{ gap: 14px; }
.lam-hero{
  background:
    radial-gradient(circle at 4% 0%, rgba(37,99,235,0.14), transparent 32%),
    radial-gradient(circle at 82% 0%, rgba(16,185,129,0.10), transparent 28%),
    linear-gradient(135deg, var(--surface), var(--panel-2));
}
.lam-hero-meta{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:14px;
}
.lam-kpi-row{
  grid-template-columns: repeat(8, minmax(0, 1fr));
}
.lam-main-grid{
  display:grid;
  grid-template-columns: minmax(720px, 1.12fr) minmax(500px, .88fr);
  gap:14px;
  align-items:stretch;
}
.lam-lines-grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap:10px;
}
.lam-line-card{
  border:1px solid rgba(148,163,184,.22);
  border-radius:16px;
  padding:12px;
  background:linear-gradient(180deg, rgba(255,255,255,.92), rgba(248,250,252,.74));
  min-width:0;
}
html[data-theme="dark"] .lam-line-card{
  background:linear-gradient(180deg, rgba(15,23,42,.86), rgba(17,24,39,.72));
}
.lam-line-top,
.lam-line-metrics,
.lam-line-foot{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.lam-line-top b{ font-size:14px; }
.lam-line-metrics{
  margin-top:10px;
  color:var(--muted);
  font-size:12px;
  font-weight:800;
}
.lam-line-load{ margin:10px 0 6px; min-width:0; }
.lam-line-foot{
  color:var(--muted);
  font-size:11px;
  font-weight:800;
}
.truncate{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.exec-line.lam-plan{ stroke:#2563eb; }
.exec-line.lam-done{ stroke:#16a34a; }
.exec-legend .lam-plan{ background:#2563eb; }
.exec-legend .lam-done{ background:#16a34a; }
.lam-table-wrap{ max-height:620px; }
.lam-table th,
.lam-table td{ vertical-align:top; }
.lam-status-form{
  display:grid;
  grid-template-columns: minmax(116px, .8fr) minmax(140px, 1fr) auto;
  gap:6px;
  align-items:start;
  min-width:310px;
}
.compact-input{
  min-height:34px;
  padding-top:6px;
  padding-bottom:6px;
}
@media (max-width: 1540px){
  .lam-kpi-row{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lam-lines-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1180px){
  .lam-main-grid{ grid-template-columns:1fr; }
  .lam-lines-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 780px){
  .lam-kpi-row,
  .lam-lines-grid{ grid-template-columns:1fr; }
  .lam-status-form{ grid-template-columns:1fr; min-width:0; }
}


/* --------------------- Warehouse management dashboard (v1.34.0) --------------------- */
.warehouse-dashboard-page .content{
  max-width:none;
  padding:20px 22px 32px;
}
.wms-shell{ gap:14px; }
.wms-hero{
  background:
    radial-gradient(circle at 4% 0%, rgba(59,130,246,.15), transparent 34%),
    radial-gradient(circle at 85% 0%, rgba(34,197,94,.10), transparent 30%),
    linear-gradient(135deg, var(--surface), var(--panel-2));
}
.wms-filter-panel{ grid-template-columns: minmax(320px, 1.2fr) minmax(180px,.5fr) minmax(180px,.5fr) auto; }
.wms-kpi-row{ grid-template-columns: repeat(6, minmax(0, 1fr)); }
.wms-main-grid{
  display:grid;
  grid-template-columns: minmax(760px, 1.15fr) minmax(420px, .85fr);
  gap:14px;
  align-items:stretch;
}
.wms-action-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:12px;
}
.wms-action-card{
  border:1px solid rgba(148,163,184,.22);
  border-radius:18px;
  padding:14px;
  display:grid;
  gap:9px;
  background:linear-gradient(180deg, rgba(255,255,255,.92), rgba(248,250,252,.70));
}
html[data-theme="dark"] .wms-action-card{
  background:linear-gradient(180deg, rgba(15,23,42,.86), rgba(17,24,39,.72));
}
.wms-action-title{
  font-size:15px;
  font-weight:950;
  letter-spacing:-.02em;
}
.wms-action-card label{
  display:grid;
  gap:5px;
  color:var(--muted);
  font-size:12px;
  font-weight:850;
}
.wms-mini-grid{
  display:grid;
  grid-template-columns: 1fr 1fr minmax(82px,.45fr);
  gap:8px;
}
.wms-sync-card{
  align-content:start;
}
.wms-table-wrap{ max-height:560px; }
.wms-order-wrap{ max-height:620px; }
.wms-history-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:14px;
}
.wms-history-wrap{ max-height:420px; }
.wms-table th,
.wms-table td{ vertical-align:top; }
.wms-inline-form{
  display:grid;
  grid-template-columns: minmax(72px,.6fr) minmax(72px,.6fr) auto;
  gap:6px;
  align-items:start;
  min-width:210px;
  margin-bottom:6px;
}
.wms-ship-form{
  display:grid;
  grid-template-columns: minmax(90px,.55fr) minmax(150px,1fr) auto;
  gap:6px;
  align-items:start;
  min-width:340px;
}
.text-danger{ color:#ef4444; font-weight:950; }
.btn.small{ min-height:28px; padding:4px 8px; font-size:12px; }
@media (max-width: 1540px){
  .wms-kpi-row{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wms-main-grid{ grid-template-columns:1fr; }
  .wms-action-grid{ grid-template-columns:1fr 1fr; }
}
@media (max-width: 980px){
  .wms-filter-panel,
  .wms-action-grid,
  .wms-history-grid{ grid-template-columns:1fr; }
  .wms-kpi-row{ grid-template-columns:1fr; }
  .wms-mini-grid,
  .wms-inline-form,
  .wms-ship-form{ grid-template-columns:1fr; min-width:0; }
}

/* --------------------- Raw materials / TMC warehouses (v1.35.0) --------------------- */
.materials-dashboard-page .content{
  max-width:none;
  padding:20px 22px 32px;
}
.materials-hero{
  background:
    radial-gradient(circle at 4% 0%, rgba(37,99,235,.14), transparent 32%),
    radial-gradient(circle at 82% 0%, rgba(245,158,11,.13), transparent 30%),
    linear-gradient(135deg, var(--surface), var(--panel-2));
}
.materials-filter-panel{ grid-template-columns:minmax(190px,.52fr) minmax(320px,1.1fr) minmax(190px,.55fr) auto; }
.materials-kpi-row{ grid-template-columns:repeat(7,minmax(132px,1fr)); }
.materials-main-grid{ grid-template-columns:minmax(900px,1.25fr) minmax(360px,.75fr); }
.materials-action-grid{ grid-template-columns:repeat(4,minmax(0,1fr)); }
.materials-mini-grid-4{ grid-template-columns:1fr .8fr .55fr .65fr; }
.materials-mini-grid-2{ grid-template-columns:1fr 1fr; }
.materials-table-wrap{ max-height:620px; }
.materials-demand-grid{ display:grid; grid-template-columns:minmax(620px,1.1fr) minmax(400px,.9fr); gap:14px; }
.materials-history-grid{ margin-top:14px; }
.materials-table th,
.materials-table td{ vertical-align:top; }
.pill.ok{ color:#16a34a; border-color:rgba(22,163,74,.24); background:rgba(22,163,74,.08); }
@media (max-width: 1680px){
  .materials-action-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .materials-main-grid,
  .materials-demand-grid{ grid-template-columns:1fr; }
}
@media (max-width: 980px){
  .materials-filter-panel,
  .materials-action-grid,
  .materials-kpi-row,
  .materials-mini-grid-4,
  .materials-mini-grid-2{ grid-template-columns:1fr; }
}

/* --------------------- Manual materials entry (v1.38.0) --------------------- */
.materials-master-card{
  background:
    radial-gradient(circle at 12% 0%, rgba(37,99,235,.10), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,250,252,.78));
}
html[data-theme="dark"] .materials-master-card{
  background:
    radial-gradient(circle at 12% 0%, rgba(59,130,246,.14), transparent 34%),
    linear-gradient(180deg, rgba(15,23,42,.90), rgba(17,24,39,.72));
}
.materials-excel-entry{ margin-top:14px; }
.materials-entry-wrap{ max-height:430px; }
.materials-entry-table{ min-width:1680px; }
.materials-entry-table th,
.materials-entry-table td{ white-space:nowrap; vertical-align:middle; }
.materials-entry-table .input{ width:100%; min-width:96px; }
.materials-entry-table td:nth-child(2) .input{ min-width:140px; }
.materials-entry-table td:nth-child(3) .input{ min-width:220px; }
.materials-entry-table td:nth-child(5) .input{ min-width:170px; }
.materials-entry-actions{
  display:flex;
  gap:12px;
  align-items:center;
  padding:12px 14px 14px;
  border-top:1px solid rgba(148,163,184,.18);
}
.materials-recipe-inline{
  display:grid;
  grid-template-columns:minmax(92px,.7fr) minmax(82px,.55fr) auto;
  gap:6px;
  align-items:start;
  min-width:260px;
  margin-bottom:6px;
}
@media (max-width: 980px){
  .materials-entry-actions{ flex-direction:column; align-items:flex-start; }
  .materials-recipe-inline{ grid-template-columns:1fr; min-width:0; }
}

/* --------------------- Operational tabbed UX (v1.39.0) --------------------- */
.warehouse-dashboard-page .content,
.materials-dashboard-page .content,
.sales-dashboard-page .content{
  overflow-x: hidden;
}
.ops-tabbed-shell,
.ops-tabbed-shell .card,
.ops-tabbed-shell .tab-panels,
.ops-tabbed-shell .tab-panel{
  min-width: 0;
}
.compact-hero{
  align-items: start;
  padding: 18px;
}
.compact-hero h1{ margin-bottom: 4px; }
.compact-hero p{ max-width: 980px; }
.compact-filter-panel{
  align-self: start;
}
.compact-kpi-row{
  gap: 10px;
}
.compact-kpi-row .exec-kpi{
  padding: 12px;
  min-height: 82px;
}
.compact-kpi-row .exec-kpi-icon{
  width: 40px;
  height: 40px;
  font-size: 18px;
}
.compact-kpi-row .exec-kpi-value{ font-size: 24px; }
.ops-tabs{
  position: sticky;
  top: 64px;
  z-index: 30;
  margin-top: 6px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}
.ops-tab-panels{
  margin-top: 12px;
}
.ops-dashboard-grid{
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr);
  gap: 14px;
  align-items: stretch;
}
.ops-two-col-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}
.ops-flow-list{
  display: grid;
  gap: 10px;
}
.ops-flow-step{
  border: 1px solid rgba(148,163,184,.22);
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(248,250,252,.64);
  color: var(--text);
  text-decoration: none;
  display: grid;
  gap: 4px;
}
.ops-flow-step:hover{
  border-color: rgba(37,99,235,.30);
  background: rgba(37,99,235,.06);
}
.ops-flow-step b{
  font-size: 14px;
  letter-spacing: -.01em;
}
.ops-flow-step span{
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
html[data-theme="dark"] .ops-flow-step{
  background: rgba(15,23,42,.56);
}
.ops-form .form-grid,
.form-grid.form-grid-2,
.form-grid.form-grid-3,
.form-grid.form-grid-4{
  display: grid;
  gap: 10px;
}
.form-grid.form-grid-2{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.form-grid-3{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.form-grid-4{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
.field-span-2{ grid-column: span 2; }
.field-full{ grid-column: 1 / -1; }
.toolbar-right{ justify-content: flex-end; }
.compact-table-wrap{ max-height: 420px; }
.materials-entry-table{
  min-width: 1120px;
}
.materials-entry-table td:nth-child(3) .input{ min-width: 180px; }
.materials-entry-table td:nth-child(5) .input{ min-width: 150px; }
.sales-workflow-shell{
  display: grid;
  gap: 14px;
}
.compact-page-header{
  margin-bottom: 0;
}
.sales-head-grid{ margin-bottom: 14px; }
.sales-order-list{ margin-top: 12px; }
.sales-order-item-grid{
  grid-template-columns: minmax(280px, 1.4fr) repeat(4, minmax(130px, .6fr));
}
.sales-submit-bar{
  margin-top: 12px;
}
.sales-orders-table-wrap{ max-height: 640px; }
@media (max-width: 1500px){
  .ops-dashboard-grid,
  .ops-two-col-grid{ grid-template-columns: 1fr; }
  .materials-kpi-row{ grid-template-columns: repeat(7, minmax(132px,1fr)); }
  .sales-order-item-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* --------------------- Recipes and production workspaces (v1.40.0) --------------------- */
.materials-dashboard-page .content,
.production-dashboard-page .content{
  max-width:none;
  padding:20px 22px 32px;
  overflow-x:hidden;
}
.recipe-filter-panel{
  grid-template-columns:minmax(180px,.42fr) minmax(220px,.65fr) minmax(180px,.45fr) minmax(320px,1fr) auto;
}
.recipe-kpi-row{ grid-template-columns:repeat(5,minmax(0,1fr)); }
.recipe-group-table-wrap{ max-height:540px; }
.recipe-line-edit{
  display:grid;
  grid-template-columns:minmax(90px,.65fr) minmax(90px,.65fr) auto auto;
  gap:6px;
  align-items:center;
  min-width:360px;
}
.category-manager-grid{
  display:grid;
  grid-template-columns:minmax(360px,.8fr) minmax(520px,1.2fr);
  gap:14px;
  align-items:start;
}
.production-shell{
  display:grid;
  gap:14px;
}
.production-hero{
  background:
    radial-gradient(circle at 5% 0%, rgba(37,99,235,.14), transparent 32%),
    radial-gradient(circle at 86% 0%, rgba(34,197,94,.12), transparent 32%),
    linear-gradient(135deg, var(--surface), var(--panel-2));
}
.production-filter-panel{ grid-template-columns:repeat(4,minmax(130px,1fr)) auto; }
.production-kpi-row{ grid-template-columns:repeat(6,minmax(0,1fr)); }
.production-dashboard-grid{
  display:grid;
  grid-template-columns:minmax(0,1.15fr) minmax(360px,.85fr);
  gap:14px;
  align-items:start;
}
.production-detail-grid{
  display:grid;
  grid-template-columns:minmax(720px,1.2fr) minmax(380px,.8fr);
  gap:14px;
  align-items:start;
}
.production-table-wrap{ max-height:680px; }
.production-status-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}
.production-step-card{
  border:1px solid rgba(148,163,184,.22);
  border-radius:16px;
  padding:12px;
  background:rgba(248,250,252,.72);
}
.production-step-card b{ display:block; margin-bottom:4px; }
.production-step-card span{ color:var(--muted); font-size:12px; line-height:1.35; }
html[data-theme="dark"] .production-step-card{ background:rgba(15,23,42,.56); }
@media (max-width: 1600px){
  .materials-kpi-row{ grid-template-columns:repeat(7,minmax(132px,1fr)); }
  .recipe-kpi-row{ grid-template-columns:repeat(3,minmax(0,1fr)); }
  .production-kpi-row{ grid-template-columns:repeat(3,minmax(0,1fr)); }
  .production-dashboard-grid,
  .production-detail-grid,
  .category-manager-grid{ grid-template-columns:1fr; }
}
@media (max-width: 980px){
  .materials-kpi-row,
  .recipe-filter-panel,
  .production-filter-panel,
  .recipe-kpi-row,
  .production-kpi-row,
  .production-status-grid,
  .recipe-line-edit{ grid-template-columns:1fr; min-width:0; }
}

@media (max-width: 980px){
  .ops-tabs{ position: static; }
  .form-grid.form-grid-2,
  .form-grid.form-grid-3,
  .form-grid.form-grid-4,
  .sales-order-item-grid,
  .sales-head-grid{ grid-template-columns: 1fr; }
  .field-span-2,
  .field-full{ grid-column: auto; }
  .compact-hero{ padding: 14px; }
}

/* --------------------- v1.41.0: compact professional shell + multi-material recipes --------------------- */
.sidebar{ box-sizing:border-box; overflow-x:hidden; }
.nav-item{
  min-height:44px;
  height:44px;
  width:100%;
  box-sizing:border-box;
  overflow:hidden;
}
.nav-label{
  min-width:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.nav-icon{ flex:0 0 22px; }
.nav-item.active{ box-shadow: inset 3px 0 0 rgba(96,165,250,.85); }

/* Auto-compact sidebar on medium desktop so operational cards keep one clean row. */
@media (max-width: 1700px) and (min-width: 981px){
  :root{ --sidebar-w:82px; }
  .sidebar{ padding-left:10px; padding-right:10px; }
  .brand{ justify-content:center; }
  .brand-text,
  .nav-label,
  .sidebar-footer{ display:none !important; }
  .sidebar-nav{ padding:6px 0; }
  .nav-item{ justify-content:center; padding:10px 8px; }
  .nav-icon{ width:22px; height:22px; }
}

.materials-kpi-row,
.compact-kpi-row.materials-kpi-row{
  grid-template-columns:repeat(7,minmax(0,1fr));
  align-items:stretch;
}
.materials-kpi-row .exec-kpi{ min-width:0; grid-template-columns:38px minmax(0,1fr); }
.materials-kpi-row .exec-kpi-value{ font-size:22px; }
.materials-kpi-row .exec-kpi-label,
.materials-kpi-row .exec-kpi-share{ overflow:hidden; text-overflow:ellipsis; }
@media (max-width: 1260px){
  .materials-kpi-row{
    display:grid;
    grid-auto-flow:column;
    grid-auto-columns:minmax(180px,1fr);
    grid-template-columns:none !important;
    overflow-x:auto;
    padding-bottom:4px;
  }
}

.recipe-bulk-card .recipe-head-grid{ margin-bottom:12px; }
.recipe-lines-editor{
  border:1px solid rgba(148,163,184,.22);
  border-radius:18px;
  overflow:hidden;
  background:rgba(248,250,252,.62);
}
html[data-theme="dark"] .recipe-lines-editor{ background:rgba(15,23,42,.52); }
.recipe-lines-head,
.recipe-line-row{
  display:grid;
  grid-template-columns:minmax(260px,1.25fr) minmax(130px,.55fr) minmax(100px,.45fr) minmax(92px,.35fr);
  gap:8px;
  align-items:center;
}
.recipe-lines-head{
  padding:10px 12px;
  color:var(--muted);
  font-weight:900;
  font-size:12px;
  background:rgba(148,163,184,.10);
  border-bottom:1px solid rgba(148,163,184,.16);
}
.recipe-line-row{ padding:8px 12px; border-bottom:1px solid rgba(148,163,184,.12); }
.recipe-line-row:last-child{ border-bottom:0; }
@media (max-width: 980px){
  .recipe-lines-head{ display:none; }
  .recipe-line-row{ grid-template-columns:1fr; }
}

.run-workflow-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin-bottom:14px;
}
.run-workflow-card{
  padding:14px;
  border-radius:18px;
  border:1px solid rgba(148,163,184,.22);
  background:linear-gradient(180deg,rgba(255,255,255,.92),rgba(248,250,252,.72));
  box-shadow:0 10px 24px rgba(15,23,42,.06);
  min-height:118px;
  display:grid;
  gap:6px;
}
html[data-theme="dark"] .run-workflow-card{ background:rgba(15,23,42,.62); }
.run-workflow-card b{ font-size:15px; }
.run-workflow-card span{ color:var(--muted); font-size:12px; line-height:1.35; }
.run-workflow-num{
  width:34px;height:34px;border-radius:12px;display:grid;place-items:center;
  background:rgba(37,99,235,.12); color:var(--primary); font-weight:950;
}
.run-create-card{ max-width:720px; }
@media (max-width: 1200px){ .run-workflow-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width: 760px){ .run-workflow-grid{ grid-template-columns:1fr; } }

.production-flow-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin-bottom:14px;
}
.production-flow-card{
  border:1px solid rgba(148,163,184,.22);
  border-radius:16px;
  padding:12px;
  background:rgba(248,250,252,.70);
  display:grid;
  gap:6px;
}
.production-flow-card b{ font-size:14px; }
.production-flow-card span{ color:var(--muted); font-size:12px; }
.production-flow-card .big{ font-size:24px; font-weight:950; letter-spacing:-.03em; color:var(--text); }
html[data-theme="dark"] .production-flow-card{ background:rgba(15,23,42,.56); }
@media (max-width: 1200px){ .production-flow-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width: 760px){ .production-flow-grid{ grid-template-columns:1fr; } }

/* Dynamic multi-material recipes (v1.41.0) */
.recipe-line-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding-top:10px;
  border-top:1px dashed rgba(148,163,184,.34);
}
@media (max-width: 820px){
  .recipe-line-actions{align-items:flex-start; flex-direction:column;}
}
.run-context-chip{
  min-height:44px;
  display:flex;
  align-items:center;
  padding:0 14px;
  border:1px solid rgba(59,130,246,.22);
  border-radius:14px;
  background:linear-gradient(135deg, rgba(59,130,246,.10), rgba(16,185,129,.08));
  color:#0f172a;
  font-weight:800;
}

/* --------------------- v1.42.0: core stabilization dashboard blocks --------------------- */
.exec-data-quality-card{ margin-top: 14px; }
.exec-data-quality-body{
  display:grid;
  grid-template-columns: minmax(360px,.9fr) minmax(480px,1.1fr);
  gap:14px;
  align-items:stretch;
}
.exec-quality-kpis{
  display:grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap:10px;
}
.exec-quality-kpi{
  padding:14px;
  border-radius:16px;
  border:1px solid rgba(148,163,184,.18);
  background:rgba(255,255,255,.72);
  display:grid;
  gap:4px;
}
html[data-theme="dark"] .exec-quality-kpi{ background:rgba(15,23,42,.55); }
.exec-quality-kpi span{ color:var(--muted); font-size:12px; font-weight:900; }
.exec-quality-kpi b{ font-size:24px; line-height:1; letter-spacing:-.04em; }
.exec-quality-kpi em{ font-style:normal; color:var(--muted); font-size:12px; font-weight:800; }
.exec-quality-kpi.green b{ color:#16a34a; }
.exec-quality-kpi.blue b{ color:#2563eb; }
.exec-quality-kpi.orange b{ color:#f97316; }
.exec-quality-kpi.red b{ color:#ef4444; }
.exec-quality-issues{ display:grid; gap:10px; }
.exec-risk-row.green{ color:#16a34a; background:rgba(22,163,74,.07); }
.badge.green{ background:rgba(22,163,74,.10); color:#15803d; border-color:rgba(22,163,74,.22); }
.badge.orange{ background:rgba(249,115,22,.10); color:#ea580c; border-color:rgba(249,115,22,.22); }
.badge.red{ background:rgba(239,68,68,.10); color:#dc2626; border-color:rgba(239,68,68,.22); }
@media (max-width: 1180px){
  .exec-data-quality-body{ grid-template-columns:1fr; }
}
@media (max-width: 720px){
  .exec-quality-kpis{ grid-template-columns:1fr; }
}

/* v1.49.0 costing/finance screen */
.costing-shell .exec-kpi-grid{grid-template-columns:repeat(5,minmax(160px,1fr));}
.costing-shell .exec-table td,.costing-shell .exec-table th{white-space:nowrap;}
@media (max-width:1400px){.costing-shell .exec-kpi-grid{grid-template-columns:repeat(3,minmax(160px,1fr));}}
@media (max-width:900px){.costing-shell .exec-kpi-grid{grid-template-columns:1fr;}}


/* v1.49.0 traceability/costing screen */
.traceability-page .page-hero.compact { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; }
.traceability-page .toolbar { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.traceability-page .toolbar .input { min-width:220px; }
.traceability-page .kpi-grid.mini { margin: 0 0 16px 0; }
.status-chip.danger { background:#fee2e2; color:#991b1b; }
.status-chip.warning { background:#fef3c7; color:#92400e; }
.status-chip.info { background:#dbeafe; color:#1d4ed8; }
.status-chip.ok { background:#dcfce7; color:#166534; }
@media (max-width: 1180px){ .traceability-page .page-hero.compact{flex-direction:column;} .traceability-page .toolbar{justify-content:flex-start;} }

/* v1.49.0 operations / inventory */
.action-list{display:grid;gap:10px}.action-row{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;padding:12px;border:1px solid var(--border, #e5e7eb);border-radius:14px;text-decoration:none;color:inherit;background:var(--card,#fff)}.action-row small{display:block;color:var(--muted,#64748b)}.status-dot{width:10px;height:10px;border-radius:99px;background:#64748b}.status-dot.tone-blue{background:#2563eb}.status-dot.tone-orange{background:#f59e0b}.status-dot.tone-green{background:#16a34a}.status-dot.tone-red{background:#dc2626}.quick-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.quick-card{display:block;padding:14px;border:1px solid var(--border,#e5e7eb);border-radius:16px;text-decoration:none;color:inherit;background:var(--card,#fff)}.quick-card span{display:block;color:var(--muted,#64748b);margin-top:4px}@media(max-width:900px){.quick-grid{grid-template-columns:1fr}}

/* --------------------- v1.49.0: operations cockpit + inventory control --------------------- */
.operations-page .content,
.inventory-page .content{ max-width:none; padding:20px 22px 32px; }
.operations-hero{
  background:
    radial-gradient(circle at 5% 0%, rgba(37,99,235,.14), transparent 32%),
    radial-gradient(circle at 88% 0%, rgba(16,185,129,.10), transparent 30%),
    linear-gradient(135deg, var(--surface), var(--panel-2));
}
.inventory-hero{
  background:
    radial-gradient(circle at 6% 0%, rgba(124,58,237,.12), transparent 32%),
    radial-gradient(circle at 84% 0%, rgba(245,158,11,.12), transparent 30%),
    linear-gradient(135deg, var(--surface), var(--panel-2));
}
.operations-shortcuts{ grid-template-columns:repeat(2,minmax(0,1fr)); align-content:start; align-self:start; }
.operations-kpi-row{ grid-template-columns:repeat(6,minmax(0,1fr)); }
.inventory-kpi-row{ grid-template-columns:repeat(4,minmax(0,1fr)); }
.inventory-filter-panel{ grid-template-columns:minmax(220px,.7fr) minmax(320px,1.2fr) auto; }
.operations-action-grid{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:12px;
}
.ops-action-card{
  text-decoration:none;
  color:var(--text);
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  gap:12px;
  align-items:center;
  min-height:104px;
  padding:14px;
  border-color:rgba(148,163,184,.22);
}
.ops-action-card:hover{ border-color:rgba(37,99,235,.38); transform:translateY(-1px); }
.ops-action-count{
  width:48px; height:48px; border-radius:16px; display:grid; place-items:center;
  font-size:24px; font-weight:950; border:1px solid currentColor;
  background:rgba(255,255,255,.55);
}
html[data-theme="dark"] .ops-action-count{ background:rgba(15,23,42,.55); }
.ops-action-owner{ color:var(--muted); font-size:12px; font-weight:900; text-transform:uppercase; letter-spacing:.045em; }
.ops-action-title{ font-size:14px; font-weight:950; line-height:1.2; margin-top:4px; }
.ops-action-card.tone-blue{ color:#2563eb; }
.ops-action-card.tone-green{ color:#16a34a; }
.ops-action-card.tone-orange{ color:#f97316; }
.ops-action-card.tone-red{ color:#ef4444; }
.ops-action-card.tone-blue .ops-action-title,
.ops-action-card.tone-green .ops-action-title,
.ops-action-card.tone-orange .ops-action-title,
.ops-action-card.tone-red .ops-action-title{ color:var(--text); }
.operations-table-wrap,
.inventory-table-wrap{ max-height:560px; overflow:auto; }
.small-kpi-value{ font-size:18px !important; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
@media (max-width: 1680px){
  .operations-action-grid{ grid-template-columns:repeat(3,minmax(0,1fr)); }
  .operations-kpi-row{ grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width: 1180px){
  .operations-shortcuts,
  .inventory-filter-panel,
  .operations-action-grid,
  .operations-kpi-row,
  .inventory-kpi-row{ grid-template-columns:1fr; }
}

/* --------------------- v1.60.0 UX polish / role workplaces --------------------- */
:root{
  --content-max: 1680px;
  --nav-row-h: 44px;
}

/* Stable left navigation: equal active row height and professional active rail. */
.nav-item{
  min-height: var(--nav-row-h);
  position: relative;
  overflow: hidden;
}
.nav-item::before{
  content:"";
  position:absolute;
  left:0;
  top:8px;
  bottom:8px;
  width:3px;
  border-radius:999px;
  background: transparent;
}
.nav-item.active::before{ background: #60a5fa; }
html.sidebar-collapsed .nav-item::before{ top:10px; bottom:10px; }
html.sidebar-collapsed .brand{ justify-content:center; width:100%; }
html.sidebar-collapsed .sidebar-nav{ align-items: stretch; }
html.sidebar-collapsed .nav-item{ min-height: 46px; }

/* Medium desktops auto-collapse by JS; the content must stay readable. */
@media (max-width: 1360px) and (min-width: 1025px){
  .topbar-inner{ padding-inline: 12px; }
  .content{ padding-inline: 12px; }
  .desktop-only .small{ display:none; }
}

/* Alert aliases used by newer workflow templates. */
.alert.warning{ border-color: rgba(217,119,6,0.22); background: rgba(217,119,6,0.10); }
.badge.info, .chip.info{ background: rgba(37,99,235,0.12); color: var(--primary); border-color: rgba(37,99,235,0.22); }
.badge.red, .chip.red{ background: rgba(220,38,38,0.12); color: var(--danger); border-color: rgba(220,38,38,0.22); }
.badge.green, .chip.green{ background: rgba(22,163,74,0.12); color: var(--success); border-color: rgba(22,163,74,0.22); }
.badge.orange, .chip.orange{ background: rgba(217,119,6,0.12); color: var(--warning); border-color: rgba(217,119,6,0.22); }
.badge.purple, .chip.purple{ background: rgba(124,58,237,0.12); color: #7c3aed; border-color: rgba(124,58,237,0.22); }

/* Compact enterprise filters: avoid huge form blocks on top of the page. */
.filter-bar,
.exec-filter-panel,
.wms-filter-panel,
.materials-filter-panel{
  align-content: start;
}
.exec-filter-field{ min-width: 0; }
.exec-filter-field.search{ min-width: min(320px, 100%); }
.exec-filter-actions{ align-self: end; }

/* KPI rows should fill available space instead of dropping one lonely block down. */
.exec-kpi-row,
.wms-kpi-row,
.materials-kpi-row,
.operations-kpi-row,
.compact-kpi-row{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  align-items: stretch;
}
.compact-kpi-row .exec-kpi,
.exec-kpi-row .exec-kpi{
  min-width: 0;
  min-height: 104px;
}
.exec-kpi-value,
.kpi-value{ overflow-wrap:anywhere; }
.small-kpi-value{ font-size: clamp(16px, 1.2vw, 22px) !important; }

/* Denser, easier form grids. */
.form-grid,
.ops-form .form-grid{
  align-items:end;
}
.field,
.form-row{ min-width: 0; }
.field-full{ grid-column: 1 / -1; }
.input.compact-input,
.compact-input{ min-width: 96px; }
@media (min-width: 1180px){
  .form-grid.form-grid-3 .field-span-2{ grid-column: span 2; }
  .form-grid.form-grid-4 .field-span-2{ grid-column: span 2; }
}
@media (max-width: 1360px){
  .ops-two-col-grid{ grid-template-columns: minmax(0, 1fr); }
  .form-grid.form-grid-4{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px){
  .form-grid.form-grid-2,
  .form-grid.form-grid-3,
  .form-grid.form-grid-4{ grid-template-columns: 1fr !important; }
}

/* Tables: keep the page itself clean and scroll only the table. */
.table-wrap,
.exec-table-wrap,
.materials-table-wrap,
.wms-order-wrap,
.operations-table-wrap{
  max-width: 100%;
  overflow: auto;
}
.table-wrap table{ min-width: 760px; }
.compact-table-wrap table{ min-width: 920px; }
.empty-cell{
  background: linear-gradient(180deg, rgba(148,163,184,0.05), rgba(148,163,184,0.02));
  border-radius: 0;
}

/* Role workplace landing page. */
.workspace-page{ display:grid; gap:14px; }
.workspace-hero{
  display:grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap:16px;
  padding:18px;
  overflow:hidden;
  position:relative;
}
.workspace-hero::before{
  content:"";
  position:absolute;
  inset:0;
  background: radial-gradient(circle at top right, rgba(37,99,235,0.15), transparent 42%);
  pointer-events:none;
}
.workspace-hero > *{ position:relative; z-index:1; }
.workspace-hero-main h1{ font-size: clamp(24px, 2.4vw, 38px); margin:6px 0; }
.workspace-hero-main p{ color:var(--muted); max-width: 920px; line-height:1.55; }
.workspace-actions{ display:flex; gap:10px; flex-wrap:wrap; margin-top:14px; }
.workspace-hero-side{
  border:1px solid var(--border);
  border-radius:16px;
  padding:14px;
  background: rgba(148,163,184,0.07);
  align-self:stretch;
  display:grid;
  align-content:start;
  gap:10px;
}
.workspace-focus-tags{ display:flex; flex-wrap:wrap; gap:8px; }
.workspace-kpis{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap:14px;
}
.workspace-kpi{ padding:14px 16px; border-left:4px solid rgba(37,99,235,0.35); }
.workspace-kpi.tone-green{ border-left-color: rgba(22,163,74,0.55); }
.workspace-kpi.tone-purple{ border-left-color: rgba(124,58,237,0.55); }
.workspace-kpi.tone-orange{ border-left-color: rgba(217,119,6,0.55); }
.workspace-grid{
  display:grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, .9fr);
  gap:14px;
}
.workspace-action-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap:12px;
}
.workspace-action-card,
.workspace-step,
.module-tile{
  border:1px solid var(--border);
  border-radius:16px;
  background: rgba(148,163,184,0.06);
  transition: transform 80ms ease, background 120ms ease, border-color 120ms ease;
}
.workspace-action-card:hover,
.workspace-step:hover,
.module-tile:hover{
  transform: translateY(-1px);
  background: rgba(37,99,235,0.08);
  border-color: rgba(37,99,235,0.22);
}
.workspace-action-card{
  display:grid;
  grid-template-columns:42px minmax(0,1fr);
  gap:12px;
  padding:14px;
}
.workspace-action-icon,
.module-tile-icon{
  width:42px;
  height:42px;
  border-radius:14px;
  display:grid;
  place-items:center;
  background: rgba(37,99,235,0.12);
  color: var(--primary);
}
.workspace-action-card.tone-green .workspace-action-icon{ background: rgba(22,163,74,0.12); color: var(--success); }
.workspace-action-card.tone-orange .workspace-action-icon{ background: rgba(217,119,6,0.12); color: var(--warning); }
.workspace-action-card.tone-purple .workspace-action-icon{ background: rgba(124,58,237,0.12); color: #7c3aed; }
.workspace-action-card.tone-red .workspace-action-icon{ background: rgba(220,38,38,0.12); color: var(--danger); }
.workspace-action-title{ font-weight:900; }
.workspace-action-desc{ margin-top:4px; font-size:12px; color:var(--muted); line-height:1.4; }
.workspace-steps{ display:grid; gap:10px; }
.workspace-step{ display:grid; gap:5px; padding:12px; }
.workspace-step-title{ font-weight:900; }
.workspace-step-desc{ color:var(--muted); font-size:12px; line-height:1.4; }
.module-tile-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap:12px;
}
.module-tile{ padding:12px; display:grid; gap:10px; justify-items:start; }
.module-tile-label{ font-weight:800; font-size:13px; }
@media (max-width: 1100px){
  .workspace-hero,
  .workspace-grid{ grid-template-columns: 1fr; }
}

/* Better small-screen header behavior. */
@media (max-width: 680px){
  .page-header{ flex-direction:column; }
  .page-header .actions{ justify-content:flex-start; width:100%; }
  .topbar-right .btn-ghost{ padding:8px 10px; }
  .user-chip .pill{ display:none; }
}

/* --------------------- v1.60.0 final UX polish --------------------- */
.nav-section{
  min-height: 22px;
  padding: 12px 10px 4px;
  color: rgba(226,232,240,.55);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-section:first-child{ padding-top: 2px; }
html.sidebar-collapsed .nav-section{ display:none; }
@media (max-width: 1700px) and (min-width: 981px){
  .nav-section{ display:none; }
}

.workplace-page-shell{
  display:grid;
  gap:14px;
}
.workplace-hero{
  display:grid;
  grid-template-columns:minmax(0,1.5fr) minmax(300px,.5fr);
  gap:16px;
  padding:20px;
  background:
    radial-gradient(circle at 4% 0%, rgba(49,94,251,.16), transparent 30%),
    radial-gradient(circle at 92% 0%, rgba(18,149,108,.12), transparent 28%),
    linear-gradient(135deg, var(--surface), var(--panel-2));
}
.workplace-hero h1{
  margin:5px 0 8px;
  font-size:clamp(30px,2.7vw,46px);
  line-height:1.02;
  letter-spacing:-.055em;
}
.workplace-hero p{
  max-width:980px;
  color:var(--muted);
  font-size:15px;
  line-height:1.55;
}
.workplace-focus{
  margin-top:14px;
  padding:12px 14px;
  border:1px solid rgba(49,94,251,.18);
  border-radius:16px;
  background:rgba(49,94,251,.08);
  color:var(--text);
}
.workplace-focus b{ color:var(--primary); }
.workplace-actions{ display:flex; gap:10px; flex-wrap:wrap; margin-top:14px; }
.workplace-hero-side{ display:grid; gap:12px; align-content:start; }
.workplace-user-card,
.workplace-hint{
  border:1px solid rgba(148,163,184,.20);
  border-radius:18px;
  padding:14px;
  background:rgba(255,255,255,.70);
}
html[data-theme="dark"] .workplace-user-card,
html[data-theme="dark"] .workplace-hint{ background:rgba(15,23,42,.58); }
.workplace-user-name{ font-size:20px; font-weight:950; margin:4px 0 8px; }
.workplace-hint{ color:var(--muted); font-size:13px; line-height:1.5; }
.workplace-metrics{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}
.workplace-main-grid{
  display:grid;
  grid-template-columns:minmax(420px,.88fr) minmax(520px,1.12fr);
  gap:14px;
  align-items:start;
}
.workplace-step-list{ display:grid; gap:10px; }
.workplace-step{
  display:grid;
  grid-template-columns:40px minmax(0,1fr);
  gap:12px;
  align-items:start;
  padding:12px;
  border:1px solid rgba(148,163,184,.22);
  border-radius:16px;
  background:rgba(248,250,252,.70);
  color:var(--text);
}
.workplace-step:hover{ border-color:rgba(49,94,251,.36); background:rgba(49,94,251,.06); }
html[data-theme="dark"] .workplace-step{ background:rgba(15,23,42,.56); }
.workplace-step-num{
  width:34px; height:34px; border-radius:13px;
  display:grid; place-items:center;
  background:rgba(49,94,251,.12);
  color:var(--primary);
  font-weight:950;
}
.workplace-step b{ display:block; margin-bottom:4px; }
.workplace-step span{ color:var(--muted); font-size:13px; line-height:1.45; }
.workplace-module-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:10px;
}
.workplace-module-card{
  min-height:118px;
  display:grid;
  gap:8px;
  align-content:start;
  padding:14px;
  border:1px solid rgba(148,163,184,.22);
  border-radius:18px;
  background:linear-gradient(180deg,rgba(255,255,255,.95),rgba(246,249,255,.86));
  color:var(--text);
}
.workplace-module-card:hover{ border-color:rgba(49,94,251,.38); transform:translateY(-1px); }
html[data-theme="dark"] .workplace-module-card{ background:rgba(15,23,42,.58); }
.workplace-module-icon{
  width:38px; height:38px; border-radius:14px;
  display:grid; place-items:center;
  background:rgba(49,94,251,.10);
  color:var(--primary);
}
.workplace-module-card b{ font-size:14px; }
.workplace-module-card small{ color:var(--muted); }
.ux-rule-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}
.ux-rule-grid > div{
  border:1px solid rgba(148,163,184,.22);
  border-radius:16px;
  padding:13px;
  background:rgba(248,250,252,.70);
  display:grid;
  gap:6px;
}
.ux-rule-grid span{ color:var(--muted); font-size:12px; line-height:1.45; }
html[data-theme="dark"] .ux-rule-grid > div{ background:rgba(15,23,42,.56); }

/* Better tab bars on crowded screens: no second-row chaos, horizontal scroll instead. */
.ops-tabs,
.tabs[data-tabs]{
  flex-wrap:nowrap;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:thin;
}
.ops-tabs .tab,
.tabs[data-tabs] .tab{ flex:0 0 auto; }

/* KPI rows should never leave one isolated card hanging under empty space. */
.exec-kpi-row,
.compact-kpi-row,
.production-kpi-row,
.inventory-kpi-row,
.costing-shell .exec-kpi-grid{
  grid-template-columns:repeat(auto-fit,minmax(178px,1fr));
}
.materials-kpi-row,
.compact-kpi-row.materials-kpi-row{
  grid-template-columns:repeat(auto-fit,minmax(168px,1fr));
}
@media (min-width: 1480px){
  .materials-kpi-row,
  .compact-kpi-row.materials-kpi-row{ grid-template-columns:repeat(7,minmax(0,1fr)); }
  .production-kpi-row{ grid-template-columns:repeat(6,minmax(0,1fr)); }
}

/* Filters and forms: compact, readable and less visually noisy. */
.exec-filter-panel,
.compact-filter-panel,
.production-filter-panel,
.recipe-filter-panel,
.inventory-filter-panel{
  border:1px solid rgba(148,163,184,.16);
  border-radius:18px;
  padding:12px;
  background:rgba(255,255,255,.64);
}
html[data-theme="dark"] .exec-filter-panel,
html[data-theme="dark"] .compact-filter-panel,
html[data-theme="dark"] .production-filter-panel,
html[data-theme="dark"] .recipe-filter-panel,
html[data-theme="dark"] .inventory-filter-panel{ background:rgba(15,23,42,.52); }
.input, input[type="text"], input[type="date"], input[type="number"], input[type="search"], input[type="datetime-local"], select, textarea{
  min-height:40px;
}
select.input, select{
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
  appearance:none;
}

@media (max-width: 1180px){
  .workplace-hero,
  .workplace-main-grid{ grid-template-columns:1fr; }
  .workplace-metrics,
  .ux-rule-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 720px){
  .workplace-metrics,
  .ux-rule-grid{ grid-template-columns:1fr; }
  .workplace-hero{ padding:16px; }
}

/* v1.60.0 grouped sidebar aliases */
.nav-group{ display:grid; gap:5px; }
.nav-group-label{
  min-height:22px;
  padding: 12px 10px 4px;
  color: rgba(226,232,240,.55);
  font-size:10px;
  font-weight:950;
  letter-spacing:.12em;
  text-transform:uppercase;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.nav-group:first-child .nav-group-label{ padding-top:2px; }
html.sidebar-collapsed .nav-group-label{ display:none; }
@media (max-width:1700px) and (min-width:981px){ .nav-group-label{display:none;} }

/* --------------------- UX polish / role workplaces (v1.60.0) --------------------- */
.nav-item{ min-height: 44px; }
.nav-group{ display:grid; gap:6px; }
.nav-group + .nav-group{ margin-top: 10px; }
.nav-group-label{
  padding: 10px 10px 4px;
  color: rgba(255,255,255,.48);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .09em;
  text-transform: uppercase;
  white-space: nowrap;
}
.topbar-workplace-link{
  padding: 8px 11px;
  border-radius: 12px;
  background: rgba(37,99,235,.10);
  color: var(--primary);
  border: 1px solid rgba(37,99,235,.18);
  font-size: 12px;
  font-weight: 900;
}
.badge.info, .chip.info{ background: rgba(37,99,235,.12); color: var(--primary); border-color: rgba(37,99,235,.22); }
.badge.warning, .badge.warn{ background: rgba(217,119,6,.12); color: var(--warning); border-color: rgba(217,119,6,.22); }
.badge.danger, .badge.err{ background: rgba(220,38,38,.12); color: var(--danger); border-color: rgba(220,38,38,.22); }
.badge.muted, .chip.muted{ background: rgba(148,163,184,.10); color: var(--muted); border-color: rgba(148,163,184,.20); }

.empty-state{
  display:grid;
  gap:6px;
  justify-items:start;
  padding: 18px;
  border:1px dashed var(--border);
  border-radius: 16px;
  background: rgba(148,163,184,.06);
  color: var(--text);
}
.empty-title{ font-weight:950; letter-spacing:-.01em; }
.empty-desc{ color:var(--muted); font-size:13px; line-height:1.35; }

.filter-panel{
  border:1px solid var(--border);
  border-radius:16px;
  background:var(--surface);
  box-shadow:var(--shadow-sm);
  padding: 10px 12px;
}
.filter-panel > summary{
  cursor:pointer;
  font-weight:950;
  list-style:none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.filter-panel > summary::-webkit-details-marker{ display:none; }
.filter-panel > summary:after{ content:"▾"; color:var(--muted); }
.filter-panel[open] > summary:after{ content:"▴"; }
.filter-panel-body{ margin-top:12px; }

.workplace-page .content{ max-width:none; padding:20px 22px 32px; }
.workplace-shell{ display:grid; gap:14px; }
.workplace-hero{
  display:grid;
  grid-template-columns:minmax(420px,1.25fr) minmax(300px,.75fr);
  gap:18px;
  padding:20px;
  background:
    radial-gradient(circle at 4% 0%, rgba(37,99,235,.14), transparent 34%),
    radial-gradient(circle at 88% 10%, rgba(16,185,129,.10), transparent 28%),
    linear-gradient(135deg, var(--surface), var(--panel-2));
}
.eyebrow{
  color:var(--primary);
  font-size:11px;
  font-weight:950;
  letter-spacing:.10em;
  text-transform:uppercase;
}
.workplace-hero h1{
  margin:6px 0 7px;
  font-size: clamp(26px, 2.2vw, 38px);
  line-height:1.05;
  letter-spacing:-.045em;
}
.workplace-hero p{ color:var(--muted); max-width:760px; line-height:1.45; }
.workplace-hero-actions{ display:flex; gap:10px; flex-wrap:wrap; margin-top:16px; }
.workplace-quality-card{
  border:1px solid rgba(148,163,184,.22);
  background:rgba(255,255,255,.55);
  border-radius:18px;
  padding:16px;
  display:grid;
  gap:10px;
  align-content:center;
}
html[data-theme="dark"] .workplace-quality-card{ background:rgba(15,23,42,.62); }
.quality-score{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:10px;
  align-items:center;
}
.quality-score b{ font-size:42px; letter-spacing:-.05em; }
.quality-score span{ font-weight:950; color:var(--muted); }
.quality-green b{ color:#16a34a; }
.quality-orange b{ color:#f97316; }
.quality-red b{ color:#ef4444; }
.quality-blue b{ color:#2563eb; }
.workplace-kpi-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}
.workplace-kpi{ min-height:96px; }
.workplace-empty-wide{ grid-column:1/-1; }
.workplace-main-grid{
  display:grid;
  grid-template-columns:minmax(420px,.94fr) minmax(420px,1.06fr);
  gap:14px;
  align-items:stretch;
}
.workplace-action-list{ display:grid; gap:10px; }
.workplace-action-card{
  display:grid;
  grid-template-columns:42px 1fr;
  gap:12px;
  align-items:center;
  padding:13px;
  border-radius:16px;
  border:1px solid rgba(148,163,184,.18);
  background:rgba(148,163,184,.06);
}
.workplace-action-card:hover{ background:rgba(37,99,235,.08); border-color:rgba(37,99,235,.22); }
.workplace-action-icon{
  width:38px; height:38px; border-radius:14px;
  display:grid; place-items:center;
  font-weight:950;
  border:1px solid currentColor;
}
.workplace-action-card b{ display:block; font-size:14px; }
.workplace-action-card span{ display:block; margin-top:3px; color:var(--muted); font-size:12px; line-height:1.35; }
.workplace-action-card.tone-blue{ color:#2563eb; }
.workplace-action-card.tone-green{ color:#16a34a; }
.workplace-action-card.tone-orange{ color:#f97316; }
.workplace-action-card.tone-red{ color:#ef4444; }
.workplace-action-card.tone-purple{ color:#7c3aed; }
.workplace-risk-list a{ color:inherit; }
.workplace-table-wrap{ max-height:520px; }
.workplace-search{ max-width:280px; }
.workplace-bottom-grid{
  display:grid;
  grid-template-columns:minmax(520px,1.1fr) minmax(360px,.9fr);
  gap:14px;
}
.role-menu-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:10px;
}
.role-menu-tile{
  border:1px solid rgba(148,163,184,.18);
  background:rgba(148,163,184,.06);
  border-radius:16px;
  padding:12px;
  display:grid;
  gap:6px;
}
.role-menu-tile span{ color:var(--primary); }
.role-menu-tile b{ font-size:13px; }
.role-menu-tile em{ color:var(--muted); font-style:normal; font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.06em; }
.workplace-audit-list{ display:grid; gap:8px; }
.audit-mini{
  display:grid;
  grid-template-columns: minmax(132px,.55fr) minmax(160px,1fr) minmax(140px,.8fr);
  gap:10px;
  align-items:center;
  border-bottom:1px solid var(--border);
  padding:8px 0;
  font-size:12px;
}
.audit-mini span,.audit-mini em{ color:var(--muted); font-style:normal; }
.audit-mini b{ font-weight:900; }

/* Keep professional layout on medium monitors: sidebar collapses to icons so cards keep one row. */
@media (max-width: 1360px) and (min-width: 1025px){
  html:not(.sidebar-expanded){ --sidebar-w: var(--sidebar-w-collapsed); }
  html:not(.sidebar-expanded) .brand-text,
  html:not(.sidebar-expanded) .sidebar-footer,
  html:not(.sidebar-expanded) .nav-label,
  html:not(.sidebar-expanded) .nav-group-label{ display:none; }
  html:not(.sidebar-expanded) .sidebar{ padding-left:10px; padding-right:10px; }
  html:not(.sidebar-expanded) .nav-item{ justify-content:center; padding:10px 8px; }
  html:not(.sidebar-expanded) .nav-icon{ width:22px; height:22px; }
}
@media (max-width: 1180px){
  .workplace-hero,
  .workplace-main-grid,
  .workplace-bottom-grid{ grid-template-columns:1fr; }
  .workplace-kpi-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 720px){
  .workplace-page .content{ padding:14px 12px 22px; }
  .workplace-kpi-grid{ grid-template-columns:1fr; }
  .workplace-search{ max-width:none; }
  .audit-mini{ grid-template-columns:1fr; }
}

/* --------------------- v1.60.0 final role-workplace polish --------------------- */
.topbar-workplace-link{
  display:inline-flex;
  align-items:center;
  min-height:36px;
  padding:0 12px;
  border-radius:999px;
  border:1px solid rgba(37,99,235,.18);
  background:rgba(37,99,235,.08);
  color:var(--primary);
  font-weight:900;
  font-size:12px;
  white-space:nowrap;
}
.topbar-workplace-link:hover{ background:rgba(37,99,235,.13); }
.nav-section{
  min-height:22px;
  padding:12px 10px 4px;
  color:rgba(226,232,240,.55);
  font-size:10px;
  font-weight:950;
  letter-spacing:.12em;
  text-transform:uppercase;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.nav-section:first-child{ padding-top:2px; }
html.sidebar-collapsed .nav-section{ display:none; }
html.sidebar-expanded{ --sidebar-w:var(--sidebar-w-expanded); }
@media (max-width:1700px) and (min-width:981px){
  html.sidebar-expanded .sidebar{ padding:14px 14px 16px; }
  html.sidebar-expanded .brand{ justify-content:flex-start; }
  html.sidebar-expanded .brand-text,
  html.sidebar-expanded .nav-label,
  html.sidebar-expanded .sidebar-footer{ display:block !important; }
  html.sidebar-expanded .nav-section{ display:block !important; }
  html.sidebar-expanded .nav-item{ justify-content:flex-start; padding:10px; }
}
.card,.table-wrap,.tab-panel,.tab-panels{ min-width:0; }
.table-wrap-contained{ max-width:100%; overflow:auto; }
.table-actions-nowrap{ flex-wrap:nowrap; }
.smart-toolbar{ min-width:min(100%,320px); }
.smart-search{ min-width:220px; }

.workplace-page-shell{ display:grid; gap:14px; }
.workplace-primary-card{
  border:1px solid rgba(148,163,184,.22);
  border-radius:18px;
  padding:16px;
  background:rgba(255,255,255,.68);
  display:grid;
  gap:10px;
  align-content:center;
}
html[data-theme="dark"] .workplace-primary-card{ background:rgba(15,23,42,.58); }
.workplace-primary-title{ font-size:18px; font-weight:950; letter-spacing:-.02em; }
.workplace-primary-text{ color:var(--muted); font-size:13px; line-height:1.45; }
.workplace-meta-row{ display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-top:12px; }
.workplace-kpi-grid,
.workplace-metrics{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(190px,1fr));
  gap:12px;
}
.workplace-kpi{
  padding:14px;
  border-left:4px solid rgba(37,99,235,.45);
  display:grid;
  gap:6px;
}
.workplace-kpi.tone-green{ border-left-color:rgba(22,163,74,.55); }
.workplace-kpi.tone-orange{ border-left-color:rgba(217,119,6,.60); }
.workplace-kpi.tone-red{ border-left-color:rgba(220,38,38,.55); }
.workplace-kpi.tone-purple{ border-left-color:rgba(124,58,237,.55); }
.workplace-kpi-label{ color:var(--muted); font-size:12px; font-weight:900; }
.workplace-kpi-value{ font-size:26px; font-weight:950; line-height:1; letter-spacing:-.04em; }
.workplace-kpi-sub{ color:var(--muted); font-size:12px; }
.workplace-layout{
  display:grid;
  grid-template-columns:minmax(0,1.25fr) minmax(320px,.75fr);
  gap:14px;
  align-items:start;
}
.workplace-action-list{ display:grid; gap:10px; }
.workplace-action{
  display:grid;
  grid-template-columns:12px minmax(0,1fr) auto;
  gap:12px;
  align-items:center;
  padding:12px;
  border:1px solid rgba(148,163,184,.22);
  border-radius:16px;
  background:rgba(248,250,252,.70);
  color:var(--text);
}
html[data-theme="dark"] .workplace-action{ background:rgba(15,23,42,.56); }
.workplace-action:hover{ border-color:rgba(37,99,235,.34); background:rgba(37,99,235,.06); transform:translateY(-1px); }
.workplace-action-dot{ width:10px; height:10px; border-radius:50%; background:var(--primary); }
.workplace-action.tone-green .workplace-action-dot{ background:var(--success); }
.workplace-action.tone-orange .workplace-action-dot{ background:var(--warning); }
.workplace-action.tone-red .workplace-action-dot{ background:var(--danger); }
.workplace-action-title{ font-weight:950; }
.workplace-action-text{ color:var(--muted); font-size:12px; line-height:1.35; margin-top:3px; }
.workplace-action-cta{ color:var(--primary); font-size:12px; font-weight:950; white-space:nowrap; }
.workplace-quick-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:10px; }
.workplace-quick{
  display:grid;
  gap:5px;
  min-height:92px;
  padding:12px;
  border:1px solid rgba(148,163,184,.22);
  border-radius:16px;
  background:rgba(248,250,252,.70);
  color:var(--text);
  text-align:left;
  width:100%;
}
button.workplace-quick{ cursor:pointer; font:inherit; }
html[data-theme="dark"] .workplace-quick{ background:rgba(15,23,42,.56); }
.workplace-quick:hover{ border-color:rgba(37,99,235,.34); background:rgba(37,99,235,.06); }
.workplace-quick b{ font-size:13px; }
.workplace-quick span{ color:var(--muted); font-size:12px; line-height:1.35; }
.empty-state{
  display:grid;
  gap:8px;
  place-items:center;
  text-align:center;
  padding:28px 18px;
  border:1px dashed rgba(148,163,184,.45);
  border-radius:18px;
  background:rgba(148,163,184,.06);
}
.empty-state.compact{ padding:18px; }
.empty-state-title{ font-weight:950; }
.empty-state-text{ color:var(--muted); font-size:13px; max-width:520px; }

/* Tabs stay one clean row and scroll horizontally instead of pushing cards down. */
.tabs[data-tabs],.ops-tabs{ flex-wrap:nowrap; overflow-x:auto; overflow-y:hidden; scrollbar-width:thin; }
.tabs[data-tabs] .tab,.ops-tabs .tab{ flex:0 0 auto; }

/* Fit KPI rows professionally; avoid one dropped block with empty space. */
.exec-kpi-row,.compact-kpi-row,.production-kpi-row,.inventory-kpi-row,.recipe-kpi-row,.costing-shell .exec-kpi-grid{
  grid-template-columns:repeat(auto-fit,minmax(178px,1fr));
}
.materials-kpi-row,.compact-kpi-row.materials-kpi-row{
  grid-template-columns:repeat(auto-fit,minmax(168px,1fr));
}
@media (min-width:1480px){
  .materials-kpi-row,.compact-kpi-row.materials-kpi-row{ grid-template-columns:repeat(7,minmax(0,1fr)); }
  .production-kpi-row{ grid-template-columns:repeat(6,minmax(0,1fr)); }
}

.exec-filter-panel,.compact-filter-panel,.production-filter-panel,.recipe-filter-panel,.inventory-filter-panel{
  border:1px solid rgba(148,163,184,.16);
  border-radius:18px;
  padding:12px;
  background:rgba(255,255,255,.64);
}
html[data-theme="dark"] .exec-filter-panel,
html[data-theme="dark"] .compact-filter-panel,
html[data-theme="dark"] .production-filter-panel,
html[data-theme="dark"] .recipe-filter-panel,
html[data-theme="dark"] .inventory-filter-panel{ background:rgba(15,23,42,.52); }
.input,input[type="text"],input[type="date"],input[type="number"],input[type="search"],input[type="datetime-local"],select,textarea{ min-height:40px; }
select.input,select{
  background-image:linear-gradient(45deg,transparent 50%,var(--muted) 50%),linear-gradient(135deg,var(--muted) 50%,transparent 50%);
  background-position:calc(100% - 18px) 50%,calc(100% - 13px) 50%;
  background-size:5px 5px,5px 5px;
  background-repeat:no-repeat;
  padding-right:32px;
  appearance:none;
}
@media (max-width:1180px){
  .workplace-hero,.workplace-layout,.workplace-main-grid{ grid-template-columns:1fr; }
}
@media (max-width:720px){
  .workplace-action{ grid-template-columns:10px minmax(0,1fr); }
  .workplace-action-cta{ grid-column:2; }
}
/* v1.60 regression alias: semantic shell class for workplace pages */
.workplace-page-shell{ display:grid; gap:14px; }

/* --------------------- Dual production workplaces (v1.63.0) --------------------- */
.dual-production-shell{ gap:14px; }
.dual-production-hero{
  display:grid;
  grid-template-columns:minmax(0,1.15fr) minmax(360px,.85fr);
  gap:18px;
  align-items:stretch;
}
.production-area-card-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
.production-area-card{
  display:grid;
  gap:16px;
  padding:20px;
  color:var(--text);
  text-decoration:none;
  min-height:238px;
  border:1px solid rgba(148,163,184,.20);
}
.production-area-card:hover{ transform:translateY(-1px); box-shadow:0 20px 60px rgba(15,23,42,.10); }
.area-card-head{ display:grid; grid-template-columns:56px 1fr; gap:14px; align-items:start; }
.area-icon{ width:54px; height:54px; border-radius:18px; display:grid; place-items:center; font-size:28px; font-weight:950; background:rgba(37,99,235,.10); color:#2563eb; border:1px solid rgba(37,99,235,.18); }
.production-area-card.purple .area-icon{ background:rgba(124,58,237,.10); color:#7c3aed; border-color:rgba(124,58,237,.20); }
.area-card-head h2{ margin:2px 0 6px; font-size:24px; letter-spacing:-.03em; }
.area-card-head p{ margin:0; color:var(--muted); line-height:1.45; }
.area-card-metrics{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.area-card-metrics div{ border:1px solid rgba(148,163,184,.20); border-radius:14px; padding:10px; background:rgba(248,250,252,.66); min-width:0; }
.area-card-metrics b{ display:block; font-size:24px; letter-spacing:-.04em; }
.area-card-metrics span{ display:block; font-size:11px; color:var(--muted); font-weight:800; overflow:hidden; text-overflow:ellipsis; }
.area-card-foot{ display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.production-chain-grid{ grid-template-columns:repeat(4,minmax(0,1fr)); }
.line-card-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:10px; align-items:stretch; }
.production-line-card{ border:1px solid rgba(148,163,184,.22); border-radius:16px; padding:12px; background:rgba(255,255,255,.78); min-width:0; }
.production-line-card.green{ border-color:rgba(22,163,74,.24); background:rgba(240,253,244,.66); }
.production-line-card.orange{ border-color:rgba(249,115,22,.24); background:rgba(255,247,237,.70); }
.production-line-card.red{ border-color:rgba(239,68,68,.24); background:rgba(254,242,242,.70); }
.production-control-chain{ display:grid; grid-template-columns:1fr auto 1fr auto 1fr auto 1fr; gap:12px; align-items:center; padding:16px; }
.chain-node{ border:1px solid rgba(148,163,184,.24); background:rgba(248,250,252,.72); border-radius:16px; padding:16px; text-align:center; }
.chain-node b{ display:block; font-size:18px; }
.chain-node span{ color:var(--muted); font-size:12px; font-weight:800; }
.chain-node.blue{ background:rgba(37,99,235,.08); border-color:rgba(37,99,235,.20); }
.chain-node.purple{ background:rgba(124,58,237,.08); border-color:rgba(124,58,237,.20); }
.chain-node.green{ background:rgba(22,163,74,.08); border-color:rgba(22,163,74,.20); }
.chain-arrow{ font-weight:950; color:var(--muted); }
.risk-list{ display:grid; gap:10px; }
.risk-item{ display:grid; grid-template-columns:1fr auto; gap:12px; align-items:center; padding:12px; border-radius:14px; border:1px solid rgba(148,163,184,.22); background:rgba(248,250,252,.70); text-decoration:none; color:var(--text); }
.risk-item b{ display:block; margin-bottom:3px; }
.risk-item span{ display:block; color:var(--muted); font-size:12px; line-height:1.35; }
.risk-item strong{ font-size:22px; }
.risk-item.red{ border-color:rgba(239,68,68,.24); background:rgba(254,242,242,.70); }
.risk-item.orange{ border-color:rgba(249,115,22,.24); background:rgba(255,247,237,.74); }
.risk-item.green{ border-color:rgba(22,163,74,.24); background:rgba(240,253,244,.74); }
.risk-item.blue{ border-color:rgba(37,99,235,.24); background:rgba(239,246,255,.74); }
html[data-theme="dark"] .production-area-card,
html[data-theme="dark"] .production-line-card,
html[data-theme="dark"] .area-card-metrics div,
html[data-theme="dark"] .chain-node,
html[data-theme="dark"] .risk-item{ background:rgba(15,23,42,.58); }
@media (max-width:1360px){
  .dual-production-hero,
  .production-area-card-grid,
  .production-dashboard-grid{ grid-template-columns:1fr; }
  .production-chain-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .production-control-chain{ grid-template-columns:1fr; }
  .chain-arrow{ transform:rotate(90deg); justify-self:center; }
}
@media (max-width:760px){
  .area-card-head{ grid-template-columns:1fr; }
  .area-card-metrics{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .production-chain-grid{ grid-template-columns:1fr; }
}

/* --------------------- Production routing (v1.64.0) --------------------- */
.production-stage-timeline{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px;align-items:stretch}
.production-stage-chip{position:relative;border:1px solid var(--border,#e5e7eb);border-radius:16px;padding:12px 14px;background:#fff;box-shadow:0 8px 22px rgba(15,23,42,.04);display:flex;flex-direction:column;gap:5px;min-height:92px}
.production-stage-chip:before{content:"";position:absolute;left:0;top:12px;bottom:12px;width:4px;border-radius:8px;background:#64748b}
.production-stage-chip.ok:before{background:#16a34a}.production-stage-chip.warn:before{background:#f59e0b}.production-stage-chip.err:before{background:#dc2626}.production-stage-chip.info:before{background:#2563eb}
.production-stage-chip b{font-size:14px;color:#0f172a}.production-stage-chip span{font-size:13px;color:#334155}.production-stage-chip small{font-size:12px;color:#64748b}
.production-routes-page .compact-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.production-routes-page .compact-form-grid .span-2{grid-column:1/-1}
@media(max-width:900px){.production-routes-page .compact-form-grid{grid-template-columns:1fr}}

/* --------------------- Smart Dual Planning (v1.65.0) --------------------- */
.smart-planning-shell .smart-action-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-bottom: 16px; }
.smart-planning-shell .smart-action-grid form { align-items: flex-start; gap: 10px; }
.smart-area-card { margin-top: 18px; }
.smart-area-card.area-pvc { border-top: 4px solid rgba(37, 99, 235, .65); }
.smart-area-card.area-lamination { border-top: 4px solid rgba(124, 58, 237, .65); }
.smart-area-kpis { margin: 12px 0 16px; }
.smart-planning-grid { align-items: start; }
.smart-planning-grid .inner-card { min-height: 100%; }
.smart-planning-shell .card-header .toolbar { flex-wrap: wrap; gap: 8px; }
.smart-planning-shell form.production-flow-card { border: 1px solid var(--border, #e5e7eb); background: var(--card, #fff); }
.smart-planning-shell .production-flow-card.purple { border-color: rgba(124, 58, 237, .2); }
.smart-planning-shell .production-flow-card.orange { border-color: rgba(245, 158, 11, .24); }
@media (max-width: 1200px) {
  .smart-planning-grid { grid-template-columns: 1fr; }
  .smart-area-card > .card-header { align-items: flex-start; flex-direction: column; }
}

/* --------------------- Action Queue + Auto Status (v1.66.0) --------------------- */
.action-queue-page .action-queue-hero { align-items: stretch; }
.action-toolbar { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:16px; }
.action-task-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap:14px; }
.action-task-card { display:flex; flex-direction:column; gap:10px; min-height:220px; border-left:4px solid var(--border, #d8e0ea); }
.action-task-card.priority-critical { border-left-color:#dc2626; }
.action-task-card.priority-high { border-left-color:#f97316; }
.action-task-card.priority-normal { border-left-color:#2563eb; }
.action-task-card.priority-low, .action-task-card.priority-info { border-left-color:#94a3b8; }
.action-task-head { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.action-task-card h3 { margin:0; font-size:16px; line-height:1.25; }
.action-task-card p { margin:0; color:var(--muted, #64748b); line-height:1.45; }
.action-task-meta { display:flex; gap:12px; flex-wrap:wrap; font-size:12px; color:var(--muted, #64748b); margin-top:auto; }
.action-task-actions { display:flex; gap:8px; align-items:center; flex-wrap:wrap; padding-top:4px; }
.role-summary-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap:14px; }
.action-status-table .badge.green, .badge.green { background:#dcfce7; color:#166534; }
.action-status-table .badge.blue, .badge.blue { background:#dbeafe; color:#1d4ed8; }
.action-status-table .badge.orange, .badge.orange { background:#ffedd5; color:#c2410c; }
.action-status-table .badge.purple, .badge.purple { background:#ede9fe; color:#6d28d9; }
.action-status-table .badge.red, .badge.red { background:#fee2e2; color:#b91c1c; }
.muted-pill { opacity:.75; }
@media (max-width: 1100px) {
  .action-toolbar { flex-direction:column; align-items:flex-start; }
  .action-task-grid { grid-template-columns:1fr; }
}

/* v1.66.0 Action Queue + Auto Status */
.action-queue-shell .filter-card { padding: 14px 16px; }
.filter-grid { display: grid; grid-template-columns: repeat(5, minmax(140px, 1fr)); gap: 12px; align-items: end; }
.filter-grid label { display: grid; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.checkbox-line { display:flex !important; align-items:center; gap:8px; min-height:42px; }
.action-kpi-row { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.action-board-grid { grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr); }
.action-lanes { display:grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap:12px; }
.action-lane { border:1px solid var(--line); border-radius:16px; padding:12px; background: var(--surface-subtle, #f8fafc); min-height:120px; }
.action-lane-head { display:flex; justify-content:space-between; align-items:center; gap:8px; margin-bottom:10px; }
.action-task-card { display:block; padding:10px 11px; border-radius:12px; background:var(--card-bg, #fff); border:1px solid var(--line); text-decoration:none; color:inherit; margin-bottom:8px; }
.action-task-card b { display:block; font-size:13px; line-height:1.25; }
.action-task-card span { display:block; font-size:12px; color:var(--muted); margin-top:4px; }
.nowrap { white-space: nowrap; }
@media (max-width: 1180px) { .filter-grid { grid-template-columns: repeat(2, minmax(180px, 1fr)); } .action-board-grid { grid-template-columns:1fr; } }
@media (max-width: 720px) { .filter-grid { grid-template-columns:1fr; } }

/* v1.66.0 — Action Queue + Auto Status */
.action-queue-shell .action-filter-card{padding:16px;margin-bottom:16px}
.action-queue-shell .filters-grid{display:grid;grid-template-columns:repeat(4,minmax(160px,1fr));gap:12px;align-items:end}
.action-queue-grid{grid-template-columns:minmax(0,1.25fr) minmax(360px,.75fr)}
.action-task-list{display:grid;gap:12px}
.action-task-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:center;padding:14px;border:1px solid var(--border,#e5e7eb);border-radius:16px;background:linear-gradient(180deg,#fff,#f8fafc)}
.action-task-card.priority-high{border-left:5px solid #f59e0b}
.action-task-card.priority-critical{border-left:5px solid #ef4444}
.action-task-card.priority-normal{border-left:5px solid #3b82f6}
.action-task-card.status-done{opacity:.68;background:#f8fafc}
.action-task-main h3{margin:4px 0 4px;font-size:16px}
.action-task-main p{margin:0 0 8px;color:#64748b;font-size:13px;line-height:1.35}
.action-task-actions{display:flex;gap:8px;align-items:center;justify-content:flex-end;flex-wrap:wrap}
@media (max-width:1100px){.action-queue-shell .filters-grid{grid-template-columns:1fr 1fr}.action-queue-grid{grid-template-columns:1fr}.action-task-card{grid-template-columns:1fr}.action-task-actions{justify-content:flex-start}}

/* --------------------- v1.67.0 Next Action + Mass Actions --------------------- */
.mass-actions-card .card-header{align-items:flex-start;}
.mass-action-grid{display:grid;grid-template-columns:repeat(6,minmax(150px,1fr));gap:12px;}
.mass-action-tile{border:1px solid var(--border);border-radius:18px;padding:14px;background:linear-gradient(180deg,#fff,#f8fafc);box-shadow:0 8px 24px rgba(15,23,42,.06);display:flex;flex-direction:column;gap:8px;min-height:172px;}
.mass-action-tile .mass-action-value{font-size:28px;font-weight:800;color:#0f172a;line-height:1;}
.mass-action-title{font-weight:750;color:#111827;}
.mass-action-text{font-size:12px;color:#64748b;line-height:1.35;min-height:34px;}
.mass-action-tile.tone-purple{background:linear-gradient(180deg,#fff,#faf5ff);}
.mass-action-tile.tone-green{background:linear-gradient(180deg,#fff,#f0fdf4);}
.mass-action-tile.tone-orange{background:linear-gradient(180deg,#fff,#fff7ed);}
.mass-action-tile.tone-gray{background:linear-gradient(180deg,#fff,#f8fafc);}
.mass-action-tile.is-disabled{opacity:.62;}
.bulk-task-form .form-actions{padding-top:10px;}
.next-action-card{border:1px solid rgba(37,99,235,.18);background:linear-gradient(135deg,#eff6ff,#ffffff 55%);}
.next-action-layout{display:grid;grid-template-columns:1fr auto;gap:18px;align-items:center;}
.next-action-eyebrow{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:#2563eb;font-weight:800;}
.next-action-title{font-size:22px;font-weight:800;color:#0f172a;margin-top:4px;}
.next-action-desc{color:#475569;margin-top:4px;}
.next-action-buttons{display:flex;gap:10px;align-items:center;flex-wrap:wrap;justify-content:flex-end;}
@media(max-width:1320px){.mass-action-grid{grid-template-columns:repeat(3,minmax(180px,1fr));}.next-action-layout{grid-template-columns:1fr;}.next-action-buttons{justify-content:flex-start;}}
@media(max-width:760px){.mass-action-grid{grid-template-columns:1fr;}}

/* --------------------- Smart Dual Planning APS-lite (v1.68.0) --------------------- */
.smart-automation-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:14px 0;padding:14px;background:linear-gradient(180deg,#fff,#f8fafc)}
.smart-step{display:grid;grid-template-columns:auto 1fr;gap:10px;align-items:center;border:1px solid rgba(148,163,184,.22);border-radius:14px;padding:12px;background:rgba(255,255,255,.76)}
.smart-step b{display:grid;place-items:center;width:30px;height:30px;border-radius:999px;background:#dbeafe;color:#1d4ed8;font-weight:900}.smart-step span{font-size:13px;color:#334155;line-height:1.35}
.smart-lane-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px;margin:12px 0 16px}.smart-lane-card{border:1px solid rgba(148,163,184,.22);border-radius:16px;padding:12px;background:#fff;display:flex;flex-direction:column;gap:3px}.smart-lane-card b{font-size:26px;line-height:1}.smart-lane-card span{font-weight:750;color:#0f172a}.smart-lane-card small{color:#64748b}.smart-lane-card.green{background:#f0fdf4;border-color:rgba(22,163,74,.22)}.smart-lane-card.orange{background:#fff7ed;border-color:rgba(249,115,22,.24)}.smart-lane-card.purple{background:#faf5ff;border-color:rgba(124,58,237,.22)}.smart-lane-card.blue{background:#eff6ff;border-color:rgba(37,99,235,.22)}.smart-lane-card.gray{background:#f8fafc}
.smart-plan-table td{vertical-align:top}.protected-plan-card{margin-top:14px}.risk-item small{display:block;color:#64748b;font-size:11px;margin-top:4px}.smart-planning-shell a.production-flow-card{text-decoration:none;color:inherit}.smart-planning-shell a.production-flow-card em{font-style:normal;width:max-content}
@media(max-width:980px){.smart-automation-strip{grid-template-columns:1fr}.smart-plan-table{min-width:900px}}

/* v1.69 Smart Planning autopilot refinements */
.smart-capacity-card .table td:first-child{font-weight:700;}
.smart-planning-shell .toolbar form{display:inline-flex;gap:8px;align-items:center;}
.smart-plan-table .badge.warn{white-space:nowrap;}

/* v1.70 schedule board + frozen horizon UX */
.schedule-board-shell .schedule-board-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(360px,1fr));gap:16px;margin-top:16px;align-items:start}
.schedule-lane-card.area-pvc{border-top:4px solid rgba(37,99,235,.65)}
.schedule-lane-card.area-lamination{border-top:4px solid rgba(124,58,237,.65)}
.schedule-operation-list{display:flex;flex-direction:column;gap:10px;padding:0 14px 14px}
.schedule-operation-card{display:grid;grid-template-columns:90px 1fr auto;gap:12px;align-items:start;border:1px solid rgba(148,163,184,.25);border-radius:16px;padding:12px;text-decoration:none;color:inherit;background:#fff;box-shadow:0 1px 2px rgba(15,23,42,.04)}
.schedule-operation-card.ok{background:#f8fff9;border-color:rgba(22,163,74,.18)}
.schedule-operation-card.warn{background:#fffaf0;border-color:rgba(245,158,11,.24)}
.schedule-operation-card.err{background:#fff7f7;border-color:rgba(220,38,38,.22)}
.schedule-op-time{display:flex;flex-direction:column;gap:4px;color:#0f172a}.schedule-op-time b{font-size:16px}.schedule-op-time span{font-size:12px;color:#64748b}
.schedule-op-main strong{font-size:14px}.schedule-op-main span,.schedule-op-main small{display:block;color:#64748b;margin-top:3px}.schedule-op-main small{font-size:11px}
.schedule-op-badges{display:flex;flex-wrap:wrap;gap:5px;justify-content:flex-end;max-width:150px}.mini-chip-row{margin-top:7px}.mini-chip-row .chip{font-size:11px;padding:3px 7px}
.frozen-override-box{margin-top:12px;border:1px dashed rgba(245,158,11,.45);background:#fffbeb;border-radius:14px;padding:12px;display:grid;gap:8px}.frozen-override-box .input{max-width:560px}.checkline{display:flex;gap:8px;align-items:center;font-weight:700;color:#92400e}
@media(max-width:760px){.schedule-operation-card{grid-template-columns:1fr}.schedule-op-badges{justify-content:flex-start;max-width:none}.schedule-board-shell .schedule-board-grid{grid-template-columns:1fr}}

/* --------------------- v1.70 Schedule Board + Frozen Horizon --------------------- */
.schedule-board-shell .schedule-area-card{margin-top:18px;border-top:4px solid rgba(37,99,235,.35)}
.schedule-board-shell .schedule-area-card.area-lamination{border-top-color:rgba(124,58,237,.45)}
.schedule-board-shell .schedule-exception-list{margin:0 0 14px;padding:0 16px 4px}
.schedule-timeline-wrap{padding:0 14px 10px}.schedule-axis{position:relative;height:22px;border-bottom:1px solid rgba(148,163,184,.22);margin-bottom:8px}.schedule-axis span{position:absolute;top:0;font-size:11px;color:#64748b;border-left:1px solid rgba(148,163,184,.28);padding-left:5px;height:22px;overflow:hidden;white-space:nowrap}.schedule-timeline{position:relative;min-height:54px;border:1px solid rgba(148,163,184,.18);border-radius:14px;background:linear-gradient(180deg,#f8fafc,#fff);overflow:hidden}.schedule-block{position:absolute;top:8px;bottom:8px;border-radius:12px;padding:7px 8px;display:flex;flex-direction:column;gap:2px;text-decoration:none;color:inherit;border:1px solid rgba(148,163,184,.22);box-shadow:0 4px 12px rgba(15,23,42,.06);min-width:52px;overflow:hidden}.schedule-block b{font-size:11px;white-space:nowrap}.schedule-block span{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.schedule-block.planned{background:#eff6ff;border-color:rgba(37,99,235,.22)}.schedule-block.work{background:#dcfce7;border-color:rgba(22,163,74,.28)}.schedule-block.done{background:#f1f5f9}.schedule-block.frozen{background:#ffedd5;border-color:rgba(249,115,22,.32)}.schedule-block.draft-safe{background:#f0fdf4;border-style:dashed;border-color:rgba(22,163,74,.34)}.schedule-block.draft-review{background:#fff7ed;border-style:dashed;border-color:rgba(245,158,11,.34)}.schedule-block.conflict{background:#fee2e2!important;border-color:rgba(220,38,38,.45)!important}.schedule-guide-card{margin:14px 0}.schedule-lane-card .card-header{padding-bottom:8px}
@media(max-width:760px){.schedule-axis,.schedule-timeline{display:none}.schedule-timeline-wrap{padding:0}.schedule-board-shell .schedule-area-card>.card-header{align-items:flex-start;flex-direction:column}}

/* --------------------- v1.70.0 Frozen Horizon + Schedule Board --------------------- */
.schedule-board-shell{display:grid;gap:14px;}
.schedule-legend{padding:14px;display:grid;gap:8px;align-content:start;min-width:280px;}
.schedule-legend b{font-size:14px;color:#0f172a;}
.schedule-legend span{display:flex;align-items:center;gap:8px;font-size:12px;color:#475569;}
.legend-dot{width:10px;height:10px;border-radius:999px;display:inline-block;background:#64748b;}
.legend-dot.green{background:#16a34a}.legend-dot.orange{background:#f97316}.legend-dot.red{background:#dc2626}.legend-dot.blue{background:#2563eb}
.schedule-filter-card .toolbar{flex-wrap:wrap;}
.schedule-board-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(360px,1fr));gap:14px;align-items:start;}
.schedule-line-card{border-left:4px solid rgba(37,99,235,.38);overflow:hidden;}
.schedule-line-card.area-lamination{border-left-color:rgba(124,58,237,.5);}
.schedule-line-card.has-conflict{border-left-color:#dc2626;}
.schedule-line-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:16px 16px 10px;border-bottom:1px solid rgba(148,163,184,.18);}
.schedule-line-head h3{margin:2px 0 4px;font-size:18px;}
.schedule-card-list{display:grid;gap:10px;padding:14px;}
.schedule-op-card{display:grid;gap:7px;text-decoration:none;color:inherit;border:1px solid rgba(148,163,184,.22);border-radius:16px;padding:12px;background:#fff;box-shadow:0 8px 24px rgba(15,23,42,.04);}
.schedule-op-card:hover{transform:translateY(-1px);box-shadow:0 16px 36px rgba(15,23,42,.08);}
.schedule-op-card.green{background:linear-gradient(180deg,#fff,#f0fdf4);border-color:rgba(22,163,74,.24)}
.schedule-op-card.orange{background:linear-gradient(180deg,#fff,#fff7ed);border-color:rgba(249,115,22,.26)}
.schedule-op-card.red{background:linear-gradient(180deg,#fff,#fef2f2);border-color:rgba(220,38,38,.28)}
.schedule-op-card.blue{background:linear-gradient(180deg,#fff,#eff6ff);border-color:rgba(37,99,235,.24)}
.schedule-op-card.has-conflict{outline:2px solid rgba(220,38,38,.22);}
.schedule-op-top{display:flex;justify-content:space-between;align-items:center;gap:10px;}
.schedule-op-card b{font-size:14px;line-height:1.25;color:#0f172a;}
.schedule-op-card span{font-size:12px;color:#64748b;line-height:1.35;}
.schedule-op-meta{display:flex;gap:8px;flex-wrap:wrap;}
.schedule-op-meta small{font-size:11px;background:rgba(15,23,42,.04);border-radius:999px;padding:3px 7px;color:#475569;}
.schedule-op-meta .err-text{background:#fee2e2;color:#b91c1c;}
.chip-row.tight{gap:4px;margin-top:2px;}
.chip-row.tight .chip{font-size:10px;padding:3px 6px;}
@media(max-width:760px){.schedule-board-grid{grid-template-columns:1fr}.schedule-line-head{flex-direction:column}.schedule-legend{min-width:0}.schedule-op-top{align-items:flex-start;flex-direction:column}}

/* v1.70 schedule board */
.schedule-board-shell .schedule-board-strip { margin: 14px 0; }
.schedule-board-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; align-items: start; }
.schedule-lane { padding: 14px; border: 1px solid rgba(15, 23, 42, .08); }
.schedule-lane-head { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; margin-bottom: 10px; }
.schedule-lane-head h3 { margin: 2px 0 0; }
.schedule-lane-metrics { display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end; }
.schedule-card-list { display:flex; flex-direction:column; gap:10px; }
.schedule-op-card { display:block; text-decoration:none; color:inherit; padding:12px; border-radius:14px; background:rgba(248,250,252,.88); border:1px solid rgba(148,163,184,.28); box-shadow:0 8px 20px rgba(15,23,42,.04); }
.schedule-op-card.safe { border-color:rgba(22,163,74,.35); background:rgba(240,253,244,.9); }
.schedule-op-card.needs-human { border-color:rgba(245,158,11,.45); background:rgba(255,251,235,.92); }
.schedule-op-card.frozen, .schedule-op-card.conflict { border-color:rgba(220,38,38,.45); background:rgba(254,242,242,.94); }
.schedule-op-top, .schedule-op-footer { display:flex; justify-content:space-between; gap:8px; align-items:center; flex-wrap:wrap; }
.schedule-op-title { font-weight:700; margin-top:8px; }
.schedule-op-subtitle { color:#64748b; font-size:.9rem; margin-top:2px; }
.schedule-op-meta { display:flex; gap:6px; flex-wrap:wrap; margin-top:8px; color:#64748b; font-size:.82rem; }
.schedule-op-meta span { background:rgba(255,255,255,.75); border:1px solid rgba(148,163,184,.22); border-radius:999px; padding:2px 8px; }
.schedule-op-footer { margin-top:10px; }
.schedule-op-footer small { color:#64748b; }
.empty-state.full { grid-column: 1 / -1; }
.frozen-override-box { margin-top:12px; padding:12px; border-radius:14px; background:rgba(255,251,235,.9); border:1px solid rgba(245,158,11,.28); }
.checkline { display:flex; gap:8px; align-items:center; font-weight:600; }

/* v1.71.0 Schedule Board manual move + what-if */
.schedule-move-preview{border-left:4px solid rgba(245,158,11,.65);}
.schedule-move-preview.ok{border-left-color:rgba(34,197,94,.75);}
.schedule-move-preview.err,.schedule-move-preview.danger{border-left-color:rgba(239,68,68,.75);}
.schedule-operation-card .schedule-op-links{margin-top:8px;display:flex;gap:8px;flex-wrap:wrap;}
.schedule-move-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px;margin-top:10px;padding:10px;border:1px dashed rgba(148,163,184,.45);border-radius:12px;background:rgba(248,250,252,.78);}
.schedule-move-form label{font-size:.78rem;color:#475569;display:grid;gap:4px;}
.schedule-move-form .checkline{display:flex;align-items:center;gap:6px;align-self:end;min-height:38px;}
.schedule-move-form .toolbar{grid-column:1/-1;justify-content:flex-start;}
.schedule-move-apply-form{margin-top:14px;display:flex;gap:10px;flex-wrap:wrap;}
@media(max-width:760px){.schedule-move-form{grid-template-columns:1fr}.schedule-move-form .toolbar{flex-direction:column;align-items:stretch}}

/* v1.71.0 Schedule Board manual move / what-if */
.schedule-preview-card{border:1px solid rgba(148,163,184,.28);border-radius:18px;background:#fff;box-shadow:0 10px 30px rgba(15,23,42,.06);margin-top:14px;padding:16px}.schedule-preview-card.ok{border-color:rgba(22,163,74,.30);background:#f7fff9}.schedule-preview-card.err{border-color:rgba(220,38,38,.25);background:#fff7f7}.schedule-preview-apply-form{margin-top:12px;display:flex;gap:10px;align-items:center;flex-wrap:wrap}.schedule-move-panel{margin-top:10px;border:1px dashed rgba(59,130,246,.28);border-radius:12px;padding:8px;background:rgba(248,250,252,.82)}.schedule-move-panel summary{cursor:pointer;font-weight:800;color:#1d4ed8}.schedule-move-form{display:grid;gap:8px;margin-top:8px}.schedule-move-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px}.schedule-op-links{margin-top:4px}.schedule-operation-card .text-link{font-weight:700;color:#2563eb;text-decoration:none}.schedule-operation-card .text-link:hover{text-decoration:underline}@media(max-width:880px){.schedule-move-grid{grid-template-columns:1fr}.schedule-preview-card .exec-kpi-row{grid-template-columns:1fr 1fr}}

/* v1.71 schedule-board manual move / what-if */
.schedule-move-preview-card{border-left:4px solid rgba(37,99,235,.45);display:grid;gap:12px;margin:14px 0}
.schedule-move-preview-card.ok{border-left-color:rgba(22,163,74,.55)}
.schedule-move-preview-card.warn{border-left-color:rgba(245,158,11,.7)}
.schedule-move-preview-card.danger{border-left-color:rgba(220,38,38,.7)}
.schedule-move-impact-strip{grid-template-columns:repeat(auto-fit,minmax(260px,1fr))}
.schedule-move-form{border:1px solid rgba(148,163,184,.35);border-radius:14px;padding:10px;margin:-2px 0 12px;background:rgba(248,250,252,.84);display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:8px;align-items:end}
.schedule-move-form .wide{grid-column:span 2}
.schedule-move-form label{display:grid;gap:4px;font-size:.82rem;color:#475569;font-weight:700}
.schedule-move-form input{border:1px solid rgba(148,163,184,.55);border-radius:10px;padding:7px 9px;background:#fff;color:#0f172a;min-width:0}
.schedule-move-form .checkline{display:flex;align-items:center;gap:7px;font-weight:700;color:#475569}
.schedule-move-form .checkline input{width:auto;min-width:auto}
.schedule-move-form-head{grid-column:1/-1;display:flex;align-items:center;gap:8px;justify-content:space-between;color:#0f172a}
.schedule-move-apply-form{display:flex;flex-wrap:wrap;gap:10px;align-items:end;margin-top:12px;border-top:1px solid rgba(148,163,184,.28);padding-top:12px}
.schedule-move-apply-form .form-field{display:grid;gap:4px;min-width:min(360px,100%)}
.schedule-move-apply-form input{border:1px solid rgba(148,163,184,.55);border-radius:10px;padding:8px 10px;background:#fff;color:#0f172a}
.schedule-move-apply-form .checkline{display:flex;align-items:center;gap:7px;font-weight:700;color:#475569}
.schedule-operation-card .text-link{font-weight:800;color:#2563eb;text-decoration:none}
.schedule-operation-card .text-link:hover{text-decoration:underline}
@media(max-width:760px){.schedule-move-form .wide{grid-column:1/-1}.schedule-move-apply-form{display:grid}.schedule-move-apply-form .form-field{min-width:0}}

/* v1.72 material readiness + WIP buffer */
.smart-shortage-card{border:1px solid rgba(249,115,22,.25);background:linear-gradient(180deg,rgba(255,247,237,.92),rgba(255,255,255,.96));}
.shortage-card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px;margin-top:10px;}
.shortage-card{display:flex;flex-direction:column;gap:4px;border:1px solid rgba(248,113,113,.25);border-radius:14px;padding:12px;background:#fff;box-shadow:0 8px 20px rgba(15,23,42,.04);}
.shortage-card b{font-size:15px;color:#991b1b;}
.shortage-card span{font-weight:700;color:#111827;}
.shortage-card small{color:#475569;line-height:1.35;}
.shortage-card em{font-style:normal;color:#64748b;font-size:12px;}
.shortage-chip-row{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px;}
.shortage-chip{font-style:normal;border-radius:999px;background:#fee2e2;color:#991b1b;padding:3px 8px;font-size:11px;font-weight:700;}

/* v1.72.0: material-readiness and WIP exception cards */
.material-readiness-panel{border:1px solid var(--border,#e5e7eb);}
.readiness-card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px;margin-top:10px;}
.readiness-card{border:1px solid var(--border,#e5e7eb);border-radius:14px;padding:12px;background:#fff;box-shadow:0 1px 2px rgba(15,23,42,.04);}
.readiness-card.err{border-color:#fecaca;background:#fff7f7;}
.readiness-card.warn{border-color:#fed7aa;background:#fffaf3;}
.readiness-card.ok{border-color:#bbf7d0;background:#f7fff9;}
.readiness-card.blue{border-color:#bfdbfe;background:#f8fbff;}
.readiness-card-head{display:flex;justify-content:space-between;gap:8px;align-items:center;margin-bottom:6px;}
.readiness-card p{margin:0 0 6px;color:#334155;font-size:13px;line-height:1.35;}
.readiness-card small{display:block;color:#64748b;font-size:12px;line-height:1.35;}
.readiness-lines{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px;}
.readiness-lines span,.mini-readiness{display:inline-flex;border-radius:999px;background:rgba(15,23,42,.06);padding:5px 8px;font-size:12px;color:#334155;}
.mini-readiness{margin-top:6px;display:inline-block;border-radius:10px;}
.shortage-chip-row{display:flex;flex-wrap:wrap;gap:5px;margin-top:6px;}
.shortage-chip{font-style:normal;border-radius:999px;background:#fff1f2;color:#9f1239;padding:4px 7px;font-size:12px;}

/* v1.72.0 material readiness / WIP exception cards */
.smart-exception-card { margin-top: 14px; }
.smart-exception-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.smart-exception-item { border: 1px solid var(--border, #dbe3ef); border-radius: 14px; padding: 12px; background: rgba(255,255,255,.72); }
.smart-exception-item.err { border-color: rgba(220, 38, 38, .28); background: rgba(254, 242, 242, .78); }
.smart-exception-item.orange { border-color: rgba(234, 88, 12, .30); background: rgba(255, 247, 237, .82); }
.smart-exception-item.warn { border-color: rgba(217, 119, 6, .28); background: rgba(255, 251, 235, .78); }
.exception-title { display: flex; align-items: start; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.exception-text { font-size: .94rem; color: var(--text, #172033); margin-bottom: 8px; }
.exception-lines { display: grid; gap: 3px; color: var(--muted, #64748b); }

/* v1.73.0 Procurement ETA + Quality Hold + UI dedupe */
.autopilot-decision-card{margin:14px 0;border:1px solid rgba(59,130,246,.18);background:linear-gradient(180deg,rgba(239,246,255,.72),rgba(255,255,255,.96));}
.autopilot-card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:12px;margin-top:10px;}
.autopilot-card{display:grid;grid-template-columns:auto 1fr;gap:10px;border:1px solid rgba(148,163,184,.30);border-radius:16px;padding:12px;background:#fff;box-shadow:0 8px 22px rgba(15,23,42,.045);min-height:120px;}
.autopilot-card.ok{border-color:rgba(22,163,74,.28);background:#f7fff9;}.autopilot-card.err{border-color:rgba(220,38,38,.25);background:#fff7f7;}.autopilot-card.warn{border-color:rgba(245,158,11,.30);background:#fffaf0;}.autopilot-card.info{border-color:rgba(59,130,246,.25);background:#f8fbff;}
.autopilot-card-icon{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;font-weight:900;background:rgba(15,23,42,.07);color:#0f172a;}
.autopilot-card-body{display:grid;gap:4px;align-content:start;}.autopilot-card-title{display:flex;align-items:center;justify-content:space-between;gap:8px;font-weight:900;color:#0f172a;}.autopilot-card-title .count{font-size:18px;}.autopilot-card p{margin:0;color:#334155;font-size:13px;line-height:1.35;}.autopilot-card .btn{margin-top:6px;width:max-content;}
.eta-line{display:block;margin-top:6px;color:#1d4ed8;font-weight:800;}.eta-line.warn{color:#b45309;}.eta-card-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px;margin:12px 0;}.eta-card{border:1px solid rgba(148,163,184,.25);border-radius:16px;padding:12px;background:#fff;display:flex;gap:10px;align-items:center;}.eta-card b{font-size:20px;}.eta-card .label{font-weight:900;}.eta-card .sub{font-size:12px;color:#64748b;}.eta-card.red{background:#fff7f7;border-color:#fecaca;}.eta-card.orange{background:#fffbeb;border-color:#fed7aa;}.eta-card.green{background:#f0fdf4;border-color:#bbf7d0;}.eta-card.blue{background:#eff6ff;border-color:#bfdbfe;}
.wip-quality-actions{display:grid;gap:8px;min-width:220px;}.wip-quality-form{display:grid;grid-template-columns:minmax(100px,140px) 1fr auto;gap:6px;align-items:end;}.wip-quality-form .input{min-width:0;}.wip-quality-meta{display:grid;gap:3px;color:#64748b;font-size:12px;}.production-buffer-page .table td{vertical-align:top;}.schedule-move-panel[open]{box-shadow:0 16px 34px rgba(37,99,235,.10);border-style:solid;}.schedule-move-panel summary{list-style:none;}.schedule-move-panel summary::-webkit-details-marker{display:none;}
@media(max-width:900px){.wip-quality-form{grid-template-columns:1fr}.autopilot-card-grid,.eta-card-row{grid-template-columns:1fr}.schedule-move-form .toolbar{align-items:flex-start}}

/* v1.73.0 UI polish: procurement ETA, WIP quality, duplicate-panel cleanup */
.v173-ui-polish .card-header{gap:14px;}
.autopilot-decision-card{border:1px solid rgba(37,99,235,.18);background:linear-gradient(180deg,rgba(239,246,255,.78),rgba(255,255,255,.96));}
.autopilot-card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px;}
.autopilot-card{display:grid;grid-template-columns:42px 1fr;gap:10px;align-items:start;border-radius:16px;border:1px solid rgba(148,163,184,.28);background:#fff;padding:12px;box-shadow:0 8px 22px rgba(15,23,42,.045);}
.autopilot-card-icon{width:36px;height:36px;border-radius:12px;display:grid;place-items:center;background:rgba(15,23,42,.06);font-weight:900;color:#0f172a;}
.autopilot-card b{display:block;color:#0f172a;margin-bottom:3px;}
.autopilot-card strong{display:inline-flex;margin:0 0 4px;font-size:22px;line-height:1;color:#0f172a;}
.autopilot-card span,.autopilot-card small{display:block;color:#475569;line-height:1.35;}
.autopilot-card.ok{border-color:rgba(22,163,74,.28);background:rgba(240,253,244,.78)}
.autopilot-card.warn,.autopilot-card.orange{border-color:rgba(245,158,11,.34);background:rgba(255,251,235,.82)}
.autopilot-card.err,.autopilot-card.danger{border-color:rgba(220,38,38,.28);background:rgba(254,242,242,.82)}
.autopilot-card.info,.autopilot-card.blue{border-color:rgba(37,99,235,.25);background:rgba(239,246,255,.82)}
.procurement-eta-kpis{margin:14px 0;}
.procurement-request-table td{vertical-align:top;}
.procurement-action-cell{min-width:340px;}
.procurement-action-cell .inline-form{align-items:center;gap:6px;flex-wrap:wrap;}
.procurement-eta-form .compact-input,.procurement-receive-form .compact-input{max-width:145px;}
.procurement-eta-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px;}
.procurement-eta-card{border:1px solid rgba(148,163,184,.28);border-radius:16px;padding:13px;background:#fff;box-shadow:0 8px 22px rgba(15,23,42,.045);display:flex;flex-direction:column;gap:5px;}
.procurement-eta-card.warning,.procurement-eta-card.warn{border-color:rgba(245,158,11,.36);background:#fffbeb;}
.procurement-eta-card.danger,.procurement-eta-card.err{border-color:rgba(220,38,38,.30);background:#fff7f7;}
.procurement-eta-card.info{border-color:rgba(37,99,235,.28);background:#f8fbff;}
.procurement-eta-card.ok{border-color:rgba(22,163,74,.28);background:#f7fff9;}
.eta-card-head{display:flex;justify-content:space-between;align-items:center;gap:8px;}
.procurement-eta-card b{font-size:15px;color:#0f172a;}
.procurement-eta-card span,.procurement-eta-card small{color:#475569;line-height:1.35;}
.procurement-eta-mini-form{display:grid;grid-template-columns:1fr 1fr auto;gap:6px;margin-top:8px;align-items:center;}
.wip-buffer-table td{vertical-align:top;}
.wip-quality-actions .inline-form{display:grid;grid-template-columns:minmax(90px,.8fr) minmax(120px,1fr) auto;gap:6px;align-items:center;}
.wip-quality-actions .compact-input{min-width:0;}
.smart-area-card .card-header h3{letter-spacing:-.01em;}
@media(max-width:900px){.procurement-action-cell{min-width:0}.procurement-eta-mini-form,.wip-quality-actions .inline-form{grid-template-columns:1fr}.procurement-eta-form .compact-input,.procurement-receive-form .compact-input{max-width:none}.autopilot-card-grid,.procurement-eta-grid{grid-template-columns:1fr}}

/* v1.74.0 Stabilization UX: decision panel, dedupe status, safer forms */
.autopilot-decision-summary{border:1px solid rgba(37,99,235,.18);background:linear-gradient(180deg,rgba(239,246,255,.92),rgba(255,255,255,.98));}
.autopilot-decision-summary .card-header{align-items:center;}
button[disabled],.btn[aria-disabled="true"]{opacity:.55;cursor:not-allowed;filter:saturate(.75);}
.procurement-requests-table .muted{line-height:1.3;}
.shortage-card .eta-line{font-style:normal;}
.schedule-move-preview .subtitle{line-height:1.45;}
.schedule-inline-apply{display:flex;flex-wrap:wrap;align-items:end;gap:10px;margin-top:12px;padding-top:12px;border-top:1px solid rgba(148,163,184,.22);}
.schedule-inline-apply .field{margin:0;min-width:260px;}
.wip-quality-form input[name="hold_reason"]::placeholder{color:#64748b;}
.empty-cell,.empty-state{color:#64748b;}
@media(max-width:900px){.autopilot-decision-summary .card-header,.schedule-inline-apply{align-items:flex-start}.schedule-inline-apply .field{min-width:0;width:100%}}

/* v1.75.0 Matrix shop: profile -> matrix -> line linkage */
.matrix-shop-page .content{max-width:1760px;}
.matrix-shop-hero{background:linear-gradient(135deg,rgba(15,23,42,.96),rgba(30,64,175,.88));color:#fff;border-radius:24px;padding:22px;border:1px solid rgba(255,255,255,.08);box-shadow:0 18px 46px rgba(15,23,42,.16);}
.matrix-shop-hero .subtitle,.matrix-shop-hero .eyebrow{color:rgba(255,255,255,.78);}
.matrix-shop-hero .code{background:rgba(255,255,255,.12);color:#fff;border-color:rgba(255,255,255,.18);}
.matrix-shop-hero .input{background:rgba(255,255,255,.96);}
.matrix-decision-strip{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:12px;margin-top:14px;}
.matrix-decision-card{display:flex;gap:12px;align-items:center;border-radius:18px;padding:14px;background:#fff;border:1px solid rgba(148,163,184,.24);box-shadow:0 10px 26px rgba(15,23,42,.055);}
.matrix-decision-card b{display:block;color:#0f172a;font-size:15px;}
.matrix-decision-card span{display:block;color:#64748b;font-size:12px;line-height:1.35;}
.matrix-decision-value{width:48px;height:48px;border-radius:16px;display:grid;place-items:center;font-weight:900;font-size:20px;background:rgba(15,23,42,.06);color:#0f172a;}
.matrix-decision-card.ok{border-color:rgba(22,163,74,.28);background:#f7fff9}.matrix-decision-card.ok .matrix-decision-value{background:#dcfce7;color:#166534}
.matrix-decision-card.warn{border-color:rgba(245,158,11,.32);background:#fffaf0}.matrix-decision-card.warn .matrix-decision-value{background:#fef3c7;color:#92400e}
.matrix-decision-card.danger{border-color:rgba(220,38,38,.28);background:#fff7f7}.matrix-decision-card.danger .matrix-decision-value{background:#fee2e2;color:#991b1b}
.matrix-decision-card.info{border-color:rgba(37,99,235,.25);background:#f8fbff}.matrix-decision-card.info .matrix-decision-value{background:#dbeafe;color:#1d4ed8}
.matrix-link-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px;}
.matrix-link-step{display:block;text-decoration:none;color:inherit;border:1px solid rgba(148,163,184,.24);border-radius:16px;padding:13px;background:#fff;transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease;}
.matrix-link-step:hover{transform:translateY(-1px);box-shadow:0 12px 28px rgba(15,23,42,.08);}
.matrix-link-step.ok{border-color:rgba(22,163,74,.26);background:#f7fff9}.matrix-link-step.warn{border-color:rgba(245,158,11,.32);background:#fffaf0}.matrix-link-step.info{border-color:rgba(37,99,235,.25);background:#f8fbff}
.matrix-link-title{font-weight:900;color:#0f172a}.matrix-link-value{font-size:24px;font-weight:900;margin-top:4px;color:#0f172a}.matrix-link-hint{font-size:12px;color:#64748b;line-height:1.35;margin-top:2px;}
.matrix-work-grid{grid-template-columns:minmax(0,1.7fr) minmax(320px,.8fr);}
.matrix-main-card{overflow:hidden;}.matrix-profile-table td{vertical-align:top;}.matrix-profile-row.ok{background:linear-gradient(90deg,rgba(240,253,244,.46),transparent 42%);}.matrix-profile-row.warn{background:linear-gradient(90deg,rgba(255,251,235,.55),transparent 42%);}.matrix-profile-row.danger{background:linear-gradient(90deg,rgba(254,242,242,.64),transparent 42%);}.matrix-profile-row.info{background:linear-gradient(90deg,rgba(239,246,255,.60),transparent 42%);}
.matrix-profile-title{font-weight:900;color:#0f172a;line-height:1.2;margin-bottom:3px;}.matrix-chip-list{display:grid;gap:7px;min-width:220px;}.matrix-chip{border:1px solid rgba(148,163,184,.28);border-radius:13px;background:#fff;padding:8px 10px;display:grid;gap:2px;box-shadow:0 5px 14px rgba(15,23,42,.035);}.matrix-chip b{font-size:13px;color:#0f172a;}.matrix-chip span,.matrix-chip em{font-style:normal;color:#64748b;font-size:12px;}.matrix-chip.ok{border-color:rgba(22,163,74,.28);}.matrix-chip.warn{border-color:rgba(245,158,11,.36);background:#fffbeb;}
.matrix-side-stack{gap:14px;}.matrix-quick-form .details{margin:2px 0 10px;}.matrix-orphan-list{display:grid;gap:8px;}.matrix-orphan-item{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;border:1px solid rgba(148,163,184,.24);border-radius:14px;padding:10px;background:#fff;}.matrix-orphan-item.ok{border-color:rgba(22,163,74,.24);}.matrix-orphan-item.warn{border-color:rgba(245,158,11,.35);background:#fffaf0;}.small-actions{gap:6px;align-items:flex-start;}.matrix-filterbar .btn{white-space:nowrap;}.badge.neutral{background:rgba(100,116,139,.12);color:#334155;border-color:rgba(100,116,139,.22);}.badge.danger{background:#fee2e2;color:#991b1b;border-color:#fecaca}.badge.info{background:#dbeafe;color:#1d4ed8;border-color:#bfdbfe}
.top-gap-4{margin-top:4px;}.top-gap-8{margin-top:8px;}
@media(max-width:1100px){.matrix-work-grid{grid-template-columns:1fr}.matrix-shop-hero{padding:18px}.matrix-shop-hero .actions{width:100%;}.matrix-shop-hero .actions .input{min-width:0;width:100%;}.matrix-decision-strip,.matrix-link-grid{grid-template-columns:1fr 1fr;}}
@media(max-width:760px){.matrix-decision-strip,.matrix-link-grid,.matrix-kpis{grid-template-columns:1fr}.matrix-orphan-item{display:grid}.matrix-profile-table{min-width:980px}.matrix-table-wrap{overflow:auto}.matrix-shop-hero{border-radius:18px}.matrix-shop-hero .actions{align-items:stretch}.matrix-shop-hero .actions .btn{justify-content:center}}

/* --------------------- AKFA UI v1.76 — dashboard visual system --------------------- */
.sr-only{
  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;
}
.akfa-ui-v176{
  --bg:#071426;
  --bg-2:#0b1d33;
  --surface:#ffffff;
  --surface-2:#f7f8fb;
  --surface-3:#f1f5f9;
  --panel:#ffffff;
  --panel-2:#f8fafc;
  --text:#111827;
  --muted:#6b7280;
  --border:#e3e7ee;
  --primary:#2f6feb;
  --primary-700:#1d4ed8;
  --success:#2f9e44;
  --warning:#f59e0b;
  --danger:#ef4444;
  --radius:12px;
  --radius-sm:8px;
  --shadow-sm:0 1px 2px rgba(15,23,42,.04), 0 8px 18px rgba(15,23,42,.04);
  --shadow-md:0 10px 30px rgba(15,23,42,.10);
  --sidebar-w:66px;
  --content-max:1920px;
  background:#f7f8fb;
}
.akfa-ui-v176 .app-shell{background:#f7f8fb;}
.akfa-ui-v176 .sidebar{
  width:66px;
  padding:12px 8px;
  background:linear-gradient(180deg,#061324 0%,#091c31 100%);
  border-right:1px solid rgba(255,255,255,.08);
  box-shadow:8px 0 24px rgba(2,6,23,.08);
  scrollbar-width:none;
}
.akfa-ui-v176 .sidebar::-webkit-scrollbar{display:none;}
.akfa-ui-v176 .sidebar-header{padding:2px 0 10px;justify-content:center;}
.akfa-ui-v176 .brand{width:48px;height:48px;justify-content:center;border-radius:14px;color:#fff;}
.akfa-ui-v176 .brand-mark{
  width:44px;height:44px;border-radius:14px;background:transparent;box-shadow:none;
  color:#e5eefb;font-size:24px;font-weight:700;
}
.akfa-ui-v176 .brand-text,
.akfa-ui-v176 .nav-label,
.akfa-ui-v176 .nav-group-label,
.akfa-ui-v176 .sidebar-footer{display:none!important;}
.akfa-ui-v176 .sidebar-nav{gap:7px;padding:6px 0;align-items:center;}
.akfa-ui-v176 .nav-group{width:100%;display:grid;gap:7px;justify-items:center;padding:0 0 6px;margin:0 0 3px;border-bottom:1px solid rgba(255,255,255,.10);}
.akfa-ui-v176 .nav-group:last-child{border-bottom:0;}
.akfa-ui-v176 .nav-item{
  width:44px;height:44px;padding:0;border-radius:13px;display:grid;place-items:center;
  color:#dbeafe;background:transparent;border:1px solid transparent;opacity:1;
}
.akfa-ui-v176 .nav-item:hover{background:rgba(255,255,255,.09);border-color:rgba(255,255,255,.12);}
.akfa-ui-v176 .nav-item.active{
  background:linear-gradient(180deg,#1676ff,#095fdd);
  box-shadow:0 8px 18px rgba(37,99,235,.34), inset 0 1px 0 rgba(255,255,255,.18);
  border-color:rgba(96,165,250,.54);color:#fff;
}
.akfa-ui-v176 .nav-icon{width:22px;height:22px;}
.akfa-ui-v176 .nav-icon .icon{width:22px;height:22px;}
.akfa-ui-v176 .main{background:#f7f8fb;min-width:0;}
.akfa-ui-v176 .topbar{
  position:sticky;top:0;background:rgba(247,248,251,.88);backdrop-filter:blur(12px);
  border-bottom:1px solid rgba(226,232,240,.86);box-shadow:0 1px 0 rgba(255,255,255,.78);z-index:40;
}
.akfa-ui-v176 .topbar-inner{max-width:none;padding:10px 22px;}
.akfa-ui-v176 .breadcrumbs{font-weight:700;color:#64748b;}
.akfa-ui-v176 .topbar-tools{border-radius:14px;background:#fff;border-color:#e5e7eb;box-shadow:0 1px 2px rgba(15,23,42,.04);}
.akfa-ui-v176 .icon-btn{width:38px;height:38px;border-radius:12px;background:#fff;}
.akfa-ui-v176 .user-chip{border-radius:14px;background:#fff;}
.akfa-ui-v176 .content{max-width:none;padding:18px 22px 30px;}
.akfa-ui-v176 .card{
  border:1px solid #e1e6ee;border-radius:12px;background:#fff;box-shadow:0 1px 2px rgba(15,23,42,.04);
}
.akfa-ui-v176 .card-header{padding:14px 16px;border-bottom:1px solid #edf0f5;}
.akfa-ui-v176 .card-header.compact{padding:13px 16px;}
.akfa-ui-v176 .card-title{font-size:15px;font-weight:800;color:#111827;}
.akfa-ui-v176 .card-subtitle{font-size:12px;color:#6b7280;}
.akfa-ui-v176 .table{border-collapse:separate;border-spacing:0;width:100%;font-size:13px;}
.akfa-ui-v176 th{
  background:#f8fafc;color:#111827;font-size:12px;font-weight:800;border-bottom:1px solid #e5e7eb;
}
.akfa-ui-v176 td{border-bottom:1px solid #edf0f5;color:#111827;}
.akfa-ui-v176 th,.akfa-ui-v176 td{padding:10px 12px;}
.akfa-ui-v176 tbody tr:hover td{background:#f8fafc;}
.akfa-ui-v176 .badge{
  border-radius:999px;padding:4px 9px;font-weight:800;font-size:11px;border:1px solid transparent;text-transform:none;
}
.akfa-ui-v176 .badge.ok,.akfa-ui-v176 .badge.green{background:#eaf7ee;color:#15803d;border-color:#ceebd7;}
.akfa-ui-v176 .badge.warn,.akfa-ui-v176 .badge.orange,.akfa-ui-v176 .badge.yellow{background:#fff6df;color:#b45309;border-color:#fde8a9;}
.akfa-ui-v176 .badge.err,.akfa-ui-v176 .badge.red{background:#fff1f1;color:#dc2626;border-color:#ffd4d4;}
.akfa-ui-v176 .badge.info,.akfa-ui-v176 .badge.blue{background:#eff6ff;color:#2563eb;border-color:#d7e7ff;}
.akfa-ui-v176 .btn{border-radius:10px;font-weight:800;box-shadow:none;}
.akfa-ui-v176 .btn-primary{background:#2563eb;border-color:#2563eb;}
.akfa-ui-v176 .input,
.akfa-ui-v176 select,
.akfa-ui-v176 input[type="text"],
.akfa-ui-v176 input[type="search"],
.akfa-ui-v176 input[type="date"],
.akfa-ui-v176 input[type="number"],
.akfa-ui-v176 textarea{
  border:1px solid #e5e7eb;border-radius:10px;background:#fff;color:#111827;box-shadow:none;
}
.akfa-ui-v176 .empty-state,.akfa-ui-v176 .empty-cell{color:#64748b;background:#f8fafc;border-radius:12px;}

/* Executive dashboard exact layout inspired by the provided reference */
.akfa-ui-v176.executive-dashboard-page .topbar{display:none;}
.akfa-ui-v176.executive-dashboard-page .content{padding:14px 18px 24px;}
.akfa-ui-v176.executive-dashboard-page .app-shell{min-height:100vh;}
.exec-dashboard-v176{gap:12px;}
.exec-dashboard-v176 .card{border-radius:11px;border-color:#dfe5ee;box-shadow:0 1px 2px rgba(15,23,42,.035);}
.exec-dashboard-header{
  display:grid;grid-template-columns:minmax(360px,1fr) minmax(780px,1.52fr);gap:18px;align-items:start;
}
.exec-title-block h1{font-size:30px;line-height:1.05;font-weight:900;letter-spacing:-.035em;margin:0;color:#111827;}
.exec-title-block p{font-size:16px;color:#6b7280;font-weight:500;margin-top:6px;}
.exec-toolbar{display:grid;grid-template-columns:1.34fr .74fr .74fr .74fr 1.08fr 42px 42px;gap:12px;align-items:start;}
.exec-filter-card{
  min-height:64px;padding:9px 14px;border:1px solid #dfe5ee;border-radius:10px;background:#fff;
  display:grid;grid-template-rows:auto 1fr;align-content:center;box-shadow:0 1px 2px rgba(15,23,42,.035);
}
.exec-filter-card span{font-size:12px;color:#6b7280;font-weight:800;margin-bottom:6px;}
.exec-filter-card select,.exec-filter-card input{
  width:100%;border:0!important;background:transparent!important;padding:0!important;border-radius:0!important;
  font-weight:800;color:#111827;font-size:14px;outline:0;box-shadow:none!important;
}
.exec-date-range{display:flex;align-items:center;gap:4px;min-width:0;}
.exec-date-range input{font-size:13px;min-width:0;}
.exec-date-range em{font-style:normal;color:#94a3b8;font-weight:900;}
.exec-search-card{grid-template-columns:1fr auto;grid-template-rows:1fr;align-items:center;min-height:64px;}
.exec-search-card input{font-weight:700;color:#111827;}
.exec-search-card b{font-size:23px;color:#64748b;font-weight:400;line-height:1;}
.exec-icon-action{
  width:42px;height:64px;border:1px solid #dfe5ee;border-radius:10px;background:#fff;color:#475569;
  display:grid;place-items:center;font-size:22px;font-weight:900;box-shadow:0 1px 2px rgba(15,23,42,.035);cursor:pointer;
}
.exec-icon-action:hover{background:#f8fafc;color:#2563eb;text-decoration:none;}
.exec-kpi-row{grid-template-columns:repeat(7,minmax(150px,1fr));gap:12px;}
.exec-kpi{min-height:104px;padding:18px 16px;grid-template-columns:52px 1fr;border-radius:10px;}
.exec-kpi-icon{width:46px;height:46px;border:0;background:transparent!important;font-size:34px;box-shadow:none;}
.exec-kpi-label{font-size:13px;color:#111827!important;font-weight:800;line-height:1.15;}
.exec-kpi-value{font-size:26px;letter-spacing:-.035em;line-height:1;margin-top:7px;}
.exec-kpi-share{font-size:13px;font-weight:900;margin-top:7px;}
.exec-kpi.green .exec-kpi-share{color:#16a34a}.exec-kpi.blue .exec-kpi-share{color:#2563eb}.exec-kpi.purple .exec-kpi-share{color:#7c3aed}.exec-kpi.orange .exec-kpi-share{color:#f97316}.exec-kpi.red .exec-kpi-share{color:#ef4444}
.exec-main-grid{grid-template-columns:minmax(620px,1.08fr) minmax(610px,.92fr);gap:12px;}
.exec-chart-stack{gap:12px;}
.exec-table-wrap{max-height:418px;border-radius:0;}
.exec-table th,.exec-table td{padding:9px 13px;font-size:12px;}
.exec-table th{text-align:left;}
.exec-product-chip{font-size:11px;padding:3px 12px;min-width:52px;justify-content:center;}
.exec-card-link{border-top:1px solid #edf0f5;text-align:center;padding:11px 12px;font-size:13px;font-weight:800;}
.exec-card-link a{color:#2563eb;}
.exec-card-link a:hover{text-decoration:none;color:#1d4ed8;}
.exec-chart-card .card-header.compact{padding:12px 16px 8px;border-bottom:0;}
.info-dot{display:inline-grid;place-items:center;width:16px;height:16px;border-radius:999px;border:1px solid #cbd5e1;color:#64748b;font-size:11px;font-weight:900;margin-left:5px;vertical-align:middle;}
.exec-legend.inline{justify-content:flex-start;font-size:11px;margin-top:6px;gap:8px;}
.exec-legend.inline span{width:14px;height:4px;margin-left:0;}
.exec-svg-chart{padding:0 16px 16px;}
.exec-svg-chart svg{height:205px;}
.exec-bars{height:220px;margin:0 16px 10px;padding:10px 0 20px;}
.exec-bar-stack{height:180px;}
.exec-lower-grid{grid-template-columns:minmax(390px,.95fr) minmax(440px,1fr) minmax(360px,.82fr);gap:12px;}
.exec-structure-body{grid-template-columns:minmax(240px,.9fr) minmax(240px,1fr);gap:16px;}
.exec-donut{width:154px;height:154px;}
.exec-donut-center{width:92px;height:92px;}
.exec-risk-row{border-radius:10px;padding:10px 11px;background:#fff;border:0;border-bottom:1px solid #edf0f5;grid-template-columns:38px 1fr 42px;}
.exec-risk-row:last-child{border-bottom:0;}
.exec-risk-icon{width:32px;height:32px;border-radius:999px;border:1.8px solid currentColor;background:#fff;font-size:17px;}
.exec-risk-count{min-width:32px;height:28px;border-radius:999px;border:0;font-size:13px;}
.exec-risk-row.red .exec-risk-count{background:#ffe0e0;color:#ef4444;}.exec-risk-row.orange .exec-risk-count{background:#ffe6d5;color:#f97316;}.exec-risk-row.yellow .exec-risk-count{background:#fff1bc;color:#d97706;}.exec-risk-row.blue .exec-risk-count{background:#dbeafe;color:#2563eb;}
.exec-direction-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;}
.exec-direction-card{border-radius:10px;border:0;box-shadow:none;padding:18px 22px;display:grid;grid-template-columns:minmax(190px,.72fr) 1fr;align-items:center;gap:20px;}
.exec-direction-card.green{background:linear-gradient(90deg,#eefaf1,#f8fcfa);box-shadow:none}.exec-direction-card.blue{background:linear-gradient(90deg,#eef6ff,#f8fbff);box-shadow:none}.exec-direction-card.purple{background:linear-gradient(90deg,#f5f0ff,#fbf9ff);box-shadow:none}
.exec-direction-title{font-size:18px;}.exec-direction-volume{font-size:25px;margin-top:8px;}.exec-direction-split{border-top:0;margin:0;padding:0;border-left:1px solid #e1e6ee;padding-left:20px;}
.exec-collapsed-support-card{margin-top:0;}
.exec-data-quality-body{display:grid;grid-template-columns:minmax(320px,.7fr) 1fr;gap:14px;}
@media (max-width:1680px){
  .exec-dashboard-header{grid-template-columns:1fr;}
  .exec-toolbar{grid-template-columns:1.1fr repeat(3,.72fr) 1fr 42px 42px;}
  .exec-kpi-row{grid-template-columns:repeat(4,minmax(0,1fr));}
  .exec-main-grid,.exec-lower-grid{grid-template-columns:1fr;}
}
@media (max-width:1120px){
  .akfa-ui-v176 .sidebar{position:fixed;left:-110%;top:0;z-index:100;transition:left 180ms ease;width:280px;}
  .akfa-ui-v176 body.sidebar-open .sidebar{left:0;}
  body.sidebar-open .akfa-ui-v176 .sidebar{left:0;}
  .akfa-ui-v176 .hamburger{display:inline-flex;}
  .akfa-ui-v176 .brand-text,.akfa-ui-v176 .nav-label,.akfa-ui-v176 .nav-group-label{display:block!important;}
  .akfa-ui-v176 .nav-item{width:100%;height:auto;display:flex;justify-content:flex-start;padding:10px;border-radius:12px;}
  .exec-toolbar{grid-template-columns:repeat(2,minmax(0,1fr));}
  .exec-search-card{grid-column:span 2;}
  .exec-icon-action{height:46px;width:100%;}
}
@media (max-width:760px){
  .akfa-ui-v176 .content,.akfa-ui-v176.executive-dashboard-page .content{padding:12px;}
  .exec-title-block h1{font-size:24px;}
  .exec-title-block p{font-size:13px;}
  .exec-toolbar,.exec-kpi-row,.exec-direction-grid,.exec-data-quality-body{grid-template-columns:1fr;}
  .exec-search-card{grid-column:auto;}
  .exec-direction-card{grid-template-columns:1fr;}.exec-direction-split{border-left:0;border-top:1px solid #e1e6ee;padding-left:0;padding-top:12px;}
}


/* --------------------- v1.76.0 Dashboard visual system and global layout polish --------------------- */
:root{
  --dash-bg: #f5f7fb;
  --dash-rail: #071421;
  --dash-blue: #2563eb;
  --dash-green: #3ca34d;
  --dash-purple: #7d5bd7;
  --dash-orange: #f59e0b;
  --dash-red: #ef4444;
  --dash-card-border: #dce4ef;
  --dash-soft-border: rgba(15,23,42,.10);
  --dash-shadow: 0 10px 26px rgba(15,23,42,.055);
}
.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}
.center{text-align:center;}
.card,
.table-wrap,
.page-header{
  box-shadow: 0 8px 24px rgba(15,23,42,.045);
}
.card{ border-color: rgba(148,163,184,.24); }
.card-header.compact{padding:14px 16px;}
.card-title{font-size:15px;font-weight:950;letter-spacing:-.02em;color:var(--text);}
.card-subtitle{font-weight:650;}
.input, select.input, textarea.input{
  border-color: rgba(148,163,184,.32);
  background: rgba(255,255,255,.92);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
.btn{font-weight:850;border-radius:12px;}
.badge{font-weight:900;border-radius:999px;padding:4px 9px;}
.table th{font-weight:950;color:#263244;background:linear-gradient(180deg,#f7f9fc,#edf2f8);}
.table td{color:#172033;}
html[data-theme="dark"] .table th,
html[data-theme="dark"] .table td{color:var(--text);}

/* Executive dashboard matches reference: dark icon rail + compact white cards. */
.executive-dashboard-page{
  background: var(--dash-bg);
}
.executive-dashboard-page .topbar{display:none;}
.executive-dashboard-page .app-shell{background:var(--dash-bg);}
.executive-dashboard-page .sidebar{
  width:72px;
  min-width:72px;
  padding:12px 8px;
  background:linear-gradient(180deg,#081523 0%,#06111d 100%);
  border-right:1px solid rgba(255,255,255,.06);
  overflow:hidden;
}
.executive-dashboard-page .sidebar-header{padding:2px 0 10px;justify-content:center;}
.executive-dashboard-page .brand{justify-content:center;width:100%;}
.executive-dashboard-page .brand-mark{
  width:44px;height:44px;border-radius:0;background:transparent;box-shadow:none;font-size:0;color:#fff;
}
.executive-dashboard-page .brand-mark::before{content:"☰";font-size:24px;font-weight:700;line-height:1;}
.executive-dashboard-page .brand-text,
.executive-dashboard-page .nav-group-label,
.executive-dashboard-page .nav-label,
.executive-dashboard-page .sidebar-footer{display:none!important;}
.executive-dashboard-page .sidebar-nav{padding:0;gap:12px;align-items:center;}
.executive-dashboard-page .nav-group{display:grid;gap:12px;padding:0;border:0;width:100%;justify-items:center;}
.executive-dashboard-page .nav-item{
  width:46px;height:46px;padding:0;display:grid;place-items:center;border-radius:12px;color:#e7f0ff;
  opacity:.96;background:transparent;border:1px solid transparent;position:relative;
}
.executive-dashboard-page .nav-icon{width:22px;height:22px;}
.executive-dashboard-page .nav-item:hover{background:rgba(255,255,255,.08);}
.executive-dashboard-page .nav-item.active{
  background:linear-gradient(180deg,#2373f6,#0754d7);
  box-shadow:0 10px 24px rgba(37,99,235,.42);
  border-color:rgba(255,255,255,.10);
}
.executive-dashboard-page .nav-group + .nav-group::before{
  content:"";display:block;width:44px;height:1px;background:rgba(255,255,255,.14);margin:0 auto 2px;
}
.executive-dashboard-page .content{max-width:none;padding:14px 18px 22px;}
.exec-dashboard-v176{gap:14px;}
.exec-dashboard-top{
  display:grid;
  grid-template-columns:minmax(360px,1fr) minmax(760px,auto);
  gap:18px;
  align-items:start;
}
.exec-title-block h1{font-size:30px;line-height:1.02;letter-spacing:-.045em;font-weight:950;margin:0;color:#111827;}
.exec-title-block p{margin-top:6px;color:#64748b;font-size:15px;font-weight:650;}
.exec-filter-panel-v176{
  display:grid;
  grid-template-columns: minmax(230px,1.35fr) minmax(145px,.9fr) minmax(145px,.9fr) minmax(145px,.9fr) minmax(190px,1fr) auto;
  gap:12px;align-items:stretch;
}
.exec-filter-field{
  display:grid;gap:5px;min-height:64px;padding:9px 12px;border:1px solid var(--dash-card-border);border-radius:10px;background:#fff;
  box-shadow:0 4px 12px rgba(15,23,42,.035);
}
.exec-filter-field span:not(.sr-only){font-size:12px;font-weight:850;color:#6b7280;letter-spacing:0;text-transform:none;}
.exec-filter-field .input{
  border:0;padding:0;min-height:24px;background:transparent;box-shadow:none;font-size:14px;font-weight:900;color:#111827;border-radius:0;
}
.exec-period-inputs{display:flex;align-items:center;gap:6px;min-width:0;}
.exec-period-inputs input{font-size:13px!important;min-width:0;width:100%;}
.exec-period-inputs em{font-style:normal;color:#94a3b8;font-weight:900;}
.exec-period-inputs .icon{width:18px;height:18px;color:#64748b;flex:0 0 auto;}
.exec-search-field{display:grid;grid-template-columns:1fr auto;align-items:center;gap:6px;}
.exec-search-field .icon{width:19px;height:19px;color:#475569;}
.exec-filter-actions-v176{display:flex;align-items:stretch;gap:8px;}
.exec-icon-btn{
  width:46px;min-height:64px;border:1px solid var(--dash-card-border);border-radius:10px;background:#fff;display:grid;place-items:center;
  color:#1f2937;box-shadow:0 4px 12px rgba(15,23,42,.035);cursor:pointer;
}
.exec-icon-btn .icon{width:20px;height:20px;}
.exec-icon-btn:hover{border-color:#c7d5e8;background:#f8fafc;}
.exec-kpi-row-v176{grid-template-columns:repeat(7,minmax(150px,1fr));gap:14px;}
.exec-kpi{
  min-height:90px;padding:14px 16px;grid-template-columns:48px 1fr;border-radius:10px;border-color:var(--dash-card-border);box-shadow:var(--dash-shadow);
  background:#fff;
}
.exec-kpi-icon{width:42px;height:42px;border:0;background:transparent;border-radius:0;color:currentColor;}
.exec-kpi-icon .icon{width:40px;height:40px;stroke-width:1.8;}
.exec-kpi-label{font-size:13px;font-weight:900;color:#111827!important;}
.exec-kpi-value{font-size:28px;letter-spacing:-.045em;color:#111827!important;line-height:1;margin-top:5px;}
.exec-kpi-share{font-size:13px;font-weight:950;margin-top:4px;}
.exec-kpi.green{color:var(--dash-green)}.exec-kpi.blue{color:var(--dash-blue)}.exec-kpi.purple{color:var(--dash-purple)}.exec-kpi.orange{color:var(--dash-orange)}.exec-kpi.red{color:var(--dash-red)}
.exec-main-grid-v176{grid-template-columns:minmax(650px,1.12fr) minmax(560px,.88fr);gap:14px;}
.exec-chart-stack{gap:14px;}
.exec-plan-card,.exec-chart-card,.exec-lower-grid-v176>.card,.exec-summary-card-v176{
  border-radius:10px;border-color:var(--dash-card-border);box-shadow:var(--dash-shadow);background:#fff;overflow:hidden;
}
.exec-plan-card .card-header,.exec-chart-card .card-header,.exec-lower-grid-v176 .card-header,.exec-summary-card-v176 .card-header{border-bottom:0;padding:16px 18px 6px;}
.exec-plan-card .card-title,.exec-chart-card .card-title,.exec-lower-grid-v176 .card-title,.exec-summary-card-v176 .card-title{font-size:18px;}
.exec-chart-card .card-title span{font-weight:750;color:#64748b;}
.info-dot{display:inline-grid;place-items:center;width:18px;height:18px;border:1px solid #cbd5e1;border-radius:50%;font-size:11px;color:#64748b;margin-left:5px;}
.exec-table-wrap{max-height:376px;border:0;border-radius:0;box-shadow:none;margin:8px 10px 0;}
.exec-table th,.exec-table td{padding:9px 12px;border-color:#e7edf4;font-size:13px;}
.exec-table th{text-align:left;background:linear-gradient(180deg,#f8fafc,#f1f5f9);color:#111827;}
.exec-table tr:hover td{background:#f8fbff;}
.exec-product-chip{padding:3px 12px;font-size:12px;min-width:58px;justify-content:center;background:#ecfdf3;border-color:#d5eddc;}
.exec-product-chip.ok{color:#24783a;background:#eaf7ee;}.exec-product-chip.lam{color:#24783a;background:#eaf7ee;}
.exec-card-link-row{display:flex;justify-content:center;padding:10px 12px 12px;border-top:1px solid #eef2f7;}
.exec-card-link{font-size:13px;font-weight:900;color:#2563eb;display:inline-flex;gap:8px;align-items:center;}
.exec-chart-head{align-items:start;}
.exec-chart-actions{display:flex;align-items:center;gap:12px;}
.exec-chart-actions .pill{height:30px;display:inline-flex;align-items:center;background:#fff;border:1px solid #dbe3ee;color:#1f2937;font-weight:850;border-radius:8px;padding:0 10px;}
.exec-dots{font-size:22px;line-height:1;color:#334155;}
.inline-legend{justify-content:flex-start;margin-top:8px;font-size:11px;color:#111827;}
.exec-svg-chart{padding:2px 18px 18px;}
.exec-svg-chart svg{height:192px;}
.exec-line{stroke-width:3.2;filter:none;}
.exec-line.local{stroke:#2563eb}.exec-line.export{stroke:#ff1f2d;}
.exec-axis{stroke:#e1e7ef}.exec-grid-line{stroke:#e7edf4;}
.exec-chart-scale{right:20px;top:0;color:#2563eb;font-size:12px;}
.exec-bars{height:210px;border-bottom:0;margin:0 18px 4px;padding:4px 0 22px;background:repeating-linear-gradient(to top,transparent 0,transparent 39px,#e8edf5 40px);}
.exec-bar-stack{height:178px}.exec-bar-stack .ok{background:#3ca34d}.exec-bar-stack .lam{background:#2563eb;}
.exec-lower-grid-v176{grid-template-columns:minmax(420px,.92fr) minmax(430px,.98fr) minmax(360px,.72fr);gap:14px;}
.exec-lower-grid-v176 .card-body{padding:8px 18px 6px;}
.exec-compact-table .table th,.exec-compact-table .table td{padding:9px 10px;font-size:13px;}
.exec-load,.exec-hbar{height:12px;background:#edf2f7;border-radius:999px;}
.exec-load span.ok,.exec-hbar span.green{background:#3ca34d}.exec-load span.warn{background:#f59e0b}.exec-load span.danger{background:#ef4444}.exec-hbar span.blue{background:#2563eb}.exec-hbar span.purple{background:#8b5cf6;}
.exec-structure-body{grid-template-columns:minmax(270px,.95fr) minmax(260px,1fr);gap:20px;align-items:center;}
.exec-donut{width:132px;height:132px;box-shadow:none;}
.exec-donut-center{width:82px;height:82px;box-shadow:0 0 0 6px #fff;border:0;}
.exec-structure-list div{font-size:13px;}.exec-structure-list span:last-child{font-weight:750;}
.exec-product-bar-label{font-size:13px;}
.exec-risk-list{gap:0;padding-top:0!important;padding-bottom:0!important;}
.exec-risk-row{
  grid-template-columns:36px 1fr auto 18px;gap:10px;border:0;border-bottom:1px solid #eef2f7;border-radius:0;background:#fff!important;padding:12px 4px;
}
.exec-risk-list .exec-risk-row:last-child{border-bottom:0;}
.exec-risk-icon{width:30px;height:30px;border:0;font-size:18px;}
.exec-risk-count{min-width:34px;height:26px;border:0;font-size:13px;}
.exec-risk-arrow{font-size:24px;color:#64748b;}
.exec-risk-row.red{color:#ef4444}.exec-risk-row.orange{color:#f97316}.exec-risk-row.yellow{color:#f59e0b}.exec-risk-row.blue{color:#2563eb}
.exec-risk-row.red .exec-risk-count{background:#fee2e2;color:#ef4444}.exec-risk-row.orange .exec-risk-count{background:#ffedd5;color:#fb923c}.exec-risk-row.yellow .exec-risk-count{background:#fef3c7;color:#f59e0b}.exec-risk-row.blue .exec-risk-count{background:#dbeafe;color:#2563eb}
.exec-summary-card-v176{margin-top:2px;}
.exec-summary-card-v176 .card-body{padding:10px 14px 14px;}
.exec-direction-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;}
.exec-direction-card{
  display:grid;grid-template-columns:58px minmax(160px,1fr) minmax(190px,.7fr);align-items:center;gap:14px;
  padding:16px;border-radius:10px;border:0;background:linear-gradient(90deg,rgba(60,163,77,.10),#fff);
  box-shadow:none;
}
.exec-direction-card.blue{background:linear-gradient(90deg,rgba(37,99,235,.10),#fff);box-shadow:none}.exec-direction-card.purple{background:linear-gradient(90deg,rgba(139,92,246,.12),#fff);box-shadow:none}.exec-direction-card.green{box-shadow:none;}
.exec-direction-icon{width:44px;height:44px;display:grid;place-items:center;color:currentColor;}.exec-direction-icon .icon{width:38px;height:38px;}
.exec-direction-title{font-size:16px;font-weight:950;}.exec-direction-volume{font-size:25px;margin-top:5px;}.exec-direction-share{font-size:12px;font-weight:750;}
.exec-direction-split{grid-template-columns:1fr;gap:4px;margin:0;padding:0 0 0 16px;border-top:0;border-left:1px solid #dbe3ee;}
.exec-data-quality-details{margin-top:4px;color:#64748b;font-size:13px;font-weight:800;}
.exec-data-quality-details summary{cursor:pointer;padding:8px 4px;}
.exec-data-quality-card{margin-top:0!important;}

@media (max-width: 1500px){
  .exec-dashboard-top{grid-template-columns:1fr;}
  .exec-filter-panel-v176{grid-template-columns:repeat(4,minmax(150px,1fr));}
  .exec-search-field{grid-column:span 2}.exec-filter-actions-v176{grid-column:auto;}
  .exec-kpi-row-v176{grid-template-columns:repeat(4,minmax(160px,1fr));}
}
@media (max-width: 1180px){
  .executive-dashboard-page .sidebar{width:64px;min-width:64px;}
  .exec-filter-panel-v176{grid-template-columns:repeat(2,minmax(160px,1fr));}
  .exec-search-field{grid-column:auto;}
  .exec-main-grid-v176,.exec-lower-grid-v176{grid-template-columns:1fr;}
  .exec-direction-grid{grid-template-columns:1fr;}
}
@media (max-width: 720px){
  .executive-dashboard-page .app-shell{display:block;}
  .executive-dashboard-page .sidebar{position:relative;width:100%;height:auto;min-width:0;display:flex;overflow:auto;padding:8px;}
  .executive-dashboard-page .sidebar-nav{display:flex;flex-direction:row;align-items:center;overflow:auto;width:100%;}
  .executive-dashboard-page .nav-group{display:flex;width:auto;}.executive-dashboard-page .nav-group + .nav-group::before{display:none;}
  .executive-dashboard-page .content{padding:12px;}
  .exec-filter-panel-v176{grid-template-columns:1fr;}.exec-filter-actions-v176{height:46px;}.exec-icon-btn{min-height:46px;}
  .exec-kpi-row-v176{grid-template-columns:1fr;}
  .exec-title-block h1{font-size:25px;}
  .exec-direction-card{grid-template-columns:44px 1fr;}.exec-direction-split{grid-column:1 / -1;border-left:0;border-top:1px solid #dbe3ee;padding:10px 0 0;}
}

/* --------------------- v1.76.0 visual system polish ---------------------
   Reference: compact icon sidebar + clean operational dashboard cards.
   The goal is consistent pages, fewer visual blocks, and a dashboard closer
   to the supplied management mockup. */
:root{
  --sidebar-w-expanded: 268px;
  --sidebar-w-collapsed: 72px;
  --sidebar-w: var(--sidebar-w-collapsed);
  --content-max: none;
  --app-bg: #f6f8fc;
  --dash-card-border: rgba(15,23,42,.10);
  --dash-shadow: 0 10px 28px rgba(15,23,42,.055);
  --dash-shadow-soft: 0 6px 18px rgba(15,23,42,.04);
  --dash-radius: 14px;
  --dash-radius-lg: 18px;
}

html[data-theme="light"],
html[data-theme="system"]{
  --surface: #ffffff;
  --surface-2: var(--app-bg);
  --surface-3: #eef4ff;
  --panel: #ffffff;
  --panel-2: #fbfdff;
  --text: #101828;
  --muted: #667085;
  --border: rgba(15,23,42,.10);
}

body{
  background: var(--app-bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.app-shell{ background: var(--app-bg); }
.main{ background: var(--app-bg); }

/* Icon rail like the reference screenshot. */
.sidebar{
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  padding: 14px 8px;
  background: linear-gradient(180deg, #071323 0%, #0b1d32 58%, #081526 100%);
  box-shadow: 10px 0 26px rgba(8,20,38,.10);
  border-right: 1px solid rgba(255,255,255,.05);
}
html:not(.sidebar-expanded) .brand-text,
html:not(.sidebar-expanded) .sidebar-footer,
html:not(.sidebar-expanded) .nav-label,
html:not(.sidebar-expanded) .nav-group-label,
html:not(.sidebar-expanded) .nav-section{
  display: none !important;
}
html:not(.sidebar-expanded) .brand{ justify-content: center; width: 100%; }
html:not(.sidebar-expanded) .brand-mark{
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: none;
}
html:not(.sidebar-expanded) .sidebar-header{
  justify-content: center;
  padding: 2px 0 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 12px;
}
html:not(.sidebar-expanded) .sidebar-nav{
  gap: 10px;
  padding: 0;
  align-items: stretch;
}
html:not(.sidebar-expanded) .nav-group{
  display: grid;
  gap: 10px;
  padding: 0 0 10px;
  margin: 0 0 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
html:not(.sidebar-expanded) .nav-item{
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  margin: 0 auto;
  border-radius: 12px;
  color: rgba(233,241,255,.86);
  opacity: 1;
  transition: background .14s ease, color .14s ease, box-shadow .14s ease, transform .08s ease;
}
html:not(.sidebar-expanded) .nav-item:hover{
  background: rgba(255,255,255,.08);
  transform: translateY(-1px);
}
html:not(.sidebar-expanded) .nav-item.active{
  background: linear-gradient(180deg, #1e74ff 0%, #085bdc 100%);
  color: #fff;
  border-color: rgba(255,255,255,.14);
  box-shadow: 0 12px 22px rgba(25,99,231,.32);
}
html:not(.sidebar-expanded) .nav-icon,
html:not(.sidebar-expanded) .nav-icon .icon{
  width: 23px;
  height: 23px;
}
html.sidebar-expanded{ --sidebar-w: var(--sidebar-w-expanded); }
html.sidebar-expanded .sidebar{ padding: 14px 14px 16px; }
html.sidebar-expanded .brand-text,
html.sidebar-expanded .nav-label,
html.sidebar-expanded .sidebar-footer,
html.sidebar-expanded .nav-group-label{
  display: block !important;
}
html.sidebar-expanded .nav-item{ width: auto; height: auto; justify-content: flex-start; padding: 10px; }
html.sidebar-expanded .nav-group{ border-bottom: 0; }

/* Clean global header: keep tools, but remove visual noise. */
.topbar{
  position: sticky;
  top: 0;
  background: rgba(246,248,252,.78);
  border-bottom: 0;
  box-shadow: none;
  backdrop-filter: blur(10px);
}
.topbar-inner{
  max-width: none;
  padding: 10px 22px 0;
}
.breadcrumbs{
  color: #667085;
  font-size: 13px;
  font-weight: 800;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 999px;
  padding: 8px 12px;
}
.hamburger,
.icon-btn,
.topbar-workplace-link,
.user-chip,
.btn.btn-ghost{
  border-color: rgba(15,23,42,.10);
  box-shadow: 0 4px 14px rgba(15,23,42,.04);
}
.content{
  max-width: none;
  padding: 16px 22px 30px;
}

/* Cards, filters, tables: consistent reference dashboard style. */
.card,
.table-wrap,
.alert,
.empty-state{
  border: 1px solid var(--dash-card-border);
  border-radius: var(--dash-radius-lg);
  background: #fff;
  box-shadow: var(--dash-shadow-soft);
}
.card{ overflow: hidden; }
.card-header{
  border-bottom: 1px solid rgba(15,23,42,.08);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(252,253,255,.96));
  padding: 14px 16px;
}
.card-title{
  color: #111827;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -.015em;
}
.card-subtitle{ color: #667085; font-size: 12px; }
.table th{
  background: #f8fafc;
  color: #344054;
  font-size: 11px;
  letter-spacing: .01em;
  border-bottom: 1px solid rgba(15,23,42,.08);
}
.table td{
  border-bottom: 1px solid rgba(15,23,42,.07);
  color: #101828;
}
.table tbody tr:hover td{ background: #f8fbff; }
.input,
input[type="text"],input[type="date"],input[type="number"],input[type="search"],input[type="datetime-local"],select,textarea{
  border-color: rgba(15,23,42,.10);
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(15,23,42,.03);
}
.badge,
.pill,
.chip{
  border-radius: 999px;
  font-weight: 900;
}

/* Executive dashboard: target layout close to the supplied image. */
.executive-dashboard-page .topbar{ display: none; }
.executive-dashboard-page .content{
  padding: 14px 18px 20px;
  max-width: none;
}
.dashboard-v2{
  display: grid;
  gap: 12px;
}
.exec-pagebar{
  display: grid;
  grid-template-columns: minmax(360px, .9fr) minmax(780px, 1.65fr);
  gap: 18px;
  align-items: start;
}
.exec-titleblock h1{
  margin: 0;
  color: #111827;
  font-size: clamp(28px, 2.1vw, 40px);
  line-height: 1.05;
  letter-spacing: -.045em;
  font-weight: 950;
}
.exec-titleblock p{
  margin-top: 6px;
  color: #667085;
  font-size: 16px;
  font-weight: 600;
}
.exec-top-filters{
  display: grid;
  grid-template-columns: minmax(220px,1.28fr) minmax(130px,.75fr) minmax(130px,.75fr) minmax(130px,.75fr) minmax(180px,1fr) auto auto;
  gap: 10px;
  align-items: stretch;
}
.exec-top-filters .dash-warehouse-filter{ display: none; }
.dash-filter{
  display: grid;
  align-content: center;
  gap: 5px;
  min-height: 64px;
  padding: 10px 13px;
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(15,23,42,.04);
  min-width: 0;
}
.dash-filter span{
  color: #667085;
  font-size: 12px;
  font-weight: 900;
}
.dash-filter input,
.dash-filter select{
  width: 100%;
  min-height: 24px;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  color: #101828;
  font-weight: 850;
  font-size: 14px;
}
.dash-period-inputs{
  display: grid;
  grid-template-columns: minmax(0,1fr) auto minmax(0,1fr) auto;
  gap: 4px;
  align-items: center;
}
.dash-period-inputs input{ min-width: 0; font-size: 13px; }
.dash-period-inputs em{ color:#98a2b3; font-style: normal; }
.dash-period-inputs b{ color:#667085; font-size: 16px; }
.dash-search-filter{ position: relative; padding-right: 34px; }
.dash-search-filter i{
  position: absolute;
  right: 13px;
  bottom: 12px;
  color: #667085;
  font-style: normal;
  font-weight: 900;
}
.dash-icon-btn{
  width: 44px;
  min-height: 64px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(15,23,42,.04);
  color: #344054;
  font-weight: 950;
  cursor: pointer;
}
.dash-icon-btn:hover{ background:#f8fbff; border-color:rgba(37,99,235,.22); color:#1d4ed8; }
.executive-kpi-ribbon{
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
}
.executive-kpi-ribbon .exec-kpi{
  display: grid;
  grid-template-columns: 56px 1fr;
  min-height: 104px;
  padding: 16px 18px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(15,23,42,.10);
  box-shadow: var(--dash-shadow-soft);
  color: #101828;
}
.executive-kpi-ribbon .exec-kpi-icon{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: transparent;
  font-size: 26px;
  box-shadow: none;
}
.executive-kpi-ribbon .exec-kpi.green .exec-kpi-icon{ color:#34a853; border-color:rgba(52,168,83,.55); }
.executive-kpi-ribbon .exec-kpi.blue .exec-kpi-icon{ color:#2563eb; border-color:rgba(37,99,235,.55); }
.executive-kpi-ribbon .exec-kpi.purple .exec-kpi-icon{ color:#7e57c2; border-color:rgba(126,87,194,.55); }
.executive-kpi-ribbon .exec-kpi.orange .exec-kpi-icon{ color:#ff9f2d; border-color:rgba(255,159,45,.62); }
.executive-kpi-ribbon .exec-kpi.red .exec-kpi-icon{ color:#ef5350; border-color:rgba(239,83,80,.62); }
.executive-kpi-ribbon .exec-kpi-label{
  color: #111827;
  font-size: 13px;
  font-weight: 900;
}
.executive-kpi-ribbon .exec-kpi-value{
  color: #101828;
  margin-top: 2px;
  font-size: clamp(22px, 1.6vw, 30px);
  font-weight: 950;
  letter-spacing: -.035em;
}
.executive-kpi-ribbon .exec-kpi-share{ font-size: 13px; font-weight: 950; }
.executive-kpi-ribbon .exec-kpi.green .exec-kpi-share{ color:#0f9d49; }
.executive-kpi-ribbon .exec-kpi.blue .exec-kpi-share{ color:#2563eb; }
.executive-kpi-ribbon .exec-kpi.purple .exec-kpi-share{ color:#7e57c2; }
.executive-kpi-ribbon .exec-kpi.orange .exec-kpi-share{ color:#ff8a00; }
.executive-kpi-ribbon .exec-kpi.red .exec-kpi-share{ color:#ef4444; }
.dashboard-grid-primary{
  grid-template-columns: minmax(660px, 1.18fr) minmax(540px, .92fr);
  gap: 12px;
}
.dashboard-grid-secondary{
  grid-template-columns: minmax(420px, .92fr) minmax(420px, .88fr) minmax(360px, .72fr);
  gap: 12px;
}
.dash-card-header{
  min-height: 50px;
  padding: 12px 14px;
  align-items: center;
}
.dash-card-header .card-title{ font-size: 17px; }
.dash-text-link{
  color: #2563eb;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}
.dash-card-tools{ display:flex; align-items:center; gap:10px; }
.dash-menu-dot{ font-size:20px; color:#667085; line-height:1; }
.dash-info{
  display:inline-grid;
  place-items:center;
  width:17px;
  height:17px;
  border-radius:50%;
  border:1px solid #98a2b3;
  color:#667085;
  font-size:11px;
  font-weight:950;
  vertical-align:middle;
}
.dash-unit{ color:#667085; font-weight:800; }
.exec-table-wrap{ max-height: 490px; }
.exec-table th,
.exec-table td{ padding: 9px 11px; }
.exec-chart-card{ min-height: 252px; }
.exec-svg-chart svg{ height: 184px; }
.exec-bars{ height: 188px; }
.exec-bar-stack{ height: 150px; }
.exec-risk-row{
  color: inherit;
  grid-template-columns: 40px 1fr auto 16px;
  border-radius: 14px;
  background:#fff;
  min-height: 58px;
}
.exec-risk-arrow{ color:#98a2b3; font-size:24px; line-height:1; }
.exec-risk-row:hover{ transform: translateY(-1px); box-shadow:0 8px 22px rgba(15,23,42,.06); }
.exec-direction-card{
  border-radius: 12px;
  min-height: 122px;
  border:0;
  background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(246,250,255,.9));
}
.exec-direction-card.green{ background:linear-gradient(135deg, rgba(236,253,245,.92), rgba(255,255,255,.96)); box-shadow:inset 0 0 0 1px rgba(22,163,74,.08); }
.exec-direction-card.blue{ background:linear-gradient(135deg, rgba(239,246,255,.95), rgba(255,255,255,.96)); box-shadow:inset 0 0 0 1px rgba(37,99,235,.08); }
.exec-direction-card.purple{ background:linear-gradient(135deg, rgba(245,240,255,.95), rgba(255,255,255,.96)); box-shadow:inset 0 0 0 1px rgba(124,58,237,.08); }
.exec-direction-card.green .exec-direction-title{ color:#15803d; }
.exec-direction-card.blue .exec-direction-title{ color:#1d4ed8; }
.exec-direction-card.purple .exec-direction-title{ color:#6d3dbb; }

/* Unify high-density production/workflow pages with the same visual language. */
.production-dashboard-page .content,
.warehouse-dashboard-page .content,
.materials-dashboard-page .content,
.lamination-dashboard-page .content,
.action-queue-page .content,
.matrix-shop-page .content,
.workplace-page .content,
.operations-page .content,
.inventory-page .content,
.tech-page .content{
  max-width: none;
  padding: 16px 22px 30px;
}
.page-header,
.workplace-hero,
.matrix-hero,
.tech-hero,
.smart-hero,
.schedule-hero{
  border-radius: var(--dash-radius-lg);
}
.filter-bar,
.exec-filter-panel,
.compact-filter-panel,
.production-filter-panel,
.recipe-filter-panel,
.inventory-filter-panel,
.materials-filter-panel,
.wms-filter-panel{
  border-color: rgba(15,23,42,.10);
  background: rgba(255,255,255,.86);
  border-radius: var(--dash-radius-lg);
  box-shadow: var(--dash-shadow-soft);
}

/* Keep desktop dashboard close to reference 1920px screenshot. */
@media (min-width: 1500px){
  .executive-dashboard-page .content{ padding: 14px 18px 22px; }
  .dashboard-v2{ gap: 12px; }
}
@media (max-width: 1560px){
  .exec-pagebar{ grid-template-columns: 1fr; }
  .exec-top-filters{ grid-template-columns: repeat(4,minmax(150px,1fr)); }
  .dash-search-filter{ grid-column: span 2; }
  .executive-kpi-ribbon{ grid-template-columns: repeat(4,minmax(0,1fr)); }
  .dashboard-grid-primary,
  .dashboard-grid-secondary{ grid-template-columns: 1fr; }
}
@media (max-width: 980px){
  :root{ --sidebar-w: var(--sidebar-w-expanded); }
  .sidebar{ transform: translateX(-102%); position: fixed; z-index: 90; }
  body.sidebar-open .sidebar{ transform: translateX(0); }
  html:not(.sidebar-expanded) .brand-text,
  html:not(.sidebar-expanded) .nav-label,
  html:not(.sidebar-expanded) .nav-group-label{ display:block !important; }
  html:not(.sidebar-expanded) .nav-item{ width:auto; justify-content:flex-start; padding:10px; }
  .executive-dashboard-page .topbar{ display:block; }
  .exec-top-filters{ grid-template-columns: 1fr; }
  .dash-search-filter{ grid-column:auto; }
  .executive-kpi-ribbon{ grid-template-columns: 1fr; }
}

/* v1.76.0 final sidebar header polish */
.sidebar-menu-toggle{
  width:44px;
  height:44px;
  border:0;
  border-radius:12px;
  background:transparent;
  color:#e7f0ff;
  display:grid;
  place-items:center;
  font-size:24px;
  line-height:1;
  cursor:pointer;
}
.sidebar-menu-toggle:hover{background:rgba(255,255,255,.09);}
html:not(.sidebar-expanded) .sidebar-header .brand{display:none!important;}
html:not(.sidebar-expanded) .sidebar-header{display:flex;justify-content:center;}
html.sidebar-expanded .sidebar-header{display:flex;justify-content:space-between;}
html.sidebar-expanded .sidebar-menu-toggle{background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.12);}

/* v1.76.0 final dashboard icon and reference-polish overrides */
.dashboard-v2 .dash-filter .icon{width:18px;height:18px;color:#667085;}
.dashboard-v2 .dash-search-filter .icon{position:absolute;right:13px;bottom:13px;width:18px;height:18px;color:#667085;}
.dashboard-v2 .dash-icon-btn .icon{width:19px;height:19px;}
.executive-kpi-ribbon .exec-kpi-icon{display:grid;place-items:center;border:0!important;}
.executive-kpi-ribbon .exec-kpi-icon .icon{width:42px;height:42px;stroke-width:1.8;}
.executive-dashboard-page .brand-mark{font-size:0;}
.executive-dashboard-page .brand-mark::before{content:"☰";font-size:23px;font-weight:850;color:#fff;line-height:1;}
.executive-dashboard-page .sidebar{width:72px;min-width:72px;}
.executive-dashboard-page .sidebar-footer{display:none!important;}
@media (min-width: 981px){.executive-dashboard-page .topbar{display:none!important;}}

/* --------------------- v1.77.0 Operator pages design cleanup --------------------- */
:root{
  --op-page-bg:#f5f7fb;
  --op-card:#ffffff;
  --op-border:rgba(15,23,42,.10);
  --op-shadow:0 8px 24px rgba(15,23,42,.05);
  --op-radius:14px;
  --op-radius-lg:18px;
}
.operator-ui-page{
  display:grid;
  gap:14px;
  max-width:none;
}
.operator-ui-page .operator-pagebar,
.operator-ui-page > .page-header,
.operator-ui-page > .exec-hero{
  border:1px solid var(--op-border);
  border-radius:var(--op-radius-lg);
  background:linear-gradient(135deg,#fff 0%,#f8fbff 100%);
  box-shadow:var(--op-shadow);
  padding:16px 18px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}
.operator-ui-page .operator-pagebar h1,
.operator-ui-page > .page-header h1,
.operator-ui-page > .exec-hero h1{
  font-size:clamp(26px,1.8vw,34px);
  line-height:1.08;
  letter-spacing:-.04em;
  font-weight:950;
  margin:0;
  color:#111827;
}
.operator-ui-page .operator-pagebar p,
.operator-ui-page .subtitle,
.operator-ui-page .card-subtitle{
  color:#667085;
  font-weight:650;
}
.operator-ui-page .eyebrow{
  color:#2563eb;
  font-size:12px;
  font-weight:950;
  letter-spacing:.045em;
  text-transform:uppercase;
}
.operator-ui-page .chip-row,
.operator-ui-page .toolbar,
.operator-ui-page .actions{
  gap:8px;
  flex-wrap:wrap;
}
.operator-ui-page .chip,
.operator-ui-page .pill,
.operator-ui-page .tag{
  border-radius:999px;
  border:1px solid rgba(15,23,42,.10);
  background:#fff;
  color:#344054;
  font-weight:850;
}
.operator-ui-page .btn{
  min-height:38px;
  border-radius:12px;
  font-weight:900;
}
.operator-ui-page .btn-primary{
  background:#2563eb;
  color:#fff;
  box-shadow:0 10px 22px rgba(37,99,235,.18);
}
.operator-ui-page .btn-primary:disabled,
.operator-ui-page button:disabled{
  opacity:.45;
  cursor:not-allowed;
  box-shadow:none;
}
.operator-kpi-grid,
.operator-ui-page .exec-kpi-row,
.operator-ui-page .matrix-kpis,
.operator-ui-page .tech-kpis{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(178px,1fr));
  gap:12px;
}
.operator-kpi-grid.dense{grid-template-columns:repeat(auto-fit,minmax(152px,1fr));}
.operator-ui-page .exec-kpi,
.operator-ui-page .card.kpi,
.operator-ui-page .eta-card,
.operator-ui-page .matrix-decision-card,
.operator-ui-page .smart-lane-card{
  border:1px solid var(--op-border);
  border-radius:14px;
  background:#fff;
  box-shadow:var(--op-shadow);
}
.operator-ui-page .exec-kpi{
  min-height:94px;
  padding:14px 16px;
  grid-template-columns:48px 1fr;
}
.operator-ui-page .exec-kpi-icon{
  width:42px;
  height:42px;
  border-radius:14px;
  background:transparent;
  color:#2563eb;
  box-shadow:none;
  font-size:22px;
}
.operator-ui-page .exec-kpi-label{font-size:12px;color:#667085;font-weight:900;}
.operator-ui-page .exec-kpi-value{font-size:clamp(20px,1.25vw,28px);font-weight:950;color:#101828;letter-spacing:-.035em;}
.operator-ui-page .exec-kpi-share{font-size:12px;font-weight:850;}
.operator-decision-strip,
.operator-action-grid,
.operator-ui-page .smart-lane-row,
.operator-ui-page .matrix-decision-strip{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
  gap:12px;
}
.operator-ui-page .smart-automation-strip.operator-process-strip,
.operator-ui-page .smart-automation-strip{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:12px;
  padding:14px;
}
.operator-ui-page .smart-step{
  border:1px solid rgba(15,23,42,.08);
  border-radius:14px;
  background:#fff;
  padding:12px;
  box-shadow:0 5px 16px rgba(15,23,42,.035);
}
.operator-ui-page .production-flow-card,
.operator-ui-page .autopilot-card,
.operator-ui-page .shortage-card,
.operator-ui-page .matrix-link-step,
.operator-ui-page .matrix-orphan-item{
  border:1px solid rgba(15,23,42,.10);
  border-radius:14px;
  background:#fff;
  box-shadow:0 7px 20px rgba(15,23,42,.04);
}
.operator-ui-page .operator-section-card,
.operator-ui-page .inner-card,
.operator-ui-page .schedule-guide-card,
.operator-ui-page .schedule-area-summary-card,
.operator-ui-page .schedule-board-title-card,
.operator-ui-page .wip-buffer-card,
.operator-ui-page .matrix-main-card,
.operator-ui-page .matrix-link-card{
  border:1px solid var(--op-border);
  border-radius:var(--op-radius-lg);
  background:#fff;
  box-shadow:var(--op-shadow);
  overflow:hidden;
}
.operator-ui-page .card-header{
  padding:14px 16px;
  border-bottom:1px solid rgba(15,23,42,.075);
  background:linear-gradient(180deg,#fff,#f8fafc);
}
.operator-ui-page .card-body{padding:14px 16px;}
.operator-ui-page .table-wrap{
  border-radius:14px;
  border:1px solid rgba(15,23,42,.08);
  box-shadow:none;
  overflow:auto;
}
.operator-ui-page .table th,
.operator-ui-page .exec-table th,
.operator-ui-page .data-table th{
  position:sticky;
  top:0;
  z-index:1;
  background:#f5f8fc;
  color:#344054;
  font-size:12px;
  text-transform:none;
}
.operator-ui-page .table td,
.operator-ui-page .exec-table td,
.operator-ui-page .data-table td{
  border-bottom:1px solid rgba(15,23,42,.065);
}
.operator-ui-page .empty-state,
.operator-ui-page .empty-cell{
  border-radius:14px;
  background:#f8fafc;
  color:#667085;
  font-weight:750;
  padding:18px;
}
.operator-ui-page .tabs,
.operator-ui-page .ops-tabs{
  background:#fff;
  border:1px solid var(--op-border);
  border-radius:14px;
  padding:6px;
  box-shadow:var(--op-shadow);
}
.operator-ui-page .tab{
  border-radius:11px;
  font-weight:900;
}
.operator-ui-page .tab.active{
  background:#2563eb;
  color:#fff;
  box-shadow:0 8px 18px rgba(37,99,235,.18);
}
.operator-filterbar{
  padding:8px;
  border:1px solid var(--op-border);
  border-radius:14px;
  background:#fff;
  box-shadow:var(--op-shadow);
}
.operator-filterbar .btn{min-height:34px;}
.operator-schedule-page .schedule-operation-list{display:grid;gap:10px;}
.operator-schedule-page .schedule-operation-card{
  border:1px solid rgba(15,23,42,.10);
  border-radius:14px;
  background:#fff;
  box-shadow:0 6px 18px rgba(15,23,42,.04);
  transition:transform .12s ease,box-shadow .12s ease,border-color .12s ease;
}
.operator-schedule-page .schedule-operation-card:hover{transform:translateY(-1px);box-shadow:0 10px 24px rgba(15,23,42,.065);}
.operator-schedule-page .schedule-operation-card.ok{border-left:4px solid #22c55e;}
.operator-schedule-page .schedule-operation-card.warn{border-left:4px solid #f59e0b;}
.operator-schedule-page .schedule-operation-card.err{border-left:4px solid #ef4444;}
.operator-schedule-page .schedule-move-panel{
  background:#f8fbff;
  border-color:rgba(37,99,235,.22);
}
.operator-procurement-page .procurement-eta-kpis .eta-card{
  display:grid;
  grid-template-columns:auto 1fr;
  align-items:center;
  min-height:78px;
  padding:14px;
}
.operator-procurement-page .procurement-eta-kpis .eta-card b{font-size:26px;color:#101828;letter-spacing:-.04em;}
.operator-wip-page .wip-quality-form,
.operator-procurement-page .inline-form{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  align-items:center;
}
.operator-wip-page .wip-quality-form .compact-input,
.operator-procurement-page .inline-form .compact-input{min-height:34px;}
.operator-matrix-page .matrix-work-grid{grid-template-columns:minmax(620px,1fr) minmax(360px,.42fr);}
.operator-matrix-page .matrix-profile-table td{vertical-align:top;}
.operator-matrix-page .matrix-chip-list{display:grid;gap:7px;}
.operator-matrix-page .matrix-chip{border-radius:12px;padding:8px 10px;border:1px solid rgba(15,23,42,.08);background:#f8fafc;}
.operator-matrix-page .matrix-chip.ok{background:#f0fdf4;border-color:rgba(34,197,94,.18);}
.operator-matrix-page .matrix-chip.warn{background:#fff7ed;border-color:rgba(245,158,11,.22);}
.operator-tech-page .tech-kpis .card.kpi,
.operator-tech-page-v177 .tech-kpis .card.kpi{min-height:96px;}
@media (max-width:1180px){
  .operator-ui-page .operator-pagebar,
  .operator-ui-page > .page-header,
  .operator-ui-page > .exec-hero{flex-direction:column;align-items:stretch;}
  .operator-matrix-page .matrix-work-grid{grid-template-columns:1fr;}
}
@media (max-width:760px){
  .production-dashboard-page .content,
  .warehouse-dashboard-page .content,
  .materials-dashboard-page .content,
  .lamination-dashboard-page .content,
  .action-queue-page .content,
  .matrix-shop-page .content,
  .workplace-page .content,
  .operations-page .content,
  .inventory-page .content,
  .tech-page .content,
  .content{padding:12px;}
  .operator-kpi-grid,
  .operator-decision-strip,
  .operator-action-grid{grid-template-columns:1fr;}
  .operator-ui-page .table-wrap{max-width:100%;}
}

/* v1.77.0 Operator pages design cleanup
   Bring operator screens closer to the executive-dashboard reference: dark icon sidebar,
   dense white cards, compact filter panels, clean KPI ribbons, readable tables, and no modal clutter. */
.akfa-ui-v177{
  --op-bg:#f5f7fb;
  --op-card:#ffffff;
  --op-line:#dfe5ee;
  --op-line-soft:rgba(15,23,42,.08);
  --op-text:#101828;
  --op-muted:#667085;
  --op-blue:#2563eb;
  --op-green:#34a853;
  --op-orange:#ff9f2d;
  --op-red:#ef5350;
  --op-purple:#7e57c2;
  --op-radius:12px;
  --op-radius-lg:14px;
  --op-shadow:0 1px 2px rgba(15,23,42,.035), 0 8px 24px rgba(15,23,42,.035);
  background:var(--op-bg);
}
.akfa-ui-v177 .content{background:var(--op-bg);}
.akfa-ui-v177 .operator-dashboard-v177,
.akfa-ui-v177 .operator-page-v177,
.akfa-ui-v177 .operator-ui-page{
  display:flex;
  flex-direction:column;
  gap:12px;
  width:100%;
  max-width:none;
}
.akfa-ui-v177 .operator-dashboard-v177 > .card,
.akfa-ui-v177 .operator-dashboard-v177 .card,
.akfa-ui-v177 .operator-page-v177 .card,
.akfa-ui-v177 .operator-ui-page .card{
  border:1px solid var(--op-line);
  border-radius:var(--op-radius);
  background:var(--op-card);
  box-shadow:var(--op-shadow);
}
.akfa-ui-v177 .operator-dashboard-v177 .page-header,
.akfa-ui-v177 .operator-dashboard-v177 .exec-hero,
.akfa-ui-v177 .operator-page-v177 .page-header,
.akfa-ui-v177 .operator-page-v177 .exec-hero,
.akfa-ui-v177 .operator-ui-page .page-header,
.akfa-ui-v177 .operator-ui-page .exec-hero,
.akfa-ui-v177 .operator-pagebar{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(320px,auto);
  gap:14px;
  align-items:start;
  min-height:auto;
  padding:16px 18px;
  border:1px solid var(--op-line);
  border-radius:var(--op-radius-lg);
  background:linear-gradient(135deg,rgba(255,255,255,.98),rgba(248,251,255,.94));
  box-shadow:var(--op-shadow);
}
.akfa-ui-v177 .operator-dashboard-v177 .page-header h1,
.akfa-ui-v177 .operator-dashboard-v177 .exec-hero h1,
.akfa-ui-v177 .operator-page-v177 .page-header h1,
.akfa-ui-v177 .operator-page-v177 .exec-hero h1,
.akfa-ui-v177 .operator-ui-page .page-header h1,
.akfa-ui-v177 .operator-ui-page .exec-hero h1{
  margin:3px 0 4px;
  color:var(--op-text);
  font-size:clamp(24px,2.05vw,34px);
  line-height:1.05;
  letter-spacing:-.035em;
  font-weight:950;
}
.akfa-ui-v177 .operator-dashboard-v177 .subtitle,
.akfa-ui-v177 .operator-dashboard-v177 .exec-hero p,
.akfa-ui-v177 .operator-page-v177 .subtitle,
.akfa-ui-v177 .operator-page-v177 .exec-hero p,
.akfa-ui-v177 .operator-ui-page .subtitle,
.akfa-ui-v177 .operator-ui-page .exec-hero p{
  color:var(--op-muted);
  font-size:14px;
  line-height:1.42;
}
.akfa-ui-v177 .operator-dashboard-v177 .eyebrow,
.akfa-ui-v177 .operator-page-v177 .eyebrow,
.akfa-ui-v177 .operator-ui-page .eyebrow{
  color:#475467;
  font-size:12px;
  font-weight:950;
  letter-spacing:.055em;
  text-transform:uppercase;
}
.akfa-ui-v177 .operator-dashboard-v177 .actions,
.akfa-ui-v177 .operator-dashboard-v177 .toolbar,
.akfa-ui-v177 .operator-dashboard-v177 .exec-filter-panel,
.akfa-ui-v177 .operator-page-v177 .actions,
.akfa-ui-v177 .operator-page-v177 .toolbar,
.akfa-ui-v177 .operator-page-v177 .exec-filter-panel,
.akfa-ui-v177 .operator-ui-page .actions,
.akfa-ui-v177 .operator-ui-page .toolbar,
.akfa-ui-v177 .operator-ui-page .exec-filter-panel{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
}
.akfa-ui-v177 .operator-dashboard-v177 .exec-filter-panel,
.akfa-ui-v177 .operator-page-v177 .exec-filter-panel,
.akfa-ui-v177 .operator-ui-page .exec-filter-panel{
  padding:10px;
  border:1px solid var(--op-line-soft);
  border-radius:var(--op-radius);
  background:rgba(255,255,255,.92);
  box-shadow:0 6px 18px rgba(15,23,42,.035);
}
.akfa-ui-v177 .operator-dashboard-v177 .exec-filter-field,
.akfa-ui-v177 .operator-page-v177 .exec-filter-field,
.akfa-ui-v177 .operator-ui-page .exec-filter-field{
  min-width:150px;
  padding:8px 10px;
  border:1px solid var(--op-line-soft);
  border-radius:11px;
  background:#fff;
}
.akfa-ui-v177 .operator-dashboard-v177 .exec-filter-field span,
.akfa-ui-v177 .operator-page-v177 .exec-filter-field span,
.akfa-ui-v177 .operator-ui-page .exec-filter-field span{
  display:block;
  color:var(--op-muted);
  font-size:11px;
  font-weight:900;
  margin-bottom:4px;
}
.akfa-ui-v177 .operator-dashboard-v177 .input,
.akfa-ui-v177 .operator-page-v177 .input,
.akfa-ui-v177 .operator-ui-page .input,
.akfa-ui-v177 .operator-dashboard-v177 select,
.akfa-ui-v177 .operator-dashboard-v177 input,
.akfa-ui-v177 .operator-page-v177 select,
.akfa-ui-v177 .operator-page-v177 input,
.akfa-ui-v177 .operator-ui-page select,
.akfa-ui-v177 .operator-ui-page input{
  border-color:rgba(15,23,42,.12);
  border-radius:10px;
}
.akfa-ui-v177 .operator-dashboard-v177 .exec-filter-field .input,
.akfa-ui-v177 .operator-page-v177 .exec-filter-field .input,
.akfa-ui-v177 .operator-ui-page .exec-filter-field .input{
  min-height:24px;
  padding:0;
  border:0;
  background:transparent;
  box-shadow:none;
  font-weight:850;
  color:var(--op-text);
}
.akfa-ui-v177 .operator-dashboard-v177 .exec-kpi-row,
.akfa-ui-v177 .operator-page-v177 .exec-kpi-row,
.akfa-ui-v177 .operator-ui-page .exec-kpi-row{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(185px,1fr));
  gap:12px;
}
.akfa-ui-v177 .operator-dashboard-v177 .exec-kpi,
.akfa-ui-v177 .operator-page-v177 .exec-kpi,
.akfa-ui-v177 .operator-ui-page .exec-kpi{
  display:grid;
  grid-template-columns:48px minmax(0,1fr);
  gap:12px;
  align-items:center;
  min-height:92px;
  padding:14px 16px;
  border-radius:var(--op-radius);
  border:1px solid var(--op-line);
  background:#fff;
  box-shadow:var(--op-shadow);
}
.akfa-ui-v177 .operator-dashboard-v177 .exec-kpi-icon,
.akfa-ui-v177 .operator-page-v177 .exec-kpi-icon,
.akfa-ui-v177 .operator-ui-page .exec-kpi-icon{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border:0;
  border-radius:14px;
  background:transparent;
  font-size:24px;
  box-shadow:none;
  font-weight:950;
}
.akfa-ui-v177 .operator-dashboard-v177 .exec-kpi.green .exec-kpi-icon,
.akfa-ui-v177 .operator-page-v177 .exec-kpi.green .exec-kpi-icon,
.akfa-ui-v177 .operator-ui-page .exec-kpi.green .exec-kpi-icon{color:var(--op-green);}
.akfa-ui-v177 .operator-dashboard-v177 .exec-kpi.blue .exec-kpi-icon,
.akfa-ui-v177 .operator-page-v177 .exec-kpi.blue .exec-kpi-icon,
.akfa-ui-v177 .operator-ui-page .exec-kpi.blue .exec-kpi-icon{color:var(--op-blue);}
.akfa-ui-v177 .operator-dashboard-v177 .exec-kpi.orange .exec-kpi-icon,
.akfa-ui-v177 .operator-page-v177 .exec-kpi.orange .exec-kpi-icon,
.akfa-ui-v177 .operator-ui-page .exec-kpi.orange .exec-kpi-icon{color:var(--op-orange);}
.akfa-ui-v177 .operator-dashboard-v177 .exec-kpi.red .exec-kpi-icon,
.akfa-ui-v177 .operator-page-v177 .exec-kpi.red .exec-kpi-icon,
.akfa-ui-v177 .operator-ui-page .exec-kpi.red .exec-kpi-icon{color:var(--op-red);}
.akfa-ui-v177 .operator-dashboard-v177 .exec-kpi.purple .exec-kpi-icon,
.akfa-ui-v177 .operator-page-v177 .exec-kpi.purple .exec-kpi-icon,
.akfa-ui-v177 .operator-ui-page .exec-kpi.purple .exec-kpi-icon{color:var(--op-purple);}
.akfa-ui-v177 .operator-dashboard-v177 .exec-kpi-label,
.akfa-ui-v177 .operator-page-v177 .exec-kpi-label,
.akfa-ui-v177 .operator-ui-page .exec-kpi-label{
  color:#111827;
  font-size:12px;
  font-weight:950;
}
.akfa-ui-v177 .operator-dashboard-v177 .exec-kpi-value,
.akfa-ui-v177 .operator-page-v177 .exec-kpi-value,
.akfa-ui-v177 .operator-ui-page .exec-kpi-value{
  margin-top:2px;
  color:var(--op-text);
  font-size:clamp(21px,1.45vw,28px);
  font-weight:950;
  letter-spacing:-.035em;
}
.akfa-ui-v177 .operator-dashboard-v177 .exec-kpi-share,
.akfa-ui-v177 .operator-page-v177 .exec-kpi-share,
.akfa-ui-v177 .operator-ui-page .exec-kpi-share{
  color:var(--op-muted);
  font-size:12px;
  font-weight:850;
}
.akfa-ui-v177 .operator-dashboard-v177 .card-header,
.akfa-ui-v177 .operator-page-v177 .card-header,
.akfa-ui-v177 .operator-ui-page .card-header{
  min-height:48px;
  padding:12px 14px;
  border-bottom:1px solid rgba(15,23,42,.07);
}
.akfa-ui-v177 .operator-dashboard-v177 .card-title,
.akfa-ui-v177 .operator-dashboard-v177 h2,
.akfa-ui-v177 .operator-page-v177 .card-title,
.akfa-ui-v177 .operator-page-v177 h2,
.akfa-ui-v177 .operator-ui-page .card-title,
.akfa-ui-v177 .operator-ui-page h2{
  color:var(--op-text);
  font-size:18px;
  font-weight:950;
  letter-spacing:-.02em;
}
.akfa-ui-v177 .operator-dashboard-v177 h3,
.akfa-ui-v177 .operator-page-v177 h3,
.akfa-ui-v177 .operator-ui-page h3{
  color:var(--op-text);
  font-size:16px;
  font-weight:950;
  letter-spacing:-.015em;
}
.akfa-ui-v177 .operator-dashboard-v177 .table-wrap,
.akfa-ui-v177 .operator-page-v177 .table-wrap,
.akfa-ui-v177 .operator-ui-page .table-wrap{
  border-radius:11px;
  overflow:auto;
  border:1px solid rgba(15,23,42,.07);
  background:#fff;
}
.akfa-ui-v177 .operator-dashboard-v177 .table,
.akfa-ui-v177 .operator-dashboard-v177 .data-table,
.akfa-ui-v177 .operator-page-v177 .table,
.akfa-ui-v177 .operator-page-v177 .data-table,
.akfa-ui-v177 .operator-ui-page .table,
.akfa-ui-v177 .operator-ui-page .data-table{
  border-collapse:separate;
  border-spacing:0;
  width:100%;
  background:#fff;
}
.akfa-ui-v177 .operator-dashboard-v177 .table th,
.akfa-ui-v177 .operator-dashboard-v177 .data-table th,
.akfa-ui-v177 .operator-page-v177 .table th,
.akfa-ui-v177 .operator-page-v177 .data-table th,
.akfa-ui-v177 .operator-ui-page .table th,
.akfa-ui-v177 .operator-ui-page .data-table th{
  position:sticky;
  top:0;
  z-index:1;
  background:#f8fafc;
  color:#344054;
  font-size:12px;
  font-weight:950;
  border-bottom:1px solid rgba(15,23,42,.09);
}
.akfa-ui-v177 .operator-dashboard-v177 .table td,
.akfa-ui-v177 .operator-dashboard-v177 .table th,
.akfa-ui-v177 .operator-dashboard-v177 .data-table td,
.akfa-ui-v177 .operator-dashboard-v177 .data-table th,
.akfa-ui-v177 .operator-page-v177 .table td,
.akfa-ui-v177 .operator-page-v177 .table th,
.akfa-ui-v177 .operator-page-v177 .data-table td,
.akfa-ui-v177 .operator-page-v177 .data-table th,
.akfa-ui-v177 .operator-ui-page .table td,
.akfa-ui-v177 .operator-ui-page .table th,
.akfa-ui-v177 .operator-ui-page .data-table td,
.akfa-ui-v177 .operator-ui-page .data-table th{
  padding:9px 11px;
  vertical-align:top;
}
.akfa-ui-v177 .operator-dashboard-v177 .table tbody tr:hover,
.akfa-ui-v177 .operator-dashboard-v177 .data-table tbody tr:hover,
.akfa-ui-v177 .operator-page-v177 .table tbody tr:hover,
.akfa-ui-v177 .operator-page-v177 .data-table tbody tr:hover,
.akfa-ui-v177 .operator-ui-page .table tbody tr:hover,
.akfa-ui-v177 .operator-ui-page .data-table tbody tr:hover{
  background:#f9fbff;
}
.akfa-ui-v177 .operator-dashboard-v177 .tabs,
.akfa-ui-v177 .operator-page-v177 .tabs,
.akfa-ui-v177 .operator-ui-page .tabs{
  display:flex;
  gap:8px;
  padding:6px;
  border:1px solid var(--op-line);
  border-radius:var(--op-radius);
  background:#fff;
  box-shadow:var(--op-shadow);
  overflow-x:auto;
}
.akfa-ui-v177 .operator-dashboard-v177 .tab,
.akfa-ui-v177 .operator-page-v177 .tab,
.akfa-ui-v177 .operator-ui-page .tab{
  border:0;
  border-radius:10px;
  background:transparent;
  color:#475467;
  font-weight:900;
  white-space:nowrap;
}
.akfa-ui-v177 .operator-dashboard-v177 .tab.active,
.akfa-ui-v177 .operator-page-v177 .tab.active,
.akfa-ui-v177 .operator-ui-page .tab.active{
  background:#eef4ff;
  color:#1d4ed8;
  box-shadow:inset 0 0 0 1px rgba(37,99,235,.14);
}
.akfa-ui-v177 .operator-dashboard-v177 .btn,
.akfa-ui-v177 .operator-page-v177 .btn,
.akfa-ui-v177 .operator-ui-page .btn{
  border-radius:10px;
  font-weight:900;
}
.akfa-ui-v177 .operator-dashboard-v177 .btn-primary,
.akfa-ui-v177 .operator-page-v177 .btn-primary,
.akfa-ui-v177 .operator-ui-page .btn-primary{
  background:#2563eb;
  border-color:#2563eb;
  box-shadow:0 8px 18px rgba(37,99,235,.14);
}
.akfa-ui-v177 .operator-dashboard-v177 .btn-ghost,
.akfa-ui-v177 .operator-page-v177 .btn-ghost,
.akfa-ui-v177 .operator-ui-page .btn-ghost{
  background:#fff;
  border-color:rgba(15,23,42,.10);
}
.akfa-ui-v177 .operator-dashboard-v177 .badge,
.akfa-ui-v177 .operator-page-v177 .badge,
.akfa-ui-v177 .operator-ui-page .badge{
  border-radius:999px;
  font-weight:950;
  padding:4px 9px;
}
.akfa-ui-v177 .operator-dashboard-v177 .empty-state,
.akfa-ui-v177 .operator-dashboard-v177 .empty-cell,
.akfa-ui-v177 .operator-page-v177 .empty-state,
.akfa-ui-v177 .operator-page-v177 .empty-cell,
.akfa-ui-v177 .operator-ui-page .empty-state,
.akfa-ui-v177 .operator-ui-page .empty-cell{
  padding:24px;
  color:#667085;
  text-align:center;
  background:#f8fafc;
  border-radius:12px;
}
.akfa-ui-v177 .operator-dashboard-v177 .chip-row,
.akfa-ui-v177 .operator-page-v177 .chip-row,
.akfa-ui-v177 .operator-ui-page .chip-row{gap:8px;}
.akfa-ui-v177 .operator-dashboard-v177 .chip,
.akfa-ui-v177 .operator-page-v177 .chip,
.akfa-ui-v177 .operator-ui-page .chip{
  border-radius:999px;
  background:#fff;
  border:1px solid rgba(15,23,42,.09);
  box-shadow:0 4px 12px rgba(15,23,42,.025);
  font-weight:850;
}
.akfa-ui-v177 .operator-dashboard-v177 .alert,
.akfa-ui-v177 .operator-page-v177 .alert,
.akfa-ui-v177 .operator-ui-page .alert{
  border-radius:12px;
  border-width:1px;
  box-shadow:0 5px 16px rgba(15,23,42,.035);
}
.akfa-ui-v177 .operator-dashboard-v177 .smart-automation-strip,
.akfa-ui-v177 .operator-page-v177 .smart-automation-strip,
.akfa-ui-v177 .operator-ui-page .smart-automation-strip,
.akfa-ui-v177 .operator-dashboard-v177 .operator-decision-panel,
.akfa-ui-v177 .operator-page-v177 .operator-decision-panel,
.akfa-ui-v177 .operator-ui-page .operator-decision-panel{
  border:1px solid rgba(37,99,235,.12);
  background:linear-gradient(135deg,#ffffff,#f6f9ff);
  border-radius:14px;
}
.akfa-ui-v177 .operator-dashboard-v177 .smart-step,
.akfa-ui-v177 .operator-page-v177 .smart-step,
.akfa-ui-v177 .operator-ui-page .smart-step{
  background:#fff;
  border:1px solid rgba(15,23,42,.08);
  border-radius:12px;
  box-shadow:0 5px 14px rgba(15,23,42,.03);
}
.akfa-ui-v177 .operator-dashboard-v177 .smart-step b,
.akfa-ui-v177 .operator-page-v177 .smart-step b,
.akfa-ui-v177 .operator-ui-page .smart-step b{
  background:#eef4ff;
  color:#2563eb;
}
.akfa-ui-v177 .operator-dashboard-v177 details,
.akfa-ui-v177 .operator-page-v177 details,
.akfa-ui-v177 .operator-ui-page details{
  border-radius:12px;
}
.akfa-ui-v177 .operator-dashboard-v177 details[open],
.akfa-ui-v177 .operator-page-v177 details[open],
.akfa-ui-v177 .operator-ui-page details[open]{
  box-shadow:0 8px 20px rgba(15,23,42,.05);
}
.akfa-ui-v177 .schedule-board-grid{gap:12px;}
.akfa-ui-v177 .schedule-lane-card{border-radius:12px;}
.akfa-ui-v177 .schedule-operation-card{
  border-radius:12px;
  border:1px solid rgba(15,23,42,.08);
  background:#fff;
}
.akfa-ui-v177 .schedule-operation-card.ok{box-shadow:inset 4px 0 0 rgba(52,168,83,.85);}
.akfa-ui-v177 .schedule-operation-card.warn{box-shadow:inset 4px 0 0 rgba(255,159,45,.85);}
.akfa-ui-v177 .schedule-operation-card.err{box-shadow:inset 4px 0 0 rgba(239,83,80,.85);}
.akfa-ui-v177 .wip-quality-form,
.akfa-ui-v177 .procurement-eta-form,
.akfa-ui-v177 .inline-form{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  align-items:center;
}
.akfa-ui-v177 .operator-dashboard-v177 .card + .card,
.akfa-ui-v177 .operator-page-v177 .card + .card,
.akfa-ui-v177 .operator-ui-page .card + .card{margin-top:0;}
@media (min-width:1500px){
  .akfa-ui-v177 .content{padding:14px 18px 24px;}
  .akfa-ui-v177 .operator-dashboard-v177,
  .akfa-ui-v177 .operator-page-v177,
  .akfa-ui-v177 .operator-ui-page{gap:12px;}
}
@media (max-width:1100px){
  .akfa-ui-v177 .operator-dashboard-v177 .page-header,
  .akfa-ui-v177 .operator-dashboard-v177 .exec-hero,
  .akfa-ui-v177 .operator-page-v177 .page-header,
  .akfa-ui-v177 .operator-page-v177 .exec-hero,
  .akfa-ui-v177 .operator-ui-page .page-header,
  .akfa-ui-v177 .operator-ui-page .exec-hero,
  .akfa-ui-v177 .operator-pagebar{grid-template-columns:1fr;}
  .akfa-ui-v177 .operator-dashboard-v177 .actions,
  .akfa-ui-v177 .operator-dashboard-v177 .toolbar,
  .akfa-ui-v177 .operator-page-v177 .actions,
  .akfa-ui-v177 .operator-page-v177 .toolbar,
  .akfa-ui-v177 .operator-ui-page .actions,
  .akfa-ui-v177 .operator-ui-page .toolbar{justify-content:flex-start;}
}

/* --------------------- v1.77.0 Operator pages design cleanup --------------------- */
.akfa-ui-v177{
  --op-bg:#f6f8fb;
  --op-card:#ffffff;
  --op-border:#e2e8f0;
  --op-border-strong:#d5dce8;
  --op-text:#111827;
  --op-muted:#667085;
  --op-blue:#2563eb;
  --op-green:#22a454;
  --op-orange:#f59e0b;
  --op-red:#ef4444;
  --op-purple:#7c3aed;
  --op-shadow:0 7px 20px rgba(15,23,42,.04);
  --op-shadow-hover:0 14px 30px rgba(15,23,42,.08);
  --op-radius:14px;
  --op-radius-lg:18px;
}
.akfa-ui-v177 .operator-dashboard-v177{
  display:grid;
  gap:14px;
}
.akfa-ui-v177 .operator-dashboard-v177 .operator-pagebar,
.akfa-ui-v177 .page-header.operator-pagebar{
  display:grid;
  grid-template-columns:minmax(320px,1fr) minmax(360px,.92fr);
  gap:14px;
  align-items:stretch;
  padding:0;
  border:0;
  background:transparent;
  box-shadow:none;
}
.akfa-ui-v177 .operator-pagebar.card{border:0;background:transparent;box-shadow:none;}
.akfa-ui-v177 .operator-pagebar > .exec-hero-title,
.akfa-ui-v177 .operator-pagebar > .title-wrap,
.akfa-ui-v177 .operator-pagebar > div:first-child:not(.exec-filter-panel):not(.toolbar):not(.actions){
  min-height:118px;
  padding:18px 20px;
  border:1px solid var(--op-border);
  border-radius:var(--op-radius-lg);
  background:linear-gradient(135deg,#fff 0%,#f8fbff 100%);
  box-shadow:var(--op-shadow);
}
.akfa-ui-v177 .operator-pagebar > .exec-filter-panel,
.akfa-ui-v177 .operator-pagebar > .toolbar,
.akfa-ui-v177 .operator-pagebar > .actions,
.akfa-ui-v177 .operator-pagebar > form,
.akfa-ui-v177 .operator-pagebar > .operations-shortcuts{
  min-height:118px;
  padding:14px;
  border:1px solid var(--op-border);
  border-radius:var(--op-radius-lg);
  background:#fff;
  box-shadow:var(--op-shadow);
  display:flex;
  gap:10px;
  align-items:flex-end;
  justify-content:flex-end;
  flex-wrap:wrap;
}
.akfa-ui-v177 .operator-pagebar h1{
  margin:0;
  font-size:clamp(26px,2vw,34px);
  line-height:1.08;
  letter-spacing:-.035em;
  font-weight:950;
  color:var(--op-text);
}
.akfa-ui-v177 .operator-pagebar p,
.akfa-ui-v177 .operator-pagebar .subtitle{
  max-width:900px;
  color:var(--op-muted);
  font-size:14px;
  font-weight:600;
  line-height:1.45;
  margin-top:6px;
}
.akfa-ui-v177 .operator-pagebar .eyebrow{font-size:12px;font-weight:950;color:#2563eb;letter-spacing:.02em;text-transform:none;margin-bottom:5px;}
.akfa-ui-v177 .operator-pagebar .chip-row,
.akfa-ui-v177 .operator-pagebar .lam-hero-meta{margin-top:12px;display:flex;gap:8px;flex-wrap:wrap;}
.akfa-ui-v177 .operator-pagebar .chip,
.akfa-ui-v177 .operator-pagebar .pill{border-radius:999px;background:#fff;border:1px solid var(--op-border);box-shadow:0 3px 10px rgba(15,23,42,.03);}
.akfa-ui-v177 .operator-kpi-ribbon,
.akfa-ui-v177 .exec-kpi-row.operator-kpi-ribbon,
.akfa-ui-v177 .operator-dashboard-v177 .exec-kpi-row,
.akfa-ui-v177 .matrix-kpis.operator-kpi-ribbon,
.akfa-ui-v177 .tech-kpis.operator-kpi-ribbon{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(205px,1fr));
  gap:12px;
  margin-top:0;
}
.akfa-ui-v177 .operator-dashboard-v177 .exec-kpi,
.akfa-ui-v177 .operator-kpi-ribbon .kpi,
.akfa-ui-v177 .operator-kpi-ribbon .eta-card{
  min-height:92px;
  border:1px solid var(--op-border);
  border-radius:var(--op-radius);
  background:#fff;
  box-shadow:var(--op-shadow);
  display:grid;
  grid-template-columns:auto 1fr;
  align-items:center;
  gap:12px;
  padding:14px 16px;
}
.akfa-ui-v177 .operator-kpi-ribbon .kpi{display:block;}
.akfa-ui-v177 .operator-dashboard-v177 .exec-kpi-icon{width:42px;height:42px;border-radius:13px;background:#f1f5ff;color:#2563eb;display:grid;place-items:center;font-size:22px;box-shadow:none;}
.akfa-ui-v177 .operator-dashboard-v177 .exec-kpi.green .exec-kpi-icon{background:#ecfdf3;color:#16a34a;}
.akfa-ui-v177 .operator-dashboard-v177 .exec-kpi.orange .exec-kpi-icon{background:#fff7ed;color:#f59e0b;}
.akfa-ui-v177 .operator-dashboard-v177 .exec-kpi.red .exec-kpi-icon{background:#fff1f2;color:#ef4444;}
.akfa-ui-v177 .operator-dashboard-v177 .exec-kpi.purple .exec-kpi-icon{background:#f5f3ff;color:#7c3aed;}
.akfa-ui-v177 .operator-dashboard-v177 .exec-kpi-label,
.akfa-ui-v177 .operator-kpi-ribbon .kpi-label{font-size:12px;color:#667085;font-weight:900;}
.akfa-ui-v177 .operator-dashboard-v177 .exec-kpi-value,
.akfa-ui-v177 .operator-kpi-ribbon .kpi-value{font-size:clamp(22px,1.5vw,30px);font-weight:950;letter-spacing:-.035em;color:#101828;}
.akfa-ui-v177 .operator-dashboard-v177 .exec-kpi-share,
.akfa-ui-v177 .operator-kpi-ribbon .kpi-meta{font-size:12px;color:#667085;font-weight:750;}
.akfa-ui-v177 .operator-dashboard-v177 .card,
.akfa-ui-v177 .operator-dashboard-v177 .inner-card,
.akfa-ui-v177 .operator-dashboard-v177 .tab-panel > .card,
.akfa-ui-v177 .operator-matrix-page .card,
.akfa-ui-v177 .technology-map-v177 .card{
  border:1px solid var(--op-border);
  border-radius:var(--op-radius);
  box-shadow:var(--op-shadow);
  background:#fff;
}
.akfa-ui-v177 .operator-dashboard-v177 .card:hover,
.akfa-ui-v177 .operator-matrix-page .matrix-decision-card:hover,
.akfa-ui-v177 .technology-map-v177 .card:hover{box-shadow:var(--op-shadow-hover);}
.akfa-ui-v177 .operator-dashboard-v177 .card-header,
.akfa-ui-v177 .operator-matrix-page .card-header,
.akfa-ui-v177 .technology-map-v177 .card-header{padding:13px 15px;border-bottom:1px solid #edf1f6;min-height:52px;}
.akfa-ui-v177 .operator-dashboard-v177 .card-title,
.akfa-ui-v177 .operator-dashboard-v177 .card-header h2,
.akfa-ui-v177 .operator-dashboard-v177 .card-header h3,
.akfa-ui-v177 .operator-matrix-page .card-title,
.akfa-ui-v177 .technology-map-v177 .card-title{font-size:16px;line-height:1.2;font-weight:950;color:#111827;margin:0;}
.akfa-ui-v177 .operator-dashboard-v177 .card-subtitle,
.akfa-ui-v177 .operator-dashboard-v177 .subtitle,
.akfa-ui-v177 .operator-matrix-page .card-subtitle,
.akfa-ui-v177 .technology-map-v177 .card-subtitle{color:#667085;font-size:12px;font-weight:650;}
.akfa-ui-v177 .operator-decision-strip,
.akfa-ui-v177 .operator-dashboard-v177 .smart-automation-strip,
.akfa-ui-v177 .matrix-decision-strip.operator-decision-strip{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:12px;
  padding:12px;
  border:1px solid var(--op-border);
  border-radius:var(--op-radius-lg);
  background:#fff;
  box-shadow:var(--op-shadow);
}
.akfa-ui-v177 .operator-decision-strip.card{padding:12px;}
.akfa-ui-v177 .operator-dashboard-v177 .smart-step,
.akfa-ui-v177 .matrix-decision-card{
  border:1px solid var(--op-border);
  border-radius:14px;
  padding:12px;
  background:#f8fafc;
  min-height:74px;
}
.akfa-ui-v177 .matrix-decision-card.ok{background:linear-gradient(135deg,#ecfdf3,#fff);border-color:#c7f0d8;}
.akfa-ui-v177 .matrix-decision-card.warn{background:linear-gradient(135deg,#fffbeb,#fff);border-color:#fde8a9;}
.akfa-ui-v177 .matrix-decision-card.danger{background:linear-gradient(135deg,#fff1f2,#fff);border-color:#ffd4d4;}
.akfa-ui-v177 .matrix-decision-card.info{background:linear-gradient(135deg,#eff6ff,#fff);border-color:#d7e7ff;}
.akfa-ui-v177 .operator-action-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:12px;}
.akfa-ui-v177 .operator-dashboard-v177 .production-flow-card,
.akfa-ui-v177 .operator-dashboard-v177 .mass-action-tile,
.akfa-ui-v177 .operator-dashboard-v177 .mini-route-card{
  border:1px solid var(--op-border);
  border-radius:14px;
  background:#fff;
  box-shadow:var(--op-shadow);
}
.akfa-ui-v177 .operator-dashboard-v177 .ops-tabs,
.akfa-ui-v177 .operator-tabs{
  border:1px solid var(--op-border);
  border-radius:14px;
  background:#fff;
  box-shadow:var(--op-shadow);
  padding:6px;
  gap:6px;
  overflow:auto;
}
.akfa-ui-v177 .operator-dashboard-v177 .tab,
.akfa-ui-v177 .operator-tabs .tab{
  border:0;
  border-radius:10px;
  background:transparent;
  color:#667085;
  font-weight:900;
}
.akfa-ui-v177 .operator-dashboard-v177 .tab.active,
.akfa-ui-v177 .operator-tabs .tab.active{background:#eff6ff;color:#1d4ed8;box-shadow:inset 0 0 0 1px #d7e7ff;}
.akfa-ui-v177 .operator-dashboard-v177 .table,
.akfa-ui-v177 .operator-dashboard-v177 .exec-table,
.akfa-ui-v177 .operator-matrix-page .table,
.akfa-ui-v177 .technology-map-v177 .table{
  border-collapse:separate;border-spacing:0;font-size:13px;
}
.akfa-ui-v177 .operator-dashboard-v177 th,
.akfa-ui-v177 .operator-matrix-page th,
.akfa-ui-v177 .technology-map-v177 th{background:#f8fafc;color:#111827;font-size:12px;font-weight:950;border-bottom:1px solid #e5e7eb;}
.akfa-ui-v177 .operator-dashboard-v177 td,
.akfa-ui-v177 .operator-matrix-page td,
.akfa-ui-v177 .technology-map-v177 td{border-bottom:1px solid #edf1f6;vertical-align:top;}
.akfa-ui-v177 .operator-dashboard-v177 tr:hover td,
.akfa-ui-v177 .operator-matrix-page tr:hover td,
.akfa-ui-v177 .technology-map-v177 tr:hover td{background:#f9fbff;}
.akfa-ui-v177 .operator-board-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(380px,1fr));gap:12px;align-items:start;}
.akfa-ui-v177 .operator-dashboard-v177 .schedule-operation-card{border-radius:14px;border:1px solid var(--op-border);background:#fff;box-shadow:0 5px 15px rgba(15,23,42,.035);}
.akfa-ui-v177 .operator-dashboard-v177 .schedule-operation-card.ok{border-left:4px solid #22a454;}
.akfa-ui-v177 .operator-dashboard-v177 .schedule-operation-card.warn{border-left:4px solid #f59e0b;}
.akfa-ui-v177 .operator-dashboard-v177 .schedule-operation-card.err{border-left:4px solid #ef4444;}
.akfa-ui-v177 .operator-dashboard-v177 .schedule-move-panel{border:1px dashed #cbd5e1;border-radius:12px;padding:8px 10px;background:#f8fafc;margin-top:8px;}
.akfa-ui-v177 .operator-dashboard-v177 .schedule-move-panel summary{font-weight:900;color:#2563eb;cursor:pointer;}
.akfa-ui-v177 .operator-dashboard-v177 .alert{border-radius:14px;border:1px solid var(--op-border);box-shadow:var(--op-shadow);}
.akfa-ui-v177 .operator-dashboard-v177 .empty-state,
.akfa-ui-v177 .operator-dashboard-v177 .empty-cell,
.akfa-ui-v177 .operator-matrix-page .empty-state,
.akfa-ui-v177 .technology-map-v177 .empty-state{
  border:1px dashed #cbd5e1;
  background:#f8fafc;
  border-radius:14px;
  padding:16px;
  color:#667085;
}
.akfa-ui-v177 .operator-dashboard-v177 .btn,
.akfa-ui-v177 .operator-matrix-page .btn,
.akfa-ui-v177 .technology-map-v177 .btn{min-height:38px;border-radius:10px;font-weight:900;}
.akfa-ui-v177 .operator-dashboard-v177 .btn-primary,
.akfa-ui-v177 .operator-matrix-page .btn-primary,
.akfa-ui-v177 .technology-map-v177 .btn-primary{background:#2563eb;border-color:#2563eb;color:#fff;}
.akfa-ui-v177 .operator-dashboard-v177 .input,
.akfa-ui-v177 .operator-matrix-page .input,
.akfa-ui-v177 .technology-map-v177 .input,
.akfa-ui-v177 .operator-dashboard-v177 select,
.akfa-ui-v177 .operator-dashboard-v177 input,
.akfa-ui-v177 .operator-matrix-page input,
.akfa-ui-v177 .operator-matrix-page select,
.akfa-ui-v177 .technology-map-v177 input,
.akfa-ui-v177 .technology-map-v177 select{
  border:1px solid #dfe5ee;
  border-radius:10px;
  background:#fff;
  min-height:38px;
}
.akfa-ui-v177 .operator-dashboard-v177 .badge,
.akfa-ui-v177 .operator-matrix-page .badge,
.akfa-ui-v177 .technology-map-v177 .badge{border-radius:999px;padding:4px 9px;font-size:11px;font-weight:950;}
.akfa-ui-v177 .operator-dashboard-v177 .badge.warning,
.akfa-ui-v177 .operator-dashboard-v177 .badge.warn{background:#fff6df;color:#b45309;border-color:#fde8a9;}
.akfa-ui-v177 .operator-dashboard-v177 .badge.danger,
.akfa-ui-v177 .operator-dashboard-v177 .badge.err{background:#fff1f1;color:#dc2626;border-color:#ffd4d4;}
.akfa-ui-v177 .operator-dashboard-v177 .badge.ok{background:#eaf7ee;color:#15803d;border-color:#ceebd7;}
.akfa-ui-v177 .operator-dashboard-v177 .badge.info{background:#eff6ff;color:#2563eb;border-color:#d7e7ff;}
.akfa-ui-v177 .operator-dashboard-v177 .exec-filter-field,
.akfa-ui-v177 .operator-pagebar .exec-filter-field{display:grid;gap:5px;min-width:150px;}
.akfa-ui-v177 .operator-dashboard-v177 .exec-filter-field span{font-size:12px;color:#667085;font-weight:950;}
.akfa-ui-v177 .operator-dashboard-v177 .exec-filter-actions{display:flex;gap:8px;align-items:flex-end;flex-wrap:wrap;}
.akfa-ui-v177 .matrix-filterbar,
.akfa-ui-v177 .technology-map-v177 .toolbar{border:1px solid var(--op-border);border-radius:14px;background:#fff;box-shadow:var(--op-shadow);padding:8px;}
.akfa-ui-v177 .matrix-filterbar .btn,
.akfa-ui-v177 .technology-map-v177 .toolbar .btn{min-height:36px;}
@media(max-width:1180px){
  .akfa-ui-v177 .operator-dashboard-v177 .operator-pagebar,
  .akfa-ui-v177 .page-header.operator-pagebar{grid-template-columns:1fr;}
  .akfa-ui-v177 .operator-pagebar > .exec-filter-panel,
  .akfa-ui-v177 .operator-pagebar > .toolbar,
  .akfa-ui-v177 .operator-pagebar > .actions{justify-content:flex-start;}
  .akfa-ui-v177 .operator-board-grid{grid-template-columns:1fr;}
}
@media(max-width:720px){
  .akfa-ui-v177 .operator-dashboard-v177 .operator-pagebar h1,
  .akfa-ui-v177 .page-header.operator-pagebar h1{font-size:24px;}
  .akfa-ui-v177 .operator-kpi-ribbon,
  .akfa-ui-v177 .operator-decision-strip{grid-template-columns:1fr;}
  .akfa-ui-v177 .operator-pagebar > .exec-filter-panel,
  .akfa-ui-v177 .operator-pagebar > .toolbar,
  .akfa-ui-v177 .operator-pagebar > .actions{display:grid;grid-template-columns:1fr;}
}

/* --------------------- v1.77.0 Operator pages dashboard cleanup ---------------------
   The executive dashboard visual language is now applied to operator pages:
   Smart Planning, Schedule Board, Procurement, WIP Buffer, Matrix Shop,
   Technology Map, Warehouse, Materials, Action Queue and production pages. */
.akfa-ui-v177{
  --op-bg:#f5f7fb;
  --op-card:#ffffff;
  --op-border:#dce4ef;
  --op-border-soft:rgba(15,23,42,.09);
  --op-text:#101828;
  --op-muted:#667085;
  --op-blue:#2563eb;
  --op-green:#34a853;
  --op-purple:#7e57c2;
  --op-orange:#ff9f2d;
  --op-red:#ef5350;
  --op-shadow:0 8px 22px rgba(15,23,42,.045);
  --op-shadow-strong:0 12px 30px rgba(15,23,42,.06);
  background:var(--op-bg);
}
.akfa-ui-v177 .app-shell,
.akfa-ui-v177 .main{background:var(--op-bg);}
@media (min-width:981px){
  .akfa-ui-v177 .topbar{display:none!important;}
  .akfa-ui-v177 .content{padding:14px 18px 24px;}
}
.akfa-ui-v177 .exec-dashboard-shell,
.akfa-ui-v177 .operator-dashboard-v177,
.akfa-ui-v177 .operator-ui-page,
.akfa-ui-v177 .operator-page-v177{
  display:grid;
  gap:12px;
  max-width:none;
}
.akfa-ui-v177 .operator-pagebar,
.akfa-ui-v177 .page-header.operator-pagebar,
.akfa-ui-v177 .exec-hero.operator-pagebar{
  display:grid;
  grid-template-columns:minmax(360px,.95fr) minmax(420px,1.25fr);
  gap:18px;
  align-items:start;
  min-height:82px;
  padding:14px 16px;
  border:1px solid var(--op-border);
  border-radius:12px;
  background:var(--op-card);
  box-shadow:var(--op-shadow);
  overflow:visible;
}
.akfa-ui-v177 .operator-pagebar h1,
.akfa-ui-v177 .operator-pagebar .title-wrap h1{
  margin:0;
  color:var(--op-text);
  font-size:clamp(24px,1.65vw,34px);
  line-height:1.05;
  letter-spacing:-.045em;
  font-weight:950;
}
.akfa-ui-v177 .operator-pagebar p,
.akfa-ui-v177 .operator-pagebar .subtitle{
  margin-top:5px;
  max-width:780px;
  color:var(--op-muted);
  font-size:14px;
  line-height:1.42;
  font-weight:650;
}
.akfa-ui-v177 .operator-pagebar .eyebrow{
  color:#475467;
  font-size:12px;
  font-weight:950;
  letter-spacing:.02em;
  text-transform:none;
}
.akfa-ui-v177 .operator-pagebar .toolbar,
.akfa-ui-v177 .operator-pagebar .actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  justify-content:flex-end;
}
.akfa-ui-v177 .operator-filter-panel,
.akfa-ui-v177 .operator-pagebar .exec-filter-panel,
.akfa-ui-v177 .operator-pagebar form.exec-filter-panel{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:10px;
  align-items:end;
  padding:0;
  border:0;
  background:transparent;
  box-shadow:none;
}
.akfa-ui-v177 .operator-filter-panel .exec-filter-field,
.akfa-ui-v177 .operator-pagebar .exec-filter-field,
.akfa-ui-v177 .dash-filter{
  min-height:58px;
  padding:9px 12px;
  border:1px solid var(--op-border-soft);
  border-radius:12px;
  background:#fff;
  box-shadow:0 6px 18px rgba(15,23,42,.035);
}
.akfa-ui-v177 .operator-filter-panel .exec-filter-field span,
.akfa-ui-v177 .operator-pagebar .exec-filter-field span,
.akfa-ui-v177 .dash-filter span{
  color:#667085;
  font-size:12px;
  font-weight:900;
  text-transform:none;
  letter-spacing:0;
}
.akfa-ui-v177 .operator-filter-panel select,
.akfa-ui-v177 .operator-filter-panel input,
.akfa-ui-v177 .operator-pagebar .input{
  min-height:28px;
  border-radius:10px;
  font-weight:850;
}
.akfa-ui-v177 .operator-kpi-grid,
.akfa-ui-v177 .operator-kpi-ribbon,
.akfa-ui-v177 .exec-kpi-row.operator-kpi-grid,
.akfa-ui-v177 .exec-kpi-row.operator-kpi-ribbon{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(178px,1fr));
  gap:12px;
}
.akfa-ui-v177 .operator-kpi-grid.dense,
.akfa-ui-v177 .smart-area-kpis.operator-kpi-grid{
  grid-template-columns:repeat(auto-fit,minmax(155px,1fr));
  gap:10px;
}
.akfa-ui-v177 .operator-kpi-grid .exec-kpi,
.akfa-ui-v177 .operator-kpi-ribbon .exec-kpi,
.akfa-ui-v177 .operator-kpi-grid .kpi,
.akfa-ui-v177 .operator-kpi-ribbon .kpi,
.akfa-ui-v177 .eta-card.operator-kpi-card{
  min-height:92px;
  padding:13px 14px;
  border:1px solid var(--op-border);
  border-radius:12px;
  background:#fff;
  box-shadow:var(--op-shadow);
}
.akfa-ui-v177 .operator-kpi-grid .exec-kpi{
  grid-template-columns:44px 1fr;
}
.akfa-ui-v177 .operator-kpi-grid .exec-kpi-icon,
.akfa-ui-v177 .operator-kpi-ribbon .exec-kpi-icon{
  width:40px;
  height:40px;
  border-radius:12px;
  border:0!important;
  background:transparent!important;
  font-size:21px;
  box-shadow:none;
}
.akfa-ui-v177 .operator-kpi-grid .exec-kpi-value,
.akfa-ui-v177 .operator-kpi-ribbon .exec-kpi-value,
.akfa-ui-v177 .operator-kpi-grid .kpi-value,
.akfa-ui-v177 .operator-kpi-ribbon .kpi-value{
  margin-top:3px;
  font-size:clamp(21px,1.35vw,28px);
  line-height:1;
  letter-spacing:-.04em;
  font-weight:950;
  color:var(--op-text)!important;
}
.akfa-ui-v177 .operator-kpi-grid .exec-kpi-label,
.akfa-ui-v177 .operator-kpi-ribbon .exec-kpi-label,
.akfa-ui-v177 .operator-kpi-grid .kpi-label,
.akfa-ui-v177 .operator-kpi-ribbon .kpi-label{
  color:var(--op-text)!important;
  font-size:12px;
  font-weight:900;
}
.akfa-ui-v177 .operator-kpi-grid .exec-kpi-share,
.akfa-ui-v177 .operator-kpi-ribbon .exec-kpi-share,
.akfa-ui-v177 .operator-kpi-grid .kpi-meta,
.akfa-ui-v177 .operator-kpi-ribbon .kpi-meta{
  color:var(--op-muted);
  font-size:12px;
  font-weight:850;
}
.akfa-ui-v177 .operator-decision-strip,
.akfa-ui-v177 .smart-lane-row.operator-decision-strip,
.akfa-ui-v177 .eta-card-row.operator-decision-strip,
.akfa-ui-v177 .matrix-decision-strip.operator-decision-strip{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(210px,1fr));
  gap:12px;
}
.akfa-ui-v177 .operator-decision-strip > *,
.akfa-ui-v177 .operator-decision-strip .smart-lane-card,
.akfa-ui-v177 .operator-decision-strip .eta-card,
.akfa-ui-v177 .operator-decision-strip .matrix-decision-card{
  min-height:82px;
  padding:13px 14px;
  border:1px solid var(--op-border);
  border-radius:12px;
  background:#fff;
  box-shadow:var(--op-shadow);
}
.akfa-ui-v177 .operator-decision-strip .ok,
.akfa-ui-v177 .operator-decision-strip .green{background:linear-gradient(135deg,rgba(52,168,83,.10),#fff);}
.akfa-ui-v177 .operator-decision-strip .warn,
.akfa-ui-v177 .operator-decision-strip .warning{background:linear-gradient(135deg,rgba(255,159,45,.13),#fff);}
.akfa-ui-v177 .operator-decision-strip .danger,
.akfa-ui-v177 .operator-decision-strip .err{background:linear-gradient(135deg,rgba(239,83,80,.12),#fff);}
.akfa-ui-v177 .operator-decision-strip .info,
.akfa-ui-v177 .operator-decision-strip .blue{background:linear-gradient(135deg,rgba(37,99,235,.10),#fff);}
.akfa-ui-v177 .operator-process-strip,
.akfa-ui-v177 .smart-automation-strip.operator-process-strip{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  padding:12px;
  border-radius:12px;
  box-shadow:var(--op-shadow);
}
.akfa-ui-v177 .operator-process-strip .smart-step{
  min-height:68px;
  border:1px solid var(--op-border-soft);
  border-radius:12px;
  background:linear-gradient(180deg,#fff,#f8fbff);
}
.akfa-ui-v177 .operator-section-card,
.akfa-ui-v177 .operator-section-title-card,
.akfa-ui-v177 .operator-decision-panel,
.akfa-ui-v177 .operator-lane-card,
.akfa-ui-v177 .smart-area-card.operator-section-card{
  border-radius:12px;
  border-color:var(--op-border);
  box-shadow:var(--op-shadow);
  background:#fff;
}
.akfa-ui-v177 .operator-section-card > .card-header,
.akfa-ui-v177 .operator-decision-panel > .card-header,
.akfa-ui-v177 .operator-lane-card > .card-header{
  min-height:54px;
  padding:13px 15px;
  border-bottom:1px solid #edf1f7;
}
.akfa-ui-v177 .operator-work-grid,
.akfa-ui-v177 .production-dashboard-grid.operator-work-grid{
  display:grid;
  grid-template-columns:minmax(620px,1fr) minmax(420px,.7fr);
  gap:12px;
  align-items:start;
}
.akfa-ui-v177 .operator-board-grid,
.akfa-ui-v177 .schedule-board-grid.operator-board-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(420px,1fr));
  gap:12px;
  align-items:start;
}
.akfa-ui-v177 .operator-lane-card .schedule-operation-list{
  display:grid;
  gap:8px;
  padding:12px;
}
.akfa-ui-v177 .operator-lane-card .schedule-operation-card{
  border-radius:12px;
  border:1px solid #edf1f7;
  background:#fff;
  box-shadow:0 5px 14px rgba(15,23,42,.035);
}
.akfa-ui-v177 .operator-lane-card .schedule-operation-card.ok{border-left:4px solid var(--op-green);}
.akfa-ui-v177 .operator-lane-card .schedule-operation-card.warn{border-left:4px solid var(--op-orange);}
.akfa-ui-v177 .operator-lane-card .schedule-operation-card.err{border-left:4px solid var(--op-red);}
.akfa-ui-v177 .operator-tabs,
.akfa-ui-v177 .tabs.operator-tabs{
  display:flex;
  gap:8px;
  padding:6px;
  border:1px solid var(--op-border);
  border-radius:12px;
  background:#fff;
  box-shadow:var(--op-shadow);
}
.akfa-ui-v177 .operator-tabs .tab{
  border-radius:10px;
  min-height:38px;
  padding:8px 13px;
  font-weight:900;
}
.akfa-ui-v177 .operator-tabs .tab.active{
  background:#eef5ff;
  color:var(--op-blue);
  box-shadow:inset 0 0 0 1px rgba(37,99,235,.13);
}
.akfa-ui-v177 .operator-filterbar{
  padding:8px;
  border:1px solid var(--op-border);
  border-radius:12px;
  background:#fff;
  box-shadow:var(--op-shadow);
}
.akfa-ui-v177 .operator-filterbar .btn{
  min-height:36px;
  border-radius:10px;
}
.akfa-ui-v177 .table-wrap{
  border-radius:12px;
  border-color:var(--op-border);
  overflow:auto;
}
.akfa-ui-v177 .table th,
.akfa-ui-v177 .exec-table th,
.akfa-ui-v177 .data-table th{
  background:linear-gradient(180deg,#f8fafc,#f2f5f9);
  color:#344054;
  font-size:12px;
  font-weight:950;
  padding:10px 12px;
  white-space:nowrap;
}
.akfa-ui-v177 .table td,
.akfa-ui-v177 .exec-table td,
.akfa-ui-v177 .data-table td{
  padding:10px 12px;
  border-bottom:1px solid #edf1f7;
}
.akfa-ui-v177 .empty-cell,
.akfa-ui-v177 .empty-state{
  color:#667085;
  font-weight:700;
  text-align:center;
}
.akfa-ui-v177 .badge.ok,
.akfa-ui-v177 .badge.green{background:#eaf7ee;color:#15803d;border-color:#cfecd8;}
.akfa-ui-v177 .badge.warn,
.akfa-ui-v177 .badge.warning{background:#fff7e6;color:#b25b00;border-color:#ffe1ac;}
.akfa-ui-v177 .badge.err,
.akfa-ui-v177 .badge.danger{background:#feecec;color:#d92d20;border-color:#fac5c5;}
.akfa-ui-v177 .badge.info,
.akfa-ui-v177 .badge.blue{background:#eef5ff;color:#1d4ed8;border-color:#d6e7ff;}
.akfa-ui-v177 .badge.neutral,
.akfa-ui-v177 .badge.muted{background:#f2f4f7;color:#475467;border-color:#e4e7ec;}
.akfa-ui-v177 .chip-row{gap:7px;}
.akfa-ui-v177 .chip{
  min-height:29px;
  padding:6px 11px;
  border-radius:999px;
  background:#fff;
  border-color:var(--op-border-soft);
  box-shadow:0 3px 10px rgba(15,23,42,.025);
}
.akfa-ui-v177 .btn{
  min-height:38px;
  border-radius:10px;
  padding:8px 13px;
  font-weight:900;
}
.akfa-ui-v177 .btn-small,
.akfa-ui-v177 .btn-sm{min-height:32px;padding:6px 10px;border-radius:9px;}
.akfa-ui-v177 .btn-primary{
  background:linear-gradient(180deg,#2f80ff,#1d5fe7);
  border-color:#1d5fe7;
  box-shadow:0 8px 18px rgba(37,99,235,.18);
}
.akfa-ui-v177 .btn-primary:disabled,
.akfa-ui-v177 button:disabled{opacity:.48;box-shadow:none;cursor:not-allowed;}
.akfa-ui-v177 .inline-form,
.akfa-ui-v177 .wip-quality-form,
.akfa-ui-v177 .procurement-eta-form{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  align-items:center;
}
.akfa-ui-v177 .compact-input{min-height:32px;padding:5px 8px;border-radius:9px;}
.akfa-ui-v177 .alert{
  border-radius:12px;
  padding:12px 14px;
}
.akfa-ui-v177 .alert.ok{background:#ecfdf3;border-color:#cfeada;color:#166534;}
.akfa-ui-v177 .alert.info{background:#eef5ff;border-color:#d6e7ff;color:#1d4ed8;}
.akfa-ui-v177 .alert.warn{background:#fff7e6;border-color:#ffe1ac;color:#92400e;}
.akfa-ui-v177 .alert.err,
.akfa-ui-v177 .alert.error{background:#feecec;border-color:#fac5c5;color:#b42318;}
.akfa-ui-v177 .autopilot-decision-summary .card-header{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:12px;
}
.akfa-ui-v177 .autopilot-card-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:10px;
  padding:12px;
}
.akfa-ui-v177 .autopilot-card,
.akfa-ui-v177 .shortage-card{
  border-radius:12px;
  border:1px solid var(--op-border);
  background:#fff;
  box-shadow:0 6px 16px rgba(15,23,42,.035);
}
.akfa-ui-v177 .shortage-card-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(245px,1fr));
  gap:10px;
  padding:12px;
}
.akfa-ui-v177 .matrix-work-grid{
  grid-template-columns:minmax(680px,1fr) minmax(340px,.42fr)!important;
}
.akfa-ui-v177 .matrix-chip,
.akfa-ui-v177 .matrix-orphan-item,
.akfa-ui-v177 .matrix-link-step{
  border-radius:12px;
  box-shadow:0 5px 14px rgba(15,23,42,.035);
}
.akfa-ui-v177 .tech-line-summary{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(160px,1fr));
  gap:10px;
}
.akfa-ui-v177 .operator-pagebar .input[type="search"]{
  min-width:220px;
  background:#fff;
}
@media (max-width:1500px){
  .akfa-ui-v177 .operator-pagebar,
  .akfa-ui-v177 .page-header.operator-pagebar,
  .akfa-ui-v177 .exec-hero.operator-pagebar{grid-template-columns:1fr;}
  .akfa-ui-v177 .operator-work-grid,
  .akfa-ui-v177 .production-dashboard-grid.operator-work-grid,
  .akfa-ui-v177 .matrix-work-grid{grid-template-columns:1fr!important;}
}
@media (max-width:980px){
  .akfa-ui-v177 .topbar{display:block!important;}
  .akfa-ui-v177 .content{padding:12px;}
  .akfa-ui-v177 .operator-pagebar,
  .akfa-ui-v177 .page-header.operator-pagebar,
  .akfa-ui-v177 .exec-hero.operator-pagebar{padding:12px;}
  .akfa-ui-v177 .operator-pagebar .toolbar,
  .akfa-ui-v177 .operator-pagebar .actions{justify-content:flex-start;}
  .akfa-ui-v177 .operator-process-strip,
  .akfa-ui-v177 .smart-automation-strip.operator-process-strip{grid-template-columns:1fr;}
  .akfa-ui-v177 .operator-board-grid,
  .akfa-ui-v177 .schedule-board-grid.operator-board-grid{grid-template-columns:1fr;}
}

/* --------------------- v1.77.0 final operator-page polish ---------------------
   All operator screens should inherit the same dashboard language as the
   executive page: dark icon navigation, white cards, compact filters,
   KPI ribbons, sticky table headers, preview-first actions. */
.akfa-ui-v177{
  --op-bg:#f7f8fb;
  --op-card:#fff;
  --op-border:#e1e6ee;
  --op-border-soft:#edf0f5;
  --op-text:#101828;
  --op-muted:#667085;
  --op-blue:#2563eb;
  --op-green:#16a34a;
  --op-orange:#f97316;
  --op-red:#ef4444;
  --op-purple:#7c3aed;
  --op-shadow:0 1px 2px rgba(15,23,42,.035),0 8px 22px rgba(15,23,42,.035);
  --op-radius:12px;
  --op-radius-lg:16px;
  background:var(--op-bg);
}
:is(.operator-ui-page,.operator-page-v177,.operator-dashboard-v177){
  display:grid;
  gap:14px;
  max-width:none;
}
:is(.operator-ui-page,.operator-page-v177,.operator-dashboard-v177) > :is(.exec-hero,.page-header,.operator-pagebar){
  border:1px solid var(--op-border);
  border-radius:var(--op-radius-lg);
  background:linear-gradient(135deg,#fff 0%,#f8fbff 100%);
  box-shadow:var(--op-shadow);
  padding:16px 18px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}
:is(.operator-ui-page,.operator-page-v177,.operator-dashboard-v177) > :is(.exec-hero,.page-header,.operator-pagebar) h1{
  margin:0;
  color:var(--op-text);
  font-size:clamp(26px,1.8vw,34px);
  line-height:1.08;
  letter-spacing:-.04em;
  font-weight:950;
}
:is(.operator-ui-page,.operator-page-v177,.operator-dashboard-v177) .eyebrow{
  color:var(--op-blue);
  font-size:12px;
  font-weight:950;
  letter-spacing:.045em;
  text-transform:uppercase;
}
:is(.operator-ui-page,.operator-page-v177,.operator-dashboard-v177) :is(.subtitle,.card-subtitle,p){
  color:var(--op-muted);
}
:is(.operator-ui-page,.operator-page-v177,.operator-dashboard-v177) :is(.actions,.toolbar,.chip-row){
  gap:8px;
  flex-wrap:wrap;
}
:is(.operator-ui-page,.operator-page-v177,.operator-dashboard-v177) :is(.exec-filter-panel,.compact-filter-panel,.operator-filter-panel,.matrix-filterbar,.toolbar.matrix-filterbar){
  border:1px solid var(--op-border);
  border-radius:var(--op-radius-lg);
  background:#fff;
  box-shadow:var(--op-shadow);
  padding:10px;
}
:is(.operator-ui-page,.operator-page-v177,.operator-dashboard-v177) .exec-filter-field{
  min-height:58px;
  border:1px solid var(--op-border-soft);
  border-radius:12px;
  background:#fff;
  padding:9px 12px;
  display:grid;
  gap:5px;
  align-content:center;
}
:is(.operator-ui-page,.operator-page-v177,.operator-dashboard-v177) .exec-filter-field span{
  color:var(--op-muted);
  font-size:12px;
  font-weight:900;
}
:is(.operator-ui-page,.operator-page-v177,.operator-dashboard-v177) :is(.exec-filter-field input,.exec-filter-field select){
  border:0!important;
  background:transparent!important;
  padding:0!important;
  box-shadow:none!important;
  color:var(--op-text);
  font-weight:850;
}
:is(.operator-ui-page,.operator-page-v177,.operator-dashboard-v177) :is(.exec-kpi-row,.operator-kpi-ribbon,.matrix-kpis,.tech-kpis,.eta-card-row){
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(178px,1fr));
  gap:12px;
}
:is(.operator-ui-page,.operator-page-v177,.operator-dashboard-v177) :is(.exec-kpi,.card.kpi,.eta-card){
  border:1px solid var(--op-border);
  border-radius:var(--op-radius);
  background:#fff;
  box-shadow:var(--op-shadow);
  min-height:94px;
}
:is(.operator-ui-page,.operator-page-v177,.operator-dashboard-v177) .exec-kpi{
  display:grid;
  grid-template-columns:48px minmax(0,1fr);
  gap:12px;
  align-items:center;
  padding:14px 16px;
}
:is(.operator-ui-page,.operator-page-v177,.operator-dashboard-v177) .exec-kpi-icon{
  width:42px;height:42px;border-radius:14px;background:transparent!important;border:0!important;box-shadow:none!important;
  color:var(--op-blue);font-size:22px;display:grid;place-items:center;font-weight:950;
}
:is(.operator-ui-page,.operator-page-v177,.operator-dashboard-v177) .exec-kpi.green .exec-kpi-icon{color:var(--op-green);}
:is(.operator-ui-page,.operator-page-v177,.operator-dashboard-v177) .exec-kpi.orange .exec-kpi-icon{color:var(--op-orange);}
:is(.operator-ui-page,.operator-page-v177,.operator-dashboard-v177) .exec-kpi.red .exec-kpi-icon{color:var(--op-red);}
:is(.operator-ui-page,.operator-page-v177,.operator-dashboard-v177) .exec-kpi.purple .exec-kpi-icon{color:var(--op-purple);}
:is(.operator-ui-page,.operator-page-v177,.operator-dashboard-v177) :is(.exec-kpi-label,.kpi-label){font-size:12px;color:var(--op-muted);font-weight:900;}
:is(.operator-ui-page,.operator-page-v177,.operator-dashboard-v177) :is(.exec-kpi-value,.kpi-value){font-size:clamp(22px,1.35vw,30px);font-weight:950;color:var(--op-text);letter-spacing:-.035em;}
:is(.operator-ui-page,.operator-page-v177,.operator-dashboard-v177) :is(.exec-kpi-share,.kpi-meta){font-size:12px;color:var(--op-muted);font-weight:800;}
:is(.operator-ui-page,.operator-page-v177,.operator-dashboard-v177) :is(.card,.inner-card,.panel-card,.schedule-lane-card,.schedule-guide-card,.schedule-area-summary-card,.schedule-board-title-card,.wip-buffer-card,.matrix-main-card,.matrix-link-card){
  border:1px solid var(--op-border);
  border-radius:var(--op-radius-lg);
  background:#fff;
  box-shadow:var(--op-shadow);
  overflow:hidden;
}
:is(.operator-ui-page,.operator-page-v177,.operator-dashboard-v177) .card-header{
  padding:13px 16px;
  border-bottom:1px solid var(--op-border-soft);
  background:linear-gradient(180deg,#fff,#f9fafb);
}
:is(.operator-ui-page,.operator-page-v177,.operator-dashboard-v177) .card-title,
:is(.operator-ui-page,.operator-page-v177,.operator-dashboard-v177) .card-header h2,
:is(.operator-ui-page,.operator-page-v177,.operator-dashboard-v177) .card-header h3{font-weight:900;color:var(--op-text);}
:is(.operator-ui-page,.operator-page-v177,.operator-dashboard-v177) :is(.table-wrap,.matrix-table-wrap){
  border:1px solid var(--op-border-soft);
  border-radius:14px;
  overflow:auto;
  background:#fff;
}
:is(.operator-ui-page,.operator-page-v177,.operator-dashboard-v177) :is(.table,.exec-table,.data-table){font-size:13px;border-collapse:separate;border-spacing:0;}
:is(.operator-ui-page,.operator-page-v177,.operator-dashboard-v177) :is(.table th,.exec-table th,.data-table th){
  position:sticky;top:0;z-index:1;background:#f8fafc;color:#344054;font-size:12px;font-weight:900;border-bottom:1px solid #e5e7eb;
}
:is(.operator-ui-page,.operator-page-v177,.operator-dashboard-v177) :is(.table td,.exec-table td,.data-table td){border-bottom:1px solid var(--op-border-soft);}
:is(.operator-ui-page,.operator-page-v177,.operator-dashboard-v177) tbody tr:hover td{background:#fafcff;}
:is(.operator-ui-page,.operator-page-v177,.operator-dashboard-v177) :is(.btn,.chip,.pill,.tag,.badge){border-radius:999px;font-weight:850;}
:is(.operator-ui-page,.operator-page-v177,.operator-dashboard-v177) .btn{min-height:36px;border-radius:11px;font-weight:900;}
:is(.operator-ui-page,.operator-page-v177,.operator-dashboard-v177) .btn-primary{background:var(--op-blue);border-color:var(--op-blue);color:#fff;}
:is(.operator-ui-page,.operator-page-v177,.operator-dashboard-v177) :is(.empty-state,.empty-cell){
  background:#f8fafc;border:1px dashed #d8dee9;border-radius:14px;color:var(--op-muted);padding:18px;font-weight:750;
}
:is(.operator-ui-page,.operator-page-v177,.operator-dashboard-v177) :is(.operator-decision-strip,.matrix-decision-strip,.smart-lane-row,.autopilot-card-grid,.shortage-card-grid,.matrix-link-grid){
  display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:12px;
}
:is(.operator-ui-page,.operator-page-v177,.operator-dashboard-v177) :is(.autopilot-card,.shortage-card,.matrix-decision-card,.smart-lane-card,.matrix-link-step,.matrix-orphan-item){
  border:1px solid var(--op-border);border-radius:14px;background:#fff;box-shadow:var(--op-shadow);
}
:is(.operator-ui-page,.operator-page-v177,.operator-dashboard-v177) .matrix-decision-card{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:12px;padding:14px;}
:is(.operator-ui-page,.operator-page-v177,.operator-dashboard-v177) .matrix-decision-value{font-size:28px;font-weight:950;letter-spacing:-.04em;}
.operator-schedule-page .schedule-operation-card details,
.operator-schedule-page details.schedule-move-panel{border-radius:14px;}
.operator-schedule-page .schedule-operation-card{transition:transform .12s ease,box-shadow .12s ease;}
.operator-schedule-page .schedule-operation-card:hover{transform:translateY(-1px);box-shadow:0 12px 28px rgba(15,23,42,.07);}
.operator-schedule-page .schedule-operation-card.ok{border-left:4px solid var(--op-green);}
.operator-schedule-page .schedule-operation-card.warn{border-left:4px solid #f59e0b;}
.operator-schedule-page .schedule-operation-card.err{border-left:4px solid var(--op-red);}
.operator-procurement-page .inline-form,
.operator-wip-page .wip-quality-form{display:flex;flex-wrap:wrap;gap:6px;align-items:center;}
.operator-matrix-page .matrix-work-grid,
.operator-matrix-page-v177 .matrix-work-grid{grid-template-columns:minmax(620px,1fr) minmax(360px,.42fr);}
.operator-tech-page-v177 .tech-layout{grid-template-columns:minmax(520px,.46fr) minmax(640px,.54fr);}
@media (max-width:1180px){
  :is(.operator-ui-page,.operator-page-v177,.operator-dashboard-v177) > :is(.exec-hero,.page-header,.operator-pagebar){flex-direction:column;align-items:stretch;}
  .operator-matrix-page .matrix-work-grid,.operator-matrix-page-v177 .matrix-work-grid,.operator-tech-page-v177 .tech-layout{grid-template-columns:1fr;}
}
@media (max-width:760px){
  .akfa-ui-v177 .content{padding:12px;}
  :is(.operator-ui-page,.operator-page-v177,.operator-dashboard-v177) :is(.exec-kpi-row,.operator-kpi-ribbon,.matrix-kpis,.tech-kpis,.eta-card-row){grid-template-columns:1fr;}
}

/* --------------------- AKFA UI v1.77 — operator pages design cleanup ---------------------
   Purpose: bring planning/procurement/WIP/matrix/operator pages closer to the executive
   dashboard reference without adding new business functions. */
.akfa-ui-v177{
  --operator-gap:14px;
  --operator-card-radius:13px;
  --operator-border:rgba(15,23,42,.10);
  --operator-shadow:0 1px 2px rgba(15,23,42,.035),0 9px 22px rgba(15,23,42,.045);
  --operator-shadow-hover:0 10px 24px rgba(15,23,42,.08);
}
.akfa-ui-v177 .operator-dashboard-v177{
  display:grid;
  gap:var(--operator-gap);
  max-width:none;
}
.akfa-ui-v177 .operator-ui-page,
.akfa-ui-v177 .operator-page-v177{min-width:0;}
.akfa-ui-v177 .operator-pagebar{
  display:grid;
  grid-template-columns:minmax(420px,1.15fr) minmax(320px,.85fr);
  gap:18px;
  align-items:center;
  min-height:118px;
  padding:18px 20px!important;
  border:1px solid var(--operator-border)!important;
  border-radius:16px!important;
  background:
    radial-gradient(circle at 0% 0%,rgba(47,111,235,.09),transparent 34%),
    linear-gradient(135deg,rgba(255,255,255,.98),rgba(249,251,255,.94))!important;
  box-shadow:var(--operator-shadow)!important;
  overflow:hidden;
}
.akfa-ui-v177 .operator-pagebar h1{
  margin:3px 0 6px;
  font-size:clamp(25px,1.65vw,34px);
  line-height:1.08;
  letter-spacing:-.04em;
  color:#111827;
  font-weight:950;
}
.akfa-ui-v177 .operator-pagebar p,
.akfa-ui-v177 .operator-pagebar .subtitle{
  max-width:980px;
  color:#667085;
  font-weight:620;
  line-height:1.45;
}
.akfa-ui-v177 .operator-pagebar .toolbar,
.akfa-ui-v177 .operator-pagebar .actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  justify-content:flex-end;
  align-items:center;
}
.akfa-ui-v177 .operator-filter-panel,
.akfa-ui-v177 .operator-pagebar .exec-filter-panel{
  align-self:stretch;
  display:grid;
  grid-template-columns:minmax(170px,1fr) auto;
  gap:10px;
  padding:10px;
  border-radius:14px;
  border:1px solid rgba(15,23,42,.08);
  background:rgba(255,255,255,.78);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.54);
}
.akfa-ui-v177 .operator-decision-strip-v177{
  display:grid;
  grid-template-columns:repeat(5,minmax(160px,1fr));
  gap:12px;
  align-items:stretch;
}
.akfa-ui-v177 .operator-decision-card-v177,
.akfa-ui-v177 .operator-search-card-v177{
  position:relative;
  min-height:104px;
  padding:15px 15px 14px;
  border:1px solid var(--operator-border);
  border-radius:15px;
  background:#fff;
  box-shadow:var(--operator-shadow);
  display:grid;
  grid-template-columns:46px 1fr;
  column-gap:12px;
  row-gap:2px;
  align-content:start;
  color:#111827;
  transition:transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
  overflow:hidden;
}
.akfa-ui-v177 a.operator-decision-card-v177:hover{
  transform:translateY(-1px);
  box-shadow:var(--operator-shadow-hover);
  border-color:rgba(47,111,235,.25);
}
.akfa-ui-v177 .operator-decision-card-v177::after{
  content:"";
  position:absolute;
  left:0;right:0;bottom:0;height:3px;
  background:#cbd5e1;
}
.akfa-ui-v177 .operator-decision-card-v177.ok::after{background:#34a853;}
.akfa-ui-v177 .operator-decision-card-v177.warn::after{background:#f59e0b;}
.akfa-ui-v177 .operator-decision-card-v177.danger::after{background:#ef4444;}
.akfa-ui-v177 .operator-decision-card-v177.blue::after{background:#2f6feb;}
.akfa-ui-v177 .operator-decision-card-v177.purple::after{background:#7e57c2;}
.akfa-ui-v177 .operator-decision-icon-v177{
  grid-row:1 / span 4;
  width:44px;
  height:44px;
  border-radius:14px;
  display:grid;
  place-items:center;
  font-weight:950;
  font-size:18px;
  background:#f1f5f9;
  color:#334155;
}
.akfa-ui-v177 .operator-decision-card-v177.ok .operator-decision-icon-v177{background:#eaf7ee;color:#15803d;}
.akfa-ui-v177 .operator-decision-card-v177.warn .operator-decision-icon-v177{background:#fff5df;color:#b45309;}
.akfa-ui-v177 .operator-decision-card-v177.danger .operator-decision-icon-v177{background:#fff1f1;color:#dc2626;}
.akfa-ui-v177 .operator-decision-card-v177.blue .operator-decision-icon-v177{background:#eff6ff;color:#2563eb;}
.akfa-ui-v177 .operator-decision-card-v177.purple .operator-decision-icon-v177{background:#f4efff;color:#6d3dbb;}
.akfa-ui-v177 .operator-decision-card-v177 strong{
  display:block;
  font-size:clamp(24px,1.55vw,31px);
  line-height:1;
  font-weight:950;
  letter-spacing:-.035em;
  color:#101828;
}
.akfa-ui-v177 .operator-decision-card-v177 b{
  display:block;
  font-size:13px;
  line-height:1.2;
  font-weight:950;
  color:#111827;
}
.akfa-ui-v177 .operator-decision-card-v177 em{
  display:block;
  font-style:normal;
  color:#667085;
  font-size:12px;
  font-weight:650;
  line-height:1.25;
}
.akfa-ui-v177 .operator-search-card-v177{
  grid-template-columns:1fr;
  gap:8px;
}
.akfa-ui-v177 .operator-search-card-v177 span{
  color:#667085;
  font-size:12px;
  font-weight:900;
}
.akfa-ui-v177 .operator-search-card-v177 input{width:100%;}
.akfa-ui-v177 .operator-process-strip{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  padding:12px;
  border:1px solid var(--operator-border);
  border-radius:15px;
  background:#fff;
  box-shadow:var(--operator-shadow);
}
.akfa-ui-v177 .operator-process-strip .smart-step{
  border:1px solid rgba(15,23,42,.08);
  border-radius:13px;
  padding:12px;
  background:#f8fafc;
  display:grid;
  grid-template-columns:34px 1fr;
  gap:10px;
  align-items:start;
}
.akfa-ui-v177 .operator-process-strip .smart-step b{
  width:34px;height:34px;border-radius:12px;display:grid;place-items:center;background:#eaf1ff;color:#2563eb;font-weight:950;
}
.akfa-ui-v177 .operator-kpi-grid{
  grid-template-columns:repeat(auto-fit,minmax(172px,1fr));
  gap:12px;
}
.akfa-ui-v177 .operator-kpi-grid .exec-kpi{
  min-height:98px;
  border-radius:14px;
  border:1px solid var(--operator-border);
  box-shadow:var(--operator-shadow);
}
.akfa-ui-v177 .operator-kpi-grid .exec-kpi-icon{
  border:0;
  background:transparent;
  font-size:22px;
  color:inherit;
}
.akfa-ui-v177 .operator-section-card,
.akfa-ui-v177 .operator-section-title-card,
.akfa-ui-v177 .operator-decision-panel,
.akfa-ui-v177 .operator-lane-card{
  border:1px solid var(--operator-border)!important;
  border-radius:15px!important;
  box-shadow:var(--operator-shadow)!important;
  background:#fff!important;
}
.akfa-ui-v177 .operator-section-card>.card-header,
.akfa-ui-v177 .operator-decision-panel>.card-header,
.akfa-ui-v177 .operator-section-title-card>.card-header,
.akfa-ui-v177 .operator-lane-card>.card-header{
  border-bottom:1px solid #edf0f5;
  padding:15px 16px;
}
.akfa-ui-v177 .operator-section-card h2,
.akfa-ui-v177 .operator-decision-panel h2,
.akfa-ui-v177 .operator-section-title-card h2{
  font-size:19px;
  letter-spacing:-.025em;
}
.akfa-ui-v177 .operator-tabs{
  display:flex;
  gap:8px;
  padding:8px;
  border:1px solid var(--operator-border);
  border-radius:15px;
  background:#fff;
  box-shadow:var(--operator-shadow);
}
.akfa-ui-v177 .operator-tabs .tab{
  border-radius:12px;
  padding:10px 14px;
  font-weight:900;
}
.akfa-ui-v177 .operator-tabs .tab.active{
  background:#eaf1ff;
  color:#1d4ed8;
}
.akfa-ui-v177 .operator-work-grid{
  grid-template-columns:minmax(680px,1.2fr) minmax(360px,.8fr);
  gap:12px;
}
.akfa-ui-v177 .operator-board-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(430px,1fr));
  gap:12px;
}
.akfa-ui-v177 .schedule-operation-card{
  border-radius:14px;
  border:1px solid rgba(15,23,42,.08);
  background:#fff;
  box-shadow:0 1px 2px rgba(15,23,42,.03);
}
.akfa-ui-v177 .schedule-operation-card.ok{background:linear-gradient(90deg,rgba(236,253,245,.76),#fff 40%);}
.akfa-ui-v177 .schedule-operation-card.warn{background:linear-gradient(90deg,rgba(255,251,235,.86),#fff 42%);}
.akfa-ui-v177 .schedule-operation-card.err{background:linear-gradient(90deg,rgba(254,242,242,.86),#fff 42%);}
.akfa-ui-v177 .schedule-op-time b{font-size:15px;color:#111827;}
.akfa-ui-v177 .schedule-op-main strong{font-size:14px;}
.akfa-ui-v177 .schedule-op-badges{display:flex;flex-wrap:wrap;gap:5px;justify-content:flex-end;}
.akfa-ui-v177 .schedule-move-panel{
  margin-top:10px;
  border:1px dashed rgba(47,111,235,.28);
  border-radius:13px;
  background:#f8fbff;
  padding:8px 10px;
}
.akfa-ui-v177 .schedule-move-panel summary{
  cursor:pointer;
  font-weight:900;
  color:#2563eb;
}
.akfa-ui-v177 .schedule-move-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;}
.akfa-ui-v177 .table-wrap{
  border-radius:13px;
  border:1px solid rgba(15,23,42,.08);
  overflow:auto;
  background:#fff;
}
.akfa-ui-v177 .operator-dashboard-v177 .table-wrap .table,
.akfa-ui-v177 .operator-dashboard-v177 .table-wrap .exec-table{border:0;}
.akfa-ui-v177 .operator-dashboard-v177 .table th{
  background:#f8fafc;
  color:#344054;
  font-size:12px;
  font-weight:950;
  letter-spacing:.01em;
}
.akfa-ui-v177 .operator-dashboard-v177 .table td{vertical-align:top;}
.akfa-ui-v177 .operator-dashboard-v177 .empty-state,
.akfa-ui-v177 .operator-dashboard-v177 .empty-cell{
  background:#f8fafc;
  border:1px dashed #cbd5e1;
  border-radius:14px;
  color:#667085;
}
.akfa-ui-v177 .operator-dashboard-v177 .btn{
  min-height:38px;
  border-radius:11px;
  font-weight:900;
}
.akfa-ui-v177 .operator-dashboard-v177 .btn-small{min-height:30px;border-radius:9px;}
.akfa-ui-v177 .operator-dashboard-v177 .chip,
.akfa-ui-v177 .operator-dashboard-v177 .pill,
.akfa-ui-v177 .operator-dashboard-v177 .badge{
  font-weight:850;
  border-radius:999px;
}
.akfa-ui-v177 .operator-dashboard-v177 .alert{
  border-radius:14px;
  box-shadow:var(--operator-shadow);
}
.akfa-ui-v177 .operator-dashboard-v177 details:not(.schedule-move-panel){border-radius:12px;}
.akfa-ui-v177 .operator-dashboard-v177 .autopilot-card-grid,
.akfa-ui-v177 .operator-dashboard-v177 .shortage-card-grid{
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:10px;
}
.akfa-ui-v177 .operator-dashboard-v177 .shortage-card,
.akfa-ui-v177 .operator-dashboard-v177 .autopilot-card{
  border-radius:14px;
  box-shadow:0 1px 2px rgba(15,23,42,.03);
}
.akfa-ui-v177 .operator-dashboard-v177 .matrix-decision-strip,
.akfa-ui-v177 .operator-dashboard-v177 .operator-decision-strip{
  gap:12px;
}
.akfa-ui-v177 .operator-dashboard-v177 .matrix-profile-table{min-width:1040px;}
.akfa-ui-v177 .operator-dashboard-v177 .matrix-chip{border-radius:14px;}
.akfa-ui-v177 .operator-dashboard-v177 .matrix-work-grid{gap:14px;}
.akfa-ui-v177 .operator-pagebar-tech .title-wrap h1,
.akfa-ui-v177 .operator-pagebar-warehouse h1,
.akfa-ui-v177 .operator-pagebar-materials h1,
.akfa-ui-v177 .operator-pagebar-actions h1{font-size:clamp(25px,1.65vw,34px);}
.akfa-ui-v177 .operator-dashboard-v177 .risk-item,
.akfa-ui-v177 .operator-dashboard-v177 .production-flow-card{
  border-radius:14px;
  box-shadow:0 1px 2px rgba(15,23,42,.03);
}
.akfa-ui-v177 .operator-dashboard-v177 .production-flow-card:hover,
.akfa-ui-v177 .operator-dashboard-v177 .risk-item:hover{box-shadow:var(--operator-shadow-hover);}
.akfa-ui-v177 .operator-dashboard-v177 .form-row span,
.akfa-ui-v177 .operator-dashboard-v177 .field span,
.akfa-ui-v177 .operator-dashboard-v177 .exec-filter-field span{
  font-weight:900;
  color:#667085;
  font-size:12px;
}
.akfa-ui-v177 .operator-dashboard-v177 input.input,
.akfa-ui-v177 .operator-dashboard-v177 select.input,
.akfa-ui-v177 .operator-dashboard-v177 textarea.input,
.akfa-ui-v177 .operator-dashboard-v177 .input{
  min-height:38px;
  border-radius:11px;
  border-color:#dfe5ee;
  background:#fff;
}
.akfa-ui-v177 .operator-dashboard-v177 .right{text-align:right;}
.akfa-ui-v177 .operator-dashboard-v177 .text-danger{color:#dc2626;}
@media(max-width:1500px){
  .akfa-ui-v177 .operator-decision-strip-v177{grid-template-columns:repeat(3,minmax(170px,1fr));}
  .akfa-ui-v177 .operator-work-grid{grid-template-columns:1fr;}
}
@media(max-width:1100px){
  .akfa-ui-v177 .operator-pagebar{grid-template-columns:1fr;}
  .akfa-ui-v177 .operator-pagebar .toolbar,
  .akfa-ui-v177 .operator-pagebar .actions{justify-content:flex-start;}
  .akfa-ui-v177 .operator-process-strip{grid-template-columns:1fr;}
  .akfa-ui-v177 .operator-board-grid{grid-template-columns:1fr;}
  .akfa-ui-v177 .schedule-move-grid{grid-template-columns:1fr;}
}
@media(max-width:760px){
  .akfa-ui-v177 .operator-decision-strip-v177{grid-template-columns:1fr;}
  .akfa-ui-v177 .operator-pagebar{padding:14px!important;border-radius:14px!important;}
  .akfa-ui-v177 .operator-pagebar .toolbar .btn,
  .akfa-ui-v177 .operator-pagebar .actions .btn{width:100%;justify-content:center;}
  .akfa-ui-v177 .operator-tabs{overflow:auto;}
}
/* v1.77.0 Operator pages design cleanup — regression marker */

/* --------------------- AKFA UI v1.78 — tech map, staffing, equipment and layout fixes --------------------- */
.akfa-ui-v178{
  --sidebar-w:66px;
  --op-bg:#f5f7fb;
  --op-panel:#ffffff;
  --op-line:#dfe5ee;
  --op-line-soft:#edf1f6;
  --op-text:#111827;
  --op-muted:#667085;
  --op-blue:#2f6feb;
  --op-green:#16a34a;
  --op-orange:#f59e0b;
  --op-red:#ef4444;
  --op-purple:#7c3aed;
  --op-radius:15px;
  --op-radius-lg:18px;
  --op-shadow:0 1px 2px rgba(15,23,42,.035),0 10px 26px rgba(15,23,42,.055);
}
.akfa-ui-v178 .app-shell{background:var(--op-bg);min-height:100vh;}
.akfa-ui-v178 .sidebar{
  width:var(--sidebar-w)!important;
  min-width:var(--sidebar-w)!important;
  max-width:var(--sidebar-w)!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  scrollbar-width:none;
  padding:10px 8px!important;
  background:linear-gradient(180deg,#0b1829,#061426)!important;
}
.akfa-ui-v178 .sidebar::-webkit-scrollbar{display:none;}
.akfa-ui-v178 .sidebar-header{display:grid!important;grid-template-columns:1fr;gap:8px;justify-items:center;padding:4px 0 12px!important;}
.akfa-ui-v178 .brand{justify-content:center!important;min-width:0;width:48px;}
.akfa-ui-v178 .brand-mark{width:38px;height:38px;border-radius:14px;font-size:20px;}
.akfa-ui-v178 .brand-text,
.akfa-ui-v178 .nav-label,
.akfa-ui-v178 .nav-group-label,
.akfa-ui-v178 .sidebar-footer{display:none!important;}
.akfa-ui-v178 .sidebar-nav{display:flex!important;flex-direction:column;align-items:center;gap:8px;padding:0!important;}
.akfa-ui-v178 .nav-group{display:flex;flex-direction:column;gap:8px;align-items:center;width:100%;}
.akfa-ui-v178 .nav-item{width:48px;height:48px;min-height:48px;padding:0!important;display:grid!important;place-items:center;border-radius:14px!important;justify-content:center!important;overflow:hidden;}
.akfa-ui-v178 .nav-item .nav-icon{width:23px;height:23px;margin:0!important;display:grid;place-items:center;}
.akfa-ui-v178 .nav-item.active{background:#2f6feb!important;color:#fff!important;box-shadow:0 8px 18px rgba(47,111,235,.34);}
.akfa-ui-v178 .sidebar-menu-toggle{width:44px;height:44px;border:1px solid rgba(255,255,255,.12);border-radius:14px;background:rgba(255,255,255,.06);}
html.sidebar-expanded{--sidebar-w:280px!important;}
html.sidebar-expanded .akfa-ui-v178 .sidebar{width:280px!important;min-width:280px!important;max-width:280px!important;padding:14px!important;}
html.sidebar-expanded .akfa-ui-v178 .sidebar-header{grid-template-columns:auto 1fr;justify-items:start;}
html.sidebar-expanded .akfa-ui-v178 .brand{width:auto;justify-content:flex-start!important;}
html.sidebar-expanded .akfa-ui-v178 .brand-text,
html.sidebar-expanded .akfa-ui-v178 .nav-label,
html.sidebar-expanded .akfa-ui-v178 .nav-group-label,
html.sidebar-expanded .akfa-ui-v178 .sidebar-footer{display:block!important;}
html.sidebar-expanded .akfa-ui-v178 .nav-item{width:100%;height:auto;min-height:44px;padding:10px!important;display:flex!important;justify-content:flex-start!important;}
html.sidebar-expanded .akfa-ui-v178 .sidebar-nav{align-items:stretch;}

/* field and filter layout repair */
.akfa-ui-v178 :is(.operator-ui-page,.operator-page-v177,.operator-dashboard-v177) .compact-form-grid,
.akfa-ui-v178 :is(.operator-ui-page,.operator-page-v177,.operator-dashboard-v177) form.form-grid.compact-form-grid{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr))!important;
  gap:12px!important;
  align-items:end!important;
  padding:16px!important;
}
.akfa-ui-v178 .compact-form-grid>label,
.akfa-ui-v178 .compact-form-grid>.form-row,
.akfa-ui-v178 .compact-form-grid>.field{
  display:grid!important;gap:6px!important;min-height:66px;border:1px solid var(--op-line-soft);border-radius:13px;background:#fff;padding:10px 12px!important;font-weight:900;color:var(--op-muted);
}
.akfa-ui-v178 .compact-form-grid select,
.akfa-ui-v178 .compact-form-grid input:not([type="checkbox"]){border:0!important;background:transparent!important;padding:0!important;box-shadow:none!important;color:var(--op-text);font-weight:850;min-height:28px;}
.akfa-ui-v178 .compact-form-grid .checkbox-row{display:flex!important;align-items:center;gap:9px;min-height:66px;}
.akfa-ui-v178 .compact-form-grid .form-actions{align-self:end;display:flex;justify-content:flex-start;}
.akfa-ui-v178 .action-queue-page .mass-action-grid{grid-template-columns:repeat(auto-fit,minmax(260px,1fr));overflow-x:auto;padding:0 2px 2px;}
.akfa-ui-v178 .action-queue-page .mass-action-tile{min-width:0;}

/* production tabs and line cards: no floating overlay while scrolling */
.akfa-ui-v178 .production-shell .ops-tabs{
  position:relative!important;top:auto!important;left:auto!important;right:auto!important;z-index:1!important;
  margin:0!important;padding:10px!important;border:1px solid var(--op-line);border-radius:18px;background:#fff;box-shadow:var(--op-shadow);
  overflow-x:auto;overflow-y:hidden;white-space:nowrap;scrollbar-width:thin;
}
.akfa-ui-v178 .production-shell .ops-tabs .tab{flex:0 0 auto;border-radius:12px;min-height:42px;padding:10px 14px;}
.akfa-ui-v178 .production-shell .line-card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:14px;align-items:stretch;}
.akfa-ui-v178 .production-shell .production-line-card{min-height:132px;border-radius:16px;overflow:hidden;}

/* human-readable chips */
.akfa-ui-v178 .chip,.akfa-ui-v178 .pill,.akfa-ui-v178 .badge{letter-spacing:0!important;text-transform:none!important;}
.akfa-ui-v178 .lam-hero-meta .pill{white-space:normal;}

/* costing, inventory and database professional layouts */
.akfa-ui-v178 .costing-shell .exec-kpi-grid,
.akfa-ui-v178 .database-ops-page-v178 .exec-kpi-row,
.akfa-ui-v178 .inventory-page .exec-kpi-row{
  display:grid!important;grid-template-columns:repeat(auto-fit,minmax(220px,1fr))!important;gap:14px!important;margin:14px 0!important;
}
.akfa-ui-v178 .costing-shell .exec-kpi-card{
  min-height:108px;padding:16px 18px;border:1px solid var(--op-line);border-radius:16px;background:#fff;box-shadow:var(--op-shadow);display:grid;align-content:center;
}
.akfa-ui-v178 .costing-shell .exec-kpi-card .kpi-value{font-size:clamp(24px,1.5vw,34px);font-weight:950;color:#111827;letter-spacing:-.04em;}
.akfa-ui-v178 .costing-shell .tab-panels,.akfa-ui-v178 .inventory-page .tab-panels{margin-top:12px;}
.akfa-ui-v178 .costing-shell .ops-tabs,.akfa-ui-v178 .inventory-page .ops-tabs{position:relative!important;top:auto!important;background:#fff;border:1px solid var(--op-line);border-radius:16px;padding:8px;box-shadow:var(--op-shadow);}
.akfa-ui-v178 .kv-grid-v178{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px;}
.akfa-ui-v178 .kv-grid-v178>div{border:1px solid var(--op-line-soft);border-radius:14px;padding:12px;background:#f8fafc;display:grid;gap:5px;}
.akfa-ui-v178 .kv-grid-v178 span{font-size:12px;font-weight:900;color:var(--op-muted);}
.akfa-ui-v178 .kv-grid-v178 b{font-size:14px;color:var(--op-text);overflow-wrap:anywhere;}
.akfa-ui-v178 .database-actions-v178{display:flex!important;flex-wrap:wrap;align-content:center;justify-content:flex-end;gap:8px;}
.akfa-ui-v178 .database-actions-v178 form{margin:0;}
.akfa-ui-v178 .inventory-page .form-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px!important;padding:16px!important;}
.akfa-ui-v178 .inventory-page .field-full{grid-column:1/-1;}
.akfa-ui-v178 .inventory-page .field-actions{display:flex;justify-content:flex-start;}

/* materials receipt fields */
.akfa-ui-v178 .materials-dashboard-page .receipt-grid-v178,
.akfa-ui-v178 .materials-dashboard-page .form-grid{gap:12px;}
.akfa-ui-v178 .materials-dashboard-page .receipt-extra-field{min-width:0;}

/* tech map unified controls */
.akfa-ui-v178 .operator-tech-page-v177 .tech-form-card .grid{min-width:0;}
.akfa-ui-v178 .operator-tech-page-v177 select,
.akfa-ui-v178 .operator-tech-page-v177 input{max-width:100%;}
.akfa-ui-v178 .operator-tech-page-v177 .line-hub-table{min-width:1320px;}
.akfa-ui-v178 .operator-tech-page-v177 .line-window-input{width:100%;}
.akfa-ui-v178 .operator-tech-page-v177 .tech-line-hub .table-wrap{max-height:620px;}

/* professional line calendar */
.akfa-ui-v178 .line-calendar-page-v178{gap:14px;}
.akfa-ui-v178 .line-calendar-page-v178>.page-header{border:1px solid var(--op-line);border-radius:18px;background:#fff;box-shadow:var(--op-shadow);padding:18px 20px;}
.akfa-ui-v178 .line-calendar-page-v178 .filter-card{border-radius:18px;box-shadow:var(--op-shadow);}
.akfa-ui-v178 .line-calendar-page-v178 .plan-calendar-wrap{border:1px solid var(--op-line);border-radius:18px;box-shadow:var(--op-shadow);max-height:70vh;overflow:auto;background:#fff;}
.akfa-ui-v178 .line-calendar-page-v178 .plan-calendar{border-collapse:separate;border-spacing:0;min-width:1180px;}
.akfa-ui-v178 .line-calendar-page-v178 .plan-calendar thead th{position:sticky;top:0;z-index:4;background:#eef4ff;color:#111827;font-weight:950;border-bottom:1px solid #dfe7f5;}
.akfa-ui-v178 .line-calendar-page-v178 .plan-calendar .sticky-col{position:sticky;left:0;z-index:5;background:#f8fafc;box-shadow:4px 0 12px rgba(15,23,42,.04);}
.akfa-ui-v178 .line-calendar-page-v178 .plan-line-head{min-width:240px;}
.akfa-ui-v178 .line-calendar-page-v178 .plan-cell{min-height:92px;border-radius:10px;display:grid;align-content:center;justify-items:center;}
.akfa-ui-v178 .line-calendar-page-v178 .plan-cell.has-plan{background:#f0f7ff;border:1px solid #cfe2ff;justify-items:stretch;padding:6px;}
.akfa-ui-v178 .line-calendar-page-v178 .plan-chip{border-radius:12px;background:#fff;border:1px solid #dbeafe;box-shadow:0 2px 8px rgba(37,99,235,.08);padding:8px;}

@media(max-width:1100px){
  .akfa-ui-v178 .inventory-page .form-grid{grid-template-columns:1fr;}
  .akfa-ui-v178 .compact-form-grid .form-actions .btn{width:100%;}
}
/* v1.78.0 layout/design regression marker */

/* --------------------- v1.79.0 UI fixes + sales/HR/equipment professional polish --------------------- */
:root{ --sidebar-w-expanded:280px; --sidebar-w-collapsed:78px; }
.akfa-ui-v179 .sidebar{ width:var(--sidebar-w); flex:0 0 var(--sidebar-w); background:linear-gradient(180deg,#061527,#08203a); overflow-x:hidden; }
.akfa-ui-v179 .sidebar-nav{ gap:8px; }
.akfa-ui-v179 .nav-item{ height:auto; min-height:46px; padding:10px 12px; border-radius:14px; }
.akfa-ui-v179 .nav-label{ display:block; white-space:normal; line-height:1.15; overflow:visible; text-overflow:clip; }
.akfa-ui-v179 .nav-group-label{ padding:14px 12px 6px; letter-spacing:.08em; color:rgba(226,232,240,.62); }
html.sidebar-collapsed .akfa-ui-v179 .nav-label,
html.sidebar-collapsed .akfa-ui-v179 .brand-text,
html.sidebar-collapsed .akfa-ui-v179 .nav-group-label,
html.sidebar-collapsed .akfa-ui-v179 .sidebar-footer{ display:none !important; }
html.sidebar-collapsed .akfa-ui-v179 .sidebar{ padding-left:10px; padding-right:10px; }
html.sidebar-collapsed .akfa-ui-v179 .nav-item{ justify-content:center; padding:10px 8px; }
@media (max-width:1700px) and (min-width:981px){
  html:not(.sidebar-expanded) .akfa-ui-v179{ --sidebar-w:var(--sidebar-w-collapsed); }
  html:not(.sidebar-expanded) .akfa-ui-v179 .nav-label,
  html:not(.sidebar-expanded) .akfa-ui-v179 .brand-text,
  html:not(.sidebar-expanded) .akfa-ui-v179 .nav-group-label,
  html:not(.sidebar-expanded) .akfa-ui-v179 .sidebar-footer{ display:none !important; }
  html:not(.sidebar-expanded) .akfa-ui-v179 .sidebar{ padding-left:10px; padding-right:10px; }
  html:not(.sidebar-expanded) .akfa-ui-v179 .nav-item{ justify-content:center; padding:10px 8px; }
}

.akfa-ui-v179 .form-grid{ align-items:end; }
.akfa-ui-v179 .field, .akfa-ui-v179 .form-row{ min-width:0; }
.akfa-ui-v179 label.field span, .akfa-ui-v179 .field label, .akfa-ui-v179 .form-row label{ display:block; margin-bottom:6px; color:#64748b; font-size:12px; font-weight:900; }
.akfa-ui-v179 .input, .akfa-ui-v179 input, .akfa-ui-v179 select, .akfa-ui-v179 textarea{ box-sizing:border-box; max-width:100%; }
.akfa-ui-v179 .compact-filter-panel{ align-items:stretch; }
.akfa-ui-v179 .exec-filter-field{ min-width:160px; }
.akfa-ui-v179 .field-full{ grid-column:1/-1; }
.akfa-ui-v179 .field-span-2{ grid-column:span 2; }
.akfa-ui-v179 .field-span-3{ grid-column:span 3; }
@media (max-width:980px){ .akfa-ui-v179 .field-span-2,.akfa-ui-v179 .field-span-3{ grid-column:1/-1; } }

.sales-workflow-v179 .sales-order-item-grid-v179{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.sales-workflow-v179 .sales-order-item-v179{ background:#f8fafc; border:1px solid #dbe4f0; border-radius:22px; padding:16px; }
.sales-workflow-v179 .order-item-meta{ color:#64748b; line-height:1.45; }
.sales-workflow-v179 [hidden]{ display:none !important; }
@media(max-width:1180px){ .sales-workflow-v179 .sales-order-item-grid-v179{ grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:720px){ .sales-workflow-v179 .sales-order-item-grid-v179{ grid-template-columns:1fr; } }

.employees-pro-v179 .employees-grid{ grid-template-columns:minmax(360px,.9fr) minmax(520px,1.4fr); }
.employees-pro-v179 .employee-table-wrap{ max-height:620px; overflow:auto; }
@media(max-width:1180px){ .employees-pro-v179 .employees-grid{ grid-template-columns:1fr; } }

.equipment-pro-v179 .equipment-card-grid-v179{ display:grid; grid-template-columns:repeat(auto-fit,minmax(320px,1fr)); gap:16px; }
.equipment-pro-v179 .equipment-line-card-v179{ padding:18px; border-radius:22px; border:1px solid #dbe4f0; background:linear-gradient(180deg,#fff,#f8fbff); }
.equipment-pro-v179 .line-card-head{ display:flex; justify-content:space-between; gap:12px; align-items:flex-start; margin-bottom:12px; }
.equipment-pro-v179 .line-card-metrics{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.equipment-pro-v179 .line-card-metrics div{ padding:10px; border:1px solid #e6edf6; border-radius:14px; background:#fff; }
.equipment-pro-v179 .line-card-metrics span{ display:block; font-size:11px; color:#64748b; font-weight:900; }
.equipment-pro-v179 .equipment-resource-row{ display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }
.equipment-pro-v179 .equipment-resource-row span{ padding:7px 10px; border-radius:999px; background:#eef6ff; color:#1d4ed8; font-size:12px; font-weight:800; }

.recipe-hero-v179{ display:grid !important; grid-template-columns:minmax(280px,.55fr) minmax(520px,1.45fr); align-items:start; min-height:auto !important; }
.recipe-hero-v179 .exec-hero-title{ max-width:420px; }
.recipe-hero-v179 .exec-hero-title p{ max-width:360px; line-height:1.35; }
.recipe-hero-v179 .exec-filter-panel{ align-self:start; }
@media(max-width:1100px){ .recipe-hero-v179{ grid-template-columns:1fr; } }

.materials-hero-v179{ min-height:auto !important; }
.materials-hero-v179 .exec-filter-panel{ align-self:start; }
.materials-dashboard-page .operator-tabs, .materials-page .operator-tabs{ overflow-x:auto; }

.traceability-pro-v179 .traceability-tabs .card{ overflow:hidden; }
.traceability-pro-v179 .table-wrap{ max-height:680px; overflow:auto; }
.costing-shell .exec-kpi-grid, .costing-shell .exec-kpi-row{ display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:14px; }
.costing-shell .exec-kpi-card, .costing-shell .exec-kpi{ min-height:110px; }
.costing-shell .tab-panel .card{ margin-top:14px; }
.costing-shell .form-grid.compact-form{ display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:12px; align-items:end; }
.costing-shell .span-2{ grid-column:span 2; }
@media(max-width:720px){ .costing-shell .span-2{ grid-column:1/-1; } }

.sales-workflow-v179 .exec-hero, .employees-pro-v179 .exec-hero, .equipment-pro-v179 .exec-hero, .traceability-pro-v179 .exec-hero{ margin-bottom:16px; }
.akfa-ui-v179 .empty-state, .akfa-ui-v179 .empty-cell{ color:#64748b; font-weight:700; padding:18px; text-align:center; }

/* v1.80.0 — costing/inventory validation and import polish */
.cost-validation-board-v180,
.inventory-validation-v180,
.material-import-card-v180,
.employee-import-card-v180 {
  border: 1px solid rgba(37, 99, 235, 0.12);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}
.cost-validation-grid-v180 {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  padding: 0 14px 14px;
}
.mini-kpi-card {
  background: linear-gradient(180deg, #fff, #f8fafc);
  border: 1px solid #e5eaf3;
  border-radius: 16px;
  padding: 14px;
  min-height: 96px;
}
.mini-kpi-label { color: #64748b; font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.mini-kpi-value { margin-top: 6px; font-size: 28px; line-height: 1; font-weight: 900; color: #0f172a; }
.mini-kpi-sub { margin-top: 6px; color: #64748b; font-size: 13px; font-weight: 700; }
.mini-kpi-card.tone-red .mini-kpi-value { color: #ef4444; }
.mini-kpi-card.tone-orange .mini-kpi-value { color: #f97316; }
.mini-kpi-card.tone-green .mini-kpi-value { color: #16a34a; }
.mini-kpi-card.tone-blue .mini-kpi-value { color: #2563eb; }
.mini-kpi-card.tone-purple .mini-kpi-value { color: #7c3aed; }
.cost-validation-preview-v180,
.inventory-validation-strip-v180 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  padding: 0 14px 14px;
}
.exception-chip {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e5eaf3;
  color: #334155;
}
.exception-chip b { color: #0f172a; font-size: 14px; }
.exception-chip span { color: #475569; font-weight: 700; }
.exception-chip small { color: #64748b; }
.exception-chip.danger { background: #fff1f2; border-color: #fecdd3; }
.exception-chip.warn { background: #fff7ed; border-color: #fed7aa; }
.exception-chip.info { background: #eff6ff; border-color: #bfdbfe; }
.exception-chip.ok { background: #f0fdf4; border-color: #bbf7d0; }
.cost-validation-details-v180 .table-wrap { max-height: 560px; overflow: auto; }
.inventory-validation-v180 { margin: 14px 0; }
.employee-import-card-v180 .compact-form,
.material-import-card-v180 .compact-form {
  grid-template-columns: 1fr auto;
  align-items: end;
  padding: 14px;
}
@media (max-width: 1200px){
  .cost-validation-grid-v180 { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
}
@media (max-width: 720px){
  .cost-validation-grid-v180,
  .employee-import-card-v180 .compact-form,
  .material-import-card-v180 .compact-form { grid-template-columns: 1fr; }
}

/* v1.81.0 — Enterprise CMMS / ERP / HR / drag-and-drop polish */
.enterprise-v181-marker{display:none}
.hr-enterprise-v181 .operator-decision-strip-v177,
.equipment-cmms-v181 .operator-decision-strip-v177,
.erp-finance-v181 .operator-decision-strip-v177{grid-template-columns:repeat(4,minmax(0,1fr));}
.hr-work-grid-v181,.equipment-cmms-v181 .operator-work-grid,.erp-finance-v181 .operator-work-grid{grid-template-columns:minmax(360px,.9fr) minmax(560px,1.4fr);align-items:start;}
.hr-enterprise-v181 .form-grid-3,.equipment-cmms-v181 .form-grid-3,.erp-finance-v181 .form-grid-3{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;}
.hr-enterprise-v181 .field-span-2,.equipment-cmms-v181 .field-span-2,.erp-finance-v181 .field-span-2{grid-column:span 2;}
.hr-enterprise-v181 .field-span-3,.equipment-cmms-v181 .field-span-3,.erp-finance-v181 .field-span-3{grid-column:1/-1;}
.hr-enterprise-v181 .field-actions,.equipment-cmms-v181 .field-actions,.erp-finance-v181 .field-actions{display:flex;justify-content:flex-end;gap:10px;}
.hr-enterprise-v181 .exec-hero,.equipment-cmms-v181 .exec-hero,.erp-finance-v181 .exec-hero{background:linear-gradient(135deg,#fff 0%,#f8fbff 60%,#eef5ff 100%);}
.equipment-card-grid-v181{display:grid;grid-template-columns:repeat(auto-fill,minmax(360px,1fr));gap:16px;}
.equipment-line-card-v181{border:1px solid #dfe7f3;border-radius:18px;padding:18px;background:linear-gradient(180deg,#fff,#fbfdff);box-shadow:0 14px 40px rgba(15,23,42,.06)}
.equipment-line-card-v181 .line-card-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:12px}
.equipment-line-card-v181 .line-card-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:12px 0}
.equipment-line-card-v181 .line-card-metrics div{background:#f5f8fc;border:1px solid #e5edf7;border-radius:14px;padding:10px}
.equipment-line-card-v181 .line-card-metrics span{display:block;color:#64748b;font-size:12px;font-weight:800}.equipment-line-card-v181 .line-card-metrics b{font-size:18px;color:#0f172a}
.equipment-resource-row{display:flex;flex-wrap:wrap;gap:8px;color:#64748b;font-size:13px}.spare-mini-list{display:flex;flex-wrap:wrap;gap:6px}
.erp-flow-v181{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:18px}.erp-flow-v181>div{border:1px solid #e2e8f0;border-radius:16px;padding:16px;background:#fff}.erp-flow-v181 b{display:block;margin-bottom:6px}.erp-flow-v181 span{color:#64748b;font-weight:600}
.schedule-operation-card[draggable="true"]{cursor:grab}.schedule-operation-card.is-dragging{opacity:.55;transform:scale(.99)}.schedule-lane-card.dnd-over{outline:3px solid rgba(37,99,235,.35);outline-offset:4px;background:linear-gradient(180deg,#eff6ff,#fff)}
.schedule-dnd-preview-v181{border:1px solid #bfdbfe;background:linear-gradient(135deg,#fff,#eff6ff);}.schedule-dnd-preview-v181.ok{border-color:#86efac;background:linear-gradient(135deg,#fff,#f0fdf4)}.schedule-dnd-preview-v181.warn{border-color:#fbbf24;background:linear-gradient(135deg,#fff,#fffbeb)}
.schedule-preview-grid .span-2{grid-column:span 2;}
.badge.err,.badge.danger{background:#fee2e2;color:#991b1b}.badge.muted{background:#f1f5f9;color:#475569}.badge.orange,.badge.warn{background:#ffedd5;color:#9a3412}.badge.purple{background:#ede9fe;color:#5b21b6}
@media (max-width:1100px){.hr-enterprise-v181 .operator-decision-strip-v177,.equipment-cmms-v181 .operator-decision-strip-v177,.erp-finance-v181 .operator-decision-strip-v177{grid-template-columns:repeat(2,minmax(0,1fr));}.hr-work-grid-v181,.equipment-cmms-v181 .operator-work-grid,.erp-finance-v181 .operator-work-grid{grid-template-columns:1fr}.hr-enterprise-v181 .form-grid-3,.equipment-cmms-v181 .form-grid-3,.erp-finance-v181 .form-grid-3{grid-template-columns:1fr}.hr-enterprise-v181 .field-span-2,.equipment-cmms-v181 .field-span-2,.erp-finance-v181 .field-span-2,.hr-enterprise-v181 .field-span-3,.equipment-cmms-v181 .field-span-3,.erp-finance-v181 .field-span-3{grid-column:auto}.erp-flow-v181{grid-template-columns:1fr}.equipment-line-card-v181 .line-card-metrics{grid-template-columns:repeat(2,minmax(0,1fr));}}

/* v1.82.0 — lamination lines, suppliers, sales cleanup, today plan and layout fixes */
.akfa-ui-v182 .sidebar{z-index:30;}
.akfa-ui-v182 .sidebar-nav{padding-bottom:24px;}
.akfa-ui-v182 .tabs.sticky, .akfa-ui-v182 .operator-tabs.sticky, .akfa-ui-v182 .tabs.is-sticky{top:12px;}
.akfa-ui-v182 .production-area-page .tabs,
.akfa-ui-v182 .pvc-production-page .tabs,
.akfa-ui-v182 .lamination-production-page .tabs{position:relative;z-index:2;margin:12px 0 18px;overflow-x:auto;white-space:nowrap;box-shadow:0 14px 35px rgba(15,23,42,.06);}
.akfa-ui-v182 .production-area-page .line-card-grid,
.akfa-ui-v182 .pvc-production-page .line-card-grid{padding-top:6px;}

.equipment-v182 .equipment-card-grid-v181{grid-template-columns:repeat(auto-fill,minmax(330px,1fr));align-items:stretch;}
.equipment-v182 .equipment-line-card-v181{min-height:260px;display:flex;flex-direction:column;gap:10px;overflow:hidden;}
.equipment-v182 .equipment-line-card-v181 .line-card-metrics{grid-template-columns:repeat(4,minmax(0,1fr));}
.equipment-v182 .equipment-line-card-v181 .line-card-metrics div{min-width:0;word-break:break-word;}
.equipment-v182 .equipment-line-card-v181 .line-card-metrics b{font-size:16px;line-height:1.15;}
.equipment-v182 .operator-tabs{position:sticky;top:10px;z-index:5;margin-bottom:18px;background:#fff;}
.equipment-v182 .exec-hero{min-height:auto;}
.equipment-lamination-page .exec-hero{background:linear-gradient(135deg,#fff 0%,#f8f5ff 62%,#eef2ff 100%);}
@media(max-width:1500px){.equipment-v182 .equipment-line-card-v181 .line-card-metrics{grid-template-columns:repeat(2,minmax(0,1fr));}}

.materials-dashboard-page .tab-panel[data-panel="materials"] .ops-two-col-grid{grid-template-columns:minmax(520px,1fr) minmax(460px,.9fr);align-items:start;}
.materials-dashboard-page .tab-panel[data-panel="suppliers"] .ops-two-col-grid,
.materials-dashboard-page .tab-panel[data-panel="receipts"] .ops-two-col-grid{grid-template-columns:minmax(520px,1fr) minmax(520px,1fr);align-items:start;}
.materials-dashboard-page .form-grid-3{grid-template-columns:repeat(3,minmax(0,1fr));}
.materials-dashboard-page input[type="file"].input{padding:12px;background:#f8fafc;}
.materials-dashboard-page .supplier-area-chip{display:inline-flex;align-items:center;border-radius:999px;background:#eff6ff;color:#1d4ed8;padding:4px 9px;font-weight:800;font-size:12px;}
@media(max-width:1180px){.materials-dashboard-page .tab-panel[data-panel="materials"] .ops-two-col-grid,.materials-dashboard-page .tab-panel[data-panel="suppliers"] .ops-two-col-grid,.materials-dashboard-page .tab-panel[data-panel="receipts"] .ops-two-col-grid{grid-template-columns:1fr}.materials-dashboard-page .form-grid-3{grid-template-columns:1fr}.materials-dashboard-page .field-span-2,.materials-dashboard-page .field-span-3{grid-column:1/-1}}

.sales-workflow-v179 .sales-order-item-v179{padding:18px 18px 14px;}
.sales-workflow-v179 .sales-order-item-grid-v179{grid-template-columns:repeat(4,minmax(0,1fr));align-items:end;}
.sales-workflow-v179 select[name="market_type"]{font-weight:900;}
.sales-workflow-v179 input[type="date"]{min-width:0;}
.sales-workflow-v179 .order-item-meta{font-size:13px;}

.today-production-plan-page .today-priority-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px;margin:14px 0;}
.today-production-plan-page .today-plan-card{border:1px solid #dbe4f0;border-radius:18px;background:#fff;padding:16px;box-shadow:0 12px 30px rgba(15,23,42,.05);}
.today-production-plan-page .today-plan-card b{font-size:28px;color:#0f172a;display:block;}
.today-production-plan-page .today-plan-card span{color:#64748b;font-weight:800;}
.today-production-plan-page .priority-export{background:#eff6ff}.today-production-plan-page .priority-local{background:#f0fdf4}.today-production-plan-page .priority-fg{background:#fff7ed}
.today-production-plan-page .table-wrap{max-height:620px;overflow:auto;}

.operator-tech-page-v177 .mix-field,.operator-tech-page-v177 [data-tech-mix-block],.operator-tech-page-v177 .qc-hold-field{display:none!important;}
.recipe-hero-v179{min-height:auto!important;}
.recipe-hero-v179 .exec-filter-panel{margin-top:0;}

.wms-shell .tab-panel[data-panel="movement"] .ops-two-col-grid{grid-template-columns:minmax(480px,1fr) minmax(520px,1fr);}
.wms-shell .tab-panel[data-panel="stock"] .card-header .card-subtitle:after{content:' Нормы остатков формируют задания на пополнение ГП в сегодняшнем плане.';}
@media(max-width:1100px){.wms-shell .tab-panel[data-panel="movement"] .ops-two-col-grid{grid-template-columns:1fr}}

/* v1.82.0 regression marker */

/* v1.83.0 scheduler, supplier documents and validation polish */
.akfa-ui-v183 .supplier-docs-grid-v183,
.supplier-docs-grid-v183{align-items:start;}
.supplier-doc-upload-card-v183 .form-grid,
.supplier-doc-ledger-card-v183 .table-wrap{min-width:0;}
.today-scheduler-card-v183{margin:14px 0;border:1px solid #dbeafe;background:linear-gradient(135deg,#fff,#f8fbff);}
.today-scheduler-card-v183 .card-header{gap:14px;align-items:center;}
.scheduler-actions-v183{display:flex;gap:10px;flex-wrap:wrap;align-items:center;}
.scheduler-runs-table-v183 td,.scheduler-runs-table-v183 th{white-space:nowrap;}
.validation-status-card-v183{min-width:240px;align-items:flex-start;}
.validation-status-card-v183 .big-number{font-size:46px;line-height:1;font-weight:950;letter-spacing:-.04em;}
.text-success{color:#16a34a!important}.text-danger{color:#dc2626!important}
.tech-validation-shell-v183 .validation-table-v183 td,
.enterprise-validation-shell-v183 .validation-table-v183 td{vertical-align:top;}
.tech-validation-shell-v183 .page-section,
.enterprise-validation-shell-v183 .page-section{margin-top:14px;}
.materials-v183 .supplier-doc-ledger-card-v183 .btn-sm{white-space:nowrap;}
@media(max-width:900px){.today-scheduler-card-v183 .card-header{display:block}.scheduler-actions-v183{display:grid}.validation-status-card-v183{min-width:0}}

/* v1.85.0 leadership/dashboard refinements */
.plant-dashboard-v185,.executive-portal-v185{display:flex;flex-direction:column;gap:16px}.plant-hero-v185{display:flex;justify-content:space-between;align-items:center;gap:24px;padding:28px}.plant-hero-v185 h1{font-size:34px;margin:8px 0 8px}.plant-hero-score{text-align:right;min-width:220px}.plant-hero-score .score{font-size:48px;font-weight:950;color:#16a34a;letter-spacing:-1px}.plant-kpi-ribbon-v185 .kpi{min-height:118px}.dashboard-grid-primary-v185{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(320px,.7fr);gap:16px}.risk-list-v185{display:flex;flex-direction:column;gap:10px}.risk-row-v185{display:grid;grid-template-columns:34px 1fr auto;align-items:center;gap:12px;padding:14px;border:1px solid var(--border);border-radius:16px;text-decoration:none;color:var(--text);background:#fff}.risk-row-v185.ok span{color:#16a34a}.risk-row-v185.warn span{color:#f59e0b}.risk-row-v185.err span{color:#ef4444}.exec-link-card-v185{display:flex;flex-direction:column;gap:8px;padding:20px;text-decoration:none;color:var(--text)}.exec-link-card-v185 b{font-size:20px}.exec-link-card-v185 span{color:var(--muted)}.executive-dash-grid-v185{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.no-sidebar-page-v185 .sidebar{display:none}.no-sidebar-page-v185 .app-shell{grid-template-columns:1fr}.no-sidebar-page-v185 .main{margin-left:0}.no-sidebar-page-v185 .topbar{display:none}.no-sidebar-page-v185 #content{padding-top:22px}.material-recipes-page .sidebar,.material-recipes-page .topbar{display:inherit}.recipe-private-note-v185{border:1px solid var(--border);border-radius:16px;background:#f8fafc;padding:14px;margin-bottom:14px}.price-triple-v185{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}@media(max-width:1200px){.dashboard-grid-primary-v185,.executive-dash-grid-v185{grid-template-columns:1fr}.plant-hero-v185{flex-direction:column;align-items:flex-start}.plant-hero-score{text-align:left}}

/* v1.86.0 — Unified BI dashboard suite */
.grid-5{grid-template-columns:repeat(5,minmax(0,1fr));}.grid-6{grid-template-columns:repeat(6,minmax(0,1fr));}
@media(max-width:1400px){.grid-6{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media(max-width:900px){.grid-5,.grid-6{grid-template-columns:1fr;}}
.akfa-ui-v186 .content{max-width:none;}
.akfa-ui-v186 .plant-dashboard-page-v185 .content,.akfa-ui-v186 .executive-portal-page-v185 .content{padding:18px 22px 38px;background:linear-gradient(180deg,#f7f9ff 0%,#eef3fb 100%);} 
.ops-dashboard-v186,.exec-portal-v186{display:flex;flex-direction:column;gap:16px;color:#0f172a;}
.ops-hero-v186,.exec-top-v186{border:1px solid rgba(148,163,184,.22);border-radius:24px;background:linear-gradient(135deg,#ffffff 0%,#f7fbff 55%,#eef6ff 100%);box-shadow:0 18px 50px rgba(15,23,42,.08);padding:22px 24px;display:flex;align-items:center;justify-content:space-between;gap:22px;}
.ops-hero-copy-v186 h1,.exec-top-v186 h1{font-size:32px;line-height:1.06;margin:6px 0 8px;letter-spacing:-.04em;color:#0b1220;}
.ops-hero-copy-v186 p,.exec-top-v186 p{max-width:880px;margin:0;color:#475569;font-size:15px;line-height:1.5;}
.ops-meta-v186,.exec-top-actions-v186{display:flex;flex-wrap:wrap;gap:8px;margin-top:13px;align-items:center;}
.ops-hero-score-v186{min-width:265px;border-radius:22px;background:linear-gradient(145deg,#0b1220,#172554);color:#fff;padding:18px 20px;box-shadow:0 18px 42px rgba(37,99,235,.22);}
.ops-hero-score-v186 span{display:block;color:#bfdbfe;font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;}.ops-hero-score-v186 strong{display:block;font-size:46px;line-height:1;margin:8px 0 10px;letter-spacing:-.05em}.ops-hero-score-v186 a{display:inline-flex;margin-top:10px;color:#bfdbfe;font-weight:800;font-size:13px;}
.ops-progress-v186{height:9px;border-radius:999px;background:rgba(148,163,184,.26);overflow:hidden;}.ops-progress-v186 i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#2563eb,#22c55e);}.ops-progress-v186.green i{background:linear-gradient(90deg,#10b981,#84cc16);}
.ops-section-tabs-v186{display:flex;gap:10px;align-items:center;position:sticky;top:0;z-index:4;background:rgba(247,249,255,.82);backdrop-filter:blur(10px);border:1px solid rgba(148,163,184,.20);border-radius:20px;padding:8px;box-shadow:0 10px 28px rgba(15,23,42,.06);overflow-x:auto;}
.ops-section-tabs-v186 a{white-space:nowrap;border-radius:14px;padding:10px 14px;color:#475569;font-weight:900;}.ops-section-tabs-v186 a:hover,.ops-section-tabs-v186 a:focus{background:#eaf2ff;color:#1d4ed8;}
.ops-kpi-row-v186{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:14px;}
.ops-kpi-card-v186{min-height:132px;border:1px solid rgba(148,163,184,.22);border-radius:20px;background:#fff;box-shadow:0 12px 34px rgba(15,23,42,.06);padding:16px;display:grid;grid-template-columns:auto 1fr;gap:12px;position:relative;overflow:hidden;}
.ops-kpi-card-v186:after{content:"";position:absolute;inset:auto -30px -50px auto;width:120px;height:120px;border-radius:50%;background:rgba(37,99,235,.07);}.ops-kpi-icon-v186{width:38px;height:38px;border-radius:14px;background:linear-gradient(135deg,#dbeafe,#eff6ff);border:1px solid rgba(37,99,235,.15);}.tone-green .ops-kpi-icon-v186{background:linear-gradient(135deg,#dcfce7,#f0fdf4);}.tone-red .ops-kpi-icon-v186{background:linear-gradient(135deg,#fee2e2,#fff7ed);}.tone-violet .ops-kpi-icon-v186{background:linear-gradient(135deg,#ede9fe,#faf5ff);}.tone-orange .ops-kpi-icon-v186{background:linear-gradient(135deg,#ffedd5,#fff7ed);}
.ops-kpi-text-v186 span{display:block;font-size:12px;color:#64748b;font-weight:900;}.ops-kpi-text-v186 strong{display:block;margin-top:6px;font-size:25px;line-height:1;letter-spacing:-.04em;color:#0f172a;}.ops-kpi-text-v186 small{display:block;margin-top:7px;color:#64748b;font-weight:700;}
.ops-mini-progress-v186{grid-column:1/-1;height:8px;border-radius:999px;background:#e2e8f0;overflow:hidden;align-self:end;}.ops-mini-progress-v186 i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#2563eb,#22c55e);}.tone-red .ops-mini-progress-v186 i{background:#ef4444}.tone-violet .ops-mini-progress-v186 i{background:#8b5cf6}.tone-orange .ops-mini-progress-v186 i{background:#f97316}
.ops-spark-v186{grid-column:1/-1;height:34px;display:flex;gap:5px;align-items:flex-end;}.ops-spark-v186 i{display:block;width:100%;min-height:4px;border-radius:6px;background:linear-gradient(180deg,#60a5fa,#2563eb);opacity:.9}.tone-green .ops-spark-v186 i{background:linear-gradient(180deg,#86efac,#22c55e)}.tone-orange .ops-spark-v186 i{background:linear-gradient(180deg,#fdba74,#f97316)}
.ops-grid-main-v186{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(330px,.7fr) minmax(310px,.62fr);gap:16px;align-items:stretch;}.ops-card-v186{border:1px solid rgba(148,163,184,.22);border-radius:22px;background:#fff;box-shadow:0 12px 34px rgba(15,23,42,.06);padding:16px;}.ops-card-head-v186{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:12px;}.ops-card-head-v186 h2,.ops-card-v186 h2{font-size:17px;letter-spacing:-.02em;margin:0;color:#0f172a;}.ops-card-head-v186 p{margin:4px 0 0;color:#64748b;font-size:12px;font-weight:700;}.ops-chip-v186{border:1px solid #bfdbfe;background:#eff6ff;color:#2563eb;border-radius:999px;padding:7px 10px;font-weight:900;font-size:12px;}
.ops-line-chart-v186{height:314px;position:relative;border-radius:18px;background:linear-gradient(180deg,#ffffff,#f8fbff);border:1px solid #eef2f7;padding:12px;overflow:hidden;}.ops-line-chart-v186.compact{height:260px}.ops-line-chart-v186 svg{position:absolute;inset:18px 12px 44px 12px;width:calc(100% - 24px);height:calc(100% - 62px);}.ops-line-chart-v186 .grid-lines line{stroke:#e2e8f0;stroke-width:1}.ops-line-chart-v186 polyline{fill:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;}.ops-line-chart-v186 .plan{stroke:#2563eb}.ops-line-chart-v186 .actual{stroke:#22c55e}.ops-line-chart-v186 .forecast{stroke:#2563eb;stroke-dasharray:7 7;opacity:.45}.ops-chart-legend-v186{position:absolute;left:18px;bottom:12px;display:flex;gap:14px;font-size:12px;font-weight:900;color:#64748b}.ops-chart-legend-v186 span:before{content:"";display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:6px;background:#2563eb}.ops-chart-legend-v186 .green:before{background:#22c55e}.ops-chart-legend-v186 .dash:before{border-radius:2px;background:#93c5fd}.ops-chart-tooltip-v186{position:absolute;right:32px;top:86px;border:1px solid rgba(148,163,184,.25);background:rgba(255,255,255,.92);backdrop-filter:blur(10px);box-shadow:0 16px 38px rgba(15,23,42,.10);border-radius:16px;padding:12px 14px;display:flex;flex-direction:column;gap:4px;font-size:12px;color:#475569}.ops-chart-tooltip-v186 b{color:#0f172a;font-size:13px;}
.ops-bar-list-v186{display:flex;flex-direction:column;gap:10px}.ops-bar-list-v186.mini{gap:8px}.ops-bar-row-v186{display:grid;grid-template-columns:88px 1fr 74px;align-items:center;gap:10px;font-size:12px;font-weight:800;color:#334155}.ops-bar-row-v186 div{height:13px;background:#eff3f9;border-radius:999px;overflow:hidden}.ops-bar-row-v186 i{display:block;height:100%;background:linear-gradient(90deg,#60a5fa,#2563eb);border-radius:inherit}.ops-bar-row-v186 strong{text-align:right;color:#0f172a}
.ops-insights-v186{display:flex;flex-direction:column;gap:10px}.ops-alert-v186{display:grid;grid-template-columns:32px 1fr auto;gap:10px;align-items:center;padding:12px;border-radius:16px;border:1px solid rgba(148,163,184,.18);background:#f8fafc;color:#0f172a}.ops-alert-v186 b{display:grid;place-items:center;width:32px;height:32px;border-radius:12px;background:#e0edff;color:#2563eb}.ops-alert-v186 strong{display:block;font-size:13px}.ops-alert-v186 small{display:block;color:#64748b;font-size:12px;margin-top:2px}.ops-alert-v186 em{font-style:normal;font-weight:950}.ops-alert-v186.tone-err{background:#fff1f2;border-color:#fecdd3}.ops-alert-v186.tone-err b{background:#fee2e2;color:#dc2626}.ops-alert-v186.tone-warn{background:#fff7ed;border-color:#fed7aa}.ops-alert-v186.tone-warn b{background:#ffedd5;color:#ea580c}.ops-alert-v186.tone-ok{background:#f0fdf4;border-color:#bbf7d0}.ops-alert-v186.tone-ok b{background:#dcfce7;color:#16a34a}.ops-goal-v186{margin-top:4px;border-top:1px solid #eef2f7;padding-top:12px}.ops-goal-v186 div:first-child{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;color:#64748b;font-size:12px;font-weight:900}.ops-goal-v186 strong{font-size:16px;color:#0f172a}
.ops-grid-secondary-v186{display:grid;grid-template-columns:1fr 1fr 1fr;gap:16px}.ops-day-bars-v186,.ops-scrap-trend-v186{height:170px;display:flex;align-items:flex-end;gap:10px;padding-top:20px}.ops-day-bars-v186>div,.ops-scrap-trend-v186>div{flex:1;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:100%;gap:6px}.ops-day-bars-v186 i{display:block;width:70%;min-height:4px;border-radius:10px 10px 3px 3px;background:linear-gradient(180deg,#60a5fa,#2563eb)}.ops-scrap-trend-v186 i{display:block;width:70%;min-height:4px;border-radius:10px;background:linear-gradient(180deg,#86efac,#22c55e)}.ops-day-bars-v186 span,.ops-scrap-trend-v186 span{font-size:11px;color:#64748b;font-weight:800}.ops-day-bars-v186 b,.ops-scrap-trend-v186 b{font-size:11px;color:#0f172a}.ops-day-bars-v186 .active span{background:#2563eb;color:#fff;border-radius:999px;padding:3px 7px}
.ops-mix-v186{display:flex;flex-direction:column;gap:13px}.ops-mix-v186>div{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:center}.ops-mix-v186 span{color:#475569;font-size:13px;font-weight:900}.ops-mix-v186 strong{font-size:13px}.ops-mix-v186 i{grid-column:1/-1;height:11px;border-radius:999px;background:#2563eb}.ops-mix-v186 .tone-violet{background:#8b5cf6}.ops-mix-v186 .tone-orange{background:#f97316}.ops-mix-v186 .tone-blue{background:#2563eb}.ops-mix-v186 .tone-red{background:#ef4444}
.ops-grid-wide-v186{display:grid;grid-template-columns:minmax(0,1.42fr) minmax(320px,.58fr);gap:16px}.ops-today-card-v186{padding-bottom:12px}.ops-table-v186 td,.ops-table-v186 th{vertical-align:middle}.ops-dot-v186{display:inline-block;width:10px;height:10px;border-radius:50%;background:#f59e0b;margin-right:8px}.ops-dot-v186.tone-ok{background:#22c55e}.ops-dot-v186.tone-muted{background:#94a3b8}.ops-inline-progress-v186{height:8px;border-radius:999px;background:#e2e8f0;overflow:hidden;min-width:130px}.ops-inline-progress-v186 i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#22c55e,#16a34a)}.ops-side-stack-v186{display:flex;flex-direction:column;gap:16px}.ops-stat-list-v186{display:flex;flex-direction:column;gap:10px;margin:12px 0}.ops-stat-list-v186>div{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;border:1px solid #edf2f7;border-radius:14px;background:#f8fafc}.ops-stat-list-v186 span{color:#64748b;font-size:12px;font-weight:900}.ops-stat-list-v186 b{font-size:17px;color:#0f172a}
.exec-portal-page-v185.no-sidebar-page-v185 .sidebar{display:none}.exec-portal-page-v185.no-sidebar-page-v185 .app-shell{display:block}.exec-portal-page-v185.no-sidebar-page-v185 .main{margin-left:0}.exec-portal-page-v185.no-sidebar-page-v185 .topbar{display:none}.exec-portal-v186{max-width:1580px;margin:0 auto}.exec-top-v186 h1{font-size:40px}.exec-top-actions-v186{margin-top:0;justify-content:flex-end}.exec-tabs-v186{position:relative;top:auto;background:#fff}.exec-scoreboard-v186{display:grid;grid-template-columns:1.6fr repeat(4,1fr);gap:14px}.exec-scoreboard-v186>div{border:1px solid rgba(148,163,184,.22);border-radius:22px;background:#fff;box-shadow:0 12px 34px rgba(15,23,42,.06);padding:18px}.exec-scoreboard-v186 span{font-size:12px;color:#64748b;font-weight:900;text-transform:uppercase;letter-spacing:.06em}.exec-scoreboard-v186 strong{display:block;font-size:30px;letter-spacing:-.04em;margin-top:8px}.exec-scoreboard-v186 small{display:block;margin-top:7px;color:#64748b;font-weight:700}.exec-score-main-v186{background:linear-gradient(135deg,#0b1220,#1d4ed8)!important;color:#fff!important}.exec-score-main-v186 span,.exec-score-main-v186 small{color:#bfdbfe!important}.exec-score-main-v186 strong{font-size:48px}.exec-grid-v186{display:grid;grid-template-columns:1.4fr repeat(2,minmax(260px,.6fr));gap:16px}.exec-chart-span-v186{grid-row:span 2}.exec-risk-grid-v186{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
@media(max-width:1500px){.ops-kpi-row-v186{grid-template-columns:repeat(3,minmax(0,1fr));}.ops-grid-main-v186{grid-template-columns:1fr 1fr}.ops-insights-v186{grid-column:1/-1}.exec-grid-v186{grid-template-columns:1fr 1fr}.exec-chart-span-v186{grid-column:1/-1;grid-row:auto}.exec-scoreboard-v186{grid-template-columns:1fr 1fr 1fr}.exec-score-main-v186{grid-column:1/-1}}
@media(max-width:1050px){.ops-hero-v186,.exec-top-v186{flex-direction:column;align-items:flex-start}.ops-hero-score-v186{width:100%;}.ops-kpi-row-v186,.ops-grid-main-v186,.ops-grid-secondary-v186,.ops-grid-wide-v186,.exec-grid-v186,.exec-risk-grid-v186,.exec-scoreboard-v186{grid-template-columns:1fr}.ops-bar-row-v186{grid-template-columns:78px 1fr 65px}.ops-chart-tooltip-v186{position:static;margin-top:210px}.ops-line-chart-v186{height:360px}.ops-section-tabs-v186{position:relative;}.exec-top-actions-v186{justify-content:flex-start}.ops-dashboard-v186,.exec-portal-v186{gap:12px}}


/* v1.87.0 — technology map layout and raw warehouse import UX */
.technology-map-v187 .tech-actions-v187{display:flex;gap:10px;align-items:center;flex-wrap:wrap;justify-content:flex-end;}
.technology-map-v187 .tech-actions-v187 .input{min-width:280px;max-width:420px;}
.technology-map-v187 .tech-layout-v187{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;align-items:start;}
.technology-map-v187 .tech-form-card{width:100%;max-width:none;overflow:hidden;}
.technology-map-v187 .tech-form-card .card-body{padding:18px 20px 22px;}
.technology-map-v187 .tech-section-title{margin:18px 0 12px;font-size:13px;letter-spacing:.08em;text-transform:uppercase;color:#64748b;font-weight:950;}
.technology-map-v187 .tech-form-grid-v187{display:grid;gap:13px;align-items:start;}
.technology-map-v187 .tech-product-grid-v187{grid-template-columns:repeat(4,minmax(190px,1fr));}
.technology-map-v187 .tech-accessory-grid-v187{grid-template-columns:repeat(3,minmax(210px,1fr));}
.technology-map-v187 .form-row{min-width:0;margin:0;}
.technology-map-v187 .form-row label{display:block;margin:0 0 6px;color:#64748b;font-size:13px;font-weight:900;}
.technology-map-v187 .form-row input,.technology-map-v187 .form-row select,.technology-map-v187 .form-row textarea{width:100%;height:46px;min-height:46px;border-radius:14px;font-size:15px;padding:10px 12px;box-sizing:border-box;}
.technology-map-v187 .form-row textarea{height:auto;min-height:88px;}
.technology-map-v187 .form-row .help{margin-top:6px;font-size:12px;line-height:1.35;color:#64748b;}
.technology-map-v187 .field-full{grid-column:1/-1;}
.technology-map-v187 .compact-alert{padding:10px 12px;border-radius:14px;font-size:13px;}
@media(max-width:1500px){.technology-map-v187 .tech-product-grid-v187{grid-template-columns:repeat(3,minmax(190px,1fr));}.technology-map-v187 .tech-accessory-grid-v187{grid-template-columns:repeat(2,minmax(210px,1fr));}}
@media(max-width:980px){.technology-map-v187 .tech-product-grid-v187,.technology-map-v187 .tech-accessory-grid-v187{grid-template-columns:1fr}.technology-map-v187 .tech-actions-v187{justify-content:flex-start}.technology-map-v187 .tech-actions-v187 .input{max-width:none;width:100%;}}
.materials-v187 .material-import-card-v187{border:1px solid rgba(37,99,235,.18);background:linear-gradient(135deg,#ffffff,#f8fbff);box-shadow:0 14px 36px rgba(15,23,42,.06);}
.materials-v187 .raw-import-body-v187{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(320px,.85fr);gap:16px;align-items:start;}
.materials-v187 .raw-import-form-v187{display:grid;grid-template-columns:1fr 220px 260px auto;gap:12px;align-items:end;}
.materials-v187 .raw-import-form-v187 .field{display:flex;flex-direction:column;gap:6px;margin:0;}
.materials-v187 .raw-import-form-v187 .field span{font-size:12px;font-weight:950;color:#64748b;text-transform:uppercase;letter-spacing:.04em;}
.materials-v187 .raw-import-actions-v187{display:flex;align-items:end;}
.materials-v187 .raw-import-hints-v187{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
.materials-v187 .raw-import-hints-v187 div{border:1px solid #dbeafe;background:#eff6ff;border-radius:14px;padding:12px;}
.materials-v187 .raw-import-hints-v187 b{display:block;color:#1d4ed8;font-size:13px;margin-bottom:4px;}
.materials-v187 .raw-import-hints-v187 span{display:block;color:#475569;font-size:12px;line-height:1.35;font-weight:700;}
@media(max-width:1300px){.materials-v187 .raw-import-body-v187,.materials-v187 .raw-import-form-v187{grid-template-columns:1fr}.materials-v187 .raw-import-hints-v187{grid-template-columns:1fr}}

/* v1.87.0 — technology map layout + safe raw warehouse import */
.akfa-ui-v187 .operator-tech-page-v177 .tech-layout{
  display:grid;
  grid-template-columns:minmax(620px,1.1fr) minmax(420px,.9fr);
  gap:18px;
  align-items:start;
}
.akfa-ui-v187 .operator-tech-page-v177 .tech-form-card{overflow:hidden;}
.akfa-ui-v187 .operator-tech-page-v177 .tech-form-card .card-body{padding:18px 20px 22px;}
.akfa-ui-v187 .operator-tech-page-v177 .tech-section-title{
  margin:22px 0 12px;
  padding-top:8px;
  border-top:1px solid #eef2f7;
  color:#475569;
  font-size:13px;
  letter-spacing:.07em;
  text-transform:uppercase;
  font-weight:950;
}
.akfa-ui-v187 .operator-tech-page-v177 .tech-section-title:first-of-type{margin-top:4px;border-top:0;padding-top:0;}
.akfa-ui-v187 .operator-tech-page-v177 .grid.grid-2{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 16px!important;}
.akfa-ui-v187 .operator-tech-page-v177 .grid.grid-3{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px!important;}
.akfa-ui-v187 .operator-tech-page-v177 .form-row{min-width:0;margin:0;}
.akfa-ui-v187 .operator-tech-page-v177 .form-row label{font-size:12px;line-height:1.2;margin-bottom:7px;color:#64748b;font-weight:950;}
.akfa-ui-v187 .operator-tech-page-v177 input,
.akfa-ui-v187 .operator-tech-page-v177 select,
.akfa-ui-v187 .operator-tech-page-v177 textarea{
  width:100%;min-height:46px;border-radius:14px;font-size:15px;line-height:1.2;
}
.akfa-ui-v187 .operator-tech-page-v177 textarea{min-height:92px;}
.akfa-ui-v187 .operator-tech-page-v177 .help{font-size:12px;line-height:1.35;color:#64748b;margin-top:6px;max-width:100%;}
.akfa-ui-v187 .operator-tech-page-v177 .accessory-grid{align-items:end;}
.akfa-ui-v187 .operator-tech-page-v177 .alert.compact-alert{font-size:13px;line-height:1.4;padding:12px 14px;border-radius:14px;}
.akfa-ui-v187 .operator-tech-page-v177 .card:not(.tech-form-card){overflow:hidden;}
.akfa-ui-v187 .operator-tech-page-v177 .table-wrap{max-width:100%;overflow:auto;}
@media(max-width:1320px){
  .akfa-ui-v187 .operator-tech-page-v177 .tech-layout{grid-template-columns:1fr;}
}
@media(max-width:860px){
  .akfa-ui-v187 .operator-tech-page-v177 .grid.grid-2,
  .akfa-ui-v187 .operator-tech-page-v177 .grid.grid-3{grid-template-columns:1fr!important;}
}

.akfa-ui-v187 .material-import-card-v187{border:1px solid #bfdbfe;background:linear-gradient(135deg,#fff 0%,#f8fbff 60%,#eff6ff 100%);box-shadow:0 18px 42px rgba(37,99,235,.08);}
.akfa-ui-v187 .raw-import-body-v187{display:grid;grid-template-columns:minmax(420px,.95fr) minmax(520px,1.05fr);gap:16px;align-items:stretch;}
.akfa-ui-v187 .raw-import-form-v187{display:grid;grid-template-columns:1.2fr .8fr .9fr auto;gap:12px;align-items:end;background:#fff;border:1px solid #dbeafe;border-radius:18px;padding:14px;}
.akfa-ui-v187 .raw-import-form-v187 .field{min-width:0;}
.akfa-ui-v187 .raw-import-form-v187 .field>span{display:block;margin-bottom:6px;font-size:12px;color:#64748b;font-weight:950;}
.akfa-ui-v187 .raw-import-actions-v187{display:flex;align-items:end;justify-content:flex-end;}
.akfa-ui-v187 .raw-import-hints-v187{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
.akfa-ui-v187 .raw-import-hints-v187>div{border:1px solid #e2e8f0;border-radius:16px;background:#fff;padding:12px 14px;}
.akfa-ui-v187 .raw-import-hints-v187 b{display:block;color:#0f172a;font-size:14px;margin-bottom:4px;}
.akfa-ui-v187 .raw-import-hints-v187 span{display:block;color:#64748b;font-size:12px;font-weight:700;line-height:1.35;}
.akfa-ui-v187 .raw-import-report-hero-v187{align-items:center;}
.akfa-ui-v187 .raw-import-table-wrap-v187{max-height:620px;overflow:auto;}
.akfa-ui-v187 .raw-import-errors-v187,.akfa-ui-v187 .raw-import-warnings-v187{margin-top:14px;}
@media(max-width:1380px){
  .akfa-ui-v187 .raw-import-body-v187{grid-template-columns:1fr;}
  .akfa-ui-v187 .raw-import-form-v187{grid-template-columns:1fr 1fr;}
  .akfa-ui-v187 .raw-import-actions-v187{grid-column:1/-1;justify-content:flex-start;}
}
@media(max-width:760px){
  .akfa-ui-v187 .raw-import-form-v187,.akfa-ui-v187 .raw-import-hints-v187{grid-template-columns:1fr;}
}

/* v1.88.0 — maximum responsive/mobile adaptation */
:root{
  --mobile-bottom-nav-h: 72px;
  --mobile-safe-bottom: env(safe-area-inset-bottom, 0px);
}
.akfa-ui-v188 *{min-width:0;}
.akfa-ui-v188 input,.akfa-ui-v188 select,.akfa-ui-v188 textarea,.akfa-ui-v188 button{font:inherit;}
.akfa-ui-v188 img,.akfa-ui-v188 svg,.akfa-ui-v188 canvas{max-width:100%;}
.akfa-ui-v188 .card,.akfa-ui-v188 .panel,.akfa-ui-v188 .metric-card,.akfa-ui-v188 .operator-section-card,.akfa-ui-v188 .ops-card-v186{min-width:0;overflow-wrap:anywhere;}
.akfa-ui-v188 .table-wrap,.akfa-ui-v188 .responsive-scroll,.akfa-ui-v188 .mobile-table-scroll-v188-wrap{width:100%;overflow:auto;-webkit-overflow-scrolling:touch;}
.akfa-ui-v188 table{max-width:100%;}
.akfa-ui-v188 .mobile-scroll-table-v188{min-width:860px;}
.akfa-ui-v188 .mobile-bottom-nav-v188{display:none;}

@media (max-width: 1320px){
  .akfa-ui-v188 .content{max-width:100%;padding-left:18px;padding-right:18px;}
  .akfa-ui-v188 .page-header,.akfa-ui-v188 .operator-pagebar,.akfa-ui-v188 .exec-pagebar,.akfa-ui-v188 .ops-hero-v186{gap:14px;}
  .akfa-ui-v188 .grid-4,.akfa-ui-v188 .operator-kpi-grid,.akfa-ui-v188 .operator-kpi-ribbon{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .akfa-ui-v188 .equipment-lines-grid,.akfa-ui-v188 .line-card-grid,.akfa-ui-v188 .cmms-grid,.akfa-ui-v188 .employee-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}

@media (max-width: 1100px){
  html.akfa-ui-v188, body.akfa-ui-v188{overflow-x:hidden;}
  .akfa-ui-v188 .app-shell{display:block;min-height:100vh;}
  .akfa-ui-v188 .sidebar{
    position:fixed!important;z-index:1000!important;top:0!important;left:0!important;
    width:min(86vw, 340px)!important;max-width:340px;height:100dvh!important;
    transform:translateX(-104%);transition:transform 200ms ease;box-shadow:28px 0 60px rgba(2,6,23,.36);
    border-right:1px solid rgba(255,255,255,.10);padding-bottom:calc(var(--mobile-bottom-nav-h) + var(--mobile-safe-bottom));
  }
  .akfa-ui-v188.sidebar-collapsed .sidebar,.akfa-ui-v188.sidebar-expanded .sidebar{width:min(86vw,340px)!important;}
  .akfa-ui-v188 body.sidebar-open .sidebar,
  body.akfa-ui-v188.sidebar-open .sidebar{transform:translateX(0);}
  .akfa-ui-v188 .sidebar-overlay{display:block;position:fixed;inset:0;z-index:999;background:rgba(15,23,42,.52);backdrop-filter:blur(2px);opacity:0;pointer-events:none;transition:opacity 180ms ease;}
  body.akfa-ui-v188.sidebar-open .sidebar-overlay{opacity:1;pointer-events:auto;}
  .akfa-ui-v188 .sidebar-header{position:sticky;top:0;background:linear-gradient(180deg,#0b1220 75%,rgba(11,18,32,.88));z-index:2;border-bottom:1px solid rgba(255,255,255,.08);}
  .akfa-ui-v188 .nav-label,.akfa-ui-v188 .brand-text,.akfa-ui-v188 .sidebar-footer{display:block!important;}
  .akfa-ui-v188 .nav-item{padding:12px 12px;min-height:46px;}
  .akfa-ui-v188 .main{width:100%;margin-left:0!important;}
  .akfa-ui-v188 .topbar{display:block!important;position:sticky;top:0;z-index:850;}
  .akfa-ui-v188 .topbar-inner{padding:10px 12px;max-width:none;}
  .akfa-ui-v188 .hamburger{display:inline-flex!important;min-height:42px;border-radius:14px;}
  .akfa-ui-v188 .breadcrumbs{max-width:calc(100vw - 150px);font-size:12px;}
  .akfa-ui-v188 .desktop-only,.akfa-ui-v188 .topbar-tools.desktop-only{display:none!important;}
  .akfa-ui-v188 .content{padding:12px 10px calc(22px + var(--mobile-bottom-nav-h) + var(--mobile-safe-bottom));}
  .akfa-ui-v188 .page-header,.akfa-ui-v188 .operator-pagebar,.akfa-ui-v188 .exec-pagebar,.akfa-ui-v188 .ops-hero-v186,.akfa-ui-v188 .dashboard-hero,.akfa-ui-v188 .hero{flex-direction:column!important;align-items:stretch!important;}
  .akfa-ui-v188 .page-header .actions,.akfa-ui-v188 .operator-pagebar .actions,.akfa-ui-v188 .exec-top-actions-v186,.akfa-ui-v188 .card-actions{justify-content:flex-start!important;width:100%;}
  .akfa-ui-v188 .page-header .actions>*{max-width:100%;}
  .akfa-ui-v188 h1{font-size:clamp(22px,5.5vw,32px);line-height:1.08;}
  .akfa-ui-v188 h2{font-size:clamp(18px,4.8vw,24px);}
  .akfa-ui-v188 .subtitle,.akfa-ui-v188 .muted{line-height:1.42;}
  .akfa-ui-v188 .card{border-radius:18px;}
  .akfa-ui-v188 .card-header,.akfa-ui-v188 .card-footer{align-items:flex-start;flex-direction:column;}
  .akfa-ui-v188 .card-body{padding:14px;}
  .akfa-ui-v188 .grid,.akfa-ui-v188 .grid-2,.akfa-ui-v188 .grid-3,.akfa-ui-v188 .grid-4,
  .akfa-ui-v188 .operator-kpi-grid,.akfa-ui-v188 .operator-kpi-ribbon,.akfa-ui-v188 .operator-work-grid,.akfa-ui-v188 .operator-board-grid,
  .akfa-ui-v188 .ops-kpi-row-v186,.akfa-ui-v188 .ops-grid-main-v186,.akfa-ui-v188 .ops-grid-secondary-v186,.akfa-ui-v188 .ops-grid-wide-v186,
  .akfa-ui-v188 .exec-grid-v186,.akfa-ui-v188 .exec-risk-grid-v186,.akfa-ui-v188 .exec-scoreboard-v186,
  .akfa-ui-v188 .raw-import-body-v187,.akfa-ui-v188 .tech-layout,.akfa-ui-v188 .tech-layout-v187,
  .akfa-ui-v188 .equipment-lines-grid,.akfa-ui-v188 .line-card-grid,.akfa-ui-v188 .cmms-grid,.akfa-ui-v188 .employee-grid{
    grid-template-columns:1fr!important;
  }
  .akfa-ui-v188 .btn,.akfa-ui-v188 button.btn{min-height:44px;}
  .akfa-ui-v188 .input,.akfa-ui-v188 input,.akfa-ui-v188 select,.akfa-ui-v188 textarea{font-size:16px;max-width:100%;}
  .akfa-ui-v188 .form-row,.akfa-ui-v188 .field{min-width:0;}
  .akfa-ui-v188 form .actions,.akfa-ui-v188 .form-actions,.akfa-ui-v188 .raw-import-actions-v187{display:flex;flex-wrap:wrap;gap:10px;justify-content:flex-start!important;}
  .akfa-ui-v188 .tabs,.akfa-ui-v188 .tabbar,.akfa-ui-v188 .operator-tabs,.akfa-ui-v188 [data-tabs],.akfa-ui-v188 .mobile-tabs-scroll-v188{
    display:flex!important;gap:8px;overflow:auto!important;-webkit-overflow-scrolling:touch;scroll-snap-type:x proximity;padding:8px;white-space:nowrap;max-width:100%;
  }
  .akfa-ui-v188 .tabs>* ,.akfa-ui-v188 .tabbar>* ,.akfa-ui-v188 .operator-tabs>* ,.akfa-ui-v188 [data-tabs]>*{flex:0 0 auto;scroll-snap-align:start;}
  .akfa-ui-v188 .ops-section-tabs-v186,.akfa-ui-v188 .exec-tabs-v186{position:relative!important;top:auto!important;}
  .akfa-ui-v188 .cmdk-dialog{width:min(94vw,760px);max-height:82dvh;border-radius:20px;}
  .akfa-ui-v188 .cmdk-list{max-height:60dvh;overflow:auto;}
  .akfa-ui-v188 .toast-host{left:12px;right:12px;bottom:calc(var(--mobile-bottom-nav-h) + 12px + var(--mobile-safe-bottom));}
  .akfa-ui-v188 .toast{width:auto;max-width:none;}
  .akfa-ui-v188 .mobile-bottom-nav-v188{
    display:grid;grid-template-columns:repeat(5,1fr);position:fixed;left:10px;right:10px;bottom:calc(8px + var(--mobile-safe-bottom));z-index:920;
    min-height:var(--mobile-bottom-nav-h);padding:8px;border-radius:22px;border:1px solid rgba(148,163,184,.32);
    background:rgba(255,255,255,.92);box-shadow:0 18px 46px rgba(15,23,42,.18);backdrop-filter:blur(18px);
  }
  html[data-theme="dark"] .mobile-bottom-nav-v188{background:rgba(15,23,42,.92);border-color:rgba(148,163,184,.18);}
  @media (prefers-color-scheme: dark){html[data-theme="system"] .mobile-bottom-nav-v188{background:rgba(15,23,42,.92);border-color:rgba(148,163,184,.18);}}
  .akfa-ui-v188 .mobile-bottom-item-v188{appearance:none;border:0;background:transparent;color:#64748b;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;border-radius:16px;min-width:0;padding:6px 4px;font-size:11px;font-weight:900;}
  .akfa-ui-v188 .mobile-bottom-item-v188 .icon{width:20px;height:20px;}
  .akfa-ui-v188 .mobile-bottom-item-v188.active,.akfa-ui-v188 .mobile-bottom-item-v188:hover{background:#2563eb;color:#fff;box-shadow:0 10px 22px rgba(37,99,235,.28);}
  .akfa-ui-v188 .mobile-bottom-item-v188 b{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
}

@media (max-width: 760px){
  .akfa-ui-v188 .content{padding-left:8px;padding-right:8px;}
  .akfa-ui-v188 .topbar-inner{padding:8px;}
  .akfa-ui-v188 .user-chip,.akfa-ui-v188 .breadcrumbs{display:none!important;}
  .akfa-ui-v188 .page-header,.akfa-ui-v188 .operator-pagebar,.akfa-ui-v188 .exec-pagebar{margin-bottom:10px;}
  .akfa-ui-v188 .card{border-radius:16px;}
  .akfa-ui-v188 .card-header{padding:12px 13px;}
  .akfa-ui-v188 .card-body{padding:12px;}
  .akfa-ui-v188 .card-footer{padding:12px 13px;}
  .akfa-ui-v188 .kpi,.akfa-ui-v188 .metric-card,.akfa-ui-v188 .ops-kpi-v186{padding:12px!important;border-radius:16px!important;}
  .akfa-ui-v188 .kpi-value,.akfa-ui-v188 .metric-value,.akfa-ui-v188 .ops-kpi-value-v186{font-size:clamp(22px,8vw,34px)!important;}
  .akfa-ui-v188 .btn,.akfa-ui-v188 form button[type="submit"]{width:100%;}
  .akfa-ui-v188 .btn.btn-sm,.akfa-ui-v188 .card-actions .btn,.akfa-ui-v188 .tabs .btn,.akfa-ui-v188 .tabbar .btn{width:auto;}
  .akfa-ui-v188 .page-header .actions .btn,.akfa-ui-v188 .operator-pagebar .actions .btn{flex:1 1 100%;}
  .akfa-ui-v188 .form-grid,.akfa-ui-v188 .compact-form-grid,.akfa-ui-v188 .raw-import-form-v187,
  .akfa-ui-v188 .technology-map-v187 .tech-product-grid-v187,.akfa-ui-v188 .technology-map-v187 .tech-accessory-grid-v187,
  .akfa-ui-v188 .operator-tech-page-v177 .grid.grid-2,.akfa-ui-v188 .operator-tech-page-v177 .grid.grid-3{
    display:grid!important;grid-template-columns:1fr!important;gap:11px!important;
  }
  .akfa-ui-v188 .mobile-tabs-scroll-v188{margin-left:-6px;margin-right:-6px;padding-left:6px;padding-right:6px;}
  .akfa-ui-v188 .mobile-tabs-scroll-v188::-webkit-scrollbar{display:none;}
  .akfa-ui-v188 .responsive-table-v188{border-collapse:separate;border-spacing:0 10px;display:block;width:100%;}
  .akfa-ui-v188 .responsive-table-v188 thead{display:none;}
  .akfa-ui-v188 .responsive-table-v188 tbody{display:block;width:100%;}
  .akfa-ui-v188 .responsive-table-v188 tr{display:block;margin:0 0 10px;border:1px solid #e2e8f0;border-radius:16px;background:#fff;box-shadow:0 10px 28px rgba(15,23,42,.05);overflow:hidden;}
  html[data-theme="dark"] .akfa-ui-v188 .responsive-table-v188 tr{background:#0f172a;border-color:rgba(148,163,184,.18);}
  .akfa-ui-v188 .responsive-table-v188 td{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;border:0!important;border-bottom:1px solid #eef2f7!important;padding:10px 12px!important;min-height:42px;text-align:right!important;white-space:normal!important;}
  .akfa-ui-v188 .responsive-table-v188 td:last-child{border-bottom:0!important;}
  .akfa-ui-v188 .responsive-table-v188 td::before{content:attr(data-label);display:block;flex:0 0 42%;font-weight:900;color:#64748b;text-align:left;font-size:12px;line-height:1.25;}
  .akfa-ui-v188 .mobile-scroll-table-v188{min-width:720px;}
  .akfa-ui-v188 .ops-line-chart-v186,.akfa-ui-v188 .chart,.akfa-ui-v188 .chart-card,.akfa-ui-v188 .line-chart,.akfa-ui-v188 .bar-chart{max-width:100%;overflow:hidden;}
  .akfa-ui-v188 .ops-line-chart-v186{height:300px!important;}
  .akfa-ui-v188 .ops-chart-tooltip-v186{position:static!important;margin-top:12px!important;}
  .akfa-ui-v188 .ops-bar-row-v186{grid-template-columns:70px 1fr 54px!important;font-size:12px;}
  .akfa-ui-v188 .exec-score-main-v186 strong,.akfa-ui-v188 .ops-hero-score-v186 strong{font-size:clamp(34px,12vw,54px)!important;}
  .akfa-ui-v188 .plant-dashboard-v186,.akfa-ui-v188 .ops-dashboard-v186,.akfa-ui-v188 .exec-portal-v186{gap:10px!important;}
  .akfa-ui-v188 .raw-import-hints-v187{grid-template-columns:1fr!important;}
  .akfa-ui-v188 .raw-import-table-wrap-v187{max-height:70dvh;}
  .akfa-ui-v188 .mobile-bottom-nav-v188{left:6px;right:6px;border-radius:18px;}
  .akfa-ui-v188 .mobile-bottom-item-v188{font-size:10px;}
}

@media (max-width: 460px){
  .akfa-ui-v188 .content{padding-left:6px;padding-right:6px;}
  .akfa-ui-v188 .sidebar{width:92vw!important;max-width:92vw!important;}
  .akfa-ui-v188 h1{font-size:24px;}
  .akfa-ui-v188 .mobile-bottom-item-v188 b{font-size:9px;}
  .akfa-ui-v188 .mobile-bottom-item-v188 .icon{width:18px;height:18px;}
  .akfa-ui-v188 .responsive-table-v188 td{display:block;text-align:left!important;}
  .akfa-ui-v188 .responsive-table-v188 td::before{margin-bottom:4px;}
}

/* v1.89.0 — material/supplier cleanup + unified dashboard tabs */
.ops-dashboard-v189 .ops-section-tabs-v189{position:sticky;top:0;z-index:8;background:rgba(255,255,255,.92);backdrop-filter:blur(10px);border:1px solid var(--border);border-radius:18px;padding:8px;display:flex;gap:8px;overflow:auto;margin:12px 0 14px;box-shadow:0 10px 28px rgba(15,23,42,.06)}
.ops-dashboard-v189 .ops-section-tabs-v189 .tab{border:0;background:transparent;border-radius:14px;padding:12px 18px;font-weight:850;color:#64748b;white-space:nowrap;cursor:pointer}
.ops-dashboard-v189 .ops-section-tabs-v189 .tab.active{background:#2563eb;color:#fff;box-shadow:0 10px 22px rgba(37,99,235,.24)}
.ops-dashboard-panels-v189{display:block}.ops-dashboard-panel-v189{display:flex;flex-direction:column;gap:14px}.ops-dashboard-panel-v189[hidden]{display:none!important}
.ops-contour-grid-v189{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:8px 0 14px}.ops-contour-card-v189{position:relative;overflow:hidden;border:1px solid #dbeafe;border-radius:18px;background:linear-gradient(135deg,#eff6ff,#fff);padding:16px;display:flex;flex-direction:column;gap:8px}.ops-contour-card-v189.lam{border-color:#ddd6fe;background:linear-gradient(135deg,#f5f3ff,#fff)}.ops-contour-card-v189 b{font-size:15px;color:#334155}.ops-contour-card-v189 strong{font-size:25px;letter-spacing:-.02em;color:#0f172a}.ops-contour-card-v189 span{font-size:12px;color:#64748b}.ops-contour-card-v189 i{position:absolute;right:-20px;bottom:-26px;width:96px;height:96px;border-radius:999px;background:rgba(37,99,235,.10)}.ops-contour-card-v189.lam i{background:rgba(124,58,237,.10)}.ops-big-v189{display:block;font-size:46px;letter-spacing:-.04em;margin:8px 0;color:#0f172a}.compact-v189{margin-top:10px}
.materials-shell .form-grid{align-items:start}.materials-shell .field label,.materials-shell .field span{letter-spacing:.01em}.materials-shell input[type="file"].input{padding:10px 12px;height:auto}.materials-shell .table-wrap{max-width:100%;overflow:auto}.materials-shell .ops-two-col-grid{align-items:start}.materials-shell select.input option{font-weight:500}.materials-shell .materials-entry-table th,.materials-shell .materials-entry-table td{white-space:nowrap}.materials-shell .toolbar-between{gap:12px;flex-wrap:wrap}.materials-shell [data-panel="materials"] .card-body .form-grid{row-gap:14px}.materials-shell [data-panel="receipts"] .form-grid{row-gap:14px}.materials-shell .supplier-docs-grid-v183 .field [data-supplier-form-field]{min-width:0}
@media(max-width:900px){.ops-contour-grid-v189{grid-template-columns:1fr}.ops-dashboard-v189 .ops-section-tabs-v189{top:0;margin-inline:-4px;border-radius:14px}.ops-dashboard-v189 .ops-section-tabs-v189 .tab{padding:10px 14px}.materials-shell .form-grid.form-grid-3,.materials-shell .form-grid.form-grid-4{grid-template-columns:1fr!important}.materials-shell .field-span-2,.materials-shell .field-span-3,.materials-shell .field-full{grid-column:auto!important}.materials-shell .toolbar-between,.materials-shell .toolbar-right{justify-content:stretch}.materials-shell .toolbar-between .btn,.materials-shell .toolbar-right .btn{width:100%}}

/* v1.90.0 — mobile self-critique fixes + materials/HR/CMMS polish
   Problems fixed: bottom nav covering forms, sidebar icon-only mode on mobile,
   over-wide equipment cards, material card carrying stock balances, and FX clarity. */
:root{
  --mobile-bottom-nav-h-v190: 64px;
}
.akfa-ui-v190 .fx-strip-v190{
  display:flex;flex-wrap:wrap;gap:8px;padding:10px;border:1px solid #dbeafe;border-radius:14px;background:#f8fbff;color:#334155;font-weight:850;font-size:12px;
}
.akfa-ui-v190 .fx-strip-v190 span{background:#fff;border:1px solid #e2e8f0;border-radius:999px;padding:6px 10px;}
.akfa-ui-v190 .receipt-fx-help-v190{grid-column:1/-1;}

/* CMMS/extruder cards: enforce clean cards on desktop and mobile */
.akfa-ui-v190 .equipment-card-grid-v181,
.akfa-ui-v190 .equipment-card-grid-clean-v182{
  display:grid!important;grid-template-columns:repeat(auto-fit,minmax(300px,1fr))!important;gap:16px!important;align-items:stretch!important;
}
.akfa-ui-v190 .equipment-line-card-v181{min-height:auto!important;overflow:hidden!important;display:flex;flex-direction:column;gap:12px;}
.akfa-ui-v190 .equipment-line-card-v181 .line-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;}
.akfa-ui-v190 .equipment-line-card-v181 .line-card-metrics{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important;}
.akfa-ui-v190 .equipment-line-card-v181 .line-card-metrics div{min-width:0;padding:9px!important;}
.akfa-ui-v190 .equipment-line-card-v181 .line-card-metrics b{font-size:15px!important;line-height:1.15;word-break:break-word;}
.akfa-ui-v190 .equipment-resource-row{display:flex;flex-wrap:wrap;gap:8px!important;}
.akfa-ui-v190 .equipment-resource-row span{max-width:100%;}
.akfa-ui-v190 .spare-mini-list{display:flex;flex-wrap:wrap;gap:6px;}
.akfa-ui-v190 .spare-mini-list .badge{max-width:100%;white-space:normal;line-height:1.2;}
.akfa-ui-v190 .equipment-cmms-v181 .table-wrap{overflow:auto;-webkit-overflow-scrolling:touch;}

/* Materials layout cleanup */
.akfa-ui-v190 .materials-shell .form-grid{gap:14px!important;}
.akfa-ui-v190 .materials-shell .field label,
.akfa-ui-v190 .materials-shell .field span{line-height:1.25;}
.akfa-ui-v190 .materials-shell .card{overflow:hidden;}
.akfa-ui-v190 .materials-shell .materials-entry-table{min-width:840px;}
.akfa-ui-v190 .materials-shell .exec-table td,.akfa-ui-v190 .materials-shell .exec-table th{vertical-align:top;}

/* HR master/apprentice readability */
.akfa-ui-v190 .employees-pro-v179 .exec-table .badge.purple{background:#ede9fe;color:#6d28d9;border-color:#ddd6fe;}
.akfa-ui-v190 .employees-pro-v179 .exec-table .badge.blue{background:#dbeafe;color:#1d4ed8;border-color:#bfdbfe;}

@media (max-width:1100px){
  html.akfa-ui-v190, body.akfa-ui-v190{overflow-x:hidden!important;}
  body.akfa-ui-v190{padding-bottom:calc(var(--mobile-bottom-nav-h-v190) + env(safe-area-inset-bottom,0px));}
  .akfa-ui-v190 .sidebar{
    width:min(88vw,360px)!important;max-width:min(88vw,360px)!important;min-width:0!important;
    transform:translate3d(-106%,0,0)!important;left:0!important;right:auto!important;position:fixed!important;
    overflow-y:auto!important;overflow-x:hidden!important;padding:14px 14px calc(130px + env(safe-area-inset-bottom,0px))!important;
  }
  body.akfa-ui-v190.sidebar-open .sidebar{transform:translate3d(0,0,0)!important;}
  body.akfa-ui-v190.sidebar-open{overflow:hidden!important;}
  .akfa-ui-v190 .sidebar-header{display:flex!important;grid-template-columns:none!important;gap:12px;align-items:center!important;justify-content:flex-start!important;padding:0 0 14px!important;margin-bottom:10px!important;}
  .akfa-ui-v190 .sidebar-menu-toggle{flex:0 0 48px;width:48px!important;height:48px!important;border-radius:16px!important;}
  .akfa-ui-v190 .brand{display:flex!important;align-items:center!important;gap:12px!important;width:auto!important;min-width:0!important;}
  .akfa-ui-v190 .brand-mark{flex:0 0 42px;}
  .akfa-ui-v190 .brand-text,.akfa-ui-v190 .nav-label,.akfa-ui-v190 .nav-group-label{display:block!important;opacity:1!important;visibility:visible!important;}
  .akfa-ui-v190 .brand-title,.akfa-ui-v190 .brand-sub{white-space:normal!important;overflow:hidden;text-overflow:ellipsis;}
  .akfa-ui-v190 .sidebar-nav{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:8px!important;padding:0!important;}
  .akfa-ui-v190 .nav-group{border-bottom:1px solid rgba(255,255,255,.08)!important;padding:10px 0!important;margin:0!important;}
  .akfa-ui-v190 .nav-item{width:100%!important;height:auto!important;min-height:48px!important;display:flex!important;justify-content:flex-start!important;align-items:center!important;gap:12px!important;padding:11px 12px!important;border-radius:15px!important;}
  .akfa-ui-v190 .nav-icon{flex:0 0 24px!important;width:24px!important;height:24px!important;}
  .akfa-ui-v190 .nav-item.active{box-shadow:0 12px 28px rgba(37,99,235,.28)!important;}
  .akfa-ui-v190 .sidebar-footer{display:block!important;margin-top:12px;}
  .akfa-ui-v190 .main{margin-left:0!important;width:100%!important;}
  .akfa-ui-v190 .content{padding-bottom:calc(96px + env(safe-area-inset-bottom,0px))!important;}
  .akfa-ui-v190 .mobile-bottom-nav-v188{min-height:var(--mobile-bottom-nav-h-v190)!important;left:10px!important;right:10px!important;bottom:calc(10px + env(safe-area-inset-bottom,0px))!important;padding:6px!important;}
  .akfa-ui-v190 .mobile-bottom-item-v188{font-size:10px!important;gap:2px!important;}
  body.akfa-ui-v190.mobile-form-focus-v190 .mobile-bottom-nav-v188{transform:translateY(calc(120% + env(safe-area-inset-bottom,0px)))!important;opacity:0!important;pointer-events:none!important;transition:transform 160ms ease,opacity 160ms ease;}
  .akfa-ui-v190 .tabs,.akfa-ui-v190 .operator-tabs,.akfa-ui-v190 .tabbar{scroll-padding-left:10px;}
}
@media (max-width:760px){
  .akfa-ui-v190 .topbar{position:sticky!important;top:0!important;z-index:850!important;background:rgba(248,250,252,.92);backdrop-filter:blur(14px);}
  .akfa-ui-v190 .topbar-right .btn{width:auto!important;min-width:92px;}
  .akfa-ui-v190 .content{padding-left:10px!important;padding-right:10px!important;padding-top:10px!important;}
  .akfa-ui-v190 .exec-hero,.akfa-ui-v190 .operator-pagebar,.akfa-ui-v190 .card{border-radius:18px!important;}
  .akfa-ui-v190 .operator-decision-strip-v177{display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important;}
  .akfa-ui-v190 .operator-decision-card-v177{min-height:130px!important;padding:14px!important;}
  .akfa-ui-v190 .operator-decision-card-v177 strong{font-size:28px!important;}
  .akfa-ui-v190 .operator-decision-card-v177 b{font-size:16px!important;line-height:1.15;}
  .akfa-ui-v190 .operator-decision-card-v177 em{font-size:12px!important;line-height:1.25;}
  .akfa-ui-v190 .equipment-card-grid-v181,.akfa-ui-v190 .equipment-card-grid-clean-v182{grid-template-columns:1fr!important;gap:12px!important;}
  .akfa-ui-v190 .equipment-line-card-v181{padding:14px!important;border-radius:18px!important;}
  .akfa-ui-v190 .equipment-line-card-v181 .line-card-head{display:block!important;}
  .akfa-ui-v190 .equipment-line-card-v181 .line-card-head .badge{margin-top:8px;}
  .akfa-ui-v190 .equipment-line-card-v181 .line-card-metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .akfa-ui-v190 .equipment-resource-row{display:grid!important;grid-template-columns:1fr!important;}
  .akfa-ui-v190 .materials-shell .form-grid,.akfa-ui-v190 .form-grid.form-grid-3{grid-template-columns:1fr!important;}
  .akfa-ui-v190 .receipt-fx-help-v190{grid-column:auto!important;}
  .akfa-ui-v190 .fx-strip-v190{display:grid;grid-template-columns:1fr;}
  .akfa-ui-v190 .responsive-table-v188 tr{border-radius:14px!important;}
}
@media (max-width:460px){
  .akfa-ui-v190 .operator-decision-strip-v177{grid-template-columns:1fr!important;}
  .akfa-ui-v190 .sidebar{width:88vw!important;max-width:88vw!important;}
  .akfa-ui-v190 .mobile-bottom-item-v188 b{font-size:9px!important;}
  .akfa-ui-v190 .equipment-line-card-v181 .line-card-metrics{grid-template-columns:1fr 1fr!important;}
}

/* v1.91.0 security roles mobile QA */
.akfa-ui-v191 .csrf-note-v191{font-size:12px;color:var(--muted);}


/* v1.93.0 — existing-section operator mobile screen and role-browser QA
   No new menu section: operator workflow lives inside Today's Production Plan. */
.akfa-ui-v193 .operator-shift-panel-v193{overflow:hidden;border-color:#dbeafe;background:linear-gradient(180deg,#fff,#f8fbff)}
.operator-mobile-grid-v193{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:14px;padding:14px}.operator-task-card-v193{border:1px solid #e2e8f0;border-radius:20px;background:#fff;box-shadow:0 12px 30px rgba(15,23,42,.06);padding:15px;display:flex;flex-direction:column;gap:10px}.operator-task-top-v193{display:flex;align-items:center;justify-content:space-between;gap:8px}.operator-task-card-v193 h3{font-size:18px;margin:0;color:#0f172a;line-height:1.15}.operator-task-card-v193 p{margin:0;color:#64748b;font-size:13px}.operator-progress-v193{height:8px;background:#e5e7eb;border-radius:999px;overflow:hidden}.operator-progress-v193 span{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#22c55e,#2563eb)}.operator-action-form-v193{display:flex;flex-direction:column;gap:9px}.operator-action-buttons-v193{display:flex;gap:8px;flex-wrap:wrap}.operator-input-grid-v193{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.operator-input-grid-v193 label{display:flex;flex-direction:column;gap:4px;font-weight:850;color:#64748b;font-size:12px}.operator-comment-v193{min-width:0}.operator-events-v193{padding:0 14px 14px}.empty-card-v193{border:1px dashed #bfdbfe;border-radius:18px;background:#eff6ff;color:#1e40af;font-weight:850;padding:18px;margin:14px}
@media(max-width:760px){.akfa-ui-v193 .operator-mobile-grid-v193{grid-template-columns:1fr;padding:10px}.akfa-ui-v193 .operator-task-card-v193{border-radius:18px;padding:13px}.akfa-ui-v193 .operator-input-grid-v193{grid-template-columns:1fr}.akfa-ui-v193 .operator-action-buttons-v193 .btn{flex:1 1 46%;min-height:42px}.akfa-ui-v193 #operator-shift-panel{scroll-margin-top:84px}.akfa-ui-v193 .operator-events-v193{padding:0 10px 10px}}


/* v1.95.0 — mobile overlay lock fix and robust off-canvas navigation
   Fixes the grey stuck overlay and prevents the mobile sidebar from becoming icon-only. */
.akfa-ui-v195 .sidebar-overlay{display:none!important;opacity:0!important;pointer-events:none!important;}
@media (min-width:1101px){
  body.akfa-ui-v195.sidebar-open{overflow:auto!important;}
  body.akfa-ui-v195.sidebar-open .sidebar-overlay{display:none!important;opacity:0!important;pointer-events:none!important;}
}
@media (max-width:1100px){
  body.akfa-ui-v195.sidebar-open{overflow:hidden!important;}
  body.akfa-ui-v195.sidebar-open .sidebar-overlay{
    display:block!important;opacity:1!important;pointer-events:auto!important;position:fixed!important;inset:0!important;
    z-index:980!important;background:rgba(15,23,42,.46)!important;backdrop-filter:blur(2px)!important;
  }
  .akfa-ui-v195 .sidebar{
    z-index:1000!important;width:min(88vw,370px)!important;max-width:min(88vw,370px)!important;
    transform:translate3d(-108%,0,0)!important;transition:transform .18s ease!important;
  }
  body.akfa-ui-v195.sidebar-open .sidebar{transform:translate3d(0,0,0)!important;}
  .akfa-ui-v195 .sidebar .brand-text,.akfa-ui-v195 .sidebar .nav-label,.akfa-ui-v195 .sidebar .nav-group-label{
    display:block!important;opacity:1!important;visibility:visible!important;max-width:100%!important;
  }
  .akfa-ui-v195 .sidebar .nav-item{justify-content:flex-start!important;text-align:left!important;}
  .akfa-ui-v195 .sidebar .sidebar-header{grid-template-columns:auto 1fr!important;}
  .akfa-ui-v195 .main{margin-left:0!important;}
  .akfa-ui-v195 .topbar{z-index:860!important;}
  .akfa-ui-v195 .mobile-bottom-nav-v188{z-index:920!important;}
  body.akfa-ui-v195.sidebar-open .mobile-bottom-nav-v188{opacity:0!important;pointer-events:none!important;}
}
@media (max-width:760px){
  .akfa-ui-v195 .content{padding-bottom:calc(120px + env(safe-area-inset-bottom,0px))!important;}
  .akfa-ui-v195 .mobile-bottom-nav-v188{bottom:calc(14px + env(safe-area-inset-bottom,0px))!important;}
  body.akfa-ui-v195.mobile-form-focus-v190 .mobile-bottom-nav-v188{transform:translateY(140%)!important;opacity:0!important;pointer-events:none!important;}
}

/* v1.96 planning simplification: ordered shop-floor view + PDF-first actions */
.akfa-ui-v195 .planning-command-card-v196,
.akfa-ui-v195 .today-print-plan-v196,
.akfa-ui-v195 .shopfloor-preview-card-v196{
  border:1px solid rgba(37,99,235,.14);
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
  box-shadow:0 18px 42px rgba(15,23,42,.07);
}
.akfa-ui-v195 .planning-command-card-v196 .card-header,
.akfa-ui-v195 .today-print-plan-v196 .card-header,
.akfa-ui-v195 .shopfloor-preview-card-v196 .card-header{border-bottom:1px solid rgba(148,163,184,.16);}
.akfa-ui-v195 .planning-route-strip-v196{
  display:flex;align-items:center;gap:10px;flex-wrap:wrap;
  padding:12px 14px;margin:0 14px 14px;border:1px solid #dbeafe;border-radius:18px;
  background:#eff6ff;color:#1e3a8a;font-weight:900;
}
.akfa-ui-v195 .planning-route-strip-v196 span{display:inline-flex;align-items:center;gap:8px;min-height:34px;padding:7px 10px;background:#fff;border:1px solid #dbeafe;border-radius:999px;box-shadow:0 4px 12px rgba(37,99,235,.06);}
.akfa-ui-v195 .planning-route-strip-v196 b{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:999px;background:#2563eb;color:#fff;font-size:12px;}
.akfa-ui-v195 .planning-route-strip-v196 i{font-style:normal;color:#64748b;font-weight:900;}
.akfa-ui-v195 .planning-command-grid-v196{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:12px;padding:0 14px 14px;}
.akfa-ui-v195 .planning-command-step-v196{display:flex;flex-direction:column;gap:12px;padding:14px;border:1px solid #e2e8f0;border-radius:20px;background:#fff;box-shadow:0 10px 26px rgba(15,23,42,.05);}
.akfa-ui-v195 .planning-command-step-v196>div:first-child{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;}
.akfa-ui-v195 .planning-command-step-v196 b{font-size:18px;color:#0f172a;}
.akfa-ui-v195 .planning-command-step-v196 span{font-size:13px;color:#64748b;font-weight:750;}
.akfa-ui-v195 .planning-command-metrics-v196{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;}
.akfa-ui-v195 .planning-command-metrics-v196 em{font-style:normal;font-size:12px;font-weight:850;color:#334155;background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;padding:7px 8px;text-align:center;}
.akfa-ui-v195 .planning-command-step-v196 .toolbar{gap:8px;flex-wrap:wrap;}
.akfa-ui-v195 .planning-command-step-v196 .toolbar>*{flex:1 1 auto;}
.akfa-ui-v195 .planning-command-step-v196 .btn{width:100%;justify-content:center;}

.akfa-ui-v195 .planning-area-summary-v196{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;padding:0 14px 14px;}
.akfa-ui-v195 .planning-area-summary-card-v196{display:flex;align-items:center;gap:10px;padding:12px;border-radius:18px;border:1px solid #e2e8f0;background:#fff;min-height:72px;}
.akfa-ui-v195 .planning-area-summary-card-v196 b{font-size:26px;line-height:1;color:#0f172a;min-width:42px;}
.akfa-ui-v195 .planning-area-summary-card-v196 span{font-size:12px;line-height:1.22;color:#64748b;font-weight:850;}
.akfa-ui-v195 .planning-area-summary-card-v196.ok{background:#f0fdf4;border-color:#bbf7d0;}
.akfa-ui-v195 .planning-area-summary-card-v196.warn{background:#fff7ed;border-color:#fed7aa;}
.akfa-ui-v195 .planning-area-summary-card-v196.info{background:#eff6ff;border-color:#bfdbfe;}
.akfa-ui-v195 .planning-area-summary-card-v196.muted{background:#f8fafc;border-color:#e2e8f0;}

.akfa-ui-v195 .planning-details-v196{margin:0 14px 14px;border:1px solid #e2e8f0;border-radius:18px;background:#fff;overflow:hidden;}
.akfa-ui-v195 .planning-details-v196>summary{cursor:pointer;list-style:none;padding:12px 14px;font-weight:900;color:#1e3a8a;background:linear-gradient(180deg,#eff6ff,#fff);display:flex;align-items:center;justify-content:space-between;gap:10px;}
.akfa-ui-v195 .planning-details-v196>summary::-webkit-details-marker{display:none;}
.akfa-ui-v195 .planning-details-v196>summary:after{content:'Показать';font-size:12px;color:#2563eb;background:#dbeafe;border-radius:999px;padding:5px 9px;}
.akfa-ui-v195 .planning-details-v196[open]>summary:after{content:'Скрыть';}
.akfa-ui-v195 .planning-details-v196 .exec-kpi-row,
.akfa-ui-v195 .planning-deep-details-v196 .production-dashboard-grid{margin:0;padding:14px;}
.akfa-ui-v195 .planning-deep-details-v196{margin-top:14px;}
.akfa-ui-v195 .planning-deep-details-v196>summary{background:#f8fafc;color:#334155;}

.akfa-ui-v195 .shopfloor-preview-wrap-v196{padding:0 14px 14px;overflow:auto;-webkit-overflow-scrolling:touch;}
.akfa-ui-v195 .shopfloor-preview-table-v196,
.akfa-ui-v195 .today-shopfloor-table-v196{min-width:980px;border-collapse:separate;border-spacing:0;}
.akfa-ui-v195 .shopfloor-preview-table-v196 thead th,
.akfa-ui-v195 .today-shopfloor-table-v196 thead th{position:sticky;top:0;z-index:2;background:#0f2a44!important;color:#fff!important;border-color:#183b5e!important;font-size:12px;text-transform:none;letter-spacing:0;}
.akfa-ui-v195 .shopfloor-preview-table-v196 td,
.akfa-ui-v195 .today-shopfloor-table-v196 td{vertical-align:top;border-bottom:1px solid #e5e7eb;}
.akfa-ui-v195 .today-line-band-v196 td{background:#0f2a44!important;color:#fff!important;font-weight:950;font-size:14px;letter-spacing:.01em;border:0!important;padding:8px 12px!important;}
.akfa-ui-v195 .today-print-plan-v196 .card-subtitle,
.akfa-ui-v195 .shopfloor-preview-card-v196 .subtitle{max-width:880px;}
.akfa-ui-v195 .scheduler-actions-v196{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.akfa-ui-v195 .scheduler-actions-v196 form{display:inline-flex;margin:0;}
.akfa-ui-v195 .scheduler-actions-v196 .btn{min-height:40px;}

.akfa-ui-v195 .operator-shift-details-v196{margin-top:16px;border:1px solid #dbeafe;border-radius:22px;background:#fff;box-shadow:0 12px 30px rgba(15,23,42,.05);overflow:hidden;}
.akfa-ui-v195 .operator-shift-details-v196>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer;list-style:none;padding:15px 18px;background:linear-gradient(180deg,#eff6ff,#fff);}
.akfa-ui-v195 .operator-shift-details-v196>summary::-webkit-details-marker{display:none;}
.akfa-ui-v195 .operator-shift-details-v196>summary span:first-child{display:flex;flex-direction:column;gap:3px;}
.akfa-ui-v195 .operator-shift-details-v196>summary b{font-size:17px;color:#0f172a;}
.akfa-ui-v195 .operator-shift-details-v196>summary em{font-style:normal;font-size:13px;color:#64748b;line-height:1.25;}
.akfa-ui-v195 .operator-shift-details-v196 #operator-shift-panel{border:0;border-radius:0;box-shadow:none;margin:0;}

.akfa-ui-v195 .schedule-line-metrics-v196{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding:0 14px 12px;}
.akfa-ui-v195 .schedule-line-metrics-v196 span{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 10px;border:1px solid #e2e8f0;border-radius:14px;background:#f8fafc;}
.akfa-ui-v195 .schedule-line-metrics-v196 b{font-size:18px;color:#0f172a;}
.akfa-ui-v195 .schedule-line-metrics-v196 em{font-style:normal;font-size:11px;color:#64748b;font-weight:850;}
.akfa-ui-v195 .schedule-op-why-v196{display:grid;gap:4px;margin-top:8px;padding:9px 10px;border:1px solid #dbeafe;border-radius:14px;background:#f8fbff;color:#334155;}
.akfa-ui-v195 .schedule-op-why-v196 b{font-size:12px;color:#1e40af;}
.akfa-ui-v195 .schedule-op-why-v196 span{font-size:12px;line-height:1.25;color:#334155;}
.akfa-ui-v195 .schedule-op-why-v196 em,
.akfa-ui-v195 .schedule-op-why-v196 small{font-size:11px;line-height:1.2;color:#64748b;font-style:normal;}
.akfa-ui-v195 .schedule-operation-card.err .schedule-op-why-v196{border-color:#fecaca;background:#fff7f7;}
.akfa-ui-v195 .schedule-operation-card.warn .schedule-op-why-v196{border-color:#fed7aa;background:#fffaf2;}
.akfa-ui-v195 .schedule-operation-card.ok .schedule-op-why-v196{border-color:#bbf7d0;background:#f7fff9;}

@media (max-width:980px){
  .akfa-ui-v195 .planning-area-summary-v196{grid-template-columns:repeat(2,minmax(0,1fr));}
  .akfa-ui-v195 .planning-command-metrics-v196{grid-template-columns:1fr;}
  .akfa-ui-v195 .planning-route-strip-v196{align-items:stretch;}
  .akfa-ui-v195 .planning-route-strip-v196 span{flex:1 1 160px;justify-content:center;}
  .akfa-ui-v195 .planning-route-strip-v196 i{display:none;}
  .akfa-ui-v195 .schedule-line-metrics-v196{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media (max-width:760px){
  .akfa-ui-v195 .planning-command-card-v196 .card-header,
  .akfa-ui-v195 .today-print-plan-v196 .card-header,
  .akfa-ui-v195 .shopfloor-preview-card-v196 .card-header{display:block;}
  .akfa-ui-v195 .planning-command-card-v196 .toolbar,
  .akfa-ui-v195 .today-print-plan-v196 .toolbar,
  .akfa-ui-v195 .shopfloor-preview-card-v196 .toolbar{margin-top:10px;display:grid;grid-template-columns:1fr;}
  .akfa-ui-v195 .planning-area-summary-v196{grid-template-columns:1fr;padding:0 10px 10px;}
  .akfa-ui-v195 .planning-details-v196{margin-left:10px;margin-right:10px;}
  .akfa-ui-v195 .operator-shift-details-v196>summary{align-items:flex-start;flex-direction:column;}
  .akfa-ui-v195 .scheduler-actions-v196{display:grid;grid-template-columns:1fr;}
  .akfa-ui-v195 .scheduler-actions-v196 form,.akfa-ui-v195 .scheduler-actions-v196 .btn{width:100%;}
  .akfa-ui-v195 .schedule-line-metrics-v196{padding:0 10px 10px;}
}
@media (max-width:520px){
  .akfa-ui-v195 .schedule-line-metrics-v196{grid-template-columns:1fr;}
  .akfa-ui-v195 .planning-command-grid-v196{grid-template-columns:1fr;padding-left:10px;padding-right:10px;}
  .akfa-ui-v195 .planning-route-strip-v196{margin-left:10px;margin-right:10px;}
}
