/* MOTTA Quality 5.1 — additive adapters; all values are shared design tokens.
   No changes to model data, order snapshots, tenant colors or CAD geometry. */
:root {
  --msq-touch: 44px;
  --msq-sidebar: var(--ms-sidebar-width);
  --msq-toolbar-gap: var(--ms-space-3);
  --msq-text: var(--ms-text-section);
}
:where(.pa-enterprise-layout,.pa-tc,.m3-shell,#motta-customizer,.motta-showcase,.motta-layer-shell) {
  font-family:var(--font-sans);
  color:var(--text-primary);
  font-variant-numeric:tabular-nums;
}
:where(.pa-enterprise-layout,.pa-tc,.m3-shell,#motta-customizer,.motta-showcase,.motta-layer-shell) :is(button,a,input,select,textarea,[role="button"]):focus-visible {
  outline:2px solid var(--border-focus);
  outline-offset:3px;
  box-shadow:var(--shadow-active);
}
:where(.pa-enterprise-layout,.pa-tc,.m3-shell,#motta-customizer,.motta-showcase,.motta-layer-shell) :is(button,a,input,select,textarea):disabled {
  opacity:.55;
  cursor:not-allowed;
}
:where(.pa-enterprise-layout,.pa-tc,.m3-shell) :is(.motta-platform-input,.ms-input,.m3-input) {
  min-height:var(--ms-control);
  border-radius:var(--radius-sm);
  border-color:var(--border-subtle);
}
/* Admin / Bayi — one consistent list rhythm, readable focus targets. */
.pa-enterprise-nav__main,.pa-enterprise-nav__link,.pa-tc-nav__heading,.pa-tc-nav__item,.m3-nav-item {
  min-height:var(--msq-touch);
  line-height:1.35;
  transition:background var(--transition-fast),color var(--transition-fast),border-color var(--transition-fast);
}
.pa-enterprise-sidebar,.pa-tc-nav,.m3-rail {
  scrollbar-width:thin;
  scrollbar-color:var(--border-subtle) transparent;
}
.pa-tc-nav__group {
  border-bottom:1px solid var(--border-subtle);
  padding-block:var(--ms-space-1);
}
.pa-tc-nav__heading {
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:var(--ms-space-3);
  border:0;
  border-radius:var(--radius-sm);
  background:transparent;
  padding:var(--ms-space-3);
  color:var(--text-secondary);
  font-family:var(--font-sans);
  font-size:var(--ms-text-body);
  font-weight:700;
  letter-spacing:.035em;
  text-align:left;
  cursor:pointer;
}
.pa-tc-nav__group.is-expanded>.pa-tc-nav__heading {
  color:var(--brand-primary);
  background:var(--brand-primary-soft);
}
.pa-tc-nav__heading:hover { background:var(--bg-surface-hover); }
.pa-tc-nav__subtasks {padding:var(--ms-space-1) 0 var(--ms-space-2) var(--ms-space-2);display:grid;gap:var(--ms-space-1);}
.pa-tc-nav__subtasks>.pa-tc-nav__item {width:100%;text-align:left;}
.pa-tc-main {min-width:0;}
.pa-tc-head {gap:var(--ms-space-4);}
:where(.pa-enterprise-layout,.pa-tc,.m3-shell) :is(table,td,th) {font-variant-numeric:tabular-nums;}
/* Upload stages: keep every control reachable at viewport heights; make validation explicit. */
.lu-workspace-toolbar,.lu-zone-approval,.lu-approval-details-box,.motta-layer-publish-check {min-width:0;}
.lu-validation[role="alert"] {border-color:var(--status-danger-text);border-radius:var(--radius-sm);}
.lu-button:focus-visible,.motta-layer-detail-action:focus-visible {outline:2px solid var(--border-focus);outline-offset:3px;}
.lu-approval-count,.lu-placement-progress {font-variant-numeric:tabular-nums;}
/* Customer-facing design and order studio: legible, responsive, uncompromised mockup. */
#motta-customizer .mc-studio-face-visual :is(img,svg),
#motta-customizer .mc-studio-faces :is(img,svg) {object-fit:contain;}
#motta-customizer .mc-studio-order-panel,
#motta-customizer .mc-studio-canvas {min-width:0;}
.motta-showcase__preview-card :is(img,svg) {max-width:100%;object-fit:contain;}
/* Accessible quick navigation: platform and tenant menus only. */
.msq-launcher {
  display:inline-flex;
  align-items:center;
  gap:var(--ms-space-2);
  min-height:var(--ms-control);
  border:1px solid var(--border-subtle);
  border-radius:var(--radius-sm);
  background:var(--bg-surface);
  color:var(--text-secondary);
  font:600 var(--ms-text-body) var(--font-sans);
  padding-inline:var(--ms-space-3);
  box-shadow:var(--shadow-xs);
  cursor:pointer;
}
.msq-launcher:hover {background:var(--bg-surface-hover);}
.msq-launcher kbd {border:1px solid var(--border-subtle);border-radius:var(--radius-xs);padding:0 var(--ms-space-1);font-family:var(--font-mono);font-size:var(--ms-text-label);}
.msq-dialog-backdrop {
  position:fixed;inset:0;z-index:2147483000;
  display:grid;align-items:start;justify-items:center;
  padding:min(12vh,6rem) var(--ms-space-3) var(--ms-space-3);
  background:rgba(20, 28, 25,.62);
  backdrop-filter:blur(6px);
}
.msq-dialog {
  width:min(100%,580px);max-height:85dvh;
  background:var(--bg-surface);
  color:var(--text-primary);
  border:1px solid var(--border-subtle);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-md);
  display:flex;flex-direction:column;overflow:hidden;
}
.msq-dialog__head {padding:var(--ms-space-4);display:flex;align-items:center;gap:var(--ms-space-3);border-bottom:1px solid var(--border-subtle);}
.msq-dialog__head>input {min-width:0;flex:1;border:none;outline:none;background:transparent;color:var(--text-primary);font:500 var(--msq-text) var(--font-sans);}
.msq-dialog__head>button {border:1px solid var(--border-subtle);background:var(--bg-surface);color:var(--text-secondary);border-radius:var(--radius-sm);min-width:var(--ms-control);min-height:var(--ms-control);cursor:pointer;}
.msq-dialog__list {overflow-y:auto;padding:var(--ms-space-2);display:grid;gap:var(--ms-space-1);}
.msq-dialog__item {display:flex;align-items:center;justify-content:space-between;text-align:left;gap:var(--ms-space-3);width:100%;min-height:var(--msq-touch);padding:var(--ms-space-2) var(--ms-space-3);border:none;border-radius:var(--radius-sm);background:transparent;color:var(--text-primary);font:600 var(--ms-text-body) var(--font-sans);cursor:pointer;}
.msq-dialog__item:hover,.msq-dialog__item.is-current {background:var(--brand-primary-soft);color:var(--brand-primary-hover);}
.msq-dialog__item small {font-size:var(--ms-text-label);font-weight:500;color:var(--text-muted);}
.msq-dialog__empty {padding:var(--ms-space-5);color:var(--text-secondary);font-size:var(--ms-text-body);}
.msq-dialog__footer {padding:var(--ms-space-3) var(--ms-space-4);border-top:1px solid var(--border-subtle);color:var(--text-muted);font-size:var(--ms-text-label);}
@media(max-width:900px) {
  .pa-tc-body {min-width:0;}
  .pa-tc-nav__heading {min-height:var(--msq-touch);}
}
@media(max-width:600px) {
  .msq-launcher kbd {display:none;}
  .msq-dialog-backdrop {padding:var(--ms-space-3);align-items:start;}
  .msq-dialog {max-height:calc(100dvh - 2 * var(--ms-space-3));}
  :where(.motta-showcase,.motta-order-page) :is(input,select,textarea) {font-size:16px;}
}
@media(prefers-reduced-motion:reduce) {
  .pa-enterprise-nav__main,.pa-enterprise-nav__link,.pa-tc-nav__heading,.pa-tc-nav__item,.m3-nav-item {transition:none;}
  .msq-dialog-backdrop {backdrop-filter:none;}
}

/* Kalite 5.3: görev odaklı üretici istasyonu kontrolü */
.ms56-station-checklist {display:grid;gap:10px;min-width:0;margin:12px 0;border:1px solid var(--border-subtle,#dde2dc);padding:12px;border-radius:8px}
.ms56-station-checklist legend {padding:0 5px;font-size:13px;font-weight:700}
.ms56-station-check {display:flex;align-items:flex-start;gap:10px;font-size:13px;line-height:1.5;min-height:42px;cursor:pointer}
.ms56-station-check input {width:19px;height:19px;flex-shrink:0;margin-top:2px;accent-color:var(--brand-primary,#25704f)}
.ms56-station-check :focus-visible {outline:2px solid var(--border-focus,#25704f);outline-offset:3px}
/* Quality 5.4: non-approval production SVG preflight */
.ms56-textile {margin:16px 0;padding:15px;border:1px solid var(--border-subtle,#dbe4ee);background:var(--bg-surface,#fff);border-radius:8px;color:var(--text-primary,#17201d)}
.ms56-textile h3 {font-size:14px;margin:0 0 5px;font-weight:700}
.ms56-textile p {font-size:12px;line-height:1.5;margin:4px 0}
.ms56-textile__form,.ms56-textile__form label {display:grid;gap:6px;font-size:12px}
.ms56-textile__form {margin-top:10px;gap:10px}
.ms56-textile__row {display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:8px}
.ms56-textile input,.ms56-textile select {min-width:0;max-width:100%;padding:9px 10px;border-radius:8px;border:1px solid var(--border-subtle,#dbe4ee);background:var(--bg-surface,#fff);color:inherit;font:inherit}
.ms56-textile__result {padding:10px;border-radius:8px;margin-top:10px;background:var(--brand-primary-soft,#ebf4ed);font-size:12px;overflow-wrap:anywhere}
.ms56-textile__result.has-blockers {background:#fff1f2;color:#9f1239}
.ms56-textile__result strong {display:block;font-size:12px}
.ms56-textile__result small {display:block;margin-top:10px;color:var(--text-secondary,#65706b)}
/* Kalite 5.6: consistent on-demand task discovery without extra nested navigation. */
.ms56-task-launcher {min-height:36px;padding:7px 11px;border:1px solid var(--border-subtle,#dde2dc);border-radius:8px;background:var(--bg-surface,#fff);color:var(--text-primary,#17201d);font:600 12px/1.3 Inter,system-ui,sans-serif;cursor:pointer}
.ms56-task-launcher:hover {border-color:var(--brand-primary,#25704f)}
.ms56-task-launcher:focus-visible {outline:2px solid var(--border-focus,#25704f);outline-offset:3px}
.ms56-command-overlay {position:fixed;inset:0;z-index:2147482000;background:rgba(20, 28, 25,.52);display:flex;justify-content:center;align-items:flex-start;padding:10vh 16px 24px;overflow:auto}
.ms56-command {width:min(100%,550px);max-height:82dvh;display:flex;flex-direction:column;gap:12px;overflow:hidden;padding:20px;background:var(--bg-surface,#fff);color:var(--text-primary,#17201d);border-radius:8px;box-shadow:0 24px 85px rgba(20, 28, 25,.22);font-family:Inter,system-ui,sans-serif}
.ms56-command header {display:flex;gap:12px;align-items:center;justify-content:space-between}
.ms56-command h2 {font-size:17px;line-height:1.3;font-weight:700;margin:0}
.ms56-command header button {border:1px solid var(--border-subtle,#dde2dc);border-radius:8px;padding:9px 12px;background:transparent;color:inherit;font-size:12px;min-height:40px}
.ms56-command>p {color:var(--text-secondary,#65706b);font-size:12px;line-height:1.5;margin:0}
.ms56-command input {font:500 14px Inter,system-ui,sans-serif;padding:12px 13px;min-height:46px;border-radius:8px;color:inherit;border:1px solid var(--border-subtle,#c6cec7);background:var(--bg-surface,#fff)}
.ms56-command__list {overflow:auto;display:grid;gap:4px;align-content:start;padding-bottom:3px}
.ms56-command__list button {display:flex;align-items:center;justify-content:space-between;gap:10px;text-align:left;color:inherit;background:transparent;border:0;border-radius:8px;padding:12px;min-height:45px;cursor:pointer;font-size:13px}
.ms56-command__list button:hover,.ms56-command__list button:focus-visible {background:var(--bg-surface-hover,#f3f4f0);outline-offset:-2px}
.ms56-command__list strong {font-weight:600}
.ms56-command__list small {font-size:11px;color:var(--text-secondary,#65706b)}
@media(max-width:520px){.ms56-command-overlay {padding:0;align-items:flex-end}.ms56-command{width:100%;max-height:90dvh;border-radius:18px 18px 0 0;padding:18px}.ms56-command__list button {min-height:48px}}
@media(prefers-reduced-motion:reduce){.ms56-command-overlay *{animation:none!important;transition:none!important}}
